Compiler Run on MFirefox or Opera

Just starting out? Need help? Post your questions and find answers here.
Logoman
Posts: 4
Joined: Thu Aug 28, 2014 8:08 am

Compiler Run on MFirefox or Opera

Post 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.
User avatar
MrTAToad
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England
Contact:

Re: Compiler Run on MFirefox or Opera

Post by MrTAToad »

Try adding a FlipScreen() at the end
the.weavster
Posts: 220
Joined: Sat Mar 01, 2014 3:02 pm

Re: Compiler Run on MFirefox or Opera

Post 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.
Logoman
Posts: 4
Joined: Thu Aug 28, 2014 8:08 am

Re: Compiler Run on MFirefox or Opera

Post 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 ??
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Compiler Run on MFirefox or Opera

Post 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 :)

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
the.weavster
Posts: 220
Joined: Sat Mar 01, 2014 3:02 pm

Re: Compiler Run on MFirefox or Opera

Post 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
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Compiler Run on MFirefox or Opera

Post by falsam »

Ho yesssss. I forgot that #PB_OS_Web exists with Pure Basic. :)

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
the.weavster
Posts: 220
Joined: Sat Mar 01, 2014 3:02 pm

Re: Compiler Run on MFirefox or Opera

Post by the.weavster »

@Logoman
I hope this helps.
Logoman
Posts: 4
Joined: Thu Aug 28, 2014 8:08 am

Re: Compiler Run on MFirefox or Opera

Post by Logoman »

OK Thanks for your Help, the Example run very nice ! ;)
It's a good Tip. :mrgreen:
Post Reply