Subscribe to feed

Archive for the ‘Techniques’ Category

Everybody needs a lego moleskine. Comparison shopping at the UK Book Depository proved troublesome because they decided to cut the product title short, removing the information that actually differentiated the products being chosen:

Hard to tell which one to choose when everything you want to know about the choices is unavailable. Should I get the “Lego Y..” or, mmmmm, the other “Lego Y..”?

Compare to Amazon, who manage to fit the full name in without issue:

If you’re going to allow a certain number of characters for a value, assume all of those characters may be important at some point. And make sure somewhere on your interface you let them all get their moment in the sun.

Share

Frustratingly, my iPad calendar appeared to unilaterally decide that the first day of the week was Sunday. And there was no obvious setting to change it, like there is for Calendar on the Mac.

Turns out this “feature” is decided by Apple based on your region. They believe Australian weeks start on Sunday so that’s the way it is. To change the day, change your region.

For Australians wanting their calendar to start on a Monday:

  1. Launch settings
  2. Select General > International
  3. change region format to Namibia

This bizarre choice seems to have the best option for calendar setting, as well as changes it makes to keyboards (what currency symbol you see), date and time formats, even which google you default to when you search. Namibia appears to leave all the other settings “just like Australia”, and still default to google.com.au for searching in Safari.

Thanks to the clever chaps on the Whirlpool forums, particularly dokh22, for uncovering this. Now how long before Apple gives us a calendar setting to do it properly?

Share

Adding frame-by-frame animations to your iOS application is simple once you find out that a UIImageView can be initialised with an array of images, not just one image.

This post was inspired by a colleague who had not uncovered that fact, and so had spent time arduously linking separate views with timers. This post shows how to use a single view and 3 lines of animation code to do all the work.

What to do?

What we’ll do as a test is animate the blinking eyes on a tennis-playing ninja splash screen. To trigger the animation will add a “blink” button on the same screen.

Don’t ask how we ended up with that as the example (thanks to the friend). But you can download the entire project, or just the images if wanting to join in.

Share

Finally managed to download and install the IOS5 update for the iPad. Most of the new features are unobtrusive, although still trying to find some of them.

However what wins is the wireless synchronisation feature. Now I can update my library (songs, books, tv) on my computer and click Sync. And the iPad gets updated while not connected. While not even switched on. While in my briefcase in another room.

Sweet.

[Although I'll admit it's probably sweet because Apple kept us tethered for far too long!]

Share

I’m in the midst of collating a series of issues/quirks with UPK 3.6.1, hoping that Oracle are listening. While organising here’s a bonus item.

When I’m editing frame properties, don’t present a tooltip that has the unerring habit of appearing directly over the top of where I’m trying to type!! B!@#y annoying.

Share

Earlier I wrote about how you can use XML+XSL to get around the limitation in Sharepoint 2007 of sharing calendars across multiple sites. This technique stores your events as XML and allows you to publish entries wherever and however you wish.

This article expands that earlier introduction with some tips and tricks we collating when implementing this for one client:

  • working outside Sharepoint
  • presenting a URL
  • sorting items
  • grouping items
  • showing a message if a filter set is empty

Note: You can download sample XML and XSL here. These files show all the techniques described in this article.

the original XML filtered view grouped view
Share

Found the following beauty when on Youtube:

You shouldn’t have to invent your own language (“Favorited?”) to make your UI work.

Share

In a recent ePUB I got lazy. Rather than having separate XHTML files for each section I kept them in larger files and used HTML anchor and name tags to match them up. Problem is this doesn’t work.

What I had was one file per chapter, divided into sections. So my content.xhtml looked like this:

<h1>Chapter Title</h1>
<h2><a name="part1"></a>First Part</h2>
...
<h2><a name="part2"></a>Second Part</h2>
...
<h2><a name="part3"></a>Third Part</h2>
...

This was then accessed from toc.ncx as follows. Important link bits in bold:

...
<navPoint playOrder=11><navLabel><text>Chapter Title</text></navLabel>
  <content src="chapter.xhtml" /></navPoint>
<navPoint playOrder=12><navLabel><text>Part 1</text></navLabel>
  <content src="chapter.xhtml#part1" /></navPoint>
<navPoint playOrder=13><navLabel><text>Part 2</text></navLabel>
  <content src="chapter.xhtml#part2" /></navPoint>
<navPoint playOrder=14><text>Part </text></navLabel>
  <content src="chapter.xhtml#part3" /></navPoint>
...

None of these TOC links work when published as an ePUB (testing in Adobe Digital Editions).

Bit of digging (this helped) and testing, and issue is with the “name” piece. These are not recognised. Instead you need to use IDs.

The good news is you don’t have to change the toc.ncx references, or any other references to the sections. Only the targets need to change. Edit your content from:

<h2><a name="part1">First Part</h2>

To any of the following:

<h2><a id="part1"></a>First Part</h2>
<h2><a id="part1" name="part1"></a>First Part</h2>
<h2 id="part1">First Part</h2>

Obviously the third option (add the ID to the heading itself) is the cleanest. However the first option is the one easiest to implement via global search and replace. Which means it was the one I chose.

Share

One of the most annoying omissions in Sharepoint 2007 is the inability to share calendars between sites and subsites:

  • maintain a master calendar and view it (or part of it) in a subsite, or
  • maintain a calendar in the subsite and “roll it up” with other subsite calendars to a master view in the main site.

Apparently this is rectified in Sharepoint 2010 but if you’re unable to upgrade, and aren’t allowed to build your own webparts, you’ve to look elsewhere for a solution:

  • use a 3rd party webpart (can recommend the Bamboo Solutions offering having used it elsewhere), or
  • hacking together via the page viewer webpart (I never got this to work but your mileage may vary)

However this article describes a 3rd option we implemented which met the requirement by not using calendars at all.  Instead we used XML.

Share

Just had a frustrating issue in building a new ePUB where the validation (thanks Threepress) failed saying the OPF file was missing. Even though it was there clear as day in the source files.

If you do have an .OPF file but get this error, then the issue is not with this file at all, but with container.xml (which lives in the META-INF folder). This file does little more than point to your .OPF file. The error therefore arises if it points in the wrong direction.

In my instance the issue was caused by using an ePUB template/shell with a different default value for the filename and path to the .OPF. Note if I’d been paying attention the error message gives you all the information needed to resolve the issue since it reports a different filename for the .OPF to the one created. If they don’t match then container.xml is the culprit.

Here’s the all important line in container.xml. Make sure the name and match match your own construction.

<rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>
Share