Re: Object change to NSView update

2008-08-25 Thread Paul Bruneau
On Aug 22, 2008, at 9:44 PM, Graham Cox wrote: Keep all of the tree stuff in your data model. When you need to refresh any given item, flag that to your parent item, which flags that to its parent item and so on back to the root. The root object could have one or more controllers which in t

Re: Object change to NSView update

2008-08-22 Thread Graham Cox
On 23 Aug 2008, at 3:21 am, Paul Bruneau wrote: But I do like your suggestion because it is a way that I might come up with, but I'm nervous that it isn't the Right Way. Well, it's not The Right Way™ as written because each object is shown to have a ref to a view, which you definitely don

Re: Object change to NSView update

2008-08-22 Thread Ken Thomases
On Aug 22, 2008, at 12:18 PM, Paul Bruneau wrote: Yes I think we agree on that part! The problem I am trying to communicate is where do I learn to make my model changes go through a controller, and how do I teach this controller to know to update the other views? As I said, I think I could

Re: Object change to NSView update

2008-08-22 Thread Paul Bruneau
On Aug 22, 2008, at 11:19 AM, Graham Cox wrote: On 23 Aug 2008, at 12:58 am, Paul Bruneau wrote: I think I could maybe (maybe!) figure out how do this for the order (the table's selection), but I am totally lost as to how I would do it for the order's great-grandchildren order steps. Dat

Re: Object change to NSView update

2008-08-22 Thread Paul Bruneau
On Aug 22, 2008, at 12:09 PM, Kyle Sluder wrote: On Fri, Aug 22, 2008 at 10:58 AM, Paul Bruneau <[EMAIL PROTECTED]> wrote: I am forcing the view to update after a change to one of the order step objects in what I am sure is The Wrong Way™ by basically chucking setNeedsDisplay into areas of my

Re: Object change to NSView update

2008-08-22 Thread Kyle Sluder
On Fri, Aug 22, 2008 at 10:58 AM, Paul Bruneau <[EMAIL PROTECTED]> wrote: > I am forcing the view to update after a change to one of the order step > objects in what I am sure is The Wrong Way™ by basically chucking > setNeedsDisplay into areas of my code such as the contextual menu handling > code

Re: Object change to NSView update

2008-08-22 Thread Paul Bruneau
On Aug 22, 2008, at 11:09 AM, Jonathan del Strother wrote: How about having the object post an NSNotification whenever it's changed? Your controller can observe the notification & call setNeedsDisplay accordingly. If you're posting a lot of notifications at the same time, you might look at coal

Re: Object change to NSView update

2008-08-22 Thread Graham Cox
On 23 Aug 2008, at 12:58 am, Paul Bruneau wrote: I think I could maybe (maybe!) figure out how do this for the order (the table's selection), but I am totally lost as to how I would do it for the order's great-grandchildren order steps. Data structure? Does an order keep a list of its ch

Re: Object change to NSView update

2008-08-22 Thread Jonathan del Strother
On Fri, Aug 22, 2008 at 3:58 PM, Paul Bruneau <[EMAIL PROTECTED]> wrote: > I feel I can nearly grasp what I need to do, but not quite. I know what I > shouldn't be doing--which is what I am doing and I feel I'm a little in the > weeds. I seek a nudge in the right direction if someone can help. > >

Object change to NSView update

2008-08-22 Thread Paul Bruneau
I feel I can nearly grasp what I need to do, but not quite. I know what I shouldn't be doing--which is what I am doing and I feel I'm a little in the weeds. I seek a nudge in the right direction if someone can help. I have a master-detail setup with a normal table displaying a list of ord