The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Delayed excecution
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 02/17/2021 :  2:46:43 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2021b (64-bit) Beta 5 9.8.5.105
Windows 7 Pro x64 SP1

Greetings!

https://www.originlab.com/doc/LabTalk/guide/Using-Semicolons-in-LT tells about leading semicolon for delayed execution.

Can you elaborate on this, please?
How does it work and what is the size of the delay before execution?

Thank you.

---
Andrey

cpyang

USA
1406 Posts

Posted - 02/17/2021 :  7:00:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The simplest example of this is the following:
1. you have a text label called "code" which has LT script
2. based on condition, your script will need to delete this label
3. deleting itself will crash, so in that case you put the label delete code with a delayed execution.

Basically Origin will put all delayed execution script into a separate buffer and use the window messaging system to trigger the execution when the system is not busy doing some window thing. The length of this delay is unpredictable but typically very short.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/18/2021 :  02:06:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

The simplest example of this is the following:
1. you have a text label called "code" which has LT script
2. based on condition, your script will need to delete this label
3. deleting itself will crash, so in that case you put the label delete code with a delayed execution.

Basically Origin will put all delayed execution script into a separate buffer and use the window messaging system to trigger the execution when the system is not busy doing some window thing. The length of this delay is unpredictable but typically very short.

CP




Does this mean, that the delay itself is not a fixed time, but a condition to wait until the object is free and safe to manipulation?

I cannot imagine a rationale for the text label to delete itself.
Can you share a test project, please?

---
Andrey
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000