• 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: Advice on building a complex user custom control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice on building a complex user custom control


  • Subject: Re: Advice on building a complex user custom control
  • From: Benjamin Stiglitz <email@hidden>
  • Date: Tue, 3 Mar 2009 10:22:13 -0500
  • Mail-followup-to: email@hidden

> I'm working on a small game engine, and as such, I want to create a
> level editor for the game. I love the old style Doom level editors, so
> that's what I'm going for [1]. Notice in that screenshot the amount
> the user can interact with - moving vertices on the grid, creating
> lines between vertices, adding/removing objects, etc.
>
> At the moment, I have a main MapView control, which creates vertices
> in an NSArrayController. I have 2 ways of viewing these vertices - one
> is to handle rendering them directly in the MapView, and another
> approach creates a new VertexView for each vertex, and adds it as a
> subview of the MapView. From what I've read online, this is not going
> to scale beyond maybe 50 vertices, so I don't think this is an
> approach. However, handling *everything* in the MapView itself feels
> like it drastically reduces the cohesion of the control.

You can handle everything in one view while still breaking up the
handling. For instance, you can have Vertex objects which handle events,
passed to them by the MapView, when they are selected. Having one view
doesn’t require you to handle all the input in one place—your view just
becomes a dispatcher.

My 2¢.

-Ben
_______________________________________________

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: 
 >Advice on building a complex user custom control (From: Oliver Charles <email@hidden>)

  • Prev by Date: Re: Code Signing for Dummies
  • Next by Date: Re: Changing NSTableView cell immediately before editing
  • Previous by thread: Re: Advice on building a complex user custom control
  • Next by thread: Re: Does CGImageSourceCreateThumbnailAtIndex max out at 5000 pixels?
  • Index(es):
    • Date
    • Thread