Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT: after creating Shell isDisposed is true(SWT: after creating Shell isDisposed is true in php java bridge)
SWT: after creating Shell isDisposed is true [message #824299] Mon, 19 March 2012 14:02
Sergio Ramos is currently offline Sergio Ramos
Messages: 1
Registered: March 2012
Junior Member
hi everybody!

Ive been testing php java bridge with great succes, the problem is that when i try to create a shell object from php, it has isDisposed to true. In fact i can notice how the window is created for a couple of seconds and then disappears.
Ive tried the same code in java and works ok. The bridge framework is working good because Ive done tests with QTjambi and everything its ok..
Can someone give me some light on this?

My enviroment is Windows XP and the code im trying to test in php is( the same thing in java works ok):

class HelloWorld {

function run() {

$display = new Java ("org.eclipse.swt.widgets.Display");
echo "\$display:".$display.PHP_NL;
$shell = new Java ("org.eclipse.swt.widgets.Shell", $display);
echo "\$shell:".$shell.PHP_NL;
echo "\$display:".$display.PHP_NL;
echo "!\$shell->isDisposed(): ".((bool)(!$shell->isDisposed())).PHP_NL; //false
echo "\$shell->isDisposed(): ".((bool)($shell->isDisposed())).PHP_NL; //true

$shell->open();
echo "Despues de open..".PHP_NL;
echo "\$shell:".$shell.PHP_NL;
echo "\$display:".$display.PHP_NL;
echo "!\$shell->isDisposed(): ".((bool)(!$shell->isDisposed())).PHP_NL;
echo "\$shell->isDisposed(): ".((bool)($shell->isDisposed())).PHP_NL;


while (!$shell->isDisposed()) {
if (!$display->readAndDispatch()) {
$display->sleep();
}
}

$display->dispose();



}
}

const PHP_NL = PHP_EOL;
Previous Topic:How to get native NSView reference from SWT Composite
Next Topic:getToolBar() creates a gap below the toolbar on Mac OSX
Goto Forum:
  


Current Time: Sat Oct 25 18:17:57 GMT 2014

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

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