Case Study: Behaviors Failing - Can't set break points

Pete pete at
Tue Dec 27 17:45:00 EST 2011

Hi Todd,
It's my understanding that the start using command makes the handlers in
the stack script of the main stack available to your application.  Nothing
else, including behavior button scripts, are made available by issuing a
start using command.  No doubt someone will correct me if I'm wrong!

This is very similar to the situation that I have where I have my behavior
buttons on a card in a substack of the stack I name in my start using
command.  I remember tearing my hair out trying to figure out how to
activate the behaviors and I honestly don't remember all the things I
tried.  All I know is that using the Stack Files tab of the main stack's
Inspector palette to make a reference to the short name of my behavior
substack resolve to the full path of it's main stack fixed the problem for
me.  I guess LC opens the stacks named in the stack files list when it
first starts up, although you still have to use the start using command to
make the main stack script handlers available to your application.

I agree with Richard that the ability to issue a command that will resolve
behaviors at any time would be great, kinda like inserting/removing front
scripts.  I voted for his enhancement request.

On Tue, Dec 27, 2011 at 2:19 PM, Todd Geist <todd at>wrote:

> On Tue, Dec 27, 2011 at 1:59 PM, Richard Gaskin
> <ambassador at>wrote:
> >
> > If you find the script is in play under such circumstances, I'd like to
> > learn how you did it.
> >
> > I've been wanting a way to resolve behaviors at arbitrary execution
> points
> > rather than relying on stack opening, and have made this request for a
> new
> > "resolve behaviors" command to do that:
> > <**show_bug.cgi?id=8993<
> > >
> >
> Well I am not sure if I have what you are looking for. But I can tell you
> that I have behaviors in a sort of half linked state.  They do not work BUT
> in the IDE if you control click on a such button with a broken behavior and
> select "Send Message" you will see the Handlers in the Behavior script.  If
> you try to to send the message, it fails.
> My Behaviors are on the second card of a Library Stack. That was loaded
> into memory using "start using". It was not opened before the "start
> using".  These Behaviors are loaded AFTER the stack that uses them. And it
> is this stack that has the broken behaviors.  This makes sense since I am
> loading the behaviors too late.  But the behaviors are in memory they are
> just not correctly linked to their child buttons any more.
> in my case I can fix these quite easily because all the broken buttons are
> on one card. I am using them for code only.  I simply loop through the
> controls on the card and set the behavior of each control to itself.
> *On* ResetBeahviors
>   *repeat* with i = 1 to the number of controls of me
>      *put* the long id of control i of me into tControl
>      *put* word 1 of the name of tControl into tType
>      *if* tType = "button" *then*
>         *set* the behavior of tControl to the behavior of tControl
>      *end* *if*
>   *end* *repeat*
> *end* ResetBeahviors
> Hope that helps
> Todd
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

Molly's Revenge <>

More information about the Use-livecode mailing list