Behavior question

Peter Haworth pete at lcsql.com
Wed Jul 22 14:18:56 EDT 2015


This now ringing a bell with a problem I had a few months ago where many
behaviors were not being resolved.  In that thread, somebody recommended a
repeat loop at startup to go through all objects in the stack, find the
ones with behaviors and set the behavior to its existing property.  That
fixed the problem.  But the current problem is happening in a stack which
was excluded from the behavior reset. I just changed the reset behavior
handler to include it and now all works fine.

Still don;t know why all that should be necessary, maybe it's because the
behavior objects are in a different stack than the objects that reference
them (the stack is referenced in a start using command at startup) but it
works so moving on.

I do recall someone (Richard Gaskin) entering an enhancement request for a
command to reestablish behaviors.  My handler is very fast, not even
noticeable at startup but it would be nice to have an official way to do it.

On Wed, Jul 22, 2015 at 11:03 AM Peter Haworth <pete at lcsql.com> wrote:

> Yep, checked it over and over, plus the spelling of the command.  My
> lcStackbrowser plugin has a feature where you click on an icon for an
> object's behavior and it automatically opens its script - that opens the
> correct script so pretty sure all is OK.
>
> I tried dispatching to a different handler - same result.
>
> I have got this to work however.  I deleted the behavior reference and
> reset it.  After that, all works well again.  But after quitting LC and
> starting it again, the behavior is no longer resolved.
>
> For some reason, the behavior is not being resolved at runtime by LC and
> deleting and resetting it forces it to be resolved.
>
> On Wed, Jul 22, 2015 at 9:57 AM J. Landman Gay <jacque at hyperactivesw.com>
> wrote:
>
>> You double-checked the path to the behavior, right? If there are any
>> other handlers in the behavior, do those work?
>>
>> On 7/22/2015 12:48 AM, Peter Haworth wrote:
>> > Right, the unhandled is what is throwing me, plus the fact that using
>> send
>> > results in a runtime error.
>> >
>> > As I've found, what I'm doing works in a simplified environment so for
>> some
>> > reason, this particular behavior isn't being resolved, just can't figure
>> > out why.
>> >
>> > On Tue, Jul 21, 2015 at 8:44 PM Mark Wieder <mwieder at ahsoftware.net>
>> wrote:
>> >
>> >> On 07/21/2015 04:55 PM, Peter Haworth wrote:
>> >>
>> >>> I just tried a very simple test in another stack and it worked so
>> there
>> >>> must be something in the stack with the problem that is preventing the
>> >>> behavior from being resolved.
>> >>
>> >> Well, it *should* work. In most cases anyway.
>> >>
>> >> The only thing I can think of that would mess it up is if you have a
>> >> loadData handler somewhere in a frontscript and it isn't passing the
>> >> message on when it's done.
>> >>
>> >> I think of behavior scripts as private backscripts of the parent
>> object.
>> >> So it should be the next thing in the message path unless a frontscript
>> >> grabs the message first and never lets go.
>> >>
>> >> I don't think that explains the "unhandled" status though, so there may
>> >> be something else going on.
>> >>
>> >> --
>> >>    Mark Wieder
>> >>    ahsoftware at gmail.com
>> >>
>> >> _______________________________________________
>> >> 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
>> >>
>> > _______________________________________________
>> > 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
>> >
>>
>>
>> --
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>> _______________________________________________
>> 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