why my function is always returning null object

50 views
Skip to first unread message

b.wassim Rmd

unread,
Apr 25, 2017, 9:27:25 PM4/25/17
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Simulator
MembreService.java

steve nganga

unread,
Apr 26, 2017, 2:43:36 AM4/26/17
to codenameone...@googlegroups.com
Share the stacktrace... just from looking at your code you have already instantiated Membre on the first line and hence does not make sense to return null;

--
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-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/162dbb4a-994b-40c8-a3af-acab803b928f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

b.wassim Rmd

unread,
Apr 26, 2017, 8:00:11 AM4/26/17
to CodenameOne Discussions
this is what i get when im testing
Capture.PNG

steve nganga

unread,
Apr 26, 2017, 8:27:29 AM4/26/17
to codenameone...@googlegroups.com
Try the following

NetworkManager.getInstance().addToQueueAndWait(con); and uncomment the line


Connection also provides the addArgument method so instead of appending the id to the url use the 

ConnectionRequest con = new ConnectionRequest();
con.addArgument("userId",id);





--
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-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

b.wassim Rmd

unread,
Apr 26, 2017, 8:41:28 AM4/26/17
to codenameone...@googlegroups.com
its the same thing 

2017-04-26 13:27 GMT+01:00 steve nganga <ngost...@gmail.com>:
Try the following

NetworkManager.getInstance().addToQueueAndWait(con); and uncomment the line


Connection also provides the addArgument method so instead of appending the id to the url use the 

ConnectionRequest con = new ConnectionRequest();
con.addArgument("userId",id);




On Wed, Apr 26, 2017 at 3:00 PM, b.wassim Rmd <b.wass...@gmail.com> wrote:
this is what i get when im testing

Le mercredi 26 avril 2017 02:27:25 UTC+1, b.wassim Rmd a écrit :
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Simulator

--
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-discussions+unsubscr...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/ig4na33zc3U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.

b.wassim Rmd

unread,
Apr 26, 2017, 8:42:03 AM4/26/17
to codenameone...@googlegroups.com
i find out that the action performed method is executing after the return statement thats why it return null always

2017-04-26 13:41 GMT+01:00 b.wassim Rmd <b.wass...@gmail.com>:
its the same thing 

2017-04-26 13:27 GMT+01:00 steve nganga <ngost...@gmail.com>:
Try the following

NetworkManager.getInstance().addToQueueAndWait(con); and uncomment the line


Connection also provides the addArgument method so instead of appending the id to the url use the 

ConnectionRequest con = new ConnectionRequest();
con.addArgument("userId",id);





On Wed, Apr 26, 2017 at 3:00 PM, b.wassim Rmd <b.wass...@gmail.com> wrote:
this is what i get when im testing

Le mercredi 26 avril 2017 02:27:25 UTC+1, b.wassim Rmd a écrit :
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Simulator

--
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-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/679a6adc-944a-4245-8134-d0a4e060497d%40googlegroups.com.

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

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/ig4na33zc3U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsubscr...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages