Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging in minor misc bug fixes and the recipe reader #118

Merged
merged 14 commits into from
Jun 9, 2015
Prev Previous commit
Next Next commit
fixed null or empty commodity issue
flanflanagan committed Jun 8, 2015
commit e436f0035e39e7adb5a69b01777ee5ed069f72c1
7 changes: 3 additions & 4 deletions cyclist/src/edu/utexas/cycic/FormBuilderFunctions.java
Original file line number Diff line number Diff line change
@@ -327,11 +327,10 @@ public void handle(MouseEvent e){
cb.setPromptText("Select a commodity");
cb.valueProperty().addListener(new ChangeListener<String>(){
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue){
if(newValue == null){
if(newValue == null || newValue.equalsIgnoreCase("")){
for (int i = 0; i < facNode.cycicCircle.incommods.size(); i++) {
if (facNode.cycicCircle.incommods.get(i) == (String) oldValue){
String string = facNode.cycicCircle.incommods.remove(i);
System.out.println(string);
facNode.cycicCircle.incommods.remove(i);
break;
}
}
@@ -393,7 +392,7 @@ public void handle(MouseEvent e){
cb.setPromptText("Select a commodity");
cb.valueProperty().addListener(new ChangeListener<String>(){
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue){
if(newValue == null){
if(newValue == null || newValue.equalsIgnoreCase("")){
for (int i = 0; i < facNode.cycicCircle.outcommods.size(); i++) {
if (facNode.cycicCircle.outcommods.get(i) == (String) oldValue){
facNode.cycicCircle.outcommods.remove(i);