Encrypting Stack Breaks Field References

Peter Bogdanoff bogdanoff at me.com
Sun Dec 13 21:56:46 EST 2020


Hi Ron,

About ‘it’ — is that supposed to be the name of the new field or something else? You can always use “last” to refer to a new control, “the last field” is “any object whose number property is equal to the number of objects of that type." ‘It’ might have been changed to something else in the meantime…

Peter

> On Dec 13, 2020, at 12:15 PM, Ron Noice via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> My program (built with LC 9.6.1 Indy Windows) contains a large number of references to fields by variables. For example, instead of refering to [fld "abc"] I refer to [fld tName] where tName is a variable containing "abc" (no quotes).
> 
> This has worked perfectly until I *encrypted* the stack (through the standalone settings). The standalone itself works with no problem; only when I encrypt it does it fight back. Here's a simplified example of what I'm doing:
> 
> create group "grpTree"
> ...
> copy fld "baseBox" to grp "grpTree"
> set the name of it to tName
> set the visible of fld tName to true
> ...
> 
> This gives me a "no such object" error on the "set the visible" line. Through testing, I've determined that
> - tName holds the correct value 
> - a field named with the value of tName has been correctly created
> - but it still seems to be the reference to [fld tName] that is the problem
> 
> This is about building family trees on-the-fly. The largest I've worked with so far has over 450 boxes (fields) in the tree all with connecting lines and all based on the ability to use variables to refer to the fields. At the moment I'm just leaving the stack unencrypted. But inquiring minds would like to know what the problem is. I know others have used this syntax for naming and am sure some of them must have encrypted their stacks. Clearly I'm missing something. 
> 
> Thanks for any brilliant suggestions you may have.
> 
> ... Ron
> _______________________________________________
> 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