• 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: What can I use for dynamic menu please?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What can I use for dynamic menu please?


  • Subject: Re: What can I use for dynamic menu please?
  • From: Wayne Melrose <email@hidden>
  • Date: Wed, 10 Aug 2011 10:52:18 +0200





On 10. aug. 2011, at 10:36, Brian Christmas wrote:



on setTheDays_(sender)
         set typeFlag to  theTypeStore's titleOfSelectedItem()  
         if typeFlag as text is in {"Once","Monthly","Yearly"} then
            theDayStore's removeAllItems()
            theDayStore's addItemsWithTitles_({"Not Applicable"})
         else
            set tempString to {"Every Day","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}
            set typeFlagDay to theDayStore's titleOfSelectedItem()
            if typeFlagDay as text is in { "", "Not Applicable"} then set typeFlagDay to item 1 of tempString as text
            theDayStore's removeAllItems()
            theDayStore's addItemsWithTitles_(tempstring)
            theDayStore's selectItem_("Monday")
            theDayStore's selectItem_("Friday")
            theDayStore's selectItem_("Sunday")
            theDayStore's selectItemWithTitle_(typeFlagDay)-- Even with this removed, the above statements do  not work
         end if
         my setTheMonths_(sender)
    end SetTheDays_


I can't really help much with your question regarding multiple selection, but regarding setting the single popup choice to "Not Applicable", which I assume you mean that you don't want the use to bother with any interaction? As a user interface choice, would it not be better to disable the popup all together? So bind a boolean value to the 'enabled' property of the popup  then just set that value within your if / else....


on setTheDays_(sender)
         set typeFlag to  theTypeStore's titleOfSelectedItem()  
         if typeFlag as text is in {"Once","Monthly","Yearly"} then
            --theDayStore's removeAllItems()
            --theDayStore's addItemsWithTitles_({"Not Applicable"})
set my blnPopupEnabled to false
         else
set my blnPopupEnabled to true
            set tempString to {"Every Day","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}
            set typeFlagDay to theDayStore's titleOfSelectedItem()
            if typeFlagDay as text is in { "", "Not Applicable"} then set typeFlagDay to item 1 of tempString as text
            theDayStore's removeAllItems()
            theDayStore's addItemsWithTitles_(tempstring)
            theDayStore's selectItem_("Monday")
            theDayStore's selectItem_("Friday")
            theDayStore's selectItem_("Sunday")
            theDayStore's selectItemWithTitle_(typeFlagDay)-- Even with this removed, the above statements do  not work
         end if
         my setTheMonths_(sender)
end SetTheDays_
 _______________________________________________
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

References: 
 >What can I use for dynamic menu please? (From: Brian Christmas <email@hidden>)
 >Re: What can I use for dynamic menu please? (From: Shane Stanley <email@hidden>)
 >Re: What can I use for dynamic menu please? (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: What can I use for dynamic menu please?
  • Next by Date: How do I set up image in segmented controller?
  • Previous by thread: Re: What can I use for dynamic menu please?
  • Next by thread: Re: What can I use for dynamic menu please?
  • Index(es):
    • Date
    • Thread