Menu

Array.api

Anonymous
2017-03-01
2017-03-01
  • Anonymous

    Anonymous - 2017-03-01

    Hello,

    I do not know, if my problems are the results of a bug, but I can't find a way to fix it.

    I tried to use the function Array.length(Array name) , i found in the apiFile Array.Api, to get the length of an Array.
    But ervery time i try, i get the error message "...is not a function".

    Here is my Code:

    var arrayDirectory = scriptThread.readDirectory(pathDirectory, false, false, true, false);
    var arrayLength = Array.length(arrayDirectory);

    In the script editor the drop down menu looks funny:

    [cid:image003.jpg@01D29296.0DDFB4C0]

    Is this a bug, or the result of an error in the Array.api?
    Here is a screen shot of the apiFile (does something miss in line 23?):

    [cid:image004.png@01D29296.0DDFB4C0]

    Many thanks for your answer!

    Best regards
    Franz


    mailto:gaar@heidenhain.de
    tel.: +49 8669 31 4257
    fax: +49 8669 32 4257


    DR. JOHANNES HEIDENHAIN GmbH
    Dr.-Johannes-Heidenhain-Str. 5
    83301 Traunreut, Deutschland
    http://www.heidenhain.de/


    Registergericht: Traunstein / Registry Court: HRB 275 - Sitz / Head Office: Traunreut
    Aufsichtsratsvorsitzender / Chairman of Supervisory Board: Rainer Burkhard
    Geschäftsführung / Management Board: Thomas Sesselmann (Vorsitzender / Chairman),
    Hubert Ermer, Michael Grimm, Lutz Rissing

    E-Mail Haftungsausschluss / E-Mail Disclaimer: http://www.heidenhain.de/disclaimer

     
  • Stefan Zieker

    Stefan Zieker - 2017-03-01

    Hi,

    length is a property and not a function. Here is an example:

    var arrayDirectory = scriptThread.readDirectory(pathDirectory, false, false, true, false);
    for(var i = 0; i < arrayDirectory.length; i++)
    {
    //do something
    }

    Best regards,
    Stefan

     

    Last edit: Stefan Zieker 2017-03-01

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.