Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TypeError: undefined is not a function
TypeError: undefined is not a function [message #546732] Wed, 14 July 2010 01:25 Go to next message
zhuzekun  is currently offline zhuzekun Friend
Messages: 6
Registered: July 2010
Junior Member
HI,all experts. I want to put a Upload in to the container, the code is like this:
public void createPartControl(Composite parent) {
// TODO Auto-generated method stub

Composite topComp = new Composite(parent, SWT.NONE);
topComp.setLayout(new FillLayout());
upload = new Upload(topComp.getShell(),SWT.NONE,Upload.SHOW_UPLOAD_BUTTON );
upload.setBrowseButtonText("选择文件");

}
but when i run it, it comes like this:
Could not evaluate javascript response:
TypeError: undefined is not a function
i do not know what is going on, can somebody help me? thanks a lot.
Re: TypeError: undefined is not a function [message #546765 is a reply to message #546732] Wed, 14 July 2010 06:57 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi zhuzekun,

which version of RAP, upload widget are you using?

Best,
Ivan

On 07/14/2010 4:25 AM, zhuzekun wrote:
> HI,all experts. I want to put a Upload in to the container, the code
> is like this:
> public void createPartControl(Composite parent) {
> // TODO Auto-generated method stub
>
> Composite topComp = new Composite(parent, SWT.NONE);
> topComp.setLayout(new FillLayout());
> upload = new
> Upload(topComp.getShell(),SWT.NONE,Upload.SHOW_UPLOAD_BUTTON );
> upload.setBrowseButtonText("选择文件");
> }
> but when i run it, it comes like this:
> Could not evaluate javascript response:
> TypeError: undefined is not a function
> i do not know what is going on, can somebody help me? thanks a lot.
Re: TypeError: undefined is not a function [message #546831 is a reply to message #546765] Wed, 14 July 2010 11:34 Go to previous messageGo to next message
zhuzekun  is currently offline zhuzekun Friend
Messages: 6
Registered: July 2010
Junior Member
thanks a lot,Ivan. now, i have get it when i put the Upload in the Dialog class, the source code is like this:
Composite topComp = new Composite(parent, SWT.NONE);
Shell shell = topComp.getShell();
shell.setText("RAP下选择文件");
topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
topComp.setLayout(new GridLayout(2, false));
new Label(topComp, SWT.NONE).setText("WSDL文件地址:");
upload1 = new Upload(topComp, SWT.BORDER, null);
upload1.setBrowseButtonText("文件1");

new Label(topComp, SWT.NONE).setText("WSDL文件地址:");
upload2 = new Upload(topComp, SWT.BORDER, null);
upload2.setBrowseButtonText("文件2");
....
Re: TypeError: undefined is not a function [message #546858 is a reply to message #546831] Wed, 14 July 2010 12:48 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi zhuzekun,

I've just checked the Upload widget in JFace dialog and it works fine -
no error messages (RAP from CVS HEAD, Upload widget from sandbox). Can
you provide a complete self running snippet/project that demonstrate the
problem?

Best,
Ivan

On 07/14/2010 2:34 PM, zhuzekun wrote:
> thanks a lot,Ivan. now, i have get it when i put the Upload in the
> Dialog class, the source code is like this:
> Composite topComp = new Composite(parent, SWT.NONE);
> Shell shell = topComp.getShell();
> shell.setText("RAP下选择文件");
> topComp.setLayoutData(new GridData(GridData.FILL_BOTH));
> topComp.setLayout(new GridLayout(2, false));
> new Label(topComp, SWT.NONE).setText("WSDL文件地址:");
> upload1 = new Upload(topComp, SWT.BORDER, null);
> upload1.setBrowseButtonText("文件1");
>
> new Label(topComp, SWT.NONE).setText("WSDL文件地址:");
> upload2 = new Upload(topComp, SWT.BORDER, null);
> upload2.setBrowseButtonText("文件2");
> ...
Previous Topic:[TreeViewer] post selection changes are not handled as expected (as in RCP)?
Next Topic:awt in the RAP
Goto Forum:
  


Current Time: Sun Nov 28 15:59:30 GMT 2021

Powered by FUDForum. Page generated in 0.01748 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top