Archive for the ‘Apple’ Category.

Thanks for the Macs

The passing of Steve Jobs last week, like others, caused me to reflect on his impact on my life via Apple.

I was a child of the 70s and teen of the 80s. I wanted to fly aircraft and was into science (fiction and fact) and electronic music.

Science fiction was full of computers : from Star Wars, Space 1999, BattleStar Galactica, Buck Rogers and Blake’s 7 etc

As for science fact, the first significant event I remember well – being allowed out of lessons to watch the first Space Shuttle launch on tv. Around that time the school had 3 computers. Two Commodore PETs and a ZX81. I got into trouble for not doing my homework to write a program to tie a tie. It was only ever to be a series of print statements that had to read out for the teacher to type into the PET. I had a go at reading from my blank note-book, but he sussed me. Despite that fail, my interest in computing was sparked and my savings went into getting a ZX81 and a couple of years later a ZX Spectrum and input of many listings from the likes of Sinclair User and Your Computer.

I gradually became aware of Apple via occasional appearances of the Apple II on the likes of the BBC Computer Programme / Micro Live. It had an immediate reputation of being a cutting edge machine but massively expensive. Similarly the original Macintosh was far beyond anything I could afford, so my next machine was to be a Sinclair QL. Although the QL was still not a GUI machine, Mac was already an influence causing me to create my A-Level computer science project on the QL, a GUI music sequencer. Admittedly it was just a graphical menu system driven by cursor keys, but this was the start of my interest in UI programming.

In my first year at University I bought my next machine – an Atari ST 512. Finally something with a GUI. A decent machine for the budget, and useful for games and as a music sequencer. It had a WYSIWYG word processor, but output looked a bit rough by the time my Epson LX-80 had printed. It was no Mac.

My 3rd year at Uni was industrial placement. I spent my year with ICI programming VAX FORTRAN on a DEC VAX 6310 cluster running VMS. All the UI work was text menu based and occasionally command-line. I was then well prepared for a career of programming in an industrial environment. However I was saving up deciding on a new machine for my final academic year where I knew I’d need to write up my final year project. I bought a number of issues of MacUser – everything about Mac oozed quality and I longed for one.

So in 1991 I managed (strangely) to get a discount on my first Mac by trading in my Sinclair QL. I was sad to see the QL go, but very happy to welcome a Macintosh LC and StyleWriter with WordPerfect for Macintosh. A really good machine which I retain to this day. Although it hasn’t been out of it’s box for a while.

WordPerfect came with student discount and a competition. I entered and won. The prize : A new Macintosh LC! Once sold, the initial net cost of my first Mac turned out to be pretty small. Other than completely underestimating how long it would take to print out my final report at full quality on the StyleWriter this machine was a good choice. While others were messing tweaking PCs, the Mac just worked and the print quality was great.

Through MacUser I was once again a lucky competition winner. The Prize: Flight to San Francisco with tickets to attend MacWorld Expo 1993. I had only been abroad once before so this was the trip of my life to that point and the exhibition at the Moscone centre was the biggest I;d ever seen. My least expensive purchase during the trip, but the most valuable, was a copy of Macintosh Human Interface Guidelines (ATL). I haven’t read it in some time but while all the examples in the book are specific to the look and feel of Mac System 7, I recall it includes reasoning and many principles which remain useful today.

By the end of it’s useful life in about 1994/1995 the LC’s memory was increased from 2Mb to 6Mb, vRAM increased from 256K to 512K, hard disc increased from 40Mb to 500Mb, an accelerator replaced the 68020 cpu with 68030, a 17inch monitor replaced the tiny 12inch original, AppleCD 150 CD-ROM drive was added and I saw QuickTime running for the first time. Ok, the drive was single speed, discs loaded via a caddy, and the video was postage-stamp size – but it felt revolutionary. Also many hours were spent in the world of MYST – CD-ROM based game.

