Re: Not getting mouseDown: called when control-clicking in view in menu item SOLVED

2014-05-17 Thread Tim Hewett
Solved. The problem was caused by the view concerned having a menu set with setMenu:. With that remove it now gets mouseDown: with control held down. Many thanks for your thoughts. On 18 May 2014, at 01:44, Tim Hewett wrote: > As a test I have replaced the TrackView view with my own view in

Re: Not getting mouseDown: called when control-clicking in view in menu item

2014-05-17 Thread Tim Hewett
As a test I have replaced the TrackView view with my own view in the MenuItemView sample code mentioned previously, still creating it programatically as in my own code, and it now gets mouseDown: with control held down no problem. So clearly the issue is nothing to do with how the view is creat

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
On May 17, 2014, at 6:02 PM, Bob Sabiston wrote: > It doesn’t just pass the name, it passes a list of arguments. So I had to > put this in the Run Shell Script window: > > for f in "$@" > do > myScript "$f" > done > > Thanks for the help! Right. And if there's only 1 argument, then you only

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
On May 17, 2014, at 5:54 PM, Bob Sabiston wrote: > Within Automator, you have to add a “Get Specified Finder Items” action > before the script... No, that's for getting the Finder's current selection. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Bob Sabiston
> On May 17, 2014, at 6:26 PM, Kevin Meaney wrote: > >> I think an applescript droplet, using the "on open" call which then calls >> "do shell script" with the path to your command and the file that is dropped >> on it. >> >> Kevin > > >>> You have to create the right kind of Automator workf

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Bob Sabiston
On May 17, 2014, at 6:26 PM, Kevin Meaney wrote: > I think an applescript droplet, using the "on open" call which then calls "do > shell script" with the path to your command and the file that is dropped on > it. > > Kevin >> You have to create the right kind of Automator workflow for droppi

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
On May 17, 2014, at 5:34 PM, Scott Ribe wrote: > On May 17, 2014, at 5:14 PM, Bob Sabiston wrote: > >> I’ve never used Automator, would it do this? > > Yes. I don't remember all the details, but from what I recall I think it > should take you about 10 minutes to figure it out ;-) > > You ha

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
On May 17, 2014, at 5:14 PM, Bob Sabiston wrote: > I’ve never used Automator, would it do this? Yes. I don't remember all the details, but from what I recall I think it should take you about 10 minutes to figure it out ;-) You have to create the right kind of Automator workflow for dropping fi

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Kevin Meaney
I think an applescript droplet, using the "on open" call which then calls "do shell script" with the path to your command and the file that is dropped on it. Kevin On 18 May 2014, at 00:14, Bob Sabiston wrote: > Hello, > > I have a little console app written in C, one which takes a filename

Drag and drop onto BSD command line tool?

2014-05-17 Thread Bob Sabiston
Hello, I have a little console app written in C, one which takes a filename as an argc/argv argument. Is there any *easy* way to make this into a tool which I can just drop files onto it in the finder? There used to be a program called DropScript which would do this, but it was PPC based

Re: making NSView firstResponder/key

2014-05-17 Thread Roland King
> > >> your custom view does the right thing with input methods (e.g. >> Kotoeri/Hiragana or Pinyin). Also with VoiceOver. If a custom view is an >> alternative kind of text view, it should adopt NSTextInputClient and >> implement its methods. > > Regards, > Ken > Sound advice. In this ca

Re: making NSView firstResponder/key

2014-05-17 Thread Ken Thomases
On May 17, 2014, at 4:01 AM, Roland King wrote: > Looked at the field editor docs but it didn't instantly make sense. Text fields use a secondary view to actually handle the editing. The text field objects themselves, as views, only really perform display when they don't have focus. When they

Re: making NSView firstResponder/key

2014-05-17 Thread Roland King
On 17 May, 2014, at 4:51 pm, Ken Thomases wrote: > On May 17, 2014, at 2:56 AM, Roland King wrote: > >> I have a custom NSView (actually subclass of NSTextField) in which I've >> overridden acceptsFirstResponder to return YES whether the superclass text >> field is editable or not. It also re

Re: making NSView firstResponder/key

2014-05-17 Thread Ken Thomases
On May 17, 2014, at 2:56 AM, Roland King wrote: > I have a custom NSView (actually subclass of NSTextField) in which I've > overridden acceptsFirstResponder to return YES whether the superclass text > field is editable or not. It also returns YES to canBecomeKeyView. I have 6 > of them on-scree

Re: NSSharingService with Animated GIFs?

2014-05-17 Thread Ken Thomases
On May 17, 2014, at 2:16 AM, Charles Carver wrote: > Thanks for the tips! As I’m new to Cocoa, they’re all very helpful. You're welcome. I'm glad to help. >> You should consider what happens if the server is slow to respond. The >> above call will block until the image download is complete.

making NSView firstResponder/key

2014-05-17 Thread Roland King
I have a custom NSView (actually subclass of NSTextField) in which I've overridden acceptsFirstResponder to return YES whether the superclass text field is editable or not. It also returns YES to canBecomeKeyView. I have 6 of them on-screen and lots of logging. The 6 are dynamically added, not f

Re: NSSharingService with Animated GIFs?

2014-05-17 Thread Charles Carver
Ken, Thanks for the tips! As I’m new to Cocoa, they’re all very helpful. > You should consider what happens if the server is slow to respond. The above > call will block until the image download is complete. Better to use the > asynchronous URL loading mechanisms in the frameworks (e.g. NSURL