Closed GoogleCodeExporter closed 9 years ago
I should also mention that I am using ActionBarSherlock, and building for 4.0.
Original comment by Rob.Isak...@gmail.com
on 16 Jan 2012 at 10:18
It works ok for me. In your code, the "aq" you created in onCreate is not in
the scope for the "aq.id()" in your jsonCallback method. Is it possible that
it's using a different "aq"?
Here's the code I tested with:
public class AdhocActivity extends Activity {
private AQuery aq;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.adhoc_activity);
aq = new AQuery(this);
aq.id(R.id.text).text("point 1");
work();
}
private void work(){
Log.i("test", "point 1");
String url = "http://www.google.com/uds/GnewsSearch?q=Obama&v=1.0";
aq.ajax(url, JSONObject.class, this, "jsonCb");
}
public void jsonCb(String url, JSONObject jo, AjaxStatus status){
Log.i("test", "point 2");
aq.id(R.id.text).text("point 2");
}
}
Original comment by tinyeeliu@gmail.com
on 31 Jan 2012 at 2:24
Thanks for looking int othis, I had discovered the issue (improper scope) but
forgot to come back here and mark it. That's what I get for posting at 3am...
Original comment by Rob.Isak...@gmail.com
on 31 Jan 2012 at 4:28
Original issue reported on code.google.com by
Rob.Isak...@gmail.com
on 16 Jan 2012 at 10:18