Re: Button scripts

2019-10-05 Thread dunbarx--- via use-livecode
Hi.
The "target" tells LC which control received a message. If you had a script in 
the card, something like:
on mouseUp
set the bordercolor of the Target to "orange"
set the showBorder of the target to "true"
--- do somethingend mouseUp
You would not only have quotes in places you ought to, but need only that one 
handler in your stack.
Note that oftentimes you do not want EVERY button to react that way. There are 
two ways around that.
1- Trap "mouseUp" in the offending button.2- Set a property of some sort in 
those buttons, such that (pseudo):
on mouseUp
if the name of the target has some nice property thenset the bordercolor of the 
Target to "orange"...
Craig

-Original Message-
From: General 2018 via use-livecode 
To: use-livecode@lists.runrev.com 
Cc: General 2018 
Sent: Sat, Oct 5, 2019 12:57 pm
Subject: Button scripts

Hi ,

Have many buttons that do different operations , each one has the following 
script :-

Is the script required for each button and is the use of flush correct ?

on mouseUp
set the bordercolor of me to orange
set showBorder of me to true
--- do something
get flushEvents("mouseUp")
end mouseUp



on mouseleave
set showBorder of me to false
get flushEvents("mouseleave")
end mouseleave


Regards
Camm
___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Button scripts

2019-10-05 Thread General 2018 via use-livecode
Hi ,

Have many buttons that do different operations , each one has the following 
script :-

Is the script required for each button and is the use of flush correct ?

on mouseUp
set the bordercolor of me to orange
set showBorder of me to true
--- do something
get flushEvents("mouseUp")
end mouseUp



on mouseleave
set showBorder of me to false
get flushEvents("mouseleave")
end mouseleave


Regards
Camm
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Mike Bonner via use-livecode
Cool!  thanks Monte!

On Wed, Jun 21, 2017 at 5:48 PM, Mark Talluto via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > On Jun 21, 2017, at 4:40 PM, Monte Goulding via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi Guys
> >
> > I have done _some_ work on an autocomplete framework which could also be
> used for a snippet library. It is something we have on the radar to
> complete and integrate into the script editor but I’m not sure if we will
> be able to get to it before 9 goes to RC.
> >
> > Cheers
> >
> > Monte
>
> That is super exciting Monte.
>
> Best regards,
>
> Mark Talluto
> livecloud.io 
> nursenotes.net 
> canelasoftware.com 
>
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Mark Talluto via use-livecode
> On Jun 21, 2017, at 4:40 PM, Monte Goulding via use-livecode 
>  wrote:
> 
> Hi Guys
> 
> I have done _some_ work on an autocomplete framework which could also be used 
> for a snippet library. It is something we have on the radar to complete and 
> integrate into the script editor but I’m not sure if we will be able to get 
> to it before 9 goes to RC.
> 
> Cheers
> 
> Monte

That is super exciting Monte. 

Best regards,

Mark Talluto
livecloud.io 
nursenotes.net 
canelasoftware.com 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Monte Goulding via use-livecode

> On 22 Jun 2017, at 3:20 am, Mike Bonner via use-livecode 
>  wrote:
> 
> Perhaps a different direction here?  I think it would be helpful to me as a
> perpetual newbie to have the option to insert common scripts on demand.
> Maybe a context sensitive dropdown with a mouseup framework for buttons,
> for fields, textchanged, keyup, keydown.  Maybe backed by a personal
> snippet library so that once one creates their perfect script for entering
> only floating numbers.. or whatever, make the handlers snippable so that
> they can be added to a local repository for that object type.

Hi Guys

I have done _some_ work on an autocomplete framework which could also be used 
for a snippet library. It is something we have on the radar to complete and 
integrate into the script editor but I’m not sure if we will be able to get to 
it before 9 goes to RC.

Cheers

Monte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Alex Tweedly via use-livecode

You're right, not a good solution for newcomers.

However, I think there's a (perhaps minority) class of newcomers - more 
or less, those who come as experienced developers in another language / 
IDE - for whom a good setup would include ST + linter +  just enough of 
Levure to provide the external editor interface. Not the whole framework 
- but the part that allows use of existing, powerful programming editor(s).


Then there's the remainder of newcomers, and I definitely agree many of 
then would benefit from a 'snippet' library / plugin. Probably a good 
candidate for crowdfunding, or for prompting someone to realize they 
would like it for their own use.


Alex.


On 21/06/2017 20:30, Mike Kerner via use-livecode wrote:

I am using ST and Levure, now, and I have the linter working, and am a
cheerleader for the setup.  However, that is not a good solution for
beginners, IMHO.
___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Mike Kerner via use-livecode
I am using ST and Levure, now, and I have the linter working, and am a
cheerleader for the setup.  However, that is not a good solution for
beginners, IMHO.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Alex Tweedly via use-livecode
Why not just use Sublime Text editor, with Levure to allow you to use an 
external editor?


