[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-users] Puzzled newbie question
From: |
Guillaume Schmid |
Subject: |
[paragui-users] Puzzled newbie question |
Date: |
29 Apr 2002 21:55:05 +0200 |
Hello,
I discovered paragui recently and I think that it is exactly what I
need: a cool portable widget set. I just started to code my first tiny
app and have a small problem.
Might some enlightened soul bring some light on the subject ?
Here it is:
The app is a simple image viewer with (for the moment) one listbox on
the left and some space to display the picture on the right.
The listbox displays the list of files on the current dir. If a
directory is selected, it does update itself with the new content.
I created a FileListBox that inherit from the PG_ListBox and redefine
the eventSelectedItem method to update the list of widget.
It does segfault. After diving into the sources I anderstood that it is
because of the following call sequence:
1 ListBoxItem call seelectedItem on it's parent in Select.
2 the parent delete the list of widget and create a new one.
3 ListboxItem calls Update in Select... Ooops, it does not exist any
more -> segfault.
A first hack was to redefine ListboxItem::eventMouseButtonUp to just
simply call the SelecteItem on the parent without updating itself.
But it does not work because the Select Item call also Update on the
child. So, another hack would be to redefine this method as well.
But it seems a lot of hacks for such a simple task so there might be a
better way to do it.
So,here are my 2 questions:
1 - How to do better ?
2 - Why is the Update method called twice if I select an item (once in
ListBoxBaseItem::Select and once in ListBox::SelectItem).
Thank you very mutch for your attention.
Guillaume.
- [paragui-users] Puzzled newbie question,
Guillaume Schmid <=
- Re: [paragui-users] Puzzled newbie question, Alexander Pipelka, 2002/04/28
- Re: [paragui-users] Puzzled newbie question, Guillaume Schmid, 2002/04/28
- Re: [paragui-users] Puzzled newbie question, Guillaume Schmid, 2002/04/29
- Re: [paragui-users] Puzzled newbie question, Alexander Pipelka, 2002/04/29
- Re: [paragui-users] Puzzled newbie question, Andrew Agno, 2002/04/29
- Re: [paragui-users] Puzzled newbie question, Andrew Ford, 2002/04/29
- Re: [paragui-users] Puzzled newbie question, Guillaume Schmid, 2002/04/29
- Re: [paragui-users] Puzzled newbie question, Guillaume Schmid, 2002/04/29
- Re: [paragui-users] Puzzled newbie question, Alexander Pipelka, 2002/04/29
- Re: [paragui-users] Puzzled newbie question, Guillaume Schmid, 2002/04/29