No finder method works

25 views
Skip to first unread message

chisom dike Onwuegbuzie

unread,
Oct 11, 2013, 7:42:45 PM10/11/13
to codenameone...@googlegroups.com
no finder method works for me either the textfiled label etc none just works i have tried everything i know it isnt working at all,what do i do next because i cant work with the designs i made using GUI Builderon netbeans. its quite frustrating

Shai Almog

unread,
Oct 12, 2013, 3:34:32 AM10/12/13
to codenameone...@googlegroups.com
Are you passing the argument to the finder method?
Are you using the debugger?
Pass the form argument from beginXXX to the findYYY method.

chisom dike Onwuegbuzie

unread,
Oct 12, 2013, 5:39:16 AM10/12/13
to codenameone...@googlegroups.com
let say i added a button to my Form which on click it will link to a php page get the neccessary information from mysql db, then load them in them in the label which i renamed display, when i type 'finddisplay' in the action event of the button the find method doesnt come up,rather i will only see an error, the only display i have seen was when i tried something like this. UIBuilder u = new UIBuilder(); 
  u.findByName(FORM_STATE_KEY_NAME, c); this is the only time i have encountered a finder which still gives me challenges please put me through on what to do. you people are dooing a great job here. thanks

chisom dike Onwuegbuzie

unread,
Oct 12, 2013, 6:17:06 AM10/12/13
to codenameone...@googlegroups.com

Thank you shai i passed the form argument and the finder is working. Please one more thing, how can i apply code to another component in another form while im in the actionEvent of my current Form.

David Wafula

unread,
Oct 12, 2013, 6:50:33 AM10/12/13
to CodenameOne Discussions

The typical way is to  use the before show method of the target form. If you have a form called TargetForm, the designer will generate the following method in StateMachine when you enable Before Show event

 @Override
    protected void beforeTargetForm(Form f) {
  //put your logic here

    }


Now, in the current form, just call on your actionEvent

showForm("TargetForm", null); 

and  the code will be executed before the target form is shown.

Regards.


On Sat, Oct 12, 2013 at 12:17 PM, chisom dike Onwuegbuzie <dike4m...@gmail.com> wrote:

Thank you shai i passed the form argument and the finder is working. Please one more thing, how can i apply code to another component in another form while im in the actionEvent of my current Form.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/fedbc430-c6d3-46f3-bf5d-f3b2d2e45def%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
David Wafula

chisom dike Onwuegbuzie

unread,
Oct 12, 2013, 8:19:26 AM10/12/13
to codenameone...@googlegroups.com
RE:


On Saturday, October 12, 2013 11:50:33 AM UTC+1, davidwaf wrote:

The typical way is to  use the before show method of the target form. If you have a form called TargetForm, the designer will generate the following method in StateMachine when you enable Before Show event

 @Override
    protected void beforeTargetForm(Form f) {
  //put your logic here

    }


Now, in the current form, just call on your actionEvent

showForm("TargetForm", null); 

and  the code will be executed before the target form is shown.

Regards.


Thanks alot 
Reply all
Reply to author
Forward
0 new messages