1 <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <title
>PsN
:: PsN Developer
's Guide to Dia :: 2</title>
5 <!--Adobe(R) LiveMotion(TM) 1.0 Generated JavaScript. Please do not edit. -->
8 function newImage(arg) {
15 ImageArray = new Array;
16 var preloadFlag = false;
17 function preloadImages() {
18 if (document.images) {
19 ImageArray[ImageArray.length++] = newImage(/* OWNER('object', 'dflt
') *//*URL*/'images
/indexhome
.jpg
');
20 ImageArray[ImageArray.length++] = newImage(/* OWNER('object', 'movr
') *//*URL*/'images
/indexhomeov
.jpg
');
21 ImageArray[ImageArray.length++] = newImage(/* OWNER('object1
', 'dflt
') *//*URL*/'images
/indexdocumentation
.jpg
');
22 ImageArray[ImageArray.length++] = newImage(/* OWNER('object1
', 'movr
') *//*URL*/'images
/indexdocumentationov
.jpg
');
23 ImageArray[ImageArray.length++] = newImage(/* OWNER('object2
', 'dflt
') *//*URL*/'images
/indexdownload
.jpg
');
24 ImageArray[ImageArray.length++] = newImage(/* OWNER('object2
', 'movr
') *//*URL*/'images
/indexdownloadov
.jpg
');
25 ImageArray[ImageArray.length++] = newImage(/* OWNER('object3
', 'dflt
') *//*URL*/'images
/indexbuglist
.jpg
');
26 ImageArray[ImageArray.length++] = newImage(/* OWNER('object3
', 'movr
') *//*URL*/'images
/indexbuglistov
.jpg
');
27 ImageArray[ImageArray.length++] = newImage(/* OWNER('object4
', 'dflt
') *//*URL*/'images
/indexmailing_list
.jpg
');
28 ImageArray[ImageArray.length++] = newImage(/* OWNER('object4
', 'movr
') *//*URL*/'images
/indexmailing_listov
.jpg
');
32 function changeImages() {
33 if (document.images && (preloadFlag == true)) {
34 for (var i=0; i<changeImages.arguments.length; i+=2) {
35 document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
40 </script><!-- End generated JavaScript. -->
41 <meta http-equiv="Content-Type"
42 content="text/html; charset=ISO-8859-1">
43 <style type="text/css">
46 font-family: Helvetica, Arial, serif;
55 background-image: url(gfx/bg.jpg);
69 text-decoration: none;
73 text-decoration: none;
77 text-decoration: none;
81 text-decoration: none;
85 <script language="JavaScript" type="text/JavaScript">
87 function MM_reloadPage(init) { //reloads the window if Nav4 resized
88 if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
89 document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
90 else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
95 <meta content="Pontus Pihlgren" name="author">
97 <body onload="preloadImages();"
98 style="background-color: rgb(255, 255, 255);">
99 <!-- The table is not formatted nicely because some browsers cannot join images in table cells if there are any hard carriage returns in a TD. -->
101 style="position: absolute; left: 335px; top: 42px; width: 388px; height: 43px; z-index: 1; font-size: x-small;">
102 <div class="style1" align="right">PsN
103 Developer's Guide to Dia
<br
>
107 style
="position: absolute; left: 226px; width: 497px; z-index: 2; top: 188px; height: 1536px;">
108 <div style
="text-align: center;"></div
>
109 <div align
="justify">
110 <div style
="text-align: center;">
111 <table style
="text-align: left; width: 100%;" border
="0" cellpadding
="2"
115 <td style
="vertical-align: top; width: 33%; text-align: center;"><a
116 href
="dia_guide.php"><
;<
;
119 <td style
="vertical-align: top; width: 33%; text-align: center;"><a
120 href
="dia_index.php">Dia
122 <td style
="vertical-align: top; width: 33%; text-align: center;"><a
123 href
="dia_guide_part3.php">Page
3 >
;>
;</a
></td
>
128 <h3
><span
class="heading1">Generating Code
</span
><br
>
130 <p
> Assuming that you have
131 Dia2Code installed
and working you should start your shell
and when you
132 se the prompt go to the directory where you created the Dia file
and
133 type the following
: </p
>
135 <p
class="style2"><span style
="font-family: monospace;">dia2code
-t
137 example
.dia
</span
><br
>
140 <p
>Dia2Code will generate a file
141 called
<a href
="examples/example.pm">"example.pm"</a
>
142 in which it has defined a Perl package
, a
constructor(called
<span
143 style
="font-family: monospace;">new</span
>),
145 method
and one accessor
.</p
>
147 editing this file
and adding your own code to the skeleton
. However the
148 file will be overwritten each time you change the Dia diagram
and rerun
149 Dia2Code
. But
, relax
, we have a solution
for that
as well
. </p
>
150 <h3
><span
class="heading1">Working with the
<span
151 style
="font-family: monospace;">fill_diacode
.pl
</span
>
154 <p
>Ideally it would be nice to be
155 able to enter code into Dia so that the
156 generated code would be ready after Dia2Code had run
. Unfortunatly Dia
157 provide no such functionality
. So we figured it would be great
if we
158 could work in our favourite editor
and have some script merge our code
159 with the code generated by Dia2Code
.
160 We have solved this with a script
161 called
<tt
>fill_diacode
.pl
</tt
>
162 that takes code from a file appropriately named
<tt
><a
163 href
="examples/example_subs.pm">example_subs
.pm
</a
></tt
>
164 and puts it into the
<tt
>example
.pm
</tt
>
165 file generated by Dia
. To
use <tt
>fill_diacode
.pl
</tt
>
169 <p style
="font-family: monospace;">fill_diacode
.pl
170 example_subs
.pm example
.pm
</p
>
172 The merged file will look like this
: <a href
="examples/example.pm">example
.pm
</a
>.
175 <div style
="text-align: center;">
176 <p align
="justify"> 
;
179 <table style
="text-align: left; width: 100%;" border
="0" cellpadding
="2"
183 <td style
="vertical-align: top; width: 33%; text-align: center;"><a
184 href
="dia_guide.php"><
;<
;
187 <td style
="vertical-align: top; width: 33%; text-align: center;"><a
188 href
="dia_index.php">Dia
190 <td style
="vertical-align: top; width: 33%; text-align: center;"><a
191 href
="dia_guide_part3.php">Page
3 >
;>
;</a
></td
>
196 <table border
="0" cellpadding
="0" cellspacing
="0" width
="780">
199 <td height
="600" width
="780">
200 <table border
="0" cellpadding
="0" cellspacing
="0" width
="780">
203 <td colspan
="7" height
="201" width
="780"><img
204 src
="images/indexpane1_1_.jpg" name
="" alt
="" border
="0" height
="201"
208 <td height
="46" width
="26"><img
209 src
="images/indexpane1_2_.jpg" name
="" alt
="" border
="0" height
="46"
211 <td height
="46" width
="73"><a href
="index.php"
212 onmouseover
="changeImages(/*CMP*/ 'object', /*URL*/ 'images/indexhomeov.jpg'); return true;"
213 onmouseout
="changeImages(/*CMP*/ 'object', /*URL*/ 'images/indexhome.jpg'); return true;"><img
214 src
="images/indexhome.jpg" name
="object" alt
="Home" border
="0"
215 height
="46" width
="73"></a
></td
>
216 <td height
="46" width
="11"><img
217 src
="images/indexpane3_2_.jpg" name
="" alt
="" border
="0" height
="46"
219 <td height
="46" width
="25"><img
220 src
="images/indexpane4_2_.jpg" name
="" alt
="" border
="0" height
="46"
222 <td height
="46" width
="15"><img
223 src
="images/indexpane5_2_.jpg" name
="" alt
="" border
="0" height
="46"
225 <td height
="46" width
="40"><img
226 src
="images/indexpane6_2_.jpg" name
="" alt
="" border
="0" height
="46"
228 <td height
="46" width
="590"><img
229 src
="images/indexpane7_2_.jpg" name
="" alt
="" border
="0" height
="46"
233 <td colspan
="7" height
="7" width
="780"><img
234 src
="images/indexpane1_3_.jpg" name
="" alt
="" border
="0" height
="7"
238 <td height
="46" width
="26"><img
239 src
="images/indexpane1_4_.jpg" name
="" alt
="" border
="0" height
="46"
241 <td colspan
="5" height
="46" width
="164"><a href
="docs.php"
242 onmouseover
="changeImages(/*CMP*/ 'object1', /*URL*/ 'images/indexdocumentationov.jpg'); return true;"
243 onmouseout
="changeImages(/*CMP*/ 'object1', /*URL*/ 'images/indexdocumentation.jpg'); return true;"><img
244 src
="images/indexdocumentation.jpg" name
="object1" alt
="Documentation"
245 border
="0" height
="46" width
="164"></a
></td
>
246 <td height
="46" width
="590"><img
247 src
="images/indexpane7_4_.jpg" name
="" alt
="" border
="0" height
="46"
251 <td colspan
="7" height
="7" width
="780"><img
252 src
="images/indexpane1_5_.jpg" name
="" alt
="" border
="0" height
="7"
256 <td height
="46" width
="26"><img
257 src
="images/indexpane1_6_.jpg" name
="" alt
="" border
="0" height
="46"
259 <td colspan
="3" height
="46" width
="109"><a
261 onmouseover
="changeImages(/*CMP*/ 'object2', /*URL*/ 'images/indexdownloadov.jpg'); return true;"
262 onmouseout
="changeImages(/*CMP*/ 'object2', /*URL*/ 'images/indexdownload.jpg'); return true;"><img
263 src
="images/indexdownload.jpg" name
="object2" alt
="Download" border
="0"
264 height
="46" width
="109"></a
></td
>
265 <td colspan
="3" height
="46" width
="645"><img
266 src
="images/indexpane5_6_.jpg" name
="" alt
="" border
="0" height
="46"
270 <td colspan
="7" height
="7" width
="780"><img
271 src
="images/indexpane1_7_.jpg" name
="" alt
="" border
="0" height
="7"
275 <td height
="46" width
="26"><img
276 src
="images/indexpane1_8_.jpg" name
="" alt
="" border
="0" height
="46"
278 <td colspan
="2" height
="46" width
="84"><a href
="buglist.php"
279 onmouseover
="changeImages(/*CMP*/ 'object3', /*URL*/ 'images/indexbuglistov.jpg'); return true;"
280 onmouseout
="changeImages(/*CMP*/ 'object3', /*URL*/ 'images/indexbuglist.jpg'); return true;"><img
281 src
="images/indexbuglist.jpg" name
="object3" alt
="Buglist" border
="0"
282 height
="46" width
="84"></a
></td
>
283 <td colspan
="4" height
="46" width
="670"><img
284 src
="images/indexpane4_8_.jpg" name
="" alt
="" border
="0" height
="46"
288 <td colspan
="7" height
="7" width
="780"><img
289 src
="images/indexpane1_9_.jpg" name
="" alt
="" border
="0" height
="7"
293 <td height
="46" width
="26"><img
294 src
="images/indexpane1_10_.jpg" name
="" alt
="" border
="0" height
="46"
296 <td colspan
="4" height
="46" width
="124"><a href
="list.php"
297 onmouseover
="changeImages(/*CMP*/ 'object4', /*URL*/ 'images/indexmailing_listov.jpg'); return true;"
298 onmouseout
="changeImages(/*CMP*/ 'object4', /*URL*/ 'images/indexmailing_list.jpg'); return true;"><img
299 src
="images/indexmailing_list.jpg" name
="object4" alt
="Mailing List"
300 border
="0" height
="46" width
="124"></a
></td
>
301 <td colspan
="2" height
="46" width
="630"><img
302 src
="images/indexpane6_10_.jpg" name
="" alt
="" border
="0" height
="46"
306 <td colspan
="7" height
="141" width
="780"><img
307 src
="images/indexpane1_11_.jpg" name
="" alt
="" border
="0" height
="141"
315 <td
><img src
="images/is_single_pixel_gif.gif" alt
="" height
="1"
320 <!--Adobe(R
) LiveMotion(TM
) DataMap1
.0
DO NOT EDIT