parse4cn1 new gui builder setup

28 views
Skip to first unread message

nick.kr...@gmail.com

unread,
May 2, 2017, 11:22:15 AM5/2/17
to CodenameOne Discussions
I believe this library uses the old style of CN1. Has anyone had luck setting it up with the new GUI builder? I'm getting a lot of import "file not found" errors when adding the parse4cn1 library to my project.

Shai Almog

unread,
May 3, 2017, 12:51:47 AM5/3/17
to CodenameOne Discussions, nick.kr...@gmail.com
There is no such dependency in parse4cn1 and even if there were the old GUI builder didn't add dependencies.

nick.kr...@gmail.com

unread,
May 3, 2017, 7:52:14 PM5/3/17
to CodenameOne Discussions, nick.kr...@gmail.com
I more or less meant porting over the StateMachine code in the parse4cn1 test app to the regular Main class (/src/com/mycompany/myapp) created by the new GUI builder. I guess it was fairly straightforward, I just implemented IPushCallback in my main instead of in the StateMachine. 

On a side note, is it possible to use the StateMachine class in a new project with only new GUI builder forms? It seems like the StateMachine is for the older version and it would get too complicated mixing the two, if it's even possible. 

I'm wondering because the StateMachineBase (SMB) has methods like beforeMain, postMain, etc. Can I do all my activity lifecycle calls in the regular Main class created with the new GUI builder such as start(), stop(), destroy() or does the SMB somehow add more functionality? So far, I haven't touched the StateMachine, because I thought it was for the old version, and I don't think I've needed a reason to, until now with using the parse4cn1 lib. So I've just been trying to figure out the correct way to port/refactor it into my existing app, which uses all new GUI builder forms.

Shai Almog

unread,
May 4, 2017, 1:07:16 AM5/4/17
to CodenameOne Discussions, nick.kr...@gmail.com
The state machine class isn't used in new code and doesn't make sense there.
Reply all
Reply to author
Forward
0 new messages