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 <[email protected]> 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 ([email protected] > <mailto:[email protected]>) 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 > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ 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
