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 RamosFriend
Messages: 4
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

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()) {



const PHP_NL = PHP_EOL;
Previous Topic:getToolBar() creates a gap below the toolbar on Mac OSX
Next Topic:Dynamic 32-64 bit loading
Goto Forum:

Current Time: Sun Apr 30 15:39:33 GMT 2017

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

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