SpeedFreak
Apr 4 2006, 05:52 PM
So my understanding is that the return passes through OnControlProperty but my calls to get controlproperty happen at various stages like where I add a row, delete a row, get the data.
My question is how am I supposed to distinguish between these cases since they all apply to the same control? Obviously I wouldn't want the aco for a particular row to be selected if the operation was a deletion but I want it selected if it was clicked.
GKusnick
Apr 5 2006, 02:08 PM
Every time you call GetControlProperty, wait for the result before continuing.
| CODE |
skapi.GetControlProperty(...); skapi.WaitEvent(timeout, wemSpecific, evidOnControlProperty); // do something with the returned value |
Then there's no possibility of getting confused.
If you're doing this sort of thing a lot, you might find it useful to keep a data structure on the script side reflecting what's in the list. Then you can just query the local data structure to retrieve property values, instead of having to go through the GetControlProperty rigmarole every time. Just be sure to keep the data structure updated whenever you do a SetControlProperty.