[GME-commit]
GMESRC/GME/ObjectInspector ObjectInspectorCtl.cpp, 1.38, 1.39
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Mon Mar 26 12:29:51 CST 2007
Update of /project/gme-repository/GMESRC/GME/ObjectInspector
In directory escher:/tmp/cvs-serv2405
Modified Files:
ObjectInspectorCtl.cpp
Log Message:
GetMgaObjects property getter fixed/implemented.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: ObjectInspectorCtl.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/ObjectInspector/ObjectInspectorCtl.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ObjectInspectorCtl.cpp 16 Jan 2007 17:52:24 -0000 1.38
--- ObjectInspectorCtl.cpp 26 Mar 2007 18:29:48 -0000 1.39
***************
*** 367,379 ****
LPUNKNOWN CObjectInspectorCtrl::GetMgaObjects()
{
! if (m_objects == NULL) {
return NULL;
}
! CComPtr<IUnknown> unk;
! if (FAILED(m_objects.QueryInterface(&unk))) {
! ThrowError(CTL_E_INVALIDPROPERTYVALUE, _T("Unable to cast MgaObject."));
return NULL;
}
! return unk;
}
--- 367,398 ----
LPUNKNOWN CObjectInspectorCtrl::GetMgaObjects()
{
! if( !m_objects) {
return NULL;
}
!
! CComPtr<IMgaObjects> obj_coll;
! try
! {
! long len = 0;
! COMTHROW( m_objects->get_Count( &len));
!
! if( len >= 1)
! COMTHROW( obj_coll.CoCreateInstance( L"Mga.MgaObjects"));
!
! ASSERT( obj_coll);
! for( long i = 1; i <= len; ++i)
! {
! CComPtr<IMgaObject> obj;
! COMTHROW( m_objects->get_Item( i, &obj));
!
! ASSERT( obj);
! COMTHROW( obj_coll->Append( obj));
! }
! } catch(...) {
! ThrowError(CTL_E_INVALIDPROPERTYVALUE, _T("Unable to cast IMgaObjects collection"));
return NULL;
}
!
! return obj_coll.Detach();
}
More information about the GME-commit
mailing list