• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMatrix Subclassed NSScrollView viewable area width?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSMatrix Subclassed NSScrollView viewable area width? (From: James Andrews <email@hidden>)

  • Prev by Date: Re: iTunes-like single-click table cell editing
  • Next by Date: Re: Breakpoint on @throw?
  • Previous by thread: Re: [SOLVED] NSMatrix Subclassed NSScrollView viewable area width?
  • Next by thread: Debugging Help
  • Index(es):
    • Date
    • Thread