Re: Layering NSViews -- why isn't this recommended?
Re: Layering NSViews -- why isn't this recommended?
- Subject: Re: Layering NSViews -- why isn't this recommended?
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 7 Jun 2001 02:31:17 -0700
Andy Stone wrote an app for connecting to internet poker servers at
MacHack the year before last. You should be able to find that code
either at stepwise, or somewhere at stone.com. Come to think of if, you
may also be able to find it at MacHack.org.
I wouldn't make each card a view, if I were you. Views are pretty
heavyweight for what you need to do.
-jcr
On Wednesday, June 6, 2001, at 08:29 PM, Michael P. Rogers wrote:
I've been trying to create a pile of cards that are offset -- so each
card is to the right and below the one beneath it (ala Eric's
Solitaire, which I believe used to ship with the Mac at one time). My
Cards are subclasses of NSImageView.
My plan is to
1) make a Card class (subclass of NSImageView)
2) place those Cards in a Window's contentView using a method in NSView
that sounded promising, addSubview:positioned:relativeTo:.
It seems to work, but the documentation has this dire warning:
"addSubview:positioned:relativeTo:, allows you to specify the ordering
of NSViews that may overlap (though laying out NSViews so that they
overlap isn't recommended)."
Does anybody know why this isn't recommended? And otherwise, how can I
accomplish this? In Java there's a JLayeredPane; is there any
equivalent in the Application Kit?
Thanks,
Michael
-- ---------------------------------
Dr. Michael Rogers
e-mail: email@hidden
Phone: 217-424-6327
For information about Computer Science at Millikin University, visit
http://math.millikin.edu
For information about astronomy, check out
http://twincityamateurastronomers.org
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
"These kids today don't know the simple joy of saving four bytes of
page-0 memory on a 6502" - unknown