>>>>My application has a global object (oApp). I want to add a property to this global object, oApp.text_forecolor and set the value of this property (at the top of the application). E.g.
>>>>
>>>>oApp.text_forecolor = "230,23,44"
>>>>
>>>>
>>>>Then every text box of the application, when being instantiated, will set the forecolor to this value. Example:
>>>>
>>>>*-- Some textbox
>>>>INIT Method
>>>>this.forecolor = oApp.text_forecolor
>>>>
>>>>
>>>>Would it make more sense (for the speed) to use the Access method instead of the INIT method to set the textbox ForeColor?
>>>>
>>>>Thank you.
>>>
>>>I don't think there will be any noticeable speed difference. But you don't really need to set this value programmatically at all. Instead you create a forecolor_access method:
>>>
>>>*Textbox.forecolor_access
>>>return oApp.text_forecolor
>>>
>>>If your application has a subclassed textbox class (and it really should), you only need to do this in this subclass.
>>
>>Thank you very much. I will try the approach you suggest.
>
>I just checked, and it looks like you can NOT use the backcolor_access approach I suggested. Clearly the controls themselves use the "real values. So go for the init version you mentioned.
I thought this shouldn't work, but then I'm a bit out of the loop and didn't have a ready example to try it on, so I waited to see :). I think the access methods work on programmatic access to a property, ie. when it's used in an expression, not when runtime uses a property to render a graphic element (unless it's one of dynamic* properties in a column, which are eval()ed and thus are treated as expressions).