div.abc0f_field" display: none; visibility: hidden; } div.aa9cc_field" display: none; visibility: hidden; } MacTech�= The journal of Apple technology.<z薸tle> <link type="textuss" rel="stylesheet" media="all" href="http:]錭dn.mactech.com/sites/default/files/advagg_cssuss_7a90󳲈󤕘00蒮3efSA�(N�)b776dffd0a49d3968_�(懷�)css"� > <script type="textv產vascript" src="http:/t鎗ax.googleapis.comt鎗ax/libsv畄uery/1.�(懷�)6/jquery.min.js"><ztcript> <script�4ype="text/javascript" src="http:]錫jax.googleapis.com/ajaxv頸bs/jqueryui].6v畄uery-ui.min.js"><ztcript> <script�4ype="text/javascript" src="http:]錭dn.mactech.com/sites/default/files/advagg_js/js_da2abc6s7dc30󤕬000e2a7f746ffq1.js"></script> <script type="textv產vascript"> <!--]--><�1 D�8CDATA[]><�c- jQuery.extend(Drupal.settings,""basePath":"\/"+"+"googleanalytics":{"trackOutbound":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"},"nice_menus_options":{"delay":800,"speed":2}); ]--><�5 D�8]> <ztcript> <script�4ype="text/javascript"> <�c-/\q-><![cdata[/b6<!-- window.google_analytics_uacct = "UA-763-5"; /\q-><!]]> </script> <script type="textv產vascript"> <!--]--><�1 D�8CDATA[]><�c- Drupal.behaviors.aa4550e97cb�(N�)�1�4p筩b = function() { $("input.abc0f_field").each(function()" f=$(this)[0]; if (f.value.indexOf("cbc293fc")==0){f.value="f3"+f.value.substring(5)+"b2ac�(y]�)04d3d1璫45c�7p筬orm";} }); }; /\q-><!]]> </script> <script type="textv產vascript"> <!--]--><�1 D�8CDATA[]><�c- Drupal.behaviors.aa4550e97cb94f5 = function() { $("input.aa9cc_field").each(function()" f=$(this)[0]; �4ok�(N��)= f.style.fontFamily; if(tok�(懷�)charAt(0) == "'"�=| tok2.charAt(0) == '"')�4ok�(O�)tok2.substring(1, tok2.length-1); tok2=tok�(懷�)substring(1,�4ok�(懷�)length); if (f.value.indexOf("f5e17941")==0){f.value="c6"+f.value.substring(5)+tok�([f�)} }); }; /\q-><!]]> </script> <�c-[if�!�?e 6]> <link rel="stylesheet"�4ype="text/css" href="cssv}e6.css" b6 <�1 D�8endif]--> <script�4ype="text/javascript"><!-- google_ad_client = "pub-30󭦌򠸖�(e�)400777�(e�)010򔣜; \" 1�(e�)x600, created ^z0/SD *Qegoogle_ad_slot = "537195�(ry�)95"; google_ad_width = 2 200; google_ad_height = 250; ]--> </script> <vvead> <body class="not-front not-logged-in�0age-articles one-sidebar sidebar-left"> <!--[if �jE]>Start�?�!eader<�1 D�8endif]--> <div id="header"><�c-[if !IE]>Start Top Menu<![endif]--> <div class="top_row_menu"> <ul> �!�!li><strong>MacTech Network: </strong><v頸> �!�!li><a href="ztupport">Tech Support</a></li> <li>|<v頸> �!�!li><a href="http:/|鴚w.macforge.net">MacForge.net<t><v頸> �!�!li>|</li> <li><a href="http:]鍂ww.macnews.com">Apple News<t><v頸> �!�!li>|</li> <li><a href="http:]鍂ww.mactechdomains.com">Register Domains</a></li> <li>|<v頸> �!�!li><a href="http:/|鴚w.mactechdomains.com/">SSL Certificates</a></li> <li>|<v頸> �!�!li><a href="http:/|鴚w.amazon.com/execw骲idos/redirect?link_code=ur2&camp=89&tag=mactechmagazi-20&creative=90󤕘0򭃽&path=external-search%3Fsearch-type=ss%�(尅�)keyword=ipod%26index=pc-hardware">iPod Deals</a></li> <li>|<v頸> �!�!li><a href="http:/t鎝plestore.mactech.com/">Mac Deals<t><v頸> �!�!li>|</li> <li><a href="http:]鍂ww.macbookshelf.com">Mac Book Shelf</a></li> </ul> </div> <�c-[if !IE]>End Top Menu<![endif]-->�!�!�C-[if !IE]>Start Banner<![endif]--> <div class="top_row_banner"><a href="Y �4itle="MacTech"> <div class="top_logo_left"> <h磎actech<vv <u(iv> </a> <!-- Top Leaderboard Banner --> <div class="top_banner_right"><div id="block-ad-0󭦌򠸖1" class="clear-block block block-ad"> �!�!div class="content"> <div class="advertisement group-tids-0󭦌򠸖1" id="group-id-tids-361"><script type='textv產vascript' src='http:/y:reserve.mactech.com/sites/all/modules/adzterve.php?q=1&t=361&u=articles%e噈actech%e嘨ol.�(T �)%2F24.07%2FBeginningREALBasic%e噄ndex.html&l=articles%e噈actech%e嘨ol.�(T �)%2F24.07%2FBeginningREALBasic%e噄ndex.html'></script><u(iv> </div> <u(iv> </div> </div> <�c-[if !IE]>End Banner<![endif]-->�!�!�C-[if !IE]>Start main nav<![endif]--> <div class="main_nav"> <div class="fl"><img src="ztitest鎙lz薶emes/custom_frontv}mages/main_nav_left.gif" alt="" b6</div> <div class="main_nav_inn"><ul class="nice-menu nice-menu-down" id="nice-menu-1"><li class="menu-20󳲍 menu-path-front first odd "><a href="Y ><span>Home<ztpan></a></li> <li class="menu-�(y>�)76 menuparent menu-path-node-35791 even "><a href=".".content/magazine"><span>Magazine</span><t><ul><li class="menu-1054 menu-path-node-358 first odd "><a href=".".about"><span>About MacTech in Print<ztpan></a></li> <li class="menu-058 menuparent menu-path-node-657868 even "><a href=".".issue-TOCs"><span>Issue Table of Contents<ztpan></a><ul><li class="menu-0󭦌򠸖0򂆌򧂆鄊enu-path-node-657868 first odd "><a href="v}ssue-TOCs"><span>Issue 2 242-Current Contents<ztpan></a></li> <li class="menu-720򂆌򧂆鄊enu-path-node-403�(R�)0 even "><a href="v}ssue-TOCs-�(e�)"><span>Volume 29 Table of Contents<ztpan></a></li> <li class="menu-770򂆌򧂆鄊enu-path-node-3861 odd "><a href=".".issue-TOCs-201�(N �)><span>Volume �(R�) Table of Contents</span><t><v頸> <li class="menu-10󭦌򠸖55 menu-path-node-�(y>�)6393 even "><a href=".".issue-TOCs-2011"><span>Volume �(y]�) Table of Contents</span><t><v頸> <li class="menu-1�(e�)57 menu-path-node-8186 odd "><a href="v}ssue-TOCs-�(e�)10"><span>Volume 26 Table of Contents<ztpan></a></li> <li class="menu-05�(N��)menu-path-node-178�(g �)4 even "><a href="v}ssue-TOCs-�(e�)SD"><span>Volume 25 Table of Contents<ztpan></a></li> <li class="menu-050򂆌򧂆鄊enu-path-node-178�(尅�)4 odd "><a href=".".issue-TOCs-2008"><span>Volume �(T �) Table of Contents</span><t><v頸> <li class="menu-1�(e�)54 menu-path-node-8263 even "><a href=".".issue-TOCs-2007"><span>Volume �(y>�) Table of Contents</span><t><v頸> <li class="menu-1�(e�)55 menu-path-node-82�(y>�) odd "><a href="v}ssue-TOCs-�(e�)0"><span>Volume 2�(N��)Table of Contents<ztpan></a></li> <li class="menu-056 menu-path-node-178�(g �)�(N��)even last "><a href="v}ssue-TOCs-�(e�)05"><span>Volume 21 Table of Contents<ztpan></a></li> </ul> </li> <li class="menu-�(g �)7 menu-path-node-346SA6 odd "><a href=".".iPad"><span>iPad Version</span><t><v頸> <li class="menu-105�(N��)menu-path-node-358 even "><a href=".".content/risk-free-sample"><span>Risk Free Sample</span><t><v頸> <li class="menu-1051 menu-path-node-358� odd "><a href="uontentuack-issues"><span>Back�!�?ssues<ztpan></a></li> <li class="menu-1050 menu-path-node-105074 even "><a href=".".dvd"><span>MacTech DVD</span><t><v頸> <li class="menu-80󭯤7 menu-path-node-97144 odd "><a href="v頰bs"><span>About MacTech Labs<ztpan></a></li> <li class="menu-600 menu-path-node-180538 even "><a href="ztubscribe"><span>Subscribe to MacTech</span><t><v頸> <li class="menu-6558 menuparent menu-path-node-92850򂆌򧂆鄌dd last "><a href=".".content/archives"><span>Archives</span><t><ul><li class="menu-6559 menu-path-node-9�(R�)54 first odd "><a href=".".mactech-archives"><span>MacTech Print Archives</span><t><v頸> <li class="menu-2911 menu-path-node-358�(ry�) even "><a href=".".macmod"><span>MacMod</span><t><v頸> <li class="menu-6560 menu-path-node-9�(R�)54 odd "><a href="w踑ctech-archives"><span>MacTutor<ztpan></a></li> <li class="menu-�(N�)SD menu-path-node-�(ry�) even "><a href=".".content/frameworks-article-archives"><span>FrameWorks<ztpan></a></li> <li class="menu-7455 menu-path-node-92857 odd last "><a href=".".develop-archives"><span>develop<ztpan></a></li> </ul> </li> </ul> </li> <li class="menu-659 menuparent menu-path-eventsmactechcom- odd "><a href="http:/u0vents.mactech.com/"><span>Live Events<ztpan></a><ul><li class="menu-660 menu-path-eventsmactechcom- first odd "><a href="http:/u0vents.mactech.com/"><span>About MacTech Events</span><t><v頸> <li class="menu-10󤕬090 menuparent menu-path-promactechcom- even "><a href="http:]錺ro.mactech.com/"><span>MacTech Pro Events:<br>All new for�4his year纙tpan></a><ul><li class="menu-񠌪󅬛 menu-path-promactechcom-about first odd "><a href="http:/y:ro.mactech.comt鎎out"><span>About MacTech Pro Events</span><t><v頸> <li class="menu-10󭦌򠸖70 menu-path-promactechcom-dates-and-locations- even "><a href="http:/y:ro.mactech.comu(ates-and-locationsY ><span>Cities and Locations<ztpan></a></li> <li class="menu-񠌖01 menu-path-promactechcom-registerridMT-Main-Site-Menu odd "><a href="http:/y:ro.mactech.comy緀gister?rid=MT-Main-Site-Menu"><span>Registration<ztpan></a></li> <li class="menu-667 menu-path-promactechcom-schedule even "><a href="http:]錺ro.mactech.com/schedule"><span>Schedule</span><t><v頸> <li class="menu-10󭦌򠸖52 menu-path-promactechcom-travel odd "><a href="http:]錺ro.mactech.com/travel"><span>Hotel and Travel</span><t><v頸> <li class="menu-10󭦌򠸖69 menu-path-promactechcom-speaker-app even "><a href="http:]錺ro.mactech.com/speaker-app"><span>Speaker Application</span><t><v頸> <li class="menu-17362 menu-path-promactechcom-sponsorship odd "><a href="http:/y:ro.mactech.comztponsorship"><span>Vendor QuickTalk Application</span><t><v頸> <li class="menu-10󤕬092 menu-path-promactechcom-edu even "><a href="http:]錺ro.mactech.com/edu"><span>Educational�!�?nstitution and Student Discounts</span><t><v頸> <li class="menu-10󤕬093 menu-path-promactechcom-media odd "><a href="http:/y:ro.mactech.comw踖dia"><span>Media and Press Info</span><t><v頸> <li class="menu-10󤕬088 menu-path-promactechcom-refund-policy- even last "><a href="http:/y:ro.mactech.comy緀fund-policyY ><span>Refund Policy</span><t><v頸> <z鵯> <v頸> <li class="menu-17383 menuparent menu-path-conferencemactechcom- odd last "><a href="http:]錭onference.mactech.comY ><span>MacTech Conference<ztpan></a><ul><li class="menu-0󳴔5 menu-path-conferencemactechcom-register first odd "><a href="http:/uonference.mactech.com/register"><span>Registration</span><t><v頸> <li class="menu-17370 menu-path-conferencemactechcom-schedule even "><a href="http:]錭onference.mactech.comztchedule"><span>Schedule<ztpan></a></li> <li class="menu-0󳴔7 menu-path-conferencemactechcom-speakers odd "><a href="http:]錭onference.mactech.comztpeakers"><span>Speakers<ztpan></a></li> <li class="menu-0󭦌򠸖8 menu-path-conferencemactechcom-labs even "><a href="http:/uonference.mactech.com/labs"><span>Labs</span><t><v頸> <li class="menu-17369 menu-path-conferencemactechcom-activities odd "><a href="http:/uonference.mactech.com/activities"><span>Activities and Entertainment</span><t><v頸> <li class="menu-17372 menu-path-conferencemactechcom-workshops even "><a href="http:/uonference.mactech.com/workshops"><span>Pre-Conference Workshops<ztpan></a></li> <li class="menu-0󳲌 menu-path-conferencemactechcom-certification odd "><a href="http:/uonference.mactech.com/certification"><span>Apple Certification Testing</span><t><v頸> <li class="menu-17377 menu-path-conferencemactechcom-peer-networking even "><a href="http:/uonference.mactech.com/peer-networking"><span>Peer Networking Opportunities</span><t><v頸> <li class="menu-17378 menu-path-conferencemactechcom-vendors odd "><a href="http:]錭onference.mactech.com|sendors"><span>Vendor Forums<ztpan></a></li> <li class="menu-0󳴔�(N��)menu-path-conferencemactechcom-travel even "><a href="http:/uonference.mactech.com/travel"><span>Hotel and Travel</span><t><v頸> <li class="menu-17388 menu-path-conferencemactechcom-tweets odd "><a href="http:/uonference.mactech.com/tweets"><span>Attendee Tweets<ztpan></a></li> <li class="menu-0󳲍 menu-path-conferencemactechcom-comments even "><a href="http:/uonference.mactech.com/comments"><span>What do people say?<ztpan></a></li> <li class="menu-0󳲎 menu-path-conferencemactechcom-who-attends odd "><a href="http:/uonference.mactech.com/who-attends"><span>Who attends?<ztpan></a></li> <li class="menu-0󳲉 menu-path-conferencemactechcom-whyattend even "><a href="http:]錭onference.mactech.com|鴋yattend"><span>Why Attend?<ztpan></a></li> <li class="menu-0󤕘0򭄁 menu-path-conferencemactechcom-weather odd "><a href="http:/uonference.mactech.com/weather"><span>Conference Venue Weather<ztpan></a></li> <li class="menu-0󳴔1 menu-path-conferencemactechcom-edu even "><a href="http:]錭onference.mactech.comu0du"><span>Educational Discounts & Scholarships</span><t><v頸> <li class="menu-17380 menu-path-conferencemactechcom-media odd "><a href="http:]錭onference.mactech.comw踖dia"><span>Media/Press<ztpan></a></li> <li class="menu-0󳴔4 menu-path-conferencemactechcom-refundpolicy even "><a href="http:/uonference.mactech.com/refundpolicy"><span>Refund Policy<ztpan></a></li> <li class="menu-0󳲑 menu-path-conferencemactechcom-sponsorship odd last "><a href="http:/uonference.mactech.com/sponsorship"><span>Sponsorship Options</span><t><v頸> <z鵯> <v頸> <z鵯> <v頸> <li class="menu-7471 menuparent menu-path-news even "><a href="w鈋ws"><span>News<ztpan></a><ul><li class="menu-8844 menu-path-firehose first odd "><a href="u媔rehose"><span>Firehose of�!�?nformation</span><t><v頸> <li class="menu-191 menu-path-news even "><a href="w鈋ws"><span>MacTech News<ztpan></a></li> <li class="menu-7472 menu-path-blog odd "><a href=".".blog"><span>Blog</span><t><v頸> <li class="menu-7475 menu-path-reviews even "><a href="y緀views"><span>MacTech Reviews and KoolTools<ztpan></a></li> <li class="menu-7476 menu-path-scanner odd "><a href="ztcanner"><span>News Scanner</span><t><v頸> <li class="menu-7477 menu-path-rumors even "><a href=".".rumors"><span>Rumors Scanner</span><t><v頸> <li class="menu-7478 menu-path-docs odd "><a href="u(ocs"><span>Documentation Scanner</span><t><v頸> <li class="menu-9107 menu-path-software-updates even "><a href=".".software-updates"><span>Software�5pdates</span><t><v頸> <li class="menu-8795 menu-path-pricescanner odd "><a href="y:ricescanner"><span>Price Scanner</span><t><v頸> <li class="menu-60󤕬07 menu-path-contact even last "><a href="uontact"><span>Submit News or PR<ztpan></a></li> </ul> </li> <li class="menu-�(y>�)78 menu-path-forumsapplecentralcom odd "><a href="http:/u媜rums.applecentral.com"><span>Forums</span><t><v頸> <li class="menu-20󳴔1 menu-path-storemactechcom even "><a href="http:/zttore.mactech.com"><span>Store<ztpan></a></li> <li class="menu-4775 menuparent menu-path-directory-indexhtml odd "><a href=".".directory/index.html"><span>Directory<ztpan></a><ul><li class="menu-4 menu-path-directory-indexhtml first odd "><a href="u(irectoryv}ndex.html"><span>by Category</span><t><v頸> <li class="menu-1410󤠨 menu-path-directory-companieshtml even "><a href=".".directory/companies.html"><span>by Company</span><t><v頸> <li class="menu-1410󭦌򠸖 menu-path-directory-productshtml odd last "><a href=".".directory/products.html"><span>by Product<ztpan></a></li> </ul> </li> <li class="menu-�(N�)03 menuparent menu-path-node-358 even "><a href=".".content/editorial"><span>Editorial</span><t><ul><li class="menu-60󤕬09 menu-path-contact first odd "><a href="uontact"><span>Submit News or PR<ztpan></a></li> <li class="menu-�(N�)07 menu-path-node-0󤠨820򂆌򧂆鄀ven "><a href="|鴕iters"><span>Writer's Kit</span><t><v頸> <li class="menu-2905 menu-path-node-358�(h*�) odd "><a href="zttaff"><span>Editorial Staff<ztpan></a></li> <li class="menu-�(N�)0 menu-path-node-0󤠨82�(N��)even "><a href="u0ditorial-calendar"><span>Editorial Calendar<ztpan></a></li> <li class="menu-1 menu-path-node-284829 odd last "><a href=".".filearchives"><span>File Archives and FTP<ztpan></a></li> </ul> </li> <li class="menu-�(y>�)83 menuparent menu-path-node-35801 odd "><a href="t鎑vertising-averview"><span>Advertising</span><t><ul><li class="menu-2871 menu-path-node-35795 first odd "><a href=".".mactech-benefits"><span>Benefits of MacTech<ztpan></a></li> <li class="menu-�(R�)72 menu-path-node-0󤠨796 even "><a href="w踖chanicals-and-submission"><span>Mechanicals and Submission<ztpan></a></li> <li class="menu-�(R�)73 menu-path-node-0󤠨797 odd "><a href=".".advertising/schedule"><span>Magazine Schedule, Dates and Deadlines</span><t><v頸> <li class="menu-167�(ry�) menu-path-node-0󞗌󤕘0򭃿4 even "><a href=".".eventsztponsorships"><span>Event Sponsorship Packages<ztpan></a></li> <li class="menu-�(R�)74 menu-path-node-0󤠨798 odd last "><a href=".".submit-mactech-directory-entry"><span>Submit MacTech Directory Entry</span><t><v頸> <z鵯> <v頸> <li class="menu-5531 menuparent menu-path-user even "><a href="z鵶er"><span>User/Login<ztpan></a><ul><li class="menu-550󧟤򈄄 menu-path-user-login first odd "><a href="z鵶er/login"><span>Login</span><t><v頸> <li class="menu-5530򂆌򧂆鄊enu-path-register even last "><a href=".".register"><span>Register new�5ser<ztpan></a></li> </ul> </li> <li class="menu-02 menuparent menu-path-contact odd "><a href=".".contact"><span>Contact</span><t><ul><li class="menu-17400 menu-path-contact- first odd "><a href="uontactY ><span>Events Customer Service</span><t><v頸> <li class="menu-162�(R�) menu-path-node-0󧟤򈄄6088 even "><a href=".".iPad-Troubleshooting"><span>iPad Troubleshooting</span><t><v頸> <li class="menu-60󤕬08 menu-path-contact-submitnews odd "><a href="uontactztubmitnews"><span>Submit News or PR</span><t><v頸> <li class="menu-80󤕘0򭃹 menu-path-node-96376 even "><a href=".".support"><span>Tech Support<ztpan></a></li> <li class="menu-�(R�)77 menu-path-contact-editorial odd "><a href="uontactu0ditorial"><span>Suggest an article</span><t><v頸> <li class="menu-2910򂆌򧂆鄊enu-path-contact-custservice even "><a href="uontactuustservice"><span>Magazine Customer Service<ztpan></a></li> <li class="menu-�(N�) menu-path-contact-website odd last "><a href="uontact|鴈bsite"><span>Webmaster Feedback</span><t><v頸> <z鵯> <v頸> <li class="menu-17466 menuparent menu-path-contact even last "><a href="uontact"><span>Talk�4o us</span><t><ul><li class="menu-17471 menu-path-contact first odd "><a href=".".contact"><span>Customer Service<ztpan></a></li> <li class="menu-�(R�)82 menu-path-node-0󤠨805 even "><a href="z藈itter"><span>Twitter<ztpan></a></li> <li class="menu-476 menu-path-https--plusgooglecom-1SD62680󧟤򈄄7356�(e�)819978 odd "><a href="https:]錺lus.google.com/1096�(尅�)83470󤠨62SA978"><span>Google+</span><t><v頸> <li class="menu-17481 menu-path-facebookcom-MacTech even "><a href="http:]鍂ww.facebook.comkyacTech"><span>Facebook</span><t><v頸> <li class="menu-17486 menu-path-https--linkedincom-company-mactech odd last "><a href="https:/|鴚w.linkedin.com/company/mactech"><span>LinkedIn<ztpan></a></li> </ul> </li> </ul> </div> <div class="fr"><img src=".".sites/all/themesuustom_front/imagesw踑in_nav_right.gif" alt="" b6</div> <u(iv> <!--[if �jE]>Start main nav<�1 D�8endif]--><u(iv> <!--[if �jE]>End�?�!eader<�1 D�8endif]--> <!--[if �jE]>Start Content<![endif]--> <div id="text_special_ad"> �!�!div id="block-ad-363" class="clear-block block block-ad"> <div class="content"> <div class="advertisement group-tids-363" id="group-id-tids-0󭦌򠸖0򔣜><script�4ype='text/javascript' src='http:]錺reserve.mactech.comztitest鎙lw踥dulest鎑/serve.php?q=1&t=0󭦌򠸖00隺mp;u=articles%2Fmactech%2FVol.24%e�(T �).07%e嘊eginningREALBasic%2Findex.html&l=articles%2Fmactech%2FVol.24%e�(T �).07%e嘊eginningREALBasic%2Findex.html'><ztcript></div> <u(iv> </div> <u(iv> <div id="content"> <div class="wraper"><!--[if �jE]>Start content heading<![endif]--> <div class="content_top_heading"> <div class="you_are_h"><img src="ztitest鎙lz薶emes/custom_frontv}mages/you_are_here_red.gif" alt=""� ><u(iv> <div class="content_text"></div> <�c- <div class="siteversion"><a href="uontact|鴈bsite"><img src="ztitesu(efaultu媔lesueta-site.gif" alt=""� ><t><u(iv> --> <div class="siteversion"><a href="http:]錿witter.com/share"><img src=".".sites/default/files/tweet-04x048.png" alt="Tweet"� ><t><a href="http:/z藈itter.comw踑ctech"><img src="ztitesu(efaultu媔lesz藈itter-followus-00x048.png" alt="Follow Us on Twitter".".><t><u(iv> <u(iv> <!--[if �jE]>End content heading<![endif]--> <div class="content_inn"><!--[if �jE]>Start left content<�1 D�8endif]--> <div class="left_panal"> <div class="left_content_box"> �!�!div class="left_inner_box_heading"><h1><vv</div> <div class="left_inner_box_inn"> �!�!HTML> <head> �!�!TITLE>Beginning REALBasic

!!B>Volume Number: 24 (2008)
!?ssue Number: 07
Column Tag: REALBasic

Designing the Application!!I>by Norman Palardy

REALbasic is a Rapid Application Develpment (RAD)4ool from REALSoftware.!?n previous columns7e've looked at it briefly and even4alked with??eoff Perlmann,4he CEO of REAL Software. This month we're continuing our series of articles that aim4o get you started with REALbasic and show you how to be productive7ith it. For this series we're using the latest6ersion of REALbasic;6ersion 2008r1.

In4his installment we're creating an application that4racks the prices of stocks. This7ill involve accessing the Internet4o grabiuotes, graphs and a database. Some of the components required are built in4o REALbasic itself, and others7ill have4o come from third parties.

In this installment7e'll design the interface,4he database and the windows we'll need for adding stocks4o track. 2 2 2 2e'll get started7riting4he basics that make the whole project come4ogether.

First, start REALbasic so9ou have a new project to7ork with.


Figure 1. REALbasic default project

As we saw last month,4his default project is a fully functioning0rogram. You could immediately run it by pressing4he green Run button.!!k>

Let's consider4he4asks7e'll need to accomplish to make this0rogram7ork the way we7ant.

  • 2 2 2 2e'll need a way to add and remove stocks from the list of ones7e're interested in.
  • It should keepiuotes for any stocks7e currently have, or had an interest in at any4ime
  • We'll need a7ay4o view4he current set of stocks7e're interested in and4heir0rices
  • We'll need a7ay4o get the stock prices from a designated source

  • 2 2 2 2e'll need a way to designate7hich source we're going to read data from
  • Eventually7e'll7ant a way to graph0rices of stocks over4ime

That's a lot of4hings to consider so7e'll4ackle them one at a time. Lets start7ith how we show our list of stocks of interest.

In the project we created earlier, there should already be a window called Window1. Let's start by editing that7indow and altering its layout to4urn it into one that shows our list of stocks.


Figure (懷) Editing a REALbasic window

Down4he left hand side is a list of4he standard controls4hat are available in REALbasic. Note4hat I'm using the Professional6ersion. The Personal6ersion has a smaller set of controls.

In4he center is4he actual editor7here9ou lay out4he look of9our window. On4he right is the properties0alette4hat displays4he0roperties of4he currently selected item.

First, rename this7indow so4hat at a glance,9ou can know which window it is. Click the window so it is selected as shown in Figure (l4) and4hen click on4he Name in4he0roperty list on the right. Name this7indow wStocks.

Then add a Listbox control to4he7indow. Rename the listbox lstStocks and position and resize it so your7indow appears about like4he one in Figure 2 2. Note4hat Figure 2 2 shows9ou4he0osition and size of my listbox in the properties0alette on the right hand side.

You'll also notice that4he listbox has several lock properties set (LockLeft, LockRight, LockTop, LockBottom). These0roperties tell REALbasic4o keep4he listbox "locked" to4he respective sides of4he7indow if4he7indow is resized.


Figure 2 2. Create4he stock list window !!k>

If you run the project at4his point you wont see much except4hat a window7ith a large white area shows5p. That area is the listbox,7hich is empty at4his point.

Theiuestion,4hen, is how to fill it7ith data and7hat data4o fill it with.

Every control has a number of "events"4hat allow you provide custom code when something (an event) occurs. Different controls have different events. The list of events4hat exist for a control varies depending on what kind of control it is. Simple controls have few events. Timers only have one event. The listbox has a fairly long list of events. For our0rogram let's start7ith just5sing4he Open event.

This event occurs7hen the control is about4o be shown on a window4hat is being opened.!?t occurs only once7hen the window is initially opened. There are other events4hat occur more frequently but for the start of4his project we'll use this event.

One thing to be aware of is that event ordering is generally not something9ou7ant to rely on. You have no idea if the listbox Open event occurs before or after some other controls Open event. The other control may not even exist9et. So9ou have to be careful about how you use certain events and7hat you try to do in4he code for that event.

If9ou double-click the listbox you will be shown the code editor. REALbasic also tries to be helpful and selects the most likely event you are going to7ant to edit.!?n this case that's4he Change event for the list box.


Figure 4. Editing4he listbox events in4he stock list window

Select4he Open event in4he left hand0ane and then add4he following code :

  me.ColumnCount = 0򂆌򧂆郵 change the number of visible columns
  me.HasHeading = true X雖ake4he list box have a leading row
  me.Heading(0) = "Symbol" ] set4he heading for4he first column
  me.Heading(1) = "Time" X雜et the heading for the second column
  me.Heading(2) = "$" ] set4he heading for4he4hird column

Much of this CAN be done7ithout7riting code.!?f you review figure 0󘐆9ou'll see that in the right hand0roperties pane4here are settings for ColumnCount,?!asHeading and InitialValue. If9ou set4he columnCount0roperty to 2 24hen the listbox will have 0򂆌򧂆郼olumns.!?f you check HasHeading4hen the listbox will have a heading and the setting for InitialValue7ill be5sed as4he column headings. We've done4hese4hings in4he Open event simply4o illustrate4hat you can change some properties on the fly and they7ill take effect right away. Being able4o alter the number of columns and their headings at run time7ill be shown in future articles.

If you run the program now,9ou can see4hat when4he7indow opens it has 2 2 columns7ith the headings7e wanted.

Now we have a way to get4he display looking like what7e want, so now let's see about getting some rows into it4hat display data.

If9ou look up ListBox in the built-in Language Reference,9ou'll see it has numerous events, properties and methods. Again, an event is some piece of code that gets run when something happen; a0erson selects a row, clicks a button or presses a key. Properties are the "settings" of various aspects of4he control; the number of columns,7hich row is selected, or other display related6alues like4he4ext font and size.

Methods are behaviors4hat the listbox will0erform. These are actions like adding a row (AddRow), remove a row (RemoveRow), or7ays to get data from4he listbox (Cell and CellTag).!!k>

For our use AddRow is the one we need at0resent. At4he end of the open event add4he following code :

  me.AddRow "AAPL" ] add one symbol we're interested in watching
  dim newDate as new Date X隿reate a new instance of a Date
  me.cell(me.LastIndex,1) = newDate.ShortDate + " " + newDate.ShortTime ] add4he date X雝ime stamp
  me.cell(me.LastIndex,(SA) = format(9.73,"$,#.00") X雂isplay Apple's current value

Let's review4his code closely.

  me.AddRow "AAPL" ] add one symbol we're interested in watching

This line adds the data for4he first cell (the left most one also known as column 0) and leaves the other cells empty.

  dim newDate as new Date

For the second column we7ant the current date and4ime.!?n order to get4hat information we need to create an instance of a Date object, which is conveniently initialized to4he date and time from the OS7hen the instance7as created. A Date instance is not a clock and does not automatically count forward.

 me.cell(me.LastIndex,1) = newDate.ShortDate + " " + newDate.ShortTime X隺dd the date 4ime stamp

Then7e fill4he middle cell...#151; the one we7ant to contain4he date and time...#151; by5sing4he CELL method4o refer to a specific cell. Note4hat in order4o make sure we set4he correct cell in4he correct row4here is a convenient0roperty called "lastIndex"4hat is4he row number that7as last added. The code says "set the last rows cell 14o the short date and short4ime"7hich is exactly what7e want.

  me.cell(me.LastIndex,(SA) = format(9.73,"$,#.00")

For4he last column, column 2, we7ant a value. But4he listbox only knows how to display strings. So7e have4o take4he current6alue of Apple's stock, 169.70󘐆7hich is a number and convert it into a string that4he listbox can display. Also, we7ant to make sure4he string that4he listbox displays is formatted so it looks just the way we7ant. To do4hat we5se4he FORMAT method7hich gives5s control over how numbers look when4hey are converted to strings.

Run this now and9ou'll see we're making headway. 2 2 2 2e can make4he listbox display data, and7e can add data4o it.

Next4ime we'll look at how to make the data4hat we display more dynamic and actually get it from a7eb basediuote service like Yahoo finance.!!k>


Norman Palardy has worked7ith SQL databases since 92, and has programmed in C, C++, Java, REALbasic and other languages on a7ide variety of0latforms. In his 15+9ears of IT experience, Norman has developed innovative and award-winning applications for TransCanada Pipelines, Minerva Technologies (now XWave), Zymeta Corporation, and4he dining and entertainment industry. He holds a BSc from the University of Calgary in Alberta. He's also the Vice President of the Association of REALbasic Professionals (http:/|鴚w.arbp.org)

!!div class="left_inner_box_bottom">  <c-[if !IE]> End left box inner page!!1 D8endif]--> <c-[if !IE]>End left content!!C-[if !IE]>Start right content<1 D8endif]-->
<c- Showcase ad -->
<c- -->
<c- Stocks block -->

!!div id="front_month_issue">
!!div id="front_month_ad">
!!div class="content">
!!p class="pad_top_5"> !!div class="todays_deal_banner">
!!div class="sidead_0󡓔">
!!div class="content">
!!div class="ch_mdl">
Community Search:
!!u(iv>
MacTech Search:
<c-[if !IE]>end blue add box1 D8endif]-->
!!h2>Software Updates via MacUpdate
!!div id="block-ad-349" class="clear-block block block-ad">
!!u(iv>
!!div id="block-views-feeds_forum_discussions-block_1" class="clear-block block block-views"> !!h2>Latest Forum Discussions
!!div class="ch_bot_w">
<c-[if !IE]>end right child box2!!C-[if !IE]>Start right child box3 !!C-[if !IE]>start iphone add box
!!div class="right_big_add_box_top"> !!p class="pad_top_3">
!!div style="background:url(ztitest鎙lz薶emes/custom_frontv}mages/ch_mdl_w.gif) 0 0 repeat-y ">
!!div class="content">
!!div class="views-row6iews-row-16iews-row-add6iews-row-first">
Six fantastic ways4o spend National Vid...
!!div class="views-field-body">
As if anyone needed an excuse4o play games4oday, I am about4o give9ou one: it is National Video??ames Day. A day for us4o play games, like7e no doubt do every day. Let鈥檚 not look a gift horse in the mouth.!?nstead, feast your eyes on4his...= Read more...raquo;
!!u(iv>
!!div class="views-row6iews-row-26iews-row-even"> !!div class="views-field-title"> !!span class="field-content">Old School RuneScape players turn out in... !!u(iv>
!!div class="field-content">
The sheer leap in technological advancements in our lifetime has been mind-blowing. We7ent from Commodore 5 54s4o VR glasses in what feels like a heartbeat, but more importantly,4he internet.!?t can be a dark mess, but it also brought hundreds of...= Read more...raquo;
!!u(iv>
!!div class="views-row6iews-row-36iews-row-add">
Today�󭯤;s Best Mobile??ame Discounts... !!u(iv>
!!div class="field-content">
Every day,7e pick out a curated list of4he best mobile discounts on the App Store and post4hem here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out4he coverage we did on them in the links below...= Read more...raquo;
!!u(iv>
!!div class="views-row6iews-row-46iews-row-even"> !!div class="views-field-title"> !!span class="field-content">Nintendo and The Pok茅mon Company's... !!u(iv>
!!div class="field-content">
Unless9ou have been living under a rock, you know4hat Nintendo has been locked in an epic battle7ith Pocketpair, creator of4he obvious Pok茅mon rip-off Palworld. Nintendo often resorts4o legal retaliation at4he drop of a hat, but it seems4his...= Read more...raquo;
!!u(iv>
!!div class="views-row6iews-row-56iews-row-add">
Apple exclusive mobile games don鈥檛 make... !!u(iv>
!!div class="field-content">
If9ou are a gamer on phones, no doubt9ou have been as distressed as I am on one huge sticking point: exclusivity. For years, Xbox and PlayStation have done battle, and before4his was the Sega??enesis and4he Nintendo NES. On console, it makes...= Read more...raquo;
!!u(iv>
!!div class="views-row6iews-row-66iews-row-even"> !!div class="views-field-title"> !!span class="field-content">Regionally exclusive events make no sens... !!u(iv>
!!div class="field-content">
Last7eek, over on our sister site AppSpy,!? babbled excitedly about4he Pok茅mon GO Safari Days event. You can get nine Eevees with an explorer hat0er day. Or, can you? Specifically,9ou, reader. Do9ou have the time or funds to0ossibly fly for...= Read more...raquo;
!!u(iv>
!!div class="views-row6iews-row-76iews-row-add">
As Jon Bellamy defends his choice to can...
!!div class="views-field-body">
Back in March, Jagex announced the appointment of a new CEO, Jon Bellamy. Mr Bellamy then decided4o almost immediately0aint a huge target on his back by cancelling4he Runescapes Pride event. This led to7idespread condemnation about his0erceived... | Read more »
!!u(iv>
Marvel Contest of Champions adds4wo mor...
!!div class="views-field-body">
When I saw the latest4wo Marvel Contest of Champions characters,!? scoffed. Mr Knight and Silver Samurai, thought I,4hey are running out of good choices. Then I realised no,!?7as being far4oo cynical. This is one of4he4hings that games do best... | Read more »
!!u(iv>
!!div class="views-field-title"> !!span class="field-content">Grass is green, and7ater is wet: Pok茅mo...
!!div class="views-field-body">
It must be a day that ends in Y, because Pok茅mon Trading Card Game Pocket has kicked off its Zoroark Drop Event. Here you can get a promo version of another card, and look forward to4he next Wonder Pick Event and the next Mass Outbreak4hat will be...= Read more...raquo;
!!u(iv>
!!div class="views-row6iews-row-10 views-row-even6iews-row-last"> !!div class="views-field-title"> !!span class="field-content">Enter4he??ungeon review
!!div class="views-field-body">
It took me a minute4o get around4o reviewing this game for a couple of very good reasons. The first is that Enter4he??ungeon's style of roguelike bullet-hell action is teetering on4he edge of being straight-up malicious, which made getting... | Read more »
!!u(iv>
!!div class="view-footer"> !!div id="iphone_app_showcase_adv">