Re: NSPasteboard Delegate

2008-05-22 Thread Graham Cox
Great, thanks - I'll do that in future. G. On 22 May 2008, at 10:31 pm, [EMAIL PROTECTED] wrote: To get the equivalent online url, you can replace: file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/ with: http://develop

Re: NSPasteboard Delegate

2008-05-22 Thread matt . gough
On 22 May 2008, at 14:18, Graham Cox wrote: Do read this: file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/CopyandPaste/Articles/pbFundamentals.html (by the way, does pasting the file URL

Re: NSPasteboard Delegate

2008-05-22 Thread Paul Bailey
Would it be possible for one to observe the changeCount? Paul On Thu, May 22, 2008 at 1:17 PM, Matt Gough <[EMAIL PROTECTED]> wrote: > Maybe you could set up a timer to run once every second or so that checks > the pasteboard's changeCount. Not sure there is an explicit notification of > changes

Re: NSPasteboard Delegate

2008-05-22 Thread Graham Cox
Well, Paste doesn't work like this. You don't get notified when there's something new to paste. Instead, the user tries to perform the paste, at which point you can check if the pasteboard contains anything you can use. You can also perform this check when validating the "paste" menu item s

Re: NSPasteboard Delegate

2008-05-22 Thread Matt Gough
Maybe you could set up a timer to run once every second or so that checks the pasteboard's changeCount. Not sure there is an explicit notification of changes. Matt On 22 May 2008, at 14:08, Adil Saleem wrote: Actually i want my application to be notified whenever there is a new text copied/

Re: NSPasteboard Delegate

2008-05-22 Thread Robert Cerny
Hi, I don't think it's possible to be notified about pasteboard change. Depending on your needs I believe a polling should be the right way to go. HTH Robert On 22.5.2008, at 14:08, Adil Saleem wrote: Let me be more precise this time. I haven't used pasteboards before. I think i asked w

Re: NSPasteboard Delegate

2008-05-22 Thread Adil Saleem
Let me be more precise this time. I haven't used pasteboards before. I think i asked wrong question. Actually i want my application to be notified whenever there is a new text copied/cutted. So that i can paste it in my application. So please guide me how that can be achieved? (with or without d

Re: NSPasteboard Delegate

2008-05-22 Thread Graham Cox
NSPasteboard indeed does not implement a setDelegate: method. The object you pass as in -declareTypes:owner: can act as the pasteboard's delegate in the case of when you promise (but do not actually provide) data when writing your data types to the pasteboard. What are you trying to do? Se

Re: NSPasteboard Delegate

2008-05-22 Thread Citizen
Can you copy and paste your awakeFromNib method and provide more detail about the exception raised? On 22 May 2008, at 08:57, Adil Saleem wrote: I am trying to set my object as delegate of NSPasteBoard. I am calling from awakeFromNib NSPasteboard *pb = [NSPasteboard generalPasteboard]; [pb s

NSPasteboard Delegate

2008-05-22 Thread Adil Saleem
Hi, I am trying to set my object as delegate of NSPasteBoard. I am calling from awakeFromNib NSPasteboard *pb = [NSPasteboard generalPasteboard]; [pb setDelegate:self]; However, on running, it raises exception. There is also a warning at compile time that says NSPasteboard may not respond to m