Is it possible to check from code if there are enough resources
to create an object ? Or should I use exception handlings
as the only way to do this ?
Regards,
Rafal
Not really, no.
Or should I use exception handlings
> as the only way to do this ?
Yes and no. If your app is designed well, this situation shouldn't occur.
The most likely cause is to have 25 autocreated forms, each containing 100
edit fields & combo boxes or some such.
This is asking for trouble. The remedy is to create/free forms on the fly as
needed.
--
Regards,
Dirk Claessens
---------------------------------------------------------
http://www.claessens16.yucom.be
Attention: All spamshields raised; E-mails will bounce!
---------------------------------------------------------
> > Is it possible to check from code if there are enough resources
> > to create an object ?
>
> Not really, no.
This clears up a little.
> Yes and no. If your app is designed well, this situation shouldn't
occur.
> The most likely cause is to have 25 autocreated forms, each
containing 100
> edit fields & combo boxes or some such.
> This is asking for trouble. The remedy is to create/free forms on
the fly as
> needed.
I don't mean components. I've got an application that can open
multiple
files. For each file I have to create an object that handle it. Now
wonder
what will happen if a user tries to open 100 or more files at once ? I
have
to have some protection. I've only thought that there is a way to
check
whether objects can be created or not.
Regards,
Rafal