Flex/AIR: DynamicEvent
Jan 10th
Applies to: Adobe Flex & AIR
A DynamicEvent is a type of custom event in Flex that is easier and quicker to set up than the full-blown approach. By applying the latter method, you normally go through the following steps:
- Define a subclass from flash.events.Event
- Make the event available to other ActionScript (through addEventListenter()) components or MXML components (using the [Event] metatag)
- Dispatch the event, using dispatchEvent()
Full documentation on custom events can be found in Adobe’s LiveDocs, here.
Generally one uses the above approach when you need to pass arguments to the code that’s targeted by the event. When you don’t require this, however, you can opt for the DynamicEvent. It’s not necessary to go through the whole rigamarole of subclassing; all you need is a name for the event, like so:
var yourEvent:DynamicEvent = new DynamicEvent("yourEventName", true);
dispatchEvent(yourEvent);The second argument set to true means the event will bubble.
AS3: How to set focus to an empty textfield
Dec 30th
Applicable to: Adobe ActionScript 3, Adobe Flex, Adobe AIR
This simple operation isn’t very obvious in ActionScript 3. The TextInput element has a boolean property called focusEnabled, but this doesn’t seem to do anything (it’s probably meant for other purposes, didn’t take the time to check).
The way achieve this is two-fold:
stage.focus = yourTextField;
yourTextField.setSelection(0,0);
If your textfield contains text and you wish to place the caret to the end, you would probably go about it like so:
stage.focus = yourTextField;
yourTextField.setSelection(0, yourTextField.length);
Makes sense now you know about it, huh?
How To: Install Windows 7 from external USB disk or USB key
Sep 10th
How to install Windows 7 from a USB key or external hard drive? There are a few commands you need to master with the built-in command-line tool called ‘diskpart’. A step-by-step guide.
As I documented the process of preparing an external USB drive to install Mac OS X 10.6 Snow Leopard, it’s only right for me to do the same for its counterpart Windows 7. It turns out doing this for the latter is much simpler than for the former. It should only take a few minutes to prepare the disk, plus the time your computer needs to copy the contents of the Windows 7 install disc or image.
Installing any operating system from a flash or hard drive has the advantage of being faster, because optical discs can only spin so fast – or rather, so slow as the spindle allows.
Here’s how.
Ingredients
What you’ll need to get this super-spiffy install medium:
- A Windows 7 RC or RTM/GA (Home Premium, Professional, Ultimate) install disc or image
- A working Windows XP/Vista/7 computer to perform the preparations
- A 4GB or bigger USB key or external hard drive
Preparing the disk
- Pop the external disk into a vacant USB-port.
- Open a Command Prompt window, either by hitting the Windows key in Vista/7 and typing cmd or selecting Run… from the start menu in Windows XP and typing cmd.
- Then, in the black box, type diskpart – if you’re using Vista or up you’ll be prompted with a UAC window to which you must consent. XP users will be brought to diskpart right away, unless you’re using a Limited Account (if so, switch to an Administrator privileged account or do a Run As…)

- We need to find out which index the USB device is at, so we’re sure we’re preparing the correct disk (and not, say, your C: drive). Enter list disk. In my case, my USB key is located at position 1. Check which number yours it at before you copy-paste the following commands!