(or plug in to that system to allow other external editors to be used)

Other than the fact that I can't get the 'linter' to work (and I know 
that'll just be me doing something stupid and wrong :-),  it seems to 
give everything I could want in a text editor - just takes a bit of a 
learning curve.


-- Alex.

On 21/06/2017 19:18, Mike Kerner via use-livecode wrote:

I like the idea of going even another step further, and having macros that
we can use.  An example from another tool I use adds the ability to add
structures (e.g. if-then-else, repeat, etc.), and even being able to hilite
text and have the macro do something with the text, for example
someContainer is empty

Hilite above, choose the macro (right-clicking or from a button in the
header), choose custom if-then-else macro, and the hilited text is replaced
with

if somecontainer is empty then

else #not (somecontainer is empty)
end if #somecontainer is empty

and on the blank line between the "if" and the "else", the insertion carat
is placed, waiting for the next thing to be added.

Ya know, if we had a crowdfund we could put up a bid for this and already
have the money set aside to assign it...

On Wed, Jun 21, 2017 at 2:07 PM, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:


Mike Bonner wrote:


Perhaps a different direction here?  I think it would be helpful to me
as a perpetual newbie to have the option to insert common scripts on
demand.
Maybe a context sensitive dropdown with a mouseup framework for
buttons, for fields, textchanged, keyup, keydown.

HyperCard:


SuperCard:


and even MetaCard:


...all provided popup menus in the Script Editor to insert handler
outlines and more.

SC's was based on templates that included a tag for specifying the
insertion point - very handy for modifying/extending them.

That sort of guidance can go a long way in helping newcomers more readily
understand the scope of messages they can respond to.



Maybe backed by a personal snippet library so that once one creates
their perfect script for entering only floating numbers.. or whatever,
make the handlers snippable so that they can be added to a local
repository for that object type.

Extensibility would be very valuable.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.com


___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Mike Kerner via use-livecode
I like the idea of going even another step further, and having macros that
we can use.  An example from another tool I use adds the ability to add
structures (e.g. if-then-else, repeat, etc.), and even being able to hilite
text and have the macro do something with the text, for example
someContainer is empty

Hilite above, choose the macro (right-clicking or from a button in the
header), choose custom if-then-else macro, and the hilited text is replaced
with

if somecontainer is empty then

else #not (somecontainer is empty)
end if #somecontainer is empty

and on the blank line between the "if" and the "else", the insertion carat
is placed, waiting for the next thing to be added.

Ya know, if we had a crowdfund we could put up a bid for this and already
have the money set aside to assign it...

On Wed, Jun 21, 2017 at 2:07 PM, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Mike Bonner wrote:
>
> > Perhaps a different direction here?  I think it would be helpful to me
> > as a perpetual newbie to have the option to insert common scripts on
> > demand.
> > Maybe a context sensitive dropdown with a mouseup framework for
> > buttons, for fields, textchanged, keyup, keydown.
>
> HyperCard:
> 
>
> SuperCard:
> 
>
> and even MetaCard:
> 
>
> ...all provided popup menus in the Script Editor to insert handler
> outlines and more.
>
> SC's was based on templates that included a tag for specifying the
> insertion point - very handy for modifying/extending them.
>
> That sort of guidance can go a long way in helping newcomers more readily
> understand the scope of messages they can respond to.
>
>
> > Maybe backed by a personal snippet library so that once one creates
> > their perfect script for entering only floating numbers.. or whatever,
> > make the handlers snippable so that they can be added to a local
> > repository for that object type.
>
> Extensibility would be very valuable.
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  
>  ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> 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
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Richard Gaskin via use-livecode

Mike Bonner wrote:

> Perhaps a different direction here?  I think it would be helpful to me
> as a perpetual newbie to have the option to insert common scripts on
> demand.
> Maybe a context sensitive dropdown with a mouseup framework for
> buttons, for fields, textchanged, keyup, keydown.

HyperCard:


SuperCard:


and even MetaCard:


...all provided popup menus in the Script Editor to insert handler 
outlines and more.


SC's was based on templates that included a tag for specifying the 
insertion point - very handy for modifying/extending them.


That sort of guidance can go a long way in helping newcomers more 
readily understand the scope of messages they can respond to.



> Maybe backed by a personal snippet library so that once one creates
> their perfect script for entering only floating numbers.. or whatever,
> make the handlers snippable so that they can be added to a local
> repository for that object type.

Extensibility would be very valuable.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread ELS prothero via use-livecode
What about Mike Doub’s MasterLibrary?
I just tried it in latest LC, and it fails because there is a function named a 
reserved word. But, it seems like a valuable resource that might be used as a 
starting point?
Best,
Bill

