Hi Kyle,

Thanks for your reply.

On 15 Sep 12, at 7:02pm, Kyle Sluder wrote:

> A shift is an object with a known number of instances per employee. You've 
> those instances and splayed out thir properties as methods on the employee.

Yes.  I've "splayed" them because cocoa sometimes throws "cannot remove 
observer..." if you bind a value to x.y.z.   That is bad in a production 
environment because of  the disastrous state in which "cannot remove 
observer..." leaves the app.  So I always make special "binding methods", "xyz" 
which return x.y.z  Its a pain but "cannot remove observer..." is worse.  

Enough on that now please.

> It would be far easier to have a -[Employee shiftForDayOfWeek:] method that 
> returns a Shift instance, and put all your shift-specific properties on that 
> object.

True, and that's exactly what I've done.  You can see the call to that method 
in my Monday methods.

Guys, I'd like to keep this thread focused on Dynamic Method Creation rather 
than my design deficiencies, especially since the thread has actually borne 
fruit in the form of of Jean's helpful technique.  OK?  Perhaps you could rake 
me over the coals off list?

Cheers,

Steve
_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to