Script Only Stack Architecture

Ali Lloyd ali.lloyd at livecode.com
Mon Apr 4 04:32:04 EDT 2016


localPath() &
"main-stack-scripts/generic-mobile-functions_behavior.livecode" is not a
valid stack reference - it's just a path. Try:

on assignBehaviors

set the behavior of stack "siva-portal-links_behavior" to the long id of
stack (localPath() &
"main-stack-scripts/generic-mobile-functions_behavior.livecode")

end assignBehaviors

On Mon, Apr 4, 2016 at 5:42 AM Sannyasin Brahmanathaswami <brahma at hindu.org>
wrote:

> But FWIW.. this does not work
>
> on assignBehaviors
>
> set the behavior of stack "siva-portal-links_behavior" to (localPath() &
> "main-stack-scripts/generic-mobile-functions_behavior.livecode")
>
> end assignBehaviors
>
> OTOH: if you assign the behavior via the inspector to the script-only
> stack it *does* work..
>
> So there must be a syntax for that that we can use also.
>
> What is it?
>
> On March 31, 2016 at 12:30:50 PM, Ali Lloyd (ali.lloyd at livecode.com
> <mailto:ali.lloyd at livecode.com>) wrote:
>
> My solution to this:
>
> Stack "MyTestStack" has a field, which is assigned stack
> "MyBehaviorStack" as its behavior property.
>
> Stack "MyBehaviorStack" is a separate stack file.
>
> would be to also include the behavior *setting* in the preOpenStack handler
> of "MyTestStack".
>
> on preOpenStack
> set the behavior of field "FieldWithBehavior" of me to <path to
> MyBehaviorStack>
> end preOpenStack
> _______________________________________________
> 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