tree view removing items

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

tree view removing items

Davorin Mestric
There seems to be a problem with removing items from a tree view.

TreeView method onItem:removedFromParent:

first tries to 'resetSelection' which happens trough the 'onSelRemoved' call
which then calls resetSelection, which sends a TVM_SELECTITEM to the tree
control.

sometimes this message generates a new nmGetDispInfo: message to the class
in a situation where control window still holds this item that is being
removed, but the item is already removed from the model. i copied the
walkback that results at the end of this message.

this 'sometimes' happens when you click on empty space of the tree view in a
row different from tree's current selection.  this click does not change the
selection, but then you get the walkback.

or when you have no selection in the tree view and then click outside an
item, which causes the first visible item to become selected. (it is
important that the newly selected item is not the one that was clicked).

it also happens if you control the tree view with keyboard.  select an item
with up-down arrows, tab to the 'remove' button, and then space to activate
the button which also gives a walkback.

This is in Dolphin 3.06 pl 5.

Davorin



ClientTreeModel(Object)>>errorNotFound:
[] in ClientTreeModel(TreeModel)>>hasChildren:
IdentityDictionary(LookupTable)>>at:ifAbsent:
ClientTreeModel(TreeModel)>>getNodeFor:ifAbsent:
ClientTreeModel(TreeModel)>>hasChildren:
TreeView>>onDisplayDetailsRequired:
TreeView(IconicListAbstract)>>nmGetDispInfo:
TreeView>>nmNotify:
ContainerView(View)>>wmNotify:wParam:lParam:
ContainerView(View)>>dispatchMessage:wParam:lParam:
[] in InputState>>wndProc:message:wParam:lParam:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>callbackEvaluate:
InputState>>wndProc:message:wParam:lParam:
TreeView(ControlView)>>defaultWindowProcessing:wParam:lParam:
TreeView(ControlView)>>wmPaint:wParam:lParam:
TreeView(View)>>dispatchMessage:wParam:lParam:
[] in InputState>>wndProc:message:wParam:lParam:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>callbackEvaluate:
InputState>>wndProc:message:wParam:lParam:
TreeView(ControlView)>>defaultWindowProcessing:wParam:lParam:
TreeView(View)>>dispatchMessage:wParam:lParam:
[] in InputState>>wndProc:message:wParam:lParam:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>callbackEvaluate:
InputState>>wndProc:message:wParam:lParam:
TreeView(View)>>sendMessage:wParam:lParam:
TreeView>>resetSelection
TreeView(IconicListAbstract)>>onSelRemoved
TreeView>>onItem:removedFromParent:
EventMessageSend>>valueWithArguments:
[] in EventsCollection>>triggerEvent:with:with:
EventMessageSequence>>do:
EventsCollection>>triggerEvent:with:with:
ClientTreeModel(Object)>>trigger:with:with:
ClientTreeModel(TreeModel)>>remove:
OrderBooksSelectorDialog>>add
Symbol>>forwardTo:
[] in Command>>value
BlockClosure>>ensure:
Command>>value
OrderBooksSelectorDialog(Shell)>>performCommand:
CommandQuery>>perform
CommandPolicy>>route:
[] in PushButton(View)>>onCommand:
BlockClosure>>ensure:
Cursor>>showWhile:
PushButton(View)>>onCommand:
PushButton>>onActionPerformed


Reply | Threaded
Open this post in threaded view
|

Re: tree view removing items

Blair McGlashan
Davorin

You wrote in message news:9t0kfs$9alv$[hidden email]...
> There seems to be a problem with removing items from a tree view.
>
> TreeView method onItem:removedFromParent:
>
> first tries to 'resetSelection' which happens trough the 'onSelRemoved'
call
> which then calls resetSelection, which sends a TVM_SELECTITEM to the tree
> control.
>
> sometimes this message generates a new nmGetDispInfo: message to the class
> in a situation where control window still holds this item that is being
> removed, but the item is already removed from the model. i copied the
> walkback that results at the end of this message....
> ....
> This is in Dolphin 3.06 pl 5.

I seem to recall that this was fixed in D4, it certainly isn't implemented
in the way you describe any more and TreeView>>onDisplayDetailsRequired:
starts with:

    ...
    "The TreeView sometimes asks for display details for items that are
being removed"
    object := self objectFromHandle: item handle ifAbsent: [^0].
    ...
There may even have been an informally released patch for D3, but you will
have to check the newsgroup archives for that.

Regards

Blair