cancel
Showing results for 
Search instead for 
Did you mean: 

how to execute the storyboard in my java project?

aizhixi
Associate II
Posted on December 11, 2013 at 08:02

hello :

I buy the STM32F40G-JAVA eval board,i got a problem when i used the MricoEJ to develop the project.

I read the STM32Java-UI-PACK user's Manual,In the 7.2.4 it shows that how to edit stroyboard, i did it follow the document said ,however, i don't know how to execute it and display it in the simJPF you know, i write it like this,,i read the class summary about stroyBoard ,it show that it have the method ,then i write the code ,In a pity ,it has error,can't find the source,i don't know why.

public class MyTest {

/**

* @param args

*/

public static void main(String[] args) 

{

// TODO Auto-generated method stub

Display display;

display=Display.getDefaultDisplay();

StoryBoard.loadStory(''Mystoryboard'').run(display);

}

}

0690X00000605dvQAA.png

THIS IS ERROR:

Exception in thread ''main'' java.util.NoSuchElementException: Mystoryboard is not a valid Immutable ID

at java.lang.Throwable.fillInStackTrace(Throwable.java:130)

at java.lang.Throwable.<init>(Throwable.java:59)

at java.lang.Exception.<init>(Exception.java:20)

at java.lang.RuntimeException.<init>(RuntimeException.java:25)

at java.util.NoSuchElementException.<init>(NoSuchElementException.java:22)

at ej.bon.ImmutablesFile.get(ImmutablesFile.java:45)

at ej.bon.Immutables.get(Immutables.java:94)

at com.is2t.storyboard.StoryBoard.loadStory(<unknown source file>:22)

at MyTest.main(MyTest.java:16)

do you have some demo or reference manual can i have a look ,thanks .
2 REPLIES 2
vincent.philippe
Associate II
Posted on December 11, 2013 at 17:46

Hi Roy,

Some ideas:

* Don't forget to Enable storyboard support in your project: launcher

 In menu Run configurations

      JPF Configuration

          Storyboard 

                Enable story board spport and add you storyboard file .

* Other ideas:

Try the story board example proposed in File Java example. The code is somethning like that:

import

 

com.is2t.storyboard.StoryBoard;

 

import

ej.microui.io.Display;

 

public

class

StoryboardAppnotesLauncher {

 

public

static

void

main(String[] args) {

 

 

// 1. load

storyboard

from

Immutables

 

StoryBoard myboard = StoryBoard.loadStory(

''Example''

);

 

Display[] displays = Display.getAllDisplays();

// 2. run it on last available display

 

myboard.run(displays[displays.

length

- 1]);

 }

 

} Best regards

Phil

aizhixi
Associate II
Posted on December 17, 2013 at 15:24

hello phil:

thanks so much.

i figure out the problems.

can i have your email or skype , can we be a friend, you can add my skype ,

my email: aizhixi@gmail.com 

my skype: aizhixi106 roy.hu

In the end ,thanks so much.