RemoveView from view's HandleCommandL

Login to reply to this topic.
Thu, 2005-05-26 14:18
Joined: 2005-02-21
Forum posts: 47

Hi,
  simple yet stupid problem - I have a view. And the view handles commands. I want to close that view as a responce to a command.
I can not do a RemoveView() because it will cause a panic as the object I call RemoveView from is not valid any more.
Any ideas?

Ahti.

Thu, 2005-05-26 15:46
Joined: 2005-01-31
Forum posts: 122
Re: RemoveView from view's HandleCommandL
What do u mean by "close a view"? Do you want some other view to get activated? Why would you want to close a view? The AppUi takes care of that.
Thu, 2005-05-26 19:40
Joined: 2005-02-21
Forum posts: 47
Re: RemoveView from view's HandleCommandL

I just want. My app has views coming and going. It is the nature of it. Yes, I can remove it from tab and just not to display it any more but I loose memory this way.

Ahti.
Fri, 2005-05-27 03:38
Joined: 2004-01-09
Forum posts: 188
Re: RemoveView from view's HandleCommandL
you don't need to worry about view because AppUi is taking care of it, when u do AddViewL that time u have transfered the Owenership of ur view to AppUi. U just't can't delete it, otherwise it will panic.
  Anyway u also no need to bother about memory, because view does not take much memory, what all it contains is a container and as the view get deactivate, the container should be deleted, that's what the symbian's view architecture.

BR
Chetan

----
Chetan Kulshrestha

Fri, 2005-05-27 07:43
Joined: 2005-02-21
Forum posts: 47
Re: RemoveView from view's HandleCommandL

I don't agree with this at all.
Let's say I have a editor which is capable of opening several text files to edit. I don't see it reasonable to:
1) keep them open all the time with all this richtext and stuff allocated
2) to create/delete them all the time I take a peek into other text document with DoActivate/DoDeactivate

Don't you agree?

Ahti.
  • Login to reply to this topic.