• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is it possible to simplify this code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to simplify this code?


  • Subject: Re: Is it possible to simplify this code?
  • From: Brian Christmas <email@hidden>
  • Date: Thu, 11 Aug 2011 14:56:46 +1000

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/>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Is it possible to simplify this code?
      • From: Shane Stanley <email@hidden>
References: 
 >Is it possible to simplify this code? (From: Brian Christmas <email@hidden>)

  • Prev by Date: Is it possible to simplify this code?
  • Next by Date: Re: Is it possible to simplify this code?
  • Previous by thread: Is it possible to simplify this code?
  • Next by thread: Re: Is it possible to simplify this code?
  • Index(es):
    • Date
    • Thread