Page 1 of 1

Problem with Memo object

PostPosted: Fri Jul 04, 2008 12:22 am
by gcastell
Ok, as far as I know this is supposed to be easy and for some weird reason is not working, check this:

Code: Select all
@app MemoTest {
  creator = "METE"; // creator id
  name = "MemoTest"; // display name
  dbname = "MemoTest"; // name of .prc database
}
handler MemoTest.onstart() {
 
  bool mOpen;
  Memo memo;

 
 
  mOpen = memo.find("WebLaunch");
  if (mOpen)
  {
    memo.close();
    launch("Xii3");
  }
  else
  {
    launch("BLZ5");
  }
 

}


Simple right?, It doesn't work in my Centro, I got the following error: Addr: 60 Invalid stack reference. Based on my own opinion is the find function that has the problem, can anyone help me?

Thanks,

Gabriel

Re: Problem with Memo object

PostPosted: Tue Jul 08, 2008 6:54 am
by dewey
I think the problem is that you are setting up the app handler (onstart), without really defining an app (no main form, for example).

Replace "handler MemoTest.onstart()" with "main()", and you should be fine.