Hi Wolfgang,
Wolfgang Lux wrote:
So perhaps the mistake here (apart from not type in the decodeValueOfObjCType
call) was that _highlightsByMask and _altStateMask attributes were changed from
unsigned int to NSInteger rather than NSUInteger? Although, admittedly, the
real mistake was that those fields were unsigned ints in the first place, given
that the corresponding methods always used to have (signed) int arguments and
results (at least since the OpenStep era).
that's an alternative approach then.
If we check this commit:
https://github.com/gnustep/libs-gui/commit/8ad4aa86c4f875d3b81dd67c78039b5c03b357cc#diff-fc96130d9804d445491ac5062baeb96a7f4a5217f44fb1f1fdccd645dcef6bbe
the bug was introduced years ago when Fred changed "unsigned int" di
NSInteger masks (at least, concerning the signedness difference, not the
32bit vs 64bit encoding). So I tried to do some historic research
http://mirror.informatimago.com/next/developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSButtonCell.html#//apple_ref/doc/uid/20000093/CJBDHAFA
here we see:
- (|void|)|setKeyEquivalentModifierMask:|(|unsigned int|)/mask
//- (|void|)|setShowsStateBy:|(|int|)/aType
////- (|void|)|setHighlightsBy:|(|int|)/aType
/// This shows an unsigned mask, integer types: Fred surely just fixed
our method signatures by looking at Apple's doc, which is equivalent to
old OpenStep stuff:
http://www.gnustep.org/resources/OpenStepSpec/ApplicationKit/Classes/NSButtonCell.html
So.. our Gorm format is "wrong" since ever.
Apple in the meanwhile made types of state and hightlight with an enum
type NSCellStyleMask
Riccardo