Discussion:
Refresh issue
Cees de Groot
2006-07-19 15:18:01 UTC
Permalink
Hi,

I have a notebook with two similar, but not same, tabs:

WxPanel subclass+WxBoxSizer
WxSplitterWindow
DGVFileListCtrl
DGVDcEditorWidget

DGVFileListCtrl inherits from DGVListCtrl which inherits from WxListCtrl
DGVDcEditorWidget inherits from WxPanel

Here's the code that creates this tab:
createView
| sizer labels |
sizer := WxFlexGridSizer
cols: 2
vgap: 5
hgap: 10.
sizer addGrowableCol: 2.
labels := DGVDublinCore dcAttributeDescriptions.
DGVDublinCore dcAttributeNames do:
[:each |
self
createRowForAspect: each
label: (labels at: each)
grid: sizer
panel: self].
#(#publisher #date #identifier) do: [:each |
(self findWindowByName: (self fieldNameFor: each))
setEditable: false;
setBackgroundColour: WxColour lightGrey].
self setSizer: sizer

The other tab is simpler:
WxPanel subclass+WxBoxSizer
DGVUserListCtrl

DGVUserListCtrl inherits from DGVListCtrl which inherits from WxListCtrl

Code is simpler too:
createView
| sizer |

listctrl _ DGVUserListCtrl parent: self.
listctrl on: self changeSelected: #selectedUser:.

sizer := WxBoxSizer orientation: wxHorizontal.
sizer add: listctrl proportion: 1 flags: wxExpand | wxAll border: 0.
self setSizer: sizer.


Both are put into the notebook inside a WxPanel+WxBoxSizer to put a border
around the component. That's generic code in the class that deals with
deciding what tab gets what component.

The problem: the simple tab refreshes perfectly. The 'complex' tab only
refreshes the bottom comonent (the DGVDcEditorWidget), not the top
component (the DGVFileListCtrl).

I'm not sure that this has anything to do with the 'virtual' problem I
described in my previous mail, but it's certainly funny (code available on
request - with SqueakSource's performance I'm hesitant to publish there
willy-nilly).
Cees de Groot
2006-07-19 15:18:01 UTC
Permalink
[...](code available on request - with SqueakSource's performance I'm
hesitant to publish there willy-nilly).
I refactored the lists into pluggable lists etcetera, and after further
cleanups all refresh problems are gone. So, sorry, no code :)

Loading...