/*
	Small controller class used for the dialog sample.

Copyright 2009 Palm, Inc.  All rights reserved.

*/
var InvalidEventWarning = Class.create({
	
	initialize: function(sceneAssistant) {
		this.sceneAssistant = sceneAssistant;	
	},
	
	setup : function(widget) {
		this.widget = widget;
		this.sceneAssistant.controller.get('OK').addEventListener(Mojo.Event.tap, this.handleOk.bindAsEventListener(this));
		
	},
	
	handleOk:function(event){
		this.widget.mojo.close();
		//we do this to discard the changes done in this scene
		this.sceneAssistant.deletedEventHandle();
		
		Event.stop(event);
	},
		
	
});