Re: Can one permanentaly change a text field's case to capitals?

2006-01-31 Thread Jonathan Lynch
Just a note about the pastekey...

I am on a windows machine, and I find that using the pastekey handler is not
always perfect.

You can paste with either ctrl-C or with the insert button. I use a
rawkeydown script instead of a pastekey script. With rawkeydown, I can test
for either ctrl-C or the insert button.


On 1/30/06, Ken Ray [EMAIL PROTECTED] wrote:

 On 1/30/06 8:56 PM, Jim Ault [EMAIL PROTECTED] wrote:

  On 1/30/06 6:37 PM, Ken Ray [EMAIL PROTECTED] wrote:
 
  on pasteKey
put toUpper(the clipboardData[text]) into the selection
  end pasteKey
 
  Simple, no?
 
  Cool, since they could only enter the clipboardData using the keyboard
 to
  paste... or perhaps a mouse and a menu command, if paste is available.
  Would pasteKey catch the menu?

 No - you'd have to handle that in the Edit menu button script. I might
 choose to use a custom property on the field to determine if it should be
 all caps or not:

 on menuPick pChoice
if pChoice = Paste then
  if the uCapsOnly of the selectedField is true then
put toUpper(the clipboardData[text]) into the selection
  else
put the clipboardData[text] into the selection
  end if
end if
 end menuPick

 (Of course this would be longer with switch/case for more menu items other
 than Paste, but you get the idea.)


 Ken Ray
 Sons of Thunder Software
 Web site: http://www.sonsothunder.com/
 Email: [EMAIL PROTECTED]


 ___
 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

___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-31 Thread Jonathan Lynch
A further note...

You might also need to check for dragged items - In case someone drags text
in from another field.


On 1/31/06, Jonathan Lynch [EMAIL PROTECTED] wrote:

 Just a note about the pastekey...

 I am on a windows machine, and I find that using the pastekey handler is
 not always perfect.

 You can paste with either ctrl-C or with the insert button. I use a
 rawkeydown script instead of a pastekey script. With rawkeydown, I can test
 for either ctrl-C or the insert button.


  On 1/30/06, Ken Ray [EMAIL PROTECTED] wrote:
 
  On 1/30/06 8:56 PM, Jim Ault [EMAIL PROTECTED]  wrote:
 
   On 1/30/06 6:37 PM, Ken Ray [EMAIL PROTECTED] wrote:
  
   on pasteKey
 put toUpper(the clipboardData[text]) into the selection
   end pasteKey
  
   Simple, no?
  
   Cool, since they could only enter the clipboardData using the keyboard
  to
   paste... or perhaps a mouse and a menu command, if paste is available.
 
   Would pasteKey catch the menu?
 
  No - you'd have to handle that in the Edit menu button script. I might
  choose to use a custom property on the field to determine if it should
  be
  all caps or not:
 
  on menuPick pChoice
 if pChoice = Paste then
   if the uCapsOnly of the selectedField is true then
 put toUpper(the clipboardData[text]) into the selection
   else
 put the clipboardData[text] into the selection
   end if
 end if
  end menuPick
 
  (Of course this would be longer with switch/case for more menu items
  other
  than Paste, but you get the idea.)
 
 
  Ken Ray
  Sons of Thunder Software
  Web site: http://www.sonsothunder.com/
  Email: [EMAIL PROTECTED]
 
 
  ___
  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
 


___
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


Can one permanentaly change a text field's case to capitals?

2006-01-30 Thread Stgoldberg
Thanks to Ken Ray for the script:
on keyDown pKey
   put toUpper(pKey) into the selection
end keyDown
It works like a charm to insure that only   capital letters   are typed into 
a field.   This is a forum full of gurus. Thanks!
Steve Goldberg
___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-30 Thread Jim Ault
Just curious.. what if the user does copy-paste?

Jim Ault
Las Vegas

On 1/30/06 11:35 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Thanks to Ken Ray for the script:
 on keyDown pKey
    put toUpper(pKey) into the selection
 end keyDown
 It works like a charm to insure that only   capital letters   are typed into
 a field.   This is a forum full of gurus. Thanks!
 Steve Goldberg
 ___
 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


___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-30 Thread Ken Ray
On 1/30/06 8:05 PM, Jim Ault [EMAIL PROTECTED] wrote:

 Just curious.. what if the user does copy-paste?

Then you do this:

on pasteKey
  put toUpper(the clipboardData[text]) into the selection
end pasteKey

Simple, no?

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-30 Thread Jim Ault
On 1/30/06 6:37 PM, Ken Ray [EMAIL PROTECTED] wrote:
 
 on pasteKey
   put toUpper(the clipboardData[text]) into the selection
 end pasteKey

 Simple, no? 

Cool, since they could only enter the clipboardData using the keyboard to
paste... or perhaps a mouse and a menu command, if paste is available.
Would pasteKey catch the menu?

