Hi all. 

What I once thought was an endless loop bug I have isolated now to something 
else. It seems that when selectionChanged for a datagrid is in the 
executionContexts, the dgData must not be changed. I am not sure if this causes 
an endless loop internally to the datagrid library or not. All I know is that I 
immediately CTD if I do it. 

What I want to know is if this is "unexpected behavior" or if I am just doing 
something stupid. I won't go too deep into the weeds on why this is an issue 
with me, but to give you an idea, I have a search mechanism that will populate 
a datagrid (say a device or devices that match my search criteria) when text is 
entered into a field. When the user clicks on the device, I must go back to the 
customer and sites and yes, the devices and reload the data for all of them. 

Everything works as it should up until I attempt to set the dgData for the 
device datagrid to ALL the devices for that site. Since the selectionChanged 
handler in the devices datagrid started the whole cascading effect, that 
handler is still running when the data gets swapped out. 

I suppose I can get around it by using send in time so the actual 
selectionChanged handler finishes before the cascade of form updates happens. 
But if it is a bug and shouldn't be happening, I suppose I should try to make a 
stack that reproduces it. (I may have already done so but I don't keep track of 
my own bug reports!) 

Bob S


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to