Sorry Shane. It's a bit complicated.
I'm trying to build an alarm clock app that's very versatile, (mainly to learn about ASOC) and keep coming across things that don't seem to be covered in your eBook.
I'm using a Child Window to display 7 days of the week with 7 Segmented Controllers, with an array that keeps track of the states of the Segmented Controls (or the opposite, the Segmented Controls reflect the state of the Array 'theHoldingDaysArray') .
The code I posted sets the states of the Segmented Controls from 'theHoldingDaysArray' and naturally if a segmented Controller is clicked on, it set the appropriate part of the array, and is redrawn.
The posted code is for 7 a days array 'theHoldingDaysArray', but I have 31 days to code as well, and 12 months, and 5 weeks, all with Child Windows, and all with individual Arrays.
The array 'theHoldingDaysArray' is saved in a column 0 pixels wide, so it becomes part of ArrangedObjects, and the next 3 Child Windows Arrays will be the same.
I thought if I could use the same wording for the array and the Segmented Controller name I might be able to use a repeat loop and use sender as a variable (i don't know the terminology, so it's hard to explain.)
I'm (in my simple mind) wondering if there's an easier (shorter) way of keeping track of the state of the Segmented Controllers, and the Array 'theHoldingDaysArray'.
If not, I simply have to type in heaps of code.
I hope that's understandable, I'm not to sure I understand it myself : ).
Regards
Santa
On 11/08/2011, at 2:01 PM, Shane Stanley wrote: On Aug 11, 2011, at 1:22 PM, Brian Christmas wrote: Any takers on the matter, or have I got a lot of typing to do?
You certainly have a lot more typing to do *here* if you expect anyone to understand what you're doing. I can't make head nor tail of your post... -- Shane Stanley < email@hidden> 'AppleScriptObjC Explored' < www.macosxautomation.com/applescript/apps/>
|