On 31/03/2011 21:26, Dirk Bruere at NeoPax wrote:
On 31/03/2011 18:09, Patricia Shanahan wrote:
On 3/31/2011 8:35 AM, Dirk Bruere at NeoPax wrote:
...
I get an error: "Syntax error on tokens, misplaced constructs".
It probably means that you put the construct somewhere where it is not
permitted by the Java syntax. The actual issue, and what you need to do
to fix it, depends on where you put it in your code.
Patricia
Let's start again with my latest code that also does not work
To clarify a bit more
public class controller extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Context currentContext = this;
final BlinkAPI blinkAPI = new BlinkAPI(currentContext);
lvRadio = (ListView)findViewById(R.id.ListViewRadio);
}
...
}
//****************************************************************************
//Different file
//****************************************************************************
public class BlinkAPI {
private static Context mContext;
static ListView radioLV;
public BlinkAPI( Context ctx)
{
BlinkAPI.mContext = ctx;
radioLV = (ListView )((Activity)
mContext).findViewById(R.id.ListViewRadio);
}
private static void updateRadioTitles( ) {
radioTitleAdapter = (ArrayAdapter<String>) radioLV.getAdapter();
...//Get titleStr etc
radioTitleAdapter.add(titleStr);
radioTitleAdapter.notifyDataSetChanged();
}
This code crashes out
prevent compilation or you have problems pasting code into articles. For
count three "{" but only two "}".
which you want help.