Procedure ResizeScreen ()
Debug "I Am HERE!"
EndProcedure
OpenWindow (0,100,100,100,100,"")
ResizeScreen()
! $(window).resize(function(){f_resizescreen()});
This will NOT work, if you remove the call to ResizeScreen().
In other words: ResizeScreen has to be called at least once to get the callback of the window.resize-function.
This is probably due to code generation optimization in PB, where PB-functions that are not "called" by PB-code are not included in the generated target.
Is it possible to use the internal functionality of PB to achieve what you want? Like BindEvent or something?
mahan wrote:This is probably due to code generation optimization in PB, where PB-functions that are not "called" by PB-code are not included in the generated target.
Is it possible to use the internal functionality of PB to achieve what you want? Like BindEvent or something?
Thanks for your answer!
Tried BindEvent, but that is tied to a SpiderBasic-window, not to the browser-window.
You can use the #PB_Window_Background flag to have a fullscreen window, then you can bind a resize event on it. A procedure not used isn't included in code generation, so you need to reference it once if you plan to use it directly in inlined JS.
Fred wrote:You can use the #PB_Window_Background flag to have a fullscreen window, then you can bind a resize event on it. A procedure not used isn't included in code generation, so you need to reference it once if you plan to use it directly in inlined JS.