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).
Comments:

Post a Comment:
Comments are closed for this entry.
About


Vince Kraemer writes the entries in this blog.

Search

Archives
« April 2014
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
News
Blogroll

No bookmarks in folder

automarks