CommandKeyDown in a library script?

2014-07-15 Thread Graham Samuel
When I create a new mainstack and put a commandKeyDown handler in it, the 
handler fires when I press the relevant key. When I put the same code in a 
library stack, which is used via a "start using" command at initialisation, it 
doesn't seem to fire. Can anyone say why?

TIA

Graham

___
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: CommandKeyDown in a library script?

2014-07-15 Thread dunbarx
Graham.


It should. It always has for me.


Is the handler in the library stack in the stack script? It has to be, unless 
you send it explicity to a card or control on that stack. Are you sure you are 
not trapping it anywhere in the main stack? Or if you are, are you sure you are 
passing the message?


Craig



-Original Message-
From: Graham Samuel 
To: How to use LiveCode 
Sent: Tue, Jul 15, 2014 1:51 pm
Subject: CommandKeyDown in a library script?


When I create a new mainstack and put a commandKeyDown handler in it, the 
handler fires when I press the relevant key. When I put the same code in a 
library stack, which is used via a "start using" command at initialisation, it 
doesn't seem to fire. Can anyone say why?

TIA

Graham

___
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: CommandKeyDown in a library script?

2014-07-18 Thread Graham Samuel
Craig - sorry, forgot to thank you for this. Yes, there was another handler 
further up the library which I didn't notice. The IDE did not complain that I 
had two identically-named handlers in the same script, which seems odd to me. I 
wonder if it's a bug? I think the IDE used to complain about this, didn't it? 
It certainly doesn't now (just to be sure, I just added an "openStack" handler 
to a stack script which already has one, and it compiled without errors). I'm 
using LC 6.6.2.

Thanks again

Graham
On 16 Jul 2014, at 05:51, dunb...@aol.com wrote:

> Graham.
> 
> 
> It should. It always has for me.
> 
> 
> Is the handler in the library stack in the stack script? It has to be, unless 
> you send it explicity to a card or control on that stack. Are you sure you 
> are not trapping it anywhere in the main stack? Or if you are, are you sure 
> you are passing the message?
> 
> 
> Craig
> 
> 
> 
> -Original Message-
> From: Graham Samuel 
> To: How to use LiveCode 
> Sent: Tue, Jul 15, 2014 1:51 pm
> Subject: CommandKeyDown in a library script?
> 
> 
> When I create a new mainstack and put a commandKeyDown handler in it, the 
> handler fires when I press the relevant key. When I put the same code in a 
> library stack, which is used via a "start using" command at initialisation, 
> it 
> doesn't seem to fire. Can anyone say why?
> 
> TIA
> 
> Graham
> 
> ___
> 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: CommandKeyDown in a library script?

2014-07-18 Thread dunbarx
Graham.


Since 1987 you have been allowed as many similarly named handlers in a script, 
and certainly among the objects in a stack. If within a script, only the first 
one is exectuted by the engine.


This is acutally a good thing. You can try several variants of a handler, 
arranged one after the other, and test them, commenting out the ones above the 
one of current interest.


Craig



-Original Message-
From: Graham Samuel 
To: How to use LiveCode 
Sent: Fri, Jul 18, 2014 5:01 am
Subject: Re: CommandKeyDown in a library script?


Craig - sorry, forgot to thank you for this. Yes, there was another handler 
further up the library which I didn't notice. The IDE did not complain that I 
had two identically-named handlers in the same script, which seems odd to me. I 
wonder if it's a bug? I think the IDE used to complain about this, didn't it? 
It 
certainly doesn't now (just to be sure, I just added an "openStack" handler to 
a 
stack script which already has one, and it compiled without errors). I'm using 
LC 6.6.2.

Thanks again

Graham
On 16 Jul 2014, at 05:51, dunb...@aol.com wrote:

