YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

access this from inner table.
mariusco
#1 Posted : Wednesday, July 11, 2018 1:51:20 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/11/2018(UTC)
Posts: 1
Location: toronto

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
How do I access the instance from inner table function ?
Explicit:
- how do I call basefoo from do_some, passing parent class instance

Code:


class Base
{
    function basefoo(inst)
    {
        print (inst.var1);
    }    
}



class FromBase extends Base
{

    some =
    {
        var1="asdfasd",
        function operate()
        {
            // I dont wnt to pass this.
            // how do I call Base::basefoo  passing some, or FromBase::this
        },        
        function operate_with_o(obj)
        {
            obj.basefoo(this);   // OK
        }        
    
    }


    function do_some()
    {
        some.operate_with_o(this);   // I dont want to pass this...
    }



}

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.067 seconds.