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

[amibroker] Re: JScripts - some debugging help needed


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: [amibroker] Re: JScripts - some debugging help needed
  • From: "jtelang" <jtelang@xxxxxxxxx>
  • Date: Wed, 31 Dec 2003 09:35:08 -0800
  • In-reply-to: <DMEDJAMKNDFPLGAOOJHCEEKEDHAA.williampeters@sympatico.ca>

PureBytes Links

Trading Reference Links

Ah, ok. I didn't realize that you guys wanted to do this just using 
AFL...

Jitu

--- In amibroker@xxxxxxxxxxxxxxx, "William Peters" 
<williampeters@xxxx> wrote:
> Thanks for that and yes I agree with you. I'm aware that JScript 
and VBScript work but I would be interested to know how to get an 
AmiBroker object to return a count from AFL as described. We are 
given the possibility to create an object so how do we call the 
methods and properties of that object using AFL? 
> 
> Regards,
> William Peters
> www.amitools.com
> 
> 
> 
> -----Original Message-----
> From: jtelang [mailto:jtelang@x...]
> Sent: Wednesday December 31, 2003 12:14 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: JScripts - some debugging help needed
> 
> 
> William/Dingo,
> 
> Following line is a suspect -
> 
> >   oStocks = oAB.Stocks();
> 
> In AFL world, what are you expecting oStocks to be -- an AFL array, 
a 
> constant, a string or a JScript array of objects? I could be wrong, 
> but I don't think you can treat such return values in pure AFL 
world 
> as if you were dealing with a JScript world. I'd think a more 
> appropriate way to do it would be as follows, which does seem to 
> work -
> 
> // ------------
> EnableScript("JScript");
> oAB = CreateStaticObject("Broker.Application");
> 
> // NOTE FOLLOWING TWO LINES
> oStocks = oAB.Stocks();
> dummyResults = oStocks.DummyFunction();
> 
> myVersion = oAB.Version();
> myCount = 0;
> <%
> ab = new ActiveXObject( "Broker.Application" );
> AFL("myCount") = ab.Stocks().Count;
> %>
> Filter=1;
> AddColumn(myCount, "Count");
> AddTextColumn(myVersion,"Version");
> // --------------
> 
> Also, note the two lines where marked. It seems on return values 
like 
> oStocks, AB doesn't complain if it can't find the called method. 
> Actually I think that's going too far. AB doesn't probably even 
know 
> what type it is unless it can convert the original return value 
> (oStocks) into an array, a constant or a string. But that's just a 
> guess. 
> 
> Hope this helps.
> 
> Jitu


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/amibroker/

To unsubscribe from this group, send an email to:
 amibroker-unsubscribe@xxxxxxxxxxxxxxx

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/