- To tell DiskPart we want to start preparing disk 1, enter select disk 1.
- Type clean.
- Now we’re going to repartition the drive into one primary partition, so type create partition primary.
- To make the partition we just created the active one, simply enter active into the box.
- Then, we’ll want to format the active partition as FAT32. This is done by typing and entering format fs=fat32 quick. The quick keyword will wipe the file table instead of wiping the disk sector by sector, which takes a lot longer. If you’re concerned with the wiped data being completely gone, omit ‘quick’.
- Finally, type assign so the drive gets a letter in Windows Explorer for easy access.
Copying the files over
You now have a clean, ready to be copied to, disk. What follows is extremely simple:
- Insert your Windows 7 installer disc into the tray or mount the installer image with a tool like DaemonTools.
- Open the disc’s/image’s contents by browsing to it using Explorer.
- Select all files and folders (CTRL+A or ‘Organize > Select All’).
- Copy the files using the right-click menu or hitting CTRL+C.
- Paste everything onto the root of the prepared USB drive.
Your USB drive is now bootable
Restart your computer and make sure you boot from USB. The installation procedure will continue as it would from a disc, only faster. Happy installing.
Weekend: Apple yanked ZFS from Snow Leopard, enemy of TV industry, SSD goes mainstream & more
Aug 31st
Tech news roundup up for August 29 through August 30, 2009. As weekends are less news-laden than weekdays, the following stories are mostly in-depth editorials about a certain subject. During the weekend it’s time to sit down with a good long article and engross. This weekend’s highlights:
- Solid-State Drives Go Mainstream #
- Woofer: This Twitter look-alike requires 1,400 characters #
- Using ‘Free’ to Turn a Profit #
- Hey, PC, Who Taught You to Fight Back? #
- Is Apple the Enemy of the TV Industry? Microsoft Thinks So #
- Apple kicks ZFS in the butt #
Solid-State Drives Go Mainstream
While prices for SSDs are still significantly high when compared to conventional spinning hard drives, mainstream consumers are starting to see the benefit of this new technology. As more and more manufacturers and models are available on the market, computer vendors are starting to incorporate them into lower-end computers as well. Because SSDs are currently still limited in storage space (up to 256GB, .5TB & 1TB are available but are prohibitively expensive), more and more people are turning to them as complimentary storage. SSDs can easily contain the operating system and applications, while other data can be stored on normal HDDs. Because SSDs are inherently faster, this workflow would evidently speed up your computer. ComputerWorld elaborates.
This Twitter look-alike requires 1,400 characters
I generally ignore Twitter “news” because it is cumbersome and totally useless – in my mind, but this one’s too funny. Woofer, an astoundingly accurate Twitter-lookalike actually requires you to update your status with at least 1,400 characters, as opposed to Twitter’s maximum of 140 characters. Woofer advises its users to be eloquent, to use adverbs and never to abbreviate. Via CNET News.
Using ‘Free’ to Turn a Profit
This editorial article from NYTimes gets together with Evernote and discusses its – and many other web businesses’ – revenue model. True to the web’s nature, Evernote is free for everyone to use. But how does the company make money? NYTimes finds out.
Hey, PC, Who Taught You to Fight Back?
Again from the NYTimes, this article describes Microsoft and Apple’s ad-fighting history in light of both companies’ latest television commercials. While Apple has always been big on advertising, it seems Microsoft has been making renewed commitments with its latest efforts – and is getting some results from it, too. From NYTimes.
Is Apple the Enemy of the TV Industry? Microsoft Thinks So
Microsoft’s Director of Consumer and Online in the UK has expressed his concerns with the Television Industry’s future if it doesn’t take initiatives to move its repertoire to the web and keep its content out of the hands of a single online entity – read: Apple. According to the said Director, the industry should be wary of what he called an “iTunes moment”, referring to the music industry and Apple’s hold on it with iTunes. The same could become true with TV, Microsoft warns. Via Mashable.
Apple kicks ZFS in the butt
In other Apple news, it turns out Apple completely yanked the promised ZFS functionality from its latest OS, Mac OS X 10.6 Snow Leopard. ZFS is Sun’s open source, highly reliable and modern file system that would make its entree into the consumer operating system market for the first time with Snow Leopard – as announced two years ago by Apple itself. With every developer release of OS X 10.6 traces of ZFS became vaguer and the final release completely erases any trace of it – silently. Microsoft was harshly called out for yanking WinFS from Windows Vista, but is anyone paying any attention when Apple pulls the same stunt? ZDNet blog post.
Tech News Roundup
Aug 28th
Tech news roundup for August 27, 2009. Yesterday was a slow news day, hence no news roundup for August 26, 2009. Today was also rather slow, to be honest.
- Google Now Offers Over a Million Free Ebooks in EPUB Format #
- Microsoft cuts Xbox price by 25 percent #
- Asustek to launch e-book reader under Eee family #
- Confirmed: $29 Snow Leopard Installs Whether or Not You’ve Got Leopard #
Google Now Offers Over a Million Free Ebooks in EPUB Format
Google currently offers 1 million books in EPUB format through it’s Google Books portal. Many of these books are in the public domain, so many of them are pretty old. But old books can still be good. Source at Mashable.
Microsoft cuts Xbox price by 25 percent
Microsoft has intensified the price war with Sony by lowering the price of its XBOX360 by approximately 25%. The Elite model will be 100$ US cheaper, with its 299$ US price point. The Arcade remains the same at 249$ US. The middle model, called the Pro, will be discontinued. This leaves the consumer with a simplified choice, says Microsoft. As of now, Microsoft is the only console manufacturer with positive sales. Source at Reuters.
Asustek to launch e-book reader under Eee family
eBook-readers seem to be in vogue lately. Word goes round that Asus, maker of the EeePC, will also be manufacturing an eBook-reader to compete with Amazon and Sony. Source at DigiTimes.
Confirmed: $29 Snow Leopard Installs Whether or Not You’ve Got Leopard
Mac OS X 10.6 Snow Leopard will cost Leopard-users $30, and Tiger users $169, because they are supposed to purchase the Box Set. This includes the new OS, iLife ‘09 and iWork ‘09. It has been confirmed that OS X 10.6 will also install whether or not you’re actually using 10.5. It turns out the so called upgrade disc doesn’t check for prior versions. If you’re still on Tiger, you can skip Leopard all together and save a lot of money, but you’ll be violating Apple’s EULA. Source at Lifehacker.
High Hopes for Office Web Apps
Aug 27th
(click images to enlarge)
With Microsoft Office Web Applications, the productivity suite will have a real web-facing side for the first time. It will be released alongside Office 2010 and will be supported by all major browsers, including Mozilla Firefox, Internet Explorer, Apple Safari and Google Chrome. Anticipations and stakes for this release are high and I personally think it’s going to sweep current online productivity suites like Google Docs right off the table. Yes, I have extreme high hopes for Office Web Apps. And perhaps you should too.
Feature Set
While not much is known about the real specifics of the online Office suite, it is certain that the traditional desktop software applications like Word, Excel, Powerpoint and OneNote will certainly be represented in the online version of Microsoft Office.
Microsoft describes the suite as online siblings for its Office applications. They will be “lightweight versions of the applications from the desktop product”. According to the General Manager of the Office-project, users of the web applications will be able to “view, edit, and collaborate” on Office documents. The web-version of Office will also, most importantly, retain document fidelity to the fullest, allowing a user to view documents in full quality online, make alterations and save it again (online or off) without loss of quality. This is stellar functionality lacking currently in all online productivity suites.
Google Docs – as a common example – incorporates support for Microsoft Office documents in rather shoddy way. After you upload your files – frankly – they become half-assed HTML variations of the originating document. Microsoft’s solution promises to retain all of the rich formatting, lay-outs, styling, charts, transitions and image quality.
This is obviously a big improvement over any of the current implementations. And it’s one with far-reaching ramifications.
High Hopes
If you have ever sampled an online productivity suite like Google Docs you instantly realize what a step back it actually is from Microsoft Office 2007. It’s slow and feature-impaired. In Google Docs’ case it feels more like a old Office 2003 replica, with the toolbar UI bringing back bad memories with every click. Support for pretty fonts and advanced page layout capabilities are simply neglected. There isn’t anything significant implemented around text styling, nor is the revisioning system in GDocs very much impressive. If we’re honest here, it’s a downright fluke. In my opinion, Google Docs is more reminiscent of an advanced WYSIWYG-editor for blogging purposes, rather than an online word processor. And it’s not even decently apt at producing the aforementioned blog posts, since the HTML it outputs is extremely semantics unfriendly.
Microsoft’s solution, however, could be a game-changer. It will feature the ribbon interface, albeit it less feature-rich, because some functionality simply doesn’t belong in a browser. It will support many of Office’s advanced presentational niceties, though. Couple this to the online storage we’ll be getting with Office Live and true cloud computing starts to show its colors.
Reduced Functionality
I talked about reduced functionality, but don’t let that scare you. The online version of Office will be feature-limited to the degree that the most used functionality will remain present. And since most Office-users only utilize a small percentage of the full suite’s feature-set, I don’t think there will be problems with using Office in its reduced form through Office Web Applications.
To me, this is all very exciting, but I realize I should reserve judgment until I can get my hands on it for some real experience. But what’s a geek to do? I just can’t help myself. Microsoft’s introduction of the ribbon interface to its Office line was big. And so will this be. I sure can’t wait to check it out.
Microsoft’s OneApp, Nokia’s Windows 7 netbook w/ 12hrs of battery life, Opera 10 & more
Aug 26th
Tech news roundup for August 25, 2009. I’d like to share some science/astronomy oriented articles with you before we jump to the tech news.
Now for the tech news:
- Microsoft’s OneApp targets non-smartphones #
- Nokia to deliver Windows 7-powered netbook with 12 hours of battery life #
- Opera 10 Slated For September 1 Launch. Will Anyone Take Notice? #
- Sony’s new Reader lineup assaults Amazon Kindle #
Another Little Ice Age? Solar activity and climate change
The Sun’s is experiencing a slow return to normal activity after its natural 11-year cycle. The number of sun-spots have decreased, which could indicated a “Little Ice Age” may be impending. The last time this happened was the late 17th century. This time around its effects may not be as chilling due to the vast amount of greenhouse gases now circulating our atmosphere. Source at ArsTechnica.
Extrasolar Planets at Full Tilt
Exoplanets – scientists have recently discovered – don’t generally follow our Solar System’s common circular orbits. Instead, they’re usually tilted more than 30 degrees, causing some of them to actually orbit backwards relative to its parent star. The most tilted planet (7 degrees) in our solar system is Mercury. Interesting insights. Source at Discovery.
Microsoft’s OneApp targets non-smartphones
Microsoft recently launched a mobile application called “OneApp”, which is directed at the non-smartphone market. The application will act as a gateway to web applications and services like Facebook, Twitter, Windows Live Messenger, and more. Because non-smartphones are so low on processing power, OneApp will relay processing and storage to the web. The app itself only takes up 150KB and will even work on the most basic GPRS/EDGE phones. Source at TechRadar.
Nokia to deliver Windows 7-powered netbook with 12 hours of battery life
Yes. Truly. Read the specs at Paul Thurrott’s SuperSite Blog post.
Opera 10 Slated For September 1 Launch. Will Anyone Take Notice?
The cursed underdog of browser-land, Opera, has published the Release Candidate for its upcoming browser Opera 10. Codenamed “Peregrine”, it will offer “an improved user interface, increased web standards support, bug fixes, performance improvements, and new tools for web developers”. As with every release from Opera, I will download it and give it a fair chance. I rarely like what I see, though. So, in those terms, this will be Opera’s tenth chance to convince me. Source at TechCrunch.
Sony’s new Reader lineup assaults Amazon Kindle
Sony has refreshed its lineup of eBook readers with a trio of readers, each specialized in a certain type of end user. The first – called “Pocket Edition” – is portable and cheap. The second one – “Touch Edition” – offers a bigger screen with touch capabilities. And the über-reader is called the “Daily Edition”, with a big screen, touch capabilities and 3G & WIFI connectivity. In each case, Sony’s equivalents to the Kindle and Kindle DX are significantly cheaper than Amazon’s offerings. Also, Sony scrambles behind eBook-standard EPUB enabling broader compatibility. It has also partnered with Google. Source at ZDNET.
(click the thumbnail on the right for a closer look)








