PROTOTYPE is one of those commands I've barley used, I always seem to run into problems with trying to get them to do things that they dont want to do. :S
This is probably another example but here goes...
As you can see by this code, I am trying to prototype a function within a type to another function within a type (I need the function to have access to .self) but that's a no-go with the compiler. Is it possible at all?
Here is my simple test code...
PROTOTYPE update_proto:
TYPE tt
x#
update AS update_proto
FUNCTION SetUp:
// self.update = self.myupdate
ENDFUNCTION
FUNCTION myupdate:
self.x# = 1
ENDFUNCTION
ENDTYPE
GLOBAL t AS tt
t.SetUp()
t.update = t.myupdate
t.update()
Anyone see a way what I am doing wrong here?
PROTOTYPE can only be used with standard functions unfortunately - it wont (currently) work with the prototyped function being in an extended type.
Bummer! I kind of thought that may be the problem but I just hoped my syntax was wrong.
Ah well, thanks for the heads up Mr T.