Error in TGeoNavigator

Hi rooters,
when I try to define a new navigator using ; say:
TGeoNavigator *navig = new TGeoNavigator(gGeoManager);
Int_t inav = gGeoManager->AddNavigator(navig);
gGeoManager->SetCurrentNavigator(inav);

I keep getting the error:
Error: Can’t call TGeoManager::AddNavigator(navig) in current scope…

Any ideas why?