Messaging Cocoa apps through Terminal
Messaging Cocoa apps through Terminal
- Subject: Messaging Cocoa apps through Terminal
- From: Ulai Beekam <email@hidden>
- Date: Wed, 3 Mar 2010 16:17:13 +0000
- Importance: Normal
How can I send messages to my Cocoa app through the terminal? Say something like
MyGreatMp3Player.app --sendAdvancedMessageThatIsNotInTheUI create100EmptyPlaylists
I suppose it's hard to do this on the .app since it's just a directory, but you get the point. Just so the user (but mainly the developer for testing purposes) can somehow make the app do things that cannot be done in the UI.
In the example above, the app is being asked to create 100 empty playlists, which could be useful to make sure that, say, the scrollbars are working well, etc.
How could I do something like this? First: How do I send messages to the app? And second: How do I make my app detect these messages? Could I somehow do this with NSNotificationCenter?
Thanks, U.
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden