Archive for the ‘Mac OS X’ Category.

initial gripes with new Flash CS3 ui

I know – I’m turning into Victor Meldrew. I can’t seem to help it. Should Adobe sort out the current licensing and pricing nightmare I’m going through, I’m sure I will become more chilled.

While others have been hung up on the new icons, personally I have no issue with them. They remind me of Rowntrees Tooty Frooties – which is not a bad thing! My issues (admittedly minor) are with some of the work on the new user interface.

I can appreciate the general investment in improving the UI. However I find some of the additions odd, and on my system some seem poorly implemented?

1. Introduction of Windows style controls on the Mac.

Most of the palettes introduce a collapse control (-) and close control (x) in the top right-hand corner. Mac convention is for the close control to be top left control and in both cases I think aqua controls and positioning would have been better – more consistent with other (non Adobe) applications.

I also find it strange that most palettes introduce this new arrangement, but other ‘windows’ retain the standard Mac behaviour (e.g. document windows and the control window). Mixing it up in this way just feels odd.

DebugController

2. Palette drag

When dragging a palette, it will go semi-transparent. Potentially useful – being able to see what will be covered up before dropping the palette into position. This is also part of the softening of the UI and should enrich the user experience. But on my system, when the mouse is released, the palette disappears briefly before being re-drawn opaque. This ‘flicker’ when a palette is released is plain ugly and detracts hugely from the user-experience. Until it is fixed I would have rather not bother with semi-transparent efforts.

I guess this might be an issue with my system being quite old? (Mac G4 Dual 1GHz Mirror).

3. Welcome panel links to the Adobe site are not working as intended

I think this is just an issue of the Adobe site not having been updated to service the links. You’ll find that from the Flash Welcome window, clicking on either “Getting started ››” or “New features ››” simply dumps the user at the flash product page. The problem seems to be server-side. The pages which flash attempts to take you to, simply re-direct back to the product page.

We fare slightly better with “Resources ››”. However most of the content on that page is written for FlashMX 2004 or Flash 8. I think by now there should be some CS3 articles on there.

Hopefully that’s the end of today’s grumpiness. Although I just read the SaveAs Gotcha written up by Aral. 🙁

Apple Security Update 2007-004 stuffed my Mac

Ok, this may be guilt by association, but since allowing this update to install last Friday, I have experienced serious problems. Many other folks around the web have reported problems with this update, but I haven’t yet found any postings covering the issues I encountered.

In recent years, I have been of the opinion that it is best to keep up-to-date with the latest patches, as the security risk of not being patched out-weighs the risk of the patch itself causing problems. This is the first time I have had cause to doubt this approach.

This entry attempts to describe some of the problems and the efforts I made to fix them. However I should probably have done this from the outset and saved myself a lot of time. I still have some residual problems, but the worst of it seems over. Note: None of this constitutes advice. Repeat any of my actions at your own risk.

The machine concerned is a Mac Dual 1GHz G4 Mirror.

My user data, and work data are all regularly backed-up using Retrospect, and I keep all my work data on a non-system disk. So I was able to tinker around confident in the fact all my important data is protected. However I don’t currently back-up the system or applications. The theory being that they can be restored by a fresh install of both the system and applications. That said, it would take a long time!

The symptoms…

  1. Firefox would crash almost immediately on launch
  2. FontBook crashed immediately on launch
  3. Most other applications would ‘unexpectedly quit’ after a few minutes operation. Such applications include:
    1. Safari
    2. Mail
    3. DreamWeaver
    4. Terminal
    5. TextWrangler
    6. The Dock !!!

Re-installing Firefox had no effect. It still crashed at the point after rendering the Mozilla title bar in the default site.

However, of these (3) is the most serious. Apart from anything else, crashing applications degrade document data over time. My first instinct was to think this may be due to a hardware problem, specifically failing memory?

I ran Apple Hardware Test a number of times, after-which I was relatively confident that the memory was ok. No problems were reported.

Using the Console utility to view the crash reports, it was clear that the applications where crashing each with the same instruction…

Exception: EXC_BAD_INSTRUCTION (0x0002)
Code[0]: 0x00000002
Code[1]: 0x902d6690
Thread 0 Crashed:
0 ATS 0x902d6690 AnnexFileFlushUnusedAnnexEntries + 24
1 ATS 0x902d5f54 ActiveContainerTimerFired(__CFRunLoopTimer*, __CFDictionary const*) + 248

I had no idea what ATS was at this stage. But stands for Apple Type Services. There are various MacFixIt articles describing some fixes with respect to ATS cache files. So I did spend a whole load of time as Super User in Terminal, deleting / moving the cache files and restarting to see if there was any difference – there was not!

I later read that starting in Safe Mode should effectively clear the user’s ATS cache, and only activates system fonts. However even in this mode, applications continued to crash in the same way.

My next consideration was that I may have a damaged font? So I ended up paying to upgrade my Suitcase X1 to Suitcase Fusion which includes FontDoctor. (My old copy of FontDoctor simply quit immediately when trying to launch it with the system in this state.) The new FontDoctor did run and did find fault with two of the system fonts – something to do with a finder flag. These were repaired. That solved the problem with regards to FontBook crashes. The remainder of the crashes continued.

The only thing that worked…

I downloaded and installed “Mac OS X 10.4.9 Combo Update (PPC)” from the Apple Downloads page. BUT! My first attempt was to do this on the machine concerned. Big mistake! The install failed, and at that point the machine would not shut-down normally nor would it fully start-up again when re-powered.

Fortunately I had an old G3 PowerBook to hand. Combined with a FireWire cable, I restarted the G4 in Target mode and re-installed the combo update onto the G4’s system drive from the PowerBook. (That’s the first time I’ve used Target mode and I’m well impressed – really useful)

This worked. I no-longer have applications crashing. Firefox now works fine. OpenOffice still failed, but once that had been re-installed, that is now working fine.

Residual problems…

There are still some residual issues I need to track down. For instance I can no-longer connect to my Windows server through SMB. It gives error type -50 – what that means I have no idea.

I can also see that I continually get errors I suspect from my use of RSS in Safari which seems to occur for each feed I am subscribed to.

2007-04-24 12:21:29.002 SyndicationAgent[410] WARNING: BestCalendarDateFromString – can’t interpret: ‘Tue 24 Apr 2007 03:12:14 -800’

In future…

  • Maybe it is time I started backing up the system and applications in addition to my home dir and projects drive – allowing me a quick revert should this kind of system update mess things up again in future.
  • Maybe I should give an update a week or so for brave soles to try out, before adopting it myself.

UPDATE 30/4/2007: Today I re-installed the security update. Doing so did not re-introduce the problems described above, and seems to have solved one of the residual problems: I can once more connect via SMB.

i finally hot-fixed flex builder

The hotfix was published a few weeks ago. I had been suffering the debug problem on the Mac (193086), so it was time to apply the fix. (NOTE: Unless you are suffering any of the problems listed you are adivsed not to bother applying this fix)

I found the instructions more confusing than they needed to be. They essentially boil down to ‘make a backup copy of your current installation prior to applying the fix’. This is kind of vital, because if you do a straight replacement of the old “Flex SDK 2” folder with the fixed version, and you happen to use charting, you’ll find that the charts.swc is missing!

Also you need to be aware that first time you run the application after the fix, you will need to re-enter your serial numbers.

apollo book available for download

“Apollo for Adobe Flex Developers Pocket Guide” available to download here.

Includes a link to get it from Amazon. Personally I prefer to have the printed document at my side. This book at 108 pages, is just about small enough to print at home, and with 2up full duplex I get four document pages per sheet of A4. However without introducing some scaling, you will end up with tiny text surrounged by huge white margins.

Which brings me to something of bug-bear with Adobe Reader on the Mac. It doesn’t allow me to do a sensible print preview. Nor does it give me the level of control over the print that I require. Fortunately this book renders correctly in Apple Preview. From which setting scale to 140% in page setup, then printing layout at 2 per page, full duplex gives me good results!

So all that remains is to get hold of the Apollo alpha. Watching this space. (Update: download now available)

apple update includes flash player (9.0.28)…

If, as suggested by JD’s post, the latest Adobe Flash Player will continue to be included in Apple System updates, this can only be a good thing for shoring-up and keeping the installed base current.

Unfortunately this morning’s update trampled over my debug player (already at version 9.0.28) replacing it with the standard plug-in. This is going to hit loads of developers similarly. It would be nice if Apple could add a rule to the updater to respect the presence of the debug player. That said, it isn’t a big deal to simply re-run the player’s installer from the Adobe Flex Builder 2 ‘Player’ folder.

a shakey first few moments with 2.0.1

I had a scary first experience with the Flex Builder 2 (2.0.1) Trial on the Mac, after having commenced a project using the Beta…

Before installing, I was aware of the following bullet in the release notes

Opening old Flex projects – The Flex Builder 2.0.1 update cannot open projects that were created with pre-release versions of Flex Builder 2. Flex Builder 2 beta-level projects must be recreated in Flex Builder 2.0.1.

So I zipped a back-up copy of my project files.

On installing and launching 2.0.1, I was suprised that my existing projects seemed to open ok. But ‘cleaning’ the project had the effect of removing the html files. Additionally seemingly spurious errors were generated on compile. The first being 1023: Incompatible override.

I keep my project files on a seperate disc away from the default location. So I deleted the folder and restored just my source files from a zip and recreated the project in builder 2.0.1 – still no joy. In-fact even creating a new application project with only the default stub resulted in errors reported at lines which didn’t exist. (Similar to these reported issues on Flexcoders).

I found the issue to be primarily that the 2.0.1 Builder looks for the same workspace files as the Beta – and they aren’t compatible. The solution…

Rename the existing “Flex Builder 2” folder to “Flex Builder 2 Beta” to accurately reflect the builder that created it. (Just to ensure you can revert to using the Beta if you need to – which I thought would be a likely prospect if my experiment failed) On the Mac:

/Users/username/Documents/Flex Builder 2
becomes
/Users/username/Documents/Flex Builder 2 Beta

(Note: for Flex Builder 2 Beta to pick up it’s workspace again, you need to choose “File>Switch workspace…” from the menu. Not that you’ll want to go back to the beta, once you have 2.0.1 running properly.)

Then when launching the 2.0.1 version, the “Flex Builder 2” folder will be re-created but this time containing a 2.0.1 compatible workspace. You can then start creating projects, porting your old source files as you see fit.

All the spurious errors are now cleared, and proper html files created. So far looking good with improved performance over the beta!

New flex dot-one, one day away

In case you missed it we have a new Flex dot release (2.0.1) due in the next 24 hours. Very significant for us Mac users – time to get the full version and pay for it!

I was hoping that there might be a simultaneous Apollo release. But while this version introduces development support for Apollo, the beta version seems to have a way to go yet.

More detail of the new features here.

Anyway, “Ted On Flex” seems excited! (A blog worth signing-up to if you are interested in Flex)

Flexciting

It’s seemed like a longer wait than it was, but finally the Flex 2 Beta for Mac OS X is here. Posted on Adobe Labs on 23rd October.

Just in time for my next project which will be ActionScript 3 based and hopefully ready in time for Apollo. Flex seems like it will provide a better development environment than the Flash 9 Alpha.

Mac OS X batch xhtml validation

While many development tools include report generators capable of testing the validity of your xhtml site wide, they can only act on the code they are aware of. Where pages are dynamically generated using server-side scripting such as ASP / PHP etc, the only real way of testing the resulting xhtml is to test the content at run-time. The w3c validator is a handy tool for doing this, but it can become tedious to use interactively across a large number of files or test-cases. Additionally, if the site files are part of an extranet, or carry confidential information, you won’t want to be pushing the content out to a public service for validation.

An approach I use from time to time is to batch test site files on an internal network. To do this I use the following tools…

  • w3c validator
  • wget
  • awk (this is already on your system)

There is a small amount of work to do in setting up your system for this approach.

1. Install the w3c valdidator locally

Apple have produced and maintained an excellent article on how to install the validator onto your Mac OS X system. However I found a few areas which at time of writing were not accurately described…

  1. The Base code and the DTD Library downloads are gz files not tar files. This means the 2nd and 3rd lines of the instructions will not work as written. If of-course you double-click the downloaded files on the desktop, they will first expand to the tar file, then expand to a folder on the desktop. At which point will now have the following files and folders on your Desktop:
    1. sgml-lib.tar
    2. sgml-lib.tar.gz
    3. validator.tar
    4. validator.tar.gz
    5. validator-0.7.2 (folder)
    6. validator-0.7.2 2 (folder)
  2. validator-0.7.2 2 actually contains the expanded content of the sgml-lib.tar.gz file and contains a htdocs folder itself containing a sgml-lib folder.
  3. The instructions also seem to fail to inform you where to place the sgml-lib folder. It is apparent from the validator.conf sample file, that the sgml-lib folder should sit inside htdocs. So before going further. just through the finder I copied the sgml-lib folder from validator-0.2.2 2 to validator-0.7.2/htdocs/
  4. We can now pick up the instructions on the 4th line which reads “cd /Library/WebServer/Documents”. The remainder of the instructions worked fine for me on Mac OS X 10.4.7
  5. To test your completed install, paste visit: http://localhost/validator/htdocs/

