How to use data provided in a getCallback outside of the getCallback
<p>So I'm using Parse for now to run the backend of my app. When you query your Parse database, data is returned in a seemingly weird way (to me, but I'm new to this) -</p>

<pre><code>            query.getFirstInBackground(new GetCallback() {
            public void done(ParseObject object, ParseException e) {
              if (object == null) {
              } else {
              }
            }
          });
</code></pre>

<p>And the data from the query is available for example within the Else statement. I can do                     Date time = object.getCreatedAt(); to get the time the retrieved object was created at.</p>

<p>But, the problem comes about because I want to use that data to update the text of a textView within my app. I feel like the data is "stuck" inside the callBack (which I realize is probably not true. The way I'm trying to do it I get an error: "Cannot refer to a non-final variable updateText inside an inner class defined in a different method". The error is on updateText, timeText, table, and i. Here is the relevant code snippet that is failing -</p>

<pre><code>TableLayout table = (TableLayout) findViewById(R.id.tableLayout);
    TextView courtText;
    TextView updateText;
    TextView timeText;
    // For each row
    for (int i = 0; i &lt; table.getChildCount(); i++) {
        // Get the one `courtText` in this row
        courtText = (TextView) table.getChildAt(i).findViewById(R.id.courtText);

        ParseQuery query = new ParseQuery("Updates");
        query.whereEqualTo("court",courtText);
        query.orderByAscending("createdAt");
        query.getFirstInBackground(new GetCallback() {
            public void done(ParseObject object, ParseException e) {
              if (object == null) {
                Log.d("update", "The getFirst request failed.");
              } else {
                Log.d("update", "Retrieved the object.");

                String update = object.getString("update");
                Date time = object.getCreatedAt();

                updateText = (TextView) table.getChildAt(i).findViewById(R.id.updateText);
                timeText = (TextView) table.getChildAt(i).findViewById(R.id.timeText);

                updateText.setText(update);
                java.text.DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext());
                timeText.setText(dateFormat.format(time));
              }
            }
          });

    }
</code></pre>

<p>Any help would be appreciated.</p>
