So I have realised where I was going wrong, but have not been able to
achieve my goal.

I am trying to create a dialog box popup containing a table. The table
contains player scores, which are read from a file beforehand.

I have a layout file containing a TextView for a title, and the top
row of the table with 3 views in it ("Name | Score") - the | is a very
thin View as a border between the two columns.

The way I am going about this is:
1. Inflate the scorestable.xml layout to a view (highScoresView).
2. Get the TableLayout view from here (scoreTable)
3. Create TableRow views containing the data for player names and
their scores
4. Add each TableRow to the scoreTable View.
5. Create a dialog using highScoresView as its view.

However when I run this, I just get the same result if I had only
executed steps 1 and 5 from the above list..

I think I am doing something fundamentally wrong...
I can provide code if needed.

Any suggestions?



On Nov 28, 6:14 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> ahhhh..
>
> my try/catch statement was catching something which i assumed would be
> a file error, but was in fact an error as a result of me building a
> table.
>
> Thanks.
>
> On Nov 28, 5:46 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > [EMAIL PROTECTED] wrote:
> > > However when I attempt to open the file I get the error:
> > > 11-28 17:13:59.617: ERROR/I/O ERROR(193): Error when trying to access
> > > scores.txt - java.lang.IllegalStateException: The specified child
> > > already has a parent. You must call removeView() on the child's parent
> > > first.
>
> > You will get this error if you try adding a View to a parent container
> > (e.g., LinearLayout) that is already inside some container. In
> > principle, it has nothing to do with opening files.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
>
> > Android Training on the Ranch! -- Mar 16-20, 
> > 2009http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to