I'm trying to zip files using the command-line utility through NSTask.
pseudocode:
controller:
init:
register_self_as_observer_of_nstask_notifications
startZip(file):
file = somefileobject
task = "zip" with file path as argument
task.launch
notification_listener(notification):
task = notification.get_object
file = task.???
So how can I find out which file object the notification pertains to? I usually use the userInfo dictionary for such things, but NSTask has no such option. From Apple Dev: This notification does not contain a userInfo dictionary.
Thanks!