[program-java] Local variable

  • From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
  • To: <program-java@xxxxxxxxxxxxx>
  • Date: Mon, 26 Jan 2009 12:23:48 -0500

Hello all:

I have a locally declared variable table;

Private Table table = null;

I also have a method that has a Switch statement that has three cases.
In case 0, I initially create the table and set the TableColumns.

In case 1, I create the same situation as in case 0 but now I actually
add the TableItems.

In case 2, the table has already been created in either case 0 or 1 so
in this circumstance all I do is update the TableItems by either adding
or deleting the item.

However upon compiling I get the following error:

"The local variable table may not have been initialized".

Here's the rub, case 0 no matter the circumstance will always be run
during the initial build of my screen or shell. So in other words, the
table is initialized.

What gives?

J.

James M. Corbett

A / Technical Specialist
GST/HST Micros | Micros de la TPS/TVH

(613) 941-1338

Other related posts: