<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>digitaldogbyte.com &#187; codehinting</title>
	<atom:link href="http://www.digitaldogbyte.com/tag/codehinting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitaldogbyte.com</link>
	<description>powered by kilobits n' bytes</description>
	<lastBuildDate>Sat, 16 Jul 2011 03:01:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Dreamweaver CS4&#8242;s JavaScript Codehinting</title>
		<link>http://www.digitaldogbyte.com/2009/05/13/dreamweaver-cs4s-javascript-codehinting/</link>
		<comments>http://www.digitaldogbyte.com/2009/05/13/dreamweaver-cs4s-javascript-codehinting/#comments</comments>
		<pubDate>Thu, 14 May 2009 01:35:10 +0000</pubDate>
		<dc:creator>Herm Wong</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[codehinting]]></category>
		<category><![CDATA[extension]]></category>

		<guid isPermaLink="false">http://www.digitaldogbyte.com/?p=24</guid>
		<description><![CDATA[One of Dreamweaver CS4&#8242;s new features is the ability to create codehints for JavaScript classes. To create the codehints for a static javascript class you need to follow this xml structure in your codehints file: 1 2 3 4 5 6 7 &#160; &#60;menu pattern=&#34;exampleObject.&#34; casesensitive=&#34;true&#34;&#62; &#60;menuitem label=&#34;identifier&#34; icon=&#34;shared/mm/images/hintProperty.gif&#34; source=&#34;Example Project&#34; object=&#34;exampleObject&#34; /&#62; &#60;menuitem label=&#34;onShow&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>One of Dreamweaver CS4&#8242;s new features is the ability to create codehints for JavaScript classes.</p>
<p>To create the codehints for a static javascript class you need to follow this xml structure in your codehints file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;menu</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;exampleObject.&quot;</span> <span style="color: #000066;">casesensitive</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;menuitem</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;identifier&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintProperty.gif&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;Example Project&quot;</span> <span style="color: #000066;">object</span>=<span style="color: #ff0000;">&quot;exampleObject&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;menuitem</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;onShow&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintProperty.gif&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;Example Project&quot;</span> <span style="color: #000066;">object</span>=<span style="color: #ff0000;">&quot;exampleObject&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;menuitem</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;onHide&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintProperty.gif&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;Example Project&quot;</span> <span style="color: #000066;">object</span>=<span style="color: #ff0000;">&quot;exampleObject&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/menu<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;function</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;exampleObject.openURL(String url)&quot;</span> <span style="color: #000066;">casesensitive</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintFunction.gif&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;Example Project&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<div class="wp-caption alignnone" style="width: 601px"><img title="Codehinting Example for Static Classes" src="http://www.digitaldogbyte.com/images/dw_codehints/StaticClass_CodeHint.png" alt="Codehinting Example for Static Classes" width="591" height="140" /><p class="wp-caption-text">Codehinting Example for Static Classes</p></div>
<p>To create the codehints for an instantiated javascript class you need to follow this xml structure in your codehints file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;function</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;ExampleItem()&quot;</span> <span style="color: #000066;">casesensitive</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintClass.gif&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;Example Project&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;menu</span> <span style="color: #000066;">classpattern</span>=<span style="color: #ff0000;">&quot;ExampleItem&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;method</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;append(ExampleItem childExampleItem)&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintFunction.gif&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;menuitem</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;ExampleItemStateChanged&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintEvent.gif&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>	
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;menuitem</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;onSelect&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintProperty.gif&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;method</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;remove(ExampleItem childExampleItem)&quot;</span> <span style="color: #000066;">icon</span>=<span style="color: #ff0000;">&quot;shared/mm/images/hintFunction.gif&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/menu<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<div class="wp-caption alignnone" style="width: 613px"><img title="Codehinting Example for Instantiated Class" src="http://www.digitaldogbyte.com/images/dw_codehints/InstantiatedClass_CodeHint.png" alt="Codehinting Example for Instantiated Class" width="603" height="126" /><p class="wp-caption-text">Codehinting Example for Instantiated Class</p></div>
<p>The JavaScript codehinting works perfectly in .js files; however I&#8217;ve noticed that the codehints for instantiated JavaScript classes do not display when you are working within &lt;script&gt; tags in .html files.</p>
<p>I&#8217;ve included a simple example Dreamweaver Extension that implements the exampleObject and ExampleItem JavaScript classes in the codehints. You can use the Example_CodeHints.xml file in the <a href="http://www.digitaldogbyte.com/downloads/dw_codehints/Example_CodeHints.zip" target="_blank">source</a> as a reference point.</p>
<p><a href="http://www.digitaldogbyte.com/downloads/dw_codehints/Example_CodeHints.zip" target="_blank">Link to source code download</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitaldogbyte.com/2009/05/13/dreamweaver-cs4s-javascript-codehinting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

