Re: Bookmarks a la OmniWeb!
Re: Bookmarks a la OmniWeb!
- Subject: Re: Bookmarks a la OmniWeb!
- From: Kyle Moffett <email@hidden>
- Date: Sun, 18 Aug 2002 18:25:50 -0400
On Sunday, August 18, 2002, at 03:30 PM, Mads Bakholt wrote:
Hi there,
I have a Cocoa Document Application and would like to display my App's
bookmarks in a OmniWeb manner, i.e.:
if (no_documents_open){
display_a_window;
}else{
display_a_drawer;
}
Don't mind telling me about the display_a_window - my problem is this:
From menu.nib I invoke a ShowBookmarks() action(located in a generic
controller within menu.nib) which checks if the app has any documents
open - if so, it simply loads the Bookmarks.nib(complete with window,
outlineview, etc) and display it!
*But what if I would like to diplay a Drawer instead and the drawer is
located within document.nib, i.e. I cannot get my hands on the outlet
within document.nib pointing to its NSDrawer?
Heeeeeeeeeeeeelp!
Try this:
In MyDocument.h/m
- (void) openDrawer;
Then for the menu action
NSDocument *mydoc = [[NSDocumentController sharedDocumentController]
currentDocument];
if (mydoc)
[mydoc openBookmarksDrawer];
else
[myController openBookmarksWindow];
Hope that helps,
Kyle Moffett
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.