command-click on a word

dunbarx at aol.com dunbarx at aol.com
Mon Oct 1 16:29:58 EDT 2012


Hi.


Are you harking back to HC, where holding the commandKey down in an unlocked field would put the clickText?



This does not work natively in LC, though you can always:



on mouseUp


 put the clickText --into tText
 --load popUpGadget
end mouseUp


There is no visual feedback that something has changed (HC showed the hand cursor), but the result is the same. That the commandKey was in fact pressed is therefore invisible, but it still works that way.


So now you can do your loadPopUp thing, using any sort of info derived from the clickText. There were several threads, either here or at the forums, about creating popups on the fly, or you can just show one.


Craig Newman




-----Original Message-----
From: Timothy Miller <gandalf at doctorTimothyMiller.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Mon, Oct 1, 2012 1:35 pm
Subject: command-click on a word


I'm not writing to complain about an absent feature. Mostly just curious, and 
maybe I'll learn something useful.

In recent years, I've come to take it for granted that I can hilite a word and 
command-click on it to get a pop-up dialog box with items like "cut" "copy" 
"look up in dictionary" and so on. The specific items depend on the application, 
but the dialog box usually looks the same.

A few minutes ago, I tried this in a text field an a LC stack and thought, "Hey, 
why doesn't that work!?" Then I remembered that LC doesn't do that, as far as I 
know. Yet I have the impression that this is an OS function that any application 
could invoke.

So, my question: Is this an OS function? If so, why doesn't LC take advantage of 
it?

I suppose it could be scripted. Is there an LC add-on that conveniently adds 
this functionality? Or maybe there's a simple LC command I don't know about?

Cheers,

Tim
_______________________________________________
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