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
StartDrawing(WindowOutput(0))=null
-
jamirokwai
- Enthusiast

- Posts: 799
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
Re: StartDrawing(WindowOutput(0))=null
Hi WilliamL,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?
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
JamiroKwai
Re: StartDrawing(WindowOutput(0))=null
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???
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???
Re: StartDrawing(WindowOutput(0))=null
Great news!aaron wrote:The Intel version for OSX is in alpha testing right now.
Thanks
William
-
jamirokwai
- Enthusiast

- Posts: 799
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
Re: StartDrawing(WindowOutput(0))=null
I bought PureBasic a few weeks ago. If you do not code fullscreen-applications,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???
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
JamiroKwai
