Cell Phone Madness
So I am using a 5 year old piece of crap Samsung flip-phone right now, that cuts out on audio all the time. I basically just use it for text messaging. My previous phone, the Verizon/Audiovox XV6700 was still doing just fine, but the USB connector broke, and though I had done some soldering on it to get it to charge again, that too eventually failed.
So I am looking into getting a new smartphone, but I am having a hard time finding the right one. My primary uses are for reading ebooks, and texting. This means that getting the best display possible and a QWERTY keyboard are high priorities. A screen keyboard might be able to suffice, but isn’t ideal.
So there are 4 major smartphone OS’s that I can look at: Windows Mobile, iPhone, Palm’s webOS, and Google’s Android. I have experience with Windows Mobile, but I am well aware of its limitations, as I have done some development for it. The other 3 are basically on par with each other in that they are modern, being actively innovated and updated, and have better development possibilities.
The real limiting factor for me is that I really want to get an AMOLED display, which is the new hotness, top-of-the-line display technology. Samsung seems to be the major provider for devices using these screens. So right away iPhone and Palm are out, since their phones do not have these displays and other manufacturer’s can’t make them for them. If either of these did have an AMOLED display option, I would grab one immediately.
That leaves Android and Windows Mobile. Android again would be the preferable choice, but to-date their phone designs have been horrendous. New phones are ‘on the way’ but they either lack the AMOLED display, or they lack a keyboard.
The Samsung i7500 looks decent, but is missing the keyboard. And is most likely never going to be released by a US carrier…the bane of all decent cell phones.
Finally there is the rumored Samsung Omnia Pro, which will have AMOLED and QWERTY… but runs Windows Mobile…sigh.
I guess I can just get a hold-over phone sans contract and just wait another year til AMOLED is on the Palm/iPhone. Makes me sad though.
Adobe Flex PopupManager.centerPopup timing bug workaround
So I had timing bug when working on a project, where I wanted to launch a PopupManage popup to allow the user to change their password if a flashvar was set. The flashvar would be set in response to a link click from the user’s email.
The problem is that no matter what I tried I couldn’t get my popup to center if it was called from an event fired in the Application.applicationCompelete event handler. Basically, I have PopupManager.centerPopUp(this) in the creation complete event handler of the Popup up component, but for whatever reasons, the Application’s screen height and width were still set at zero at this stage, presumably because the screen hadn’t been drawn yet. I tried adding a callLater around the centerPopup call, but that didn’t work.
The fix was to put the callLater around the initial dispatchEvent call in the applicationComplete handler. This provided enough of a delay for the screen to be set properly.
if(parameters['password_reset_code'] && parameters['password_reset_code'] != '') {
callLater(function():void {
var pw_reset_evt:GenericEvent = new GenericEvent("PASSWORD_RESET_CODE", parameters['password_reset_code']);
dispatchEvent(pw_reset_evt);
});
}
There really should be a ‘callIn’ method as well as the ‘callLater’ method. callIn would take a time in seconds or milliseconds to delay before calling the code, and would wrap the whole dynamic Timer object handling.
GenericEvent is just an Event wrapper with a ‘data’ field.
package com.vitrue.shared.events {
import flash.events.Event;
public class GenericEvent extends Event {
public static var EVENT_PREFIX:String = "GenericEvent";
public var eventType:String;
public var data:*;
public function GenericEvent(type:String, data:Object) {
eventType = type;
super(EVENT_PREFIX + type);
this.data = data;
}
public static function EVENT(type:String):String {
return EVENT_PREFIX + type;
}
}
}