call object's own function.

Discussion in 'iOS Development' started by lgchicken, May 11, 2008.

  1. lgchicken

    lgchicken New Member

    Joined:
    Apr 12, 2008
    Messages:
    80
    Likes Received:
    1
    hey,
    edited:
    to sum up my post.. how do i get an object's function to call one of the other functions in the object?
    [self function]; ?
    [self function]; ?
    [function]; ?
    i couldnt get these working.

    also, is there a parent tree thing which you can climb, refering to variables in an objects parent?


    thanks for the help

    Please Register or Log in to view images

  2. lgchicken

    lgchicken New Member

    Joined:
    Apr 12, 2008
    Messages:
    80
    Likes Received:
    1
    okay, i think i have answerd my own question...
    firstly, to call one's own function, an object must call
    [self function]
    to call it's parent's (initiator's rather) function, it must be first told who called it,
    personally i made my initiation function send 'self' from the parent..
    then the child can call this 'parent' and tell it what to do with
    [parent function]

Share This Page