Code Generation Problems (Sash)

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Code Generation Problems (Sash)

Postby StueyNZ » Tue Aug 19, 2003 10:36 pm

Building a New SWT Application:

1. Add GridLayout
2. Add Sash
3. Add Tree (on the left)
4. Add Text (on the right)

Already have one error in generated code with an unused import:
Code: Select all
import org.eclipse.swt.widgets.Composite;


(Have to remove the unused import to get it to compile)

Generated code now reads:
Code: Select all
final Display display = new Display();
final Shell shell = new Shell();
shell.setLayout(new FillLayout());
shell.setText("My SWT Application");
{
   final SashForm sashForm = new SashForm(shell, SWT.BORDER);
   {
      new Tree(sashForm, SWT.BORDER);
   }
   {
      final Text text = new Text(sashForm, SWT.BORDER);
      text.setText("text");
   }
   sashForm.setWeights(new int[] { 125, 360 });
}

// DESIGNER: Add controls before this line.


Running the app, terminating and going into Design view now gets error:
Code: Select all
Can not create control without parent for ControlInfo


sashForm control is no-longer shown in the hierarchy of controls.
StueyNZ
 
Posts: 2
Joined: Tue Aug 19, 2003 10:23 pm
Location: Martinborough, New Zealand

Postby admin » Wed Aug 20, 2003 12:01 am

At first thank you for such precise descriptions of problems.

There is really bug with SashForm support in free version of Designer. Initially we decided to support SashForm and TabFolder/TabItem only in professional version, but then one of our customers asked to publish this in free version. There is code for support SashForm, but code for parsing source code for SashForm was accidenly commented out.

We just published version 1.1.1, it is still with this error. We replace this version with new one, where error is fixed, but will keep same version number.
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest