Insert Witty Irony Here

vince kraemer's Weblog


20051227 Tuesday December 27, 2005

Start writing apps for Tivo in NetBeans; updates for HME 1.4 I gave my wife a Tivo box Christmas. And I got a new toy to play with....

One of the first things I did was look for how to hac... create applications for... it. And there was a ton of resources about it.

Some of the folks associated with NetBeans have an article about developing Tivo application using NetBeans. Unfortunately, it seems like the Tivo HME team is a bit more liberal about API evolution than the NetBeans team.

I had to use the following code to create the app that Tim Boudreau blogged back in February, 2005.

    package tivotest;
    import com.tivo.hme.sdk.Application;
    import com.tivo.hme.interfaces.IContext;
    import com.tivo.hme.sim.Simulator;
    import java.awt.Color;
    
    public class Main extends Application {
    
        public static void main(String[] args) {
            try {
                Simulator.main(new String[] {Main.class.getName()});
            } catch (Exception ex) {
                System.out.println("I don't know what to do!!!");
            }
        }
    
         public void init(IContext context) {
             getRoot().setResource(createText("default-36-bold.font",
                Color.white, "Hello from an application!"));
        }
    
    }
    

The bigggest changes between Tim's code and this:

  1. import of IContext.
  2. catch the Exception in main().
  3. use of getRoot() instead of a direct reference to root (which became a private member of Application).
(2005-12-27 20:20:59.0) Permalink

Comments:

Post a Comment:

Comments are closed for this entry.

Calendar

« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

RSS Feeds

XML
All
/5 in 5
/Compile Time
/Ease of Evolution
/General
/GlassFish
/Gotchas
/Java
/Music
/NetBeans
/Sailfin

About Me

Photo of Vince Kraemer
Short Bio

Search

Links


Navigation



Subscribe with Bloglines Add to Technorati Favorites

Referers

Today's Page Hits: 195