Professional Web Applications Themes

NSWindowController - new instance ? - Mac Programming

Hello N In my application I have a subclass of NSWindowController ( articleBrowser). This class controlls a single window .nib-file and everything that happens inside the window. If I open a second window, thought that this should be a new instance of articleBrowser ? Every window or instance of articleBrowser should own a separate instance of a other object (connectionObj). But as I see now, ifinit a new connectionObj for the second window, the connectionObj from the first is overwritten or is the same instance ? How can that be ? Is a new window not a new instance and ...

  1. #1

    Default NSWindowController - new instance ?

    Hello N
    In my application I have a subclass of NSWindowController ( articleBrowser). This class controlls a
    single window .nib-file and everything that happens inside the window. If I open a second
    window, thought that this should be a new instance of articleBrowser ? Every window or instance
    of articleBrowser should own a separate instance of a other object (connectionObj).
    But as I see now, ifinit a new connectionObj for the second window,
    the connectionObj from the first is overwritten or is the same instance ?
    How can that be ? Is a new window not a new instance and what
    will happen if I put each articleBrowser in a single thread

    Thank you for your time and hel

    Florian
    Florian Guest

  2. #2

    Default Re: NSWindowController - new instance ?

    Florian Zschocke <de> wrote: 
    ....so please ignore this thread, it was all bull

    Florian
    Florian Guest

  3. #3

    Default Re: NSWindowController - new instance ?

    Florian Zschocke <de> wrote:
     

    Sounds to me like you're coming at this totally bass-ackwards. Start by
    making a second instance of articleBrowser. It should be the file's
    owner for the nib. It is the separate opening of the nib by the separate
    articleBrowser that makes this a different window. In a doent-based
    app this is all taken care of for you. m.

    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

  4. #4

    Default Re: NSWindowController - new instance ?

    com (matt neuburg) wrote: 
    Thank you Matt
    In this case the program worked fine but I started seeing things, I start t
    see from time to time, if look too long in these nice debugger windows..
    ....the problem disappeared without any trace next day

    Florian
    Florian Guest

Similar Threads

  1. Administrative Instance now looks like Instance Manager
    By Data_Gladiator in forum Coldfusion Server Administration
    Replies: 2
    Last Post: November 10th, 09:48 PM
  2. SQL Instance
    By Tennis Is Fun in forum Coldfusion Database Access
    Replies: 2
    Last Post: July 15th, 07:02 PM
  3. another SQL instance?
    By Brian Hogue in forum Coldfusion Database Access
    Replies: 3
    Last Post: April 11th, 09:36 PM
  4. Trying to track an instance's position relative to the stage - instance is inside an MC
    By _posted.by\(Vern\); in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: January 20th, 04:52 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