Back in 1993 being the owner of a Mac and having an interest and knowledge of user interface principles helped me win my first job in ‘interactive media‘. A startup company formed to develop applications teaching English as a second language. We started with an empty office, my Mac LC and PhotoShop, soon replaced by a Quadra 800 and we choose MacroMind Director with which to develop our educational games.

Since then and to date I have always had a Mac as my primary machine and usually a PC to target-test. My work programming interactive media has taken me from small town small company through to London multinational PLCs and now to working freelance. I used System 6 through System 9 and Mac OS X from 10.1 to 10.7 and loved it – every improvement every step of the way.

I am no Apple fanboy. I don’t buy everything Apple produces (no iPad no iPhone). I grumble when things don’t work. I didn’t agree with everything Steve Jobs said but Macintosh in particular has been good to me every day for the past 20 years. For that I thank Steve Jobs and the teams of people he brought together to make it happen. I hope we (Apple staff and customers) all learned enough from his example to keep up the momentum. His passing has given me a kick in the pants to go and get more stuff done.

Apple Cinema HD 23inch dies, then resurrects

This morning I was greeted with a blank screen and the power light flashing short-long-short, and groaned at how expensive today was about to get.

The Apple support page states that this flash pattern indicates the wrong power adaptor is being used with the display. I’m using the original 90W adaptor supplied with the screen and keep it powered via an APC UPS.

Fortunately with a bit of googling I found the ‘paper w’ solution here and on the post by jakobeon on the Apple disscusions forum. Essentially by using a strip of paper to blank off the middle of the 5 output pins from the power brick, the display is back to life.

From reading through comments made by others in both forums, and scanning over the power adaptors page, I’m forming the following conclusions. (Note: these are my guesses based only on my interpretation of other’s anecdotal evidence rather than anything authoritative).

1. I suspect the middle pin is used only to allow the monitor to sense which of the 3 Apple power-bricks is attached. If so then it seems more concerned with protecting the monitor from a low power brick, rather than from being overloaded somehow.

2. A number of people have indicated that simply replacing the brick like for like or with the higher power version makes no difference. This suggests to me that the fault is within the electronics of the monitor, when detecting the power source at switch-on, rather than in the brick.

So while this is far from an ideal solution, it is cheap, simple and quick to implement compared with trucking everything back for repair. However if in doubt, get it repaired by Apple – don’t blame me if your house burns down.

switched to svn via https on mac os x

I finally decided it is time to switch to accessing subversion repositories via apache and the https scheme rather than ‘file://’ scheme. Search revealed many articles touching the subject, but none providing exactly what I need. So documenting:

  1. The problem and motivation
  2. Up to date?
  3. Getting apache to serve https
  4. Configuring apache to serve subversion
  5. Migrating existing working copies to the new scheme
  6. Reference links to articles that helped

Problem and motivation

My main development machine is a Mac Pro running 10.6.4. My development projects are all kept outside my home directory on a second disc, one project per folder. Each project folder contains a subversion repository folder named ‘svn’ along with one or more working copies.

For the last few years I have checked out working copies using the ‘file://’ protocol. This seemed the simplest and most efficient approach in this single-user environment. I use svn clients such as SvnX, and Subclipse and occasionally the command line (for which having the svnbook to hand is a must). I have groaned previously about DreamWeaver’s subversion integration ‘attempt’ failing to support the file protocal (remains unchanged in CS5).

There are a couple of things I want to solve:

Firstly, I occasionally use VisualStudio in Windows7 running in parallels on this machine to work with ASP.NET. In the past I’ve simply pointed it at the working copy via the network drive. Of course this means that I can’t undertake svn operations through Win7 since that working copy’s URL is alien to the Windows 7 instance. Not too much of an issue since it’s only a matter of switching back to a Mac window to do svn business. However there is an annoying problem with VisualStudio’s code completion where it is unable to correlate markup within an .aspx file with it’s .aspx.cs file when the site is on a parallels network drive. To solve this I need to check out a working copy to the Windows7 local disk.

Second, I have taken to getting out and about with my MacBook Pro. If I want to work on the move I need to check-out a working copy.

