vh84 (3) [Avatar] Offline
#1
I am compiling Pomodo.mxml by following the book to page 190 listing 6.2. The compiler gave error message:

pomodo/app/flex/com/pomodo/components/TasksListBox.mxml(16): Error: Call to a possibly undefinded method debug through a reference with static type Class.

Pomodo.debug("TasksListBox#handleTasksListResult:
" + resultXML.toString());

In my Pomodo.mxml, debug is public:

public function debug(str:String):void {
application.debugPanel.addMessage(new DebugMessage(str));
}


On page 191, Peter specifically noted:
"Note that we didn't need to import Pomodo in order to call Pomodo.debug (3) -- it's our Application, so we get it for free."

What could be my problem here?

Any help is appreciated!
vh84 (3) [Avatar] Offline
#2
Re: Iteration 6 Compile failed on Pomodo.debug (p.190) Listing 6.2
I figured it out by myself:

the keyword static needs to appear as below

public static function debug(str:String):void {