• 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: best way to implement a clickable grid?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best way to implement a clickable grid?


  • Subject: Re: best way to implement a clickable grid?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 14 Sep 2015 17:35:33 -0700

I would probably just implement it as a custom NSView. Then it doesn’t even have to be represented in memory as a grid; you just remember the level for each x coord and fill in the appropriate squares when drawing.

> Or is there a better way to handle click events on a simple NSView?

Just override mouseDown:, mouseDragged:, mouseUp:. You’ll have to convert the event coords from window to view coords.

—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


  • Follow-Ups:
    • Re: best way to implement a clickable grid?
      • From: Uli Kusterer <email@hidden>
References: 
 >best way to implement a clickable grid? (From: "Patrick J. Collins" <email@hidden>)

  • Prev by Date: best way to implement a clickable grid?
  • Next by Date: Re: best way to implement a clickable grid?
  • Previous by thread: best way to implement a clickable grid?
  • Next by thread: Re: best way to implement a clickable grid?
  • Index(es):
    • Date
    • Thread