> Graham.
> 
> 
> It should. It always has for me.
> 
> 
> Is the handler in the library stack in the stack script? It has to be, unless 
you send it explicity to a card or control on that stack. Are you sure you are 
not trapping it anywhere in the main stack? Or if you are, are you sure you are 
passing the message?
> 
> 
> Craig
> 
> 
> 
> -Original Message-
> From: Graham Samuel 
> To: How to use LiveCode 
> Sent: Tue, Jul 15, 2014 1:51 pm
> Subject: CommandKeyDown in a library script?
> 
> 
> When I create a new mainstack and put a commandKeyDown handler in it, the 
> handler fires when I press the relevant key. When I put the same code in a 
> library stack, which is used via a "start using" command at initialisation, 
> it 

> doesn't seem to fire. Can anyone say why?
> 
> TIA
> 
> Graham
> 
> ___
> 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

 
___
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: CommandKeyDown in a library script?

2014-07-18 Thread Graham Samuel
Hmm

I was unaware of this feature and so have never used it, but it does seem to me 
a recipe for undetected errors. However ancient the tradition, I still think 
the IDE owes us a warning, perhaps only in 'strict compile' mode.

My two (euro) cents

Graham

Sent from my iPad

> On 18 Jul 2014, at 15:52, dunb...@aol.com wrote:
> 
> Graham.
> 
> 
> Since 1987 you have been allowed as many similarly named handlers in a 
> script, and certainly among the objects in a stack. If within a script, only 
> the first one is exectuted by the engine.
> 
> 
> This is acutally a good thing. You can try several variants of a handler, 
> arranged one after the other, and test them, commenting out the ones above 
> the one of current interest.
> 
> 
> Craig
> 
> 
> 
> -Original Message-
> From: Graham Samuel 
> To: How to use LiveCode 
> Sent: Fri, Jul 18, 2014 5:01 am
> Subject: Re: CommandKeyDown in a library script?
> 
> 
> Craig - sorry, forgot to thank you for this. Yes, there was another handler 
> further up the library which I didn't notice. The IDE did not complain that I 
> had two identically-named handlers in the same script, which seems odd to me. 
> I 
> wonder if it's a bug? I think the IDE used to complain about this, didn't it? 
> It 
> certainly doesn't now (just to be sure, I just added an "openStack" handler 
> to a 
> stack script which already has one, and it compiled without errors). I'm 
> using 
> LC 6.6.2.
> 
> Thanks again
> 
> Graham
>> On 16 Jul 2014, at 05:51, dunb...@aol.com wrote:
>> 
>> Graham.
>> 
>> 
>> It should. It always has for me.
>> 
>> 
>> Is the handler in the library stack in the stack script? It has to be, unless
> you send it explicity to a card or control on that stack. Are you sure you 
> are 
> not trapping it anywhere in the main stack? Or if you are, are you sure you 
> are 
> passing the message?
>> 
>> 
>> Craig
>> 
>> 
>> 
>> -Original Message-
>> From: Graham Samuel 
>> To: How to use LiveCode 
>> Sent: Tue, Jul 15, 2014 1:51 pm
>> Subject: CommandKeyDown in a library script?
>> 
>> 
>> When I create a new mainstack and put a commandKeyDown handler in it, the 
>> handler fires when I press the relevant key. When I put the same code in a 
>> library stack, which is used via a "start using" command at initialisation, 
>> it
> 
>> doesn't seem to fire. Can anyone say why?
>> 
>> TIA
>> 
>> Graham
>> 
>> ___
>> 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
> 
> 
> ___
> 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: CommandKeyDown in a library script?

2014-07-18 Thread Peter Haworth
This comes up on the list every few months.  It bit me a while back and
cost me a couple of hours of frustration and level 6 or 7 cursing (on a
scale of 1 to 10 with 1 being the mildest and 10 being the most profane)
trying to figure out why the code in my handler wasn't being executed and
didn't even respond to debug breakpoints.

Craig's reply about this being useful for trying out different versions of
the same handler is the usual justification for it but I personally don't
buy it.  If you want to do that it's just as easy to comment out all
versions of the handler except the one you want to execute.

The fact that the duplicate handlers aren't flagged in some way makes it
even harder to deal with this.  Perhaps the script editor's list of
handlers should either list the handler twice or include how many versions
of it are in the script in parens after the handler name or something.

Since some folks take advantage of this "feature", perhaps a duplicate
handler name should not be flagged as an error unless Strict Compile Mode
is on to accommodate those of us who think it is a bug.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Fri, Jul 18, 2014 at 8:16 AM, Graham Samuel  wrote:

> Hmm
>
> I was unaware of this feature and so have never used it, but it does seem
> to me a recipe for undetected errors. However ancient the tradition, I
> still think the IDE owes us a warning, perhaps only in 'strict compile'
> mode.
>
> My two (euro) cents
>
> Graham
>
> Sent from my iPad
>
> > On 18 Jul 2014, at 15:52, dunb...@aol.com wrote:
> >
> > Graham.
> >
> >
> > Since 1987 you have been allowed as many similarly named handlers in a
> script, and certainly among the objects in a stack. If within a script,
> only the first one is exectuted by the engine.
> >
> >
> > This is acutally a good thing. You can try several variants of a
> handler, arranged one after the other, and test them, commenting out the
> ones above the one of current interest.
> >
> >
> > Craig
> >
> >
> >
> > -Original Message-
> > From: Graham Samuel 
> > To: How to use LiveCode 
> > Sent: Fri, Jul 18, 2014 5:01 am
> > Subject: Re: CommandKeyDown in a library script?
> >
> >
> > Craig - sorry, forgot to thank you for this. Yes, there was another
> handler
> > further up the library which I didn't notice. The IDE did not complain
> that I
> > had two identically-named handlers in the same script, which seems odd
> to me. I
> > wonder if it's a bug? I think the IDE used to complain about this,
> didn't it? It
> > certainly doesn't now (just to be sure, I just added an "openStack"
> handler to a
> > stack script which already has one, and it compiled without errors). I'm
> using
> > LC 6.6.2.
> >
> > Thanks again
> >
> > Graham
> >> On 16 Jul 2014, at 05:51, dunb...@aol.com wrote:
> >>
> >> Graham.
> >>
> >>
> >> It should. It always has for me.
> >>
> >>
> >> Is the handler in the library stack in the stack script? It has to be,
> unless
> > you send it explicity to a card or control on that stack. Are you sure
> you are
> > not trapping it anywhere in the main stack? Or if you are, are you sure
> you are
> > passing the message?
> >>
> >>
> >> Craig
> >>
> >>
> >>
> >> -Original Message-
> >> From: Graham Samuel 
> >> To: How to use LiveCode 
> >> Sent: Tue, Jul 15, 2014 1:51 pm
> >> Subject: CommandKeyDown in a library script?
> >>
> >>
> >> When I create a new mainstack and put a commandKeyDown handler in it,
> the
> >> handler fires when I press the relevant key. When I put the same code
> in a
> >> library stack, which is used via a "start using" command at
> initialisation, it
> >
> >> doesn't seem to fire. Can anyone say why?
> >>
> >> TIA
> >>
> >> Graham
> >>
> >> ___
> >> 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: CommandKeyDown in a library script?

2014-07-18 Thread Richard Gaskin

Peter Haworth wrote:

Since some folks take advantage of this "feature", perhaps a duplicate
handler name should not be flagged as an error unless Strict Compile Mode
is on to accommodate those of us who think it is a bug.


What's the bug report number?

Another one that's cost me productivity is a bug/feature of 
revAvaolableHandlers, used for building the handler list at the left of 
the Script Editor, in which when there are two handlers of the same name 
it only lists one of them, giving the scripter the impression that only 
one exists - when we edit one of them, if it isn't the one the engine 
sees first we're left puzzling over why our scripting is having no effect.


Anyone here know if that's been reported?  If not I'll file it.

--
 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: CommandKeyDown in a library script?

