Pointui » Home 2 Scripting Support

[DEV] Class - Call a function from applet class, and change String or int values

(7 posts)
  • Started 11 months ago by djxfma
  • Latest reply from zelendel
  • This topic is not resolved
  1. djxfma
    Member

    Hi,

    How can you call a funtion from another class, and change String, int, etc... I have a class called PointSenseContactsApplet: Applet and a class called ContactRow: Control now I want to call a function and change variables and so on from the applet class PointSenseContactsApplet: Applet, I can't find any documentation about this process. So thats where I need help of other dev's, so please help me out here

    Greetz,
    DJXFMA

    Posted 11 months ago #
  2. I've send you an email!
    Hope this help!:)

    Posted 11 months ago #
  3. djxfma
    Member

    Thx for youre response goint to try it :)

    Posted 11 months ago #
  4. djxfma
    Member

    If i understand correctly, you want call a function in applet from a child class (ex:ContactRow). It's impossible, but you can raise an event from child class. It means: when you want LoadContact() again, in child class you raise an event (ex:OnNeedReloadContact), and in applet you catch the event then call LoadContact().
    Hope this help!

    An example please, can't figure it out..

    What I have tried is beneath


    class PointSenseContactsApplet: Applet{
    void Load(){
    OnNeedReloadContact = LoadContacts();
    }

    void LoadContacts(){
    }
    }

    class ContactRow: Control{
    void delete(){
    Event OnNeedReloadContact;
    }
    }

    Posted 11 months ago #
  5. djxfma
    Member

    @all
    Finaly, I figured it out :)

    Posted 11 months ago #
  6. djxfma
    Member

    Solution


    class PointSenseContactsApplet: Applet {
    ContactRow c;
    c.OnNeedReloadContacts = reload;
    }

    class ContactRow: Control {
    Event OnNeedReloadContacts;

    void delete_contact(){
    OnNeedReloadContacts();
    }
    }

    Posted 11 months ago #
  7. Glad to hear it!!!

    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in to post.