Re: [Learning Cocoa Qs] View Hierarchy & Pointers to Cocoa data structures
Re: [Learning Cocoa Qs] View Hierarchy & Pointers to Cocoa data structures
- Subject: Re: [Learning Cocoa Qs] View Hierarchy & Pointers to Cocoa data structures
- From: naden <email@hidden>
- Date: Sun, 08 Jul 2001 21:34:42 +0800
Boy is this book funny .. Read the back cover:
"The ADC logo indicates that the book has been been technically reviewed by
Apple engineers and is recommended by the Apple Developer Connection"
With regards to the question:
>
QUESTION 1
>
Page 127 shows figure 8-3. It depicts the view hierarchy of a window
>
with 3 views: A, B and C. A is the window view containing views B and C.
>
What I don't understand is that the hierarchy has 2 NSWindows sitting
>
between the NSApplication and NSView 'A'. Shouldn't there only be 1
>
NSWindow?
The two NSWindow's are simply there to show that an NSApplication can have
multiple windows. And that a window doesn't necessarily have to have a stack
of NSView's. It is also to show that everything inside a window 'belongs' to
that window.
It could have a heap of NSWindow's just like your app might have lots of
windows.
Hope this helps,
-- Naden