Re: Dynamic Method Creation
Re: Dynamic Method Creation
- Subject: Re: Dynamic Method Creation
- From: Kyle Sluder <email@hidden>
- Date: Sat, 15 Sep 2012 02:02:31 -0700
On Sep 14, 2012, at 10:49 PM, Steve Steinitz <email@hidden> wrote:
> Hi Ken,
>
> Thanks for your quick reply.
>
> On 15 Sep 12, at 3:16pm, Ken Thomases wrote:
>
>> No offense, but this seems like a terrible design. And your KVO hack method screams of papering over a bug.
>
> No offense but none of your criticisms seem to hold water. I might address them individually after I see if anyone can offer any help with my actual question, rather than cluttering the thread now.
Ken is right.
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.
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.
--Kyle Sluder
_______________________________________________
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