ah...  because I need to say --

return (String) tv.getText().toString();

doh.

On Aug 25, 12:07 pm, sdphil <[email protected]> wrote:
> I have a click listener:
>     private OnClickListener onMyListener = new OnClickListener() {
>         public void onClick(View v) {
>             myMethod();
>         }
>     };
>
> And myMethod:
>     private String myMethod() {
>         TextView tv = (TextView) findViewById(R.id.TextView1);
>         return (String) tv.getText();
>     }
>
> When it calls this method, at tv.getText() it breaks in the debugger.
>
> with this in the stack --
>
> ViewRoot.handleMessage(Message) line: 1571
> ViewRoot(Handler).dispatchMessage(Message) line: 99
> Looper.loop() line: 123
> ActivityThread.main(String[]) line: 3948
> Method.invokeNative(Object, Object[], Class, Class[], Class, int,
> boolean) line: not available [native method]
> Method.invoke(Object, Object...) line: 521
> ZygoteInit$MethodAndArgsCaller.run() line: 782
> ZygoteInit.main(String[]) line: 540
> NativeStart.main(String[]) line: not available [native method]
>
> not sure what could be happening here...  thread issue?
>
> tia.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to