>>>>>>>Hi
>>>>>>>
>>>>>>>I am working on enhancing my application framework. I want to add an ability to restrict a number of instances of a form. For example, one form can have only one instance, another - three.
>>>>>>>
>>>>>>>What are possible solutions of the problem ?
>>>>>>>
>>>>>>>Sincerely.
>>>>>>
>>>>>>Usually, frameworks contain specific object (form's manager) which is responsible for handling (opening, closing, etc.) forms. Usually, form manager keeps all form references in one common collection, but sometimes it's reasonable to have separate collection, e.g. in your case you may keep refs to multiple instances of the same form in separate collection, and check number of element in this collection: if it equals to three you stop instanciating.
>>>>>
>>>>>Hi Ed,
>>>>>
>>>>>Is it reasonable to have a cursor (FormName, Number_of_Instances, Already_Instanciated) to solve the problem? Or you know another solutions.
>>>>>
>>>>>Sincerely.
>>>>
>>>>Igor,
>>>>Another solution is collection.
>>>
>>>Do you mean an array bound to a property of an application manager object?
>>
>>yes, it's property-array
>
>May you recommend a book or another source on forms manager topic?
I really don't know. I have some pseudo-manager in my framework and never felt necessity to look outside.
Edward Pikman
Independent Consultant