Previous Next        Current Page: NeXtMidas Training / Getting Started - Part 2 / Advanced Results Parameters / Objects
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
   - Advanced Results Parameters   
      - Tables   
         - Creating   
         - Accessing   
         - Modifying   
         - Advanced   
      - In-Line Functions   
      - Objects   
         - The Invoke and New Commands   
      - Using Carets   
      - Using Flag Strings   
      - Automatic Type Conversion   
      - Type Casting   
   + Lab 3   
   + Threads in NeXtMidas   
   + Lab 4   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
Applets & WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Objects
    • NeXtMidas allows results to be any type of Java Object, not just a number, String or Table.
    • NeXtMidas allows objects to be accessed using the same dot syntax used to access a table.
      • Finding methods in objects can vary based on the type of class and how it is implemented. The exact details of this can be found in the KeyObject section of the NeXtMidas User's Guide.
      • Generally, from the macro language, objects may also be reference by a digraph formed by the upper case letters in the name. For instance, the method getMyValue in the class MyStuff may be accessed as
        MyStuff.MV
        from the macro language. While this may be convenient, especially from the command line, spelling out the entire method is encouraged!
    • Most objects are accessed via their get/set/is methods.
      • An object with a value FOO will make that value visible by providing getFoo() or an isFoo() method.
      • An object with a value FOO that can be modified can make it modifiable by providing a setFoo(..) method.
      • When an object has a getFoo() method but no setFoo(..) method the value FOO is said to be "read only."
    • Constants are accessible via the dot syntax as well.
    • Previously, public variables were accessible via the dot syntax. However, this behavior has been deprecated as it is bad practice to declare public variables and it causes problems for backward-compatibility.
Java Experts Take Note:
The use of the getFoo(), isFoo(), and setFoo(..) methods follows the definition of a Java Bean. This provides for immediate compatibility with all objects that follow the Java Bean specification.