FW: GetFolder(CString name) in BON

GME GME
Thu Nov 21 22:04:49 CST 2002



----------
From: 	Feng Shi
Sent: 	Thursday, November 21, 2002 4:04:47 PM
To: 	GME Group
Cc: 	Peter Volgyesi
Subject: 	GetFolder(CString name) in BON
Auto forwarded by a Rule

In BON, when user wants to get a folder with the specific name(class name), the following function will be called:
 
CBuilderFolder *CBuilder::GetFolder(CString name) const
{
            POSITION pos = folders.GetHeadPosition();
            while(pos) {
                        CBuilderFolder *folder = folders.GetNext(pos);
                        if(folder->GetName() == name)
                                    return folder;
            }
            return 0;
}
 
But there are two problems to me here:
1.	The “name” applied here seems to be the instance folder name, but not the class name in the meta model. So for some special user, if he/she changes the name of the folder once upon its creation, and he/she calls this function with the folder class name, it maybe never returns a value.
2.	If there are a multiple folders of the same type and it needs to get the whole folder list, is there any function can be used?
 
Thanks,
 
Feng
 



More information about the gme-users mailing list