Hi Jacque,
My property values do change during execution but your script gave me an
idea whcih seems to work.

I put the following into the script of my main stack:

local tProperty

command setValue value
   put pvalue into tProperty
end setValue

function getValue
   return tProperty
end getValue

I can call setValue/getValue from any script within the main/substack
hierarchy.  setValue always seems to work correctly and getValue always
seems to return the current value of tProperty.  The value doesn't survive
after the stack is closed of course but that isn't a problem for what I
need to do.

I think I can write getProp and setProp handlers in my main stack script to
implement this without having to change all references to custom properties
in my existing code.

Pete
lcSQL Software <http://www.lcsql.com>



On Fri, Jul 6, 2012 at 6:50 PM, J. Landman Gay <[email protected]>wrote:

> I usually use encrypted properties. But it's possible to embed secret
> things in scripts even if the stack's locked:
>
> function getSecretThing pType
>   switch pType
>   case "password"
>     return "mypass"
>     break
>   case "username"
>     return "mrEd"
>     break
>   case "keysToKingdom"
>     return "aHorse"
>     break
>   end switch
> end getSecretThing
>
> It only works if the secret things don't change though.
>
_______________________________________________
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