> Am 05.01.2021 um 01:28 schrieb Riccardo Mottola <riccardo.mott...@libero.it>:
> 
> 
> Fred Kiefer wrote:
>> thank you for pointing out this issue. As I don’t have a Bigendian 64 bit 
>> system you will have to do the testing to pin this down. First I would 
>> propose that you add a few NSLog statements in NSButtonCell.m after line 
>> 1773. Most likely the data is not aligned in the unsigned int in the way the 
>> code expects it to be. The structure _GSButtonCellFlags is defined in 
>> GSCodingFlags.h and the code expects it to have 32 bits.
> 
> for a moment, I thought the "state" could not be correct: since not only 
> buttons (but let's not forget also popupmenus and some fields) do not display 
> correctly, but even if I change the state by clicking they don't correct, so 
> it is not only an init problem of the state.
> 
> I put some NSLogs in NSCell.m in setState: and the state is correctly set and 
> toggled.
> 
> I then put my attention in drawInteriorWithFrame of NSButtonCell
> 
> line 1094, after the mask is calculated, do you expect it to be always 0, 
> both for on and off state? It is always 0 for me.

As you can see a few lines above the value of mask depends on 
_cell.is_highlighted and _cell.state. You should output these two values as 
well. Next it could be either _highlightsByMask or _showAltStateMask. Sou you 
need to check these values as well. If they are zero you should go back to the 
decoding method and see wether these values get decoded correctly. The best way 
to check is to do the same on a 32 bit or 64 little endian system and compare 
the results. Form files should decode the same for both systems.

Hope this helps,
Fred

Reply via email to