Page 2 of 3
Posted: Thu May 19, 2005 6:46 pm
by Polo
[useless]BTW, shouldn't this beta called 2 instead 1 ? As this is the second beta 1

[/useless]
Posted: Thu May 19, 2005 6:47 pm
by traumatic
Polo wrote:[..]but iirc it was a long time ago

"Good things come to those..."
Hey, this is about MacOS!

Posted: Thu May 19, 2005 6:51 pm
by Polo
I know, I just couldn't resist

I want this feature so much

I would nearly need a mac

Posted: Thu May 19, 2005 7:10 pm
by GreenGiant
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?
Posted: Thu May 19, 2005 7:41 pm
by Polo
Now, it's time to create a MacOS X forum, no ?

Posted: Thu May 19, 2005 7:42 pm
by Fred
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.
Posted: Thu May 19, 2005 8:23 pm
by GreenGiant
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.
Posted: Thu May 19, 2005 8:26 pm
by Polo
GreenGiant 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.
Even with those few problems, I must admit MacOSX looks damn good
And don't worry, you're helping the Purebasic Mac version to be better by reporting problems

Posted: Thu May 19, 2005 9:32 pm
by Fred
GreenGiant: thanks for your report. In fact the width of the OptionGadget() needs to be expanded or the text wrap. It's corrected. About the other bug, there is some clipping problem when gadgets are too close, i will see what can be done

.
Posted: Thu May 19, 2005 11:10 pm
by GreenGiant
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
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)
bit I guess.
Posted: Fri May 20, 2005 9:27 am
by dmoc
To run compiled prog from cmd line use "open myprog"
Can anyone tell me if opengl api is available?
Posted: Fri May 20, 2005 10:00 am
by nco2k
fred what will you do next? going to disneyland?
c ya,
nco2k
Posted: Fri May 20, 2005 11:01 am
by Fred
dmoc: thanks for the "open" stuff i didn't knew it

. About the OpenGL, it's not yet available but it's under work.
nico2k: we will see

Posted: Sun May 22, 2005 12:35 am
by GreenGiant
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:
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
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.
Posted: Sun May 22, 2005 1:55 pm
by Fred
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
