Hen Hi.

Oh thanks I was thinking about the same method I but I had my delegate to be 
the same main window controller, and it wasn't being called, I guess because 
the window wasn't active, I changed the window delegate to be the App delegate 
and implemented that method and it worked!! :D, thanks.


Gustavo

On Apr 1, 2010, at 3:01 PM, Ken Thomases wrote:

> On Apr 1, 2010, at 3:55 AM, Gustavo Pizano wrote:
> 
>> I was reading a little about the user Experience, but I hadn't been able to 
>> achieve the goal, when I close the window, it closes the it but the app 
>> doesn't terminate but I can't bring it back again, I have set in IB to don't 
>> release when closed. I tried doing something with the Window Menu, but once 
>> I close the window it deactivate all the items, so I can't associate a Menu 
>> Item to the App's makeFrontAndKey method,  I guess Im really missing 
>> something, 
>> 
>> The other option I see is that most of the apps once I click the dock icon 
>> again it will bring the window back on screen,  how to achieve this? some 
>> window delegate method?
> 
> The application delegate: -applicationOpenUntitledFile:
> 
> What's happening is that clicking the Dock icon is "relaunching" the app.  
> The same happens if the user double-clicks the app's icon in the Finder when 
> it's already running.  That is handled by:
> 
> -applicationShouldHandleReopen:hasVisibleWindows:
> -applicationShouldOpenUntitledFile:
> -applicationOpenUntitledFile:
> 
> If the first two are unimplemented or return YES, then it invokes the third 
> (if it's implemented).  In there, you can make your main window key and order 
> it front.
> 
> Cheers,
> Ken
> 

_______________________________________________

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 arch...@mail-archive.com

Reply via email to