Professional Web Applications Themes

beginner question doent based application - Mac Programming

I've got a doent based Cocoa application, and I would like to have a single NSPanel which shows certain stuff about the current doent. 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 doent is. But -- how I know when the current doent changes?...

  1. #1

    Default beginner question re: doent based application

    I've got a doent based Cocoa application, and I would like to have
    a single NSPanel which shows certain stuff about the current doent.
    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 doent is.
    But -- how I know when the current doent changes?
    Paul Forgey Guest

  2. #2

    Default Re: beginner question re: doent based application

    In <207eddbd.0309121718.348e75d5posting.google.com > Paul Forgey wrote:
    > I've got a doent based Cocoa application, and I would like to have
    > a single NSPanel which shows certain stuff about the current doent.
    > 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 doent is.
    > But -- how I know when the current doent changes?
    Use a notification. Look at the notifications for a window. From a
    window you can get its windowcontroller and doent. m.

    --
    matt neuburg, phd = [email]matttidbits.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

  3. #3

    Default Re: beginner question re: doent based application

    matt neuburg <matttidbits.com> wrote in message news:<20030913092526765-0700news.la.sbcglobal.net>...
    > In <207eddbd.0309121718.348e75d5posting.google.com > Paul Forgey wrote:
    > > I've got a doent based Cocoa application, and I would like to have
    > > a single NSPanel which shows certain stuff about the current doent.
    > > 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 doent is.
    > > But -- how I know when the current doent changes?
    >
    > Use a notification. Look at the notifications for a window. From a
    > window you can get its windowcontroller and doent. m.
    Forgot about that, thanks! Since I subclassed NSWindowController for
    my doent window, this was very easy to do. Just made my controller
    delegate for the doent 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 doent: and setDoent:. When
    the doent window becomes main, I call setDoent: on the panel,
    and when the window closes, I call setDoent:nil ONLY if doent:
    returns my current doent.
    Paul Forgey Guest

Similar Threads

  1. Beginner question
    By Chris in forum ASP
    Replies: 2
    Last Post: March 10th, 03:36 AM
  2. FMS Beginner Question
    By albertalaan in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: February 27th, 07:24 PM
  3. Replies: 10
    Last Post: October 25th, 11:50 AM
  4. web-based application question
    By Pd Schloss in forum PERL Beginners
    Replies: 7
    Last Post: October 15th, 04:13 PM
  5. PHP beginner question
    By Ben in forum PHP Development
    Replies: 5
    Last Post: September 25th, 07:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139