Re: [codenameone-discussions] Re: Trying to use third party lib (PubNub) to handle messaging

2019-04-10 Thread Steve Hannah
There is also a WebSocket sample in the SampleRunner
https://github.com/codenameone/CodenameOne/tree/master/Samples

The sample (a chat app), should run out of the box. Just download the CN1
sources, open the Sample Runner (instructions at link above), and click
"Launch" next to the WebSocketSample.

On Wed, Apr 10, 2019 at 7:14 PM Shai Almog  wrote:

> Here: https://github.com/shannah/cn1-websockets/
>
> --
> 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/e1a9b0d3-a28c-4fa9-a374-198eae7877f9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Steve Hannah
Web Lite Solutions Corp.

-- 
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/CABiRg%2BTgu7YPsFWq7_hmwRapQRyFU2yYcuBuxP0g8C4jjs%2B%3Dhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: AutoCompleteTextField NullPointerException

2019-04-10 Thread Shai Almog
Did you remove the auto-complete component (or one of its parents) from the 
form dynamically?

-- 
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/631ef81c-5545-4987-bacd-16ca2aeda599%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Trying to use third party lib (PubNub) to handle messaging

2019-04-10 Thread Shai Almog
Here: https://github.com/shannah/cn1-websockets/

-- 
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/e1a9b0d3-a28c-4fa9-a374-198eae7877f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] AutoCompleteTextField NullPointerException

2019-04-10 Thread shop . service . assistant
If you are experiencing an issue please mention the full platform your 
issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windws 10 Pro
Simulator Latest
Device PC, IOS 12+ Android 6+

[EDT] 0:2:35,975 - Exception: java.lang.NullPointerException - null
java.lang.NullPointerException
 at 
com.codename1.ui.AutoCompleteTextField$FormPointerPressListener.actionPerformed(AutoCompleteTextField.java:464)
 at 
com.codename1.ui.util.EventDispatcher.fireActionSync(EventDispatcher.java:459)
 at 
com.codename1.ui.util.EventDispatcher.fireActionEvent(EventDispatcher.java:362)
 at com.codename1.ui.Form.pointerPressed(Form.java:2946)
 at com.codename1.ui.Component.pointerPressed(Component.java:4502)
 at com.codename1.ui.Display.handleEvent(Display.java:2145)
 at com.codename1.ui.Display.edtLoopImpl(Display.java:1152)
 at com.codename1.ui.Display.mainEDTLoop(Display.java:1070)
 at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
 at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)

Uncaught Exception is this code:
Container layered = f.getLayeredPane(AutoCompleteTextField.getClass(), 
true);
Form f = getComponentForm();
Where "f" = null;Causing the Exception.

Thoughts?

Regards



-- 
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/ed1f844a-ffd4-4601-9847-98810f9a2817%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: how to render TextArea or textField to vary font and color within the body of text

2019-04-10 Thread Dave Dyer
Text is an interface that mostly mimics strings, but it's part of a group 
of interfaces I use to build my GUIs, not something
you could just pull out and plug into your applications.  You have to take 
the whole village, and I haven't engineered the
villiage for export and general use.   

The key things are that Text has string-like methods such as "append" and 
"getWidth", and interfaces with a canvas proxy
that supports things like"draw".  I produce widgets that look like this 
using Text objects, using essentially the same logic that
was once based on strings.  

-- 
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/75c1f3a5-e0f9-4bc5-b6fe-07f253110bbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Trying to use third party lib (PubNub) to handle messaging

2019-04-10 Thread greensoter
Where can I get the Websockets document and sample code? Then I can 
implement in my app as well, thanks!

On Wednesday, April 10, 2019 at 6:36:58 AM UTC+2, Shai Almog wrote:
>
> Hi,
> I think pubnub cut support for older libraries they implemented. I haven't 
> paid much attention since websockets proved to be a good substitute and 
> removed the need for solutions like that.
>

-- 
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/d2102655-3f01-4770-a197-276a9810b3c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: how to render TextArea or textField to vary font and color within the body of text

2019-04-10 Thread shop . service . assistant
Can you share the "text" Object and some examples of use?

It would be great if I were able to use mixed text fonts colors and icons.

Thanks in advance,

Regards.


On Wednesday, April 10, 2019 at 12:44:39 AM UTC-4, Shai Almog wrote:
>
> You have two options. Either native HTML or do it yourself. The native 
> HTML can only be rendered in a very specific component area. That's a 
> platform specific limitation that we can't workaround.
>

-- 
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/25f46b5c-1a62-490f-96c6-9089f0d067ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Generate XML file with XMLWriter

2019-04-10 Thread pythoudk
Yes it works.

But how to generate XML file and write tag into with XMLWriter ? 
With my code and toXML() method, that isn't work.

On Tuesday, April 9, 2019 at 8:46:18 PM UTC+2, pyth...@gmail.com wrote:
>
> Hi, 
> I have some problems to generate an XML file, the file is created but the 
> root tag is not written into the file when I call the writeXML(writer, 
> root) method;
>
> Here is the code :
>
> try{
> //Element root
> Element root = new Element("root");
> String path = FileSystemStorage.getInstance().getAppHomePath();
> XMLWriter xw = new XMLWriter(false); 
> OutputStream os = 
> FileSystemStorage.getInstance().openOutputStream(path+""+"test.xml");
> OutputStreamWriter writer = new OutputStreamWriter(os);
> xw.writeXML(writer, root); 
> os.close();
> writer.close();
>
> }catch(){
>.
> }
>
> Any idea ? 
> Thank you.
>

-- 
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/d26a28d1-afba-4041-bc7a-a285c8f0cd86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.