William Prothero, PhD
Professor Emeritus
University of California, Santa Barbara
http://earthlearningsolutions.org

> On Jun 21, 2017, at 8:03 AM, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> Kevin, 
> 
> Thanks for jumping in, very inspiring work you have all been doing recently. 
> One has to wonder if anyone sleeps in Edinborough!
> 
> I've been having a running conversation with Richard on how to make small 
> solutions available to the whole community, in the spirit of "this would make 
> adoption of LC as a platform more tenable."  I had ideas about how to turn 
> that into revenue  for LC company also, But Richard pointed out the I was a 
> bit naïve on ROI (which I was/am)  but that is a different discussion.
> 
> Simply put: one can enter google "SQL Query Descending Order" and get 100's 
> of hits with examples.
> OR (different context entirely but…_)
> Go to the Unity plug in store and find 1000+ plugins (open source) free or 
> from 2.99 to 99.99. 
> 
> Newbies and even us "old timers" need a leg up on "how to" with 
> 
> a) examples scripts
> b) actual LC native binary stacks as demos.
> c) script only behaviors attached to custom controls
> (I'm only getting into this now… awesome potential for "plug-ins)
> c) central respository/index of some kind
> d) ways we all can contribute.
> 
> presently key info is fragmented across.
> 
> 1) dictionary (no or very few robust examples)
> 2) API tab 
> 3) on line lessons (many of which are obsolete)
> 4) answers in the email list
> 5) forum treads
> 6) blogs
> 7) Course (different from on line lessons?)
> 8) various develop web site where they off there "stuff" for free
> 9) Rev-online
> 9) behind paywalls like Global Connect
> 
> So, fantastic work you are doing! Indeed, but please consider the "high 
> level" documentation/indexing/global LC knowledge base as important a key 
> feature to develop for the platform as new "deep tech" features.
> 
> Brahmanathaswami
> 
> 
> On 6/20/17, 8:06 AM, "use-livecode on behalf of Kevin Miller via 
> use-livecode"  use-livecode@lists.runrev.com> wrote:
> 
>Sooner would have been better. However just in case you missed it, the
>architecture has been available to play with for many months and a native
>field for Android is doable in 9-dp-7 posted last week. You have to change
>a few words in Ali¹s native button LCB file - he explained which ones in
>his talk. We¹ll follow with a blog post on that too shortly. There is a
>widget course available https://livecode.com/topic/introduction-2/ now
>which covers getting started with widgets. We will add in the info about
>the FFI layer to that course shortly. We will also modify the object Ali
>supplied to cover a whole variety of other native controls from the tools
>palette given each is just a tweak to that LCB. Its all in there and open
>source right now. Objective-C (and thus iOS) will be in DP 8.
> 
>Kind regards,
> 
>Kevin
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Richard Gaskin via use-livecode
Making scripted elements is a great thing for scripters to do.  And the 
one thing we all have in common here is that we're all scripters.


There should be no need to make LC Ltd's C++ experts set aside work on 
the engine to build these instead.


What prevents any of us from delivering those?

--
 Richard Gaskin
 Fourth World Systems


Sannyasin Brahmanathaswami wrote:

Kevin, 


Thanks for jumping in, very inspiring work you have all been doing recently. 
One has to wonder if anyone sleeps in Edinborough!

I've been having a running conversation with Richard on how to make small solutions 
available to the whole community, in the spirit of "this would make adoption of LC 
as a platform more tenable."  I had ideas about how to turn that into revenue  for 
LC company also, But Richard pointed out the I was a bit naïve on ROI (which I was/am)  
but that is a different discussion.

Simply put: one can enter google "SQL Query Descending Order" and get 100's of 
hits with examples.
OR (different context entirely but…_)
Go to the Unity plug in store and find 1000+ plugins (open source) free or from 2.99 to 99.99. 

Newbies and even us "old timers" need a leg up on "how to" with 


a) examples scripts
b) actual LC native binary stacks as demos.
c) script only behaviors attached to custom controls
 (I'm only getting into this now… awesome potential for "plug-ins)
c) central respository/index of some kind
d) ways we all can contribute.

presently key info is fragmented across.

1) dictionary (no or very few robust examples)
2) API tab 
3) on line lessons (many of which are obsolete)

4) answers in the email list
5) forum treads
6) blogs
7) Course (different from on line lessons?)
8) various develop web site where they off there "stuff" for free
9) Rev-online
9) behind paywalls like Global Connect

So, fantastic work you are doing! Indeed, but please consider the "high level" 
documentation/indexing/global LC knowledge base as important a key feature to develop for the 
platform as new "deep tech" features.

Brahmanathaswami


On 6/20/17, 8:06 AM, "use-livecode on behalf of Kevin Miller via use-livecode" 
 
wrote:

