Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Dirk Bruere at NeoPax Newsgroups: comp.lang.java.programmer Subject: Re: ArrayAdapter Date: Thu, 31 Mar 2011 04:50:39 +0100 Organization: Dirk Bruere at Neopax Lines: 40 Message-ID: <8vic0bFs4qU1@mid.individual.net> References: <8vi26oFvh2U1@mid.individual.net> <3gp7p61ll8h7nqogtnfu2ka1mddt0sg43d@4ax.com> Reply-To: dirk.bruere@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net k0nW0T2ctHwlha9sH2BijgBYVx0TGXqpRIX9GV61pXR9tOlsJ+ Cancel-Lock: sha1:VLQDo/qBVfTuYYwm+VuJ3rsoDg8= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2630 On 31/03/2011 03:42, Peter Duniho wrote: > On 3/30/11 7:25 PM, Roedy Green wrote: >> On Thu, 31 Mar 2011 02:03:24 +0100, Dirk Bruere at NeoPax >> wrote, quoted or indirectly quoted someone who >> said : >> >>> I have an ArrayAdapter in main. >>> How do I access it from another class? >> >> You would have to show some code. I have never heard of an >> ArrayAdapter. > > I assume he's referring to this: > http://developer.android.com/reference/android/widget/ArrayAdapter.html > > First link on Google and Bing. > > That said, it really doesn't matter what the type of the object is. It's > still just going to be a normal object reference. And accessing object > references that exist in one class from another class is always done the > same way: either provide a method or field in the owning class that will > return it, or pass/assign the value of the reference to a method/field > in the accessing class. > > Basically, it's one of the first things someone ought to learn when > learning how to program in an OOP language. Classes that can't get > values from the instance of one class to the instance of another usually > aren't that useful. > > Pete Yes. It's 04:49 here and my brain is not working too well. Either its obvious, or I'm not explaining it correctly. Tomorrow. -- Dirk http://www.neopax.com/technomage/ - My new book - Magick and Technology