<?xml version='1.0' encoding='utf-8' ?>
<!--  If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/  -->
<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
<channel>
  <title>Manish Jethani: Weblog</title>
  <link>http://mannu.livejournal.com/</link>
  <description>Manish Jethani: Weblog - LiveJournal.com</description>
  <lastBuildDate>Sat, 22 Dec 2007 22:28:38 GMT</lastBuildDate>
  <generator>LiveJournal / LiveJournal.com</generator>
  <lj:journal>mannu</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/406035.html</guid>
  <pubDate>Sat, 22 Dec 2007 22:28:38 GMT</pubDate>
  <title>You can see the smiley face</title>
  <link>http://mannu.livejournal.com/406035.html</link>
  <description>&lt;p&gt;Holy crap! IE8 &lt;a href=&quot;http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx&quot; title=&quot;Internet Explorer 8 and Acid2: A Milestone&quot;&gt;passes&lt;/a&gt; the &lt;a href=&quot;http://en.wikipedia.org/wiki/Acid2&quot;&gt;Acid2&lt;/a&gt; test!&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/406035.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/405895.html</guid>
  <pubDate>Fri, 21 Dec 2007 16:17:30 GMT</pubDate>
  <title>Where money comes from</title>
  <link>http://mannu.livejournal.com/405895.html</link>
  <description>&lt;p&gt;Here’s a nice 45-minute video on how the monetary system works, and why 
it’s such a scary thing.&lt;/p&gt;

&lt;lj-embed id=&quot;4&quot; /&gt;

&lt;p&gt;URL: &lt;a href=&quot;http://tinyurl.com/2p63mr&quot;&gt;http://tinyurl.com/2p63mr&lt;/a&gt;&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/405895.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/404681.html</guid>
  <pubDate>Sat, 23 Jun 2007 00:10:20 GMT</pubDate>
  <title>Setting up default CSS for your Flex component</title>
  <link>http://mannu.livejournal.com/404681.html</link>
  <description>&lt;p&gt;There are 3 ways to specify the default styling (CSS) for your own
custom-built UI components in Flex.&lt;/p&gt;

&lt;p&gt;Let&apos;s take the example of a component called TagBar that I&apos;m building.
The component is very similar to the LinkBar component of the Flex
library: it displays a list of &quot;tags&quot; (like a tag cloud) that the user
can click through for more information.&lt;/p&gt;

