[OGo-Developer] reload contents of page when clicking a tab?

Helge Hess developer@opengroupware.org
Fri, 13 Apr 2007 11:56:38 +0200


On Apr 12, 2007, at 06:52, Sebastian Reitenbach wrote:
> When I jump between e.g. MailUI and the AsteriskUI, then the Arrays  
> are
> updated.

I think thats because the current page is cached in the navigation  
object. So it isn't reinitialized.

> Do I can force an update of the Arrays on every click of a tab?

Bind an action method to the tabitem and refresh the ivars you want  
to refresh?


If you always want to refresh you can do this:

   - (NSArray *)myCalls {
     if (self->myCalls == nil)
        .... calculate them
     return self->myCalls;
   }

   - (void)sleep {
     [self->myClass release]; self->myCalls = nil;
     [super sleep];
   }

Its not exactly recommended because accessor methods should not have  
side effects, but its used that way in a lot of places nevertheless ...

Greets,
   Helge
-- 
Helge Hess
http://www.helgehess.eu/