RE: [TIP] How to ensure plain pasted text

2008-10-27 Thread Hugh Senior
For those watching this thread, there is a verified bug when focusing out of a field after doing a put into selection: the exitField message is sent instead of the closeField (http://quality.runrev.com/qacenter/show_bug.cgi?id=7354). As a workaround you will need to trap this... local oldMe on

Re: [TIP] How to ensure plain pasted text

2008-10-25 Thread Björnke von Gierke
Hi Hugh Can you elaborate a bit on the problems that you see with my method? I am using it in some places, and plan to use it in the future too, so any backdraw would be of interest to me. Unfortunately I have no clue what you wanted to say. What arrays? Who changes them? I'm not loosing

RE: [TIP] How to ensure plain pasted text

2008-10-25 Thread Hugh Senior
Hi BvG Upon reflexion and trying your handler with both 2.9 and 3.0 in Windows, I prefer your simpler solution over my use of the templateField (although it was an interesting exercise in itself). The loss of paragraphs was the result of my original methodology and manipulations of the

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread coiin
I'm sure your handler will come in useful, but out of interest, would the Edit menu item Paste Unformatted not take care of many of the cases? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe,

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Mark Schonewille
Hi Hugh, What about this: on commandKeyDown theKey if theKey is V and the selectedField is not empty then lock screen paste put the text of the selectedField into the selectedField unlock screen else pass commandKeyDown end if end commandKeyDown (I haven't tested it)

[TIP] How to ensure plain pasted text

2008-10-24 Thread Hugh Senior
A little something to keep in your Scripter's Scrapbook for when you need it... How do we ensure plain text when we copy and paste from another program? Pasting text from a Browser or an email often results in an unwanted text format that doesn't match the field's default style. This is annoying

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Björnke von Gierke
I'm not sure this holds true for win or linux (or older rev versions then 2.8.1), but on mac os x, when there's styled text in the clipboard, both the html and the text values of the clipboarddata array hold their respective value. Therefore this proved sufficient in one of my projects:

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Björnke von Gierke
After a few seconds of thinking (amazing what that can do for you...), I realised that the script as posted is pretty much useless. I transformed an existing script from a rawKeyDown handler of a field, omissing mission critical changes. So for having this done on every field on a card or

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Thomas McGrath III
Thanks Hugh, This was very informative. I have not used the templateField before since I did not think I had a need for it but after this great explanation I think I might find some uses here in the near future. Thanks again, Tom McGrath On Oct 24, 2008, at 5:24 AM, Hugh Senior wrote: A

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Hugh Senior
on commandKeyDown pKey if pKey = V then set the htmlText of the templateField to the clipboardData[HTML] if the autoTab of the selectedField then get the text of the templateField replace RETURN with SPACE in it set the text of the templateField to it

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Stephen Barncard
How would this particular menu item and its script magically be created in an app? I'm sure your handler will come in useful, but out of interest, would the Edit menu item Paste Unformatted not take care of many of the cases? -- stephen barncard s a n f r a n c i s c o - - - - - - - -

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Joe Lewis Wilkins
Hi Stephen, If you've copied something, paste unformatted is already in the Edit Menu of 3.0s IDE. Joe Wilkins On Oct 24, 2008, at 3:04 PM, Stephen Barncard wrote: How would this particular menu item and its script magically be created in an app? I'm sure your handler will come in

Re: [TIP] How to ensure plain pasted text

2008-10-24 Thread Stephen Barncard
I know that, but it's useless when one has custom menus in the app. Hi Stephen, If you've copied something, paste unformatted is already in the Edit Menu of 3.0s IDE. Joe Wilkins -- stephen barncard s a n f r a n c i s c o - - - - - - - - - - - -