Adrian,

To understand the selectedChunk, put the following script into a field:

on selectionChanged
  put the selectedChunk
end selectionChanged

and select a text in the field, then change a different text. You'll see that the selectedChunk is not a text but a reference to that text.

The parameter that goes with the keyDown message contains only one character. Your parameter theKey cannot contain "-1", it can only contain "-" or "1" or "+" etc.

I don't think that the keyDown message would be a good way to check the contents of fld "insertionField". You might want to use the closeField message and the returnInField and enterInField messages instead.

Probably, you chose a wrong approach. I recommend changing your interface. If you want to add a number which is either 0, -1 or +1, make a slider or a menu with three options. This way, it is easier to make a choice and the user can't make a mistake by entering an invalid number.

Best,

Mark


--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store software. Download at http://www.salery.biz

Op 6-okt-2006, om 12:48 heeft Adrian Williams het volgende geschreven:


if the selectedChunk (theKey, field "insertionField") is -1 then
  answer "endChar is -1"
else
if the selectedChunk (theKey, field "insertionField") is +1 then
    answer "endChar is +1"
  else
if the selectedChunk (theKey, field "insertionField") is 0 then
      beep
      end if
  end if
  end if
end keyDown

What am I missing?
Many thanks,
Adrian
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to