480
C-Level Extensibility
To build the shared library on the Macintosh using Metrowerks CodeWarrior 9
or greater:
1.
Open Sample.mcp.
2.
Build the project (Project > Make) to generate a Mach-O Bundle.
When the build operation finishes, the Sample.bundle file appears in the folder that
contains Sample.mcp.
To build the shared library on the Macintosh using Apple Xcode 1.5 or greater:
1.
Open Sample.xcode.
2.
Build the project (Build > Build) to generate a Mach-O Bundle.
When the build operation finishes, the Sample.bundle file appears in the build folder that
is next to the Sample.xcode file.
To call the computeSum() function from the Insert Horizontal Rule object:
1.
Create a folder called JSExtensions in the Configuration folder within the Dreamweaver
application folder.
2.
Copy Sample.dll (Windows) or Sample.bundle (Macintosh) to the JSExtensions folder.
3.
In a text editor, open the HR.htm file in the Configuration/Objects/Common folder.
4.
Add the line
alert(Sample.computeSum(2,2));
to the
objectTag()
function, as shown
in the following example:
function objectTag() {
// Return the html tag that should be inserted
alert(Sample.computeSum(2,2));
return "<HR>";
}
5.
Save the file and restart Dreamweaver.
To execute the
computeSum()
function, select Insert > HTML > Horizontal Rule.
A dialog box that contains the number 4 (the result of computing the sum of 2 plus 2)
appears.
NO
TE
The Mach-O Bundle that is generated can only be used in Macromedia
Dreamweaver 8. Earlier versions of Dreamweaver do not recognize it.
NO
TE
The Mach-O Bundle that is generated can only be used in Macromedia
Dreamweaver 8. Earlier versions of Dreamweaver do not recognize it.
Содержание DREAMWEAVER 8-EXTENDING DREAMWEAVER
Страница 1: ...Extending Dreamweaver...
Страница 8: ...8 Contents...
Страница 14: ...14 Introduction...
Страница 16: ......
Страница 54: ...54 Customizing Dreamweaver...
Страница 96: ...96 Customizing Code View...
Страница 98: ......
Страница 110: ...110 Extending Dreamweaver...
Страница 138: ......
Страница 166: ...166 Insert Bar Objects...
Страница 180: ...180 Commands...
Страница 248: ...248 Toolbars...
Страница 260: ...260 Reports...
Страница 278: ...278 Tag Libraries and Editors...
Страница 288: ...288 Property Inspectors...
Страница 378: ...378 Server Behaviors...
Страница 398: ...398 Data Sources...
Страница 432: ...432 Server Models...
Страница 456: ...456 Data Translators...
Страница 482: ......
Страница 492: ...492 The Shared Folder...