Posts tagged as:

jgenerator

JSwiff and Flash File Generation

September 26, 2005 · 1 comment

in Uncategorized

We had a great hacking session today, with Josh piped in over iChat and VNC from California, and King and I hunkered around his collection of Cinema Displays. We managed to replace our krufty jGenerator-powered flash file wrapper class with one based on JSwiff, in under a day.

JSwiff takes care of the nastiness of dealing with the .swf file format, and provides an extremely helpful XML intermediary – you can convert any .swf file to this xml format, modify the xml, then render back as .swf. Very handy for what we need to do.

Basically, all we do is a fancy search-and-replace for some custom tags (for things like the image – encoded in Base64 – and the tombstone fields for display on screen) in this intermediate xml file, then pass it into JSwiff and ask it to transform that xml into a swf that we can use in our finished presentation. It’s fast, and so far very reliable. As an added bonus, it appears to handle accented characters and such, which totally borked in jGenerator. Mavericks will look better now, once I regenerate all transformed assets.

And JSwiff doesn’t look like it will be affected by the scary deadlocks that made jGenerator basically useless for us. Yay, JSwiff! :-)

Even better, if this works out (it’s still being tested), then Pachyderm 2 is fully usable again, and on track for the October release!

{ 1 comment }

Fun with jGenerator

September 19, 2005 · 0 comments

in Uncategorized

We’re using jGenerator for the Pachyderm project – to replace the abandoned Macromedia Generator product – for wrapping images in .swf files for display within Pachyderm presentations. The .swf files provide value-add stuff like “tombstone” data, and a lightweight, unobtrusive form of DRM.

However, jGenerator has been rather neglected for 3 years now, and as a result it’s starting to show cobwebs etc… Remember my friend Murphy? Largely a result of these cobwebs.

Today, days after we thought we nuked the jGenerator problem, it came back in full force. Building presentations would occasionally hang (sometimes not reliably, or sometimes very reliably). We tracked down the problem thanks to the handy dandy java debugger jdb (handy document on using jdb in a running WebObjects app), and it was the result of jGenerator using java.awt.Rectangle classes rather than java.awt.geom.Rectangle2D.

The methods had been altered to use Rectangle2D in the signatures, but were actually passing around Rectangle objects instead. This apparently causes problems on MacOSX and other Unix-like systems, as was discovered by the OpenLaszlo folks. They had to start their own fork of jGenerator 2.2 to fix this (and potentially other) problems. We just did the same.

We had another round of Team Programming at a Distance – the three of us brainstorming and hacking and researching. That is soooo much more fun and rewarding than copying and pasting…

{ 0 comments }

Murphy won this round

September 9, 2005 · 3 comments

in Uncategorized

Today, Murphy made me his bitch. He totally kicked my ass and made me call him “uncle”.

You may have won this round, but I’ll bring it, punk.

I had promised to have a fresh build of the Mavericks website ready for final review today, but jGenerator chose this exact time to decide to pack it in. It’s not working consistently, and I couldn’t publish a complete section of Mavericks. I spent the entire day trying to track down the reason for an external library to suddenly refuse to work, when I believe that nothing had changed. Obviously, my assumption about nothing having changed is wrong. I know what I’m doing over the weekend.

To top it off, I am so fried from having burned midnight oil while juggling what feels like a bajillion simultaneous urgent! highest priority! NOW! demands, that I don’t think I was exactly productive/effective at tracking down the cause of the problem today. Felt much like I was watching someone drowning, in slow motion. I knew what I had to do, but the neurons just weren’t firing as needed, or perhaps in the wrong order…

Thanks a lot, Murphy.

{ 3 comments }