PureBasic 3.93 Beta 1 for MacOS X out !

Developed or developing a new product in PureBasic? Tell the world about it.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

[useless]BTW, shouldn't this beta called 2 instead 1 ? As this is the second beta 1 8) [/useless]
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Polo wrote:[..]but iirc it was a long time ago :?
"Good things come to those..."


Hey, this is about MacOS! ;)
Good programmers don't comment their code. It was hard to write, should be hard to read.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

I know, I just couldn't resist :)
I want this feature so much :)
I would nearly need a mac :wink:
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Now, it's time to create a MacOS X forum, no ? 8)
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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.
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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 Image
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.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post 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 :shock:
And don't worry, you're helping the Purebasic Mac version to be better by reporting problems :wink:
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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 :).
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

To run compiled prog from cmd line use "open myprog"

Can anyone tell me if opengl api is available?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

fred what will you do next? going to disneyland? :D

c ya,
nco2k
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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 ;)
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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 Image


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.
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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 :)
Post Reply