Steps to reproduce:
- Create a JavaFX Weather sample
- Build the sample
- Open weatherfx.WeatherApp.fx file
- Enable the preview
The sample run in separate window not in the preview
( see issue 103988 )
The WeatherApp.fx file could be rewritten to avoid this issue.
This is as designed, weather app is opened in a separate frame.
Try preview of weather.fx - it is running in a canvas.
I think breh has got a fix
All what needs to be done is to add this line of code at the end of WeatherApp.fx file:
This makes sure the module gets the frame rendering the app, can remove the frame and show the content of the window
inside the editor.
LOL - I will implement this workaround into our sample.
But this is tutorial so I am reassigning this as P1 issue for javafx code.
Users will not learn our internal preview implementation hacks to code in JavaFX - this is ridiculous !!!
implemented workaround for WeatherApp sample in trunk:
Checking in samples/weather2/resources/WeatherFX/src/weatherfx/WeatherApp.fx;
/cvs/javafx/samples/weather2/resources/WeatherFX/src/weatherfx/WeatherApp.fx,v <-- WeatherApp.fx
new revision: 1.3; previous revision: 1.2
Thanks. It's the specific of the interpreter but not the plugin :)
IDE can't block all cases when user's application wants to create a new window.
But I'm setting this as P1 task to check when we will have preview on top of the compiler.
The workaround works sot this issue is closing as works for me.
Feel free to create a high level requirement on preview to reuse an API for previewing but such API does not exist.
Verified in JavaFX_NB_Plugin_Franca_NB_65_fixes_cont: #48 20-Jan-2009 10:22:21