I'm having illegal access errors when I try to use a ponter from my CAknSettingItemList derived object from my CAknView derived object in the DoActivateL method:
I can't understand the problem since this code is the same than the one that's automatically generated when a UI Design is added to a project.Code:---------------------------------------------------------------------------------------------------- PGHome.h file: ---------------------------------------------------------------------------------------------------- #include <aknsettingitemlist.h> #include "PGHomeSettings.h" class MEikCommandObserver; class PGHomeSettings; class CPGHome : CAknSettingItemList { ... } ---------------------------------------------------------------------------------------------------- PGHomeView.h file: ---------------------------------------------------------------------------------------------------- #include <aknview.h> #include "PGHome.h" class CPGAppUi; class CPgHomeView : public CAknView { public: ... void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage ); ... private: TPGHomeSettings* iSettings; CPGHome* iPGHome; } ---------------------------------------------------------------------------------------------------- PGHomeView.cpp file: ---------------------------------------------------------------------------------------------------- #include "PGHome.h" void CPGHomeView::DoActivateL( const TVwsViewId&, TUid, const TDesC8& ) { SetupStatusPaneL(); if ( iPGHome == NULL ) { iSettings = TPGHomeSettings::NewL(); iPGHome = new ( ELeave ) CPGHome( *iSettings, this ); iPGHome->SetMopParent( this ); //illegal access from 'CPGHome' to protected/private member 'CCoeControl::SetMopParent(MObjectProvider *)' iPGHome->ConstructFromResourceL( R_PGHOME_PGHOME );//illegal access from 'CPGHome' to protected/private member 'CAknSettingItemList::ConstructFromResourceL(int)' iPGHome->ActivateL();//illegal access from 'CPGHome' to protected/private member 'CCoeControl::ActivateL()' iPGHome->LoadSettingValuesL(); iPGHome->LoadSettingsL();//illegal access from 'CPGHome' to protected/private member 'CAknSettingItemList::LoadSettingsL()' AppUi()->AddToStackL( *this, iPGHome );//illegal access from 'CPGHome' to protected/private member 'CCoeControl::' } } ----------------------------------------------------------------------------------------------------
Any help will be appreciated.

Reply With Quote

