Behavior question

dunbarx at aol.com dunbarx at aol.com
Tue Jul 21 19:54:53 EDT 2015


Peter.


A behavior is a property, not a handler in a script. That property is the long id of a button, which contains what one might call a "behavior" handler. The behavior handler is put into sort of its own separate "message path", accessed by other controls that have their behavior properties "point" to the behavior button and its behavior script.


So many behaviors.


Do this. On a new card, make two buttons. Name one "b1" and the other "b2". In the script of "b1", place this handler:


on getRandom
 answer random(99)
end getRandom.


In the script of "b2" place this:


on mouseUp
  getRandom
end mouseUp.


Now set the behavior of btn "b2" to the long id of btn "b1". And finally, click on "b2".


Does this help? I think you are misusing the idea of behaviors.


Craig



-----Original Message-----
From: Peter Haworth <pete at lcsql.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
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 at 3:33 PM Richard Gaskin <ambassador at fourthworld.com>
wrote:

> 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
>  
____________________________________________________________________
>  
Ambassador at FourthWorld.com                http://www.FourthWorld.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

 



More information about the use-livecode mailing list