Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#32 shell icon

closed-fixed
nobody
5
2014-07-24
2008-11-21
Sebastián Gurin
No

HI.

If I create a swt shell without setting it an image icon, the browser throws me icon the error message:

Error: item.shell.shellIcon has no properties
source file: file:///M:/workspace/mylocalcollection/static/j2slib/org/eclipse/swt/widgets/Shell.z.js
line: 306

if I set an icon it works ok. Here is a snippet that reproduce the error. Uncomment sShell.setImage line and you will see that it works ok.

this is reproducible in all browsers.

package org.sgx.mlc.gui;

import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class MyShell2 {

private Shell sShell = null;

public static void main(String[] args) {

Display display = Display.getDefault();
MyShell2 thisClass = new MyShell2();
thisClass.createSShell();
thisClass.sShell.open();

while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}

private void createSShell() {
sShell = new Shell();
sShell.setText("Shell");

/** uncomment this line */

//sShell.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream("/org/sgx/mlc/gui/videoFileIcon.png")));

/** **/
sShell.setSize(new Point(300, 200));
sShell.setLayout(new GridLayout());
}

}

Discussion

  • Zhou Renjian
    Zhou Renjian
    2008-12-02

    • status: open --> open-fixed
     
  • Zhou Renjian
    Zhou Renjian
    2008-12-02

    Fixed, please check out latest sources from SVN, or download j2s-2.0.0-20081203

     
  • Zhou Renjian
    Zhou Renjian
    2008-12-02

    • status: open-fixed --> closed-fixed