2014-07-18 Thread Peter Haworth
Hi Richard,
I entered this as bug# 12849

I'm guessing that the script editor uses revAvailableHandlers to populate
it's list of handlers in a script so not surprised it doesn't indicate
duplicates.  I didn't include that in the above bug report, although it
does suggest flagging duplicates in the Script Editor list of handlers.



Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 


On Fri, Jul 18, 2014 at 10:40 AM, Richard Gaskin  wrote:

> Peter Haworth wrote:
>
>> Since some folks take advantage of this "feature", perhaps a duplicate
>> handler name should not be flagged as an error unless Strict Compile Mode
>> is on to accommodate those of us who think it is a bug.
>>
>
> What's the bug report number?
>
> Another one that's cost me productivity is a bug/feature of
> revAvaolableHandlers, used for building the handler list at the left of the
> Script Editor, in which when there are two handlers of the same name it
> only lists one of them, giving the scripter the impression that only one
> exists - when we edit one of them, if it isn't the one the engine sees
> first we're left puzzling over why our scripting is having no effect.
>
> Anyone here know if that's been reported?  If not I'll file it.
>
> --
>  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: CommandKeyDown in a library script?

2014-07-18 Thread Richard Gaskin

Peter Haworth wrote:

I entered this as bug# 12849

I'm guessing that the script editor uses revAvailableHandlers to populate
it's list of handlers in a script so not surprised it doesn't indicate
duplicates.  I didn't include that in the above bug report, although it
does suggest flagging duplicates in the Script Editor list of handlers.


Thanks, Peter.

I filed mine also, with a link to yours since the two are somewhat 
related and may be easily fixed at the same time:



--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
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: CommandKeyDown in a library script?

2014-07-19 Thread dunbarx
All: 


I think the best solution is that the revAvailableHandlers show the duplicates, 
(perhaps italicised?).


Then the feature can be exploited, or the bug clearly delineated. But most 
importantly, by clicking on the list item, one can navigate to the dups, the 
"feature" most egregiously missing in all this mishegas.


Craig




-Original Message-
From: Richard Gaskin 
To: use-livecode 
Sent: Fri, Jul 18, 2014 5:39 pm
Subject: Re: CommandKeyDown in a library script?


Peter Haworth wrote:
> I entered this as bug# 12849
>
> I'm guessing that the script editor uses revAvailableHandlers to populate
> it's list of handlers in a script so not surprised it doesn't indicate
> duplicates.  I didn't include that in the above bug report, although it
> does suggest flagging duplicates in the Script Editor list of handlers.

Thanks, Peter.

I filed mine also, with a link to yours since the two are somewhat 
related and may be easily fixed at the same time:
<http://quality.runrev.com/show_bug.cgi?id=12850>

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
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: CommandKeyDown in a library script?

2014-07-19 Thread Peter Haworth
Hi Craig,
I have to respectfully disagree.  I think the best solution is to fix the
bug.

I know you and others use it as you've described for testing various
versions of the same handler but you can still do that by commenting out
all except the one you want to run instead of just the ones above the one
you want to run, so there's no loss of functionality for you.

On the other hand, this bug has caused a lot of people (me included) a lot
of grief and fixing it would prevent that for others.  I doubt it will be a
very high priority but I really think it should be fixed at some point.

It also brings to mind that perhaps there should be a list of "gotchas" for
new users.  This would be one of them.  Another one might be red dot
breakpoints not working in preOpenxxx handlers.  I'm sure there are others.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Sat, Jul 19, 2014 at 6:40 AM,  wrote:

