triyng to execute the following code, after window closing - in debug mode - I obtain this warning message:
"attempt to release <unknown> object"
the code opens a window with a canvas, and repeatedly grabs canvas to an image drawing something on it at each cycle; but the changes only take place when mouse is moved over the canvas area (not simply positioned 'over' canvas, but 'moving' on it).
This code acts as a model for a more complex piece of software, but I can't figure out the warning message, nor the canvas refreshing behavior.
Some ideas?
; ====================
; === here is the code
win=CreateWindow("win",200,200,300,300,0)
x=ClientWidth(win)
y=ClientHeight(win)
can=CreateCanvas(10,10,200,200,win)
img=CreateImage(200,200)
Repeat
SetBuffer CanvasBuffer(can)
Cls
DrawImage img,0,0
Color Rnd(256),Rnd(256),Rnd(256)
Rect 10,10,100,100
SetBuffer ImageBuffer(img)
GrabImage img,0,0
FlipCanvas(can)
e=WaitEvent()
Select e
Case $803
End
End Select
Forever
; === end of code
"attempt to release <unknown> object"
the code opens a window with a canvas, and repeatedly grabs canvas to an image drawing something on it at each cycle; but the changes only take place when mouse is moved over the canvas area (not simply positioned 'over' canvas, but 'moving' on it).
This code acts as a model for a more complex piece of software, but I can't figure out the warning message, nor the canvas refreshing behavior.
Some ideas?
; ====================
; === here is the code
win=CreateWindow("win",200,200,300,300,0)
x=ClientWidth(win)
y=ClientHeight(win)
can=CreateCanvas(10,10,200,200,win)
img=CreateImage(200,200)
Repeat
SetBuffer CanvasBuffer(can)
Cls
DrawImage img,0,0
Color Rnd(256),Rnd(256),Rnd(256)
Rect 10,10,100,100
SetBuffer ImageBuffer(img)
GrabImage img,0,0
FlipCanvas(can)
e=WaitEvent()
Select e
Case $803
End
End Select
Forever
; === end of code