home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / www / afc / afc-dir / tooltype_all.lha / ToolType_Examples.lha / Examples / ToolType_Example1.e < prev   
Text File  |  1997-08-05  |  691b  |  38 lines

  1. /*
  2.  
  3.   ToolType Example 1 - (C)Copyright Amiga Foundation Classes
  4.  
  5.   Written By: Fabio Rotondo
  6.  
  7.   Public Domain Source
  8.  
  9.  
  10.   NOTE: This program will happily fail, raising an exception
  11.         if you don't provide a _valid_ icon for it and don't
  12.         modify the tooltypes... see docs!
  13.  
  14. */
  15.  
  16. MODULE 'afc/tooltype', 'afc/explain_exception'
  17.  
  18. PROC main() HANDLE
  19.   DEF ttype:PTR TO tooltype
  20.   DEF s
  21.  
  22.   WriteF('This is a little try of tooltype\n')
  23.  
  24.   NEW ttype.tooltype(TRUE)
  25.  
  26.   WriteF('Everything Is Fine\n')
  27.   s:=ttype.get('MYTRY')
  28.   IF s THEN WriteF('Get() Result:\s\n', s)
  29.  
  30.   s:=ttype.match('MYTRY','FABIO')
  31.   WriteF('Match Result:\d\n', s)
  32.  
  33. EXCEPT DO
  34.   explain_exception()
  35.   END ttype
  36. ENDPROC
  37.  
  38.