• 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: Superview and Subview Implementation Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Superview and Subview Implementation Question


  • Subject: Re: Superview and Subview Implementation Question
  • From: Kip Nicol <email@hidden>
  • Date: Fri, 9 May 2008 11:50:16 -0700

Awesome, thanks for the feedback. It's most helpful!

For cell selection, I want to be able to select multiple cells from multiple subviews during one drag. For example, if you click and drag from one cell in one subview to another cell in another subview, all the cells within the dragged rectangle will be selected. It sounds like for this to work, I'm going to have to move the selecting cells control code up to the root view as well. What do you think?

Kip

On May 9, 2008, at 8:08 AM, Jens Alfke wrote:


On 8 May '08, at 7:05 PM, Kip Nicol wrote:

I was wondering if anyone thought that it would be better to implement all of the control code (when subviews are selected, moved, cells selected, etc) solely within the custom superclass? This way sounds like it may be more work up front, but in the long run it may make more sense to do it this way.

It sounds like the subview selection/moving code belongs in either the root view or the subviews, but not both; and the subviews should deal with cell selection. Managing the views and selecting cells sound like different activities.


If you override -hitTest: in the root view, that method can detect clicks in subviews and route them to the root view instead; then the root can manage the selection/moving of the subviews. I've done that in one of my apps.

—Jens

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Superview and Subview Implementation Question (From: Kip Nicol <email@hidden>)
 >Re: Superview and Subview Implementation Question (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: How to send email without using email client
  • Next by Date: NSSound dropouts with Leopard on a G5
  • Previous by thread: Re: Superview and Subview Implementation Question
  • Next by thread: Crashes with NSOpenPanel and garbage collection
  • Index(es):
    • Date
    • Thread