Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed misspellings of Gettor and Settor to Getter and Setter and interchangable to interchangeable


Maybe We Made It too Flexible?

Methods and a property gettors getters (both non-indexed and indexed) are pretty much the same thing, and in most cases, they are interchangableinterchangeable.  So the following two lines of code do the same thing:


  • To get a property value, simply call it as a method.  Alternately (to match settor setter syntax), you can prefix the property name with _get

To set a property value,  prefix the property name with _set or _put.  The last argument passed to the method is the value.

Code Block
//GettorsGetters, all equivalent.
println worksheet.Cells.Item[row+1,1]
println worksheet.Cells.Item(row+1,1)
println worksheet.Cells._getItem(row+1,1)

//SettorsSetters, all equivalent.
worksheet.Cells.Item[row+1,1] = new Date()
worksheet.Cells._setItem(row+1,1, new Date())
worksheet.Cells._putItem(row+1,1, new Date())