|
Matt,
From my testing, Kevin's right... here's the
code:
on rawkeyUp put the selectedChunk pass
rawKeyUp end rawKeyUp
on selectionChanged put the selectedChunk end
selectionChanged
If you have both of these, you'll get the current selected
chunk whether you use the arrow keys, click in the field, click and drag to make
a selection or Shift-arrow keys to make a selection.
Let me know if this doesn't work for you...
----- Original Message -----
Sent: Monday, October 01, 2001 3:07
AM
Subject: selectionChanged
Thanks Kevin for your (always) wise insight. Also really
enjoyed the Real Basic comparison from an earlier e-mail, seems so *difficult*
to emulate simple Rev/HCard behavior! Glad we've got a truly powerful
environment. Now to my simple question, if anyone can help:
I'm trying
to get the current cursor position. The selectionChanged doesn't get sent with
arrow keys nor when you type additional characters at the end of a line. So
how do you truly find where the selection and/or the cursor is: a selected
chunk, at the end of a line (additional typing) or arrowing through the
selection. Am I glossing over an important function (I've studied that
manual!)?
Any help would be greatly appreciated.
PS Tried the
rawKeyUp, thanks Kevin: didn't work. I guess I could try and calculate the
position by constantly getting the text of the field but that doesn't seem
very elegant. Thanks again.
On Sunday, September 30, 2001, at 03:00
AM, [EMAIL PROTECTED] wrote:
This is a feature: its an interaction with the order of the
messages. The selectionChanged message is sent after the selection
changes, but the arrowKey message before. So you need to trap the
rawKeyUp message to solve your
problem.
Regards,
Kevin
M@
Matt
Denton [EMAIL PROTECTED]/color>
/color>Limelight
Media Pty Ltd Phone: 02) 9211-6622 Fax:
02)
9211-5922
HEY, THIS IS NOT MY E-MAIL! /color>/smaller> If
this e-mail is not for you, please let us know and destroy the
original:
/smaller>/color>[EMAIL PROTECTED]/smaller>/color> /smaller>/color> /smaller>/color>or
call 02) 9211-6622 or INT +612 9211-6622. Thanks
for your kind help.
LEGAL /smaller> This
e-mail is intended only for the use of the individual or entity named
above and may contain information that is confidential and privileged.
If you are not the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this Email is strictly
prohibited.
Before opening or using attachments, check them for
viruses and
defects.
/smaller>/color>/fontfamily>
|