Scope of Controls
Posted: Mon Apr 14, 2014 8:13 am
I am working on a simple application which was working fine until I added a second card. The application has most of the routines written in the stack. I started with two data grids on the first card and all was well. I decided to move one of the datagrids to a new second card and now I am having problems writing data to it.
After much running around in circles I have decided that I am attempting to write to controls (datagrid) that are out of scope and because of their complexity datagrids do not fail in the same way that simple controls do.
The code snip below fails to write to a datagrid that is on card 2 of the stack and is not displayed as card 1 is being displayed when the script is run.
Am I correct in thinking that a handler in the stack will default to searching the current card or do they just default to card 1 of stack. i.e. if I write the short code : is the engine actually adding a "of card 1" or "of the current card" to the call. Looking at the message path diagrams it would seem that a handler in a stack should never find a control on a card, yet they do.
best wishes
Simon K
After much running around in circles I have decided that I am attempting to write to controls (datagrid) that are out of scope and because of their complexity datagrids do not fail in the same way that simple controls do.
The code snip below fails to write to a datagrid that is on card 2 of the stack and is not displayed as card 1 is being displayed when the script is run.
Am I correct in thinking that a handler in the stack will default to searching the current card or do they just default to card 1 of stack. i.e. if I write the short code :
Code: Select all
set the dgText[false] of grp "DgDuplicates" to sTestData
best wishes
Simon K