bugGNUstep - Bugs: bug #34760, gnustep has problems with...

Group
 
 

bug #34760: gnustep has problems with bindings+nscolor+valuetransformer+(un)archiver

Submitter:  julian <julian_>
Submitted:  Sun 06 Nov 2011 09:04:11 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 08 Nov 2011 12:43:38 PM UTC, comment #4: 

thanks i can confirm the remaining glitch when there is no default value specified is gone too.

julian <julian_>
Mon 07 Nov 2011 08:58:18 PM UTC, comment #3: 

We were using @"" as the default null placeholder. I removed this code, as I cannot remember why I added it in the first place.

Fred Kiefer <FredKiefer>
Group Member
Mon 07 Nov 2011 05:24:22 PM UTC, comment #2: 

thanks i can confirm it works fine now (sample and real app). i can also confirm gnustep trunk is now 1000% percent better for porting from cocoa than trunk from 2 months ago ;)


there is one small glitch left. if you uncomment the lines in +initialize to set a standard default (and remove any leftover defaults from the defaults file) loading the xib file crashes - sorry the message is in the png, no copy and paste over VNC.


julian <julian_>
Mon 07 Nov 2011 03:47:34 PM UTC, comment #1: 

This problem was caused by two independent issues. In base we used NSKeyedArchiver for the NSUnarchiveFromDataTransformer, we even had a fixme in place,as we weren't sure which sort of archiver should be used. Replacing this with an NSArchiver solved the first issue.

The second one was in gui. Here NSColerWell is a little bit special as it is one of the few NSControl subclasses that don't use a cell. Therefore we should have implemented all the object value methods on that class, but had forgotten to do so. The value binding was still working, somewhat, as we actually have a cell, to store the highlighted state. But this cell never learned about the colour change.

Please give this another try. You may have to remove any stored values for the colour from your default file.

Fred Kiefer <FredKiefer>
Group Member
Sun 06 Nov 2011 09:04:11 PM UTC, original submission:  

hello again

attached is a very simple test application.

it has
1.) a nscolorwell that has its value bound to the standard user defaults key "color". it uses the value transformer "NSUnarchiveFromData" because you can't store a NSColor directly into the standard user defaults
2.) when a button is pressed the app tries to decode the value using nsunarchiver

something here is not working under gnustep, the nscolorwell doesn't initially show the default color (red) and clicking on the button doesn't print out the color. the interesting thing is that the very same code sequences are crashing in my full app (nsunarchiver throwing an exception that the data doesn't begin with archive) and just not working in this sample app.


julian <julian_>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24314:  gnustepbug.tar.gz added by julian_ (107KiB - application/x-gzip)

 

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 julian_ (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-08 FredKiefer StatusReady For Test Fixed
        Open/ClosedIn Test Closed
    2011-11-07 julian_ Attached File- Added Bildschirmfoto 2011-11-07 um 18.06.54.png, #24323
    2011-11-07 FredKiefer CategoryNone Gui/AppKit
        Item GroupNone Bug
        StatusNone Ready For Test
        Assigned toNone FredKiefer
        Open/ClosedOpen In Test
    2011-11-06 julian_ Attached File- Added gnustepbug.tar.gz, #24314

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code