[android-beginners] Re: Noobie problem with creating Classes which use other Classes

2008-09-26 Thread Mark Murphy
gymshoe wrote: > But the following code fails. It fails whenever I try to assign a > value to the "value" field or the "visibility" field. (It fails with > either direct assignment or with creating a setter method -not > shown.). The error code indicates a null pointer exception is thrown > when

[android-beginners] Re: Noobie problem with creating Classes which use other Classes

2008-09-26 Thread gymshoe
Hmmm... But in my main Activity, I do create a variable "me" of type Person2, and "me" is supposed to be created with a field known as "Id" of type StrRecord. So shouldn't "Id" be created at the same time as "me"? If so, then I should be able to access "me.Id". Moreover, if I change the field "I

[android-beginners] Re: Noobie problem with creating Classes which use other Classes

2008-09-26 Thread Mark Murphy
gymshoe wrote: > But in my main Activity, I do create a variable "me" of type Person2, > and "me" is supposed to be created with a field known as "Id" of type > StrRecord. So shouldn't "Id" be created at the same time as "me"? If > so, then I should be able to access "me.Id". Not in Java. > Mor

[android-beginners] Re: Noobie problem with creating Classes which use other Classes

2008-09-27 Thread gymshoe
It is not entirely intuitive to me (yet), but through your guidance I can now understand how to get this to work. As long as I instantiate my StrRecord instance variable "Id", by setting it equal to a previously created local variable (even if it has a null value) , I am OK. thank you so much f