2. Install Fink Commander

As part of the process of installing the validator, you have installed Fink. Fink commander provides a GUI interface to Fink, I suggest you install it as the next step.

3. Install wget

Using Fink Commander, download and install wget. This is a command-line utility that we will use to automate the downloading of files.

4. Create a ‘batch’ file

OK, strictly speaking not a batch file, but a text file of urls for wget to request. We must first take our list of files and process the text for form suitable urls. For this I suggest the following steps…

In the terminal window, use the following commands…

Using the terminal window, navigate to your local webroot folder.To generate a single column list of all the files within webroot we can use the command…

ls -1

We can send the output of one command directly to the next command using the pipe symbol “|”. Ultimately we wish to create a file containing full urls to the files we want to process. So the next stage is to prefix the filenames with the start of the url. We can do this by ‘piping’ the results from ls into awk. Then finally directing the output to file sourceURLs.txt which will be created up one level so as not to infect the webroot. So on one line…

ls -1 *.asp |
awk '{printf"http://localhost/validator/htdocs/check?
uri=http://www.yourdomain.com/%s\\\n",$1}'
 > ../sourceURLs.txt

Note: Currently I don’t have style sheet control on this blog. The above 4 lines should be typed into your terminal as a single line.

5. Process the urls

  1. move up one level so your working directory contains both sourceURLs.txt and the webroot folder…
    cd ..
  2. create a new folder to contain the validation reports…
    mkdir validationReports
  3. change to that directory
    cd validationReports
  4. execute wget using sourceURLs.txt to create validation reports of each page
    wget -Ei ../sourceURLs.txt
  5. The current folder now contains one html file per validated file. Open them in your browser to check the results.

mac flash switch

I recently had the need to be able to switch player versions on the mac, and was very grateful to have found Mike Chambers‘ “Flash Player Switching on Mac” entry. Following the instructions in that entry may well be all you need. Be sure to read comments IV and V – they are important!

In my own set up I made a couple minor alterations to ease things in my own mind (to be read in conjunction with Mike’s article)…

  1. With respect to setting up the ‘soft-link’ or alias to “Internet Plug-Ins” I find an alias name of “InternetPlug-Ins” less likely to cause confusion than the more generic “plugins”. (Norton utils for example creates a “Plug-ins” folder within /Library)
  2. Similarly to avoid any confusion within the InternetPlug-Ins folder which in my case contains loads of files, I created a sub-folder “flashplayers” into which I placed the version folders.

So my resulting folder/file structure is as follows…

/Library/InternetPlug-Ins/
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt
/Library/InternetPlug-Ins/flashplayers/7
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt
/Library/InternetPlug-Ins/flashplayers/8
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt
/Library/InternetPlug-Ins/flashplayers/9
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt

The idea being that the three files currently in /Library/InternetPlug-Ins represent the currently active version of the player.

As my folder structure is different to that of Mike’s, my script is slightly modified…

#!/bin/bash
#
# Script to change the flash player
#
if [ $# != 1 ]; then
  echo "Usage: $0 name-of-player-version-dir"
  exit
else
  plugin_dir='/Library/InternetPlug-Ins'
  np_dir="$plugin_dir/flashplayers/$1"
  if [ ! -d $np_dir ]; then
    echo "$np_dir does not exist."
    exit
  fi
  cp -rv $np_dir/* $plugin_dir/
fi

Finally if you are not familiar with writing and running scripts via the terminal, two things to bear in mind…

  1. Placing your script file in a folder picked up by the path, will ensure it is available to you whatever is your current working directory. In my case I use the default tcsh shell and cfp is placed in my /Users/username/bin directory. This is added to the path in my via my .tcshrc file with the line
    setenv PATH "$PATH":bin
  2. Make sure you set the executable flag on the script file:
    chmod +x cfp