Meatball protected stacks :-)

Peter Haworth pete at lcsql.com
Mon Jul 9 15:48:44 EDT 2012


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 <jacque at hyperactivesw.com>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.
>



More information about the use-livecode mailing list