home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OL.LZH / IDOL.LZH / STRINVOK.IOL < prev    next >
Text File  |  1991-07-18  |  452b  |  19 lines

  1. #
  2. # a builtin class, subclasses of which support string invocation for methods
  3. # (sort of)
  4. # this is dependent upon Idol internals which are subject to change...
  5. #
  6. class strinvokable()
  7.   method eval(s,args[])
  8.     i := 1
  9.     every methodname := name(!(self.__methods)) do {
  10.     methodname[1 : find(".",methodname)+1 ] := ""
  11.     if s == methodname then {
  12.         suspend self.__methods[i] ! ([self]|||args)
  13.         fail
  14.     }
  15.     i +:= 1
  16.     }
  17.   end
  18. end
  19.