Ask a Question related to Mac Programming, Design and Development.
-
Paul Forgey #1
beginner question re: document based application
I've got a document based Cocoa application, and I would like to have
a single NSPanel which shows certain stuff about the current document.
I think that I want to create a conroller which has a class method
creating or returning a one and only instance of the panel's
controller which I can then inform of what the current document is.
But -- how I know when the current document changes?
Paul Forgey Guest
-
Beginner question
new to the world of asp! I'm trying to define session variables using the following code: Session("Employee")= when i replace the Session... -
FMS Beginner Question
I'm a total newbie here so I appreciate any help. We just installed FMS and would like to use it for streaming videos. I've researched and found... -
web-based application question
Hi, I have a perl script that I would like to make available on-line. I suspect the target community (microbiologists) has no interest in... -
PHP beginner question
Hello, I am currently learning PHP, and I have a problem with some variables. On the first page (choix.php), there is a form that lists product... -
Allow openPanel to choose folders in Cocoa document-based application?
I am trying to figure out the best way to force the open panel of a Cocoa document-based application to allow selection of folders. In some... -
matt neuburg #2
Re: beginner question re: document based application
In <207eddbd.0309121718.348e75d5@posting.google.com > Paul Forgey wrote:
Use a notification. Look at the notifications for a window. From a> I've got a document based Cocoa application, and I would like to have
> a single NSPanel which shows certain stuff about the current document.
> I think that I want to create a conroller which has a class method
> creating or returning a one and only instance of the panel's
> controller which I can then inform of what the current document is.
> But -- how I know when the current document changes?
window you can get its windowcontroller and document. m.
--
matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
[url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
Subscribe to TidBITS. It's free and smart.
matt neuburg Guest
-
Paul Forgey #3
Re: beginner question re: document based application
matt neuburg <matt@tidbits.com> wrote in message news:<20030913092526765-0700@news.la.sbcglobal.net>...
Forgot about that, thanks! Since I subclassed NSWindowController for> In <207eddbd.0309121718.348e75d5@posting.google.com > Paul Forgey wrote:>> > I've got a document based Cocoa application, and I would like to have
> > a single NSPanel which shows certain stuff about the current document.
> > I think that I want to create a conroller which has a class method
> > creating or returning a one and only instance of the panel's
> > controller which I can then inform of what the current document is.
> > But -- how I know when the current document changes?
> Use a notification. Look at the notifications for a window. From a
> window you can get its windowcontroller and document. m.
my document window, this was very easy to do. Just made my controller
delegate for the document window (rather than notifications, which I
guess I would do if I didn't subclass NSWindowController), and used
windowWillClose: and windowDidBecomeMain:. For the shared panel
controller then, I gave it methods document: and setDocument:. When
the document window becomes main, I call setDocument: on the panel,
and when the window closes, I call setDocument:nil ONLY if document:
returns my current document.
Paul Forgey Guest



Reply With Quote