Sometimes in Rev IDE my keyboard shortcuts stop working (Save, Copy,
Duplicate) and I have to relaunch or use the menus.  Have not figured out
the culprit yet.  Would this be related?

Jim Ault
Las Vegas


On 1/30/06 6:37 PM, Ken Ray [EMAIL PROTECTED] wrote:

 On 1/30/06 8:05 PM, Jim Ault [EMAIL PROTECTED] wrote:
 
 Just curious.. what if the user does copy-paste?
 
 Then you do this:
 
 on pasteKey
   put toUpper(the clipboardData[text]) into the selection
 end pasteKey
 
 Simple, no?
 
 Ken Ray
 Sons of Thunder Software
 Web site: http://www.sonsothunder.com/
 Email: [EMAIL PROTECTED]


___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-30 Thread Ken Ray
On 1/30/06 8:56 PM, Jim Ault [EMAIL PROTECTED] wrote:

 On 1/30/06 6:37 PM, Ken Ray [EMAIL PROTECTED] wrote:
 
 on pasteKey
   put toUpper(the clipboardData[text]) into the selection
 end pasteKey
 
 Simple, no? 
 
 Cool, since they could only enter the clipboardData using the keyboard to
 paste... or perhaps a mouse and a menu command, if paste is available.
 Would pasteKey catch the menu?

No - you'd have to handle that in the Edit menu button script. I might
choose to use a custom property on the field to determine if it should be
all caps or not:

  on menuPick pChoice
if pChoice = Paste then
  if the uCapsOnly of the selectedField is true then
put toUpper(the clipboardData[text]) into the selection
  else
put the clipboardData[text] into the selection
  end if
end if
  end menuPick

(Of course this would be longer with switch/case for more menu items other
than Paste, but you get the idea.)


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


___
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


Can one permanentaly change a text field's case to capitals?

2006-01-29 Thread Stgoldberg
Does anyone know if there is a way to change the type in a field to capital 
letters and keep it that way as a property whenever one types into the field?   
I know that the Text Formatting option of a text field has a Change Case 
option to change the text into capital letters during development.   However, 
can one permanently set this as a field's property so that whenever one types 
in the field it will type as capital letters?   Thanks.
Steve Goldberg 
___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-29 Thread Sarah Reichelt
On 1/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Does anyone know if there is a way to change the type in a field to capital
 letters and keep it that way as a property whenever one types into the field?
 I know that the Text Formatting option of a text field has a Change Case
 option to change the text into capital letters during development.   However,
 can one permanently set this as a field's property so that whenever one types
 in the field it will type as capital letters?   Thanks.
 Steve Goldberg

Put this into the script of the field:

on keyUp
   put toUpper(me) into me
   pass keyUp
end keyUp

Cheers,
Sarah
___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-29 Thread Ken Ray
On 1/29/06 9:28 PM, Sarah Reichelt [EMAIL PROTECTED] wrote:

 On 1/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Does anyone know if there is a way to change the type in a field to capital
 letters and keep it that way as a property whenever one types into the field?
 I know that the Text Formatting option of a text field has a Change Case
 option to change the text into capital letters during development.   However,
 can one permanently set this as a field's property so that whenever one types
 in the field it will type as capital letters?   Thanks.
 Steve Goldberg
 
 Put this into the script of the field:
 
 on keyUp
put toUpper(me) into me
pass keyUp
 end keyUp

Unfortunately this has the unintended effect of moving the insertion point
at the beginning of the field each time, which also makes it scroll back to
the top. Also, it works to upper-case the entire field, instead of just the
characters being typed (not a big deal for fields with small amounts of
text, but can be an issue if you have pages of text in a field.

This revised handler takes care of these things:

on keyDown pKey
   put toUpper(pKey) into the selection
end keyDown


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

___
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


Re: Can one permanentaly change a text field's case to capitals?

2006-01-29 Thread Sarah Reichelt
  On 1/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Does anyone know if there is a way to change the type in a field to capital
  letters and keep it that way as a property whenever one types into the 
  field?
  I know that the Text Formatting option of a text field has a Change 
  Case
  option to change the text into capital letters during development.   
  However,
  can one permanently set this as a field's property so that whenever one 
  types
  in the field it will type as capital letters?   Thanks.
  Steve Goldberg
 
  Put this into the script of the field:
 
  on keyUp
 put toUpper(me) into me
 pass keyUp
  end keyUp

 Unfortunately this has the unintended effect of moving the insertion point
 at the beginning of the field each time, which also makes it scroll back to
 the top. Also, it works to upper-case the entire field, instead of just the
 characters being typed (not a big deal for fields with small amounts of
 text, but can be an issue if you have pages of text in a field.

 This revised handler takes care of these things:

 on keyDown pKey
put toUpper(pKey) into the selection
 end keyDown


Oops, good catch Ken. I forget about that.

I had to make a quick fix to a program at work one day and made a 
very similar mistake which had the effect of making everything come
out backwards. If they typed today, they got yadot! I got a lot of
teasing about that one :-)

Sarah
___
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