Sooner would have been better. However just in case you missed it, the
architecture has been available to play with for many months and a native
field for Android is doable in 9-dp-7 posted last week. You have to change
a few words in Ali¹s native button LCB file - he explained which ones in
his talk. We¹ll follow with a blog post on that too shortly. There is a
widget course available https://livecode.com/topic/introduction-2/ now
which covers getting started with widgets. We will add in the info about
the FFI layer to that course shortly. We will also modify the object Ali
supplied to cover a whole variety of other native controls from the tools
palette given each is just a tweak to that LCB. Its all in there and open
source right now. Objective-C (and thus iOS) will be in DP 8.

Kind regards,

Kevin


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Mike Bonner via use-livecode
Perhaps a different direction here?  I think it would be helpful to me as a
perpetual newbie to have the option to insert common scripts on demand.
Maybe a context sensitive dropdown with a mouseup framework for buttons,
for fields, textchanged, keyup, keydown.  Maybe backed by a personal
snippet library so that once one creates their perfect script for entering
only floating numbers.. or whatever, make the handlers snippable so that
they can be added to a local repository for that object type.

On Wed, Jun 21, 2017 at 10:19 AM, Andre Garzia via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Going back to the original issue of "not applying the empty mouseup
> handler", wouldn't a frontscript running on a plugin on the IDE be enough
> to remove those scripts by interfeering with the IDE Editor at runtime?
> (PS: I have a thing for dangerous scripts...)
>
> On Wed, Jun 21, 2017 at 12:03 PM, Sannyasin Brahmanathaswami via
> use-livecode  wrote:
>
> > Kevin,
> >
> > Thanks for jumping in, very inspiring work you have all been doing
> > recently. One has to wonder if anyone sleeps in Edinborough!
> >
> > I've been having a running conversation with Richard on how to make small
> > solutions available to the whole community, in the spirit of "this would
> > make adoption of LC as a platform more tenable."  I had ideas about how
> to
> > turn that into revenue  for LC company also, But Richard pointed out the
> I
> > was a bit naïve on ROI (which I was/am)  but that is a different
> discussion.
> >
> > Simply put: one can enter google "SQL Query Descending Order" and get
> > 100's of hits with examples.
> > OR (different context entirely but…_)
> > Go to the Unity plug in store and find 1000+ plugins (open source) free
> or
> > from 2.99 to 99.99.
> >
> > Newbies and even us "old timers" need a leg up on "how to" with
> >
> > a) examples scripts
> > b) actual LC native binary stacks as demos.
> > c) script only behaviors attached to custom controls
> >  (I'm only getting into this now… awesome potential for "plug-ins)
> > c) central respository/index of some kind
> > d) ways we all can contribute.
> >
> > presently key info is fragmented across.
> >
> > 1) dictionary (no or very few robust examples)
> > 2) API tab
> > 3) on line lessons (many of which are obsolete)
> > 4) answers in the email list
> > 5) forum treads
> > 6) blogs
> > 7) Course (different from on line lessons?)
> > 8) various develop web site where they off there "stuff" for free
> > 9) Rev-online
> > 9) behind paywalls like Global Connect
> >
> > So, fantastic work you are doing! Indeed, but please consider the "high
> > level" documentation/indexing/global LC knowledge base as important a key
> > feature to develop for the platform as new "deep tech" features.
> >
> > Brahmanathaswami
> >
> >
> > On 6/20/17, 8:06 AM, "use-livecode on behalf of Kevin Miller via
> > use-livecode"  > use-livecode@lists.runrev.com> wrote:
> >
> > Sooner would have been better. However just in case you missed it,
> the
> > architecture has been available to play with for many months and a
> > native
> > field for Android is doable in 9-dp-7 posted last week. You have to
> > change
> > a few words in Ali¹s native button LCB file - he explained which ones
> > in
> > his talk. We¹ll follow with a blog post on that too shortly. There
> is a
> > widget course available https://livecode.com/topic/introduction-2/
> now
> > which covers getting started with widgets. We will add in the info
> > about
> > the FFI layer to that course shortly. We will also modify the object
> > Ali
> > supplied to cover a whole variety of other native controls from the
> > tools
> > palette given each is just a tweak to that LCB. Its all in there and
> > open
> > source right now. Objective-C (and thus iOS) will be in DP 8.
> >
> > Kind regards,
> >
> > Kevin
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
>
> --
> http://www.andregarzia.com -- All We Do Is Code.
> http://fon.nu -- minimalist url shortening service.
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Andre Garzia via use-livecode
Going back to the original issue of "not applying the empty mouseup
handler", wouldn't a frontscript running on a plugin on the IDE be enough
to remove those scripts by interfeering with the IDE Editor at runtime?
(PS: I have a thing for dangerous scripts...)

