StartDrawing(WindowOutput(0))=null

Mac OSX specific forum
WilliamL
Addict
Addict
Posts: 1255
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

StartDrawing(WindowOutput(0))=null

Post by WilliamL »

I am experimenting with the Demo PB (4.20) and when I use this code (example from manual) I get 'result is a null=0 value' and the program locks up. How do I get this to work?

If OpenWindow(0, 100, 100, 300, 400, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)

If StartDrawing(WindowOutput(0))
Box(10,10,20,20)
Line(30,50,100,100)

StopDrawing()
EndIf
;
; This is the 'event loop'. All the user actions are processed here.
; It's very easy to understand: when an action occurs, the EventID
; isn't 0 and we just have to see what have happened...
;

Repeat
EventID.l = WaitWindowEvent()

If EventID = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit = 1
EndIf

Until Quit = 1

EndIf

End ; All the opened windows are closed automatically by PureBasic

PB looks like what I'm looking for, especially if it will run natively on an Intel Mac.

Thanks - William
jamirokwai
Enthusiast
Enthusiast
Posts: 799
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: StartDrawing(WindowOutput(0))=null

Post by jamirokwai »

WilliamL wrote:I am experimenting with the Demo PB (4.20) and when I use this code (example from manual) I get 'result is a null=0 value' and the program locks up. How do I get this to work?
Hi WilliamL,

won't get it to work yet, as it simply isn't supported at the moment.
But I suppose Fred is working on that issue :)
I am also waiting for this to be added!
Regards,
JamiroKwai
WilliamL
Addict
Addict
Posts: 1255
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: StartDrawing(WindowOutput(0))=null

Post by WilliamL »

Thanks for the quick reply. I suppose I'm glad that it wasn't my error but on the other hand it isn't good that none of the drawing commands work.

Have you been waiting long? What else doesn't work? Is the Mac PB version a new product? Should I invest in PB ($) if it doesn't work? Will there be a Intel version? How am I going to decide this???
aaron
Enthusiast
Enthusiast
Posts: 267
Joined: Mon Apr 19, 2004 3:04 am
Location: Canada
Contact:

Post by aaron »

The Intel version for OSX is in alpha testing right now.
WilliamL
Addict
Addict
Posts: 1255
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: StartDrawing(WindowOutput(0))=null

Post by WilliamL »

aaron wrote:The Intel version for OSX is in alpha testing right now.
Great news!

Thanks

William
jamirokwai
Enthusiast
Enthusiast
Posts: 799
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: StartDrawing(WindowOutput(0))=null

Post by jamirokwai »

WilliamL wrote:Have you been waiting long? What else doesn't work? Is the Mac PB version a new product? Should I invest in PB ($) if it doesn't work? Will there be a Intel version? How am I going to decide this???
I bought PureBasic a few weeks ago. If you do not code fullscreen-applications,
it is really awesome (besides some quirks, which are removed or being removed,
see the bug-lists for more information). The Intel-Alpha is really promising,
and lightning fast, as I can say. I would recommend to buy and try, if you willing
to have some patience for development :)
Regards,
JamiroKwai
Post Reply