Purebasic 3.94 for Mac os x work bad, not properly..........
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.......

Open Console
Not open the Console
Return result higher than zero.
Also tested the PB Example, Not open the console
Code: Select all
result = OpenConsole()
Debug result
Return result higher than zero.
Also tested the PB Example, Not open the console
Button Default
Result: NOT Showing the button as Default button
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
ImageGadget
The ImageGadget don't fire any Events > 0 ... On Mac OS X
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
Hi SEO,SEO wrote:ImageGadget
The ImageGadget don't fire any Events > 0 ... On Mac OS X
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


ButtonImageGadget works

michel51
michel51
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
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.....
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