[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] AFL GetScriptObject - Is new instance created everytime it is called??


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] AFL GetScriptObject - Is new instance created everytime it is called??
  • From: "Tomasz Janeczko" <amibroker@xxxxxx>
  • Date: Tue, 4 Apr 2006 21:02:20 +0200

PureBytes Links

Trading Reference Links

Hello,
 
Yes the answer is CreateStaticObject() but to use that you should write in AFL. Having said that
I don't know why you need to code this in JScript and why you need to use JScript to read the data from the file.
 
AFL has file reading functions as well and allows to call external OLE objects as well.

CreateStaticObject is AFL-only function and not available to JScript.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Tuesday, April 04, 2006 7:20 AM
Subject: [amibroker] AFL GetScriptObject - Is new instance created everytime it is called??

 
 
I would like to create a AFL function which defines a portion of the code in JScript. use GetScriptObject to create and instance and call it multiple times.
 
I would like to create a DictionayObject within JScript to read data from a file.
 
I am trying to understand if the DictionaryObject gets created every time the AFL function is called.
 
I am trying to see if the JScript could create the Dictionary object once if it is not already defined within the interpreter and read an populate it from a file.
That way I am hoping the reading from file does not happen every time the function is called.
This would work, only if there is one instance of the script interpreter per Amibroker, somehting similar to GetStatiObject.
 
I know GetStaticObject would apply to my case, but I don't understand how I can use JScript code.
 
Will this work. 
 
 
Thx
Sarvi
 
 
 
-----------------------------------------------------------------------------------
Sarvi Shanmugham
Technical Leader
Cisco Systems Inc.
Phone: 408-902-3875
 


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS