Tips   >   Objectclasses   >   Data Objects
When you get fairly deep into the object-oriented mindset, you start to see that everything in Omnis Studio is an object. Objects have attributes, also know as properties, plus methods that do things. Omnis Studio classes have built in properties and methods which you can view in the
after you select the class in the .Let's say we create an object class called oApplicationProperties.
Now we decide to add some properities to this object. A public method is added to oApplicationProperties for each property. e.g.
$:AppName, $:DeveloperName, $:VersionNum/code>)
The code behind each of these property methods ends with Quit method RetValue
You can make a property assignable, by creating a $assign method for the property.
e.g. $:AppName.$assign(pAppName)
The public method name actually includes the .$assign suffix in the method name!
You can now instantiate oApplicationProperties using an instance variable in a window class, and then use the instance variable name followed by the public method name as the $dataname for the entry fields in the window class.
e.g. Instead of iList.ColName, you would use ioProperties.$:AppName
If there is a .$assign suffixed method available for a property, Omnis Studio will automatically call the $assign method in the data object just prior to the evAfter event for the entry field.
Click the button in the window to open a Data Object demo window.There are several advantages for using data objects:
There are some drawbacks to using data objects.
You can directly access the ivars in your data object. This is demonstrated in the demo included in StudioTips with the tip.
Instead of setting the $dataname property of a field to ioDataObject.$PropertyMethodName, you set it to ioDataObject.iVarName.
The advantages of doing this are:
The disadvantages of doing this are: