cls calling cls?!

BlitzMax Forums/BlitzMax Programming/cls calling cls?!

Defoc8(Posted 2006) [#1]
ok..heres the problem..

type displayunit1
method Cls()
Cls() 'circular conflict...infinite looping hell
endmethod
endtype

type displayunit2 extends displayunit1
method Cls()
drawimage()
blah...
blah...
blah...
endmethod
endtype

basically as you can see i have two classes, and they
both use a method called cls() to clear the screen...
the extended class displayunit2 performs custom
clearing ops..and the base displayunit1 falls back to
default screen clearing..

what i want to do is force a call to the cls() function outwith
the object..so that the cls() in the base class doesnt call
itself..i know i can simply call it something else, but the
point is that id prefer to use this keyword..and probably
quite a few other global space function names..

is this possible?


Defoc8(Posted 2006) [#2]
mr eelhovercraft pointed out this can be solved this
way...

Public.Cls()

from within the cls() method - thanks :]


kfprimm(Posted 2006) [#3]
actually it be best to call brl.max2d.Cls()


Defoc8(Posted 2006) [#4]
fair point..