home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Mac / Lib / lib-scripting / Table_Suite.py < prev    next >
Encoding:
Python Source  |  2000-06-23  |  1.8 KB  |  107 lines

  1. """Suite Table Suite: Classes for manipulating tables
  2. Level 1, version 1
  3.  
  4. Generated from flap:System Folder:Extensions:Scripting Additions:Dialects:English Dialect
  5. AETE/AEUT resource version 1/0, language 0, script 0
  6. """
  7.  
  8. import aetools
  9. import MacOS
  10.  
  11. _code = 'tbls'
  12.  
  13. class Table_Suite:
  14.  
  15.     pass
  16.  
  17.  
  18. class cell(aetools.ComponentItem):
  19.     """cell - A cell"""
  20.     want = 'ccel'
  21. class _class(aetools.NProperty):
  22.     """class - the class"""
  23.     which = 'pcls'
  24.     want = 'type'
  25. class formula(aetools.NProperty):
  26.     """formula - the formula of the cell"""
  27.     which = 'pfor'
  28.     want = 'ctxt'
  29. class protection(aetools.NProperty):
  30.     """protection - Indicates whether value or formula in the cell can be changed"""
  31.     which = 'ppro'
  32.     want = 'prtn'
  33.  
  34. cells = cell
  35.  
  36. class column(aetools.ComponentItem):
  37.     """column - A column"""
  38.     want = 'ccol'
  39. class name(aetools.NProperty):
  40.     """name - the name"""
  41.     which = 'pnam'
  42.     want = 'itxt'
  43.  
  44. columns = column
  45.  
  46. class row(aetools.ComponentItem):
  47.     """row - A row"""
  48.     want = 'crow'
  49.  
  50. rows = row
  51.  
  52. class table(aetools.ComponentItem):
  53.     """table - A table"""
  54.     want = 'ctbl'
  55.  
  56. tables = table
  57. cell._propdict = {
  58.     '_class' : _class,
  59.     'formula' : formula,
  60.     'protection' : protection,
  61. }
  62. cell._elemdict = {
  63. }
  64. column._propdict = {
  65.     'name' : name,
  66. }
  67. column._elemdict = {
  68. }
  69. row._propdict = {
  70. }
  71. row._elemdict = {
  72. }
  73. table._propdict = {
  74. }
  75. table._elemdict = {
  76. }
  77. _Enum_prtn = {
  78.     'read_only' : 'nmod',    # Can't change values or formulas
  79.     'formulas_protected' : 'fpro',    # Can changes values but not formulas
  80.     'read_2f_write' : 'modf',    # Can change values and formulas
  81. }
  82.  
  83.  
  84. #
  85. # Indices of types declared in this module
  86. #
  87. _classdeclarations = {
  88.     'ccel' : cell,
  89.     'ctbl' : table,
  90.     'ccol' : column,
  91.     'crow' : row,
  92. }
  93.  
  94. _propdeclarations = {
  95.     'ppro' : protection,
  96.     'pnam' : name,
  97.     'pfor' : formula,
  98.     'pcls' : _class,
  99. }
  100.  
  101. _compdeclarations = {
  102. }
  103.  
  104. _enumdeclarations = {
  105.     'prtn' : _Enum_prtn,
  106. }
  107.