In theory this should work.  What does your directory structure look like?

Eoin Hennessy wrote:
> Hi there,
>
> I'm looking at the EclipseME preprocessor feature for the first time.
> I'm trying to determine how this feature integrates with the build
> process. I have included very simple hello-world type application to
> demonstrate the issue:
>
> The method 'startApp' is implemented in an 'included' file. In the
> editor, I am seeing a 'Midlet must implement startApp' error, so I
> presume the IDE is not looking at the preprocessed source. This is
> understandable, but when I run and midlet, I'm seeing a runtime error;
> 'The type MyMidlet must implement the inherited abstract method
> MIDlet.startApp()'. I do not see any preprocessor related errors, and
> I can see the preprocessed code in '.processed'.
>
> How does one ensure Eclipse is building from the output of the preprocessor?
>
> Thanks,
> Eoin
>
>   
>>>> MyMidlet.java
>>>>         
>
> import javax.microedition.midlet.*;
> import javax.microedition.lcdui.*;
>
> public class MyMidlet extends MIDlet implements CommandListener {
>     private Command exitCommand;
>     private TextBox tbox;
>
>     public MyMidlet() {
>         exitCommand = new Command("Exit", Command.EXIT, 1);
>         tbox = new TextBox("Hello world MIDlet", "Hello World!", 25, 0);
>         tbox.addCommand(exitCommand);
>         tbox.setCommandListener(this);
>     }
>
>     //#include IncludeTest.h
>     //#endinclude
>
>     protected void pauseApp() {}
>     protected void destroyApp(boolean bool) {}
>
>     public void commandAction(Command cmd, Displayable disp) {
>         if (cmd == exitCommand) {
>             destroyApp(false);
>             notifyDestroyed();
>         }
>     }
> }
>
>   
>>>> IncludeTest.h
>>>>         
>
>     protected void startApp() {
>         Display.getDisplay(this).setCurrent(tbox);
>     }
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Eclipseme-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/eclipseme-users
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users

Reply via email to