On Wed, Jun 21, 2017 at 12:03 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> Kevin,
>
> Thanks for jumping in, very inspiring work you have all been doing
> recently. One has to wonder if anyone sleeps in Edinborough!
>
> I've been having a running conversation with Richard on how to make small
> solutions available to the whole community, in the spirit of "this would
> make adoption of LC as a platform more tenable."  I had ideas about how to
> turn that into revenue  for LC company also, But Richard pointed out the I
> was a bit naïve on ROI (which I was/am)  but that is a different discussion.
>
> Simply put: one can enter google "SQL Query Descending Order" and get
> 100's of hits with examples.
> OR (different context entirely but…_)
> Go to the Unity plug in store and find 1000+ plugins (open source) free or
> from 2.99 to 99.99.
>
> Newbies and even us "old timers" need a leg up on "how to" with
>
> a) examples scripts
> b) actual LC native binary stacks as demos.
> c) script only behaviors attached to custom controls
>  (I'm only getting into this now… awesome potential for "plug-ins)
> c) central respository/index of some kind
> d) ways we all can contribute.
>
> presently key info is fragmented across.
>
> 1) dictionary (no or very few robust examples)
> 2) API tab
> 3) on line lessons (many of which are obsolete)
> 4) answers in the email list
> 5) forum treads
> 6) blogs
> 7) Course (different from on line lessons?)
> 8) various develop web site where they off there "stuff" for free
> 9) Rev-online
> 9) behind paywalls like Global Connect
>
> So, fantastic work you are doing! Indeed, but please consider the "high
> level" documentation/indexing/global LC knowledge base as important a key
> feature to develop for the platform as new "deep tech" features.
>
> Brahmanathaswami
>
>
> On 6/20/17, 8:06 AM, "use-livecode on behalf of Kevin Miller via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> Sooner would have been better. However just in case you missed it, the
> architecture has been available to play with for many months and a
> native
> field for Android is doable in 9-dp-7 posted last week. You have to
> change
> a few words in Ali¹s native button LCB file - he explained which ones
> in
> his talk. We¹ll follow with a blog post on that too shortly. There is a
> widget course available https://livecode.com/topic/introduction-2/ now
> which covers getting started with widgets. We will add in the info
> about
> the FFI layer to that course shortly. We will also modify the object
> Ali
> supplied to cover a whole variety of other native controls from the
> tools
> palette given each is just a tweak to that LCB. Its all in there and
> open
> source right now. Objective-C (and thus iOS) will be in DP 8.
>
> Kind regards,
>
> Kevin
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-21 Thread Sannyasin Brahmanathaswami via use-livecode
Kevin, 

Thanks for jumping in, very inspiring work you have all been doing recently. 
One has to wonder if anyone sleeps in Edinborough!

I've been having a running conversation with Richard on how to make small 
solutions available to the whole community, in the spirit of "this would make 
adoption of LC as a platform more tenable."  I had ideas about how to turn that 
into revenue  for LC company also, But Richard pointed out the I was a bit 
naïve on ROI (which I was/am)  but that is a different discussion.

Simply put: one can enter google "SQL Query Descending Order" and get 100's of 
hits with examples.
OR (different context entirely but…_)
Go to the Unity plug in store and find 1000+ plugins (open source) free or from 
2.99 to 99.99. 

Newbies and even us "old timers" need a leg up on "how to" with 

a) examples scripts
b) actual LC native binary stacks as demos.
c) script only behaviors attached to custom controls
 (I'm only getting into this now… awesome potential for "plug-ins)
c) central respository/index of some kind
d) ways we all can contribute.

presently key info is fragmented across.

1) dictionary (no or very few robust examples)
2) API tab 
3) on line lessons (many of which are obsolete)
4) answers in the email list
5) forum treads
6) blogs
7) Course (different from on line lessons?)
8) various develop web site where they off there "stuff" for free
9) Rev-online
9) behind paywalls like Global Connect

So, fantastic work you are doing! Indeed, but please consider the "high level" 
documentation/indexing/global LC knowledge base as important a key feature to 
develop for the platform as new "deep tech" features.

Brahmanathaswami


On 6/20/17, 8:06 AM, "use-livecode on behalf of Kevin Miller via use-livecode" 
 wrote:

Sooner would have been better. However just in case you missed it, the
architecture has been available to play with for many months and a native
field for Android is doable in 9-dp-7 posted last week. You have to change
a few words in Ali¹s native button LCB file - he explained which ones in
his talk. We¹ll follow with a blog post on that too shortly. There is a
widget course available https://livecode.com/topic/introduction-2/ now
which covers getting started with widgets. We will add in the info about
the FFI layer to that course shortly. We will also modify the object Ali
supplied to cover a whole variety of other native controls from the tools
palette given each is just a tweak to that LCB. Its all in there and open
source right now. Objective-C (and thus iOS) will be in DP 8.

Kind regards,

