Re: Sending a Cmd-V keystroke

2010-03-29 Thread Jim Graham
Hi Thanks to all who have replied to this. I will try to explain to you why I was looking at this and what I have discovered. In the education establishment where I was employed, one of the departments had an AppleScript that was used to parse the standard format emails received from student

Re: Sending a Cmd-V keystroke

2010-03-29 Thread Chaitanya Pandit
Try [windowObject makeFirstResponder:testField1]; instead of [textField1 becomeFirstResponder]; Thanks, Chaitanya Pandit On Mar 26, 2010, at 5:53 AM, Jim Graham wrote: > Hi > > This is a problem that occurred a few months back in a project. I Never > actually used it in the project but it h

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Jim Correia
On Mar 25, 2010, at 8:23 PM, Jim Graham wrote: > This is a problem that occurred a few months back in a project. I Never > actually used it in the project but it has bugged me ever since. I have > simplified the problem into a small example > > There is a window with three NSTextFields and a bu

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Jim Correia
On Mar 25, 2010, at 8:23 PM, Jim Graham wrote: > This is a problem that occurred a few months back in a project. I Never > actually used it in the project but it has bugged me ever since. I have > simplified the problem into a small example > > There is a window with three NSTextFields and a bu

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Ross Carter
On Mar 26, 2010, at 12:23 AM, Jim Graham wrote: > [textField1 becomeFirstResponder]; >From the docs: "Use the NSWindow makeFirstResponder: method, not this method, >to make an object the first responder. Never invoke this method directly." ___ C

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Dave DeLong
I think you're probably moving too fast. Pasting is not a synchronous operation. What I'm guessing is happening is that you're filling the pasteboard, pasting, filling, pasting, filling, and pasting, but the pasteboard hasn't starting actually *pasting* until you've already refilled it a third

Sending a Cmd-V keystroke

2010-03-26 Thread Jim Graham
Hi This is a problem that occurred a few months back in a project. I Never actually used it in the project but it has bugged me ever since. I have simplified the problem into a small example There is a window with three NSTextFields and a button. The button is connected to the doPaste action a