Referencing

Q:

I have several forms that I have opened using form.show()

what would be the best way to reference and then close them programatically?

A:
assuming there is no fixed order or choice, I would keep an array with form name + instance identifier and form object references as columns in each row of the array.. The reason for an instance identifier (e.g., <form name> + guid() is for specific identification if a form can be opened more than once.. Then, you can use the array to close all of them. And if a form is closed manually, you can use the form+guid() property on the form to delete the row of the array, which will release the object reference there.


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s