Home » Eclipse Projects » Remote Application Platform (RAP) » Popup menu doesn't work on ToolBar in CTabFolder top-right
|
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #92605 is a reply to message #92547] |
Tue, 10 June 2008 21:06 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Enrico,
thanks for the hint. We will look into this and post the results here.
Cheers,
Rüdiger
Enrico Zanaga wrote:
> Hi all,
>
> I've created a ToolBar with only one ToolItem of type SWT.DROP_DOWN,
> then I've set the ToolBar as the top-right component of a CTabFolder
> using setTopRight(...).
>
> In the widgetSelected event of the ToolItem I show a modal popup menu.
>
> When I click on the drop down arrow of ToolItem, the browser (both IE7
> and Firefox2.0) dumps a javascript error.
> It's a bug or there's another method to show popup menu from ToolItem?
>
> I attach the code snippet and the output from IE7 and Firefox2.0
>
> Thanks,
> Enrico
|
|
|
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #92873 is a reply to message #92547] |
Wed, 11 June 2008 15:31 |
Eclipse User |
|
|
|
Originally posted by: ifurnadjiev.innoopract.com
Hi Enrico,
first of all I can't find these too classes WFToolBar/WFToolItem, that's
why I reworked your snippet based on ToolBar/ToolItem (see the snippet
bellow). Hope that it's working for you.
final ToolBar tftb = new ToolBar(tf, SWT.HORIZONTAL | SWT.FLAT);
tf.setTopRight(tftb);
final ToolItem tfti1 = new ToolItem(tftb, SWT.DROP_DOWN);
tfti1.setText("Tool");
tfti1.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if( e.detail == SWT.ARROW ) {
Menu m = new Menu( tftb.getShell(), SWT.POP_UP );
MenuItem mi1 = new MenuItem(m, SWT.NONE);
mi1.setText("First");
MenuItem mi2 = new MenuItem(m, SWT.NONE);
mi2.setText("Second");
Point point = new Point( e.x, e.y );
m.setLocation( point );
m.setVisible( true );
}
}
});
Best,
Ivan
Enrico Zanaga wrote:
> Hi all,
>
> I've created a ToolBar with only one ToolItem of type SWT.DROP_DOWN,
> then I've set the ToolBar as the top-right component of a CTabFolder
> using setTopRight(...).
>
> In the widgetSelected event of the ToolItem I show a modal popup menu.
>
> When I click on the drop down arrow of ToolItem, the browser (both IE7
> and Firefox2.0) dumps a javascript error.
> It's a bug or there's another method to show popup menu from ToolItem?
>
> I attach the code snippet and the output from IE7 and Firefox2.0
>
> Thanks,
> Enrico
|
|
|
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #92887 is a reply to message #92873] |
Wed, 11 June 2008 15:54 |
Enrico Zanaga Messages: 50 Registered: July 2009 |
Member |
|
|
Hi Ivan,
sorry, it's my mistake.
However the reworked code doesn't work for me, but it's working for you?
If yes, can you tell me what version (RAP, Eclipse) are you using, please?
I try the code in 1.1M3 and 1.1RC3 without success...
Thanks,
Enrico
Ivan Furnadjiev ha scritto:
> Hi Enrico,
>
> first of all I can't find these too classes WFToolBar/WFToolItem, that's
> why I reworked your snippet based on ToolBar/ToolItem (see the snippet
> bellow). Hope that it's working for you.
>
> final ToolBar tftb = new ToolBar(tf, SWT.HORIZONTAL | SWT.FLAT);
> tf.setTopRight(tftb);
> final ToolItem tfti1 = new ToolItem(tftb, SWT.DROP_DOWN);
> tfti1.setText("Tool");
> tfti1.addSelectionListener(new SelectionAdapter() {
> @Override
> public void widgetSelected(SelectionEvent e) {
> if( e.detail == SWT.ARROW ) {
> Menu m = new Menu( tftb.getShell(), SWT.POP_UP );
> MenuItem mi1 = new MenuItem(m, SWT.NONE);
> mi1.setText("First");
> MenuItem mi2 = new MenuItem(m, SWT.NONE);
> mi2.setText("Second");
> Point point = new Point( e.x, e.y );
> m.setLocation( point );
> m.setVisible( true );
> }
> }
> });
>
> Best,
> Ivan
>
> Enrico Zanaga wrote:
>> Hi all,
>>
>> I've created a ToolBar with only one ToolItem of type SWT.DROP_DOWN,
>> then I've set the ToolBar as the top-right component of a CTabFolder
>> using setTopRight(...).
>>
>> In the widgetSelected event of the ToolItem I show a modal popup menu.
>>
>> When I click on the drop down arrow of ToolItem, the browser (both IE7
>> and Firefox2.0) dumps a javascript error.
>> It's a bug or there's another method to show popup menu from ToolItem?
>>
>> I attach the code snippet and the output from IE7 and Firefox2.0
>>
>> Thanks,
>> Enrico
|
|
|
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #92901 is a reply to message #92887] |
Wed, 11 June 2008 16:19 |
Eclipse User |
|
|
|
Originally posted by: ifurnadjiev.innoopract.com
Hi Enrico,
I run it against 1.1RC3 in FF 2.0.0.14, IE7 and Safari 3.1.1 on Windows
XP SP3.
What kind of problems do you have - JavaScript error? Did you use the
exact snippet from my previous post?
Best,
Ivan
Enrico Zanaga wrote:
> Hi Ivan,
>
> sorry, it's my mistake.
> However the reworked code doesn't work for me, but it's working for you?
> If yes, can you tell me what version (RAP, Eclipse) are you using,
> please?
> I try the code in 1.1M3 and 1.1RC3 without success...
>
> Thanks,
> Enrico
>
>
> Ivan Furnadjiev ha scritto:
>> Hi Enrico,
>>
>> first of all I can't find these too classes WFToolBar/WFToolItem,
>> that's why I reworked your snippet based on ToolBar/ToolItem (see the
>> snippet bellow). Hope that it's working for you.
>>
>> final ToolBar tftb = new ToolBar(tf, SWT.HORIZONTAL | SWT.FLAT);
>> tf.setTopRight(tftb);
>> final ToolItem tfti1 = new ToolItem(tftb, SWT.DROP_DOWN);
>> tfti1.setText("Tool");
>> tfti1.addSelectionListener(new SelectionAdapter() {
>> @Override
>> public void widgetSelected(SelectionEvent e) {
>> if( e.detail == SWT.ARROW ) {
>> Menu m = new Menu( tftb.getShell(), SWT.POP_UP );
>> MenuItem mi1 = new MenuItem(m, SWT.NONE);
>> mi1.setText("First");
>> MenuItem mi2 = new MenuItem(m, SWT.NONE);
>> mi2.setText("Second");
>> Point point = new Point( e.x, e.y );
>> m.setLocation( point );
>> m.setVisible( true );
>> }
>> }
>> });
>>
>> Best,
>> Ivan
>>
>> Enrico Zanaga wrote:
>>> Hi all,
>>>
>>> I've created a ToolBar with only one ToolItem of type SWT.DROP_DOWN,
>>> then I've set the ToolBar as the top-right component of a CTabFolder
>>> using setTopRight(...).
>>>
>>> In the widgetSelected event of the ToolItem I show a modal popup menu.
>>>
>>> When I click on the drop down arrow of ToolItem, the browser (both
>>> IE7 and Firefox2.0) dumps a javascript error.
>>> It's a bug or there's another method to show popup menu from ToolItem?
>>>
>>> I attach the code snippet and the output from IE7 and Firefox2.0
>>>
>>> Thanks,
>>> Enrico
|
|
|
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #92916 is a reply to message #92901] |
Wed, 11 June 2008 16:57 |
Enrico Zanaga Messages: 50 Registered: July 2009 |
Member |
|
|
Hi Ivan,
running your snippet in IE7, I get the following javascript error:
-------------------------------------------------------
Could not evaluate javascript response:
'null' è nullo o non è un oggetto
org.eclipse.swt.EventUtil.suspendEventHandling();var req =
org.eclipse.swt.Request.getInstance();req.setRequestCounter( "3" );var
wm = org.eclipse.swt.WidgetManager.getInstance();wm.dispose( "w15"
);wm.dispose( "w14" );wm.dispose( "w13"
);qx.ui.core.Widget.flushGlobalQueues();org.eclipse.swt.Even tUtil.resumeEventHandling();
-------------------------------------------------------
Maybe a qooxdoo problem?
In Jetty/Eclipse console nothing happen...
Thanks,
Enrico
Ivan Furnadjiev ha scritto:
> Hi Enrico,
>
> I run it against 1.1RC3 in FF 2.0.0.14, IE7 and Safari 3.1.1 on Windows
> XP SP3.
> What kind of problems do you have - JavaScript error? Did you use the
> exact snippet from my previous post?
>
> Best,
> Ivan
>
> Enrico Zanaga wrote:
>> Hi Ivan,
>>
>> sorry, it's my mistake.
>> However the reworked code doesn't work for me, but it's working for you?
>> If yes, can you tell me what version (RAP, Eclipse) are you using,
>> please?
>> I try the code in 1.1M3 and 1.1RC3 without success...
>>
>> Thanks,
>> Enrico
>>
>>
>> Ivan Furnadjiev ha scritto:
>>> Hi Enrico,
>>>
>>> first of all I can't find these too classes WFToolBar/WFToolItem,
>>> that's why I reworked your snippet based on ToolBar/ToolItem (see the
>>> snippet bellow). Hope that it's working for you.
>>>
>>> final ToolBar tftb = new ToolBar(tf, SWT.HORIZONTAL | SWT.FLAT);
>>> tf.setTopRight(tftb);
>>> final ToolItem tfti1 = new ToolItem(tftb, SWT.DROP_DOWN);
>>> tfti1.setText("Tool");
>>> tfti1.addSelectionListener(new SelectionAdapter() {
>>> @Override
>>> public void widgetSelected(SelectionEvent e) {
>>> if( e.detail == SWT.ARROW ) {
>>> Menu m = new Menu( tftb.getShell(), SWT.POP_UP );
>>> MenuItem mi1 = new MenuItem(m, SWT.NONE);
>>> mi1.setText("First");
>>> MenuItem mi2 = new MenuItem(m, SWT.NONE);
>>> mi2.setText("Second");
>>> Point point = new Point( e.x, e.y );
>>> m.setLocation( point );
>>> m.setVisible( true );
>>> }
>>> }
>>> });
>>>
>>> Best,
>>> Ivan
>>>
>>> Enrico Zanaga wrote:
>>>> Hi all,
>>>>
>>>> I've created a ToolBar with only one ToolItem of type SWT.DROP_DOWN,
>>>> then I've set the ToolBar as the top-right component of a CTabFolder
>>>> using setTopRight(...).
>>>>
>>>> In the widgetSelected event of the ToolItem I show a modal popup menu.
>>>>
>>>> When I click on the drop down arrow of ToolItem, the browser (both
>>>> IE7 and Firefox2.0) dumps a javascript error.
>>>> It's a bug or there's another method to show popup menu from ToolItem?
>>>>
>>>> I attach the code snippet and the output from IE7 and Firefox2.0
>>>>
>>>> Thanks,
>>>> Enrico
|
|
|
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #93004 is a reply to message #92916] |
Thu, 12 June 2008 07:07 |
Eclipse User |
|
|
|
Originally posted by: ifurnadjiev.innoopract.com
Hi Enrico,
please attach your complete file to have a look at it.
Thanks,
Ivan
Enrico Zanaga wrote:
> Hi Ivan,
>
> running your snippet in IE7, I get the following javascript error:
>
> -------------------------------------------------------
> Could not evaluate javascript response:
>
> 'null' è nullo o non è un oggetto
>
> org.eclipse.swt.EventUtil.suspendEventHandling();var req =
> org.eclipse.swt.Request.getInstance();req.setRequestCounter( "3" );var
> wm = org.eclipse.swt.WidgetManager.getInstance();wm.dispose( "w15"
> );wm.dispose( "w14" );wm.dispose( "w13"
> );qx.ui.core.Widget.flushGlobalQueues();org.eclipse.swt.Even tUtil.resumeEventHandling();
>
>
> -------------------------------------------------------
>
> Maybe a qooxdoo problem?
>
> In Jetty/Eclipse console nothing happen...
>
> Thanks,
> Enrico
>
>
> Ivan Furnadjiev ha scritto:
>> Hi Enrico,
>>
>> I run it against 1.1RC3 in FF 2.0.0.14, IE7 and Safari 3.1.1 on
>> Windows XP SP3.
>> What kind of problems do you have - JavaScript error? Did you use the
>> exact snippet from my previous post?
>>
>> Best,
>> Ivan
>>
>> Enrico Zanaga wrote:
>>> Hi Ivan,
>>>
>>> sorry, it's my mistake.
>>> However the reworked code doesn't work for me, but it's working for
>>> you?
>>> If yes, can you tell me what version (RAP, Eclipse) are you using,
>>> please?
>>> I try the code in 1.1M3 and 1.1RC3 without success...
>>>
>>> Thanks,
>>> Enrico
>>>
>>>
>>> Ivan Furnadjiev ha scritto:
>>>> Hi Enrico,
>>>>
>>>> first of all I can't find these too classes WFToolBar/WFToolItem,
>>>> that's why I reworked your snippet based on ToolBar/ToolItem (see
>>>> the snippet bellow). Hope that it's working for you.
>>>>
>>>> final ToolBar tftb = new ToolBar(tf, SWT.HORIZONTAL | SWT.FLAT);
>>>> tf.setTopRight(tftb);
>>>> final ToolItem tfti1 = new ToolItem(tftb, SWT.DROP_DOWN);
>>>> tfti1.setText("Tool");
>>>> tfti1.addSelectionListener(new SelectionAdapter() {
>>>> @Override
>>>> public void widgetSelected(SelectionEvent e) {
>>>> if( e.detail == SWT.ARROW ) {
>>>> Menu m = new Menu( tftb.getShell(), SWT.POP_UP );
>>>> MenuItem mi1 = new MenuItem(m, SWT.NONE);
>>>> mi1.setText("First");
>>>> MenuItem mi2 = new MenuItem(m, SWT.NONE);
>>>> mi2.setText("Second");
>>>> Point point = new Point( e.x, e.y );
>>>> m.setLocation( point );
>>>> m.setVisible( true );
>>>> }
>>>> }
>>>> });
>>>>
>>>> Best,
>>>> Ivan
>>>>
>>>> Enrico Zanaga wrote:
>>>>> Hi all,
>>>>>
>>>>> I've created a ToolBar with only one ToolItem of type SWT.DROP_DOWN,
>>>>> then I've set the ToolBar as the top-right component of a CTabFolder
>>>>> using setTopRight(...).
>>>>>
>>>>> In the widgetSelected event of the ToolItem I show a modal popup
>>>>> menu.
>>>>>
>>>>> When I click on the drop down arrow of ToolItem, the browser (both
>>>>> IE7 and Firefox2.0) dumps a javascript error.
>>>>> It's a bug or there's another method to show popup menu from
>>>>> ToolItem?
>>>>>
>>>>> I attach the code snippet and the output from IE7 and Firefox2.0
>>>>>
>>>>> Thanks,
>>>>> Enrico
|
|
| |
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #93045 is a reply to message #93030] |
Thu, 12 June 2008 09:01 |
Eclipse User |
|
|
|
Originally posted by: ifurnadjiev.innoopract.com
This is a multi-part message in MIME format.
--------------040501060704080007080705
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Enrico,
here is the reworked complete code... please test it. You don't need
this in widgetSelected:
---
while (!m.isDisposed() && m.getVisible()) {
if (!d.readAndDispatch())
d.sleep();
}
m.dispose();
---
Hope this will help.
Best,
Ivan
Enrico Zanaga wrote:
> Hi Ivan,
>
> I've attached the class I use to reproduce the problem.
>
> Thanks,
> Enrico
>
>
> Ivan Furnadjiev ha scritto:
>> Hi Enrico,
>>
>> please attach your complete file to have a look at it.
>>
>> Thanks,
>> Ivan
>>
>> Enrico Zanaga wrote:
>>> Hi Ivan,
>>>
>>> running your snippet in IE7, I get the following javascript error:
>>>
>>> -------------------------------------------------------
>>> Could not evaluate javascript response:
>>>
>>> 'null'
|
|
|
Re: Popup menu doesn't work on ToolBar in CTabFolder top-right [message #93105 is a reply to message #93045] |
Thu, 12 June 2008 12:19 |
Enrico Zanaga Messages: 50 Registered: July 2009 |
Member |
|
|
Hi Ivan,
it works! Many thanks!
The code in widgetSelected comes from an old version of SWT, and it
continues to work in SWT 3.3 e 3.4 (RCP mode).
Because my application runs both in RCP and RAP the sources are shared,
except a little compatibility library.
I tested the code in both two modes and it works, so this is the final
solution.
Thanks,
Enrico
Ivan Furnadjiev ha scritto:
> Hi Enrico,
>
> here is the reworked complete code... please test it. You don't need
> this in widgetSelected:
> ---
> while (!m.isDisposed() && m.getVisible()) {
> if (!d.readAndDispatch())
> d.sleep();
> }
> m.dispose();
> ---
>
> Hope this will help.
> Best,
> Ivan
>
>
> Enrico Zanaga wrote:
>> Hi Ivan,
>>
>> I've attached the class I use to reproduce the problem.
>>
>> Thanks,
>> Enrico
>>
>>
>> Ivan Furnadjiev ha scritto:
>>> Hi Enrico,
>>>
>>> please attach your complete file to have a look at it.
>>>
>>> Thanks,
>>> Ivan
>>>
>>> Enrico Zanaga wrote:
>>>> Hi Ivan,
>>>>
>>>> running your snippet in IE7, I get the following javascript error:
>>>>
>>>> -------------------------------------------------------
>>>> Could not evaluate javascript response:
>>>>
>>>> 'null' è nullo o non è un oggetto
>>>>
>>>> org.eclipse.swt.EventUtil.suspendEventHandling();var req =
>>>> org.eclipse.swt.Request.getInstance();req.setRequestCounter( "3"
>>>> );var wm = org.eclipse.swt.WidgetManager.getInstance();wm.dispose(
>>>> "w15" );wm.dispose( "w14" );wm.dispose( "w13"
>>>> );qx.ui.core.Widget.flushGlobalQueues();org.eclipse.swt.Even tUtil.resumeEventHandling();
>>>>
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> Maybe a qooxdoo problem?
>>>>
>>>> In Jetty/Eclipse console nothing happen...
>>>>
>>>> Thanks,
>>>> Enrico
>>>>
>>>>
>>>> Ivan Furnadjiev ha scritto:
>>>>> Hi Enrico,
>>>>>
>>>>> I run it against 1.1RC3 in FF 2.0.0.14, IE7 and Safari 3.1.1 on
>>>>> Windows XP SP3.
>>>>> What kind of problems do you have - JavaScript error? Did you use
>>>>> the exact snippet from my previous post?
>>>>>
>>>>> Best,
>>>>> Ivan
>>>>>
>>>>> Enrico Zanaga wrote:
>>>>>> Hi Ivan,
>>>>>>
>>>>>> sorry, it's my mistake.
>>>>>> However the reworked code doesn't work for me, but it's working
>>>>>> for you?
>>>>>> If yes, can you tell me what version (RAP, Eclipse) are you using,
>>>>>> please?
>>>>>> I try the code in 1.1M3 and 1.1RC3 without success...
>>>>>>
>>>>>> Thanks,
>>>>>> Enrico
>>>>>>
>>>>>>
>>>>>> Ivan Furnadjiev ha scritto:
>>>>>>> Hi Enrico,
>>>>>>>
>>>>>>> first of all I can't find these too classes WFToolBar/WFToolItem,
>>>>>>> that's why I reworked your snippet based on ToolBar/ToolItem (see
>>>>>>> the snippet bellow). Hope that it's working for you.
>>>>>>>
>>>>>>> final ToolBar tftb = new ToolBar(tf, SWT.HORIZONTAL | SWT.FLAT);
>>>>>>> tf.setTopRight(tftb);
>>>>>>> final ToolItem tfti1 = new ToolItem(tftb, SWT.DROP_DOWN);
>>>>>>> tfti1.setText("Tool");
>>>>>>> tfti1.addSelectionListener(new SelectionAdapter() {
>>>>>>> @Override
>>>>>>> public void widgetSelected(SelectionEvent e) {
>>>>>>> if( e.detail == SWT.ARROW ) {
>>>>>>> Menu m = new Menu( tftb.getShell(), SWT.POP_UP );
>>>>>>> MenuItem mi1 = new MenuItem(m, SWT.NONE);
>>>>>>> mi1.setText("First");
>>>>>>> MenuItem mi2 = new MenuItem(m, SWT.NONE);
>>>>>>> mi2.setText("Second");
>>>>>>> Point point = new Point( e.x, e.y );
>>>>>>> m.setLocation( point );
>>>>>>> m.setVisible( true );
>>>>>>> }
>>>>>>> }
>>>>>>> });
>>>>>>>
>>>>>>> Best,
>>>>>>> Ivan
>>>>>>>
>>>>>>> Enrico Zanaga wrote:
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I've created a ToolBar with only one ToolItem of type
>>>>>>>> SWT.DROP_DOWN,
>>>>>>>> then I've set the ToolBar as the top-right component of a
>>>>>>>> CTabFolder
>>>>>>>> using setTopRight(...).
>>>>>>>>
>>>>>>>> In the widgetSelected event of the ToolItem I show a modal popup
>>>>>>>> menu.
>>>>>>>>
>>>>>>>> When I click on the drop down arrow of ToolItem, the browser
>>>>>>>> (both IE7 and Firefox2.0) dumps a javascript error.
>>>>>>>> It's a bug or there's another method to show popup menu from
>>>>>>>> ToolItem?
>>>>>>>>
>>>>>>>> I attach the code snippet and the output from IE7 and Firefox2.0
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Enrico
>>
|
|
|
Goto Forum:
Current Time: Fri Apr 26 14:20:02 GMT 2024
Powered by FUDForum. Page generated in 0.04683 seconds
|