# Debugger says getStringColumn() does not exist

**URL:** <https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159>\
**Category:** Libraries\
**Created:** [December 5, 2019, 6:09pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159 "2019-12-05T18:09:51Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 6:09pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/1 "2019-12-05T18:09:51Z")

</div>

I have created a Table object using the following code:

```auto
dataTable = new Table("Freezer Stock.txt");

```

Now, I want to create arrays that have certain columns’ information so that I can create a dropdown menu. For some reason, the debugger is telling me that `.getStringColumn()` does not exist.

I am creating the lists as follows:

```auto
// Initialize lists for dropdown menu
freezerList = new String[rowCount];
shelfList = new String[rowCount];
rackList = new String[rowCount];
boxList = new String[rowCount];
  
// Populate lists
freezerList = dataTable.getStringColumn("Freezer");
shelfList = dataTable.getStringColumn("Shelf");
rackList = dataTable.getStringColumn("Rack");
boxList = dataTable.getStringColumn("Box");

```

Any idea what could be causing the issues? I can’t really divulge any of the freezer information since it is confidential, otherwise I would just upload my entire project file to Github.

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 5, 2019, 7:09pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/2 "2019-12-05T19:09:13Z")

</div>

Just to make sure, but you declared dataTable like this somewhere, right?

```auto
Table dataTable;
//or 
Table dataTable = new Table();

// and then to load the Table you used 
dataTable = loadTable("myFile.csv");

```

Cause i don‘t think Table can simply be initialized like you did with a txt file…

Edit :  
Yup, i‘m pretty sure these are the only available extensions :

```auto
static final String[] loadExtensions = { "csv", "tsv", "ods", "bin" };
static final String[] saveExtensions = { "csv", "tsv", "ods", "bin", "html" };

```

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 8:55pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/3 "2019-12-05T20:55:26Z")

</div>

Yes. I declared dataTable as

```auto
Table dataTable;

```

And I used the following load the data

```auto
dataTable = new Table("myFile.csv);

```

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 5, 2019, 9:01pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/4 "2019-12-05T21:01:52Z")

</div>

[Processing.org/reference/loadTable\_.html](http://Processing.org/reference/loadTable_.html)

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 9:26pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/5 "2019-12-05T21:26:50Z")

</div>

Do I need to include an `import` at the beginning of my code to use Table? I had been using a Table class from a textbook until now.

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 5, 2019, 9:51pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/6 "2019-12-05T21:51:40Z")

</div>

Are you sure you did that, because in your Original post you said you did something different… so, what extension does your file have? .csv or .txt?

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 10:01pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/7 "2019-12-05T22:01:25Z")

</div>

It is a .txt file, but using a .csv doesn’t work, either. Also, my sketch now says `Table dataTable;` is ambiguous. Is there some sort of .pde I need to include to get Table to work properly? Any import statement that include the libraries for the Table class?

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 5, 2019, 10:07pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/8 "2019-12-05T22:07:48Z")

</div>

No, Table is already integrated…

A .txt file will not work, because it‘s not a supported Extension for Table.

As for the ambiguous part, that‘s probably because you tried importing another class called Table, right? This error happens when there are 2 or more conflicting namespaces…

For example :

```auto
import java.fun.MyClass;
import com.sun.funnier.MyClass;

//then defining 

MyClass myVariable; //The Compiler has no idea wether you are Talking about java.fun.MyClass or com.sun.funnier.MyClass...

```

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 10:10pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/9 "2019-12-05T22:10:08Z")

</div>

I ditched the Table class I had been using, but that’s when the ambiguity issues began. I had no issue with ambiguity before tossing out the modified Table class I was using. That’s what has me so confused.

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 5, 2019, 10:15pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/10 "2019-12-05T22:15:24Z")

</div>

Since i don’t have Access to your Code, i can‘t help you much, but you just need to search your Code for the word Table being used to define a Class, so something like this :

```auto
Table rasa;

a = (Table) rasa;

b = new Table();

```

Pretty much anywhere you have the word Table to represent a class.

Now if one of These is something like :

```auto
import com.something.Table;

/or 

class Table {}
//or
class Table extends Something {}

```

Any of those are causing the issue.

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 10:20pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/11 "2019-12-05T22:20:37Z")

</div>

Well, I imported the ControlP5 library. Perhaps that’s what’s causing the issues.

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 5, 2019, 10:21pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/12 "2019-12-05T22:21:24Z")

</div>

That shouldn‘t be the case, since it doesn’t have another variable called Table…

Please post the error Message you got, maybe that‘s gonna help.

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 10:44pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/13 "2019-12-05T22:44:29Z")

</div>

Well, I am getting multiple errors, but they are all because of this one:

- The type Table is ambiguous

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 5, 2019, 11:32pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/14 "2019-12-05T23:32:10Z")

</div>

Then somewhere in your Code you Must have 2 classes with the same name Table.

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 5, 2019, 11:36pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/15 "2019-12-05T23:36:41Z")

</div>

I’ll just send all of my code.

