Jump to content
Karsten Wenzke

Reasons to detach values by using #

Recommended Posts

Hey all,

 

We prepared a small demo to show the impact of the detach function '#'

  1. Avoid infinite recursion parameter i(0) i.setValue(#i.getValue()+1) Without the #, the parameter i would be changed referencing itself. Every increase of i would automatically trigger another update, resulting in an infinite loop. Therefore using only the parameters value at that specific time avoids this recursion.
  2. Keep value at specific moment parameter i(0) parameter j(#i) i.setValue(1) With the # the parameter j will be 0, disregarding all further changes made to i. Without the detachment, in this example j would be changed to 1 along with i.

Thanks Sebastian for this small demo and illustration

 

Best regards

 

Karsten

DetachDemo.fdb

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...