discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSControl question


From: Alexander Malmberg
Subject: Re: NSControl question
Date: Wed, 22 Sep 2004 00:39:46 +0200
User-agent: Mozilla Thunderbird 0.5 (X11/20040306)

Andreas Hoeschler wrote:
[snip]
In the class NSControl we have

- (void) setObjectValue: (id)anObject
{
  NSCell *selected = [self selectedCell];

   [self abortEditing]; // <---------- what is this good for

  [selected setObjectValue: anObject];
  if (![selected isKindOfClass: actionCellClass])
    [self setNeedsDisplay: YES];
}
[snip]
Any idea what this line is good for?

If there's already a field editor and you change the value without doing anything else, the field editor will never learn about the new value; you'll still be displaying and editing the old value. Thus, just removing this call is definitely wrong (and indeed, these methods are explicitly documented to abort editing).

We have similar issues keeping field editors up to date in other situations, though, and I don't think simply aborting editing is the best solution in all cases, so we probably need to do something. Unfortunately, this is a messy part of GNUstep, and I'm not sure what the right thing to do is (eg. in this case, it could simply be that some other method should be calling -set*Value: _before_ setting up the field editor). Cleaning up NSCell is on my TODO list, but it'll be a while before it's done. You might want to file a bug report for this in the mean time.

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]