What Sorts of Things Should I Not Do In Order To Avoid Needless Suffering?
There are some things that you could do that will cause you to scratch your head when things go wrong. Since knowing is half the battle we will share the issues we are aware of.
This will generate an error since you are deleting a control that is currently executing code. This is a no-no and the Revolution engine will complain and stop executing. You can avoid calling a handler that refreshes the data grid from within a control by a) using send in time or b) placing the code in the data grid script itself.
## Script that is in the row behavior for a data grid. send "DeleteIndex theIndex" to the dgControl of me in 0 seconds
## Script that deletes hilited index on mouseUp. ## Place in the data grid script. on mouseUp pMouseBtnNum if pMouseBtnNum is 1 then put the dgHilitedIndex of me into theIndex DeleteIndex theIndex end if end mouseUp
When a Data Grid renders it dynamically creates fields and accesses certain properties. Some of these properties can not be properly reported by the Revolution engine unless the field is on an open card.
If messages are locked when you try to access a data grid property (i.e. the dgProps["alternate row color"] of group "DataGrid") then the correct value will not be returned/set. When messages are locked getProp/setProp handlers are not triggered in Revolution and the data grid relies on these.
The data grid copies the templates from the Data Grid Templates xxxx stack. If you password protect this stack then the data grid will be unable to copy the templates.
If you rename this stack then all of your data grids with templates stored in the stack will stop working. Since the data grid can no longer locate the custom templates they will fail to draw properly.