Satimage Previous
Controlling an object
Home Documentation Smile Smile's objects Controlling an object  
To manipulate objects, you use the following set of four commands:
  • make new: create a new object of the specified class, and get a reference to it.
    set theDlog to make new dialog
    Here the dialog is created at the first level - it belongs directly to the application. When you create an object as a new element of an existing object (its container), you use the at preposition:
    set theButton to make new dialog item at theDlog with properties thePpties
  • delete: delete the specified object. Changes will not be saved.
    delete theButton
  • set: change the value of a property of an object.
    set name of theDlog to "my 1st dialog"
  • get: evaluates a reference (for instance, a reference to a property of an object).
    set theBounds to (get bounds of theDlog)
    set theItem to (get dialog item 2 of theDlog)
    In many circumstances get is optional, though we recommend to use it systematically, to prevent any unexpected ambiguity.
Version française
Copyright ©2008 Paris, Satimage