> All:
>
>
> I think the best solution is that the revAvailableHandlers show the
> duplicates, (perhaps italicised?).
>
>
> Then the feature can be exploited, or the bug clearly delineated. But most
> importantly, by clicking on the list item, one can navigate to the dups,
> the "feature" most egregiously missing in all this mishegas.
>
>
> Craig
>
>
>
>
> -Original Message-
> From: Richard Gaskin 
> To: use-livecode 
> Sent: Fri, Jul 18, 2014 5:39 pm
> Subject: Re: CommandKeyDown in a library script?
>
>
> Peter Haworth wrote:
> > I entered this as bug# 12849
> >
> > I'm guessing that the script editor uses revAvailableHandlers to populate
> > it's list of handlers in a script so not surprised it doesn't indicate
> > duplicates.  I didn't include that in the above bug report, although it
> > does suggest flagging duplicates in the Script Editor list of handlers.
>
> Thanks, Peter.
>
> I filed mine also, with a link to yours since the two are somewhat
> related and may be easily fixed at the same time:
> <http://quality.runrev.com/show_bug.cgi?id=12850>
>
> --
>   Richard Gaskin
>   Fourth World
>   LiveCode training and consulting: http://www.fourthworld.com
>   Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>   Follow me on Twitter:  http://twitter.com/FourthWorldSys
>
> ___
> 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: CommandKeyDown in a library script?

2014-07-19 Thread dunbarx
Peter.


How did you get tripped up in your project? You mentioned that the offending 
handler was "farther up in the library". But then this was not in the same 
script. No? If it was indeed in a script in an object higher up in the 
hierarchy, then this is a core feature of LC, (and HC) and must not be touched.


If it was farther up in the same script, and you just called this a "library", 
well then, I get it.



I am not married to maintaining this, er, feature. Perhaps strict compilation 
mode is the place to "fix" the, ah, bug. And that in sloppy mode, where I 
always work, it stays put. This seems reasonable, in that you can choose the 
world you want to live in.


I am suggesting that the, um, feature would be enhanced in sloppy mode by, as 
Richard suggested, listing the dups, and I therefore recommend italicising them.


Craig



-Original Message-
From: Peter Haworth 
To: How to use LiveCode 
Sent: Sat, Jul 19, 2014 1:21 pm
Subject: Re: CommandKeyDown in a library script?


Hi Craig,
I have to respectfully disagree.  I think the best solution is to fix the
bug.

I know you and others use it as you've described for testing various
versions of the same handler but you can still do that by commenting out
all except the one you want to run instead of just the ones above the one
you want to run, so there's no loss of functionality for you.

On the other hand, this bug has caused a lot of people (me included) a lot
of grief and fixing it would prevent that for others.  I doubt it will be a
very high priority but I really think it should be fixed at some point.

It also brings to mind that perhaps there should be a list of "gotchas" for
new users.  This would be one of them.  Another one might be red dot
breakpoints not working in preOpenxxx handlers.  I'm sure there are others.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Sat, Jul 19, 2014 at 6:40 AM,  wrote:

> All:
>
>
> I think the best solution is that the revAvailableHandlers show the
> duplicates, (perhaps italicised?).
>
>
> Then the feature can be exploited, or the bug clearly delineated. But most
> importantly, by clicking on the list item, one can navigate to the dups,
> the "feature" most egregiously missing in all this mishegas.
>
>
> Craig
>
>
>
>
> -----Original Message-
> From: Richard Gaskin 
> To: use-livecode 
> Sent: Fri, Jul 18, 2014 5:39 pm
> Subject: Re: CommandKeyDown in a library script?
>
>
> Peter Haworth wrote:
> > I entered this as bug# 12849
> >
> > I'm guessing that the script editor uses revAvailableHandlers to populate
> > it's list of handlers in a script so not surprised it doesn't indicate
> > duplicates.  I didn't include that in the above bug report, although it
> > does suggest flagging duplicates in the Script Editor list of handlers.
>
> Thanks, Peter.
>
> I filed mine also, with a link to yours since the two are somewhat
> related and may be easily fixed at the same time:
> <http://quality.runrev.com/show_bug.cgi?id=12850>
>
> --
>   Richard Gaskin
>   Fourth World
>   LiveCode training and consulting: http://www.fourthworld.com
>   Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>   Follow me on Twitter:  http://twitter.com/FourthWorldSys
>
> ___
> 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

 

