In Power Language how to use Vector class of ELcollections

Questions about MultiCharts and user contributed studies.
lianjose
Posts: 4
Joined: 12 Nov 2013
Has thanked: 1 time

In Power Language how to use Vector class of ELcollections

Postby lianjose » 12 Nov 2013

How can I use the Vector class of ELcollections.dll in Power language code.
I want to declare a Vector class variable like

elsystem.collections.Vector CustomVol( Null );

- the above line imported from Easy Language is not getting complied in Power Language,
Power language is not identifying the class Vector of collections namespace.

I had imported the Elcollections.Eld and also set reference to elcollections.dll in Multichart folder

Any idea on this is highly appreciated!!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: In Power Language how to use Vector class of ELcollectio

Postby Henry MultiСharts » 12 Nov 2013

Hello lianjose,

The line of the code you have provided will not work with MultiCharts (and MultiCharts .Net) as it utilizes EL Object Oriented programming features that are not curently supported. In order to make it work with MultiCharts - you need to move the EL Object Oriented code into an external DLL, that will be referenced from PowerLanguage code.

lianjose
Posts: 4
Joined: 12 Nov 2013
Has thanked: 1 time

Re: In Power Language how to use Vector class of ELcollectio

Postby lianjose » 13 Nov 2013

Hi Henry,

Thanks for your reply

Again my doubt is how can we reference an external DLL in MC?

Is it that MC doesn't support any of the object oriented features?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: In Power Language how to use Vector class of ELcollectio

Postby Henry MultiСharts » 13 Nov 2013

In order to receive information from a dll or send information from a dll into PowerLaguage code you need to use DefineDLLFunc reserved word.
DefineDLLFunc: “dll name”, the parameter dll returns, “the name of the function you refer to (inside the external dll)”, the type of the data you send to the external dll.
Usage example:
DefineDLLFunc: "GlobalVariable.dll", float, "GV_GetFloat", int ;
A detailed description and usage examples have been published in Extension Software Development Kit.

Is it that MC doesn't support any of the object oriented features?
None of EL Object Oriented programming features are curently supported.


Return to “MultiCharts”