
PureBasic 3.93 Beta 1 for MacOS X out !
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
If I just use pbcompiler filename.pb then it runs fine. But if I try to create an app with -e then it goes a bit funny. The app file is created and when I run it the window opens, but the window won't take the focus, I have to kill its process. Any ideas? I'm using "pbcompiler filename.pb -e file.app". Is this wrong?
You need to build a .app structure if you want to run your exe from the commandline. This means:
YourApp.app\Contents\MacOS\ directory struct, then put your exe in the MacOS\ dir. Also a file named pInfo.list need to be created (look in another .app directory in your Applications\ folder to get one.
YourApp.app\Contents\MacOS\ directory struct, then put your exe in the MacOS\ dir. Also a file named pInfo.list need to be created (look in another .app directory in your Applications\ folder to get one.
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
Thanks for the info. I'll give it a go. There are a few other things I've noticed (don't mean to sound negative, sorry). If I run the GadgetFull example then the button flags don't seem to be working (the toggle one doesn't toggle for example). Also, here's a picture 
that shows a couple of little issues with the Gadget example.
I'm running a Powerbook, OS 10.3.9, and using carbon for the programs. Hope this is helpful.

that shows a couple of little issues with the Gadget example.
I'm running a Powerbook, OS 10.3.9, and using carbon for the programs. Hope this is helpful.
Even with those few problems, I must admit MacOSX looks damn goodGreenGiant wrote:Thanks for the info. I'll give it a go. There are a few other things I've noticed (don't mean to sound negative, sorry). If I run the GadgetFull example then the button flags don't seem to be working (the toggle one doesn't toggle for example). Also, here's a picture
that shows a couple of little issues with the Gadget example.
I'm running a Powerbook, OS 10.3.9, and using carbon for the programs. Hope this is helpful.

And don't worry, you're helping the Purebasic Mac version to be better by reporting problems

-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
I wasn't really pointing out the text wrapping, more the fact that the info window should have displayed the resolution selected in the main window. Some kind of problem in the bit I guess.
Code: Select all
If GetGadgetState(13) : Result$ = GetGadgetText(13) : Endif
If GetGadgetState(14) : Result$ = GetGadgetText(14) : Endif
If GetGadgetState(15) : Result$ = GetGadgetText(15) : Endif
MessageRequester("Info", "Selected screen mode: "+Result$, 0)
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
I guess you've got it, but I was playing around and found out what the problem was. It seems that if you use GetGadgetState() on option gadgets then it returns true even if their state is unselected. Here's a small example:
And here's what I get from the code 
Edit: Just noticed that you forgot to put Random() on the list of commands not yet supported. Sorry for the negativeness again, I am enjoying the OSX version.
Code: Select all
If OpenWindow(0, 100, 120, 160, 80, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget, "Gad")
If CreateGadgetList(WindowID())
OptionGadget(0, 10, 10, 40, 20, "A")
OptionGadget(1, 10, 30, 40, 20, "B")
OptionGadget(2, 10, 50, 40, 20, "C")
SetGadgetState(0, 1)
ButtonGadget(3, 70, 30, 80, 20, "Info")
CloseGadgetList()
EndIf
Repeat
EventID.l = WaitWindowEvent()
If EventID = #PB_EventGadget
If EventGadgetID()=3
Result$ = ""
If GetGadgetState(0) : Result$ = Result$ + GetGadgetText(0) : EndIf
If GetGadgetState(1) : Result$ = Result$ + GetGadgetText(1) : EndIf
If GetGadgetState(2) : Result$ = Result$ + GetGadgetText(2) : EndIf
MessageRequester("Info", "Option gadgets that're selected: "+Result$, 0)
EndIf
EndIf
Until EventID = #PB_EventCloseWindow
EndIf
End

Edit: Just noticed that you forgot to put Random() on the list of commands not yet supported. Sorry for the negativeness again, I am enjoying the OSX version.
Thank you for the precise report, the bug is fixed you can get the new lib here: www.purebasic.com/beta/mac/Gadget . About Random() we will implement it for the next beta 
