Cor Nouws wrote:
Hi,
I've functions in which quite often properties for controls are set.
Thus I could do A)
n times
oCtrl = oDlgDoc.getControl("name")
oCtrl.setSomething
or B) n times
SetMyControlProp ("name")
which calls
Sub SetMyControlProp (sN$)
oCtrl = oDlgDoc.getControl("name")
oCtrl.setSomething
End Sub
B) looks cleaner.
However, I've no idea if A or B is faster of better reg. memory usage.
Any ideas?
Thanks,
Cor
If I want to know, I place a loop around and count the system ticks to
perform the action a few thousand times.
If execution time is sufficient, don't worry about it. If it is a
problem, consider storing a reference to the control in a global
variable and then access them directly.
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]