![]() |
|
phGantTimePackage FAQ 10504What is the difference between the classes CphDataEntity_Tree and CphDataEntity_Tree2? Please note that this article
refers to the phGantTimePackage Jump to article- 2006-03-24 16:52:00 - Email plexityHide Question I'm using phGantXControl.ocx What is the difference between the classes CphDataEntity_Tree and CphDataEntity_Tree2? I have a CphDataEntity_GantTime item and I want to access to grid rows. It seems that the only way to do this is to use the property GridRowIndex of the class CphDataEntity_Tree2, but I cannot get any CphDataEntity_Tree2 item from my CphDataEntity_GantTime item. Answer This is the naming convention when designing a new interface with more functionality: Ix = version one of the interface; Ix2 = version two of the interface. So CphDataEntity_Tree2 is only a more competent version of CphDataEntity_Tree.You can type cast from a CphDataEntity_Tree to a CphDataEntity_Tree2 to access the extended functionality with QueryInterface This is from the help file, the section called "Understanding interfaces" Type castingIn VB6 you can do a interface type casting like this: Dim tn As IphDataEntity_Tree2 Set tn = theDataEntity.Row.TreeNode The ?theDataEntity.Row.TreeNode? returns a IphDataEntity_Tree but we want to use it as an IphDataEntity_Tree2 in order to reach newer functionality. In Delphi you would do it like this tn : IphDataEntity_Tree2; begin tn := theDataEntity.Row.TreeNode As IphDataEntity_Tree2;
In VC++ you would do it like this: CphDataEntity_Tree2 treenode; treenode=CphDataEntity_Tree2(theDataEntity.GetRow().GetTreeNode()); .
|
"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%" |
| ? 1999-2006 PlexityHide.com Grastensvagen 24, S-163 45 Spanga Sweden E-mail: support@plexityhide.com |