Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Description: Used to call the first found method ;
- ; associated with an objects inheritance tree... ;
- ; ;
- ; Usage: $Object(<Instance>,..).<Method> ;
- ; Example: $Object(%stack,$2).add ;
- ; Equivelent: $List(%stack,$2).add ;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- alias Object {
- var %x 1,%y $hget(Objects,$1.INIT),%a ,,
- while ($token(%y,%x,32)) {
- var %z $v1
- if ($isalias(%z $+ . $+ $prop $+ .Public)) {
- 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)
- }
- inc %x
- }
- return $catch($1,MemberErr,$prop is not a public member of $isinstance($1))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement