Help Creating an Extension, pls.

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Help Creating an Extension, pls.

    Hi,

    I'm trying to create a new toolbar-triggered function from within Dreamweaver,
    but I'm a little lost. I'm hoping someone experienced with the DW API could
    point me in the right direction.

    Basically, I want to be able to collapse all of the functions on a page with
    the click of a button.

    Specifically, when I click the button, I want to traverse the code page, find
    any instances of the word "function", skip ahead to the first opening bracket
    ("{", and then execute the balanceBracesTextView() and
    collapseSelectedCodeFragment() functions. Then I want to repeat until the end
    of the document and/or no more functions are found.

    I've figured out the balanceBracesTextView() and
    collapseSelectedCodeFragment() functions and have those successfully tied to a
    custom code view toolbar button. However, I'm lost when it comes to taking it
    to the next level.

    I'd be very grateful if someone could provide some guidance on how I can 1)
    traverse the document to find each instance of the word "function", and 2)
    subsequently advance the cursor to the first bracket after each hit. No need
    to go into the mechanics of how to create an extension; I just need help with
    the JavaScript that makes this work.

    Many thanks,
    Steve



    SteveStringer Guest

  2. Similar Questions and Discussions

    1. extension for creating professional charts based on mysql data?
      Hi all, is there an extension for dreamweaver 8 to make professional Charts (line)? I'm using Dymanic Flash Chart but it lach an important...
    2. Extension for creating a zip file and unzipping it
      Iam totally new to Dreamweaver and the extensions. So please help me with this. Assuming i have a .zip file and it contains some html pages along...
    3. Creating a folder with DW Extension
      Has anyone figured out how to have DW JavaScript create a folder and rename it? This makes the folder: if (site.makeNewFolder()){ ...
    4. Is .dcr extension = Director file extension ?
      I'm a newbie and saw some files on a website ending in .dcr... 1 - Is the .dcr file type a Macromedia Director file? 2 - Does it take the...
    5. Two problems creating a C++ extension to Ruby
      Hello, I'm having some trouble with my first C++ extension for Ruby. The extension is a wrapper for the id3lib library providing my own interface...
  3. #2

    Default Re: Help Creating an Extension, pls.

    Did you get any answer about that?

    [url]http://aphaground.com[/url]
    AphaGround 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