Hi Sam,
Could I see your whole code? I bet you are using your form object after it has been destroyed, e.g.:
Code: Select all
File f;
GetInputFromUser input { };
input.Modal();
f = FileOpen(input.str, read);
Would be wrong, because (at the moment) eC
local variables (inside a function/method) start with a reference count of 0.
I plan to fix this in the future (hopefully in 2013
), so that they are auto managed just like global and member instances...
So the work around is to manually increment/delete the reference:
Code: Select all
File f;
GetInputFromUser input { };
incref input;
input.Modal();
f = FileOpen(input.str, read);
delete input;
Alternatively, you can make the instance a persistent global or member instance.
Regards,
Jerome