Kevin

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-20 Thread Kevin Miller via use-livecode
Sooner would have been better. However just in case you missed it, the
architecture has been available to play with for many months and a native
field for Android is doable in 9-dp-7 posted last week. You have to change
a few words in Ali¹s native button LCB file - he explained which ones in
his talk. We¹ll follow with a blog post on that too shortly. There is a
widget course available https://livecode.com/topic/introduction-2/ now
which covers getting started with widgets. We will add in the info about
the FFI layer to that course shortly. We will also modify the object Ali
supplied to cover a whole variety of other native controls from the tools
palette given each is just a tweak to that LCB. Its all in there and open
source right now. Objective-C (and thus iOS) will be in DP 8.

Kind regards,

Kevin

Kevin Miller ~ ke...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




On 20/06/2017, 16:13, "use-livecode on behalf of Andrew Bell via
use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of
use-livecode@lists.runrev.com> wrote:

>I'd have a little more faith in crowd funding app features if the
>Native Field Object that I contributed for a year ago was available.
>
>https://livecode.com/project/infinite-livecode-native-field-object/
>
>--Andrew Bell
>
>> Message: 6
>> Date: Mon, 19 Jun 2017 16:57:30 -0400
>> From: Mike Kerner <mikeker...@roadrunner.com>
>> To: How to use LiveCode <use-livecode@lists.runrev.com>
>> Subject: Re: Preference for Keeping Saved Empty Button Scripts Empty
>> Message-ID:
>>  <cadcoycohgntezjx8voym6ywjhnznenvjghjzuxhkezxeflp...@mail.gmail.com>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> and another case where we should have a little crowd fund setup.
>>
>> On Mon, Jun 19, 2017 at 4:00 PM, Bob Sneidar via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>
>>> +1
>>>
>>> > On Jun 19, 2017, at 12:49 , J. Landman Gay via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> >
>>> > Right, but every time you open the script and then close it again, it
>>> keeps asking if you want to save the default. It gets irritating.
>>> >
>>> > I sometimes just replace the default entry with a single space and
>>>save
>>> it that way. Then it doesn't ask me again.
>>> >
>>> > I wouldn't mind a preference to turn off the default scripts.
>>> > --
>>> > Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> > HyperActive Software   | http://www.hyperactivesw.com
>>>
>>>
>>> ___
>>> use-livecode mailing list
>>> use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-20 Thread Mike Kerner via use-livecode
Which is exactly why this is a better idea.  Kickstarter releases the funds
when the funding goal is achieved, not when the product is finished.  This
idea is the reverse.
1. We set up the account
2. We fund the account
3. We administer the account
4. We decide which projects we want to fund at what amount
5. We, in effect, put out a bid sheet for the work.
6. We test and pay out once someone has developed a solution that we accept.

I see two different ways of setting this up, and we could do both.
Way 1 - the "Buy in to get access" way:
Idea proposed
Everyone who "buys in" gets the end product - similar to the LC Global Open
API product
Folks send in their funds
The funds are held in escrow
If the product is built and accepted, the funds are released.  If not, the
funds are returned.

Way 2 - the "shareholder" way:
I envision this being for more widespread release projects, e.g.
the dictionary redo
Folks buy shares.  Let's say each share costs $10.
Shareholders prioritize projects and put a price on each, via votes.  Each
share gets a vote, as you would expect.
Someone goes after one of the projects.
The project is completed and accepted by the shareholders on behalf of the
community.
The funds are released.

We can do this with bitcoin, or dollars, or whatever.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-20 Thread Richmond Mathewson via use-livecode
. . . if all of the crowd funding features from the Kickstart campaign 
in 2013 . . .


There may not be much point banging on about these things.

R.

On 6/20/17 6:13 pm, Andrew Bell via use-livecode wrote:
I'd have a little more faith in crowd funding app features if the 
Native Field Object that I contributed for a year ago was available.


https://livecode.com/project/infinite-livecode-native-field-object/

--Andrew Bell


Message: 6
Date: Mon, 19 Jun 2017 16:57:30 -0400
From: Mike Kerner <mikeker...@roadrunner.com>
To: How to use LiveCode <use-livecode@lists.runrev.com>
Subject: Re: Preference for Keeping Saved Empty Button Scripts Empty
Message-ID:
<cadcoycohgntezjx8voym6ywjhnznenvjghjzuxhkezxeflp...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

and another case where we should have a little crowd fund setup.

On Mon, Jun 19, 2017 at 4:00 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:


+1

> On Jun 19, 2017, at 12:49 , J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:
>
> Right, but every time you open the script and then close it again, it
keeps asking if you want to save the default. It gets irritating.
>
> I sometimes just replace the default entry with a single space and 
save

