Gliffy : Web based version of MS-Visio done with Flex

August 5th, 2006 . by polyGeek

One by one our trusted Office apps are going web based. The latest I’ve seen is Gliffy - a nice little replacement for MS-Visio. (Read review)

So we have the word processor Writely; a spreadsheet app from Google Spreadsheets - which leaves much to be desired, the aforementioned Gliffy, and I’m sure many others that I’ve not heard of.

Personally I find Gmail to be the greatest competitor to MS. With the added feature that you can now use your own domain name through Gmail and of course Gmail has a built in calendar and chat client with voice capabilities.

What we are missing is a suite of apps all in one nice location where all the files are stored on a server somewhere. I want to keep my Photoshop files on the local hard drive just because they are typically very large but most everything else could be plopped into a server where I can access them from anywhere. I’ve already started using Adobe’s JamJar to store my Flash (FLA/AS) files so that I can work on them at home and work.

The question isn’t if but when someone will produce a serious suite of browser based Office apps. What I’m interested in is wheather it will be AJAX or Flex/Flash that takes control of the UI.


start true, stay false

August 2nd, 2006 . by polyGeek

If you have the need to set a Boolean to be true only if every condition is met but false if it fails just once then try this:

var test:Array = [true, true, true, false, false, true, false, true];
var isAllTrue:Boolean = true;
for(var i:Number = 0; i < test.length; ++i) {

isAllTrue = ( test[i] && isAllTrue ) ? true : false;
trace(i + ” : ” + isAllTrue);

}

Output:
0 : true
1 : true
2 : true
3 : false
4 : false
5 : false
6 : false
7 : false

Notice that part of the trinary condition is isAllTrue. That way if isAllTrue ever switches to false the condition will be false thereafter.

This instance isn’t a great example because in this case you would probably want to break out of the loop as soon as your condition was false. There’s no need to keep going through the loop.

If you find a more appropriate use for this snippit let me know.


zero = false

August 1st, 2006 . by polyGeek

I had written the following code:

if(indexNum) { . . .

“indexNum” was a number that corresponded to the clip that the mouse was over. If the mouse wasn’t over a clip then that number would be “null”. So I thought that conditional would work fine because I only wanted to run the code if mouse was over one of the clips.

I could have written: if(indexNum != null) { . . . But I like the conciseness of the former example.

The problem was that sometimes “indexNum” was equal to zero. When that happens the conditional asks: if( 0 ) { . . . Which is always the same as: if( false ) { . . . And that of course is always false.

It took me a while to figure out why my code didn’t work for the first - zero index - clip. So let that be a lesson to you. :-)