Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-17 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/17/11 6:04 PM, Michael Crawford wrote: > Conrad, thank you for your concern. I know you want me and others > reading this thread to follow practices that are safe and lead to > robust resilient software. > > I only wanted to post for completen

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-17 Thread Michael Crawford
On Aug 17, 2011, at 6:30 PM, Conrad Shultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 8/17/11 3:11 PM, Michael Crawford wrote: >> For those who are interested, here is a simple answer to my >> original question. >> >> @implementation NSTextView (csstest) >> >> - >> (NSDrag

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-17 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/17/11 3:11 PM, Michael Crawford wrote: > For those who are interested, here is a simple answer to my > original question. > > @implementation NSTextView (csstest) > > - > (NSDraggingSession*)beginDraggingSessionWithItems:(NSArray*)items > event

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-17 Thread Michael Crawford
For those who are interested, here is a simple answer to my original question. @implementation NSTextView (csstest) - (NSDraggingSession*)beginDraggingSessionWithItems:(NSArray*)items event:(NSEvent*)event

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Michael Crawford
On Aug 16, 2011, at 3:51 PM, Conrad Shultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 8/16/11 12:15 PM, Michael Crawford wrote: >> If that's your goal, why don't you just setEditable:NO ? >> >> I tried that. The only problem is that then I cannot display the >> keys the u

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/16/11 12:15 PM, Michael Crawford wrote: > If that's your goal, why don't you just setEditable:NO ? > > I tried that. The only problem is that then I cannot display the > keys the user taps as they happen. I'm injecting keyboard events > and th

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Michael Crawford
On Aug 16, 2011, at 2:44 PM, Quincey Morris wrote: > On Aug 16, 2011, at 11:26 , Michael Crawford wrote: > >> I'm working on touch based museum exhibits, which run on Mac mini's. >> Suffice it to say I don't want to allow the movement of text. >> >> On Aug 16, 2011, at 2:02 PM, Kyle Sluder wro

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/16/11 11:26 AM, Michael Crawford wrote: > Thanks for responding, Kyle. > > I assume you meant NSTextField not NSTextView? I'm working on touch > based museum exhibits, which run on Mac mini's. Suffice it to say I > don't want to allow the move

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Quincey Morris
On Aug 16, 2011, at 11:26 , Michael Crawford wrote: > I'm working on touch based museum exhibits, which run on Mac mini's. Suffice > it to say I don't want to allow the movement of text. > > On Aug 16, 2011, at 2:02 PM, Kyle Sluder wrote: > >> On Tue, Aug 16, 2011 at 10:15 AM, Michael Crawford

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Kyle Sluder
On Tue, Aug 16, 2011 at 11:26 AM, Michael Crawford wrote: > I assume you meant NSTextField not NSTextView? I'm working on touch based > museum exhibits, which run on Mac mini's.  Suffice it to say I don't want to > allow the movement of text. Remember, all editing is done by the field editor, whi

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Michael Crawford
Thanks for responding, Kyle. I assume you meant NSTextField not NSTextView? I'm working on touch based museum exhibits, which run on Mac mini's. Suffice it to say I don't want to allow the movement of text. In the time since I asked the question, I've done some more reading on NSTextField and

Re: How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Kyle Sluder
On Tue, Aug 16, 2011 at 10:15 AM, Michael Crawford wrote: > I have a window that contains an NSTextField instance.  When the textfield > contains text, I can select it with a single click.  I want to preserve that > behavior.  When I click (mouseDown) and hold, the cursor changes to an arrow >

How can I prevent drag-and-drop initiation in an NSTextField

2011-08-16 Thread Michael Crawford
I have a window that contains an NSTextField instance. When the textfield contains text, I can select it with a single click. I want to preserve that behavior. When I click (mouseDown) and hold, the cursor changes to an arrow and drag-and-drop (d&d) is initiated. I want to disable this behav