x27;t understand the miracles "behind" but that took me the full Sunday
Once again, thanks Stephen and Ken
time to go to bed now (23.57 p.m.)
Horst
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/selectedChunk-always-empty-tp2970443p2970681.html
S
> Whatever I do, tSelectedChunk is empty. Is there any reason, Am I doing
> something wrong?
Turn off the 'traversalOn' property for the button. When you click it it's
getting the focus and removing it from the field before you can get the
selectedChunk.
Ken Ray
Sons of
perhaps you are defeating your selection by clicking a button or using the
message box
this works from the multi-line message box:
*select text of fld "Field" of card id 1002 of stack "Untitled 1"*
*put the selectedchunk*
if you put this into the script of a bu
what is it supposed to return, all of the text in the field?
On 10 October 2010 10:34, Inselfan wrote:
>
> Hola Stephen,
>
> Thanks for this, but: Yes I have a blinking cursor and YES this
> (Selectedchunk) works perfect with the same text-field and another button.
> It is r
Hola Stephen,
Thanks for this, but: Yes I have a blinking cursor and YES this
(Selectedchunk) works perfect with the same text-field and another button.
It is really 1:1
Must be something else
Kind regards
Horst
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com
perhaps you haven't selected a chunk of text in a field? If your field has a
blinking cursor but no selection, that would make the selectedChunk empty,
no?
On 10 October 2010 10:21, Inselfan wrote:
>
> Hola,
>
> Using 4.5
> Is there a reason, why selectedChunk is always
Hola,
Using 4.5
Is there a reason, why selectedChunk is always empty???
using 1 field, place the cursor there and then I klick on a button with this
script:
on mouseUp
put the selectedChunk into tSelectedChunk
...
end mouseup
Whatever I do, tSelectedChunk is empty. Is there any reason
Mon, Sep 27, 2010 at 10:03 AM, Mike Bonner
> wrote:
> >
> > > Would have to program it, and now that i'm more awake, not sure you
> need
> > to
> > > go through all the convoluted stuff I did.
> > >
> > > This is probably closer to what
Bonjour,
Not sure I have well understand your need, but does the following help:
select word 1 to -1 of the selection -- avoid spaces (learn
recently thanks to Jacque ;-))
put the selection
put cr & word 2 of the selectedChunk after msg
Best regards from Grenoble
André
Le 27
You can work out exactly what you want if you realize that the result
of "the selectedChunk" is always char to
of field , and this will be as you would expect if the selection is
not empty:
ie, in "this is a sample string of text" in field 1, selecting the
cha
Nevermind. *sigh* Number of words prior to selection or insertion point is
put the number of words of (char 1 to (word 2 of the selectedchunk) of
field 1)
Rev is far more amazing than I can make it be. So is Livecode!
On Mon, Sep 27, 2010 at 11:50 AM, Mike Bonner wrote:
> Ok thats c
Ok thats cool.
So if its NOT just an insertion point then
the number of words of char 1 to (word 2 of the selectedchunk) of field
"yourfield"
will give the number of words preceeding the selection?
So this whole thing could boil down to
on mouseUp
if word 4 of the selectedchunk &
The selectedChunk gives the segment of text selected, in the form
char to of field
If the selection is empty (insertion point only), the result is
something like "char 5 to 4 of field 9" -- in this case to get the
number of the word containing the insertion point, use:
to what you can end up with.
> > on mouseUp
> > put word 2 of the selectedchunk into tChar
> > put char 1 to tChar of field 1 into tTmp
> > put the number of words in tTmp
> > end mouseUp
> >
> > This will work with the exception that if your select
loser to what you can end up with.
> on mouseUp
> put word 2 of the selectedchunk into tChar
> put char 1 to tChar of field 1 into tTmp
> put the number of words in tTmp
> end mouseUp
>
> This will work with the exception that if your selection includes a space
> at
>
Would have to program it, and now that i'm more awake, not sure you need to
go through all the convoluted stuff I did.
This is probably closer to what you can end up with.
on mouseUp
put word 2 of the selectedchunk into tChar
put char 1 to tChar of field 1 into tTmp
put the numb
ermine if there is actually a selection of more than 1 char
> if word 2 of the selectedchunk - word 4 of the selectedchunk < 0 then
> put word 2 of the selectedchunk into tChar
> else
> put word 4 of the selectedchunk into tChar
> end if
>
> -- Determine if the
lly a selection of more than 1 char
if word 2 of the selectedchunk - word 4 of the selectedchunk < 0 then
put word 2 of the selectedchunk into tChar
else
put word 4 of the selectedchunk into tChar
end if
-- Determine if the selection is already on a word boundary.
--if so d
Is there an easy way to retrieve the word # of a field based on the
SelectedChunk? The SelectedChunk contains the start/end position of a word
of a field. Just am trying to determine which word without to much
coding...if possible.
Thanks for any help!
Warren
te:
Hello,
I have some problem with the SelectedChunk function. It's work
well but
sometime it return empty.
I can type character and I have the flashing insertion cursor in the
field but the result is still empty.
I must leave the field and re-enter it to have correct result.
Does a
][ char 8 to 7 of field 1
il mange ][ char 9 to 8 of field 1
il mange ][ char 10 to 9 of field 1( here's the
problem )
][il mange u
][il mange un
][il mange un
and the selectedChunk return empty until I leave the readTarget field
and reEnter it.
here's the result
i][ char 2 to 1 of field 1
il][char 3 to 2 of field 1
il ][ char 4 to 3 of field 1
il m][ char 5 to 4 of field 1
il me][ char 6 to 5 of field 1
il
hello,
here's the script
on rawKeyUp k
global readTarget,homepath
put readTarget into tID
-- Gestion du clavier en mode Rédaction
if the writeEnable of tID is true then
get the selectedChunk
put it
put word 2 of it into p
put word 4 of it into w
put i
On 8/28/10 12:25 PM, Jean-Pierre Soto wrote:
Hello,
I have some problem with the SelectedChunk function. It's work well but
sometime it return empty.
I can type character and I have the flashing insertion cursor in the
field but the result is still empty.
I must leave the field and re-
Hello,
I have some problem with the SelectedChunk function. It's work well
but sometime it return empty.
I can type character and I have the flashing insertion cursor in the
field but the result is still empty.
I must leave the field and re-enter it to have correct result.
Does a
Yeah, I guess I'm not being too clear here. Thanks for the tip-- I didn't
know selectedChunk was field dependant. Just what I was looking for.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to
I was going to respond but I'm not sure I understand what you are trying
to do. But maybe this will help: you can get the selectedchunk of a
particular field like so:
put the selectedchunk of fld 1
Is that what you mean?
Chipp Walters wrote:
OK, no takers then..
Here's how I
OK, no takers then..
Here's how I've decided to solve it:
(list field script)
local lSelChk
on mouseEnter
put the selectedChunk into lSelChk
end mouseEnter
On 1/18/07, Chipp Walters <[EMAIL PROTECTED]> wrote:
I'm trying to figure out where the I-beam cursor sits
I'm trying to figure out where the I-beam cursor sits in a field. Not hard,
check the selectedChunk. But what if AFTER I've clicked a list field? Even
with TraversalOn set to false for a list field, it still insists on
resetting the selectedChunk to it's own 'hilitedline
Ludovic THEBAULT wrote:
Hello,
Why this work on macos X and not on windows (the selectedchunk is empty) :
i've a fld and a button. When i select a text on the fld and i click on
the button i need to "get the selectedchunk" of the fld in the mouseup
handler.
Work on macos x
Hello,
Why this work on macos X and not on windows (the selectedchunk is
empty) :
i've a fld and a button. When i select a text on the fld and i click
on the button i need to "get the selectedchunk" of the fld in the
mouseup handler.
Work on macos x not on w
Garrett Hylltun wrote:
When I use the ask dialog to get some user input on changing some
hilighted text in a field, the ask dialog removes the focus from the
field, thus losing the ability to use the selectedChunk after the
dialog has been dismissed.
I did not know if there was any way
Rev 2.6.1
Greetings,
When I use the ask dialog to get some user input on changing some
hilighted text in a field, the ask dialog removes the focus from the
field, thus losing the ability to use the selectedChunk after the
dialog has been dismissed.
I did not know if there was any way
paolo mazza wrote:
Referring to the selectedChunk property, I noticed there is a different
behaviour in Mac and Windows.
Try this:
After selecting a word in a text field
if I press a button with "put the selectedChunk"
in MAC it returs "char 1 to 9 of field 1"
i
Referring to the selectedChunk property, I noticed there is a different
behaviour in Mac and Windows.
Try this:
After selecting a word in a text field
if I press a button with "put the selectedChunk"
in MAC it returs "char 1 to 9 of field 1"
in windows it returns empty
k. I like to mark the field with a light grey
background when it is suspended and restore the background to empty
when the stack resumes. This code also creates two getProps that
return the selectedChunk and selectedField for a stack. In order for
the library to track fields in a stack you
is "Browse tool" then
put the selectedchunk into lselection
if lselection is not empty then
put the selectedfield into lfield
put the topstack into lstack
put lselection && "of" && lstack into lselection
end if
else
put the
Recently, [EMAIL PROTECTED] wrote:
>> How does one determine the stack that contains the field where the
>> selectedChunk resides?
> Try
> put the selectedfield...
Thanks Xavier.
Another question [I seem to recall reading about this a long time ago but
have no memory of w
Hi Scott
Try
put the selectedfield...
cheers
Xavier
[EMAIL PROTECTED] wrote on 08/11/2005 08:48:12:
> How does one determine the stack that contains the field where the
> selectedChunk resides?
>
> Thanks & Regards,
>
> Scott Rossi
> Creative Director
> Tactil
How does one determine the stack that contains the field where the
selectedChunk resides?
Thanks & Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com
___
use-re
selectedChunk function
Platform support:
Introduced in version 1.0
Returns a chunk expression describing the location of the text
selection or insertion point.
the selectedChunk
selectedChunk
the selectedChunk
put the selectedChunk into storedChunk
See also: clickChunk function, foundChunk
On 3/20/05 10:38 PM, "Mikey" <[EMAIL PROTECTED]> wrote:
> Hmm. Per previous discussion, in an attempt to determine where the
> cursor was when the user hit a key (in this case a tab key), I
> generated the following script for the field in question
>
> on ta
Hmm. Per previous discussion, in an attempt to determine where the
cursor was when the user hit a key (in this case a tab key), I
generated the following script for the field in question
on tabKey
get the selectedChunk
answer it
end tabKey
the variable watcher reports that IT is empty
w to use Revolution
> Subject: Re: Problem with selectedChunk in Windows
>
> --- "Bruce A. Pokras" <[EMAIL PROTECTED]> wrote:
> > I have a script that uses the selectedchunk to locate the
> cursor in a
> > field so that it can add some text at the cursor
IL PROTECTED]
> Subject: Problem with selectedChunk in Windows
>
> I have a script that uses the selectedchunk to locate the
> cursor in a field so that it can add some text at the cursor
> location. This works fine in a standalone under Mac OS 9.
> However, it totally fails in a
--- "Bruce A. Pokras" <[EMAIL PROTECTED]> wrote:
> I have a script that uses the selectedchunk to
> locate the cursor in
> a field so that it can add some text at the cursor
> location. This
> works fine in a standalone under Mac OS 9. However,
> it totall
I have a script that uses the selectedchunk to locate the cursor in
a field so that it can add some text at the cursor location. This
works fine in a standalone under Mac OS 9. However, it totally fails
in a Windows standalone.
To test this out, I added an "answer" dialog to tell m
ected and hence no selectedChunk.
Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Kjetil Rå Hauge
> Sent: Wednesday, September 24, 2
Is there something special about the
selectedChunk under Windows? I have a stack where
the user clicks on a word (or a sequence of
words) in a locked field, and then on a button to
have a given handler operate on the selection.
The problem is that the selectedChunk seems to
get lost
arget into myChar
put mychar into the selectedChunk
end mouseUp
This works like a charm in OSX, rev 2.01. However, in OS 9, I
constantly get an error message, indicating it can't find the
selectedChunk. I am unable to insert the character at the cursor point
in the field in the main stack.
I'd like to insert some html on both sides of the selected text in a
field.
"put "" before the selectedchunk" works, but..
put "" after the selectedchunk still inserts it before. How do I get
it after the selected text?
thanks,
/Niklas
__
on 1/15/02 11:14 AM, bmmeili at [EMAIL PROTECTED] wrote:
> hi
> I've still got a problem with the selectedchunk-function.
>
> The following test-script works properly and I get the wished
> chunk-description.
>
> on mouseup
> select word random(50) of field 1
hi
I've still got a problem with the selectedchunk-function.
The following test-script works properly and I get the wished
chunk-description.
on mouseup
select word random(50) of field 1
put the selectedchunk
end mouseup
But, if I select a word in field 1 myself and then press the b
I've got a problem with the selectedchunk-function.
In Revolution 1.0 the following handler works fine whereas it doesn't work
neither in Revolution 1.1. nor in Revolution 1.1.1.
on mouseup
put the selectedchunk -- some text is marked in a card field
end mouseup
Is there somebo
54 matches
Mail list logo