Frank Schönheit - Sun Microsystems Germany wrote:
Hi Andrew,
While loading a form using a macro, the form disappears as soon as the
macro finishes unless I store a reference to the form definition outside
of the subroutine that loads the form.
...
Is this a bug that I should report?
Yes, please do. Forcing API developers to hold the definition object
alive to keep the document open sounds ... inconvinient to me, at least.
side notes:
- Passing an ActiveConnection to the loadComponentFromURL call should
not be necessary (if I'm not wrong) - any reasons you do so? Did it
cause problems when you didn't?
- instead of doing a loadComponentFromURL, you should also be able to
do a (shorter?)
oFormDoc = oFormDef.execute( _
"openDesign", oFormDef.createCommandIdentifier(), _
<some_null_arg> )
because a document definition is also a UCB content.
- your macro creates a connection, but does not dispose it anywhere,
which is a resource leak. I hope that this is just because you
shortened the macro :)
Thanks & Ciao
Frank
It looks like I require a command envirnment as the final argument and
it can not be NULL.... How can I get one?
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info: http://www.pitonyak.org/oo.php
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]