Journler code

for a while I’d been messing around with the source to Journler (that is, the part that’s available). The main goal is an iPhone port, and a way to sync w/the desktop client. To that end, I’ve made a decent bit of progress, but I need to clean up a bunch before I share it (and other things have taken precedence).

However, I’ve finally gotten the blessing of the author to put his publicly-available source code up on github, so here they are: JournlerCore, SproutedUtilities, and SproutedInterface. All I’ve put up so far is the unchanged original source; I plan on doing some basic cleanup of the code and so on.

a warning would be nice

package
{
	import flash.display.Sprite;
	
	public class Foo extends Sprite {
		public var bar:Object;
	
		public function Foo() {
			bar = 5;
			baz();
		}
	
		public function baz():void {
			var bar:String = "not 5";
			trace(bar);
		}
	
	}
}

What do you think the output is? “not 5”, as would be expected. But if you are stupid enough to do something like this (I was, after some refactoring), I would expect the compiler to at least throw a warning. Nope!

Also this is interesting:

public function baz2():void {
	bar = 2;
	var bar:String = "not 2";
	trace(bar);
}

does in fact throw this warning:

/Users/greay/projs/Test/Foo.as(19): col: 10 Error: Implicit coercion of a value of type int to an unrelated type String.

Helpful

The FlexEvent.CREATION_COMPLETE constant defines the value of the type property of the event object for a creationComplete event.

Sigh.