Another bug serious (i think) of Pure Basic 3.94d for MacX

Mac OSX specific forum
User avatar
LESTROSO
Enthusiast
Enthusiast
Posts: 124
Joined: Thu Nov 03, 2005 12:30 pm
Location: Italy
Contact:

Another bug serious (i think) of Pure Basic 3.94d for MacX

Post by LESTROSO »

:( I have problem to see and command the window events. :(

These short example show you how you can see that these (window events)don't working.

In Theory, in the first example you must see the numbers in string gadget changing, but you will see always "0"!!!!! If you try these codes in windows xp you will see different numbers in real time corresponding to the events.

Code: Select all

 
;Debagging the events!!!
;Fasa software 2006

OpenWindow(0,0,0,400,500,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Experiment") And CreateGadgetList(WindowID(0))


TextGadget(10,80,380,250,20,"  ")
ButtonGadget(13, 105, 450, 200, 20, "Push button!")
Repeat 

 EventID=WaitWindowEvent() 
          
         SetGadgetText(10,Str(EventID))
     
Until EventID = #PB_Event_CloseWindow  
End 



But, i have descovered this problem because i wanted to get the event from the mouse......but also in this case the mouse events don't working!!
Here i report the other code.....

Code: Select all


;debagging the mouse click!

;Fasa software 2006


OpenWindow(0,0,0,400,500,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Experiment2") And CreateGadgetList(WindowID(0))


TextGadget(10,80,380,250,20,"  ")
ButtonGadget(13, 105, 450, 200, 20, "Push button!!")
Repeat 

 EventID=WaitWindowEvent() 
   
       Select EventID     
       Case 513
         SetGadgetText(10,"working left!!!!!!")
       Case 516
         SetGadgetText(10,"working right!!!!!!")
       
       EndSelect
         
      
      
Until EventID = #PB_Event_CloseWindow  
End 



In the purebasicnet area, i found the PB constant.........are the same for mac and win???

can anyone help me???I'm wrong or i'm right?

Thank you in advance..............
User avatar
michel51
Enthusiast
Enthusiast
Posts: 290
Joined: Mon Nov 21, 2005 10:21 pm
Location: Germany

Re: Another bug serious (i think) of Pure Basic 3.94d for Ma

Post by michel51 »

LESTROSO wrote::( I have problem to see and command the window events. :(

These short example show you how you can see that these (window events)don't working.

In Theory, in the first example you must see the numbers in string gadget changing, but you will see always "0"!!!!! If you try these codes in windows xp you will see different numbers in real time corresponding to the events.

Code: Select all

 
;Debagging the events!!!
;Fasa software 2006

OpenWindow(0,0,0,400,500,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Experiment") And CreateGadgetList(WindowID(0))


TextGadget(10,80,380,250,20,"  ")
ButtonGadget(13, 105, 450, 200, 20, "Push button!")
Repeat 

 EventID=WaitWindowEvent() 
          
         SetGadgetText(10,Str(EventID))
     
Until EventID = #PB_Event_CloseWindow  
End 

Th "0" is the windowevent if no other event happes or you move the mouse.
See the code below.

Code: Select all

;Debagging the events!!! 
 ;Fasa software 2006 

 OpenWindow(0,0,0,400,500,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Experiment") And CreateGadgetList(WindowID(0)) 


 TextGadget(10,80,380,250,20,"  ") 
 ButtonGadget(13, 105, 450, 200, 20, "Push button!") 
 Repeat 

   EventID=WaitWindowEvent()

   If EventID = #PB_Event_Gadget
      Debug eventID
      
      SetGadgetText(10,Str(EventID)) 
      
;       Delay(500)
   EndIf
      
 Until EventID = #PB_Event_CloseWindow
 
 End 
If you comment out the IF / ENDIF lines and run the code with the DELAY line, you can see, that you get the event (=3)

Your 2. code: I think you have to detect the Eventtype (see the help).[/quote]
michel51

Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
User avatar
LESTROSO
Enthusiast
Enthusiast
Posts: 124
Joined: Thu Nov 03, 2005 12:30 pm
Location: Italy
Contact:

Post by LESTROSO »

Dear Micheal,

i will try with the delay command.......but if you have a pc or an emulator and you run my short example.,,,, you will see that my examples works well.......why for mac not??? you will note in the first example the numbers change if you move the mouse......also the ....eventtype command don't work........

if i cannot use the events how i can program in purebasic???

thanks Michael...... :)
Capitan America
New User
New User
Posts: 1
Joined: Sun Mar 26, 2006 4:19 pm
Location: ITALY

Post by Capitan America »

Dear Lestroso

I have met your same difficulties :? in the survey of the events and particularly those of the mouse.
I have tried to use the function "Examine mouse" with the instructions to it you correlate, but these work only inside a screen.
Then for the windows they are not all right! :evil:
Besides with these functions the mouse pointer is trapped inside the screen preventing the use of screens and windows together.
Here it doesn't deal with finding alternative solutions to realize own programs, but the problems must have resolved in the compiler PUREBASIC. :evil: :evil:
Also the debugger would be to see again. :evil: :evil: :evil:

Best Regards
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

These are the PB events you should expect from WaitWindowEvent() and WindowEvent(). If it's not one of these the event is an operating system-specific event.

#PB_Event_ActivateWindow
#PB_Event_ClientConnected
#PB_Event_ClientDisconnected
#PB_Event_CloseWindow
#PB_Event_DataReceived
#PB_Event_FileReceived
#PB_Event_Gadget
#PB_Event_Menu
#PB_Event_MoveWindow
#PB_Event_Repaint
#PB_Event_SizeWindow
#PB_Event_SysTray
User avatar
LESTROSO
Enthusiast
Enthusiast
Posts: 124
Joined: Thu Nov 03, 2005 12:30 pm
Location: Italy
Contact:

Post by LESTROSO »

:lol: Hy Trond and Capitan America ,

As we see, the Mac version of pure basic isn't well tested, we must attend a new release by Fred and his team as soon as possible, listening the problems of the forum............. Many Thanks in advance to the Pure Basic supportTeam !!!!!! :!: :!: :!:
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

However this one seems not to be a bug but improper usage of events
User avatar
LESTROSO
Enthusiast
Enthusiast
Posts: 124
Joined: Thu Nov 03, 2005 12:30 pm
Location: Italy
Contact:

Post by LESTROSO »

I don't think so, because try with windows xp versions , those examples works fine........why in mac version not????? :cry: :cry:
Post Reply