(Newbie) Multiple views in a Core Data app
(Newbie) Multiple views in a Core Data app
- Subject: (Newbie) Multiple views in a Core Data app
- From: Dennis Lorson <email@hidden>
- Date: Wed, 2 Aug 2006 19:06:07 +0200
Hi,
I'm writing an app which draws rectangles and the likes in a custom
view.
Currently, I'm implementing this with Core Data. This means I have a
NSManagedObject subclass with a few extra methods for drawing (by
means of NSBezierPath) and event handling (based on, and much like
the GraphicsBindings example from mmalc's page).
But I run into problems with this approach when doing dragging of
these objects. I can't really get the redrawing right, and the hit
detection fails when two or more objects overlap.
In short: I want to use a custom NSView for each of these objects,
because I think it's better suited for the job.
But how should I encapsulate these in the NSManagedObject subclass
objects? By encoding them in an NSData stream?
Or should I just generate the NSViews at runtime for each managed
object? This seems more compliant to the MVC ideal, but maybe it
would make the design more "complex"...
Hope I made myself clear a bit,
Dennis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden