setProp and Lock messages
zryip.theslug at gmail.com
Sat Dec 3 18:53:42 EST 2011
On Sat, Dec 3, 2011 at 7:01 PM, Todd Geist <todd at geistinteractive.com> wrote:
> More on this…
> I just tested locking messages prior to calling a handler that eventually
> sets the dgData of a DataGrid. Of course no data is set into the Datagrid.
> Is this not a problem?
Using the lock messages command with properties changes the scope of
the properties from the virtual to the existing (or physical) state
1. Messages are unlocked and the control contains the corresponding
getProp and setProp will be executed. In this case the property is virtual
set the dgData of grp "MyDatagrid"
2. Messages are unlocked and the corresponding properties definition
not exists in the control.
In this case this is a "physical" property you can access with the
Inspector's "Custom properties" tab
set the cDgData of grp "MyDatagrid"
3. Messages are locked and the corresponding property exists in the control.
By locking the messages, you will change the scope of properties from
the virtual state to the "physical" state
SetProp myProp pValue
set the myProp of the target to pValue
Will not only prevent a loop issue, but also is a good way to save the
virtual property value, inside an object.
set the dgData of grp "myDataGrid" to tData
We can say, according to the datagrid doc, that the dgData property
will fail because the dgData will not be triggered by the datagrid
In my opinion, always be confident in the datagrid documentation and
do not believe Mark when he says, you should not believe in the
Or point him out the documentation. 8-)
You should check the custom properties of the datagrid group with the
inspector. You should have now a dgData property inside it with all
the data you tried to display. You should remove this dgData property,
in the goal to keep your project free of useless data.
-Zryip TheSlug- wish you the best! 8)
More information about the Use-livecode