• 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: Layering NSViews -- why isn't this recommended?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Layering NSViews -- why isn't this recommended?


  • Subject: Re: Layering NSViews -- why isn't this recommended?
  • From: Brian Hill <email@hidden>
  • Date: Wed, 6 Jun 2001 23:17:43 -0500

On Wednesday, June 6, 2001, at 10:29 PM, Michael P. Rogers wrote:

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?

I'm not sure specifically why it's not recommended, but it might be better to create a NSView subclass as a 'container' that used NSImageCell classes to draw the cards.

The Sketch example source code has one way to manage dragging things around inside a view.

Brian

email@hidden http://personalpages.tds.net/~brian_hill

"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman



References: 
 >Layering NSViews -- why isn't this recommended? (From: "Michael P. Rogers" <email@hidden>)

  • Prev by Date: Layering NSViews -- why isn't this recommended?
  • Next by Date: Re: Dereferencing Pointers in Debugger?
  • Previous by thread: Layering NSViews -- why isn't this recommended?
  • Next by thread: Re: Layering NSViews -- why isn't this recommended?
  • Index(es):
    • Date
    • Thread