Name Class of DockinkPane |
Post Reply |
Author | |
Lukas
Newbie Joined: 11 June 2008 Location: Italy Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 11 June 2008 at 6:28am |
HI,
i have a big problem...
I use VB6 and use a DataActiveReports to make reports
a class of DataActiveReport is named PANE
I add a DockingPaneManager control and
when add the statement
DIM MENU_PANEL AS PANE
this "PANE" is not a class or object of CodeJock
but is DataActiveReport's Class or Object
Somebody can help me...?
Thanks in advance
|
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
Dim MENU_PANEL As XtremeDockingPane.Pane
|
|
Lukas
Newbie Joined: 11 June 2008 Location: Italy Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Many many thanks...
and sorry for the stupid question....
Best regards...
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I think its not that stupid question. I didn't think of this before that it could happen as you have now. I didn't get any problems on my own PC (yet) but suppose there is other software installed on a client PC, what will happen???
But it's strange that it happened, if I look at the MS controls in mscomctl and comctl libraries they have the same classes too (CJ XtremeControls has the same classes for the standard controls as well) and one of our support members said (see post http://forum.codejock.com/forum_posts.asp?TID=10931) that VB won't get confused ?!?!
Now my question is: Is it wise to add Xtreme.... before every class/control ?
Thanks in advance and thank you Luca for bringing this up
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi Aaron,
I usually often add the fully qualified class/object name just out of habit, but you don't need to do this unless you have referenced two ocxs/dlls that share class names. If a user has DLLs/OCXs installed that share class names internally, it won't cause a conflict unless your project specifically references those controls/libraries. As for if it is wise...Well it doesn't hurt (AFAIK, maybe it takes longer to compile??? :)), and it could improve future maintainability (for example, suppose you add a conflictingly named control in the future, now you don't have to add the qualifiers to all of your references). |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Thanks for your reply. I never did add the class/ object name before, just because Lucas did get a problem with DockingPanes, I wondered if it was better to do so. Maybe our support team will shed a on this
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
I think it's good practice for the reason given by jbpro (future maintainability) and readability.
I find it easier to add the library name anyway because it makes the intellisense list narrower. |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Ok, you guys convinced me, I will add the library name
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
This depends by design.
The classname is actually used only for us programmers.
Internally the ide looks to the added components (ObjectBrowser) and use always the fully qualified classname.
At runtime, the classname does nothing !
The classname would be replaced by its CLSID (Class-Id).
This is the known Universal-Class-Id defined by COM.
So now in COM to create an object you need the CLSID not the Name.
But you have a helperfunction, to find the CLSID from the ClassName and for that, you need ervery time the quallified classname.
Have a look with RegEdit:
Under HKEY_CLASSES_ROOT you will find each qualified classname for this pc.
Each Class has a subkey with CLSID.
Under HKEY_LOCAL_MACHINE\Software\Classes\CLSID you will find for each CLSID the corresponding DLL/EXE in the subkey InprocServer.
This is the reason why you need adminrights to install COM-Objects.
In your VB-Projectfile you will find the CLSID, Version and expected DLL/EXE.
VB-Runtime check if all this property matches.
Normally COM checks only the CLSID and at runtime the available Methods and properties (see VB6 Object-Browser) also known as reflections, but not the same as .NET or Java.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |