Advertisement
imk0tter

Untitled

Apr 9th, 2011
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.81 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; Description: Used to call the first found method   ;
  3. ; associated with an objects inheritance tree...     ;
  4. ;                                                    ;
  5. ; Usage: $Object(<Instance>,..).<Method>             ;
  6. ; Example: $Object(%stack,$2).add                    ;
  7. ; Equivelent: $List(%stack,$2).add                   ;
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9. alias Object {
  10.   var %x 1,%y $hget(Objects,$1.INIT),%a ,,
  11.   while ($token(%y,%x,32)) {
  12.     var %z $v1
  13.     if ($isalias(%z $+ . $+ $prop $+ .Public)) {
  14.       return $(,$ $+ %z $+ $chr(40) $+ $1 %a $2 %a $3 %a $4 %a $5 %a $6 %a $7 %a $8 %a $9 %a $+ $chr(41) $+ . $+ $prop)
  15.     }
  16.     inc %x
  17.   }
  18.   return $catch($1,MemberErr,$prop is not a public member of $isinstance($1))
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement