CommandKeyDown in a library script?

Peter Haworth pete at lcsql.com
Sat Jul 19 20:02:51 EDT 2014


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, <dunbarx at aol.com> 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 <pete at lcsql.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> 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, <dunbarx at aol.com> 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 <ambassador at fourthworld.com>
> > To: use-livecode <use-livecode at lists.runrev.com>
> > 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 at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription
> > preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list