Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO: Prevent browsing of the namespace extension

 
Subscribe to the RSS feed for this forum  Forum Index -> EZNamespaceExtensionsMFC
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Wed Aug 20, 2008 11:54 am    Post subject: HOWTO: Prevent browsing of the namespace extension

Under some conditions or circumstances, it may be desirable to prevent the user from browsing the namespace extension (either the root folder or any interior folder). To achieve this, simply throw an exception from the GetChildren function of the CNSEFolder derived class representing the root folder or interior folder of the namespace extension.

BOOL CFolderItem::GetChildren(CGetChildrenEventArgs& e)
{
if(some condition satisfied)
throw new CException(); // Prevent browsing to this folder
}


Note
If the folder uses custom views, the GetChildren function is never called. In this case, simply throw the exception in the GetCustomView overridden function.
Back to top
Display posts from previous:   
Forum Index -> EZNamespaceExtensionsMFC All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group