Re: Problem freeing components with .free



Thanks for all answers!

RemoveComponent() didn't work for my program because the owner of
components was nil (maybe works with other owners) and because I was
renaming other components, so there was a conflict with component's
names.

I don't understand the differences of using ram directly and virtual
memory, but I think windows virtual memory is not the fastest option
in my case. Anyway, thanks for the tips Hans-Peter!

Tried Rob's suggestion and it worked like a charm! Just if anyone is
having some similar problem:

Onclick handler calls a saveimageshandler() procedure.
saveimageshandler() procedure posts a message to the form.
saveimages() receives the message, do saving routines and destroys all
the components with no other troubles!

As a user, I find it disconcerting when a button disappears as soon as I
click it. If I'm not paying very close attention, or if my finger slips,
I don't have any visual cue about _what_ I just accidentally pressed.


Will the button re-appear when there are more images to edit? Would it
make sense to simply disable the button instead of destroying it?

I agree. But this program will be used just in my office by one or two
trained person, so this problem may not be really a problem.

Again, thanks for all you guys!

.


Quantcast