Re: NSMatrix Subclassed NSScrollView viewable area width?
Re: NSMatrix Subclassed NSScrollView viewable area width?
- Subject: Re: NSMatrix Subclassed NSScrollView viewable area width?
- From: "M. Uli Kusterer" <email@hidden>
- Date: Wed, 19 Jan 2005 14:43:28 +0100
At 19:35 Uhr -0500 18.01.2005, James Andrews wrote:
I've created an NSMatrix subclass, that in IB I have made a subclass
of NSScrollView.
This is nonsense. You can only have one immediate superclass in
Objective C. If you claim your class was based on one class in your
NIB and on another in your source file, you'll get the most hilarious
of crashes...
I've overWritten initWithFrame so I can set some stuff beforehand, and
after [super initWithFram:FrameRect] I want to get the width of my
viewable area so I can decide on the amount of columns I want to
generate. I use the bounds method of the NSMatrix to get the bounds,
thinking that would be the width of view, but it is not.
bounds.size.width would give you the width of the view. Works just
fine for me. I think what you're actually looking for is the visible
area of the view. IIRC NSScrollView or the NSClipView inside that
have a method for getting at that.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden