Skip navigation.
 
mlRe: NSTableView and End Editing notifications
FROM : Paul Verity
DATE : Thu Aug 03 21:31:37 2006

Thanks. I have to admit that this wasn't evident to me. I do appreciate that
things happen in a certain order, but I'm still trying to understand the
concepts and sequences of events that take place in Cocoa GUI's; it's quite 
a learning curve at the moment coming from a C++/MFC background (and
notifications are somewhat different in MFC!) I tried placing breakpoints
strategically through the code to see at what point the row selection
changes; ie, before or after I received the notification - but it seemed I
was receiving the notification before the change in selection so could still
influence what would happen next. I guess that was the source of confusion.

Paul


>From: Matt Neuburg <<email_removed>>
>To: Paul Verity <paul.<email_removed>>
>CC: <<email_removed>>
>Subject: Re: NSTableView and End Editing notifications
>Date: Thu, 03 Aug 2006 11:47:33 -0700
>
>On Thu, 03 Aug 2006 19:36:51 +0100, "Paul Verity"
><paul.<email_removed>> said:
> >Thanks Matt.
> >
> >My first point of call was the archives, and I did manage to find several
> >solutions to problem of ending editing - in much the same way as the way
> >your references suggest, but none answered the question as to why I can't
>do
> >this using notifications
>
>But the answer is evident in the code. Look at how the solution that works,
>works. It changes the notification! So clearly the reason you can't do this
>using a notification to some external party is that the notification to
>some
>external party arrives too late. Things happen in some order. You want to
>interfere *before* the editing completely ends, while you still have a
>chance to influence what happens as Cocoa's behavior completes. Only the
>subclassing approach permits this. m.
>
> >
> >>From: Matt Neuburg <<email_removed>>
> >>To: Paul Verity <paul.<email_removed>>
> >>CC: <<email_removed>>
> >>Subject: Re: NSTableView and End Editing notifications
> >>Date: Thu, 03 Aug 2006 11:17:09 -0700
> >>
> >>On Thu, 03 Aug 2006 14:58:22 +0100, "Paul Verity"
> >><paul.<email_removed>> said:
> >> >As a newbie I'm trying to get my head around the Cocoa API so I can
> >>develop
> >> >a GUI; I have a TableView and a button that will add new records to
>the
> >> >table each time it's clicked. I can edit the values in the table view,
> >>but I
> >> >don't want the next row in the view to be automatically selected when
>I
> >>end
> >> >editing (hit Return).
> >>
> >>But this is a very very very FAQ, so why not start by checking the
> >>archives?
> >>They are at:
> >>
> >><http://www.cocoabuilder.com>
> >>
> >>A very good answer has been given again and again over the years:
> >>
> >><http://www.cocoabuilder.com/archive/message/cocoa/2002/2/2/68164>
> >><http://www.cocoabuilder.com/archive/message/cocoa/2003/5/23/81326>
> >><http://www.cocoabuilder.com/archive/message/cocoa/2005/2/4/127554>
> >>
> >>m.
> >>
> >>--
> >>matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
> >>A fool + a tool + an autorelease pool = cool!
> >>AppleScript: the Definitive Guide - Second Edition!
> >><http://www.amazon.com/gp/product/0596102119>
> >>
> >>
> >>
> >
> >_________________________________________________________________
> >Be the first to hear what's new at MSN - sign up to our free newsletters!
> >http://www.msn.co.uk/newsletters
> >
> >
> >
> >
>
>--
>matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
>A fool + a tool + an autorelease pool = cool!
>AppleScript: the Definitive Guide - Second Edition!
><http://www.amazon.com/gp/product/0596102119>
>
>
>


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Related mailsAuthorDate
mlNSTableView and End Editing notifications Paul Verity Aug 3, 15:58
mlRe: NSTableView and End Editing notifications Nick Zitzmann Aug 3, 18:43
mlRe: NSTableView and End Editing notifications Matt Neuburg Aug 3, 20:17
mlRe: NSTableView and End Editing notifications Paul Verity Aug 3, 20:36
mlRe: NSTableView and End Editing notifications Matt Neuburg Aug 3, 20:47
mlRe: NSTableView and End Editing notifications Nick Zitzmann Aug 3, 20:56
mlRe: NSTableView and End Editing notifications Paul Verity Aug 3, 21:31