JavaScript? Trying to get a handle on doc.icons -Issue 1

Ask a Question related to Adobe Acrobat Windows, Design and Development.

  1. #1

    Default JavaScript? Trying to get a handle on doc.icons -Issue 1

    I got this right out of the Acrobat Javascript Ref with the only difference being that I made it a document level function script that I call from the console, they just typed the whole thing in the console.

    //list all named icons for doc
    function getIconList()
    {
    for (var i = 0; i < this.icons.length; i++) { console.println("icon[" + i + "]=" + this.icons[i].name); } }

    But I got this error...

    getIconList()
    TypeError: this.icons has no properties
    4:Document-Level:getIconList
    undefined

    Isn't 'this' kosher at the document level in reference to the doc object?
    Garrett_Cobarr@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Help!! Little yellow javascript icons
      Can anyone help me with this problem... there are little yellow javascript icons that I can't delete from the page in contribute it just keeps...
    2. TreeItemRenderer and Icons Issue
      Hi, i'm having the following problem with my custom TreeItemRenderer. I have 3 kinds of nodes. Company (tipo = 0), User (Tipo = 1) and...
    3. View Menu selection options (Large icons, Small icons, List, Details or Thumbnails)
      In the View Menu option of the File Save or File Open menus (4th icon to the right of the Save In or Look In drop-down boxes) Acrobat 5.0 gives you...
    4. PHP/Javascript issue
      hi, I wrote the following code to display thumbnails of all images in a certain folder ($rep). clicking on the image should open a popup in full...
    5. Tool Palette Icons Won't Show Additional Icons
      Have deleted Preferences file for PS 7, uninstalled and reinstalled the program and still I can't see any of the icons below the ones on top. Other...
  3. #2

    Default Re: JavaScript? Trying to get a handle on doc.icons -Issue 1

    If there are no icons in the PDF then you will get that error. Before you attempt to use the icons object, you should check to make sure it returns somthing other than null.

    George
    George_Johnson@adobeforums.com Guest

  4. #3

    Default Re: JavaScript? Trying to get a handle on doc.icons -Issue 1

    Thanks George! Now I am not chasing that ghost.
    Garrett_Cobarr@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139