___
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: CommandKeyDown in a library script?

2014-07-19 Thread Peter Haworth
Not sure where I said "further up in the library" but if I did, I apologize
for the confusion.

I got tripped up by it because I had not realized there were two instances
of the handler in my script and I happened to be editing the second one and
expecting my changes to take effect.  They didn't of course because LC was
executing the first instance of the handler.

I could live with it being fixed only if Strict Compile Mode is on since I
always work in that mode, not sure about other folks who've been bitten by
this.  In that case, yes there should be some visual indication of the
presence of duplicates in the Script Editor.

I guess I'm not understanding why fixing it irrespective of Strict Compile
Mode is a problem.  The only example I've heard of folks using this to
their advantage is the scenario you outlined (and I've seen others mention
it) of coding multiple versions of the same handler and commenting out the
ones above the one you want to test.If the bug is fixed unilaterally,
you'd still be able to use that technique with the minor difference that
you'd have to comment out all the unwanted versions of the handler.

Anyway, as mentioned earlier in this thread, I doubt any fix for this will
get high priority so it's probably moot.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Sat, Jul 19, 2014 at 3:53 PM,  wrote:

> Peter.
>
>
> How did you get tripped up in your project? You mentioned that the
> offending handler was "farther up in the library". But then this was not in
> the same script. No? If it was indeed in a script in an object higher up in
> the hierarchy, then this is a core feature of LC, (and HC) and must not be
> touched.
>
>
> If it was farther up in the same script, and you just called this a
> "library", well then, I get it.
>
>
>
> I am not married to maintaining this, er, feature. Perhaps strict
> compilation mode is the place to "fix" the, ah, bug. And that in sloppy
> mode, where I always work, it stays put. This seems reasonable, in that you
> can choose the world you want to live in.
>
>
> I am suggesting that the, um, feature would be enhanced in sloppy mode by,
> as Richard suggested, listing the dups, and I therefore recommend
> italicising them.
>
>
> Craig
>
>
>
> -Original Message-
> From: Peter Haworth 
> To: How to use LiveCode 
> Sent: Sat, Jul 19, 2014 1:21 pm
> Subject: Re: CommandKeyDown in a library script?
>
>
> Hi Craig,
> I have to respectfully disagree.  I think the best solution is to fix the
> bug.
>
> I know you and others use it as you've described for testing various
> versions of the same handler but you can still do that by commenting out
> all except the one you want to run instead of just the ones above the one
> you want to run, so there's no loss of functionality for you.
>
> On the other hand, this bug has caused a lot of people (me included) a lot
> of grief and fixing it would prevent that for others.  I doubt it will be a
> very high priority but I really think it should be fixed at some point.
>
> It also brings to mind that perhaps there should be a list of "gotchas" for
> new users.  This would be one of them.  Another one might be red dot
> breakpoints not working in preOpenxxx handlers.  I'm sure there are others.
>
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
>
>
> On Sat, Jul 19, 2014 at 6:40 AM,  wrote:
>
> > All:
> >
> >
> > I think the best solution is that the revAvailableHandlers show the
> > duplicates, (perhaps italicised?).
> >
> >
> > Then the feature can be exploited, or the bug clearly delineated. But
> most
> > importantly, by clicking on the list item, one can navigate to the dups,
> > the "feature" most egregiously missing in all this mishegas.
> >
> >
> > Craig
> >
> >
> >
> >
> > -Original Message-
> > From: Richard Gaskin 
> > To: use-livecode 
> > Sent: Fri, Jul 18, 2014 5:39 pm
> > Subject: Re: CommandKeyDown in a library script?
> >
> >
> > Peter Haworth wrote:
> > > I entered this as bug# 12849
> > >
> > > I'm guessing that the script editor uses revAvailableHandlers to
> populate
> > > it's list of handlers in a script so not surprised it doesn't indicate
> > > duplicates.  I didn't include tha

