Page 1 of 1
Compiler Run on MFirefox or Opera
Posted: Thu Aug 28, 2014 8:29 am
by Logoman
Hallo
i'm new in Spider Prog.

After download and unpack i will try my first lines in the IDE !
Code: Select all
OpenWindow(0,100,100,250,300,"Servus")
Debug "Test"
OK i klick on Compiler start.... Firefox load and I see a Blank Screen ???

(Opera as well !)
Is here a Bug or maybe a incorrect setting ???
(on Linux xubuntu 64)
On OS Win 7 it's OK
Pleas who can help me, Thanks.
Re: Compiler Run on MFirefox or Opera
Posted: Fri Aug 29, 2014 2:30 pm
by MrTAToad
Try adding a FlipScreen() at the end
Re: Compiler Run on MFirefox or Opera
Posted: Fri Aug 29, 2014 2:48 pm
by the.weavster
I'm surprised that even works on Win 7 because you're not entering the event loop, I think your program should start and immediately terminate.
Re: Compiler Run on MFirefox or Opera
Posted: Sun Aug 31, 2014 3:28 pm
by Logoman
Hey, first Thank´s for the Tipp but it´s still not working. Now I have a new problem with a Example File
I´m Coding on Win 7
Code: Select all
If OpenWindow(0, 0, 0, 230, 90, "Event-Handling Beispiel...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget (1, 10, 10, 200, 20, "Klick mich")
CheckBoxGadget(2, 10, 40, 200, 20, "Markiere mich")
If CreateMenu(0, WindowID(0))
MenuTitle("Menu")
MenuItem(1, "Eintrag 1")
MenuItem(2, "Eintrag 2")
MenuItem(3, "Eintrag 3")
EndIf
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 1 : Debug "Schalter 1 angeklickt!"
Case 2 : Debug "Schalter 2 angeklickt!"
EndSelect
Case #PB_Event_Menu
Select EventMenu()
Case 1 : Debug "Menü-Eintrag 1 angeklickt!"
Case 2 : Debug "Menü-Eintrag 2 angeklickt!"
Case 3 : Debug "Menü-Eintrag 3 angeklickt!"
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
Here the error ??
[17:18:56] [COMPILER] Line 14: WaitWindowEvent() is not a function, array, list, map or macro.
I dont no what should i do ??
Re: Compiler Run on MFirefox or Opera
Posted: Sun Aug 31, 2014 7:59 pm
by falsam
Like this with CallBacks
Code: Select all
Procedure OnMenu()
Select EventMenu()
Case 1 : Debug "Menü-Eintrag 1 angeklickt!"
Case 2 : Debug "Menü-Eintrag 2 angeklickt!"
Case 3 : Debug "Menü-Eintrag 3 angeklickt!"
EndSelect
EndProcedure
Procedure OnGadget()
Select EventGadget()
Case 1 : Debug "Schalter 1 angeklickt!"
Case 2 : Debug "Schalter 2 angeklickt!"
EndSelect
EndProcedure
If OpenWindow(0, 0, 0, 230, 90, "Event-Handling Beispiel...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget (1, 10, 10, 200, 20, "Klick mich")
CheckBoxGadget(2, 10, 40, 200, 20, "Markiere mich")
If CreateMenu(0, WindowID(0))
MenuTitle("Menu")
MenuItem(1, "Eintrag 1")
MenuItem(2, "Eintrag 2")
MenuItem(3, "Eintrag 3")
EndIf
BindEvent(#PB_Event_Menu, @OnMenu())
BindEvent(#PB_Event_Gadget, @OnGadget())
EndIf
Add
Code: Select all
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
and the same code works with Pure Basic

Re: Compiler Run on MFirefox or Opera
Posted: Mon Sep 01, 2014 12:18 pm
by the.weavster
falsam wrote:
Add
Code: Select all
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
and the same code works with Pure Basic

Code: Select all
CompilerIf #PB_Compiler_OS <> 5 ; #PB_OS_Web
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
CompilerEndIf
Re: Compiler Run on MFirefox or Opera
Posted: Mon Sep 01, 2014 4:15 pm
by falsam
Ho yesssss. I forgot that #PB_OS_Web exists with Pure Basic.

Re: Compiler Run on MFirefox or Opera
Posted: Mon Sep 01, 2014 6:39 pm
by the.weavster
@Logoman
I hope
this helps.
Re: Compiler Run on MFirefox or Opera
Posted: Sun Sep 07, 2014 9:59 am
by Logoman
OK Thanks for your Help, the Example run very nice !
It's a good Tip.
