discuss-gnustep
[Top][All Lists]
Advanced

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

Re: gui fixes


From: Andreas Höschler
Subject: Re: gui fixes
Date: Fri, 31 Aug 2007 13:27:04 +0200

Hi Fred,


Until this is properly figured out, I have changed the above method
(temporary hack) as follows, since the above caused problems with date
formatters.

- (void)textDidChange: (NSNotification *)aNotification
{
   NSMutableDictionary *dict;

   // validate NSNumbers immediately so that objectValue returns
reasonable values in controlTextDidChange:
   if ([(NSFormatter *)[_cell formatter]
isKindOfClass:[NSNumberFormatter class]])
     {
      [self validateEditing];
     }

    ...
}


Sorry, I am not sure, if I understand this. You surely found a problem
in GNUstep, as we don't call validateEditing for the
attributedStringValue method of NSActionCell. This is easy to add, still
you insist on your completely different change, so you must have a
reason for that.

No, you got me wrong on this. I don't insist on my change and am totally aware that it's an ugly hack. I just needed a quick fix for a problem that was reported tomorrow morning and the above was my hack to solve it for the next couple of hours. This was just to correct my gui fixes list since there was a problem with my quick hack in conjunction with date formatters.

We should try to convert my quick hacks into reasonable solutions, but until this is done the quick hacks might help someone.

Also up to now you didn't complain about a problem in
the drawing code, where your traceback comes from. You should give your
breakpoint another try, validateEditing is surely called more often and
you are looking for another case.

Sorry! Yes, there is another case. I needed to connect from a separate machine to the Mac for controlling the gdb session to catch it. You a right, validateEditing is called from within objectValue.

Breakpoint 1, 0x9313e878 in -[NSControl validateEditing] ()
(gdb) bt
#0  0x9313e878 in -[NSControl validateEditing] ()
#1  0x93155b40 in -[NSActionCell objectValue] ()
#2  0x97dfab40 in _nsNotificationCenterCallBack ()
#3  0x9016847c in _postNotification ()
#4  0x90165b90 in _CFNotificationCenterPostLocalNotification ()
#5  0x97dfab40 in _nsNotificationCenterCallBack ()
#6  0x9016847c in _postNotification ()
#7  0x90165b90 in _CFNotificationCenterPostLocalNotification ()
#8  0x930fd258 in -[NSTextView(NSSharing) didChangeText] ()
#9  0x930dc3dc in -[NSTextView insertText:] ()
#10 0x9312e0c8 in -[NSKeyBindingManager(NSKeyBindingManager_MultiClients) flushTextForClient:] ()
#11 0x930f0620 in -[NSTSMInputContext interpretKeyEvents:] ()
#12 0x93139bb8 in -[NSView interpretKeyEvents:] ()
#13 0x930f0250 in -[NSTextView keyDown:] ()
#14 0x930c1d00 in -[NSWindow sendEvent:] ()

I will give that a try...

I am off now heading for the AlpenStep meeting.

Have a nice trip and a successful discussion with the Etoile guys!

Regards,

  Andreas






reply via email to

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