• 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: problem with NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with NSMatrix


  • Subject: Re: problem with NSMatrix
  • From: "Erik M. Buck" <email@hidden>
  • Date: Sat, 6 Apr 2002 12:03:10 -0600

----- Original Message -----
From: "joie" <email@hidden>
> well, setting a custom cell class in IB wouldn't help, as at my
> program's start, since there are a variable number of cells, i must set
> it programatically- i only threw in the setCellClass: to illustrate that
> I was using a custom NSButtonCell subclass...
> I can't remove all the cells and respawn them, either, as this is a
> level editor for a tile-based RPG, and to lose all one's work just
> because one mis-sized the map would be quite frustrating.

You should not be storing your game's state in cells. Cells are part of a
view in the model-view-controller paradigm. You need a model that stores
game information. The fact that you use cells or a custom view or text to a
terminal should not matter to the model. Besides, if you are creating the
matrix programmatically then there is no problem. Set the cell class BEFORE
you populate the matrix with cells.

See http://www.stepwise.com/Articles/Technical/NSCell.html which
coincidentally describes using cells in a game's map editor.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: problem with NSMatrix
      • From: Markus Hitter <email@hidden>
    • Re: problem with NSMatrix
      • From: joie <email@hidden>
References: 
 >Re: problem with NSMatrix (From: joie <email@hidden>)

  • Prev by Date: Re: problem with NSMatrix
  • Next by Date: Re: Launching Applications via Cocoa Events, AppleScript?
  • Previous by thread: Re: problem with NSMatrix
  • Next by thread: Re: problem with NSMatrix
  • Index(es):
    • Date
    • Thread