Random header image... Refresh for more!

Another visitor…

Why must a computer always turn evil the second it learns how to talk?

December 11, 2010   No Comments

Hang around.

I just love programming in E…


December 11, 2010   No Comments

Talk to me, baby!

It’s talking.  Oh yeah.

Of course, I can’t actually show that here, because it can’t be captured in a screenshot and it’s a stupid thing to make a video of.

Anyway, now to try it on the real phone…

December 11, 2010   No Comments

_speech = new TextToSpeech(this, this);

So, those delegate/event things turned out to be anonymous inline classes implementing an interface.

Now, I like anonymous inline methods.  They can make code easier to understand, because you’re not jumping all over the place to do a simple task.

But inline interface implementations?  No thank you, I don’t need a full “public void function(){}in the middle of a function call.  At least not when all I have to do is “_init = true;“.

So, then…  My class now implements OnInitListener and all I have to do is pass the function I was calling “this”.

December 11, 2010   No Comments

Inline out of line.

Okay, so I’m thinking that it might be a good idea to read up about Java function delegates or event handlers, or whatever they are called here, because I don’t have a clue what I’m supposed to be doing with this text to speech initializer thing…  Syntax inference from unrelated sample code has failed.

December 11, 2010   No Comments

COMPILE ERROR Page 481, Line 24: Symbol not defined.

I would like to thank my Android book for using a local variable that they never define and never initialize in a critical part of an example.  YOU’RE AWESOME!

But that’s okay, because they never actually explain where you’re supposed to call this critical part of the example…  Who needs to initialize things anyway?

December 11, 2010   No Comments

Getting my WYSIWYG on.

December 11, 2010   No Comments

Spot the Problem

My application has crashed.  Can you spot the error?

Of course you can’t, because instead of popping up with a very visible “You had an exception!” dialog, the error is playing hide and seek.

It’s actually there, in two places (That I’ve found…).

  1. In the Variables pane, “e” is a RuntimeException.
  2. In the log pane, if you scroll up about a hundred lines, you’ll find the same RuntimeException, although all of the useful bits are truncated.

The exception I’m getting is that I didn’t put an android:layout_width attribute on a checkbox element that I’ve added.

December 6, 2010   No Comments


Oh yeah.  That’s right.  Built in.

December 6, 2010   No Comments

Android UI XML Reminds Me Of XAML.

There, I said it.  XAML!

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
   <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello"/>

(Not that there’s anything wrong with that.)

December 6, 2010   No Comments