&lt;p&gt;The default look of the component is as shown in the image below:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/1fef5d3a.png&quot; alt=&quot;The TagBar component&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The component itself is simply a subclass of the LinkBar component. The
above look is achieved by setting the following styles:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;TagBar {
  color: #00A7E3;
  font-family: Lucida Grande, Tahoma, Verdana, Arial;
  font-size: 11;
  font-weight: normal;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  separator-width: 1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;How do we provide this default styling as part of the component?&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;h4&gt;1. Using a static initialiser&lt;/h4&gt;

&lt;p&gt;A very popular technique, and one &lt;a href=&quot;http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;amp;file=skinstyle_149_7.html&quot;&gt;recommended by Adobe&lt;/a&gt;, is to use a
static initialiser in your component class.  Unfortunately the Adobe
example is &lt;em&gt;wrong&lt;/em&gt;. It&apos;s worth repeating: the Adobe example is &lt;em&gt;wrong&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The right way to set up styles in the static initialiser is as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class TagBar extends LinkBar
{
  private static var classConstructed:Boolean = classConstruct();

  private static function classConstruct():Boolean
  {
    var styleDeclaration:CSSStyleDeclaration
      = StyleManager.getStyleDeclaration(&quot;TagBar&quot;);

    // If there&apos;s no style declaration already, create one.
    if (!styleDeclaration)
      styleDeclaration = new CSSStyleDeclaration();

    styleDeclaration.defaultFactory = function ():void {
      this.color = 0x00A7E3;
      this.fontFamily = &quot;Lucida Grande, Tahoma, Verdana, Arial&quot;;
      this.fontSize = 11;
      this.fontWeight = &quot;normal&quot;;
      this.paddingBottom = 0;
      this.paddingLeft = 0;
      this.paddingRight = 0;
      this.paddingTop = 0;
    }

    StyleManager.setStyleDeclaration(&quot;TagBar&quot;, styleDeclaration,
      false);

    return true;
  }

  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The advantage of this method is that the default styling is part of your
component and does not rely on any external CSS, while at the same time
it is possible to override the styles by using CSS selectors, inline
styles, or using &lt;code&gt;setStyle()&lt;/code&gt;, just the way it is for the components in
the Flex library.&lt;/p&gt;

&lt;p&gt;The disadvantage is that it is error-prone and can be hard to maintain,
not to mention that the styling can only be changed by somebody who has
some knowledge of ActionScript (i.e. a developer, not a designer).&lt;/p&gt;

&lt;a name=&quot;cutid2&quot;&gt;&lt;/a&gt;
&lt;h4&gt;2. Using an MXML component&lt;/h4&gt;

&lt;p&gt;Another technique I discovered is to write the component in an
&quot;abstract&quot; base class in ActionScript and then provide a subclass - the
actual component - in MXML.&lt;/p&gt;

&lt;p&gt;The base class would look like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class TagBarBase extends LinkBar
{
  /* Implementation of the TagBar component */
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The MXML component would look like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!-- TagBar.mxml --&amp;gt;
&amp;lt;TagBarBase 
  color=&quot;#00A7E3&quot;
  fontFamily=&quot;Lucida Grande, Tahoma, Verdana, Arial&quot;
  fontSize=&quot;11&quot;
  fontWeight=&quot;normal&quot;
  paddingBottom=&quot;0&quot;
  paddingLeft=&quot;0&quot;
  paddingRight=&quot;0&quot;
  paddingTop=&quot;0&quot;
  separatorWidth=&quot;1&quot;
  /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The only purpose of the MXML component is to extend the actual
implementation class to provide default styling.&lt;/p&gt;

&lt;p&gt;The main advantage of this method is that it&apos;s very easy for the
designer to modify the default look of the component using the Flex
Builder properties panel, without having to edit any MXML, ActionScript,
or CSS code. The changes made thus are also immediately reflected in the
Flex Builder design view.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/f622419c.png&quot; alt=&quot;Flex Builder properties panel&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The disadvantage is that now you have to maintain an additional MXML
file for every component. There might also be some performance overhead
(though minimal) of having an extra class in the hierarchy.&lt;/p&gt;

&lt;h4&gt;3. Using a theme CSS file&lt;/h4&gt;

&lt;p&gt;The default styling for your component can also be bundled into your
component SWC as a &lt;code&gt;theme.css&lt;/code&gt; file.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/* theme.css */
TagBar {
  color: #00A7E3;
  font-family: Lucida Grande, Tahoma, Verdana, Arial;
  font-size: 11;
  font-weight: normal;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  separator-width: 1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The CSS file, along with any assets, can be compiled into your SWC in
the following manner:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;compc TagBar -output TagBar.swc -source-path+=. \
  -include-file theme.css ./theme.css
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The application developer using your component would then have to
specify your component SWC in the list of theme SWCs for the
application.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mxmlc main.mxml -library-path+=TagBar.swc -theme+=TagBar.swc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you can see, the &lt;code&gt;TagBar.swc&lt;/code&gt; file is specified twice, once for the
library path (which is normal) and a second time for the theme CSS. The
&lt;code&gt;theme&lt;/code&gt; argument of &lt;code&gt;mxmlc&lt;/code&gt; specifies the &quot;theme&quot; CSS (default styling)
to be used in the application.  (For what it&apos;s worth, I haven&apos;t figured
out how to specify additional theme SWCs using Flex Builder.)&lt;/p&gt;

&lt;p&gt;The advantage of this method obviously is that your styling is now part
of the SWC file for your component. Having the default styling in a
&lt;code&gt;theme.css&lt;/code&gt; file also feels right and is easier to maintain.&lt;/p&gt;

&lt;p&gt;The disadvantage? For one, the designer cannot make changes to the
default look without dabbling in CSS, nor are the changes reflected in
Flex Builder&apos;s design view. Another problem with this approach is that
&lt;em&gt;all&lt;/em&gt; the styles in the &lt;code&gt;theme.css&lt;/code&gt; are compiled into the final SWF,
even for those components that aren&apos;t actually used in the application.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/404681.html</comments>
  <category>flex</category>
  <lj:mood>geeky</lj:mood>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/403965.html</guid>
  <pubDate>Mon, 04 Jun 2007 10:53:21 GMT</pubDate>
  <title>Twitter</title>
  <link>http://mannu.livejournal.com/403965.html</link>
  <description>&lt;p&gt;I&apos;ve been &lt;a href=&quot;http://twitter.com/mannu&quot;&gt;twittering&lt;/a&gt;.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/403965.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/398980.html</guid>
  <pubDate>Thu, 01 Mar 2007 13:17:37 GMT</pubDate>
  <title>Last day at Adobe</title>
  <link>http://mannu.livejournal.com/398980.html</link>
  <description>&lt;p&gt;Today was my last day at &lt;a href=&quot;http://www.adobe.com/&quot;&gt;Adobe&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I was reading &lt;a href=&quot;http://www.foundersatwork.com/stevewozniak.html&quot;&gt;Steve Wozniak&amp;#8217;s interview&lt;/a&gt; in which he says how he
thought he was never going to leave HP:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I said, &amp;#8220;No, I&amp;#8217;m never going to leave Hewlett-Packard. It&amp;#8217;s my job
  for life. It&amp;#8217;s the best company because it&amp;#8217;s so good to engineers.&amp;#8221; It
  really treated us like we were a community and family, and everyone
  cared about everyone else. Engineers&amp;#8212;bottom of the org chart
  people&amp;#8212;could come up with the ideas that would be the next hot
  products for the company. Everything was open to thought, discussion
  and innovation. So I would never leave Hewlett-Packard. I was going to
  be an engineer for life there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I felt the same way about Macromedia and Adobe. It was going to be my job for life! But, alas, all good things must come to an end.&lt;/p&gt;

&lt;p&gt;The one question I&amp;#8217;m not answering is what I&amp;#8217;m doing next. Because I
don&amp;#8217;t know myself! If you have any brilliant ideas, feel free to email me. For now, I&amp;#8217;m just taking a break to go pursue some of my personal interests&amp;#8230;.&lt;/p&gt;

&lt;p&gt;To all my friends at Adobe: &lt;em&gt;stay in touch&lt;/em&gt;.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/398980.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/398104.html</guid>
  <pubDate>Sat, 24 Feb 2007 20:32:52 GMT</pubDate>
  <title>Lisp in Flash</title>
  <link>http://mannu.livejournal.com/398104.html</link>
  <description>&lt;p&gt;
&lt;a href=&quot;http://www.theserverside.net/news/thread.tss?thread_id=41442&quot;&gt;Peter Fisk&lt;/a&gt; has written a &lt;a href=&quot;http://vistasmalltalk.wordpress.com/2007/02/23/first-flash-animations/&quot;&gt;Lisp interpreter in ActionScript&lt;/a&gt;.
&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/398104.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/394779.html</guid>
  <pubDate>Thu, 08 Feb 2007 10:48:32 GMT</pubDate>
  <title>Picnik: online photo editor</title>
  <link>http://mannu.livejournal.com/394779.html</link>
  <description>&lt;p&gt;Recently I&amp;#8217;ve &lt;a href=&quot;http://www.riapedia.com/&quot;&gt;discovered&lt;/a&gt; a couple of useful Flex-based online apps. The first one is &lt;a href=&quot;http://www.picnik.com/&quot;&gt;Picnik, an online photo editor&lt;/a&gt;. It&amp;#8217;s good for basic image processing&amp;#8212;cropping, resizing, colour adjustment, red-eye reduction, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/445af694.jpg&quot; alt=&quot;[image: Picnik: Loading...]&quot; title=&quot;Picnik: Loading...&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Like most such editors, Picnik can work with images stored locally on your computer or images from a website, but the best part is the Flickr integration. Yes&amp;#8212;it can log in to your &lt;a href=&quot;http://flickr.com/&quot;&gt;Flickr&lt;/a&gt; account, grab all your photos, and let you edit them and save them back to Flickr! This could become my primary front-end to my favourite photo-sharing site.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/ac5df4de.jpg&quot; alt=&quot;[image: Picnik: Save to Flickr]&quot; title=&quot;Picnik: Save to Flickr&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I agree with &lt;a href=&quot;http://www.onflex.org/ted/2007/02/gradient-20-and-picnikcom-photo-editing.php&quot;&gt;Ted Patrick&lt;/a&gt; that this is probably the best Flex 2 app I&amp;#8217;ve seen to date.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/394779.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/393919.html</guid>
  <pubDate>Thu, 25 Jan 2007 08:37:06 GMT</pubDate>
  <title>India&apos;s national motto</title>
  <link>http://mannu.livejournal.com/393919.html</link>
  <description>&lt;p&gt;&quot;Are you married? Why not?&quot;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;strong&gt;Courtesy&lt;/strong&gt;: &lt;a href=&quot;http://uncyclopedia.org/wiki/India&quot;&gt;Uncyclopedia&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/393919.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/390945.html</guid>
  <pubDate>Thu, 04 Jan 2007 09:37:40 GMT</pubDate>
  <title>2007: the year of OpenID?</title>
  <link>http://mannu.livejournal.com/390945.html</link>
  <description>&lt;p&gt;Chris Messina has been making &lt;a href=&quot;http://factoryjoe.com/blog/2007/01/03/zdnet-calls-2007-the-year-of-url-based-identity/&quot;&gt;posts&lt;/a&gt; about OpenID, and I also read &lt;a href=&quot;http://radar.oreilly.com/archives/2006/12/openid_on_the_u.html&quot;&gt;similar reports&lt;/a&gt; on O&apos;Reilly Radar. Is 2007 going to be the year of OpenID?&lt;/p&gt;

&lt;p&gt;I hope so. I&apos;ve always &lt;a href=&quot;http://mannu.livejournal.com/132302.html&quot;&gt;found it funny&lt;/a&gt; how anyone can be impersonated so easily on the internet, be it email or blogs. Imagine when Bill Gates leaves a comment on a blog: who&apos;s going to believe it&apos;s him?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://openid.net/&quot;&gt;OpenID&lt;/a&gt; is an &quot;open, decentralized, free framework for user-centric digital identity&quot;, a system under which users are identified by their URIs. For example, when I end up on an &lt;a href=&quot;http://www.openidenabled.com/&quot;&gt;OpenID-enabled site&lt;/a&gt;, it asks me for &lt;a href=&quot;http://mannu.livejournal.com/&quot;&gt;my URI&lt;/a&gt;, which it then verifies with my &lt;a href=&quot;http://www.livejournal.com/openid/server.bml&quot;&gt;identity provider&lt;/a&gt;. At the end of it, the site &lt;em&gt;knows&lt;/em&gt; I am who I say I am.&lt;/p&gt;

&lt;p&gt;I&apos;ve been through the &lt;a href=&quot;http://openid.net/specs.bml&quot;&gt;specs&lt;/a&gt; and also tried to implement a stateless Flash-based OpenID consumer (unsuccessfully). It&apos;s a very simple protocol, with &lt;a href=&quot;http://www.lifewiki.net/openid/OpenIDLibraries&quot;&gt;implementations&lt;/a&gt; available in various languages already. Hopefully I&apos;ll find time to complete a pure client-side (either ActionScript or JavaScript) implementation sometime.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/390945.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/387548.html</guid>
  <pubDate>Mon, 11 Dec 2006 13:57:44 GMT</pubDate>
  <title>&apos;In the end, all that matters is what you&apos;ve done&apos;</title>
  <link>http://mannu.livejournal.com/387548.html</link>
  <description>&lt;p&gt;Last night I saw &lt;a href=&quot;http://www.imdb.com/title/tt0346491/&quot;&gt;&lt;cite&gt;Alexander&lt;/cite&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/9d8c1397.gif&quot; alt=&quot;[image: Photo from Alexander the movie]&quot; title=&quot;Alexander the Great&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The best part in the movie is when Alexander gives a pep talk to his soldiers, just before their &lt;a href=&quot;http://en.wikipedia.org/wiki/Battle_of_Issus&quot;&gt;attack&lt;/a&gt; on the Persian army (an army six times their size). He addresses some of the soldiers by name and reminds them of their past achievements, of their sacrifices in past battles. There&amp;#8217;s many a leadership lesson in there. After all, how does one inspire so many to give their lives for a cause?&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s a lot of philosophy in the movie. The tale of Alexander is an inspiring as well as a thought-provoking one.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m going to spend some time studying the lives of great men and women who have walked this planet. Some of them may be myths. Doesn&amp;#8217;t matter.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/387548.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/386426.html</guid>
  <pubDate>Sat, 09 Dec 2006 20:21:25 GMT</pubDate>
  <title>Moving a motorbike</title>
  <link>http://mannu.livejournal.com/386426.html</link>
  <description>&lt;p&gt;Bhai log. Have you ever moved a two-wheeler from one city to another? How do you go about it?&lt;/p&gt;

&lt;p&gt;In my case, the cities are Bangalore (from) and Mumbai (to). The distance between the two cities is approx. 1,000 kilometres, so riding is ruled out.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/386426.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/384865.html</guid>
  <pubDate>Thu, 30 Nov 2006 22:11:38 GMT</pubDate>
  <title>Sindhi scripts</title>
  <link>http://mannu.livejournal.com/384865.html</link>
  <description>&lt;p&gt;My &amp;#8220;mother tongue&amp;#8221;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Sindhi_language&quot;&gt;Sindhi&lt;/a&gt;, is supposed to have been written in &lt;a href=&quot;http://www.sindhilanguage.com/script.html&quot;&gt;more than &lt;em&gt;eight&lt;/em&gt; different scripts&lt;/a&gt;&amp;#8212;including Devanagari! This comes as a surprise to me. My family always wrote it in the &lt;a href=&quot;http://www.omniglot.com/writing/sindhi.htm&quot;&gt;Arabic script&lt;/a&gt;. I suspect there are very few Sindhis out there who write using Devanagari, let alone some of the other ancient scripts.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s a shame I call it my mother tongue: I can barely speak Sindhi.&lt;/p&gt;

&lt;p&gt;My grandmother can use both &lt;a href=&quot;http://www.google.com/intl/sd/&quot;&gt;Google&lt;/a&gt; and &lt;a href=&quot;http://sd.wikipedia.org/&quot;&gt;Wikipedia&lt;/a&gt;. Unfortunately there isn&amp;#8217;t much content out there. It&amp;#8217;s upto me and my generation to save our language. It might be worth it&amp;#8212;it&amp;#8217;s an interesting language.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/384865.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/383661.html</guid>
  <pubDate>Sat, 25 Nov 2006 23:24:08 GMT</pubDate>
  <title>Expose-like window navigation in Flex</title>
  <link>http://mannu.livejournal.com/383661.html</link>
  <description>&lt;p&gt;What&apos;s the point in &lt;a href=&quot;http://flickr.com/photos/mannu/290474755/&quot;&gt;buying a Mac&lt;/a&gt; if you&apos;re not going to copy some of its cool features?&lt;/p&gt;

&lt;p&gt;In my spare time, I&apos;ve been working on an implementation of &lt;a href=&quot;http://www.apple.com/macosx/features/expose/&quot;&gt;Expose&lt;/a&gt;-like window navigation in Flex 2. It&apos;s nowhere near complete, but I got so desperate to write about it that I&apos;ve uploaded a quick demo &lt;a href=&quot;http://tasmania.globat.com/~mannu.info/flex/fTubeWithFlexpose/fTube.swf&quot;&gt;here&lt;/a&gt; (SWF).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/mannu/306006810/&quot; title=&quot;Photo Sharing&quot;&gt;&lt;img src=&quot;http://static.flickr.com/118/306006810_05bf20e264_m.jpg&quot; width=&quot;240&quot; height=&quot;173&quot; alt=&quot;fTube with Flexpose&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Demo&lt;/strong&gt;: &lt;a href=&quot;http://tasmania.globat.com/~mannu.info/flex/fTubeWithFlexpose/fTube.swf&quot;&gt;fTube with Flexpose&lt;/a&gt; (SWF)&lt;/p&gt;

&lt;p&gt;My implementation is called &lt;em&gt;Flexpose&lt;/em&gt;. To see it in action:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a few videos by double-clicking on items in the data grid.&lt;/li&gt;
&lt;li&gt;Make sure some of the windows are overlapping. If not, you can just arrange them anyhow by dragging them by their title bars.&lt;/li&gt;
&lt;li&gt;Press F8 to enter expose mode.&lt;/li&gt;
&lt;li&gt;To make a window active, click on it.&lt;/li&gt;
&lt;/ul&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;As I said earlier, it&apos;s nowhere near complete. Here&apos;s a list of known bugs and missing features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;F8 doesn&apos;t work when none of the controls have focus.&lt;/li&gt;
&lt;li&gt;When a window is highlighted (by hovering the mouse over it), its title should be displayed in front, in a larger font.&lt;/li&gt;
&lt;li&gt;Keyboard navigation is not yet implemented. To switch between windows, you have to use the mouse.&lt;/li&gt;
&lt;li&gt;The windows animate to different positions depending on which one is currently active. This is due to a small implementation glitch: the windows are sorted by their order on the display list, whereas they should be sorted based on their screen positions.&lt;/li&gt;
&lt;li&gt;When the number of windows exceeds a certain limit, the whole thing becomes sluggish.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Am I missing anything? Let me know.&lt;/p&gt;

&lt;p&gt;In any case, this is pretty good for what you can do in a web browser. And to think it takes only one line of MXML to include this in &lt;em&gt;any&lt;/em&gt; Flex 2 application.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;Flexpose /&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Yup, that&apos;s it. One line.&lt;/p&gt;

&lt;p&gt;So, now you must be wondering where you can get the source code. Hang on a little more. In addition to the above list of bugs and missing features, I also need to refactor the code, optimise it, comment it, etc. I&apos;m going on a long vacation now, so I&apos;ll probably complete this when I come back in 2007. Meanwhile, feel free to show this demo to your friends (heh).&lt;/p&gt;

&lt;p&gt;Happy Hacking.&lt;/p&gt;

&lt;p&gt;PS: The demo &lt;a href=&quot;http://mannu.livejournal.com/326881.html?thread=1911777#t1911777&quot;&gt;won&apos;t work in Internet Explorer&lt;/a&gt;. Sorry about that.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/383661.html</comments>
  <category>flex</category>
  <category>hacks</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/383339.html</guid>
  <pubDate>Wed, 22 Nov 2006 12:09:04 GMT</pubDate>
  <title>Markdown preview with Vim</title>
  <link>http://mannu.livejournal.com/383339.html</link>
  <description>&lt;p&gt;More on OS X geek lifestyle.&lt;/p&gt;

&lt;p&gt;How do you compose your blog entries? I write mine in &lt;a href=&quot;http://daringfireball.net/projects/markdown/syntax&quot;&gt;Markdown
format&lt;/a&gt;; once done, I pass the text through the &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt; and
&lt;a href=&quot;http://daringfireball.net/projects/smartypants/&quot;&gt;SmartyPants&lt;/a&gt; filters, and finally to &lt;a href=&quot;http://ljcharm.sourceforge.net/&quot;&gt;Charm&lt;/a&gt; (all in one
command).&lt;/p&gt;

&lt;p&gt;While composing in Vim, I feel the need to preview sometimes, often
every few seconds. To save myself all the typing, I&amp;#8217;ve now made this
entry in my .vimrc file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;imap &amp;lt;F8&amp;gt; &amp;lt;ESC&amp;gt;:w!&amp;lt;CR&amp;gt;:!markdown % \| smartypants &amp;gt; %.html &amp;amp;&amp;amp; open %.html&amp;lt;CR&amp;gt;&amp;lt;CR&amp;gt;a&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It says, &amp;#8220;When I press F8, (1) save the file, (2) run it through
Markdown and SmartyPants, saving the output in an HTML file, (3)
and open it in the default web browser (Safari).&amp;#8221; Works wonderfully for
me! I&amp;#8217;ve hit F8 about ten times while composing this post, heh.&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;You can also make this entry if you want F8 to work in command mode as
well:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;map &amp;lt;F8&amp;gt; :w!&amp;lt;CR&amp;gt;:!markdown % \| smartypants &amp;gt; %.html &amp;amp;&amp;amp; open %.html&amp;lt;CR&amp;gt;&amp;lt;CR&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In addition, I also make sure to click the little plus icon (the
green one) on my preview window.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/b9396b42.jpg&quot; alt=&quot;[image: Safari window controls]&quot; title=&quot;Safari window controls&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s the &amp;#8220;zoom&amp;#8221; function in OS X, and it works differently in different
applications. In Safari, zooming a window sets its size to be just large
enough to be able to display all the content. This is great while
previewing HTML&amp;#8212;you don&amp;#8217;t want your text to be flowing end to end,
because that&amp;#8217;s not how it shows on your blog (does it?).&lt;/p&gt;

&lt;p&gt;Soon I&amp;#8217;m going to integrate Charm with Vim so I can manage my blog
entirely from one editor window. And then I shall unleash the terror of my
blogging and rule the blogosphere with an iron fist. Muahahaha!!!&lt;/p&gt;

&lt;p&gt;PS: I&amp;#8217;ve never seen UNIX so sexy. God bless Apple.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/383339.html</comments>
  <lj:mood>geeky</lj:mood>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/382940.html</guid>
  <pubDate>Tue, 21 Nov 2006 09:22:26 GMT</pubDate>
  <title>JavaScript is ActionScript</title>
  <link>http://mannu.livejournal.com/382940.html</link>
  <description>&lt;p&gt;I just realised that I&amp;#8217;m &lt;em&gt;one of the first &lt;a href=&quot;http://developer.mozilla.org/presentations/xtech2006/javascript/&quot;&gt;JavaScript 2&lt;/a&gt; programmers in
the world&lt;/em&gt;. Only a slightly different flavour: &lt;a href=&quot;http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html&quot;&gt;ActionScript 3&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I started writing AS3 back in December 2004, almost two years ago. Like
others in my team, I&amp;#8217;ve seen the language evolve. In the beginning, we
didn&amp;#8217;t have imports, so we&amp;#8217;d &amp;#8220;include&amp;#8221; any .as files we needed.
Compiling the entire Flex framework would take anywhere between 2 and 10
minutes (I&amp;#8217;m serious!). There were lots of bugs in the compiler and the
VM; things we took for granted in languages like C++ and Java were still
&amp;#8220;under construction&amp;#8221; in this new world.&lt;/p&gt;

&lt;p&gt;Had I taken notes of my early AS3 experiences, I could have easily
created a very interesting blog. Of course, I was too busy coding.&lt;/p&gt;

&lt;p&gt;On November 7, 2006, &lt;a href=&quot;http://www.mozilla.com/en-US/press/mozilla-2006-11-07.html&quot;&gt;Adobe donated the ActionScript 3 virtual
machine&lt;/a&gt;&amp;#8212;the platform I&amp;#8217;ve been programming to all this while&amp;#8212;to the
Mozilla Foundation. The project, called &lt;a href=&quot;http://www.mozilla.org/projects/tamarin/&quot;&gt;Tamarin&lt;/a&gt;, will form the basis of
JavaScript 2 support in future versions of Firefox (and many other projects).
This is so cool in so many ways. At the core, JavaScript and ActionScript are
exactly the same language (ECMAScript); it totally makes sense for them to use
the same VM. Furthermore, writing a new VM is clearly a lot of work: why
waste time doing it again?&lt;/p&gt;

&lt;p&gt;ActionScript, JavaScript, now we&amp;#8217;re one. I&amp;#8217;m so proud of Adobe.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/382940.html</comments>
  <lj:mood>nostalgic</lj:mood>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/382198.html</guid>
  <pubDate>Wed, 15 Nov 2006 14:31:52 GMT</pubDate>
  <title>Missing the TrackPoint</title>
  <link>http://mannu.livejournal.com/382198.html</link>
  <description>&lt;p&gt;So I&apos;ve been trying to get used to my &lt;a href=&quot;http://flickr.com/photos/mannu/290474755/&quot;&gt;new MacBook&lt;/a&gt;. Aside from all
the &lt;a href=&quot;http://www.oreillynet.com/onlamp/blog/2006/02/top_x_mac_os_x_annoyances.html&quot;&gt;OS X annoyances&lt;/a&gt;, the one thing that bothers me most is that
there&apos;s no &lt;a href=&quot;http://www.pc.ibm.com/ww/healthycomputing/trkpnt.html&quot;&gt;TrackPoint&lt;/a&gt;. I&apos;ve been using a ThinkPad T41 for over 2 years
now, without ever feeling the need for an external mouse. The TrackPoint
is right in the middle of the keyboard&amp;#8212;it&apos;s actually more convenient.
Now I guess I&apos;ll have to go mouse shopping.&lt;/p&gt;

&lt;p&gt;Anyone have an opinion on the &lt;a href=&quot;http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore?productLearnMore=MA272LL/A&quot;&gt;wireless Mighty Mouse&lt;/a&gt;?&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/382198.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/380871.html</guid>
  <pubDate>Thu, 02 Nov 2006 18:29:40 GMT</pubDate>
  <title>I excite!!!</title>
  <link>http://mannu.livejournal.com/380871.html</link>
  <description>&lt;p&gt;
&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/87e3c110.jpg&quot; alt=&quot;[image: Borat: Cultural Learnings of America for Make Benefit Glorious Nation of Kazakhstan]&quot; title=&quot;Borat: Cultural Learnings of America for Make Benefit Glorious Nation of Kazakhstan&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;em&gt;Jagshemash! I like you. Do you like me?&lt;/em&gt;
&lt;/p&gt;

&lt;p&gt;
My friend &lt;a href=&quot;http://www.youtube.com/results?search_query=borat&quot;&gt;Borat&lt;/a&gt; from glorious country of Kazakhstan is act in a
&lt;a href=&quot;http://en.wikipedia.org/wiki/Borat:_Cultural_Learnings_of_America_for_Make_Benefit_Glorious_Nation_of_Kazakhstan&quot;&gt;moviefilm&lt;/a&gt;. It release tomorrow in US and A. My office peoples are go to watch Friday evening at AMC Van Ness in San Francisco.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.borat.tv/&quot;&gt;Borat&lt;/a&gt; my favourite from &lt;a href=&quot;http://www.hbo.com/alig/bios/&quot;&gt;Ali G. Show&lt;/a&gt;. He have a nice senses of humour. I excite!!!
&lt;/p&gt;

&lt;p&gt;
Now I go for hand relief.
&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/380871.html</comments>
  <lj:mood>excited</lj:mood>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/378021.html</guid>
  <pubDate>Mon, 16 Oct 2006 23:12:53 GMT</pubDate>
  <title>Styles vs. skins? Umm...</title>
  <link>http://mannu.livejournal.com/378021.html</link>
  <description>&lt;p&gt;Ref.: &lt;a href=&quot;http://aralbalkan.com/770&quot;&gt;&quot;Styles are evil and must die. Long live skins!&quot;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Flex 2, styles and skins complement each other; you can&apos;t have one without the other. The skins do the actual drawing, while the styles specify parameters on &lt;em&gt;how&lt;/em&gt; to do the drawing. &lt;strong&gt;You need both&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;The Button component, for example, has 8 distinct states: &lt;em&gt;up&lt;/em&gt;, &lt;em&gt;over&lt;/em&gt;, &lt;em&gt;down&lt;/em&gt;, and &lt;em&gt;disabled&lt;/em&gt;, and &lt;em&gt;selected&lt;/em&gt; versions of each of those. Each state has a corresponding skin style. By default, the same programmatic skin (&lt;code&gt;mx.skins.halo.ButtonSkin&lt;/code&gt;) is used for all states; the default skin knows how to draw each of the states.&lt;/p&gt;

&lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th align=&quot;center&quot; colspan=&quot;4&quot;&gt;States of a Button object&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;center&quot;&gt;&lt;img height=&quot;22&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/fd9eab46.jpg&quot; width=&quot;65&quot; alt=&quot;[image: Button up state]&quot; title=&quot;Button up state&quot; /&gt; &lt;/td&gt; &lt;td align=&quot;center&quot;&gt;&lt;img height=&quot;22&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/12c3ba39.jpg&quot; width=&quot;65&quot; alt=&quot;[image: Button over state]&quot; title=&quot;Button over state&quot; /&gt; &lt;/td&gt; &lt;td align=&quot;center&quot;&gt;&lt;img height=&quot;22&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/108a4733.jpg&quot; width=&quot;65&quot; alt=&quot;[image: Button down state]&quot; title=&quot;Button down state&quot; /&gt; &lt;/td&gt; &lt;td align=&quot;center&quot;&gt;&lt;img height=&quot;22&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/108a4733-1.jpg&quot; width=&quot;65&quot; alt=&quot;[image: Button disabled state]&quot; title=&quot;Button disabled state&quot; /&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;center&quot;&gt;Up&lt;/td&gt; &lt;td align=&quot;center&quot;&gt;Over&lt;/td&gt; &lt;td align=&quot;center&quot;&gt;Down&lt;/td&gt; &lt;td align=&quot;center&quot;&gt;Disabled&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;The default skin is customisable to a good extent, thanks to styles like &lt;code&gt;fillColor&lt;/code&gt;, &lt;code&gt;borderColor&lt;/code&gt;, etc. For example, you can make the Button object have a light gray border with a red-white gradient fill.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;mx:Button label=&quot;Button&quot; borderColor=&quot;#c0c0c0&quot;
  fillColors=&quot;[#ff0000, #FFFFFF]&quot;/&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img height=&quot;22&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/f1b3dd82.jpg&quot; width=&quot;65&quot; alt=&quot;[image: Button styled with a light gray border and a red-white gradient fill]&quot; title=&quot;Button styled with a light gray border and a red-white gradient fill&quot; /&gt;&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;It&apos;s easy enough for a designer with no coding background to do this in Flex Builder&apos;s properties panel.&lt;/p&gt;

&lt;p&gt;&lt;img height=&quot;271&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/fe109c16.jpg&quot; width=&quot;240&quot; alt=&quot;[image: Setting the &amp;#39;borderColor&amp;#39; and &amp;#39;fillColor&amp;#39; styles in Flex Builder]&quot; title=&quot;Setting the &amp;#39;borderColor&amp;#39; and &amp;#39;fillColor&amp;#39; styles in Flex Builder&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The extent to which a skin can be customised depends on the styles it supports. But what happens when, say, you want to change the look of a component in a way that&apos;s not supported by the skin?&lt;/p&gt;
&lt;p&gt;Well, then, you re-skin it.&lt;/p&gt;
&lt;p&gt;A skin can be programmatic (an ActionScript class) or &lt;a href=&quot;http://www.adobe.com/devnet/flex/articles/flex_skins.html&quot;&gt;graphical&lt;/a&gt; (a JPEG/GIF image, an SVG vector graphic, or an asset from a SWF file). Graphical skins, of course, do not support any customisation, which is why I said it&apos;s like having a car without a steering wheel.&lt;/p&gt;

&lt;p&gt;If you want to make your Button object look like a smiley face, you&apos;d re-skin it by setting the skin styles &lt;code&gt;upSkin&lt;/code&gt;, &lt;code&gt;overSkin&lt;/code&gt;, and &lt;code&gt;downSkin&lt;/code&gt;.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;mx:Button&amp;gt;
  &amp;lt;mx:downSkin&amp;gt;@Embed(&apos;icon_eek.gif&apos;)&amp;lt;/mx:downSkin&amp;gt;
  &amp;lt;mx:overSkin&amp;gt;@Embed(&apos;icon_smile.gif&apos;)&amp;lt;/mx:overSkin&amp;gt;
  &amp;lt;mx:upSkin&amp;gt;@Embed(&apos;icon_neutral.gif&apos;)&amp;lt;/mx:upSkin&amp;gt;
&amp;lt;/mx:Button&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Again, this is easy enough to do in Flex Builder: just click the Browse button, which opens up a file dialog, navigate to the appropriate folder, and select the image file. How much easier could it get?&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot; colspan=&quot;3&quot;&gt;States of a graphically re-skinned Button object&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;img height=&quot;15&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/fe109c16.gif&quot; width=&quot;15&quot; alt=&quot;[image: Re-skinned Button up state]&quot; title=&quot;Re-skinned Button up state&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;img height=&quot;15&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/3dd5b14e.gif&quot; width=&quot;15&quot; alt=&quot;[image: Re-skinned Button over state]&quot; title=&quot;Re-skinned Button over state&quot; /&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;img height=&quot;15&quot; src=&quot;http://img.photobucket.com/albums/v102/mannu/3dd5b14e-1.gif&quot; width=&quot;15&quot; alt=&quot;[image: Re-skinned Button down state]&quot; title=&quot;Re-skinned Button down state&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;Up&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Over&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Down&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The only way to apply a new skin to an object is through its corresponding &lt;a href=&quot;http://mannu.livejournal.com/305284.html&quot;&gt;skin style&lt;/a&gt;. You could do it in CSS...&lt;/p&gt;&lt;pre&gt;&lt;code&gt;Button {
  downSkin: Embed(&quot;icon_eek.gif&quot;);
  overSkin: Embed(&quot;icon_smile.gif&quot;);
  upSkin: Embed(&quot;icon_neutral.gif&quot;);
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;... or you could do it inline, in MXML...&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;mx:Button downSkin=&quot;@Embed(&apos;icon_eek.gif&apos;)&quot;
  overSkin=&quot;@Embed(&apos;icon_smile.gif&apos;)&quot;
  upSkin=&quot;@Embed(&apos;icon_neutral.gif&apos;)&quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;... or you could do it in ActionScript.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;smileyButton.setStyle(&quot;downSkin&quot;, iconEekGIF);
smileyButton.setStyle(&quot;overSkin&quot;, iconSmileGIF);
smileyButton.setStyle(&quot;overSkin&quot;, iconNeutralGIF);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One way or the other, it&apos;s styles.&lt;/p&gt;
&lt;p&gt;Styles provide a good additional layer of customisation in Flex. If the available styles for a component do not meet your needs, then you re-skin the component using your own graphical or programmatic skins.&lt;/p&gt;
&lt;p&gt;Let&apos;s not forget that every good Flex component (and every component in the Flex Framework) can be completely re-skinned by the application developer. I just grep&apos;ed the &lt;code&gt;defaults.css&lt;/code&gt; that comes with the Framework, and it tells me that the following CSS type selectors (most of them belonging to individual components) have some kind of skin style associated with them.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;global: 2
AccordionHeader: 8
Button: 8
ButtonBarButton: 8
CheckBox: 8
ColorPicker: 4
ComboBox: 8
DataGrid: 4
DateChooser: 19
DateField: 4
DividedBox: 1
DragManager: 1
FormItem: 1
HDividedBox: 1
HSlider: 6
LinkButton: 8
LinkBar: 1
ListBase: 1
Menu: 2
MenuBar: 4
NumericStepper: 8
Panel: 5
PopUpButton: 6
PopUpMenuButton: 6
PrintDataGrid: 3
ProgressBar: 3
RadioButton: 8
ScrollBar: 12
SWFLoader: 2
Tab: 8
ToolTip: 1
VDividedBox: 1
VSlider: 6
Window: 4&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The numbers indicate the number of skin styles for a component. The Button component, for instance, has 8 skin styles, all of which by default point to the same programmatic skin (that&apos;s smart).&lt;/p&gt;

&lt;p&gt;Here&apos;s the script I used, by the way (if you grok bash):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash
selectors=`sed -ne &apos;/^[A-Za-z.]/p&apos; defaults.css`
for s in $selectors; do
  styles=`sed -ne&quot;/^$s$/,/^}/p&quot; defaults.css|grep &apos;Skin:&apos;|wc -l|tr -s &apos; &apos;`
  echo &quot;$s: $styles&quot;
done | grep -v &apos; 0$&apos;&lt;/code&gt;&lt;/pre&gt;</description>
  <comments>http://mannu.livejournal.com/378021.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/376004.html</guid>
  <pubDate>Tue, 10 Oct 2006 23:05:19 GMT</pubDate>
  <title>8@a</title>
  <link>http://mannu.livejournal.com/376004.html</link>
  <description>&lt;p&gt;
People ask me why I use &lt;a href=&quot;http://www.vim.org/&quot;&gt;Vim&lt;/a&gt;. Usually I have no answer, except, &amp;#8220;I like it!&amp;#8221; *grin* Then I get that funny look: &lt;cite&gt;Is he on crack?&lt;/cite&gt;
&lt;/p&gt;

&lt;p&gt;
I&apos;m not on crack (not today). But I am on steroids. &lt;em&gt;Vim steroids&lt;/em&gt;.
&lt;/p&gt;

&lt;p&gt;
Consider this: I have this huge file, say 8,000 lines of code (have you seen UIComponent.as?), in which I need to convert all public variables to &amp;#8220;properties&amp;#8221; (getter-setters).
&lt;/p&gt;

&lt;p&gt;
So, this:
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  public var foo:int = 0;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
Needs to look like this:
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  private var _foo:int = 0;
  public function get foo():int
  {
    return _foo;
  }
  public function set foo(value:int):void
  {
    _foo = value;
  }&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
Hmm&amp;#8230; what do I do?
&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;
If I were a Perl guru, I&apos;d whip up a script. Thankfully, I&apos;m not&amp;#8212;because there&apos;s an easier, faster, and more fun way of doing it.
&lt;/p&gt;

&lt;p&gt;
In Vim, you can record macros using the &amp;#8216;q&amp;#8217; command. The recorded keystrokes are saved into what&apos;s known as a &amp;#8220;register&amp;#8221; in Vim parlance. In my case, I record a set of keystrokes&amp;#8212;a pattern applicable to any public variable&amp;#8212;and save it into the register &amp;#8216;a&amp;#8217;.
&lt;/p&gt;

&lt;p&gt;
Here&apos;s &lt;a href=&quot;http://tasmania.globat.com/~mannu.info/flex/8@a.txt&quot;&gt;what my recording looks like&lt;/a&gt; (iso-8859-1).
&lt;/p&gt;

&lt;p&gt;
A bunch of gibberish, yes. Of course, &lt;strong&gt;you never have to see it&lt;/strong&gt;! This is how it looks &lt;em&gt;internally&lt;/em&gt;, in Vim&apos;s memory. The reason I post it here is to show you how there&apos;s no reference to the variable name &amp;#8220;foo&amp;#8221; or the type &lt;code&gt;int&lt;/code&gt; in it&amp;#8212;it&apos;s a &lt;em&gt;pattern&lt;/em&gt;. It took me about a minute, and two unsuccessful attempts, to get it right.
&lt;/p&gt;

&lt;p&gt;
Now comes the fun part: playing the macro. I just place my cursor at the top of the file (line 1) and hit &amp;#8216;@&amp;#8217; (play) followed by &amp;#8216;a&amp;#8217; (name of register).
&lt;/p&gt;

&lt;p&gt;
Lo and behold! The first public variable has been successfully converted to a getter-setter pair!
&lt;/p&gt;

&lt;p&gt;
&lt;strong&gt;Before&lt;/strong&gt;:
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  /**
   *  This object&apos;s foo.
   */
  public var foo:int = 0;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
&lt;strong&gt;After&lt;/strong&gt;:
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  /**
   *  @private
   */
  private var _foo:int = 0;

  /**
   *  This object&apos;s foo.
   */
  public function get foo():int
  {
    return _foo;
  }
  public function set foo(value:int):void
  {
    _foo = value;
  }&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
After running it a couple more times, I realise it&apos;s good enough, so I just do a search for &amp;#8220;public var&amp;#8221;, Vim tells me there&apos;s 8 matches, I hit &amp;#8216;8@a&amp;#8217; (play &amp;#8216;a&amp;#8217; 8 times), and the whole file has been converted. How cool is &lt;em&gt;that&lt;/em&gt;?
&lt;/p&gt;

&lt;p&gt;
&lt;em&gt;Writing&lt;/em&gt; code is the most boring part of programming. Someday we&apos;ll get rid of it completely, but, for now, a good editor really helps.
&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/376004.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/374963.html</guid>
  <pubDate>Mon, 09 Oct 2006 21:27:22 GMT</pubDate>
  <title>More nukes!</title>
  <link>http://mannu.livejournal.com/374963.html</link>
  <description>&lt;p&gt;
North Korea just &lt;a href=&quot;http://www.mtv.com/news/articles/1542619/20061009/index.jhtml?headlines=true&quot;&gt;conducted a nuclear test&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
This reminds me of our own situation. How long before we end up in a nuclear exchange with our dear neighbours?
&lt;/p&gt;

&lt;div&gt;&lt;a href=&quot;http://www.livejournal.com/poll/?id=840907&quot;&gt;View Poll: #840907&lt;/a&gt;&lt;/div&gt;&lt;p&gt;

&lt;p&gt;
Live life to the fullest. You never know what&apos;s to come.
&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/374963.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/372662.html</guid>
  <pubDate>Wed, 04 Oct 2006 21:11:38 GMT</pubDate>
  <title>Globals</title>
  <link>http://mannu.livejournal.com/372662.html</link>
  <description>&lt;p&gt;You have a main application and two sub-applications loaded dynamically using the SWFLoader component.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;Application xmlns=&quot;http://www.adobe.com/2006/mxml&quot;&amp;gt;
  &amp;lt;Label text=&quot;Main&quot; /&amp;gt;
  &amp;lt;HBox&amp;gt;
    &amp;lt;SWFLoader source=&quot;sub1.swf&quot; /&amp;gt;
    &amp;lt;SWFLoader source=&quot;sub2.swf&quot; /&amp;gt;
  &amp;lt;/HBox&amp;gt;
&amp;lt;/Application&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The sub-applications have one List object each, with drag &apos;n drop enabled.&lt;/p&gt;

&lt;p&gt;You try to drag items from one sub-application to the other, but the other application does not accept the drop.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/1ef1c68e.jpg&quot; alt=&quot;[image: Sub-application #2 does not accept a drop from sub-application #1]&quot; title=&quot;Sub-application #2 does not accept a drop from sub-application #1&quot; border=&quot;0&quot; /&gt;&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;Why is that?&lt;/p&gt;

&lt;p&gt;Okay, now you add an empty List object (with drag &apos;n drop enabled) to the main application as well. Try moving items between the three applications now.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/1ef1c68e-1.jpg&quot; alt=&quot;[image: If the main application contains a List object, items can be moved between all three applications]&quot; title=&quot;If the main application contains a List object, items can be moved between all three applications&quot; border=&quot;0&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It works!&lt;/p&gt;

&lt;p&gt;So, why does adding a List object to the main application suddenly make drag &apos;n drop work across all three applications?&lt;/p&gt;

&lt;p&gt;Replace the List object in the main application with a Script block that refers to the DragManager class.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;Script&amp;gt;
  private var dragManagerDependency:DragManager;
&amp;lt;/Script&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There&apos;s no List object in the main application anymore. Try moving items between the two sub-applications now.&lt;/p&gt;

&lt;p&gt;It works? Yes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: For drag &apos;n drop to work across two sub-applications, the DragManager class must be linked into the main application SWF.&lt;/p&gt;

&lt;h4&gt;Why so?&lt;/h4&gt;

&lt;p&gt;Why is it that the DragManager class must be linked into the main application SWF?&lt;/p&gt;

&lt;p&gt;If you&apos;re familiar with the DragManager API, you know that it&apos;s essentially a singleton class with a bunch of static methods.&lt;/p&gt;

&lt;p&gt;The way the SWFLoader component works, sub-applications are loaded into &lt;em&gt;child application domains&lt;/em&gt; of their own. When code in a sub-application refers to a class, the class definition is looked up (by the Flash Player) in the application domain chain, starting from the root--the &lt;em&gt;system application domain&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;(Roger Gonzalez has &lt;a href=&quot;http://blogs.adobe.com/rgonzalez/2006/06/applicationdomain.html&quot;&gt;written extensively&lt;/a&gt; on the topic of application domains.)&lt;/p&gt;

&lt;p&gt;When the List component makes a call to the DragManager API for doing a drag &apos;n drop operation, the DragManager class definition used by the component is the one found &lt;em&gt;first&lt;/em&gt; in the application domain chain (starting from the top). In the first example, since there&apos;s no DragManager definition in the main application domain, the one used is the one found in the sub-application&apos;s own application domain; thus, each sub-application uses its own definition of the DragManager class.&lt;/p&gt;

&lt;p&gt;Now you see the problem? The DragManager in sub-application #1 is not the same as the DragManager in sub-application #2; as far as the Flash Player is concerned, they&apos;re two different classes. If one List object calls &lt;code&gt;doDrag&lt;/code&gt; on one DragManager, and the other List object calls &lt;code&gt;acceptDragDrop&lt;/code&gt; on the other DragManager, it&apos;s not going to work, is it?&lt;/p&gt;

&lt;p&gt;By including a DragManager definition in the main application, we ensure that both sub-applications use the same DragManager--the one found in the main application domain. (Both sub-applications still have their own definitions of DragManager, but they&apos;re never used.)&lt;/p&gt;

&lt;h4&gt;Solving it at the framework level&lt;/h4&gt;

&lt;p&gt;The core problem here is that the DragManager class maintains state in a bunch of global (static) variables, and each copy of the class has its own separate copy of this &quot;global&quot; data. At the framework level, the solution lies in either sharing this data across multiple application domains, or sharing a single instance of the class across multiple application domains--making it a true singleton.&lt;/p&gt;

&lt;p&gt;Let&apos;s look at some of our options for solving this in the Flex Framework.&lt;/p&gt;

&lt;h5&gt;Share the implementation&lt;/h5&gt;

&lt;p&gt;The easiest and quickest solution is to share the DragManager implementation across all application domains by linking it into the main application. This can be done by automatically including the class in the ActionScript code genereated by the MXML compiler.&lt;/p&gt;

&lt;p&gt;If we did that, though, we would end up bloating the size of every Flex application out there--even those that have nothing to do with drag &apos;n drop. This isn&apos;t really a solution.&lt;/p&gt;

&lt;h5&gt;Share the state&lt;/h5&gt;

&lt;p&gt;Another option is to share the static variables across application domains, by moving them to a separate class, say DragManagerGlobals, and linking that class into the main application.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package mx.managers {
  public class DragManagerGlobals {
    public static var dragInitiator:IUIComponent;
    public static var dragProxy:DragProxy;
    public static var bDoingDrag:Boolean = false;
    public static var mouseIsDown:Boolean = false;
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The DragManager code would then have to be modified accordingly to use these variables instead.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package mx.managers {
  public class DragManager {
    public static function doDrag(...):void {
      ...
      if (DragManagerGlobals.bDoingDrag)
        return;

      DragManagerGlobals.bDoingDrag = true;
      ...
    }
    
    ...
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The DragManagerGlobals class would be linked into the main application, thereby making it truly global. Both implementations of DragManager (in the two sub-application domains) would share the same global state.&lt;/p&gt;

&lt;h5&gt;Share the interface&lt;/h5&gt;

&lt;p&gt;The previous approach would work fine, except for one problem: What if the two sub-applications are using &lt;em&gt;different versions&lt;/em&gt; of DragManager? This could happen if, say, one sub-application was built with Flex 2.0 and the other with Flex 3.0. The implementations between two major versions could differ so drastically that the global variables of one wouldn&apos;t make sense to the other. Do you seriously think that the DragManager of Flex 3.0 will have only &lt;em&gt;4&lt;/em&gt; variables?&lt;/p&gt;

&lt;p&gt;This brings us to the third and most elegant solution: share the interface. With this approach, only one implementation of the class is used at any point, while the interface is common across application domains.&lt;/p&gt;

&lt;p&gt;To do that, first we would have to move the implementation of DragManager out into another class, say DragManagerImpl.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
package mx.managers {
  import mx.managers.IDragManager;

  public class DragManagerImpl implements IDragManager {
    ...
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When the DragManager class is loaded, it would register its implementation class with another &quot;truly global&quot; class--SingletonManager.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package mx.managers {
  public class DragManager {
    // Class initialisation
    SingletonManager.registerClass(&quot;mx.managers.IDragManager&quot;,
      mx.managers.DragManagerImpl);
    
    ...
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;DragManager would then forward all calls to the one and only instance of the implementation class.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package mx.managers {
  public class DragManager {
    ...
    
    private static function getInstance():IDragManager {
      if (!instance) {
        var implementationClass:Class = SingletonManager
          .getClass(&quot;mx.managers.IDragManager&quot;);
        instance = new implementationClass();
      }
      
      return instance;
    }
    
    public static function doDrag(...):void {
      // Forward to implementation
      getInstance().doDrag(...);
    }
    
    ...
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The actual implementation used would be the one from the sub-application loaded first. If sub-application #1 is loaded first, the DragManagerImpl class of sub-application #1 would be used for all drag &apos;n drop operations, including those local to sub-application #2. If sub-application #1 is Flex 3.0 and sub-application #2 is Flex 2.0, then sub-application #2 would also get to benefit from the new drag &apos;n drop features in Flex 3.0!&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/372662.html</comments>
  <category>flex</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/369967.html</guid>
  <pubDate>Wed, 27 Sep 2006 19:35:44 GMT</pubDate>
  <title>Wallop: Social networking 2.0?</title>
  <link>http://mannu.livejournal.com/369967.html</link>
  <description>&lt;p&gt;A couple of weeks ago, I was having a conversation with someone about killer apps, and I said that social networking sites needed to go to the next level, enabling sharing of rich media, live video chat, screen sharing, digital whiteboards, and so on. I called it &amp;#8220;social networking 2.0&amp;#8221;. (&amp;#8220;Social networking 2.0?! Interesting. You should be in marketing!&amp;#8221;) What I had in mind was something feature-rich like Breeze but on the scale of MySpace.&lt;/p&gt;

&lt;p&gt;Today I got my &lt;a href=&quot;http://www.wallop.com/&quot;&gt;Wallop&lt;/a&gt; invite from &lt;a href=&quot;http://blog.digitalbackcountry.com/&quot;&gt;Ryan Stewart&lt;/a&gt;. First impression? &lt;em&gt;Awesome user interface!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.wallop.com/manish&quot;&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/bafaa1bc.jpg&quot; alt=&quot;[image: My Wallop page]&quot; title=&quot;My Wallop page&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far, I&apos;ve created a home page, uploaded some pictures, posted a couple of blog entries, exchanged notes with Ryan, and connected with a couple of other folks on the network. In terms of navigation, the experience is superb. This is what we call a &lt;em&gt;rich internet application&lt;/em&gt; (RIA).&lt;/p&gt;

&lt;p&gt;In the &amp;#8220;Mods&amp;#8221; (widgets) section, I saw a little piano that I&apos;d probably like to purchase and add to my page. It was for $0.25. Cute.&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;What I found the site sorely lacking in was actual social networking features. It seemed impossible to look someone up on the network. The site also didn&apos;t seem to care for my personal details, interests, and such, which means it probably won&apos;t connect me with others very easily.&lt;/p&gt;

&lt;p&gt;Coming back to the 2.0 thing: &lt;em&gt;Is Wallop social networking 2.0?&lt;/em&gt; In terms of UI, yes, I think they&apos;re on the right track. In terms of advanced social networking features, I&apos;m afraid I have to say they&apos;ve got a long, long way to go. I&apos;d like to do a video chat with Ryan, or share my screen so we can work on something together, and &lt;em&gt;actually save the session&lt;/em&gt; for later viewing. And why do user profiles always have pictures but no audio or video clips?&lt;/p&gt;

&lt;p&gt;All that said, if there&apos;s any site that&apos;s going to be social networking 2.0, it&apos;s got to be Wallop. They&apos;re already on the right client platform (Flash).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/b4bb6c3d.jpg&quot; alt=&quot;[image: A Wallop conversation]&quot; title=&quot;A Wallop conversation&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Here&apos;s &lt;a href=&quot;http://www.wallop.com/manish&quot;&gt;my Wallop home page&lt;/a&gt;. If you need an invite, just leave a comment or shoot me a quick email!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update, 2:20 PM&lt;/strong&gt;: &lt;em&gt;I&apos;m out of invites!&lt;/em&gt;&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/369967.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/368692.html</guid>
  <pubDate>Sat, 23 Sep 2006 19:43:09 GMT</pubDate>
  <title>API binary compatibility in ActionScript 3</title>
  <link>http://mannu.livejournal.com/368692.html</link>
  <description>&lt;p&gt;An API change in a component is backwards compatible if existing client code written against the component &lt;em&gt;before&lt;/em&gt; the change continues to compile and run without errors, and perform &lt;em&gt;as expected&lt;/em&gt;, against a new version of the component after the change.&lt;/p&gt;

 &lt;p&gt;There are 3 levels of API compatibility:&lt;/p&gt;
 &lt;dl&gt;
   &lt;dt&gt;Binary compatibility&lt;/dt&gt;
   &lt;dd&gt;Code runs without errors&lt;/dd&gt;
   &lt;dt&gt;Source compatibility&lt;/dt&gt;
   &lt;dd&gt;Code compiles without errors&lt;/dd&gt;
   &lt;dt&gt;Contract compatibility&lt;/dt&gt;
   &lt;dd&gt;All conditions mentioned in the API specification are met&lt;/dd&gt;
 &lt;/dl&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;

 &lt;h4&gt;Binary compatibility in ActionScript 3&lt;/h4&gt;

 &lt;p&gt;Binary compatibility depends on the programming language, runtime, and tools, and thus poses the greatest challenge to component developers.&lt;/p&gt;

 &lt;p&gt;Based on a series of experiments aimed at understanding the nature of binary compatibility in ActionScript 3, here&apos;s a listing of the different types of API changes and whether or not each one is binary compatible.&lt;/p&gt;

 &lt;table&gt;
   &lt;tr&gt;
     &lt;th&gt;Type of Change &lt;/th&gt;
     &lt;th&gt;Client Role&lt;sup&gt;1&lt;/sup&gt; &lt;/th&gt;
     &lt;th&gt;Binary Compatible&lt;/th&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Adding a new package&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Deleting an existing package&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Adding a new member to a package&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Deleting an existing member from a package&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td rowspan=&quot;2&quot;&gt;Adding a new member to a class or interface&lt;sup&gt;2&lt;/sup&gt;&lt;/td&gt;
     &lt;td&gt;Caller &lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Implementor &lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Deleting an existing member from a class or interface&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Expanding the supertype set of a class or interface&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Contracting the supertype set of a class or interface&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Re-ordering members in a class or interface&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Changing the name of a parameter in a function&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Adding a non-optional parameter in a function &lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td rowspan=&quot;2&quot;&gt;Adding an optional parameter in a function&lt;sup&gt;3&lt;/sup&gt;&lt;/td&gt;
     &lt;td&gt;Caller&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Implementor&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Deleting a parameter (optional or non-optional) in a function &lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td rowspan=&quot;2&quot;&gt;Changing the type of a function parameter, or the type of a member, to a compatible type&lt;sup&gt;4&lt;/sup&gt;&lt;/td&gt;
     &lt;td&gt;Caller&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Implementor&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Changing the type of a function parameter, or the type of a member, to an incompatible type&lt;sup&gt;5&lt;/sup&gt;&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Changing a constant to a variable&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Changing a variable to a constant &lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Changing a final member to non-final&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td rowspan=&quot;2&quot;&gt;Changing a non-final member to final&lt;/td&gt;
     &lt;td&gt;Caller&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Implementor&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td rowspan=&quot;2&quot;&gt;Increasing the access-level of a member in a class or interface from protected to public&lt;sup&gt;6&lt;/sup&gt;&lt;/td&gt;
     &lt;td&gt;Caller&lt;/td&gt;
     &lt;td&gt;Yes&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Implementor&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;Decreasing the access-level of a member in a class or interface from public to protected&lt;/td&gt;
     &lt;td&gt;-&lt;/td&gt;
     &lt;td&gt;&lt;em&gt;No&lt;/em&gt;&lt;/td&gt;
   &lt;/tr&gt;
 &lt;/table&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;small&gt;For some changes, binary compatibility depends on the role played by the client. The client may play the role of a caller, an implementor, or both.&lt;/small&gt;&lt;/li&gt;
  &lt;li&gt;&lt;small&gt;If a new method is added to an API class, and clients may extend the class (the class is non-final), it&apos;s possible that a client class might have declared a method of the same name as the one being added to the API class; in this case, the change is not binary compatible and will lead to a runtime error. If a new method is added to an API interface, and the interface is implemented by a client class, the change will cause a runtime error in the client class for not implementing the newly added method.&lt;/small&gt;&lt;/li&gt;
  &lt;li&gt;&lt;small&gt;If a new optional parameter is added to a member function of an API class, and a client class extends the API class and overrides the function, this will cause a runtime error in the client class for not overriding the function with the correct number of parameters.&lt;/small&gt;&lt;/li&gt;
  &lt;li&gt;&lt;small&gt;If the new type is &amp;#8220;compatible&amp;#8221;, meaning that a variable of the old type can be cast to a variable of the new type, the change is compatible. e.g. changing the type of a variable from &lt;code&gt;String&lt;/code&gt; to &lt;code&gt;Boolean&lt;/code&gt;.&lt;/small&gt;&lt;/li&gt;
  &lt;li&gt;&lt;small&gt;If the new type is &amp;#8220;incompatible&amp;#8221;, meaning that a variable of the old type cannot be cast to a variable of the new type, the change is incompatible. e.g. changing the type of a variable from &lt;code&gt;flash.display.TextField&lt;/code&gt; to &lt;code&gt;flash.display.Sprite&lt;/code&gt;.&lt;/small&gt;&lt;/li&gt;
  &lt;li&gt;&lt;small&gt;If a member in an API class is changed from protected to public, and a client class extends the API class and overrides the member, this will cause a runtime error in the client class for not overriding the member correctly.&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;Note on source compatibility&lt;/h4&gt;

&lt;p&gt;Most changes that are binary compatible are also source compatible. In practice, the difference between binary and source compatibility in ActionScript 3 is small enough that they can be considered as one and the same.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/368692.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/367080.html</guid>
  <pubDate>Mon, 18 Sep 2006 19:44:22 GMT</pubDate>
  <title>Pyaar Ke Side/Effects</title>
  <link>http://mannu.livejournal.com/367080.html</link>
  <description>&lt;p&gt;Man and woman, a steady relationship, one day the inevitable strikes: she wants to get married. Oops! :)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/936d77a3.jpg&quot; alt=&quot;[poster: Pyaar Ke Side/Effects]&quot; title=&quot;Pyaar Ke Side/Effects&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.pksethefilm.com/&quot;&gt;&lt;cite&gt;Pyaar Ke Side/Effects&lt;/cite&gt;&lt;/a&gt; is a sweet romantic comedy, Rahul Bose-style. My favourite scene in the movie: the argument match between the couple (scoreboard and all). It was just hilarious.&lt;/p&gt;

&lt;p&gt;Apparently Rahul and Mallika are &lt;a href=&quot;http://www.pksethefilm.com/pks_blog.asp?id=1&quot;&gt;blogging&lt;/a&gt; too.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/367080.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mannu.livejournal.com/366712.html</guid>
  <pubDate>Mon, 18 Sep 2006 14:59:43 GMT</pubDate>
  <title>Pioneering clipboard spam</title>
  <link>http://mannu.livejournal.com/366712.html</link>
  <description>&lt;p&gt;Hi. I&apos;m starting a web 2.0 company. Our main product is a lightweight cross-platform clipboard spammer called &lt;em&gt;Spookey&lt;/em&gt;. &lt;a href=&quot;http://manish.jethani.googlepages.com/spookey%2Ctheclipboardspammer&quot;&gt;Check it out!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.photobucket.com/albums/v102/mannu/78d14471.gif&quot; alt=&quot;[screenshot: Spookin&amp;#39; Word]&quot; title=&quot;Spookin&amp;#39; Word&quot; /&gt;&lt;/p&gt;

&lt;p&gt;How does it work? It&apos;s a little Flash application, written in AS3. Here&apos;s the source: &lt;a href=&quot;http://tasmania.globat.com/~mannu.info/flex/spookey/Spookey.as&quot;&gt;Spookey.as&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We set up a timer to write to the system clipboard every 100 milliseconds.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public function Spookey() {
  parameters = loaderInfo.parameters;

  var timer:Timer = new Timer(100);
  timer.addEventListener(&quot;timer&quot;, updateClipboard);
  timer.start();
}

private function updateClipboard(event:*):void {
  System.setClipboard(parameters[&quot;content&quot;]);
}&lt;/code&gt;&lt;/pre&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;

&lt;p&gt;The content to be written comes from the &amp;#8220;content&amp;#8221; parameter passed to the application in the HTML wrapper. You can set it to anything.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
  var flash = new SWFObject(&quot;Spookey.swf&quot;, &quot;spookeyObject&quot;,
    &quot;0&quot;, &quot;0&quot;, &quot;9&quot;);
  flash.addVariable(&quot;content&quot;, &quot;5p00k3d?&quot;);
  flash.write(&quot;playerDiv&quot;);
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And that&apos;s it! Now you can spam your website visitors&apos; clipboards to your heart&apos;s content. Isn&apos;t that kool?&lt;/p&gt;

&lt;p&gt;Here&apos;s the SWF file: &lt;a href=&quot;http://tasmania.globat.com/~mannu.info/flex/spookey/Spookey.swf&quot;&gt;Spookey.swf&lt;/a&gt; (821 bytes).&lt;/p&gt;

&lt;p&gt;We don&apos;t have a business model.&lt;/p&gt;</description>
  <comments>http://mannu.livejournal.com/366712.html</comments>
  <lj:security>public</lj:security>
</item>
</channel>
</rss>
