View Issue Details

IDProjectCategoryView StatusLast Update
0025525CommunityOCCT:Application Frameworkpublic2017-05-25 15:23
ReporterVico Liang Assigned Tompv  
Status newResolutionopen 
PlatformWindowsOSVC++ 2013 
Product Version6.8.0 
Target VersionUnscheduled 
Summary0025525: TObj_Model shoulde not call its virtual method GetApplication() in constructor.
DescriptionCode snippet:
TObj_Model::TObj_Model ()
  myMessenger = GetApplication()->Messenger(); // VICO: Calling virtual method GetApplication().

const Handle(TObj_Application) TObj_Model::GetApplication()
  return TObj_Application::GetInstance();
Steps To ReproduceCalling virtual method in constructor is not recommended.
It might not work as expected. It make user failed to derive TObj_Application even if user overrides the GetApplication() method in TObj_Model.
What about removing the codes in constructor? The Messenger can be set after model creation.
TagsNo tags attached.
Test case number


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2014-11-27 16:00 Vico Liang New Issue
2014-11-27 16:00 Vico Liang Assigned To => szy
2015-12-15 14:06 abv Target Version 7.0.0 => 7.1.0
2016-02-17 18:19 szy Assigned To szy => mpv
2016-10-25 16:10 mpv Target Version 7.1.0 => 7.2.0
2017-05-25 15:23 mpv Target Version 7.2.0 => Unscheduled