It appears that the menuPick message is generated when the contents of a combobox menu are set within a script as well as when the user selects a value?
If that's true, is there some way I can prevent the menuPick message from being processed?
The situation I have is that I am loading data from a database into fields on a card (that's when the menuPick message seems to get generated), and I have a menuPick handler that updates the database whenever the user changes the contents of a field/menu/etc on the card. This means mu database update procedure is being executd when I'm just loading data into the card.
As a side question, is there a way to trace the messages that are generated as a user opens a card, types data, etc?
Thanks,
Pete
menuPick message
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
You can check up menuHistory in the docs as well as menuPick, although I think from memory if the menuHistory setting changes the value already in the combo box menu then it generates a menuPick message as well.
You can simply enough "lock messages" before setting the menuHistory and then "unlock messages" afterwards.
There may be a more sophisticated way, but I'm not sure at the moment.
To see what messages are generated, in the IDE menu under Development, you will see the option to select the "message watcher" - you may well get flooded at certain times when screen events happen, but you will literally see all the messages generated.
(locking and unlocking messages at key points can really help improve your application's running speed - although it comes with it's own caveats about making sure that you don't lock out things like being able to respond to a keypress or mouseclick while in a repeat loop, etc)
HTH
You can simply enough "lock messages" before setting the menuHistory and then "unlock messages" afterwards.
There may be a more sophisticated way, but I'm not sure at the moment.
To see what messages are generated, in the IDE menu under Development, you will see the option to select the "message watcher" - you may well get flooded at certain times when screen events happen, but you will literally see all the messages generated.
(locking and unlocking messages at key points can really help improve your application's running speed - although it comes with it's own caveats about making sure that you don't lock out things like being able to respond to a keypress or mouseclick while in a repeat loop, etc)
HTH
Thanks, the lock and unlock seems to have fixed it and I can limit the scope so I don;t think it will interfere with any other messages.
Don;t how I missed the Message Watcher!
Here's another little issue. I am setting the label of the button to the text I want the combobox to show, which works fine, but I'm also setting the menuHistory as you mentioned. I thought that would result in the item whose text is displayed being highlighted when I clicked on the combobox arrow, but it's not and the list doesn't scroll down to where the item can be seen, which is a little weird. This is on a Mac.
Is there some other property I have to set?
Thanks,
Pete
Don;t how I missed the Message Watcher!
Here's another little issue. I am setting the label of the button to the text I want the combobox to show, which works fine, but I'm also setting the menuHistory as you mentioned. I thought that would result in the item whose text is displayed being highlighted when I clicked on the combobox arrow, but it's not and the list doesn't scroll down to where the item can be seen, which is a little weird. This is on a Mac.
Is there some other property I have to set?
Thanks,
Pete