Bruce,
 
we will get to this in class, and I think it will make more sense then.
 
When scripting started out we only had menus inside of dialogs, and we only
had the dialog command to access them.
 
later, the app menu was added, and since it's outside of the xml dialogs,
the menu command was added to work with it.
 
They can't put all this history in the reference manual, so we can help by
asking questions here when you don't understand, having scripting classes,
and writing wiki articles to help explain things.  I do have a wiki article
started, and I or someone will get around to modifying it (I think it's
called user interfaces) to explain things like this.  
 
I'm curious though, did you go looking in the wiki articles?
 
We all could do better in both using the wiki when we have questions, and
writing articles to help others.
 
If you have a suggestion for a particular entry in the reference manual, you
can of course email GW with it (being sure to be clear on which entry you're
refering to); but if you're complaint is that it's sometimes hard and
confusing, well, that's programming!
 
Slow down a bit and we'll get to it in class (if we can catch up with you!),
and if you'll let me know of the things which are confusing; that way, it
will end up helping everyone.
 
Chip
 
 

  _____  

From: BT [mailto:[email protected]] 
Sent: Monday, May 23, 2011 8:36 PM
To: [email protected]
Subject: Object Manual and Poor Explanation


 
Hi!
    I mentioned to Chip today that the setting up menu's along with the
IniFile default, in both cases there lacking in good explanations and
details. The IniFile default is only good as an alternative to having
nothing and not for setting a default...only good for testing.
 
 
    Below is what I figured out but not from a direct reading of the Object
manual. 
    first in the manual you get an explanation of the menu and it's setting
up along with a simple example.
    then down in the dialog section it mentions in an example how to get a
menu item, but it is not the same. 
    Nothing mentioned to why that example and the other menu object and it's
example are different, but works in the event.
 
    then, with no explanation nor examples, nor any properties the creation
of a menu object is given in the dialog section... BANG!
 
    so, why was one mentioned way back, then mentioned with parens later,
but no connection between the 2 and the need for one gets the other?
 
    The parens shown are not even needed but placed in the example.
 
    Once I figured out that you had to create the menu in the dialog then
the other syntax came into play, but no clue until I figured it out.
 
    Anyway, below works, and you have to create the menu inside the dialog
even though when monitoring the events you use dialog format, but not until
you create the menu object, then and only then can you use the menu
properties...
 
NOTE: I had to guess that Text would be a property for there was no mention
of that any where in the manual...
 
    Very frustrating, if giving classes, can't you at least get the manual a
little better reading?
 
Working Dialog with menu's:
    Set myDialog = dObj
    Set myDialogMenu = dObj.Menu
    myDialogMenu.Checked( "menu_hourly_DateTime") =
INIFile(myINIFile).Number( "Configuration", "Enhance_Hotkey", False)
    myDialogMenu.Text( "menu_edit_sleep") = timeTextValues( "Sleep Edit: ",
sleepHour, sleepMinute)
    myDialogMenu.Text( "menu_edit_wakeup") = timeTextValues( "Wakeup Edit:
", wakeHour, wakeMinute)
    myDialogMenu.Text( "menu_edit_alarm") = timeTextValues( "Alarm Edit: ",
alarmHour, alarmMinute)

        Bruce
 

Reply via email to