Tree: strange behaviour [message #451423] |
Tue, 01 March 2005 17:43 |
Ivan Messages: 149 Registered: July 2009 |
Senior Member |
|
|
Hi,
I'm working in a project where I use a Tree to represent data; for each
TreeItem I create, I assign a precise popup Menu to it that appears when I
right-click with the mouse on the TreeItem. I have devoleped this with
Eclipse 3.0.1 and was working good. Now, I have installed Eclipse 3.1.0
and I have encountered a strange problem:
I have the first TreeItem of the Tree (the root) that at the beginning
shows to the user a popup menu to add a new TreeItem; after the user adds
a TreeItem, the root TreeItem shows nomore to the user the popup menu.
Then, if the user deletes the all the TreeItem created (i.e. the only
TreeItem that remains is the root TreeItem again), this root TreeItem does
not show to the user the correct popup menu, but the popup menu
correspondent to the last TreeItem deleted!!
I hope I was clear enough. I tried anything possible but it does not help
to avoid this strange behaviour. When I launch my application using the
old SWT library, everything works perfectly! I am using Windows XP OS.
Can anybody help me?
Thanks,
ivan
|
|
|
Re: strange behaviour [message #451431 is a reply to message #451423] |
Tue, 01 March 2005 22:06 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
Do you have any code showing how you determine the TreeItem that is
associated with the menu to be shown? Is it finding the expected TreeItem?
How do you associate the menu with the TreeItem?
Asides:
Are you creating a menu for each TreeItem or repopulating the same menu
depending on the TreeItem (a menu per TreeItem is quite a lot of menus and
could exhaust resources).
Are you using the MenuDetect event or a Mouse event. Note that handling a
mouse event directly makes your code behave poorly across platforms (not
natively - mouse up (Windows) versus mouse down(GTK)) and also limits
keyboard accessibility (such as Shift+F10).
"Ivan" <zorziivan83@hotmail.com> wrote in message
news:d029jm$pep$1@www.eclipse.org...
> Hi,
>
> I'm working in a project where I use a Tree to represent data; for each
> TreeItem I create, I assign a precise popup Menu to it that appears when I
> right-click with the mouse on the TreeItem. I have devoleped this with
> Eclipse 3.0.1 and was working good. Now, I have installed Eclipse 3.1.0
> and I have encountered a strange problem:
> I have the first TreeItem of the Tree (the root) that at the beginning
> shows to the user a popup menu to add a new TreeItem; after the user adds
> a TreeItem, the root TreeItem shows nomore to the user the popup menu.
> Then, if the user deletes the all the TreeItem created (i.e. the only
> TreeItem that remains is the root TreeItem again), this root TreeItem does
> not show to the user the correct popup menu, but the popup menu
> correspondent to the last TreeItem deleted!!
>
> I hope I was clear enough. I tried anything possible but it does not help
> to avoid this strange behaviour. When I launch my application using the
> old SWT library, everything works perfectly! I am using Windows XP OS.
>
> Can anybody help me?
>
> Thanks,
>
> ivan
>
|
|
|
Powered by
FUDForum. Page generated in 0.04225 seconds