On Jun 23, 2006, at 8:51 AM, Alexander Cohen wrote:
I'd like to be able to overide some of the graphics drawing
functions while still being to call the actual graphics function.
seomthing like this:
Sub DrawRect( extends g as graphics, x as integer, y as integer, w
as integer, h as integer )
if DEBUGDRAWING then
dim storedColor as Color
storedColor = g.ForeColor
g.ForeColor = rgb(255,0,0)
// here id like to call the actual DrawRect
g.DrawRect(x,y,w,h)
g.ForeColor = ForeColor
end if
// here id also like to call the actual DrawRect
g.DrawRect(x,y,w,h)
End Sub
Is any of this possibe. In other words, id like to be able to call
the overloaded DrawRect and also the normal rb framework drawrect.
Can i do this? How?
Not this way. Your method has the same signature as the existing
Graphics.DrawRect method, which will probably confuse the compiler.
Instead, remove the Extends keyword. Now your DrawRect method has a
different signature, and you call it as the global method that it is.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>