Re: CommandKeyDown in a library script?

2014-07-20 Thread Graham Samuel
Just to say, as the originator of this thread, I am entirely of the same 
opinion as Pete on this. To allow two versions of the same handler in the same 
script and then rely on the IDE to sort them out (without so much as a warning, 
even) strikes me as bizarre. If there are historical reasons for keeping it, 
then the Strict Compile Mode solution is presumably the way to go.

As to the priority of such a fix, we have to look forward to a radical 
restructuring of the IDE, which is on someone's radar, isn't it? OK, even for 
me this should probably come after a really serious review of the 
documentation, let alone all the stuff that's happening to the engine, so I'm 
not holding my breath either.

Graham

On 20 Jul 2014, at 02:02, Peter Haworth  wrote:

> Not sure where I said "further up in the library" but if I did, I apologize
> for the confusion.
> 
> I got tripped up by it because I had not realized there were two instances
> of the handler in my script and I happened to be editing the second one and
> expecting my changes to take effect.  They didn't of course because LC was
> executing the first instance of the handler.
> 
> I could live with it being fixed only if Strict Compile Mode is on since I
> always work in that mode, not sure about other folks who've been bitten by
> this.  In that case, yes there should be some visual indication of the
> presence of duplicates in the Script Editor.
> 
> I guess I'm not understanding why fixing it irrespective of Strict Compile
> Mode is a problem.  The only example I've heard of folks using this to
> their advantage is the scenario you outlined (and I've seen others mention
> it) of coding multiple versions of the same handler and commenting out the
> ones above the one you want to test.If the bug is fixed unilaterally,
> you'd still be able to use that technique with the minor difference that
> you'd have to comment out all the unwanted versions of the handler.
> 
> Anyway, as mentioned earlier in this thread, I doubt any fix for this will
> get high priority so it's probably moot.
> 
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> 
> 
> On Sat, Jul 19, 2014 at 3:53 PM,  wrote:
> 
>> Peter.
>> 
>> 
>> How did you get tripped up in your project? You mentioned that the
>> offending handler was "farther up in the library". But then this was not in
>> the same script. No? If it was indeed in a script in an object higher up in
>> the hierarchy, then this is a core feature of LC, (and HC) and must not be
>> touched.
>> 
>> 
>> If it was farther up in the same script, and you just called this a
>> "library", well then, I get it.
>> 
>> 
>> 
>> I am not married to maintaining this, er, feature. Perhaps strict
>> compilation mode is the place to "fix" the, ah, bug. And that in sloppy
>> mode, where I always work, it stays put. This seems reasonable, in that you
>> can choose the world you want to live in.
>> 
>> 
>> I am suggesting that the, um, feature would be enhanced in sloppy mode by,
>> as Richard suggested, listing the dups, and I therefore recommend
>> italicising them.
>> 
>> 
>> Craig
>> 
>> 
>> 
>> -Original Message-
>> From: Peter Haworth 
>> To: How to use LiveCode 
>> Sent: Sat, Jul 19, 2014 1:21 pm
>> Subject: Re: CommandKeyDown in a library script?
>> 
>> 
>> Hi Craig,
>> I have to respectfully disagree.  I think the best solution is to fix the
>> bug.
>> 
>> I know you and others use it as you've described for testing various
>> versions of the same handler but you can still do that by commenting out
>> all except the one you want to run instead of just the ones above the one
>> you want to run, so there's no loss of functionality for you.
>> 
>> On the other hand, this bug has caused a lot of people (me included) a lot
>> of grief and fixing it would prevent that for others.  I doubt it will be a
>> very high priority but I really think it should be fixed at some point.
>> 
>> It also brings to mind that perhaps there should be a list of "gotchas" for
>> new users.  This would be one of them.  Another one might be red dot
>> breakpoints not working in preOpenxxx handlers.  I'm sure there are others.
>> 
>> Pete
>> lcSQL Software <http://www.lcsql.com>
>> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and