```auto
import controlP5.*;
ControlP5 cp5;

DropdownList freezer, shelf, rack, box;
int cnt = 0;

PImage image5x5;
PImage image9x9;
int rowCount5x5;
int rowCount9x9;
int rowCount;
String[] freezerList;
String[] shelfList;
String[] rackList;
String[] boxList;

Table locationTable5x5;
Table locationTable9x9;
Table dataTable;
int slotNumber;
String title = "Freezer Lookup Tool";
String filePath;
Boolean x9 = true;
Boolean x5 = true;

void setup(){
  size(1140, 900);
  
  // Create buttons using controlP5 library
  cp5 = new ControlP5(this);
  cp5.addButton("x9").setValue(0).setPosition(830, 490).setSize(60, 60);
  cp5.addButton("x5").setValue(0).setPosition(910, 490).setSize(60, 60);
  
  cp5.addDropdownList("freezer").setPosition(830, 130);
  cp5.addDropdownList("shelf").setPosition(830, 250).setSize(100, 40);
  cp5.addDropdownList("rack").setPosition(830, 370).setSize(100, 40);
  //cp5.addDropdownList("box").setPosition(830, 490).setSize(100, 40);

  // Load grids that will be used for 
  // representing each cryobox
  image5x5 = loadImage("5x5_grid.png");
  image9x9 = loadImage("9x9_grid.png");
  
  locationTable5x5 = new Table("loc_5x5.txt");
  locationTable9x9 = new Table("loc_9x9.txt");
  
  rowCount5x5 = locationTable5x5.getRowCount();
  rowCount9x9 = locationTable9x9.getRowCount();
  
  slotNumber = 1;
  
  // Load .txt of inventory
  dataTable = loadTable("Freezer Stock.csv");
  rowCount = dataTable.getRowCount();
  
  fillLists(rowCount);
}
  
  // Create unique lists of value for dropdown menu

void draw(){
  background(0);
  background(192, 100, 100);
  
  // Draw title background box
  textSize(48);
  fill(255, 200);
  stroke(2);
  rect(10, 10, textWidth(title) + 10, 63, 5);
  noStroke();
  
  // Draw Title
  fill(0);
  text(title, 10, 58);
  
  // Draw image
  //image(image9x9, 0, 90);
  // Draw slot numbers on grid
  //draw9x9();
  if (x5) {
    // If x9 was previously active, turn off
    x9 = false;

    image(image5x5, 0, 90);
    draw5x5();
  }
  
  if (x9) {
    // If x5 was previously active, turn off
    x5 = false;

    image(image9x9, 0, 90);
    draw9x9();
  }
  
  smooth();
  fill(0);
  noStroke();
  
  drawMenuBox();
}

////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
// ADDITIONAL FUNCTIONS //
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
void draw5x5(){
  for (int row = 0; row < rowCount5x5; row++){
    float x = locationTable5x5.getFloat(row, 0); // column 1
    float y = locationTable5x5.getFloat(row, 1); // column 2
    
    textSize(24);
    text(row + 1, x + 4, y + 28);
  }
}

void draw9x9(){
  for (int row = 0; row < rowCount9x9; row++){
    float x = locationTable9x9.getFloat(row, 0); // column 1
    float y = locationTable9x9.getFloat(row, 1); // column 2
    
    textSize(12);
    text(row + 1, x + 4, y + 16);
  }
}

void drawMenuBox(){
  fill(255, 200);
  stroke(2);
  rect(820, 90, 310, 800, 5);
  
  fill(0);
  noStroke();
  textSize(24);
  text("Freezer", 830, 120);
  text("Shelf", 830, 240);
  text("Rack", 830, 360);
  text("Box", 830, 480);
}

// Button Logic
public void x9(){
  if(!x9){
    x9 = true;
  } else {
    x9 = false;
  }
}

// Button Logic
public void x5(){
  if(!x5){
    x5 = true;
  } else {
    x5 = false;
  }
}

void fillLists(int rowCount){
  // Initialize lists for dropdown menu
  freezerList = new String[rowCount];
  shelfList = new String[rowCount];
  rackList = new String[rowCount];
  boxList = new String[rowCount];
  
  // Populate lists
  freezerList = dataTable.getStringColumn("Freezer");
  shelfList = dataTable.getStringColumn("Shelf");
  rackList = dataTable.getStringColumn("Rack");
  boxList = dataTable.getStringColumn("Box");
}

```

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 6, 2019, 12:01am UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/16 "2019-12-06T00:01:54Z")

</div>

> [@Lehmoxy](#):
>
> locationTable5x5 = new Table(“loc\_5x5.txt”); locationTable9x9 = new Table(“loc\_9x9.txt”);

This is the problem. New Table doesn‘t accept .txt files. Replace these lines with :

```auto
locationTable9x9 = loadTable("loc_9x9.txt");
locationTable5x5 = loadTable("loc_5x5.txt");

```

And it should all be good.

---

<div class="post-metadata">

**Author:** ![Lehmoxy](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Post date:** [December 6, 2019, 4:16pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159/17 "2019-12-06T16:16:38Z")

</div>

I found out what the problem was with the Table ambiguity. I had some .jar files loaded that I was going to use to read directly from a MS Access file. I removed them and the conflict went away. Thanks for the help! I really appreciate it!