For both these situations using the ‘file’ protocol is inappropriate. Attempts to check work back in are bound to generate svn errors as multiple svn systems attempt to obtain exclusive locks on the repository.

If however we can get to a single user/process touching repository files we can solve this problem – enter apache.

Up to date?

First thing I did was get my subversion installation up to date. At time of writing 1.6.12. Installer available from CollabNet. Just run the installer and follow the instructions. Note: this version installs into a different location to that installed by Apple. You may need to tell your client tools the location of the subversion to use.

That said, this isn’t going to help with DreamWeaver all that much. DW’s Subversion functionality is tightly tied to specific versions. Should you dare  touch a working copy with a later version (which changes some of the meta data) DreamWeaver will cease to work with that working copy. More information at this Adobe technote. So for now as far as I am concerned, until Adobe start releasing ‘upgrader extensions‘,  DW’s subversion functionality remains useless and turned off with ‘.svn’ files cloaked and svnX used for commits.

Getting apache to serve https

In the short term I have no plans to open access to my repositories via the net. However it is a future possibility so I think it worth getting going with https from the outset is worth it.

Mac OS X of course uses Apache for web-sharing. However it’s default state is not configured to serve SSL. To do so, we need a secure certificate and some configuration changes. As I am the only person accessing this machine, and I trust myself, I have no need to obtain a certificate from a commercial authority.

Steps taken to create the certificate and configure apache to use it…

Create a certificate authority

mkdir /Library/Certs
cd /Library/Certs
perl /System/Library/OpenSSL/misc/CA.pl -newca
[ENTER](to create new certificate)

Generate private key

openssl genrsa -des3 -out webserver.key 1024

generate a non-password protected copy of the key

openssl rsa -in webserver.key -out webserver.nopass.key

Generate a certificate request

openssl req -config /System/Library/OpenSSL/openssl.cnf \
-new -key webserver.key -out newreq.pem -days 3650

Sign the certificate request

perl /System/Library/OpenSSL/misc/CA.pl -signreq

You should now have created…

/Library/Certs/demoCA/
/Library/Certs/newcert.pem
/Library/Certs/newreq.pem
/Library/Certs/webserver.key
/Library/Certs/webserver.nopass.key

Tell Apache to include SSL

We now need to edit apache’s httpd.conf. You need to ‘sudo’ to acquire sufficient privileges to do so, and need to take care. Optionally make a backup copy of httpd.conf.

cd /private/etc/apache2/
sudo cp httpd.conf httpd.conf.bak
sudo pico httpd.conf

Find the following line and uncomment it by removing it’s # prefix

Include /private/etc/apache2/extra/httpd-ssl.conf

Use CTRL-O then CTRL-X to exit pico and we now need to edit the file we just included…

cd extra
sudo pico httpd-ssl.conf

Go through the file finding the following attributes ensuring they are uncommented and point to the SSL files we just created…

SSLCertificateFile "/Library/Certs/newcert.pem"
SSLCertificateKeyFile "/Library/Certs/webserver.nopass.key"
SSLCACertificateFile "/Library/Certs/demoCA/cacert.pem"
SSLCARevocationPath "/Library/Certs/demoCA/crl"

You should now be able to restart apache either through System Preferences… > Sharing > Web sharing, or

sudo apachectl graceful

You can access any errors via the Console application. If all is well you should be able to enter https://localhost/ into your browser’s address bar and get a result.

Configuring apache to connect to and serve subversion

Firstly, we are going to require a login. In my case I am going to create 3 login IDs. One for my normal workstation. Others for access via Win7 and my MacBook pro. So although all the work in the repro is by me, I can see which environment was used.
To do this, we will create an authorisation file containing the three users and place it somewhere sensible. For me…

cd /Volumes/projectdisc/projects
mkdir subversion
cd subversion
mkdir authfile
cd authfile
sudo htpasswd -c svn_passwd mpuser
sudo htpasswd svn_passwd mbpuser
sudo htpasswd svn_passwd win7user

you should now have svn_passwd contianing 3 users and their password hash strings. Returning to apache configuration, you may have noticed that the last line of httpd.conf reads…

Include /private/etc/apache2/other/*.conf

This includes, in alphabetical order, any further files ending .conf in the subfolder ‘other’. We will use this to add a svn.conf file to that folder…

cd /private/etc/apache2/other
sudo pico svn.conf

Will open an editor with empty/new file svn.conf. The first line of which will be:

LoadModule dav_svn_module /usr/libexec/apache2/mod_dav_svn.so

After this, we will add configuration blocks, one per project repository…

<Location /svn0000-svntest>
DAV svn
SVNPath /Volumes/projectdisc/projects/0000-svntest/svn
AuthType Basic
AuthName "subversion"
AuthUserFile /Volumes/projectdisc/projects/subversion/authfile/svn_passwd
Require valid-user
SSLRequireSSL
</Location>

Using keys ctrl-o then ctrl-x will save the new file and exit pico.

This configuration block tells apache to redirect svn0000-svntest to the repository at path /Volumes/projectdisc/projects/0000-svntest/svn. It requires a valid user authenticated against the file at /Volumes/projectdisc/projects/subversion/authfile/svn_passwd. Since this location will only ever be served through SSL, basic AuthType is ok and secure.

For apache to pick up this change, we need to restart it:

sudo apachectl graceful

One further step we need to make is to ensure apache is the only user/process to have control of the repository files. This shouldn’t be an issue as we are migrating access to be always via https and don’t want the file protocol used any more…

cd Volumes/projectdisc/projects/0000-svntest/
sudo chown -R www:www svn

At this point you should be able to access the repository through your browser with url http://localhost/svn0000-svntest

You will receive an alert indicating that the certificate is not trusted. You can tell safari that it should always trust this certificate.

To add further repositories, we simply need to change ownership as above, then add the detail to the configuration by simply duplicating the code block above with the Location text and SVNPath modified accordingly. The rest can remain as is.

Migrating existing working copies to the new scheme

My existing working copies each use the file:// url scheme. We need to convert them to use the new https scheme. This is pretty easy assuming you already have the Location added to svn.conf. Just cd to the working copy folder, use svn info to reveal the working copy’s url and relocate…

cd Volumes/projectdisc/projects/0000-svntest/wc
svn info
svn switch --relocate file:///Volumes/projectdisc/projects/0000-svntest/svn/trunk/wc https://localhost/svn0000-svntest/trunk/wc

If you are prompted that the certificate is invalid, use option p to permanently trust the certificate.

Reference links to articles that helped

Reading the following, articles that helped me work out what I wanted to do…

Along with chapters 3 and 10 of Subversion Version Control: Using The Subversion Version Control System in Development Projects ISBN-10: 0-13-185518-2 also on Safari books online.

hello desire

So, it’s good-bye to my trusty and slightly crumbling Nokia 3100 (recently a source of amusement and pity amongst my peers)…

Nokia 3100

Hello HTC Desire…

HTC Desire Unboxed

It could so easily have been hello iPhone. I do have iPod Touch which I enjoy using. But fundamentally as a Flash/ActionScript/Flex/AIR developer it made no sense at all to get a smartphone on which Flash has been nobbled.

(My own brief comment and observation on the iPhone/Flash debacle : It looks to me that both companies have incompatible business strategies with regard to delivery of RIAs on mobile devices. Discussion outside of the these strategies is in my opinion a deflection. It was disappointing to read Steven Job’s thoughts on Flash, which to my mind are ill-informed and based on half truths – out of character in those regards. It was also disappointing to watch Adobe CEO Shantanu Narayen’s response in interview with the Wall Street Journal where, in my humble opinion, he was far from convincing and by the end was sounding more like a parroting politician. Disappointing too that past quality and performance issues with Flash player gave Apple an easy ammunition to exaggerate and exploit. As an avid Apple Mac and Adobe Creative Suite user I hope the two companies can return to a professional relationship which doesn’t leave customers of both companies, like myself, out in the cold.)

So back to the HTC Desire, some first impressions…

The good

  1. It looks good, feels good
  2. Nice bright responsive screen
  3. Call quality is good
  4. Better quality camera than I expected
  5. The main reason for getting this device – Flash based apps are allowed!

The not so good (compared with my iPod Touch experience)

  1. There are too many buttons. I find myself pressing the wrong one most of the time. Sometimes a button press is required. Sometimes not. The whole thing is less intuitive than the iPod Touch with it’s single button.
  2. It seems all too easy to initiate a call at random while scrolling through the contact list.
  3. Text selection/cursor positioning is awful
  4. There is no out of the box easy way of syncing Address book, Calendar, tunes, photos etc with my Macs. Looks like I need to purchase Missing Sync. That said, I did previously purchase Mobile Me to keep my Mac / Mac Book Pro and iPod Touch all in sync.
  5. The Mail application is crap. I use a self-signed SSL certificate on my mail server, so I immediately hit the problem of a silent fail when trying to add connection details to the mail application. The hack in the forum thread worked in fixing it, i.e. turning off my router’s WAN connection, while inputting the connection details. Also it doesn’t list the mail folders on the server – all I get is the inbox. Apple’s Mail app by comparison is a doddle and reflects the structure of my mail account.

Fingers crossed for Android 2.2.

Anyway, looking forward to setting up some kind of tether to share the data connection with my MBP and more importantly getting something running in AIR for Android on there.

Persits AspUpload, Content-type and Safari

A quick note for anyone using legacy server-side classic ASP and the Persits AspUpload component‘s sendBinary to download files to Apple’s Safari browser.

I ran into a problem recently where by Safari was appending “.html” to the file name of all downloads sent via the component. e.g. test.pdf would download as test.pdf.html. There are a couple of mentions on the apple support forums:

PDF files downloaded directly did not suffer this problem – suggesting that the server’s mime types seem ok. Other browsers did not suffer this problem. However the problem has to be server-side. i.e. the download via the script is being sent with Content-type text/html instead of application/pdf no matter what arguments I add to the sendBinary call.

The solution seems to be to manually set the script’s Response.contentType value. i.e. the following test script works…

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
    FILEPATH = "D:\WWWRoot\sitepath\www\pdftest\TEST.pdf"
    Dim upl
    Set upl = Server.CreateObject("Persits.Upload.1")

    Response.ContentType = "application/pdf"

    upl.sendbinary FILEPATH, True, "application/pdf", True
%>

In my case this is using AspUpload version 3.0.0.2 on a Hostway Windows 2003 Gold plan, shared hosting.

flash in the pan

So, Flash player 10.1 is available in beta and includes mobile device oriented new features such as multi-touch gestures. Smart! Makes sense with Adobe strategy of delivering to emerging mobile devices. However there are a few million of us already using desktops and laptops with track pads, mouse wheels and mouse trac-balls who are feeling a bit ‘inhibited’. Flash is being used more and more to deliver applications either via browser or the AIR runtime. Such applications immediately feel somewhat inferior when a user cannot scroll or pan a view as they normally would native applications. Arguably ‘Rubbish’ rather than ‘Rich’ RIA in such cases.

For a long time the MOUSE_WHEEL event has been part of the Flash API but only officially supported on the Windows platform (in browser). Original reasoning for not implementing support for the Mac platform can no-longer be argued as all Macs for a number of years have been shipped with the Mighty Mouse (2005) and now Magic Mouse or Trackpads. All of which facilitate mousewheel style interactions. All of which go further and support horizontal as well as vertical scrolling interactions or ‘panning‘. There are JavaScript workarounds for in-browser Flash on a Mac such as this solution on hasseg.org or this SWFObject based pixelbreaker solution. Fortunately Flash applications delivered via the AIR runtime can respond to MOUSE_WHEEL events without any such workarounds. However MOUSE_WHEEL currently only facilitates vertical scrolling in any case.

We need to facilitate horizontal as well as vertical scrolling (panning) of content in response to events from ubiquitous input devices.

A few prominent applications I use often, which suffer:

  • TweetDeck : AIR based. High discoverability of lack of horizontal scrolling support
  • Adobe online store UK : In browser Flex application – Flash being used in an attempt to emulate HTML – no vertical scroll wheel support for Mac users
  • Adobe Flash builder : Design view (Java application with Flash based view)
  • Adobe Catalyst : Art-board view (Java application with Flash based view)

Adobe actively invite comment and suggestions on their products. More widely/easily through the Feature request/bug report form. They have opened up the bug tracking system for a number of products. Flash player being one of them. There is an active bug report with regard to this issue and I would encourage anyone with an opinion to contribute to the discussion and/or add weight by voting. Just sign up and access FP-1262. There is an active drive from within Adobe to help from the community to improve the quality of Flash Player and AIR.

As for the solution I think I’d like to see something along the lines of… Extending the flash.display.InteractiveObject with a ‘panEnabled‘ boolean property defaulted to false which, when true, allows the object’s Panning behaviour/event broadcasting (akin to doubleClickEnabled mechanism). So, when panEnabled is true, if the mouse pointer is over the InteractiveObject, and the user makes a ‘pan’ gesture, the frontmost panEnabled InteractiveObject broadcasts flash.events.MouseEvent.MOUSE_PAN events containing with the additional properties : offsetX and offsetY. Text based InteractiveObjects should default to panEnabled = true. Further, I’d quite like to see mechanisms to facilitate behaviours of nested pan-able objects. E.g. on a Mac, the front-most display object gets scrolled until it can scroll no further, then if the user continues the scroll input, the containing display object then scrolls.

In rounding up, the best place to contribute your opinions on this subject and have them heard by Adobe is here : FP-1262.

MacPro early 2008 video card dies

A couple of months ago, during a particularly busy period of work, I started to suffer some quite strange symptoms with my MacPro. Essentially, ‘sometimes’ if the system went to sleep, it was not possible to properly wake it up. It was apparent that the machine was starting up, but there was no video signal to either of the two monitors attached. One being an Apple 23 inch LCD. The other being an old CRT. The only way to get back to a working condition being to force-shutdown and restart the system.

My first suspect was one of the monitors – possibly the LCD. But trying them individually and swapping the connectors over made no difference.

The next suspect being the video card. Taking a look inside, there was a shocking amount of dust build up. I removed the card and gave it a good clean. Unfortunately this didn’t solve the problem. Over the next few weeks the occurrence increased in frequency to the point where one Sunday, after 7 or 8 reboots, it was time for more drastic action.

ATI Radeon HD 2600 XT

I had found a discussion on the Apple support site which echoed the symptoms and seemed to confirm the video card being at fault. My Mac was out of warranty and I needed it working for the next day and so trekked to the Regent Street Apple Store. Really busy store – the worse part was trying to get the attention of a member of staff. But then it was plain sailing. I explained the issue. While he suggested it might make sense to bring in the Mac to be checked – doing so would have been a real pain, run up cost and taken ages. I was pretty confident in my diagnosis. The only option available was an upgrade – which I was pretty happy with. From reading the rest of the support discussion I really didn’t want to replace like with like.

So, £300 lighter I trekked back home with a Apple Mini-DVI to DVI Adapter and a 512Mb ATI Radeon HD 4870. Very releived that the item was in-stock.

It dwarfs the old card, taking up two slots and full width. Installation was not too hard. The worst bit trying to connect the extra power cables to the mother-board.

ATI Radeon HD 4870

Closed the machine and restarted. The new card was picked up immediately. No installation of drivers required. Note: I had been a little worried that drivers may be required as I had previously considered upgrading to  an NVIDIA® GeForce® GTX 285, for which I read that it was vital to install the drivers prior to installing the card. Something difficult to achieve if the old card is dead!

Summing up – very happy so far with the new ATI Radeon HD 4870 which has been running faultless for the last couple of months, and looking forward to more software making user of the GPU, particularly from the likes of Adobe.

Editor bug in Mac OS X 10.6.1

UPDATE 22 June 2010 : Further to my even earlier bug report (FB-9398FlashApe has posted a work around by changing a Snow Leopard system preference.

UPDATE 10-Dec-2009: I’m pretty convinced now that this is an editor bug, not a Mac OS X bug. Essentially the editors are using default OS behaviour which I think is tailored for natural language editing rather than programme-code editing. Original post follows…

I’m currently finding in some applications that “word1.word2.word3″ is being treated as a single word as far as the Option-Left Arrow and Option-Right Arrow is concerned on my Mac. This keyboard shortcut should hop word by word. But currently hops from one end to the other. Not an issue for most users, but pretty serious for a programmer working with dot-notation syntax.

I first experienced this working with ActionScript in Adobe’s Flash Builder Beta 2 and logged a bug report, but further investigation reveals that some unrelated applications show the same behaviour. I have now logged a bug with Apple, but in the meantime I would be interested to know if others are experiencing the same? Or if you are running 10.6.1 and not seeing this issue? Please add a comment – I’m still trying to work out if it is something installed on my system. I don’t think it is basic user preferences as I am seeing the same in another user-account on this system.

Editors incorrectly treating “word1.word2.word3″ as a single word re opt-left and opt-right:

FlexBuilder 3 MXML and AS editors
FlashBuilder 4 Beta2 MXML and AS editors
Apple Mail
Apple OS textfields including:
Spotlight
Finder window findfield
Safari: form-textfields + google search field
editors with *correct* opt-left opt-right behaviour
TextWrangler
Adobe Flash CS4 IDE ActionScript Editor
Adobe DreamWeaver CS4 editor
Apple XCode editor
Apple Finder – filename clicked and editable when renaming
Firefox form-textfields and goodle search field
  • FlexBuilder 3 MXML and AS editors
  • FlashBuilder 4 Beta2 MXML and AS editors
  • Apple Mail
  • Apple OS TextFields including:
  • Spotlight
  • Finder window find-file
  • Safari: form-textfields & google search field

Editors showing correct opt-left opt-right behaviour:

  • TextWrangler
  • Adobe Flash CS4 IDE ActionScript Editor
  • Adobe DreamWeaver CS4 editor
  • Apple XCode editor
  • Apple Finder – filename clicked and editable when renaming
  • Firefox form-textfields and goodle search field

No CMD-SPACE in Flash Builder since Snow Leopard

Ok so CMD-SPACE is the default short cut to launch Spotlight. But I wanted that combo for ‘content assist’ with Flex/Flash Builder. Until installing Snow Leopard, that is what I had for a few years, and Spotlight relegated to CTRL-SPACE. However since SnowLeopard, the CMD-SPACE combo is not transmitted to Flash Builder. I assume this is down to Snow Leopard somehow reserving the combination. So begrudgingly I have returned to defaults…

Spotlight : CMD-SPACE
Flash Builder content assist : CTRL-SPACE

flash.display.BitmapData gotcha – well gotme for a while

The documentation is correct, so i have no excuse, but I didn’t initially read much beyond the signature of the constructor…

public function BitmapData(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF)

I needed a transparent bitmap. Reading the default “transparent:Boolean = true”, I assumed by simply supplying width and height, a transparent bitmap is what I would get. Not so! I got a white rectangle. The reason being, that the default fill colour is 100% white. (The first pair of FFs representing the alpha in ARGB).

At first it would seem slightly unintuitive for the second default to conflict with the first, until one realises that the ‘transparent’ flag is there to indicate whether the object will support transparency or not. Not to state that it should be initially created transparent. Supporting transparency increases data size from 24 bits per pixel to 32 bits per pixel.

So what i should have done :

bmd = new BitmapData( width, height, true, 0 );