Discussion:
deleting Users
(too old to reply)
Alexei Babkin
2003-12-01 21:15:22 UTC
Permalink
Hi

I would like users to be able to delete themselves, upon receiving the '-'
symbol.
So what I do is I call:

uAccept(~User);

and next thing i call:

delete this;


However it gives me runtime error
Is there a proper way to do it? (task deleting itself)

Thanks
Alex
Ian MacDonald
2003-12-01 22:51:34 UTC
Permalink
you should try deleting it in the same scope under which it is defined.

a task deleting itself makes no sense since it didn't create itself.

e.

On Mon, 1 Dec 2003, Alexei Babkin wrote:

Hi

I would like users to be able to delete themselves, upon receiving the '-'
symbol.
So what I do is I call:

uAccept(~User);

and next thing i call:

delete this;


However it gives me runtime error
Is there a proper way to do it? (task deleting itself)

Thanks
Alex
Caroline Kierstead
2003-12-02 14:27:25 UTC
Permalink
Post by Alexei Babkin
Hi
I would like users to be able to delete themselves, upon receiving the '-'
symbol.
uAccept(~User);
You don't need this, since the user can just break out of its loop and
terminate upon receiving '-'.
Post by Alexei Babkin
delete this;
An object cannot delete itself in this fashion.
Post by Alexei Babkin
However it gives me runtime error
Is there a proper way to do it? (task deleting itself)
See above.
--
--
Caroline Kierstead, Instructional Support Coordinator
University of Waterloo, DC3138 (519) 888-4567 x6226
Loading...