Random header image... Refresh for more!

Posts from — December 2010

Well, that’s helpful.

Eclipse helps me debug a problem.

December 11, 2010   No Comments

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…

clipse.

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

Scrambled Keys

F5.

F5.

F5 F5 F5.

WTF?

Why isn’t this running?

F5 F5.

Grrr…

Run->Debug.

(wait)

(wait)

F10.

F10.

Why is that making the File menu highlight?

F10.

F11.

WTF?!  It restarted?

Tip of the day:  If you install the C/C++ Developer Tools in Eclipse, it’ll come with a set of Visual Studio key bindings.

December 7, 2010   1 Comment

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