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

 
 

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

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

Submitted by:  julian <julian_>
Submitted on:  Sun 06 Nov 2011 09:04:11 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

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>
Project MemberIn charge of this item.
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.

(file #24323)

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>
Project MemberIn charge of this item.
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_>

 

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
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by julian_ (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Nov 2011 08:34:36 PM UTCFredKieferStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Mon 07 Nov 2011 05:24:22 PM UTCjulian_Attached File-=>Added Bildschirmfoto 2011-11-07 um 18.06.54.png, #24323
    Mon 07 Nov 2011 03:47:34 PM UTCFredKieferCategoryNone=>Gui/AppKit
      Item GroupNone=>Bug
      StatusNone=>Ready For Test
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>In Test
    Sun 06 Nov 2011 09:04:11 PM UTCjulian_Attached File-=>Added gnustepbug.tar.gz, #24314

    Back to the top


    Powered by Savane 3.1-cleanup1