it that way. Then it doesn't ask me again.
>
> I wouldn't mind a preference to turn off the default scripts.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-20 Thread Andrew Bell via use-livecode
I'd have a little more faith in crowd funding app features if the  
Native Field Object that I contributed for a year ago was available.


https://livecode.com/project/infinite-livecode-native-field-object/

--Andrew Bell


Message: 6
Date: Mon, 19 Jun 2017 16:57:30 -0400
From: Mike Kerner <mikeker...@roadrunner.com>
To: How to use LiveCode <use-livecode@lists.runrev.com>
Subject: Re: Preference for Keeping Saved Empty Button Scripts Empty
Message-ID:
<cadcoycohgntezjx8voym6ywjhnznenvjghjzuxhkezxeflp...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

and another case where we should have a little crowd fund setup.

On Mon, Jun 19, 2017 at 4:00 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:


+1

> On Jun 19, 2017, at 12:49 , J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:
>
> Right, but every time you open the script and then close it again, it
keeps asking if you want to save the default. It gets irritating.
>
> I sometimes just replace the default entry with a single space and save
it that way. Then it doesn't ask me again.
>
> I wouldn't mind a preference to turn off the default scripts.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-20 Thread Sannyasin Brahmanathaswami via use-livecode
A work in progress

http://quality.livecode.com/show_bug.cgi?id=19905



 

On 6/19/17, 2:35 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami via 
use-livecode"  wrote:

ha… that's a simple hack… I might use 



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-19 Thread Sannyasin Brahmanathaswami via use-livecode
ha… that's a simple hack… I might use 

# 

instead… though these all start showing up in PB as have in a 1 line script.. 
which I guess is server explanatory.

panos wrote me back today say he thinks the default behavior is good for 
newbies. which it probably is.

Theoretically the IDE *could* use some AI on this

a) It must know if the object did not exist before
b) if so, insert the script
c) if not (i.e the object existed before) then don’t insert a script.

am I being too simplistic?

Anyway… back to work… I now have a control with multiple objects. It does have 
it's own on resizecontrol script, all of which refer to "me" and the card rect… 
all the rest of the script are external… that's just "so cool" all these years 
my code was "all over the place" an now, slowing we are able to build a rather 
large framework and still have it be comprehensible… awesome.  We are  bearing 
down now… hope to have V1 in the store by July 1-15

BR
 

On 6/19/17, 9:49 AM, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

I sometimes just replace the default entry with a single space and save 
it that way. Then it doesn't ask me again.

I wouldn't mind a preference to turn off the default scripts.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-19 Thread Mike Kerner via use-livecode
and another case where we should have a little crowd fund setup.

On Mon, Jun 19, 2017 at 4:00 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> +1
>
> > On Jun 19, 2017, at 12:49 , J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Right, but every time you open the script and then close it again, it
> keeps asking if you want to save the default. It gets irritating.
> >
> > I sometimes just replace the default entry with a single space and save
> it that way. Then it doesn't ask me again.
> >
> > I wouldn't mind a preference to turn off the default scripts.
> > --
> > Jacqueline Landman Gay | jac...@hyperactivesw.com
> > HyperActive Software   | http://www.hyperactivesw.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> 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
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-19 Thread Bob Sneidar via use-livecode
+1

> On Jun 19, 2017, at 12:49 , J. Landman Gay via use-livecode 
>  wrote:
> 
> Right, but every time you open the script and then close it again, it keeps 
> asking if you want to save the default. It gets irritating.
> 
> I sometimes just replace the default entry with a single space and save it 
> that way. Then it doesn't ask me again.
> 
> I wouldn't mind a preference to turn off the default scripts.
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-19 Thread J. Landman Gay via use-livecode

On 6/19/17 12:58 PM, Paul Hibbert via use-livecode wrote:

On Jun 19, 2017, at 8:19 AM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

so, does it make sense to request a feature enhancement to add a
preference to*not*  insert any handler in buttons/widgets, whose
scripts are empty if inadvertently opened?  there would need to be
a way to differentiate between one newly created vs one that was
previously instantiated, whose script had been emptied and saved



But, if you simply close the control’s script after inspecting it
without ‘saving’ it, then the control has no script, so there’s no
need to try to save an empty script. The control only has an empty
mouseUp handler if you save it that way.


Right, but every time you open the script and then close it again, it 
keeps asking if you want to save the default. It gets irritating.


I sometimes just replace the default entry with a single space and save 
it that way. Then it doesn't ask me again.


I wouldn't mind a preference to turn off the default scripts.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-19 Thread Mike Kerner via use-livecode
and a visual indicator that an object has a script might be nice, too.  A
certain tool that some of your colleagues use does that with a filled-in
top-left corner triangle.  You can look in the project browser to see which
objects have scripts assined, but that is certainly not ideal.  You could
also go the Levure route, where you assign scripts via behaviors from
script-only stacks, and you stop using the script editor for anything but
debugging.

