Code: Select all
SetConsole(#myConsole)
! try {
!initProcess()
!var process = New PROCESS
! } catch (err) {
! console.error(err);
! }
Code: Select all
SetConsole(#myConsole)
! try {
!initProcess()
!var process = New PROCESS
! } catch (err) {
! console.error(err);
! }
i don't think that you can catch uncaught SyntaxErrors. I have to investigate...falsam wrote:Code: Select all
!var process = New PROCESS
in principle it seems to be possible (see this JsFiddle), but I have no idea how to implement it with SpiderBasic...Peter wrote:i don't think that you can catch uncaught SyntaxErrors. I have to investigate...
Thaks Perer, can you show how code with only one button (now beetween one button and close button empty space) and if there possible to use flat buttos (like in the beginning of the topic) with my custom image, thanks?Peter wrote:i'm glad to read that it was solved.karu wrote:Now working
karu wrote:Please advice, how i can put similar button also to other windows, thaksGreetings ... PeterCode: Select all
Procedure AddWindowGadget(Window, Gadget) If IsWindow(Window) = 0 : ProcedureReturn : EndIf If IsGadget(Gadget) = 0 : ProcedureReturn : EndIf Protected WID = WindowID(Window) Protected GID = GadgetID(Gadget) ! $(v_gid.div).css("right", $(v_gid.div).css("left")); ! $(v_gid.div).css("left", ""); ! $(v_gid.div).appendTo(v_wid.title); EndProcedure Enumeration #myWindow #myButton1 #myButton2 EndEnumeration Procedure myButton1Event() Debug "myButton1Event()" EndProcedure Procedure myButton2Event() Debug "myButton2Event()" EndProcedure OpenWindow(#myWindow, #PB_Ignore, #PB_Ignore, 300, 300, "Window", #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_SizeGadget) ButtonGadget(#myButton1, 64, 4, 22, 22, "!") ; Please note, that the X-Position of the button is the Right-Position in the titlebar! GadgetToolTip(#myButton1, "This is button 1") AddWindowGadget(#myWindow, #myButton1) BindGadgetEvent(#myButton1, @myButton1Event()) ButtonGadget(#myButton2, 40, 4, 22, 22, "?") ; Please note, that the X-Position of the button is the Right-Position in the titlebar! GadgetToolTip(#myButton2, "This is button 2") AddWindowGadget(#myWindow, #myButton2) BindGadgetEvent(#myButton2, @myButton2Event())