[Top][All Lists]

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

Some bugs in NSOutlineView

From: Ivan Vučica
Subject: Some bugs in NSOutlineView
Date: Mon, 2 Mar 2015 23:47:03 +0000


I've started writing an email similar to this one over two years ago (!) when I was writing an OPML editor.

I've recently decided to check on what's its state under GNUstep. It's in a state similar to what I left it in: buggy.

So what breaks under GNUstep? Apparently, gnustep-gui's implementation of NSOutlineView. :-)

1. If two rows have the same content, opening one by clicking on the triangle will open the other one as well.

* Different NSXMLElements that happen to have attributes with same string *value* also return the same *pointer*. Which by itself this would be fine, and is probably not a bug by itself. However, outline view seems to differentiate its rows by the object value!
* The user sets the value of first row to "abcd" which results in -outlineView:setObjectValue:forTableColumn:byItem: being called.
* -...setObjectValue:... calls [[element attributeForName:@"text"] setStringValue:object];, where object = 0x12345 (for example).
* The user sets the value of second row to "abcd" which results in -outlineView:setObjectValue:forTableColumn:byItem: being called.
* -...setObjectValue:... calls [[element attributeForName:@"text"] setStringValue:object];, where object = 0x23456 (for example).

* So I have -outlineView:objectValueForTableColumn:byItem: which returns [[element attributeForName:@"text"] stringValue];.
* This results in 0xABCDEF being returned for both the first and the second row.
* If I click on the triangle next to first row, the second row gets opened as well.

The mentioned method implementations are in OPMLOutline+ViewRelated.m.

2. Upon first doubleclick on a row to begin editing it, the input field appears, but is not editable.

* Click on + on toolbar to add a row (or press + on the keyboard).
* Doubleclick on the newly added empty row.
* Try typing and observe nothing is visible. Click elsewhere.
* The text may or may not actually appear in the outline itself (!!!). Thus, please observe the inspector, where the text appeared in the 'text' attribute.
* Doubleclick on the same row.
* Try typing again. This now works.

It's interesting that opening an existing OPML file (try example.opml that comes with the source code) displays the contents just fine.

Anyone interested in taking a look? The app worked just fine on OS X when I was last working on it (except, if I remember correctly, undos which were probably broken).

reply via email to

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