I have a button named "myButton" with a behavior "myBehavior" whose script
includes a handler named "loadData".
>From anther control I execute:
dispatch "loadData" to button "myButton"
The loadData handler is not executed and the it variable contains
"unhandled" after the dispatch command.
That
of "myButton",
then simply invoking "loadData" from that control would cause the handler in
"myButton" to fire.
Is this what you are seeing? Or not seeing?
Craig Newman
-Original Message-
From: Peter Haworth
To: How to use LiveCode
Sent: Tue, Jul 21,
On 7/21/2015 4:02 PM, Peter Haworth wrote:
I have a button named "myButton" with a behavior "myBehavior" whose script
includes a handler named "loadData".
From anther control I execute:
dispatch "loadData" to button "myButton"
The loadData handler is not executed and the it variable contains
Is loadData defined as a command or a function?
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
ambassa...@fourthworld.comhttp://www.FourthWorld.co
quot; to fire.
>
>
> Is this what you are seeing? Or not seeing?
>
>
> Craig Newman
>
>
>
> -Original Message-
> From: Peter Haworth
> To: How to use LiveCode
> Sent: Tue, Jul 21, 2015 5:05 pm
> Subject: Behavior question
>
>
> I have
Thanks Jacque, that might have yielded a clue. When I use send, I get a
runtime error "can't find handler".
I've had issues in the past with behavior references not being resolved, to
the extent that I wrote a handler to re-establish all object behavior
references when my stack opens. Maybe this
It's a command. Even checked the spelling and also copy/pasted the handler
name from it's declaration into the dispatch command.
On Tue, Jul 21, 2015 at 3:33 PM Richard Gaskin
wrote:
> Is loadData defined as a command or a function?
>
> --
> Richard Gaskin
> Fourth World Systems
> Softwar
-Original Message-
From: Peter Haworth
To: How to use LiveCode
Sent: Tue, Jul 21, 2015 6:54 pm
Subject: Re: Behavior question
It's a command. Even checked the spelling and also copy/pasted the
handler
name from it's declaration into the dispatch command.
On Tue, Jul
21, 2015
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.
On Tue, Jul 21, 2015 at 3:53 PM Peter Haworth wrote:
> It's a command. Even checked the spelling and also copy/pasted the
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
Yes, of course behavior is a property but the control referred to in the
behavior has a script and the loadData handler is in that script. Hope
that clarifies things
On Tue, Jul 21, 2015 at 8:44 PM Mark Wieder wrote:
> On 07/21/2015 04:55 PM, Peter Haworth wrote:
>
> > I just tried a very simpl
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
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 w
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 -
Is this one of the behaviors that's dynamically assigned at startup or
when a stack opens? I wonder if it's assigned too soon, before
everything has finished loading.
On 7/22/2015 1:03 PM, Peter Haworth wrote:
Yep, checked it over and over, plus the spelling of the command. My
lcStackbrowser
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
Peter Haworth wrote:
> 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.
Mark Waddingham's comment #8 here suggests a go
Well now it's one of the ones that is assigned at startup - it wasn't when
I started this thread. I'm pretty sure this all has to do with the
engine's resolution of behavior references happening before all stacks are
loaded.
I have all my behaviors in a separate mainstack which is opened in a
pre
Thanks Richard. Read Mark's comment and I agree his solution sounds like
the best way forward.
On Wed, Jul 22, 2015 at 12:05 PM Richard Gaskin
wrote:
> Peter Haworth wrote:
> > I do recall someone (Richard Gaskin) entering an enhancement request
> > for a command to reestablish behaviors. My
Put a reference to the behavior stack in the stackFiles property of my
application stack and commented out the startup handler. It works!
On Wed, Jul 22, 2015 at 12:39 PM Peter Haworth wrote:
> Well now it's one of the ones that is assigned at startup - it wasn't when
> I started this thread.
On 07/22/2015 12:39 PM, Peter Haworth wrote:
Well now it's one of the ones that is assigned at startup - it wasn't when
I started this thread. I'm pretty sure this all has to do with the
engine's resolution of behavior references happening before all stacks are
loaded.
I have all my behaviors i
I never would have thought of that. What a handy tip.
On 7/22/2015 5:32 PM, Peter Haworth wrote:
Put a reference to the behavior stack in the stackFiles property of my
application stack and commented out the startup handler. It works!
On Wed, Jul 22, 2015 at 12:39 PM Peter Haworth wrote:
22 matches
Mail list logo