discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with NSMatrix insertColumn and GS vs Mac difference


From: Fred Kiefer
Subject: Re: problems with NSMatrix insertColumn and GS vs Mac difference
Date: Fri, 14 Aug 2015 14:54:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Am 11.08.2015 um 00:10 schrieb Riccardo Mottola:
> Hi,
> 
> Fred Kiefer ha scritto:
>> Sorry, I was completely wrong in my first reading of the
>> documentation. There is only one small difference between the current
>> GNUstep implementation and Apples. When there are no cells at all in
>> the matrix and you insert a new column or row with a cell array, Cocoa
>> will complain about the size of the array not matching the existing
>> row or column number. Of course this behaviour is stupid, but we
>> probably should adopt to it. Or at least print out a warning message.
> 
> yes, in that regard I think we are "smarter" and apple is stupid.
> However I agree with your.
> This does not explain however that with code that works on Apple (e.g.
> resize to 1 column, insert one column) I get instead  two columns on GS.
> It may still be tied to how an "empty" and a "resized to 1 column but no
> real data" cases are handled.

I tried that on Apple and got two columns. Are your sure you are
actually looking on the column number and not just on what is displayed
by the matrix? The late will depend on whether you resize the cells or not.

I got around to adjust our code in NSMatrix to report a warning message,
if the cell array size does not fit the existing matrix structure when
inserting a new row or column. This can be turned into an exception by
turning on strict mode. I had to adopt a few places in gui to prevent
that message.

Even after switching to this stupid behaviour, we still have differences
to Cocoa. There if you remove a row from an empty matrix, you will end
up with -1 rows and I cannot convince myself that this is sensible
behaviour.

Cheers
Fred



reply via email to

[Prev in Thread] Current Thread [Next in Thread]