Revisiting Lock Screen

Bob Sneidar bobsneidar at iotecdigital.com
Thu Mar 28 11:21:36 EDT 2024


Hi Alex. Thanks for responding. 

I have a module in my app called Software. I have 5 datagrids, one for software and 4 others for the entities the software license is linked to. Each datagrid has associated fields as well. Customers, Sites, Devices and Files. Each of these entities can be linked to the Software license by clicking a checkbox for each entity. All this does is put the unique ID of the entity in the respective column of the Software record and then update the database. 

When I click on a software title, each entity’s datagrid changes its selection based on the unique id saved in the Software record. For instance if a customer has 3 sites, and the software is linked to one of those sites, the datagrid selection is changed to reflect that. The same for the other three datagrids. 

I also have a tab widget with a tab for each entity, so that I can show the datagrid and objects associated with that entity and hide the others. As I update each entity’s datagrid and objects, I show those objects. Normally I want to see these things change to give the user a visual clue that there is something being processed by the app, but the effect is so rapid, it really distracting, so I decided against that and put a Lock Screen at the beginning of the selectionChanged handler for the Software datagrid thinking that this would prevent all the rapid visual effects, but it doesn’t. 

I know that Lock Screen is in effect because I store the lockScreen  in a variable right after setting it, then I check the variable in script debug mode. It is always true. 

I then remove the breakpoint, and run the routine, then check the lockscreen at the very end of the selectionChanged handler, it is STILL TRUE even though the screen has been updating the entire time. 

I hope that helps you. A screenshot or a short video would be nice but I cannot post those here. 

Bob S


> On Mar 28, 2024, at 5:13 AM, Alex Tweedly via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi Bob,
> 
> I'm not sure from your description how / when you are seeing the (unexpected) changes happening.
> 
> Remember that lockscreen is automatically set to false when there is no handler running, so unlerss you have an intensive handler running, you will see these changes.
> 
> If it's not that - could you describe how you are verifying the effect of lockscreen in more detail. Thanks.
> 
> Alex.
> 
> On 27/03/2024 22:55, Bob Sneidar via use-livecode wrote:
>> Hi all.
>> 
>> I read in the dictionary that Lock Screen does not work in Script Debug mode. Okay so I turn it off, put the command “Lock Screen” at the entry point to a selectionChanged handler which goes on to do a number of things that change the appearance of the screen. The screen is decidedly NOT LOCKED! The things I go on to do are things like changing the hilitedItems of a tab widget which in turn shows and hides a number of objects, and also changes the selection in a number of datagrids. Every action that alters the screen is visible after I issue the Lock Screen command.
>> 
>> Is Lock Screen completely hosed? Am I missing something??
>> 
>> Bob S
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list