I can see the problem this may present here. What if I wanted to know which word of the selected line was selected? The selectedchunk only returns the character position. The selected line returns the line(s) selected. I would have to go through some convoluted math to figure out how many characters or words were in the lines prior to my selection, then subtract that from whatever the selectedChunk returns to get where I want to go.

What would be better is if selectedChunk returned a detailed result like

word 2 to 3 of line 15 of field "myField"

or if we could pass an arguement to selectedChunk for the kind of object we were looking for.

All speculation tho.

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM

On Mar 19, 2009, at 11:06 AM, Bob Sneidar wrote:

There is also the selectedLine which will return the line your cursor
is in.

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM

On Mar 19, 2009, at 11:02 AM, Bob Sneidar wrote:

The SelectedChunk. I found it by looking in the dictionary under "the
selection". It's one of the things listed under "See Also:".

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM

On Mar 19, 2009, at 10:39 AM, Mark Smith wrote:

How do you find out where the current "insertion point" in an
editable field is?

I mean, if you have:

This is line 1
This is line 2
This is line 3

in an editable field, if the user has placed the caret after the 'n'
in line 2 and then hit return for example, how do you know where in
the field you are? (either in terms of chars, or char n of line n, or
whatever).

This is probably really simple, but I can't for the life of me figure
it out!

Best,

Mark
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to