write(theFile,???File Created by DWfile???);
}
}
1047
Customizing Dreamweaver 33
Note how the C-level extension name, DWfile, is used to call the library and its internal functions. After
the library has been initialized, it can be addressed as any other internal function, and its routines are simply
called as methods of the function using JavaScript dot notation, such as DWfile.exists(theFile).
Building C-level extensions
You must follow strict guidelines to enable Dreamweaver to recognize a C-level extension. Specifically, you
must include two files in the library, and you must declare each function for correct interpretation by
Dreamweaver??™s JavaScript interpreter.
Adobe engineers have developed a C-Level Extension API in the form of a C header, mm_jsapi.h, that
contains definitions for more than 20 data types and functions. To insert mm_jsapi.h in your custom
library, add the following statement:
#include ???mm_jsapi.h???
You can find the latest version of mm_jsapi.h on the Dreamweaver Exchange, which you
can get to by choosing Help ??? Dreamweaver Exchange in Dreamweaver or by loading the
URL www.macrromedial.com/exchange/dreamweaver in your browser.
After you??™ve included the JavaScript API header, you declare a specific macro, MM_STATE.
Pages:
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779