Handy behavior snippet

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Handy behavior snippet

J. Landman Gay via use-livecode
Hi all.

I came up with this handy snippet to put in a mouseUp handler of any behavior button:

   -- check for behavior script editing
   if  (the optionKey is down or the altkey is down) and the controlkey is down and \
         the environment is "development" then
      edit the script of this me
      exit mouseUp
   end if
   
Bob S -- this isn't part of the snippet
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
On a Mac you just hold the option and command keys down and click the control to access it’s script. Isn’t there an equivalent key combination for Windows?

Roger

> On Oct 11, 2017, at 8:14 AM, Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Hi all.
>
> I came up with this handy snippet to put in a mouseUp handler of any behavior button:
>
>   -- check for behavior script editing
>   if  (the optionKey is down or the altkey is down) and the controlkey is down and \
>         the environment is "development" then
>      edit the script of this me
>      exit mouseUp
>   end if
>
> Bob S -- this isn't part of the snippet
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
That edits the script of the actual button. It doesn't edit the script of the behavior of that button. That is what my snippet does. You put it into a mouseUp handler of the BEHAVIOR script.

Bob S


> On Oct 11, 2017, at 09:09 , Roger Guay via use-livecode <[hidden email]> wrote:
>
> On a Mac you just hold the option and command keys down and click the control to access it’s script. Isn’t there an equivalent key combination for Windows?
>
> Roger

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
Ah yes . . . excellent! Thanks!!


> On Oct 11, 2017, at 9:10 AM, Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> That edits the script of the actual button. It doesn't edit the script of the behavior of that button. That is what my snippet does. You put it into a mouseUp handler of the BEHAVIOR script.
>
> Bob S
>
>
>> On Oct 11, 2017, at 09:09 , Roger Guay via use-livecode <[hidden email]> wrote:
>>
>> On a Mac you just hold the option and command keys down and click the control to access it’s script. Isn’t there an equivalent key combination for Windows?
>>
>> Roger
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
BTW this reminds me of a feature request I'd like to see implemented at some point. When in browse mode, command-option-clicking a disable button will NOT edit it's script. It will edit the script of the CARD instead, presumably because a disabled button does not receive a mouseUp in browse mode (odd that it would in pointer mode). Anyone else think this would be useful?

Bob S


> On Oct 11, 2017, at 09:10 , Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> That edits the script of the actual button. It doesn't edit the script of the behavior of that button. That is what my snippet does. You put it into a mouseUp handler of the BEHAVIOR script.
>
> Bob S
>
>
>> On Oct 11, 2017, at 09:09 , Roger Guay via use-livecode <[hidden email]> wrote:
>>
>> On a Mac you just hold the option and command keys down and click the control to access it’s script. Isn’t there an equivalent key combination for Windows?
>>
>> Roger
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
The same thing was added to the object contextual menu recently. You're
right it's very handy but they beat you to it. :)

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On October 11, 2017 11:12:46 AM Bob Sneidar via use-livecode
<[hidden email]> wrote:

> That edits the script of the actual button. It doesn't edit the script of
> the behavior of that button. That is what my snippet does. You put it into
> a mouseUp handler of the BEHAVIOR script.
>
> Bob S
>
>
>> On Oct 11, 2017, at 09:09 , Roger Guay via use-livecode
>> <[hidden email]> wrote:
>>
>> On a Mac you just hold the option and command keys down and click the
>> control to access it’s script. Isn’t there an equivalent key combination
>> for Windows?
>>
>> Roger
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
Oh right! shift-control-command click! (For MacOS at least)

Bob S


> On Oct 11, 2017, at 09:26 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> The same thing was added to the object contextual menu recently. You're right it's very handy but they beat you to it. :)
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
Hmmm... if you mean editing the script of a disable button, yes. But there is nothing there to edit the behavior of the object. That would be really handy, because it wouldn't be restricted to just buttons or objects that get mouseUp. I know in v9 there is a little target icon in the properties of an object (maybe it was the script I don't remember), but not in v8.

Bob S


> On Oct 11, 2017, at 09:32 , Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Oh right! shift-control-command click! (For MacOS at least)
>
> Bob S
>
>
>> On Oct 11, 2017, at 09:26 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>>
>> The same thing was added to the object contextual menu recently. You're right it's very handy but they beat you to it. :)
>>
>> --
>> Jacqueline Landman Gay         |     [hidden email]
>> HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
I can't remember when it was added but I've been using v9 for a while so
maybe it was that version.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On October 11, 2017 11:38:23 AM Bob Sneidar via use-livecode
<[hidden email]> wrote:

> Hmmm... if you mean editing the script of a disable button, yes. But there
> is nothing there to edit the behavior of the object. That would be really
> handy, because it wouldn't be restricted to just buttons or objects that
> get mouseUp. I know in v9 there is a little target icon in the properties
> of an object (maybe it was the script I don't remember), but not in v8.
>
> Bob S
>
>
>> On Oct 11, 2017, at 09:32 , Bob Sneidar via use-livecode
>> <[hidden email]> wrote:
>>
>> Oh right! shift-control-command click! (For MacOS at least)
>>
>> Bob S
>>
>>
>>> On Oct 11, 2017, at 09:26 , J. Landman Gay via use-livecode
>>> <[hidden email]> wrote:
>>>
>>> The same thing was added to the object contextual menu recently. You're
>>> right it's very handy but they beat you to it. :)
>>>
>>> --
>>> Jacqueline Landman Gay         |     [hidden email]
>>> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
In dp9, now, when you right-click on an object, the first line is edit
script, the second is edit behavior script.

On Wed, Oct 11, 2017 at 1:04 PM, J. Landman Gay via use-livecode <
[hidden email]> wrote:

> I can't remember when it was added but I've been using v9 for a while so
> maybe it was that version.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
>
> On October 11, 2017 11:38:23 AM Bob Sneidar via use-livecode <
> [hidden email]> wrote:
>
> Hmmm... if you mean editing the script of a disable button, yes. But there
>> is nothing there to edit the behavior of the object. That would be really
>> handy, because it wouldn't be restricted to just buttons or objects that
>> get mouseUp. I know in v9 there is a little target icon in the properties
>> of an object (maybe it was the script I don't remember), but not in v8.
>>
>> Bob S
>>
>>
>> On Oct 11, 2017, at 09:32 , Bob Sneidar via use-livecode <
>>> [hidden email]> wrote:
>>>
>>> Oh right! shift-control-command click! (For MacOS at least)
>>>
>>> Bob S
>>>
>>>
>>> On Oct 11, 2017, at 09:26 , J. Landman Gay via use-livecode <
>>>> [hidden email]> wrote:
>>>>
>>>> The same thing was added to the object contextual menu recently. You're
>>>> right it's very handy but they beat you to it. :)
>>>>
>>>> --
>>>> Jacqueline Landman Gay         |     [hidden email]
>>>> HyperActive Software           |     http://www.hyperactivesw.com
>>>>
>>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Handy behavior snippet

J. Landman Gay via use-livecode
Oh cool! I am sticking with v8 right now just because I do production work every day and cannot afford for an unforeseen issue to stop progress.

Bob S


> On Oct 11, 2017, at 11:25 , Mike Kerner via use-livecode <[hidden email]> wrote:
>
> In dp9, now, when you right-click on an object, the first line is edit
> script, the second is edit behavior script.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode