Discussion:
NSDrawer ?
(too old to reply)
Stéphane Sudre
2000-06-14 09:40:33 UTC
Permalink
Another stupid question.

I added a NSDrawer to my main window. It is exactly set as it should
(Content View and Parent Window correclty set as with the default
NSDrawer+NSWindow widget).

Yet when I add a NSButton inside the Content View via IB. The NSButton
doesn't appear when I open the Drawer.

Should I make some calls to make it appear ?
--
Stéphane
***@dunet.com
jeff
2000-06-14 13:25:55 UTC
Permalink
Michael B. Johnson
2000-06-14 16:33:11 UTC
Permalink
Before I spend the time, has anyone ported Incr Tcl to DP4? I noticed that Apple has nicely
supplied a Tcl framework, so I'm thinking there may be some closet Incr Tcl hackers there as well...

I may do it if no one responds.
--
--> Michael B. Johnson, Ph.D. -- ***@pixar.com
--> Studio Tools, Pixar Animation Studios
--> http://xenia.media.mit.edu/~wave
Stéphane Sudre
2000-06-15 09:14:31 UTC
Permalink
Post by Stéphane Sudre
Yet when I add a NSButton inside the Content View
via IB. The NSButton
doesn't appear when I open the Drawer.
Should I make some calls to make it appear ?
Aha, it's a nice little trick Apple has played (first
off not having NSDrawer fully documented).
one, the content view of the drawer window is
actually an NSBox, you can programatically reset it's
content view via the -[NSDrawer setContentView:]
two, when you use IB, make sure that you have the
drawers box selected before you drag anything into it.
That should help in placing your butting into the box
(said drawer) content view.
That was exactly the problem. Thanks a lot for the experts replies.

Now another question for "Stump the Experts".

When I'm opening the NSDrawer, the size of the Drawer is bad. I need to
manually drag the NSDrawer to its fully correct size. Can't it do it
correctly by itself ?

Another question : can't we set the size of the NSDrawer and make it not
change. It seems that whatever value I'm typing in Interface Builder for the
min and Max size is not taken into account when I run the program and resize
the parent window

Another quizz: is there a openClose method for NSDrawers ? Since it seems
that a NSDrawer knows when it is opened or closed, why can't I just have one
NSButton to ask it to open or close itself.

The prizes are all my consideration.
--
Stéphane
***@dunet.com
Douglas Davidson
2000-06-15 16:16:58 UTC
Permalink
Post by Stéphane Sudre
Another question : can't we set the size of the NSDrawer and make it not
change. It seems that whatever value I'm typing in Interface Builder for the
min and Max size is not taken into account when I run the program and resize
the parent window
The sizing issue with drawers is a little complicated; I'm sorry there
isn't documentation for this. A drawer does not entirely control its own
size--its size is partly determined by the size of its parent window. A
drawer can never be larger than its parent, and normally the height of a
horizontal drawer is the height of its parent minus any offsets. There are
delegate methods you can use to find out when a drawer is being resized.
Post by Stéphane Sudre
Another quizz: is there a openClose method for NSDrawers ? Since it seems
that a NSDrawer knows when it is opened or closed, why can't I just have one
NSButton to ask it to open or close itself.
A drawer is not just open or closed--it is open, or closed, or opening, or
closing. We could no doubt provide a convenience method along the lines
you suggest, but on the other hand I think you can also do it yourself in a
few lines of code.
Post by Stéphane Sudre
When I'm opening the NSDrawer, the size of the Drawer is bad. I need to
manually drag the NSDrawer to its fully correct size. Can't it do it
correctly by itself ?
This isn't really enough information for me to answer the question.

Douglas Davidson
Stéphane Sudre
2000-06-14 09:40:33 UTC
Permalink
Another stupid question.

I added a NSDrawer to my main window. It is exactly set as it should
(Content View and Parent Window correclty set as with the default
NSDrawer+NSWindow widget).

Yet when I add a NSButton inside the Content View via IB. The NSButton
doesn't appear when I open the Drawer.

Should I make some calls to make it appear ?
--
Stéphane
***@dunet.com
jeff
2000-06-14 13:25:55 UTC
Permalink
Michael B. Johnson
2000-06-14 16:33:11 UTC
Permalink
Before I spend the time, has anyone ported Incr Tcl to DP4? I noticed that Apple has nicely
supplied a Tcl framework, so I'm thinking there may be some closet Incr Tcl hackers there as well...

I may do it if no one responds.
--
--> Michael B. Johnson, Ph.D. -- ***@pixar.com
--> Studio Tools, Pixar Animation Studios
--> http://xenia.media.mit.edu/~wave
Stéphane Sudre
2000-06-15 09:14:31 UTC
Permalink
Post by Stéphane Sudre
Yet when I add a NSButton inside the Content View
via IB. The NSButton
doesn't appear when I open the Drawer.
Should I make some calls to make it appear ?
Aha, it's a nice little trick Apple has played (first
off not having NSDrawer fully documented).
one, the content view of the drawer window is
actually an NSBox, you can programatically reset it's
content view via the -[NSDrawer setContentView:]
two, when you use IB, make sure that you have the
drawers box selected before you drag anything into it.
That should help in placing your butting into the box
(said drawer) content view.
That was exactly the problem. Thanks a lot for the experts replies.

Now another question for "Stump the Experts".

When I'm opening the NSDrawer, the size of the Drawer is bad. I need to
manually drag the NSDrawer to its fully correct size. Can't it do it
correctly by itself ?

Another question : can't we set the size of the NSDrawer and make it not
change. It seems that whatever value I'm typing in Interface Builder for the
min and Max size is not taken into account when I run the program and resize
the parent window

Another quizz: is there a openClose method for NSDrawers ? Since it seems
that a NSDrawer knows when it is opened or closed, why can't I just have one
NSButton to ask it to open or close itself.

The prizes are all my consideration.
--
Stéphane
***@dunet.com
Douglas Davidson
2000-06-15 16:16:58 UTC
Permalink
Post by Stéphane Sudre
Another question : can't we set the size of the NSDrawer and make it not
change. It seems that whatever value I'm typing in Interface Builder for the
min and Max size is not taken into account when I run the program and resize
the parent window
The sizing issue with drawers is a little complicated; I'm sorry there
isn't documentation for this. A drawer does not entirely control its own
size--its size is partly determined by the size of its parent window. A
drawer can never be larger than its parent, and normally the height of a
horizontal drawer is the height of its parent minus any offsets. There are
delegate methods you can use to find out when a drawer is being resized.
Post by Stéphane Sudre
Another quizz: is there a openClose method for NSDrawers ? Since it seems
that a NSDrawer knows when it is opened or closed, why can't I just have one
NSButton to ask it to open or close itself.
A drawer is not just open or closed--it is open, or closed, or opening, or
closing. We could no doubt provide a convenience method along the lines
you suggest, but on the other hand I think you can also do it yourself in a
few lines of code.
Post by Stéphane Sudre
When I'm opening the NSDrawer, the size of the Drawer is bad. I need to
manually drag the NSDrawer to its fully correct size. Can't it do it
correctly by itself ?
This isn't really enough information for me to answer the question.

Douglas Davidson

Continue reading on narkive:
Loading...