Page 1 of 1

StartDrawing(WindowOutput(0))=null

Posted: Mon Aug 04, 2008 11:05 pm
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

Re: StartDrawing(WindowOutput(0))=null

Posted: Mon Aug 04, 2008 11:15 pm
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!

Re: StartDrawing(WindowOutput(0))=null

Posted: Mon Aug 04, 2008 11:25 pm
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???

Posted: Tue Aug 05, 2008 12:20 am
by aaron
The Intel version for OSX is in alpha testing right now.

Re: StartDrawing(WindowOutput(0))=null

Posted: Tue Aug 05, 2008 12:24 am
by WilliamL
aaron wrote:The Intel version for OSX is in alpha testing right now.
Great news!

Thanks

William

Re: StartDrawing(WindowOutput(0))=null

Posted: Tue Aug 05, 2008 7:04 am
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 :)