bugGNUstep - Bugs: bug #20884, NSCell issue


You are not allowed to post comments on this tracker with your current authentication level.

bug #20884: NSCell issue

Submitted by:  Enrico Sersale <esersale>
Submitted on:  Fri 24 Aug 2007 10:04:23 AM UTC  
Category:  Gui/AppKit Severity:  4 - Important
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  Fred Kiefer <FredKiefer>
Open/Closed:  Closed

( Jump to the original submission)

Sat 01 Sep 2007 09:16:25 PM UTC, comment #6: 

Should be fixed in SVN

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue 28 Aug 2007 04:59:09 PM UTC, comment #5: 

Back at my computer it was easy to find out what caused this trouble, fixing it will be a bit harder.

First: It was all my fault and I want to appologize for it. When changing the values for the NSEvent constants I did not notice that the event masks are not just used in codee, but may also end up in Gorm files as _action_mask for cells.
Of course what is needed is to change values stored in Gorm files into the new ones. There will be a problem with Gorm files created over the last three weeks this will need to be re-created.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue 28 Aug 2007 09:55:53 AM UTC, comment #4: 

The "full application code" is simply GWorkspace! The gorm file is in GWorkspace/Resources/English.lproj/IconsPref.gorm and the implementation of the owner is in GWorkspace/Preferences/IconsPref.m.
But, as I said, this is only an example, because all the code using checkboxes is affected.
My impression is that the action method of the target is called before setting the cell state...

Enrico Sersale <esersale>
Project Member
Mon 27 Aug 2007 06:06:18 PM UTC, comment #3: 

Sorry, but I was hoping to get the full application code from you. With that it should be rather simple to see, where the problem comes from.
During the last month there have been only a few changes to NSCell and NSButtonCell or other files that could affect the behaviour here (eg changes to constants). I cannot see any connection between any of these changes and the behaviour you are get.
This means I will need to test the behaviour I get as soon as I am back to my computer. And I wouldn't be surprised to find things still working for me. Then the only way ahead is to test your original code. You could speed up things a lot be sending this code, or at least a stripped down version of it.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Mon 27 Aug 2007 10:17:13 AM UTC, comment #2: 

Regarding the last known good state, as I said, I can't be more precise because I was on vacation. The only thing I can say is that till one month ago it surely worked as expected.

The checkbox is in an old gorm file of the GWorkspace preferences, that is, GWorkspace/Resources/English.lproj/IconsPref.gorm, but all the gorm files that use checkbox NSButtons are affected.

The full code hasn't anything different from the example I've already posted but... here it is:

- (IBAction)setUnsetThumbnails:(id)sender
  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  int state = [sender state];

  [defaults setBool: ((state == NSOnState) ? YES : NO)
             forKey: @"usesthumbnails"];
  [defaults synchronize]; 


  [gw setUsesThumbnails: (state == NSOnState)];

Enrico Sersale <esersale>
Project Member
Sun 26 Aug 2007 08:24:17 PM UTC, comment #1: 

Could you please give more information. Which was the last known good state you refere to? And how is the checkbox created, in code or via a Gorm or NIB file? It would help if you add full code to reproduce this problem.

In the changes of last month I couldn't find an obvious candidate for a change that might have cause any change in this behaviour.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Fri 24 Aug 2007 10:04:23 AM UTC, original submission:  

If you create a check box NSButton, this code:

- (IBAction)buttonAction:(id)sender
  NSLog(@"%@", ([sender state] == NSOnState) ? @"ON" : @"OFF");

on OSX will print (as expected):


but, with GNUstep:


This behaviour has appeared a few days ago; I can't be more precise because I was on vacation.

Enrico Sersale <esersale>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by esersale (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-01-22 FredKiefer Open/ClosedIn Test => Closed
    2007-09-01 FredKiefer StatusConfirmed => Fixed
        Open/ClosedOpen => In Test
    2007-08-28 FredKiefer StatusNone => Confirmed
    2007-08-26 FredKiefer Severity5 - Blocker => 4 - Important
        Item GroupNone => Bug
        Assigned toNone => FredKiefer

    Back to the top

    Powered by Savane 3.5