On Mon, Jun 19, 2017 at 11:19 AM, Sannyasin Brahmanathaswami via
use-livecode <use-livecode@lists.runrev.com> wrote:

> I wrote support "complaining" that after I clear the
>
> on mouseup
>
> end mouseUp
>
> that is inserted in button scripts by default, apply, close, save. Then
> later if one inadvertently opens the script of that button, the script is
> reinserted. Panos replied this is the default behavior….gave me a hack to
>
> " edit the script of stack "revSEUtilities" at 1097"
>
> and remove the l nes that inserted that automatically. For this to persist
> you have to get hands dirty changing permission in the bundle, save the
> stack etc…then of course on upgrade.. that's gone…  Quite a hack
>
> Now that I'm slowly mastering the separation of code from GUI, I find
> myself more and more leaving buttons empty and then using, farther up the
> hierarchy (in a behavior, or back script)
>
> -
> on mouseup
>put the short name of the target into tMouseEvent
> switch tMouseEvent
>case "whatever
>break
> end switch
> end mouseup
> -
>
> of course if your button ends up with
>
> on mouseup
> end mouseup
>
> and you don't pass… your script appears "dead"   as it never gets the
> target msg.
>
> This same thing is also happening to widget that I remove the scripts from
> completely.  which is even more irritating, since in someone's infinite
> wisdom they assumed  we always want to toggle the hilite of the widget.
> This is so persistent that I have come not to a) set the color of the
> widget b) set the hilite color the same so that if that Toggle command gets
> back in there.. nothing happens, visually, because if you save the stack
> after the highlight is toggle it is "stuck" with the hilite color.  (a
> gotcha for newbies too)
>
> so, does it make sense to request a feature enhancement to add a
> preference to *not* insert any handler in buttons/widgets, whose scripts
> are empty if inadvertently opened?  there would need to be a way to
> differentiate between one newly created vs one that was previously
> instantiated, whose script had been emptied and saved
>
> BR
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> 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
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Preference for Keeping Saved Empty Button Scripts Empty

2017-06-19 Thread Paul Hibbert via use-livecode
On Jun 19, 2017, at 8:19 AM, Sannyasin Brahmanathaswami via use-livecode 
 wrote:
> 
> so, does it make sense to request a feature enhancement to add a preference 
> to *not* insert any handler in buttons/widgets, whose scripts are empty if 
> inadvertently opened?  there would need to be a way to differentiate between 
> one newly created vs one that was previously instantiated, whose script had 
> been emptied and saved

But, if you simply close the control’s script after inspecting it without 
‘saving’ it, then the control has no script, so there’s no need to try to save 
an empty script.
The control only has an empty mouseUp handler if you save it that way.

To prove it try this:

Create a button by dragging one off the tool palette or from the Object Menu
in the message box, type; put the script of the last button
> The message box result is empty

Now open the script editor for the button and save the default script
in the message box, type; put the script of the last button
> The control's script will show in the message box result

HTH

Paul
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Preference for Keeping Saved Empty Button Scripts Empty

2017-06-19 Thread Sannyasin Brahmanathaswami via use-livecode
I wrote support "complaining" that after I clear the

on mouseup

end mouseUp

that is inserted in button scripts by default, apply, close, save. Then later 
if one inadvertently opens the script of that button, the script is reinserted. 
Panos replied this is the default behavior….gave me a hack to

" edit the script of stack "revSEUtilities" at 1097"

and remove the l nes that inserted that automatically. For this to persist you 
have to get hands dirty changing permission in the bundle, save the stack 
etc…then of course on upgrade.. that's gone…  Quite a hack

Now that I'm slowly mastering the separation of code from GUI, I find myself 
more and more leaving buttons empty and then using, farther up the hierarchy 
(in a behavior, or back script)

-
on mouseup
   put the short name of the target into tMouseEvent
switch tMouseEvent
   case "whatever
   break
end switch
end mouseup
-

of course if your button ends up with

on mouseup
end mouseup

and you don't pass… your script appears "dead"   as it never gets the target 
msg.

This same thing is also happening to widget that I remove the scripts from 
completely.  which is even more irritating, since in someone's infinite wisdom 
they assumed  we always want to toggle the hilite of the widget. This is so 
persistent that I have come not to a) set the color of the widget b) set the 
hilite color the same so that if that Toggle command gets back in there.. 
nothing happens, visually, because if you save the stack after the highlight is 
toggle it is "stuck" with the hilite color.  (a gotcha for newbies too)

so, does it make sense to request a feature enhancement to add a preference to 
*not* insert any handler in buttons/widgets, whose scripts are empty if 
inadvertently opened?  there would need to be a way to differentiate between 
one newly created vs one that was previously instantiated, whose script had 
been emptied and saved

BR


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode