Thanks, that sounds like it should work.  I have front scripts for suspendstack 
and resumestack already so this should be pretty easy.


Pete Haworth

On Feb 27, 2011, at 1:30 PM, J. Landman Gay wrote:

> On 2/27/11 2:12 PM, Peter Haworth wrote:
>> I think Richmond is referring to the insertion point, not the cursor.
> 
> He says no, but you've brought up a related issue.
> 
>> I have noticed this before - if you place the insertion point
>> somewhere in an LC control, switch to another application, then
>> switch back to LC, the insertion point is gone.  This is on a Mac.
>> Other applications on the Mac don't act this way, they show the
>> insertion point where it was last time you were in them.
> 
> There's an automatic behavior when a card opens or resumes: the engine sets 
> the focus to the first control with traversalOn set to true. This has 
> happened since day one, and mostly I find it annoying, and it requires 
> work-arounds. On Windows, where buttons can have traversal, the first control 
> may be a button. On Mac, the first control is always the first editable field 
> (even though OS X lets you set up keyboard navigation through buttons.)
> 
> The only workaround I know of is to store the selectedChunk on suspendStack 
> and restore it on resumeStack.
> 
>> 
>> The dictionary description of the selectedLoc seems to imply it
>> refers to the top left coordinates of any selected text - does it
>> work if there is no text selected but you need to find out where the
>> insertion point is?
> 
> The selectedloc assumes there is an active selection, and is only used to 
> find the physical x,y coordinates on screen. If you only need to find out 
> where the insertion point is, use "the selectedChunk". That gives you a field 
> and character reference. If the insertion point is not placed, the 
> selectedChunk is empty.
> 
> -- 
> 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

Reply via email to