Including a Lib inside a Lib

34 views
Skip to first unread message

Gareth Murfin

unread,
Aug 2, 2016, 12:27:14 PM8/2/16
to CodenameOne Discussions
Is it possible to have a lib inside another lib? The option for freshing libs seems to be ghosted out.

Steve Hannah

unread,
Aug 2, 2016, 12:33:57 PM8/2/16
to codenameone...@googlegroups.com
If you want to develop a lib that depends on another lib, just add the "build/classes" of the "depended upon" library project to the classpath of the project's lib.

E.g.  If project A depends on project B, add B/build/classes to the classpath of A.

Steve

On Tue, Aug 2, 2016 at 9:27 AM, Gareth Murfin <gareth...@gmail.com> wrote:
Is it possible to have a lib inside another lib? The option for freshing libs seems to be ghosted out.

--
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 https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/be979355-6991-4e33-88a4-b42b290d0dc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

Gareth Murfin

unread,
Aug 2, 2016, 12:39:53 PM8/2/16
to CodenameOne Discussions
Thanks a lot. Also since there is no statemachine in a cn1lib, how do you do things like createContainer? Can you actually have a lib with a theme in it, and gui forms etc? I want to bundle up my chat functionality into a lib, including screens etc. The it would be an extremely easy way for any app to add a chat room.


On Wednesday, August 3, 2016 at 12:33:57 AM UTC+8, Steve Hannah wrote:
If you want to develop a lib that depends on another lib, just add the "build/classes" of the "depended upon" library project to the classpath of the project's lib.

E.g.  If project A depends on project B, add B/build/classes to the classpath of A.

Steve
On Tue, Aug 2, 2016 at 9:27 AM, Gareth Murfin <gareth...@gmail.com> wrote:
Is it possible to have a lib inside another lib? The option for freshing libs seems to be ghosted out.

--
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.

Steve Hannah

unread,
Aug 2, 2016, 12:59:03 PM8/2/16
to codenameone...@googlegroups.com
The old GUIBuilder is not amenable to splitting things into modules - it uses a monolithic app structure.  Themes, however, can be packaged into cn1libs quite nicely, and the new GUI builder can also work in a modular way, since the generated form classes take a Resources object as a parameter.

However, my in my personal experience, many of these IDE features aren't easily available inside library projects.  Usually if I want to do something creative, I just use a regular application project, and then create a custom ANT script for packaging what I need into a cn1lib.  The format of a cn1lib is pretty straight forward, so it's pretty easy to just wrap whatever I want into it.

Steve

On Tue, Aug 2, 2016 at 9:39 AM, Gareth Murfin <gareth...@gmail.com> wrote:
Thanks a lot. Also since there is no statemachine in a cn1lib, how do you do things like createContainer? Can you actually have a lib with a theme in it, and gui forms etc? I want to bundle up my chat functionality into a lib, including screens etc. The it would be an extremely easy way for any app to add a chat room.

On Wednesday, August 3, 2016 at 12:33:57 AM UTC+8, Steve Hannah wrote:
If you want to develop a lib that depends on another lib, just add the "build/classes" of the "depended upon" library project to the classpath of the project's lib.

E.g.  If project A depends on project B, add B/build/classes to the classpath of A.

Steve
On Tue, Aug 2, 2016 at 9:27 AM, Gareth Murfin <gareth...@gmail.com> wrote:
Is it possible to have a lib inside another lib? The option for freshing libs seems to be ghosted out.

--
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.



--
Steve Hannah
Software Developer
Codename One

--
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.

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

Gareth Murfin

unread,
Aug 4, 2016, 11:03:16 AM8/4/16
to CodenameOne Discussions
So  you or cant do createContainer? i just want to load up some stuff from my theme.res inside a lib.


On Wednesday, August 3, 2016 at 12:59:03 AM UTC+8, Steve Hannah wrote:
The old GUIBuilder is not amenable to splitting things into modules - it uses a monolithic app structure.  Themes, however, can be packaged into cn1libs quite nicely, and the new GUI builder can also work in a modular way, since the generated form classes take a Resources object as a parameter.

However, my in my personal experience, many of these IDE features aren't easily available inside library projects.  Usually if I want to do something creative, I just use a regular application project, and then create a custom ANT script for packaging what I need into a cn1lib.  The format of a cn1lib is pretty straight forward, so it's pretty easy to just wrap whatever I want into it.

Steve
On Tue, Aug 2, 2016 at 9:39 AM, Gareth Murfin <gareth...@gmail.com> wrote:
Thanks a lot. Also since there is no statemachine in a cn1lib, how do you do things like createContainer? Can you actually have a lib with a theme in it, and gui forms etc? I want to bundle up my chat functionality into a lib, including screens etc. The it would be an extremely easy way for any app to add a chat room.

On Wednesday, August 3, 2016 at 12:33:57 AM UTC+8, Steve Hannah wrote:
If you want to develop a lib that depends on another lib, just add the "build/classes" of the "depended upon" library project to the classpath of the project's lib.

E.g.  If project A depends on project B, add B/build/classes to the classpath of A.

Steve
On Tue, Aug 2, 2016 at 9:27 AM, Gareth Murfin <gareth...@gmail.com> wrote:
Is it possible to have a lib inside another lib? The option for freshing libs seems to be ghosted out.

--
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.



--
Steve Hannah
Software Developer
Codename One

--
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.

Shai Almog

unread,
Aug 5, 2016, 2:13:18 AM8/5/16
to CodenameOne Discussions
No.

Gareth Murfin

unread,
Aug 5, 2016, 8:46:43 AM8/5/16
to CodenameOne Discussions
Im assuming if I move to the new gui builder I can do this? Otherwise it should be implemented.

On Friday, August 5, 2016 at 2:13:18 PM UTC+8, Shai Almog wrote:
No.

Shai Almog

unread,
Aug 6, 2016, 1:23:31 AM8/6/16
to CodenameOne Discussions
This can't be fixed in the old GUI builder conceptually. The new GUI builder might work, it's not something we tested but it doesn't have architectural limits.
Reply all
Reply to author
Forward
0 new messages