Button is behavior

Mike Bonner bonnmike at gmail.com
Thu Nov 27 11:31:17 EST 2014


Was curious and tried it. 4000 controls, took 107 milliseconds to index, on
my system.  It picked up datagrid behaviors too.
local sObehaveListA
on mouseUp
   put the milliseconds into tStart
   put empty into sObehaveListA
   repeat with i = 1 to (the number of controls of this stack)
      if the behavior of control i is not empty then
         put the name of control i & cr after sObehaveListA[(the behavior
of control i)]
      end if
   end repeat
   put the milliseconds - tStart & cr
put the keys of sObehaveListA after msg
end mouseUp

On Thu, Nov 27, 2014 at 9:25 AM, Mark Wieder <mwieder at ahsoftware.net> wrote:

> Mike-
>
> Thursday, November 27, 2014, 8:16:18 AM, you wrote:
>
> > Have perused the dictionary, don't think there is currently a way to do
> > what you want.  Feature request?
>
> I'm not even sure a feature request would help here. Being used as a
> behavior isn't a property of an object, it's just a reference from
> some other object.
>
> > The only other option would be to cycle through the controls and build a
> > behavior list.  Might be interesting to do though, build an array keyed
> by
> > button id, that contains a list of objects that it supplies behavior to.
>
> That's the only way I could think of doing this. You could also set a
> custom property on buttons that you're using as behavior objects and
> query on that.
>
> But Hugh, what are you trying to accomplish?
>
> --
> -Mark Wieder
>  ahsoftware at gmail.com
>
> This communication may be unlawfully collected and stored by the National
> Security Agency (NSA) in secret. The parties to this email do not
> consent to the retrieving or storing of this communication and any
> related metadata, as well as printing, copying, re-transmitting,
> disseminating, or otherwise using it. If you believe you have received
> this communication in error, please delete it immediately.
>
>
> _______________________________________________
> 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