In trying to get my head around some design patterns for cocoa, I thought about the game of life (eg http://www.bitstorm.org/ gameoflife/) . This is where you have a grid of cells, and dependant on the number of live cells around a given cell it dies, comes to life, or remains unchanged.

In an object model I could see a grid of cells which all keep a track of the number of "live" neighbours based on messages it receives from them about whether they have become alive or have died. In the event that a message from a neighbour cell triggers a state change of the cell (ie it comes to life or dies) it in turn would send out messages to all it's neighbours about it's state change and they in turn would adjust their counts and subsequently come to life or die.

Putting aside for now whether this is the right way to implement, my question is how are messages processed? What is the maximum stack depth for number of recursive messages? How is this affected by the introduction of 64bit frameworks? Is there a way to see the current stack depth auto-magically? What happens in the event of the message handling stack becoming full and is there a way to deal with this event?

Thanks

Richard
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to