Purebasic 3.94 for Mac os x work bad, not properly..........

Mac OSX specific forum
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

File Creator
As I could see (reading the Help) it is not possible to add (create) or read (check) an File Creator to any files...
User avatar
LESTROSO
Enthusiast
Enthusiast
Posts: 124
Joined: Thu Nov 03, 2005 12:30 pm
Location: Italy
Contact:

Post by LESTROSO »

i sad that i cannot put the datas of my game here like music and graphic, because it's impossible to copy that......

:) ok , you call your recources(music, sounds,graphic) external,but i like and there is the possibility to enclose all inside when you create an app.But now this function don't work well.......
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Open Console

Code: Select all

result = OpenConsole()
Debug result
Not open the Console
Return result higher than zero.

Also tested the PB Example, Not open the console
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Button Default

Code: Select all

Enumeration
#Main_Window

EndEnumeration

Procedure Open_Main_Window()
Protected wHeight, wWidth
wHeight = 500
wWidth = 500
If OpenWindow(#Main_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "Main Window")
 CreateGadgetList(WindowID(#Main_Window))
ButtonGadget(4, 14,20, 60, 20, "Button", #PB_Button_Default)

EndIf ; OpenWindow
EndProcedure



Open_Main_Window()

Repeat
EventID = WaitWindowEvent()

    Select EventID
        
    
    EndSelect ;EventID
    
    Until EventID = #PB_Event_CloseWindow
    End ; Terminate application

Result: NOT Showing the button as Default button
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Create PopUpMenu

When using the Example in the Help or the Example file, I get an error:
Constant not found #WM_RButtonDown
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Drag and Drop
I trying to find something about this in the Help, but not ??

I also noticed using the IDE it is NOT possible to Drag an .pb file to
the PureBasic icon to Launch the Purebasic application and open the .pb file
User avatar
michel51
Enthusiast
Enthusiast
Posts: 290
Joined: Mon Nov 21, 2005 10:21 pm
Location: Germany

Post by michel51 »

Hi SEO
Constant not found #WM_RButtonDown
#WM_ - Constants are defined for Windows respective are Window-Constants. You have to rename. But a lot of such constants have no synonym an Mac or are not supported.

michel51
michel51

Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
User avatar
michel51
Enthusiast
Enthusiast
Posts: 290
Joined: Mon Nov 21, 2005 10:21 pm
Location: Germany

Post by michel51 »

SEO wrote:Button Default
Result: NOT Showing the button as Default button
You're right, it seems, "default-button" is not supported.

michel51
michel51

Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Bevel Button
Bevel button 'Toggle' is supported in PB (As toggle button)...

But an Normal Bevelbutton and Bevelbutton with menu is not supported..
Image
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

ImageGadget

The ImageGadget don't fire any Events > 0 ... On Mac OS X

Code: Select all


#SourceFolder = "/Users/sveneolsson/Desktop/"

Enumeration
#Main_Window
#Main_Actionbutton_1
#IMG_Actionbutton

EndEnumeration

Procedure Open_Main_Window()
Protected wHeight, wWidth, imgID
wHeight = 500
wWidth = 500
If OpenWindow(#Main_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "Main Window") And CreateGadgetList(WindowID(#Main_Window))


UsePNGImageDecoder()
If LoadImage(#IMG_Actionbutton, #SourceFolder + "popupbutton.png")    ; change 2nd parameter to the path/filename of your image
      ImageGadget(#Main_Actionbutton_1,10,10,22,28,UseImage(#IMG_Actionbutton))
      
    EndIf



EndIf ; OpenWindow
EndProcedure



Open_Main_Window()

Repeat
EventID = WaitWindowEvent()
ButtonEvent = EventGadgetID()
  
  Debug "Window Event " + Str(EventID)    ;<--###########################
  Debug "Button Event " + Str(ButtonEvent);<--###########################  
    
    Select EventID
        
    
    EndSelect ;EventID
    
    Until EventID = #PB_Event_CloseWindow
    End ; Terminate application

SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

ButtonImageGadget

Also the ButtonImageGadget looks not to fire any Event > 0
Just change the code above to test...
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

ButtonImageGadgets
The ButtonImageGadgets WORK as it should..
I have set the size to 0,0 ....
But I am some confused here, the Button looks like an Mac 'Pushbutton' not an Bevelbutton that could have icos...
User avatar
michel51
Enthusiast
Enthusiast
Posts: 290
Joined: Mon Nov 21, 2005 10:21 pm
Location: Germany

Post by michel51 »

SEO wrote:ImageGadget

The ImageGadget don't fire any Events > 0 ... On Mac OS X
Hi SEO,

try this (You have to change the picture path dates)

Code: Select all

;  #SourceFolder = "/Users/sveneolsson/Desktop/" 

 Enumeration
 #Main_Window 
 #Main_Actionbutton_1 
 #IMG_Actionbutton 

 EndEnumeration 

 Procedure Open_Main_Window() 
 Protected wHeight, wWidth, imgID 
 wHeight = 500 
 wWidth = 500 
 If OpenWindow(#Main_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "Main Window") And CreateGadgetList(WindowID(#Main_Window)) 


 UseJPEGImageDecoder() 
 If LoadImage(#IMG_Actionbutton, "Bild001.jpg")  ; change 2nd parameter to the path/filename of your image 
      ResizeImage(#IMG_Actionbutton, 30, 30)
      ButtonImageGadget(#Main_Actionbutton_1,10,10,30,30,UseImage(#IMG_Actionbutton)) 
;       ImageGadget(#Main_Actionbutton_1,10,10,30,30,UseImage(#IMG_Actionbutton)) 
 Else
   MessageRequester("Error","Cannot load Image")      
 EndIf 

 EndIf ; OpenWindow 
 EndProcedure 

 Open_Main_Window() 

 Repeat 
 EventID = WaitWindowEvent() 
 ButtonEvent = EventGadgetID() 

;    Debug "Window Event " + Str(EventID)      ;<--########################### 
;    Debug "Button Event " + Str(ButtonEvent)  ;<--###########################  

   Select EventID 
      Case #PB_Event_Gadget
      
      Debug "Window Event " + Str(EventID)      ;<--###########################
      Debug "Button Event " + Str(ButtonEvent)  ;<--###########################  

   EndSelect ;EventID 
;  While WaitWindowEvent() : Wend
 
Until EventID = #PB_Event_CloseWindow 
End ; Terminate application 
With Imagegadget you are right, there is no event, because the mouseclicks are not supported here :!: :?:

ButtonImageGadget works :)

michel51
michel51

Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Text Encoding Problem ButtonGadget
It is not only the debugger that have some Encoding problems, also the ButtonGadget not handle the used Encoding from the IDE Editor properly.....

Code: Select all

ButtonGadget(#Main_PushButton_1, 60,60, 100,20,"Åstorp")

Code: Select all

Enumeration
#Main_Window
#Main_PushButton_1

EndEnumeration

Procedure Open_Main_Window()
Protected wHeight, wWidth
wHeight = 500
wWidth = 500
If OpenWindow(#Main_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "Main Window") And CreateGadgetList(WindowID(#Main_Window))
    ButtonGadget(#Main_PushButton_1, 60,60, 100,20,"Åstorp")
EndIf ; OpenWindow
EndProcedure

Open_Main_Window()

Repeat
EventID = WaitWindowEvent()
  Debug Str(EventID)
    Select EventID
       
    EndSelect ;EventID
    
    Until EventID = #PB_Event_CloseWindow
    End ; Terminate application

SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

About RunProgram
As I wrote before I don't get that to work. But the Mac IDE/Editor is using that?? I mean to launch the compiler ??
//SEO
Post Reply