I think perhaps I'm not being clear in what I'm asking.

The File Open (for instance) menu item is already assigned, it sends openDocument: to FirstResponder. I can see it right there in the bindings, that menu item is already set up to call something.

Yes I suppose I could write my own entirely different method which pops up a file chooser, then waits for user input and displays the results, but that doesn't seem to be using the framework, I want it to pop up the open file dialog (like it usually does) and just hand me the filename in a callback later. But is that plumbing only available automatically in document-based applications.



On Apr 16, 2008, at 5:45 PM, Ramón Medrano Llamas wrote:

First implement a -(IBAction)myaction:(id)sender; method that, for example, shows file properties. Assign this method (action) to the menu intem and it is done.

When a menu item has an action, it will be enabled automatically.

El 16/04/2008, a las 11:30, Roland King escribió:
but they are already assigned to .. the first responder I think. And they are disabled menu items too .. what enables them?



On Apr 16, 2008, at 5:26 PM, Ramón Medrano Llamas wrote:

It's easy, you must assign in Interface Builder an action to those menu items that do the tasks you want.

2008/4/16, Roland King <[EMAIL PROTECTED]>:
First post. I've been dragging my way through the Cocoa documentation and trying some simple apps. I started with non- document apps and of course you still get the File menu, but most of it's disabled. I understand that when you create a document- based app (and I have a lot more reading to do there) those menu items are enabled and you get the file browser etc for free.

I was trying to figure out if it's possible to enable and use the file save and open even on a non-document-based app, eg assume some stupidly simple app which just lets you 'open' any file you like and gives you information about it in a window. I haven't been able to understand what's driving those menu items, what's enabling and disabling them in the Document-based app which isn't there in a non-document-based one and what methods I'd need to supply if I wanted to add that kind of support.

Is there an example out there somewhere of a non-document-based app which uses some or all of the file menu items, or a piece of API documentation I haven't found which explains it? Or is this just something you just don't do .. if you want to use File menu stuff at all .. you make a document-based app?

Thanks
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/ramon%40ramonmedrano.es

This email sent to [EMAIL PROTECTED]



--

Ramón Medrano Llamas
Coordinador de eventos & Webmaster
EUITIO Mac's Users & Developers

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://ramonmedrano.es/


Advertencia Legal:
Este correo electrónico es confidencial y no se autoriza su uso, revelación, distribución, impresión o copia. Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos exclusivamente a los destinatarios especificados. La información contenida puede ser confidencial y/o estar legalmente protegida. Si Usted recibe este mensaje por error, por favor comuníqueselo inmediatamente al remitente y elimínelo ya que usted no está autorizado al uso, revelación, distribución, impresión o copia de toda o alguna parte de la información contenida.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/ramon%40ramonmedrano.es

This email sent to [EMAIL PROTECTED]


--

Ramón Medrano Llamas
Coordinador de eventos & Webmaster
EUITIO Mac's Users & Developers

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://ramonmedrano.es/


Advertencia Legal:
Este correo electrónico es confidencial y no se autoriza su uso, revelación, distribución, impresión o copia. Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos exclusivamente a los destinatarios especificados. La información contenida puede ser confidencial y/o estar legalmente protegida. Si Usted recibe este mensaje por error, por favor comuníqueselo inmediatamente al remitente y elimínelo ya que usted no está autorizado al uso, revelación, distribución, impresión o copia de toda o alguna parte de la información contenida.






_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to