<?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"
	>

<channel>
	<title></title>
	<atom:link href="http://blogs.seapine.com/yan/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.seapine.com/yan</link>
	<description></description>
	<pubDate>Fri, 24 Oct 2008 14:43:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Integrate Qt documentation into Xcode 3.0 - part 2</title>
		<link>http://blogs.seapine.com/yan/integrate-qt-documentation-into-xcode-30-part-2.html</link>
		<comments>http://blogs.seapine.com/yan/integrate-qt-documentation-into-xcode-30-part-2.html#comments</comments>
		<pubDate>Fri, 24 Oct 2008 14:43:59 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/?p=67</guid>
		<description><![CDATA[ 
This is a follow up post to the initial post regarding integration of Qt documentation into the Xcode IDE. Dirk van Oosterbosch a reader of this blog has taken it upon himself to take the integration of Qt documentation into Xcode a step further. This additional work provided by Mr. van Oosterbosch will allow [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Integrate Qt documentation into Xcode 3.0 - part 2", url: "http://blogs.seapine.com/yan/integrate-qt-documentation-into-xcode-30-part-2.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src='http://trolltech.com/logo.png' alt='qt' class='alignright' /> <img src='http://www.musingsfrommars.org/images/Xcode_Icon.png' alt='Xcode' class='alignleft' /></p>
<p>This is a follow up post to the initial post regarding integration of Qt documentation into the Xcode IDE. Dirk van Oosterbosch a reader of this blog has taken it upon himself to take the integration of Qt documentation into Xcode a step further. This additional work provided by Mr. van Oosterbosch will allow the user to perform fast API searches within Xcode as well as look up symbols &#038; classes on the fly while developing in the Xcode editor. One useful technique which I tend to use is ALT+double click. Selecting a symbol or a class definition inside the Xcode editor followed by pressing ALT+double click will bring up the Developer Documentation with that particular symbol or class name immediately to the foreground inside the Xcode documentation. It is really quite useful.</p>
<p>Mr. van Oosterbosch&#8217;s project can be located in the link below:</p>
<p><center><img src="http://www.gstatic.com/codesite/ph/images/code_sm.png"><br />
<br />
<a href="http://code.google.com/p/xcode-tokens-from-qtdocs">http://code.google.com/p/xcode-tokens-from-qtdocs</a></center><br />
<br />
I would like to thank Mr. van Oosterbosch for contributing and allowing me to post about his project.</p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=Integrate+Qt+documentation+into+Xcode+3.0+-+part+2&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fintegrate-qt-documentation-into-xcode-30-part-2.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/integrate-qt-documentation-into-xcode-30-part-2.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Survey Says&#8230;</title>
		<link>http://blogs.seapine.com/yan/survey-says.html</link>
		<comments>http://blogs.seapine.com/yan/survey-says.html#comments</comments>
		<pubDate>Fri, 22 Aug 2008 20:26:17 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/?p=64</guid>
		<description><![CDATA[
A colleague of mine Mitch Oliver has decided to contribute to this blog with some interesting material. Here is his post titled &#8220;Survey Says&#8230;&#8221;

&#8220;In most cases it can be assumed that newer code is of better quality than legacy code&#8230;&#8221;
This quote comes from an MSDN article published in November 2007.  Source:
http://msdn.microsoft.com/en-us/magazine/cc163312.aspx
I recently conducted a [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Survey Says&#8230;", url: "http://blogs.seapine.com/yan/survey-says.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2008/08/oliverblogbanner.png" alt="" title="oliverblogbanner" /></p>
<p>A colleague of mine <b>Mitch Oliver</b> has decided to contribute to this blog with some interesting material. Here is his post titled &#8220;Survey Says&#8230;&#8221;</p>
<hr />
<p>&#8220;In most cases it can be assumed that newer code is of better quality than legacy code&#8230;&#8221;<br />
This quote comes from an MSDN article published in November 2007.  Source:<br />
<a href="http://msdn.microsoft.com/en-us/magazine/cc163312.aspx">http://msdn.microsoft.com/en-us/magazine/cc163312.aspx</a></p>
<p>I recently conducted a non-scientific survey to gauge reaction to such a statement.  These are the results:</p>
<p><center><img src="http://blogs.seapine.com/yan/wp-content/uploads/2008/08/newvold.gif" alt="" title="newvold" /></center></p>
<p>As you can see, the disagreement is fairly overwhelming.  Looking at the stats a little further, I found it interesting that most of the agreement was found among somewhat experienced developers and not outright n00bs.  I found only one senior developer who agreed with this statement.  Puzzling.  Further compounding matters is that the authors are not ivory tower academics.  One is a respected White Hat who rose to prominence reporting vulnerabilities to DEC, the other three are former members are the Last Stage of Delirium group (all now work for Microsoft).  These people know their stuff.  So what gives?</p>
<p>Those who agreed had comments like &#8220;we learn from our mistakes and spread the knowledge around,&#8221; and &#8220;we have tools that catch that stuff now.&#8221;  Interesting&#8230;</p>
<p>So are the nay-sayers unaware of these advancements?  Hardly.  Many responded with comments like &#8220;If we could be sure that EVERYONE was as up on security&#8230;&#8221; or &#8220;Yeah, when this new code was written we knew all this stuff, but we&#8217;ve also already reviewed the old code&#8230;&#8221;  Often the response elicited a comment of &#8220;it depends on who wrote it.&#8221;</p>
<p>It seems most objectors took issue with one word: &#8220;assume.&#8221;  They argue, we ought not be assuming anything and that this assumption increases risk.  There&#8217;s also a perverse phenomenon where, as code ages it will be reviewed more frequently and with more scrutiny.  Wouldn&#8217;t it be better to apply more intense scrutiny to new code and progressively less to older code, thereby preventing new problems sooner?</p>
<p>One thing everyone can agree on (with the exception of the more extreme fence sitters) is that this is not a hard rule.  There are a myriad of factors to consider when estimating the quality of some code, and age is just one among them.  We can clearly see that better security practices work, and they yield better quality code.  But what we&#8217;re really looking for is how to prioritize our review time.</p>
<p>For any non-trivial code base, that has been around for any non-trivial amount of time, it is unlikely that there has been 100% code review coverage.  If you have such a code base congratulations, here&#8217;s your</p>
<p>cookie:<br />
   Set-Cookie: youwin=true</p>
<p>The rest of us, however, are going to have to decide what gets reviewed.  Assuming you&#8217;ve built your threat models and determined your data flow you need to decide what code along that path is most likely to contain vulnerabilities.  How confident are you that the newest changes are safe?  How confident are you that the original implementation (at least, that which hasn&#8217;t changed recently) is safe?  How about the underlying utilities?</p>
<p>Discuss.</p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=Survey+Says%26%238230%3B&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fsurvey-says.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/survey-says.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>MD5/SHA1 Hash Decryptor</title>
		<link>http://blogs.seapine.com/yan/md5sha1-hash-decryptor.html</link>
		<comments>http://blogs.seapine.com/yan/md5sha1-hash-decryptor.html#comments</comments>
		<pubDate>Tue, 24 Jun 2008 17:34:23 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/?p=59</guid>
		<description><![CDATA[
Did you forget your password? Is your md5 or sha1 hash just hangin&#8217; out in your database, collecting dust? Why regenerate it?
Try this first, before you do.
<script type="text/javascript">SHARETHIS.addEntry({ title: "MD5/SHA1 Hash Decryptor", url: "http://blogs.seapine.com/yan/md5sha1-hash-decryptor.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2008/06/md5logo.png" alt="" title="md5logo" width="300" height="105" class="aligncenter size-full wp-image-60" /></p>
<p>Did you forget your password? Is your md5 or sha1 hash just hangin&#8217; out in your database, collecting dust? Why regenerate it?</p>
<p><a href="http://md5.rednoize.com">Try this</a> first, before you do.</p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=MD5%2FSHA1+Hash+Decryptor&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fmd5sha1-hash-decryptor.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/md5sha1-hash-decryptor.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Qmake - Xcode project generator</title>
		<link>http://blogs.seapine.com/yan/qmake-xcode-project-generator.html</link>
		<comments>http://blogs.seapine.com/yan/qmake-xcode-project-generator.html#comments</comments>
		<pubDate>Mon, 23 Jun 2008 17:56:12 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/?p=57</guid>
		<description><![CDATA[ 
Since I can’t drop the topic of Qt on Mac OS X I will continue with the train ride.  Qt’s qmake allows us to generate Xcode projects from .pro files. This is an awesome feature and I salute the Trolls for providing this capability to us. However, some time ago I noticed a [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Qmake - Xcode project generator", url: "http://blogs.seapine.com/yan/qmake-xcode-project-generator.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src='http://blogs.seapine.com/yan/wp-content/uploads/2006/08/qtlogo.png' alt='qt' class='alignright' /> <img src='http://www.musingsfrommars.org/images/Xcode_Icon.png' alt='Xcode' class='alignleft' /></p>
<p>Since I can’t drop the topic of Qt on Mac OS X I will continue with the train ride.  Qt’s qmake allows us to generate Xcode projects from .pro files. This is an awesome feature and I salute the Trolls for providing this capability to us. However, some time ago I noticed a minor issue with it and I wasn&#8217;t the only one. A colleague of mine <a href="http://blogs.seapine.com/grant/">Grant</a> also noticed that searching through the project in Xcode takes quite a long time when searching through qmake generated Xcode projects. What happens is qmake adds the SDK that the project builds against and places it as a PBXFileReference into the “External Frameworks and Libraries” group.  This causes each and every search request to go through the entire SDK directory structure and thus causing the poor search performance.</p>
<p>Since Grant and I do not have any time to waste on long searches… we shall patch qmake to attain our desired goal of fast project wide searches when working with qmake generated Xcode projects.</p>
<p>Just apply the below patch, rebuild qmake and voila… problem solved.</p>
<p><a href='http://blogs.seapine.com/yan/wp-content/uploads/2008/06/patch.txt'>Patch</a></p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=Qmake+-+Xcode+project+generator&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fqmake-xcode-project-generator.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/qmake-xcode-project-generator.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Integrating Qt documentation into Xcode 3.0</title>
		<link>http://blogs.seapine.com/yan/integrating-qt-documentation-into-xcode-30.html</link>
		<comments>http://blogs.seapine.com/yan/integrating-qt-documentation-into-xcode-30.html#comments</comments>
		<pubDate>Mon, 23 Jun 2008 03:06:00 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/?p=55</guid>
		<description><![CDATA[ 
Qt Assistant is an extremely useful application that comes along with Trolltech’s Qt releases. It provides documentation for the entire Qt framework. However, as an Xcode user, I’d prefer to never leave the IDE when looking up documentation. So I decided to look into a way of generating an Xcode documentation set for the [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Integrating Qt documentation into Xcode 3.0", url: "http://blogs.seapine.com/yan/integrating-qt-documentation-into-xcode-30.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src='http://trolltech.com/logo.png' alt='qt' class='alignright' /> <img src='http://www.musingsfrommars.org/images/Xcode_Icon.png' alt='Xcode' class='alignleft' /></p>
<p>Qt Assistant is an extremely useful application that comes along with Trolltech’s Qt releases. It provides documentation for the entire Qt framework. However, as an Xcode user, I’d prefer to never leave the IDE when looking up documentation. So I decided to look into a way of generating an Xcode documentation set for the Qt API. So here is how you do it.</p>
<p>Initially we must create an Xcode docset bundle. I am using Qt 4.3.3 so let’s create it:</p>
<p><strong>1)	mkdir -p ~/Library/Developer/Shared/Documentation/DocSets/com.trolltech.qt.4.3.3.docset</strong></p>
<p><strong>cd</strong> into the <strong>~/Library/Developer/Shared/Documentation/DocSets</strong> folder. Now, we must populate the the rest of the docset bundle:</p>
<p><strong>2)	mkdir -p com.trolltech.qt.4.3.3.docset/Contents/Resources/Documents</strong></p>
<p>Copy over the html documentation from the QTDIR/docs/html folder to the docset bundle:</p>
<p><strong>3)	cp –R /Developer/qt-4.3.3/docs/html/*<br />
com.trolltech.qt.4.3.3.docset/Contents/Resources/Documents/</strong></p>
<p>Edit the Info.plist file for the bundle</p>
<p><strong>4)	 vi com.trolltech.qt.4.3.3.docset/Contents/Info.plist</strong></p>
<p>Here is a basic Info.plist file which will work for our purposes:</p>
<p class=MsoNormal>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot;<br />
&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;<br />
&lt;plist version=&quot;1.0&quot;&gt;<br />
&lt;dict&gt;<br />
        &lt;key&gt;CFBundleIdentifier&lt;/key&gt;<br />
        &lt;string&gt;com.trolltech.qt.4.3.3.docset&lt;/string&gt;<br />
        &lt;key&gt;CFBundleName&lt;/key&gt;<br />
        &lt;string&gt;Qt 4.3.3&lt;/string&gt;<br />
        &lt;key&gt;DocSetFeedName&lt;/key&gt;<br />
        &lt;string&gt;Trolltech&lt;/string&gt;<br />
&lt;/dict&gt;<br />
&lt;/plist&gt;</p>
<p>We also need to create a Nodes.xml file which will be needed for indexing the html docs:</p>
<p><strong>5)	vi com.trolltech.qt.4.3.3.docset/Contents/Resources/Nodes.xml</strong></p>
<p>Here is a basic Nodes.xml which will server our goal:</p>
<p class=MsoNormal>&lt;?xml version=&quot;1.0&quot;<br />
encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;DocSetNodes version=&quot;1.0&quot;&gt;     &lt;!&#8211; Root element &#8211;&gt;<br />
   &lt;TOC&gt;<br />
      &lt;Node type=&quot;folder&quot;&gt;    &lt;!&#8211; Root node &#8211;&gt;<br />
         &lt;Name&gt;Root&lt;/Name&gt;<br />
         &lt;Path&gt;index.html&lt;/Path&gt;<br />
      &lt;/Node&gt;<br />
   &lt;/TOC&gt;<br />
&lt;/DocSetNodes&gt;</p>
<p>And the final step will be to run the indexer so that Xcode can pick up our generated bundle contents:</p>
<p><strong>6)	/Developer/usr/bin/docsetutil index com.trolltech.qt.4.3.3.docset</strong></p>
<p>Now our bundle is ready and we can start Xcode. Once inside Xcode, click on <strong>Help->Documentation</strong> and you should see a Trolltech subsection on left hand side under the DocSets. <strong>See Figure 1</strong>.</p>
<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2008/06/qtxcodedocs.png" alt="" title="qtxcodedocs"><br />
<center><strong>Figure 1</strong></center></p>
<p>One interesting thing I have noticed is that searching within Xcode documentation is much faster than using Qt Assistant. There are other great features that Xcode provides, such as the Research Assistant which can be used to look up documentation while editing source code in the editor. But for those topics I shall refer you to the official documentation:</p>
<p><a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/Documentation_Sets/Introduction/chapter_1_section_1.html">Xcode Documentation Set Guide</a></p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=Integrating+Qt+documentation+into+Xcode+3.0&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fintegrating-qt-documentation-into-xcode-30.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/integrating-qt-documentation-into-xcode-30.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Debugging Qt with Xcode 3.0</title>
		<link>http://blogs.seapine.com/yan/debugging-qt-with-xcode-30.html</link>
		<comments>http://blogs.seapine.com/yan/debugging-qt-with-xcode-30.html#comments</comments>
		<pubDate>Fri, 30 May 2008 19:37:28 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/?p=48</guid>
		<description><![CDATA[ 
As a user of Xcode and Trolltech’s Qt framework I recently discovered that data formatting for Qt’s string type QString no longer works in Xcode 3.0. This is something that used to work in the Xcode 2.4 and 2.5 releases, but with Xcode 3.0 I am unable to view the full contents of QStrings [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Debugging Qt with Xcode 3.0", url: "http://blogs.seapine.com/yan/debugging-qt-with-xcode-30.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src='http://blogs.seapine.com/yan/wp-content/uploads/2006/08/qtlogo.png' alt='qt' class='alignright' /> <img src='http://www.musingsfrommars.org/images/Xcode_Icon.png' alt='Xcode' class='alignleft' /></p>
<p>As a user of Xcode and Trolltech’s Qt framework I recently discovered that data formatting for Qt’s string type QString no longer works in Xcode 3.0. This is something that used to work in the Xcode 2.4 and 2.5 releases, but with Xcode 3.0 I am unable to view the full contents of QStrings during debugging. At best, using simple data formatting methods, I am able to configure Xcode to display the  the first character of a QString, but no other characters are displayed in the string. This makes the experience of debugging Qt code quite painful and reduces productivity.</p>
<p>There is a solution however. Xcode provides and exposes an interface for data formatting plug-ins, which Apple uses as well. Specifically, Apple has a similar plug-in for the Carbon data types which include: AEDesc, AEDataStorage, EventRecord, UTCDateTime and many more. By means of this functionality, I was able to cook up a plug-in that simplifies my life of debugging Qt source code with Xcode 3.0.</p>
<p>The plug-in is a Mach-O bundle that contains the code to interpret information about a particular object. In this case we’re extracting the character buffer contents of the QString. The contents look something like this:</p>
<pre>
<font color="0000ff"><strong>#include <font color="#008000">"DataFormatterPlugin.h"</font></strong>
<font color="0000ff"><strong>#include <font color="#008000">&lt;QtCore&gt;</font></strong></font>

_pbxgdb_plugin_function_list<B><FONT COLOR="#663300"> *</FONT></B>_pbxgdb_plugin_functions<B><FONT COLOR="#663300">;</FONT></B><FONT COLOR="#990000">
static</FONT><FONT COLOR="#FF6633"> char</FONT><B><FONT COLOR="#663300"> *</FONT></B>notSetString<B><FONT COLOR="#663300"> =</FONT></B><FONT COLOR="#009900"> "QtDataFormatter plugin error: _pbxgdb_plugin_functions not set!"</FONT><B><FONT COLOR="#663300">;</FONT></B><FONT COLOR="#FF6633">

char</FONT><B><FONT COLOR="#663300"> *</FONT></B> GetCharArrayFromQString<B><FONT COLOR="#663300">(</FONT></B>QString<B><FONT COLOR="#663300"> &amp;</FONT></B>inString<B><FONT COLOR="#663300">,</FONT></B><FONT COLOR="#FF6633"> int</FONT> identifier<B><FONT COLOR="#663300">)
{</FONT></B><FONT COLOR="#990000">
   const</FONT><FONT COLOR="#FF6633"> char</FONT><B><FONT COLOR="#663300"> *</FONT></B>src<B><FONT COLOR="#663300"> =</FONT></B> inString<B><FONT COLOR="#663300">.</FONT></B>toAscii<B><FONT COLOR="#663300">();</FONT></B><FONT COLOR="#FF0000">
   if</FONT><B><FONT COLOR="#663300"> (!</FONT></B>src<B><FONT COLOR="#663300">)</FONT></B><FONT COLOR="#FF0000">
      return</FONT><FONT COLOR="#999900"> 0</FONT><B><FONT COLOR="#663300">;</FONT></B><FONT COLOR="#FF6633">

   char</FONT><B><FONT COLOR="#663300"> *</FONT></B>dest<B><FONT COLOR="#663300">;</FONT></B><FONT COLOR="#FF0000">
   if</FONT><B><FONT COLOR="#663300"> (</FONT></B>_pbxgdb_plugin_functions<B><FONT COLOR="#663300">)
   {</FONT></B><FONT COLOR="#FF6633">
      int</FONT> bufLen<B><FONT COLOR="#663300"> =</FONT></B> strlen<B><FONT COLOR="#663300">(</FONT></B>src<B><FONT COLOR="#663300">) +</FONT></B><FONT COLOR="#999900"> 1</FONT><B><FONT COLOR="#663300">;</FONT></B>
      dest<B><FONT COLOR="#663300"> = (</FONT></B><FONT COLOR="#FF6633">char</FONT><B><FONT COLOR="#663300"> *)(</FONT></B>_pbxgdb_plugin_functions<B><FONT COLOR="#663300">-&gt;</FONT></B>allocate<B><FONT COLOR="#663300">(</FONT></B>identifier<B><FONT COLOR="#663300">,</FONT></B> bufLen<B><FONT COLOR="#663300">));</FONT></B>
      dest<B><FONT COLOR="#663300">[</FONT></B><FONT COLOR="#999900">0</FONT><B><FONT COLOR="#663300">] =</FONT></B><FONT COLOR="#999900"> 0</FONT><B><FONT COLOR="#663300">;</FONT></B>
      strcpy<B><FONT COLOR="#663300">(</FONT></B>dest<B><FONT COLOR="#663300">,</FONT></B> src<B><FONT COLOR="#663300">);
   }</FONT></B><FONT COLOR="#FF0000">
   else</FONT><B><FONT COLOR="#663300">
   {</FONT></B>
      dest<B><FONT COLOR="#663300"> =</FONT></B> notSetString<B><FONT COLOR="#663300">;
   }</FONT></B><FONT COLOR="#FF0000">
   return</FONT> dest<B><FONT COLOR="#663300">;
}</FONT></B>
</pre><BR></p>
<p>There also exists a plist file that maps the QString type to this function call during debugging. This file exists inside the plug-in bundle and is named CustomDataViews.plist.</p>
<p>The plug-in bundle needs to be copied to the Xcode plug-ins destination located in <strong>/Developer/Library/Xcode/CustomDataViews</strong> for a default installation. Once the plug-in is loaded, one can view the contents of a QString while debugging. See <strong>Figure 1</strong>.</p>
<p><img src='http://blogs.seapine.com/yan/wp-content/uploads/2008/05/xcodedbg.png' alt='figure 1' class='alignnone' /><br />
<center><strong>Figure 1</strong></center></p>
<p>Double clicking on the Summary field of any QString will display the means by which Xcode determines the Summary for that variable. See <strong>Figure 2</strong>.</p>
<p><img src='http://blogs.seapine.com/yan/wp-content/uploads/2008/05/xcodedbg2.png' alt='figure 2' class='alignnone' /><br />
<center><strong>Figure 2</strong></center></p>
<p>That's pretty much it!</p>
<p>The same thing could be accomplished for any other Qt types if one wants to see the contents of a particular object during debugging. This does not just apply to Qt and can be extended to other frameworks as well.</p>
<p>Below you will find the binary and source tarballs for this plug-in.</p>
<p><a href="http://blogs.seapine.com/yan/wp-content/uploads/2008/05/qtdataformatters_bintar.gz">qtdataformatters_bin.tar.gz</a> Binary Package<br />
<a href="http://blogs.seapine.com/yan/wp-content/uploads/2008/05/qtdataformatters_srctar.gz">qtdataformatters_src.tar.gz</a> Source Package</p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=Debugging+Qt+with+Xcode+3.0&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fdebugging-qt-with-xcode-30.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/debugging-qt-with-xcode-30.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Redmond and Cupertino, start your photocopiers!</title>
		<link>http://blogs.seapine.com/yan/redmond-and-cupertino-start-your-photocopiers.html</link>
		<comments>http://blogs.seapine.com/yan/redmond-and-cupertino-start-your-photocopiers.html#comments</comments>
		<pubDate>Mon, 10 Dec 2007 19:54:50 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/redmond-and-cupertino-start-your-photocopiers.html</guid>
		<description><![CDATA[
Today I will briefly discuss the Compiz-Fusion project. Compiz Fusion is an extension pack released for Compiz. Compiz is a compositing window manager. Compiz Fusion was created as a result of Compiz and Beryl joining hands and thus coming up with one of the best add-ons to my Linux distribution. Whether I use Gnome or [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Redmond and Cupertino, start your photocopiers!", url: "http://blogs.seapine.com/yan/redmond-and-cupertino-start-your-photocopiers.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.compiz-fusion.org/wp-content/themes/fusion/images/logo.png" alt="compiz-fusion" /><img src="http://www.compiz-fusion.org/wp-content/themes/fusion/images/header.png" alt="" /></p>
<p>Today I will briefly discuss the Compiz-Fusion project. Compiz Fusion is an extension pack released for Compiz. Compiz is a compositing window manager. Compiz Fusion was created as a result of Compiz and Beryl joining hands and thus coming up with one of the best add-ons to my Linux distribution. Whether I use Gnome or KDE, Compiz-Fusion makes my experience on the Linux platform quite awesome! Here are some videos showing some Compiz Fusion functionality:</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/E4Fbk52Mk1w&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/E4Fbk52Mk1w&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>and here is another video</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/Rmz9a9pJR_s&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Rmz9a9pJR_s&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>So hurry Redmond and Cupertino&#8230; I&#8217;d like to see this functionality in commercial OS&#8217;s.</p>
<p>Here are some useful links to check out:<br />
<a href="http://www.compiz-fusion.org/">Compiz Fusion</a><br />
<a href="http://compiz.org/">Compiz</a><br />
<a href="http://www.beryl-project.org/">Beryl Project</a></p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=Redmond+and+Cupertino%2C+start+your+photocopiers%21&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fredmond-and-cupertino-start-your-photocopiers.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/redmond-and-cupertino-start-your-photocopiers.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>QtCoverFlowWidget using Core Animation and Qt</title>
		<link>http://blogs.seapine.com/yan/qtcoverflowwidget-using-core-animation-and-qt.html</link>
		<comments>http://blogs.seapine.com/yan/qtcoverflowwidget-using-core-animation-and-qt.html#comments</comments>
		<pubDate>Wed, 21 Nov 2007 06:09:31 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/qtcoverflowwidget-using-core-animation-and-qt.html</guid>
		<description><![CDATA[
Introduction
Core Animation is one very cool and interesting API provided by Apple in the Leopard version of Mac OS X. Core Animation can be used to attain some really cool effects like the Cover Flow view, which is available and seen in both iTunes and Finder. The Cover Flow has also been included in the [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "QtCoverFlowWidget using Core Animation and Qt", url: "http://blogs.seapine.com/yan/qtcoverflowwidget-using-core-animation-and-qt.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2007/11/ca.png"></p>
<p><strong>Introduction</strong></p>
<p>Core Animation is one very cool and interesting API provided by Apple in the Leopard version of Mac OS X. Core Animation can be used to attain some really cool effects like the Cover Flow view, which is available and seen in both iTunes and Finder. The Cover Flow has also been included in the new iPods and in the iPhone. It is an animated view of the files that one is browsing, whether the files are images, videos or documents. Cover Flow displays the preview&#8230;</p>
<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2007/11/finder.png"></p>
<p>This functionality is now available in Leopard and allows developers to take advantage of this feature by means of Core Animation. Core Animation is a part of the Quartz Core framework and is programmable by means of the objective-c API. This is nice if one’s application UI is written completely in Cocoa. However, why should Carbon developers not be able to take advantage of Core Animation? Well, Apple has thought of that as well. They have exposed a new API named the HICocoaView.</p>
<p><strong>HICocoaView</strong></p>
<p>The HICocoaView allows the developer to embed an NSVIew or any control derived from NSView into a Carbon HIView. This means that Core Animation could be included in a Carbon application. For more information on embedding Cocoa NSViews in a Carbon HIView please visit this link:</p>
<p><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/Articles/HICocoaView.html<br />
">http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/Articles/HICocoaView.html</a></p>
<p>Since Trolltech’s Qt framework is currently sitting directly on top of Carbon, I thought I would try and get Cover Flow working in a Qt Application by means of creating a custom widget, which I call the QtCoverFlowWidget.</p>
<p><strong>QtCoverFlowWidget</strong></p>
<p>The first thing we need to do is locate the code for Cover Flow. Conveniently, Apple has an example which ships with the freely available developer tools and it’s named CovertFlow. The entire CovertFlow project, including implementation is available in the following location on your disk:</p>
<p><em>/Developer/Examples/Quartz/Core Animation/CovertFlow</em></p>
<p>Basically, the bulk of the work is already done for us, thanks to Apple’s example. Now we must figure out how to wrap a QWidget around this implementation, such that we can use this CovertFlow view inside our Qt Application. So Let us begin.</p>
<p><strong>Creating the project</strong></p>
<p>I simply created a main.cpp from which I then generated an Xcode project. My main.cpp looked something like this:</p>
<pre>
<font color="0000ff"><strong>#include <font color="#008000">&lt;QtGui&gt;</font></strong></font>
<font color="0000ff"><strong>#include <font color="#008000">&lt;QtCore&gt;</font></strong></font>
<strong>class</strong> <font color="#2040a0">MyWidget</font> <font color="4444FF">:</font> <strong>public</strong> <font color="#2040a0">QWidget</font>
<font color="4444FF"><strong>{</strong></font>
   <font color="#2040a0">Q_OBJECT</font>
 <strong>public</strong><font color="4444FF">:</font>
   <font color="#2040a0">MyWidget</font><font color="4444FF">(</font><font color="#2040a0">QWidget</font> <font color="4444FF">*</font><font color="#2040a0">parent</font><font color="4444FF">)</font> <font color="4444FF">:</font> <font color="#2040a0">QWidget</font><font color="4444FF">(</font><font color="#2040a0">parent</font><font color="4444FF">)</font> <font color="4444FF"><strong>{</strong></font> <font color="4444FF"><strong>}</strong></font>
 <strong>virtual</strong> ~<font color="#2040a0">MyWidget</font><font color="4444FF">(</font><font color="4444FF">)</font> <font color="4444FF"><strong>{</strong></font> <font color="4444FF"><strong>}</strong></font>
<font color="4444FF"><strong>}</strong></font><font color="4444FF">;</font>
<font color="0000ff"><strong>#include <font color="#008000">&quot;main.moc&quot;</font></strong></font>
<strong>int</strong> <font color="#2040a0">main</font><font color="4444FF">(</font><strong>int</strong> <font color="#2040a0">argc</font>, <strong>char</strong><font color="4444FF">*</font><font color="4444FF">*</font> <font color="#2040a0">argv</font><font color="4444FF">)</font>
<font color="4444FF"><strong>{</strong></font>
   <font color="#2040a0">QApplication</font> <font color="#2040a0">app</font><font color="4444FF">(</font><font color="#2040a0">argc</font>, <font color="#2040a0">argv</font><font color="4444FF">)</font><font color="4444FF">;</font>
   <font color="#2040a0">QMainWindow</font> <font color="4444FF">*</font><font color="#2040a0">win</font> <font color="4444FF">=</font> <strong>new</strong> <font color="#2040a0">QMainWindow</font><font color="4444FF">;</font>
   <font color="#2040a0">win</font><font color="4444FF">-</font><font color="4444FF">&gt;</font><font color="#2040a0">resize</font><font color="4444FF">(</font><font color="#FF0000">600</font>,<font color="#FF0000">300</font><font color="4444FF">)</font><font color="4444FF">;</font>
   <font color="#2040a0">win</font><font color="4444FF">-</font><font color="4444FF">&gt;</font><font color="#2040a0">show</font><font color="4444FF">(</font><font color="4444FF">)</font><font color="4444FF">;</font>
   <font color="#2040a0">MyWidget</font> <font color="4444FF">*</font><font color="#2040a0">w</font> <font color="4444FF">=</font> <strong>new</strong> <font color="#2040a0">MyWidget</font><font color="4444FF">(</font><font color="#2040a0">win</font><font color="4444FF">)</font><font color="4444FF">;</font>
   <font color="#2040a0">w</font><font color="4444FF">-</font><font color="4444FF">&gt;</font><font color="#2040a0">resize</font><font color="4444FF">(</font><font color="#FF0000">400</font>,<font color="#FF0000">200</font><font color="4444FF">)</font><font color="4444FF">;</font>
   <font color="#2040a0">w</font><font color="4444FF">-</font><font color="4444FF">&gt;</font><font color="#2040a0">show</font><font color="4444FF">(</font><font color="4444FF">)</font><font color="4444FF">;</font>
   <strong>return</strong> <font color="#2040a0">app</font>.<font color="#2040a0">exec</font><font color="4444FF">(</font><font color="4444FF">)</font><font color="4444FF">;</font>
<font color="4444FF"><strong>}</strong></font>
</pre>
<p></p>
<p>now let’s create the project:</p>
<p><em><strong>qmake -project</strong></em><br />
<em><strong>qmake -spec macx-xcode QtCoverFlowExample.pro</strong></em></p>
<p>The above will generate a QtCoverFlowExample.xcodeproj which we can open using Xcode 3.0.</p>
<p>Once the project is opened, there are some things that must be done. They are as follows:</p>
<p>Right click on main.cpp and click Info. In the General tab switch the File Type to “sourcecode.cpp.objcpp”. This is done to let the compiler know that this file contains objective c++ code.<br />
Add QuartzCore and Cocoa frameworks to the project. AppKit framwork can be removed since the Cocoa framework acts as an umbrella around AppKit.<br />
Import the relevant files from the CovertFlow project into our project. They are:</p>
<p><em>Catalog.h<br />
Catalog.cpp<br />
Controller.h<br />
Controller.cpp<br />
DesktopImage.h<br />
DesktopImage.cpp<br />
DesktopImageLayout.h<br />
DesktopImageLayout.cpp<br />
View.h<br />
View.cpp<br /></em></p>
<p>and <em>View.nib</em> must go to the Resources folder (create one if one does not exist)</p>
<p>The project should resemble something similar to this once the aforementioned steps have been completed&#8230;</p>
<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2007/11/qtcaproject.png"></p>
<p>Now that the project is created, we must create our custom widget that will display the CovertFlow view which is written using the Quartz Core framework.</p>
<p>Below is the code to our custom widget named QtCoverFlowWidget</p>
<pre>
<strong>class</strong> <font color="#2040a0">QtCoverFlowWidget</font> <font color="4444FF">:</font> <strong>public</strong> <font color="#2040a0">QWidget</font>
<font color="4444FF"><strong>{</strong></font>
   <font color="#2040a0">Q_OBJECT</font>
   <strong>public</strong><font color="4444FF">:</font>
      <font color="#2040a0">QtCoverFlowWidget</font><font color="4444FF">(</font><font color="#2040a0">QWidget</font> <font color="4444FF">*</font><font color="#2040a0">parent</font> <font color="4444FF">=</font> <font color="#FF0000">0</font><font color="4444FF">)</font> <font color="4444FF">:</font> <font color="#2040a0">QWidget</font><font color="4444FF">(</font><font color="#2040a0">parent</font><font color="4444FF">)</font>
      <font color="4444FF"><strong>{</strong></font>
         <font color="#444444">// instantiate controller for the covertflow view</font>
	 <font color="#2040a0">HIViewRef</font> <font color="#2040a0">coverFlowRef</font><font color="4444FF">;</font>
         <font color="#2040a0">controller</font> <font color="4444FF">=</font> <font color="4444FF">[</font><font color="4444FF">[</font><font color="#2040a0">Controller</font> <font color="#2040a0">alloc</font><font color="4444FF">]</font> <font color="#2040a0">init</font><font color="4444FF">]</font><font color="4444FF">;</font>
         <font color="#444444">//HICocoaView wrapper around covert flow view</font>
         <font color="#2040a0">HICocoaViewCreate</font><font color="4444FF">(</font><font color="4444FF">[</font><font color="#2040a0">controller</font> <font color="#2040a0">view</font><font color="4444FF">]</font>, <font color="#FF0000">0</font>, <font color="4444FF">&amp;</font><font color="#2040a0">coverFlowRef</font><font color="4444FF">)</font><font color="4444FF">;</font>
         <font color="#2040a0">create</font><font color="4444FF">(</font><font color="#2040a0">WId</font><font color="4444FF">(</font><font color="#2040a0">coverFlowRef</font><font color="4444FF">)</font><font color="4444FF">)</font><font color="4444FF">;</font>
         <font color="#444444">// connect resize of parent to resize of ourselves</font>
         <font color="#2040a0">connect</font><font color="4444FF">(</font><font color="#2040a0">parent</font>, <font color="#2040a0">SIGNAL</font><font color="4444FF">(</font><font color="#2040a0">resized</font><font color="4444FF">(</font><strong>int</strong>, <strong>int</strong><font color="4444FF">)</font><font color="4444FF">)</font>, <strong>this</strong>, <font color="#2040a0">SLOT</font><font color="4444FF">(</font><font color="#2040a0">slotResize</font><font color="4444FF">(</font><strong>int</strong>, <strong>int</strong><font color="4444FF">)</font><font color="4444FF">)</font><font color="4444FF">)</font><font color="4444FF">;</font>
      <font color="4444FF"><strong>}</strong></font>
      <strong>virtual</strong> ~<font color="#2040a0">QtCoverFlowWidget</font><font color="4444FF">(</font><font color="4444FF">)</font> <font color="4444FF"><strong>{</strong></font> <font color="4444FF"><strong>}</strong></font>

   <strong>protected</strong> <font color="#2040a0">slots</font><font color="4444FF">:</font>
      <strong>void</strong> <font color="#2040a0">slotResize</font> <font color="4444FF">(</font> <strong>int</strong> <font color="#2040a0">w</font>, <strong>int</strong> <font color="#2040a0">h</font> <font color="4444FF">)</font>
      <font color="4444FF"><strong>{</strong></font>
         <font color="#444444">// resize ourselves</font>
         <font color="#2040a0">resize</font><font color="4444FF">(</font><font color="#2040a0">w</font>, <font color="#2040a0">h</font><font color="4444FF">-</font><font color="#FF0000">20</font><font color="4444FF">)</font><font color="4444FF">;</font>
      <font color="4444FF"><strong>}</strong></font>
   <strong>private</strong><font color="4444FF">:</font>
      <font color="#2040a0">Controller</font> <font color="4444FF">*</font><font color="#2040a0">controller</font><font color="4444FF">;</font>
<font color="4444FF"><strong>}</strong></font><font color="4444FF">;</font>
</pre>
<p>We derive the QtCoverFlowWidget from the QWidget class. The CovertFlow example that Apple provides is a classic example of an MVC application. Therefore, in the constructor of our custom widget, we instantiate the controller associated with the CovertFlow example. We then create and HICocoaView which wraps the NSView containing the Cover Flow view and then associate our widget with the HIViewRef associated with the HIView wrapping the NSView which contains the Cover Flow view. This is made possible by the fact that a QWidget is just an HIView on its own. Carbon API can be used to communicate directly to the QWidget, which is an HIView. There are some useful Qt functions which help bridge Carbon and the Qt API. These functions are:</p>
<pre>
<font color="#444444">// returns an HIViewRef/WindowPtr which is associated with the QWidget</font>
<font color="#2040a0">HIViewRef</font> <font color="#2040a0">qt_mac_hiview_for</font><font color="4444FF">(</font><strong>const</strong> <font color="#2040a0">QWidget</font> <font color="4444FF">*</font><font color="#2040a0">w</font><font color="4444FF">)</font>
<font color="#2040a0">WindowPtr</font> <font color="#2040a0">qt_mac_window_for</font><font color="4444FF">(</font><strong>const</strong> <font color="#2040a0">QWidget</font> <font color="4444FF">*</font><font color="#2040a0">w</font><font color="4444FF">)</font>
</pre>
<pre>
<font color="#444444">// returns HIViewRef for a native Carbon Window and vise versa</font>
<font color="#2040a0">HIViewRef</font> <font color="#2040a0">qt_mac_hiview_for</font><font color="4444FF">(</font><font color="#2040a0">WindowPtr</font> <font color="#2040a0">w</font><font color="4444FF">)</font>
<font color="#2040a0">WindowPtr</font> <font color="#2040a0">qt_mac_window_for</font><font color="4444FF">(</font><font color="#2040a0">HIViewRef</font> <font color="#2040a0">hiview</font><font color="4444FF">)</font>
</pre>
<p>In order for the above functions to be used in code, all you need to do is <font color="0000ff"><strong>#include <font color="#008000">&lt;QtGui&gt;</font></strong></font>.</p>
<p>We also have a slot implemented named <em>slotResize(int, int)</em>. This slot is hooked to the <em>resized(int, int)</em> signal which is emitted by the parent of this widget (our QMainWindow implementation). This can be seen in the example code here:</p>
<pre>
<font color="#2040a0">connect</font><font color="4444FF">(</font><font color="#2040a0">parent</font>, <font color="#2040a0">SIGNAL</font><font color="4444FF">(</font><font color="#2040a0">resized</font><font color="4444FF">(</font><strong>int</strong>, <strong>int</strong><font color="4444FF">)</font><font color="4444FF">)</font>, <strong>this</strong>, <font color="#2040a0">SLOT</font><font color="4444FF">(</font><font color="#2040a0">slotResize</font><font color="4444FF">(</font><strong>int</strong>, <strong>int</strong><font color="4444FF">)</font><font color="4444FF">)</font><font color="4444FF">)</font><font color="4444FF">;</font>
</pre>
<p>The parent widget is actually a custom widget as well. Specifically, it is a custom implementation of the QMainWindow. Not much happens in this implementation except the interception of the <em>resizeEvent(QResizeEvent *)</em> and the action of emitting the <em>resized(int, int)</em> signal once that occurs.</p>
<p><strong>Last steps</strong></p>
<p>There are also a few things that must be done in order to have a properly integrated Cocoa event loop. The main function needs the following:</p>
<pre>
<font color="#2040a0">NSAutoreleasePool</font> <font color="4444FF">*</font><font color="#2040a0">pool</font> <font color="4444FF">=</font> <font color="4444FF">[</font><font color="4444FF">[</font><font color="#2040a0">NSAutoreleasePool</font> <font color="#2040a0">alloc</font><font color="4444FF">]</font> <font color="#2040a0">init</font><font color="4444FF">]</font><font color="4444FF">;</font>
<font color="#2040a0">NSApplicationLoad</font><font color="4444FF">(</font><font color="4444FF">)</font><font color="4444FF">;</font>
...
...
...
<font color="4444FF">[</font><font color="#2040a0">pool</font> <font color="#2040a0">release</font><font color="4444FF">]</font><font color="4444FF">;</font>
</pre>
<p>The above code ensures the Cocoa event loop is running and properly handling Cocoa events.</p>
<p>Now we can simply instantiate our custom QtCoverFlowWidget just like we do any other Qt Widget. All the code, including the Xcode project as well as the binaries can be found here&#8230;</p>
<p><a href="http://rapidshare.com/files/71187921/QtCoverFlowExample.zip.html">QtCoverFlowExample.zip</a> Binary Universal Bundle<br />
<a href="http://blogs.seapine.com/yan/wp-content/uploads/2007/11/qtcoverflowexample_src.zip">QtCoverFlowExample_src.zip</a> Source</p>
<p>And the results are&#8230;.</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/CnkBRSNsrMc"></param> <embed src="http://www.youtube.com/v/CnkBRSNsrMc" type="application/x-shockwave-flash" width="425" height="350"></embed></object></p>
<p><strong>Conclusion</strong></p>
<p>The HICocoaView made the above possible. The HICocoaView is a power class allowing developers to mix Cocoa views inside their Carbon application. Perhaps next time we’ll do something with Apple&#8217;s QTKit.</p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=QtCoverFlowWidget+using+Core+Animation+and+Qt&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fqtcoverflowwidget-using-core-animation-and-qt.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/qtcoverflowwidget-using-core-animation-and-qt.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>A peek at Xcode 3.0</title>
		<link>http://blogs.seapine.com/yan/a-peak-at-xcode-30.html</link>
		<comments>http://blogs.seapine.com/yan/a-peak-at-xcode-30.html#comments</comments>
		<pubDate>Thu, 15 Nov 2007 02:10:04 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/a-peak-at-xcode-30.html</guid>
		<description><![CDATA[
I have been using Xcode 3.0 for some time now. It has worked quite well in production for me. Full of features and enhancements make it one of the best development environments to work with. One of the features which particularly strikes me as genius is the Project Organizer. This feature is available from the [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "A peek at Xcode 3.0", url: "http://blogs.seapine.com/yan/a-peak-at-xcode-30.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.musingsfrommars.org/images/Xcode_Icon.png"></p>
<p>I have been using Xcode 3.0 for some time now. It has worked quite well in production for me. Full of features and enhancements make it one of the best development environments to work with. One of the features which particularly strikes me as genius is the Project Organizer. This feature is available from the Window menu.</p>
<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2007/11/xcode_organizer1.png"></p>
<p>Not only does the organizer allow the developer to maintain a number of Xcode projects in an effectively organized way, but it also allows for building Makefile projects. This is in fact something new from Apple and is extremely convenient. Open source projects fit favorably in the little window which is brilliant to say the least.</p>
<p>But let’s take it one step further, not only is the Organizer an organizer, but it is also a lightweight SCM system. Sure it is a local, file based SCM system, but it is extremely useful.</p>
<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2007/11/xcode_organizer2.png"></p>
<p>This lightweight SCM functionality is by no means a replacement for the SCM system one uses. It is extremely light weight and allows for better organizing changes made on the local machine. This is quite beneficial for my needs as I often work on code involving a large number of changes which I perform incrementally. Once I reach a stable or satisfactory state of the development task, I simply create a snapshot. The reason I do so is because quite often it is not desired to check in one’s partial changes to the main code repository used by your project team, as it may inflict unnecessary, yet inadvertent, pain on them. This feature allows the developer to experiment effectively while maintaining a coherent and easily accessible history of changes. I often code in a location where there is no internet access and I am unable to check in my desired changes for example. During those times, I can simply create a snapshot and restore later when I am ready to perform the check in to the public code tree.</p>
<p>Let’s move on&#8230; so I began coding and I created a snapshot before hand. I made some changes and decided to Create another snapshot. Let’s see what this looks like&#8230;</p>
<p><img src="http://blogs.seapine.com/yan/wp-content/uploads/2007/11/xcode_organizer3.png"></p>
<p>As you can see, the file differences in the “Files Changed” list are displayed and right below that is the differences results, provided by Xcode’s built-in diff tool. Yes, it does look very similar to filemerge. The toolbar provides few operations but gives the user the ability to create more snapshots, delete snapshots and of course restore your project state to a particular snapshot.</p>
<p>Finally, the Organizer also possesses an editor, thus allowing the developer to perform all of his/her work from inside the Organizer.</p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=A+peek+at+Xcode+3.0&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fa-peak-at-xcode-30.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/a-peak-at-xcode-30.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Cut your wires! Well&#8230; not just yet.</title>
		<link>http://blogs.seapine.com/yan/cut-your-wires-well-not-just-yet.html</link>
		<comments>http://blogs.seapine.com/yan/cut-your-wires-well-not-just-yet.html#comments</comments>
		<pubDate>Thu, 16 Nov 2006 15:09:25 +0000</pubDate>
		<dc:creator>yan</dc:creator>
		
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://blogs.seapine.com/yan/cut-your-wires-well-not-just-yet.html</guid>
		<description><![CDATA[
I was browsing around the other day and ran into an interesting post which discusses the idea of energy transmission without wires - wireless power. The post can be located here:
http://arstechnica.com/news.ars/post/20061115-8229.html
This is the research paper that describes the wireless power proposal in greater detail by MIT faculty and students:
http://arxiv.org/ftp/physics/papers/0611/0611063.pdf
<script type="text/javascript">SHARETHIS.addEntry({ title: "Cut your wires! Well&#8230; not just yet.", url: "http://blogs.seapine.com/yan/cut-your-wires-well-not-just-yet.html" });</script>]]></description>
			<content:encoded><![CDATA[<p><center><img src="http://namake.moe-nifty.com/therapy/powerline-05.jpg" alt="" /></center><br />
I was browsing around the other day and ran into an interesting post which discusses the idea of energy transmission without wires - wireless power. The post can be located here:</p>
<p><a href="http://arstechnica.com/news.ars/post/20061115-8229.html">http://arstechnica.com/news.ars/post/20061115-8229.html</a></p>
<p>This is the research paper that describes the wireless power proposal in greater detail by MIT faculty and students:</p>
<p><a href="http://arxiv.org/ftp/physics/papers/0611/0611063.pdf">http://arxiv.org/ftp/physics/papers/0611/0611063.pdf</a></p>
<p><a href="http://sharethis.com/item?&wp=2.6.2&amp;publisher=040a032d-1c7a-4cd7-b8b9-a6f472a67bd5&amp;title=Cut+your+wires%21+Well%26%238230%3B+not+just+yet.&amp;url=http%3A%2F%2Fblogs.seapine.com%2Fyan%2Fcut-your-wires-well-not-just-yet.html">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.seapine.com/yan/cut-your-wires-well-not-just-yet.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
