We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Integer not compatible with int... (tuio code)
Page Index Toggle Pages: 1
Integer not compatible with int... (tuio code) (Read 417 times)
Integer not compatible with int... (tuio code)
May 3rd, 2008, 12:38pm
 
Hello! Thanks for your intention to help me here.
I´m using the tuio demo code (reactivision madness flow) and I want to do something when a object is removed from the table.
So there´s a funktion for objects that get removed.
Every object has an fiducial_id (f_id) and a session_id(s_id).
I need the f_id. But I´m getting an error that has something to do with Integers...

Here´s my code...

void removeTuiObject(Integer s_id,Integer f_id ) {

 objectList.deactivate(s_id);
 System.out.println("remove object "+f_id+" ("+s_id+")");
 if (f_id == 0 ){       // this is what I added to the code
}
}

here´s the error:
The type of the left sub-expression, "java.lang.Integer", is not compatible with the type of the right sub-expression, "int".

Thank you for your help.
le_wuus
Re: Integer not compatible with int... (tuio code)
Reply #1 - May 3rd, 2008, 1:47pm
 
You need to get the in from the Integer object:

int f_id_int=f_id.intValue();
or you could do the comparison against f_id.intValue()
Re: Integer not compatible with int... (tuio code)
Reply #2 - May 4th, 2008, 8:54am
 
Thanks again John!
Page Index Toggle Pages: 1