Good morning Jafar,

The secondary error you got was in the procedure main(), where I had left in an extraneous character in the method name. Your suggested fix has worked like a trest and all is well. I'll incorporate the change throughout my code as a permanent change.

regards

Bruce Rennie

On 08/05/2013 02:56 AM, Jafar Al-Gharaibeh wrote:

Bruce,

It is legal to reuse the same name if you are in a different scope as you found out. The class name is global while the method name is class-scope. This is not very different from having a global variable called x and a method name called x in a class where x is not the class name. If you want to access the local or class scoped x you just do it the way you usually do. If you want to override the default behavior and access the global x you should do ::x. In your code I have changed A in few places to ::A such as as:

class A : ClassClass()
    method A(a)
        return a.A()
    end
    method SetA(a, aa)
a.SetA(aa)
    end
initially()
    if not AlreadyRun(::A) then {    # change A to ::A
writeln("Initialisation of A started")
SetClass(__A)
self.ClassClass.initially()
        ::A := self                   # Change A to ::A
    }
end

This seems to have fixed the problem you are having. I believe that you wanted the class name rather than the method name in both places. This fix takes me to another runtime error that looks like you are trying to access a method name that doesn't exist. I'll leave debugging this for you since you know your code better than I do. :-)

Cheers,
Jafar



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to