>The button also has some events tied to things such as key press and 
>mouse click. 
I have since changed this. I removed the event bindings and simply call the 
code like so:

    If oDialog.Execute() = 1 Then
        SetAllText()
    End If

Also, you hit the nail on the head. My macro uses a GLOBAL variable to hold a 
reference to the dialog. What should I do to clean up when closing the 
document? Or is this situation to be avoided altogether?

thanks
doug


> 
> 
> Douglas Staas wrote:
> 
> >i'm reposting this question:
> >
> >What is meant by "provide for disposal when the document is closed"? Where 
> >could I find this in the documentation?
> >  
> >
> Well, where did you read this? It is not possible to answer without 
> context. No wait, I just ran a GOOGLE search on the exact phrase and 
> found this:
> 
> http://www.mail-archive.com/[email protected]/msg01793.html
> 
> Next time, quote enough of the message to provide context.
> 
> Here is the entire quote:
> 
> Sounds like everything is being loaded into memory and not being released 
> when 
> you close your original document. Does your on Open Event macro provide for 
> disposal when the document is closed ?
> 
> 
> One possible reading of this is that the open document has resources, 
> such as graphics, or pointers, or some kind of internal structures. When 
> the document is closed, Alex is wondering if all of the document's 
> resources are released, deleted, freed, (no longer used). Kind of like 
> what might happen if a program opened a file and then left the file 
> opened. You could not create and use the file again, because it would 
> already be listed as open.
> 
> I have no idea where this would be in the documentation, because it 
> would depens on the type of resourced that might be causing the problem. 
> One possibility might be that your macro uses a GLOBAL variable to hold 
> a reference to a dialog. The document closes, but eh global variable 
> still exists and can therefore not be referenced again. If this were the 
> case, then loading the Basic IDE might cause these resources to be released.
> 
> This is, of course, all speculation on my part, espcially since I have 
> not seen your macro.
> 
> -- 
> 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]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to