[codenameone-discussions] question regarding Display.callSerially()

2019-09-13 Thread Thomas
Is there any advantage of splitting a Display.callSerially() task into smaller subtasks or would all the queued serial runnable be executed into the next EDT frame anyway. For example if I have Display.callSerially(()->{A; B; C;}); would Display.callSerially(()->{A;});

Re: [codenameone-discussions] How to return an array from a native call?

2019-09-13 Thread Thomas
TY Steve. On Friday, September 13, 2019 at 11:06:52 PM UTC+2, Steve Hannah wrote: > > byte[] was the only one that worked out of the primitive arrays. > > They’ll all work in the next server update though. > > On Fri, Sep 13, 2019 at 1:44 PM Dave Dyer > wrote: > >> I've passed byte[] as

Re: [codenameone-discussions] How to return an array from a native call?

2019-09-12 Thread Thomas
create a native interface and then > generate the native implementations using the IDEs “generate native > interfaces” option. > > On Wed, Sep 11, 2019 at 5:01 PM Thomas > > wrote: > >> I need to return an array of primitives ( a double[] ) as the result of a >> na

[codenameone-discussions] How to return an array from a native call?

2019-09-11 Thread Thomas
I need to return an array of primitives ( a double[] ) as the result of a native call in a NativeInterface. However, even if I guess it is possible, I could not find any example of this in the documentation or the various cn1libs I already looked at. And I don't know what would be the correct

Re: [codenameone-discussions] Re: NoSuchMethodError No Direct Method

2019-08-29 Thread Thomas
you probably forgot to click on "Refresh CN1 libs" after replacing the old .cn1lib file in your project with your modified one. On Thursday, August 29, 2019 at 5:08:32 PM UTC+2, Gareth Murfin wrote: > > That's confusing. Weirdly I was trying to make a change to the bluetooth > lib but then

[codenameone-discussions] Re: Use a google native map inside a scrollable container

2019-08-29 Thread Thomas
scrolling wil not mix with panning as the drag event is consumed by the map when occuring on the map so scrolling would only occur when the drag event is outside the map. This king of UI is used in many apps. Anyway bad UX or not, this doen't answer the question of how to have a native

[codenameone-discussions] Use a google native map inside a scrollable container

2019-08-28 Thread Thomas
I tried to use a native google map inside a Form with a scrollable (in Y direction) body. The goal is to have an interactive map that take part of the screen and other components below that can exceed the screen height (hence the necessity to be able to scroll) Unfortunately I couldn't succed

[codenameone-discussions] Re: TextArea bugs

2019-08-27 Thread Thomas
On Tuesday, August 27, 2019 at 4:41:23 AM UTC+2, Shai Almog wrote: > > These probably aren't bugs, I explained more in the issue you posted: > https://github.com/codenameone/CodenameOne/issues/2894 > Exept for the TextArea prefered width, they are all bugs actually. On Tuesday, August 27, 2019

Re: [codenameone-discussions] Browsercomponent crash in simulator

2019-08-23 Thread Thomas
I was able to solve this issue by setting my projects (CN1 core, CN1-JavaSE and my CN1 app) compiler compliance level to 10 and then back to 1.8 (which forced a rebuild of all classes). I don't really know what appened (probably a class file that was corrupted). I hope this is now solved for

Re: [codenameone-discussions] Browsercomponent crash in simulator

2019-08-22 Thread Thomas
he JRE. The relevant classes haven't > been modified since 2018. What JDK are you running on? What OS/version? > > On Thu, Aug 22, 2019 at 10:27 AM Thomas > > wrote: > >> I just updated my fork with the latest dev version of CN1 and I have this >> error thr

[codenameone-discussions] Browsercomponent crash in simulator

2019-08-22 Thread Thomas
I just updated my fork with the latest dev version of CN1 and I have this error thrown when launching an app containing a BrowserComponent in the simulator: [JavaFX Application Thread] 0:0:6,797 - Exception: java.lang.ClassCastException - com.sun.webkit.dom.JSObject cannot be cast to

[codenameone-discussions] Re: Commented out location manager map

2019-07-18 Thread Thomas
Indeed, I don't know if you can have quotas for a specific key but you can for a specific API and a specific project (wich is pretty much the same): https://console.cloud.google.com/quotas?project=_&_ga=2.1801017.-925146160.1563354749. So you can have restrictions for the google map

[codenameone-discussions] Commented out location manager map

2019-07-17 Thread Thomas
I have seen you commented out the google map api key for the location manager because google changed its policy regarding api key usage without billing information. Just wanted to say than rather than doing this, you should probably just have capped the google map api associated to this key on

[codenameone-discussions] Re: Android API 28

2019-06-29 Thread Thomas
time to switch to a common redering engine like skia for all platforms ;) On Saturday, June 29, 2019 at 5:51:45 AM UTC+2, Shai Almog wrote: > > Hi, > I see the problem. It's a bit tricky. It seems Android killed support for > enlarging the clipping area which is a bit insane... > -- You

[codenameone-discussions] Re: rendering bug in the latest dev version of CN1

2019-06-24 Thread Thomas
OK just did On Tuesday, June 25, 2019 at 6:28:42 AM UTC+2, Shai Almog wrote: > > I suggest filing an issue about this too. It looks like a misplaced > optimization or translation issue. > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions"

[codenameone-discussions] rendering bug in the latest dev version of CN1

2019-06-24 Thread Thomas
I recently updated my CN1 fork and the latest development version has a rendering bug with some components. I made a small video to show you the issue with a date picker: https://streamable.com/w3wpm At the right, this is the app runing with the latest CN1 dev version and at the left, with the

[codenameone-discussions] UnsupportedClassVersionError: javafx/scene/media/MediaException, how can I resolve this?

2019-06-07 Thread thomas
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: javafx/scene/media/MediaException has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0 This

[codenameone-discussions] AutoCompleteTextField and potentially long filtering?

2019-04-17 Thread Thomas
The update of the suggestions popup of an AutoCompleteTextField is said to be completely asynchronous. However, looking at the code of the AutoCompleteTextField class, it looks like the filtering and creation of the model for the popup is called on the EDT thread directly. The only thing I

[codenameone-discussions] Re: SQLite and BLOB type

2019-04-03 Thread Thomas
> > We'd need to detect the various types of arguments that are submitted and >> convert them to native calls for iOS. Passing arrays and other arbitrary >> objects to the C layer in the iOS port is painful so no one got around to >> do it for years. As I said, the demand for this was low and

[codenameone-discussions] Re: SQLite and BLOB type

2019-04-03 Thread Thomas
I never assumed that I am reading all the data nor that I have only one table. I only said that if you have 100 match for a query (you can have thousands of rows in your table. That is the point of having a DB, handling multiple objects not just one or two) then you would have to read 100

[codenameone-discussions] Re: About the Chinese characters in the URL request

2019-04-03 Thread Thomas
This is because it isn't the request content but URL get parametters So you should probably do something like: String nickName="网名"; String utf8nickName = new String(nickName.getBytes(), "UTF-8"); String url =“http://localhost:8080/updateUser/+userID+ "/"+utf8nickName +"/"+email+”/“; -- You

[codenameone-discussions] Re: SQLite and BLOB type

2019-04-02 Thread Thomas
On Wednesday, April 3, 2019 at 6:20:53 AM UTC+2, Shai Almog wrote: > > No. > We don't support byte buffers. Even if we did I'm talking about just using > a binary file which will always be faster than any sqlite implementation. > This will also allow reducing the database size which will make

[codenameone-discussions] Re: SQLite and BLOB type

2019-04-02 Thread Thomas
Blob provide a clear benefit on devices too. It allows to reduce the size of the database when you have large objects to store (not necessarily pictures. It can be geographic shapes like in spatialite for example or any other large object) and these objects can also be deserialised more quickly

[codenameone-discussions] SQLite and BLOB type

2019-04-02 Thread Thomas
I need to store some byte encoded serialized objects (like protobuf encoded objects and similar) into an SQLite table. But I have seen in the forum that there was some issues with the support of BLOB type in SQLite by CN1. However, these posts are quite old and since then, some plugins like

[codenameone-discussions] Re: status of sqlite DB and threads?

2019-03-31 Thread Thomas
On Saturday, March 30, 2019 at 6:28:45 AM UTC+1, Shai Almog wrote: > > Because the constructor happens on a separate thread. > Sorry but I am afraid I don't get you here. What do you mean by "the constructor happens on a separate thread"? Are you talking about the Wrapper (=ThreadSafeDatabase)

[codenameone-discussions] Re: status of sqlite DB and threads?

2019-03-28 Thread Thomas
On Friday, March 29, 2019 at 4:31:27 AM UTC+1, Shai Almog wrote: > > We made some improvements to that but still strongly recommend writing to > the database from a single thread. EasyThread is a relatively simple > solution for that and it can be implemented in the level of the data access >

[codenameone-discussions] status of sqlite DB and threads?

2019-03-28 Thread Thomas
I have an sqlite database that might be accessed by multiple concurrent threads. I saw this blog post: https://www.codenameone.com/blog/threadsafe-sqlite.html but the ThreadSafeDatabase class is deprecated https://www.codenameone.com/javadoc/com/codename1/db/ThreadSafeDatabase.html . So

[codenameone-discussions] support of the full java.util.concurrent API?

2019-03-28 Thread Thomas
Hi I am trying to implement some complex multi-threading process in my app (with complex objects that can be partially and parallely fetched from a server and that are populated (with some computation from the fetched data and local data) as soon as each part is received) but the lack of the

Re: [codenameone-discussions] Is apple 2 factor authentication supported?

2019-03-04 Thread thomas
I assume that tis was the case. After updating to Version 6.0 it worked fine. Am Montag, 4. März 2019 04:19:37 UTC+1 schrieb Shai Almog: > > Is it possible you have an old version of Codename One Settings? > -- You received this message because you are subscribed to the Google Groups

Re: [codenameone-discussions] Is apple 2 factor authentication supported?

2019-03-03 Thread thomas
I open the codename One Setting -> iOS Certificate. I am propted to enter mail and password. After entering both correctly I see the error messgae that the login is not possible. Rhere is chance to enter the PIN -- You received this message because you are subscribed to the Google Groups

[codenameone-discussions] Is apple 2 factor authentication supported?

2019-03-02 Thread thomas
apple requires now 2 factor authentication, after enabling it, I cant login to the iOS Certificate Wizard any more IDE: NetBeans Desktop iOS Device: iPhone -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this

Re: [codenameone-discussions] Re: Passing a reference of a NativeInterface instance as parametter of another NativeInterface method?

2018-10-19 Thread Thomas
t to and from longs and > passed back and forth. On java-native platforms (e.g. simulator and > Android), I generally use a static lookup table, then pass ids of this > lookup table back and forth. > > Steve > > On Thu, Oct 18, 2018 at 10:20 PM Thomas > > wrote

[codenameone-discussions] Re: Passing a reference of a NativeInterface instance as parametter of another NativeInterface method?

2018-10-18 Thread Thomas
OK Thanks. As for the ByteBuffer I completely agree yes ;) (It is the basis of the binary messages solution chosen by Flutter to communicate between flutter dart code and native one and it is SO convenient and powerfull to work with that I also regret not having such an easy solution in CN1

[codenameone-discussions] Passing a reference of a NativeInterface instance as parametter of another NativeInterface method?

2018-10-18 Thread Thomas
I wonder if there is a way to pass a NativeInterface object instance as parametter of the method of another NativeInterface. I mean when I create two objects that extends NativeInterface like this: NativeObjectType1 o1 = (NativeObjectType1 ) NativeLookup.create( NativeObjectType1 .class);

Re: [codenameone-discussions] resize / resolution for js port

2018-10-11 Thread Thomas
> use this information for our rendering. You should be able to rely on this > for the most part. I.e. If you use DIPS/mm for your units, it should > produce generally good results on all DPIs. > > On Thu, Oct 11, 2018 at 9:11 AM Thomas > > wrote: > >> I guess this

Re: [codenameone-discussions] resize / resolution for js port

2018-10-11 Thread Thomas
I guess this is just that you can't relly on DPI on desktop platforms as desktop platforms usually have no clue of the physical dimensions of your screen. They just know its resolution and, on desktop, you can have really different screen physical dimensions for the same resolution (for example

[codenameone-discussions] style change not taken into account

2018-10-10 Thread Thomas
I have a weird bug. If I have two different styles for the selected and unselected state of a component, when I change the state of this component after its initialisation, the style do not change (even if I call a repaint on this component). If in the inititlisation of this component I set

[codenameone-discussions] Re: Scrollable Y container

2018-10-10 Thread Thomas
I found the origin of the issue. My scollable container was inside another container using the default Flowlayout . And it appears that, in that case, the scrolling is bugged (even if I did set setscrollable(false) to the parent container using a Flowlayout). As soon as I use a BorderLayout for

[codenameone-discussions] Re: Scrollable Y container

2018-10-09 Thread Thomas
OK. My form isactually using a LayeredLayout but I have set setScrollableY(false) at the form level so it is supposed to not be scrollable... Also if a form has two scrollable child conponents where one is masking the other (one is in the contentpane and the other in the layerepane), is it

[codenameone-discussions] Re: Scrollable Y container

2018-10-09 Thread Thomas
A small video to show the issue: https://streamable.com/78era The scrollable container is rendered into the layeredPane of a Form (I don't know if it matters) On Wednesday, October 10, 2018 at 5:13:15 AM UTC+2, Thomas wrote: > I have a container that contains some multibuttons and tha

[codenameone-discussions] Scrollable Y container

2018-10-09 Thread Thomas
I have a container that contains some multibuttons and that I declared scrollable like this: picker = new Container(BoxLayout.y()); picker.setScrollableY(true); but on the simulator (not tested on real devices yet), when I drag my mouse vertically, the container correctly scrolls its content

[codenameone-discussions] Re: problem with capture video

2018-10-04 Thread Thomas
Please, post the code as text because it is impossible to read it from your screenshot... On Thursday, October 4, 2018 at 6:06:37 PM UTC+2, Fuad Nassar wrote: > > hi, > I try to use this code to capture and show video > > > [image: Capture.PNG] > > > > and then when running it under ( 4.4.4

[codenameone-discussions] Re: animateUnlayout explanation?

2018-10-03 Thread Thomas
OK. I see. Thanks for the clear explanation. On Thursday, October 4, 2018 at 5:58:39 AM UTC+2, Shai Almog wrote: > Invalid state means requires layout. Deinitialize means no longer visible > to the user. > Say you want to delete a component and want it to fly out of the screen. > Maybe even

[codenameone-discussions] animateUnlayout explanation?

2018-10-03 Thread Thomas
could you provide a detailed example on how to use the animateUnlayout(final int duration, int opacity, Runnable callback) method of Container? Because, if I look at the code I don't really understand. It takes a pending layout and animate a morphing from the pending layout to the current

[codenameone-discussions] Re: Async / Await

2018-09-27 Thread Thomas
you don't need to manipulate bytecode in runtime. Like I said, this lib also offers you the possibility to manipulate the bytecode at compilation time (Option 4, the recommanded one, that makes this lib a transitive dependency). On Friday, September 28, 2018 at 6:47:14 AM UTC+2, Shai Almog

[codenameone-discussions] Re: considered improvment: custom border shape and border shadow

2018-09-27 Thread Thomas
OK. just FYI I think Skia already fully support MoltenGL (https://moltengl.com/moltenvk/) that allows to bing Vulkan API to Metal. So it seems like it is already pôssible to use Skia with Metal (by using the MoltenGL intermediate). But it sure would be better to have Metal directly supported

[codenameone-discussions] Async / Await

2018-09-27 Thread Thomas
Just discovered this awsome library that I wanted to share with you: https://github.com/electronicarts/ea-async When devlopping with react-native or Flutter I frequently use async/await when my app needs to communicate whith a distant server or a local database for example. Actually, promises

[codenameone-discussions] Re: OnOffSwitch Problems

2018-09-27 Thread Thomas
As I am not sure you saw it, just wanted to inform you that I attached the code to the Github issue 2 days ago. On Tuesday, September 25, 2018 at 7:40:31 AM UTC+2, Shai Almog wrote: > > Thanks! > You can attach it to the issue or submit a PR so we have the log of where > the code came from. >

[codenameone-discussions] Re: considered improvment: custom border shape and border shadow

2018-09-27 Thread Thomas
Skia evolved a lot these last years (mainly because Google (and others like Mozilla or Microsoft) decided to use it as the common rendering engine for all its top products, and specifically Chrome and Flutter that are cross-platforms) So yes Skia is now capable to run on top of GPU hardware

[codenameone-discussions] Re: Multiple Form LayeredPanes and Layout animation issue

2018-09-27 Thread Thomas
Here is a video showing the issue: https://streamable.com/lbd1b and the source of this standalone test case: https://github.com/ramsestom/CN1TestBugs On Thursday, September 27, 2018 at 6:21:32 AM UTC+2, Shai Almog wrote: > There are some edge cases in the paint order of overlays. If you can

[codenameone-discussions] Re: Multiple Form LayeredPanes and Layout animation issue

2018-09-26 Thread Thomas
I will try to create a standalone test case tomorrow. I tracked the issue down to the thisContainer.repaint(); call into the MorphAnimation updateState() function (If I commant this repaint, I do not see the component animation occur, of course, but the underlying layeredPane do not dissapear

[codenameone-discussions] Re: considered improvment: custom border shape and border shadow

2018-09-26 Thread Thomas
In fact, the iOSImplementation could also be ported to SKIA as SKIA work well on iOS (Flutter is using SKIA on iOS for example). SKIA actually work on many platforms (it can also be used for desktop platforms) As for the native component integration it would be a bit tricky I guess. It is

[codenameone-discussions] Multiple Form LayeredPanes and Layout animation issue

2018-09-26 Thread Thomas
I have an overlay component (actually a container) that is painted into the Form layeredPane (it is added to the LayeredPane returned by form.getFormLayeredPane(MyOverlay.class, true) where MyOverlay is the name of my class) and I have an interactionDialog (in formMode = true) that can be

[codenameone-discussions] Re: considered improvment: custom border shape and border shadow

2018-09-26 Thread Thomas
I am interested in the possibility of doing anti-aliased (AA) shape clipping so I investigated a bit more and yes, some graphics libraries are able to perform AA shape clipping "efficiently" (it probably affect performances a bit compared to aliased shape clipping). For example SKIA, that

[codenameone-discussions] Re: dash effect

2018-09-25 Thread Thomas
Unfortunatly the CN1 Stroke do not support dash patterns. So unless your path is really basic (like a rectangle or a few straight lines), in which case you can probably paint the dash effect "by hand", (this is the approach used to render dashed components borders in CN1), it would be quite

[codenameone-discussions] Re: device rotation

2018-09-25 Thread Thomas
What I am saying is that a good support of low level graphic is usually necessary to be able to build high level stuff (=components) that are appealing. For instance, if I take the example of an OnOffSwitch component, even if it is quite a simple component in its composition (it is just two

[codenameone-discussions] Re: OnOffSwitch Problems

2018-09-24 Thread Thomas
I have the code for an OnOffSwitch component with a material design style by default. It is not polished yet (It is part of a larger components collection that I still regularly modify when I need a new functionnality or find a bug) but I can share the code as a starting point for your rewrite

[codenameone-discussions] Re: Question regarding the order of events in the EDT

2018-09-24 Thread Thomas
I took a closer look at how CN1 is handeling pointer events and I must say it is kind of a mess. Most of this is explained by the fact that the pointer events logic is directly merged into the Form, Container and Component classes (rather than having a dedicated general pointer events

[codenameone-discussions] Re: device rotation

2018-09-24 Thread Thomas
Too be fair, a good support of graphics transforms and operations are keys to allow the creation of beautifull GUI. This is not restricted to gaming platforms. If you want to implement the material design specifications for example, you need a good graphic transform support for animations,

[codenameone-discussions] Re: Question regarding the order of events in the EDT

2018-09-21 Thread Thomas
You are wrong. All recents major ligthweighted frameworks support "events bubbling" (where events are passed from child to parent, as opposed to "events capturing" or "trickling", where event is passed from parent to child). Flutter for example takes this approch (events are dispached by

[codenameone-discussions] Re: Question regarding the order of events in the EDT

2018-09-20 Thread Thomas
I see. So events are dispatched in the direction parent -> child rather than beeing child -> parent. That seems pretty illogic and useless to be able to consume an event in that case. Usually you consume an event so it isn't passed from a child component to its parent because the child, which

[codenameone-discussions] Re: How can i grab the maximal size for a label in a gridlayout

2018-09-20 Thread Thomas
use a TableLayout and give the second column a width of -2 (to make it take all the available remaining space) On Thursday, September 20, 2018 at 10:00:42 AM UTC+2, tobias...@googlemail.com wrote: > > Hi, > > I have a gridlayout with 4 components. The 1st, the 3rd and the 4th are > images with

[codenameone-discussions] Question regarding the order of events in the EDT

2018-09-19 Thread Thomas
In what order are events dispatched by the EDT in the component hierarchy? The logic would be that events are dispatched from the component with the highest Z-order (the one "closest" to the screen and thus the user) up to the one witht the lowest Z-oder (the root form). But it doesn't seems to

[codenameone-discussions] Re: considered improvment: custom border shape and border shadow

2018-09-14 Thread Thomas
I thought shape clipping with anti-aliasing was supported natively by ios and android (since android 4.4 or so) at least. And what is the problem with adding a getClipShape() method exatly? if there is a setClip(Shape) method, it makes sense to have the counterpart getClipShape() method to

[codenameone-discussions] considered improvment: custom border shape and border shadow

2018-09-11 Thread Thomas
I am planning to modify the CN1 core code to allow components to have any custom shape boder and to be able to drop a shadow based on their elevation value (like in material design). But this raised a few question. First of all, to do this correctly, and with good performances, I must be able

Re: [codenameone-discussions] Re: javascriptContext issue on android

2018-09-04 Thread Thomas
ncluded in next update on Friday. > > Best regards > > Steve > > On Tue, Sep 4, 2018 at 4:00 PM, Steve Hannah > wrote: > >> Thanks. I should have a fix for this shortly. >> >> On Tue, Sep 4, 2018 at 3:30 PM, Thomas >> >

Re: [codenameone-discussions] Re: javascriptContext issue on android

2018-09-04 Thread Thomas
> On Tue, Sep 4, 2018 at 9:32 AM, Thomas > > wrote: > >> Actually, the issue seems to be related to webview that fails to be >> loaded on my android device using CN1. >> I commented the logger part in my code and my app still doesn't work >> properly o

Re: [codenameone-discussions] Re: javascriptContext issue on android

2018-09-04 Thread Thomas
racker so this doesn't get lost. > > On Tue, Sep 4, 2018 at 9:32 AM, Thomas > > wrote: > >> Actually, the issue seems to be related to webview that fails to be >> loaded on my android device using CN1. >> I commented the logger part in my code and my app still does

Re: [codenameone-discussions] Re: javascriptContext issue on android

2018-09-04 Thread Thomas
Actually, the issue seems to be related to webview that fails to be loaded on my android device using CN1. I commented the logger part in my code and my app still doesn't work properly on my android device with this kind of message in the debugger logcat: I/WebViewFactory: Loading

[codenameone-discussions] javascriptContext issue on android

2018-09-03 Thread Thomas
I am using the deprecated JavascriptContext class to create a logger Inside a BrowserComponent like this: JavascriptContext ctx = new JavascriptContext(internalBrowser); JSObject logger = (JSObject)ctx.get("{}"); logger.set("log", new JSFunction() {

[codenameone-discussions] Re: issue with container dimensions when using a tablelayout inside multiple others layouts

2018-08-29 Thread Thomas
What I am trying to achieve is this: [image: layout_scheme.jpg] where C1b is a component that should have its prefered size and C1 should take the rest of the remaining width (I use the constraint width=-2 for the last column of the table so it extends to take all the parent width). The

[codenameone-discussions] issue with container dimensions when using a tablelayout inside multiple others layouts

2018-08-28 Thread Thomas
I have a container C1 with a tablelayout that is inside another container C0 using a borderlayout.(container C0 cover all the screen and C1 is its unique child, positionned at south). As long as I use it like this, this is ok, the container C1 has the same width as container C0 (= the width of

[codenameone-discussions] JAXB usage?

2018-08-13 Thread Thomas
Is it possible to use JAXB in CN1 to bind some XML xs scheme file (downloaded by the app) onto some classes of the the app? Or do I have to write a custom parser by hand ? If you are experiencing an issue please mention the full platform your issue applies to: IDE: NetBeans/Eclipse/IDEA

[codenameone-discussions] Re: auto select first option on an AutoCompleteTextField?

2018-08-12 Thread Thomas
Did you try to set "please select an option" with setHint()? On Monday, August 13, 2018 at 5:27:40 AM UTC+2, Gareth Murfin wrote: > > How do you auto select first option on an AutoCompleteTextField? so it > doesnt sit there white i want first option to be "please select an option", > but if I

[codenameone-discussions] Re: how to avoid ConcurrentModificationException when threads add elements to the UI

2018-08-12 Thread Thomas
I don't think that the current cn1 native map implementation has an asynchronous version of functions for transforming screen position from/to geo position. Anyway, there is something I am not sure to understand in how CN1 invokeAndBlock works. I thought that with an invokeAndBlock call, the

[codenameone-discussions] Re: how to avoid ConcurrentModificationException when threads add elements to the UI

2018-08-12 Thread Thomas
D/MyApplication(24672): [EDT] 0:0:13,103 - Exception: java.util.ConcurrentModificationException - null W/System.err(24672): java.util.ConcurrentModificationException W/System.err(24672):at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573) W/System.err(24672):at

[codenameone-discussions] how to avoid ConcurrentModificationException when threads add elements to the UI

2018-08-11 Thread Thomas
I have some threads that perform networker requests and then create ui elements based on the results of these request. These elements (markers) are then added to a map. But at this point the app sometimes crash with a ConcurrentModificationException. The function in my threads that is called

[codenameone-discussions] Re: Native map MapListenerEvent and getBoundingBox causing an error

2018-08-08 Thread Thomas
I allready have my own queue for network calls that control that the same request is not performed twice. So user dragging his finger would not be an issue for the network queue here ;) . As for the invokeAndBlock method call, if I replace it with an assyncroneous call of the native Google map

[codenameone-discussions] Re: Native map MapListenerEvent and getBoundingBox causing an error

2018-08-08 Thread Thomas
Forgot to say that the error is happening on android. In the simulator this is OK. On Thursday, August 9, 2018 at 5:56:41 AM UTC+2, Thomas wrote: > > I use the native map cn1lib with a maplistener that, when the position of > the map changed, performs a getBoundingBox() request o

[codenameone-discussions] Native map MapListenerEvent and getBoundingBox causing an error

2018-08-08 Thread Thomas
I use the native map cn1lib with a maplistener that, when the position of the map changed, performs a getBoundingBox() request on the map (to get the new bounding box of the displayed zone) and then use a third party database to request some elements into this zone. The problem is that, when

[codenameone-discussions] Re: LayeredLayout and interactive component issue

2018-08-07 Thread Thomas
No my hierarchy is pretty simple. Using the component inspector I have my form, that contains my parent container P1 (+ the toolbar) that itself contains the child component C1, that contains 3 components (its layer components). So I really don't get it. On Wednesday, August 8, 2018 at

[codenameone-discussions] LayeredLayout and interactive component issue

2018-08-07 Thread Thomas
I have a Container (lets call it P1) that contains a single (for now) interactive child component (C1). This child component itself is a container using a LayeredLayout (it has 3 layers) and is interactive (it implements pointer click and drag events with override of the low level pointer

[codenameone-discussions] Re: String Validations

2018-08-05 Thread Thomas
You can easilly test for alphanumeric characters with a regexp of the RE class: https://www.codenameone.com/javadoc/com/codename1/util/regex/RE.html On Friday, July 20, 2018 at 1:11:02 PM UTC+2, Muchey wrote: > > I am trying to validate where user's input is only Characters with symbols >

[codenameone-discussions] Re: WebSocket Server

2018-08-03 Thread Thomas
use the websockets cn1lib On Friday, August 3, 2018 at 3:19:03 PM UTC+2, remon...@ordyx.com wrote: > > We need to have a WebSocket Server running on both iOS and Android. How > can we get this accomplished using CodenameOne? Is there a library you > recommend? > -- You received this message

[codenameone-discussions] Re: parallel layout animations

2018-05-26 Thread Thomas
What I want is to be able to force some animations to run in parallel when I know that they won't conflict with eachother. But I looked at the AnimationManager class and it looks like it is not possible yet (the AnimationManager only have a serial animation queue). So it looks like I would have

[codenameone-discussions] Re: Picker: how to determine if user picked a value or canceled

2018-05-26 Thread Thomas
Yes but how can I determine exactly when it is canceled (as I need to perform some action immediatly after this cancel event)? After the picker was opened, the user can take 1, 2, 3, 4s... 1min... to actually cancel or confirm it. And, without any cancel event fired, I have no way to

[codenameone-discussions] parallel layout animations

2018-05-25 Thread Thomas
I have a form with some component defined as containers containing two components that animate one relative to the other on user interaction. This animation is handled with a ComponentAnimation (on layout and style) on the container (same as in TextComponent). But the thing is that when one of

[codenameone-discussions] Re: Picker: how to determine if user picked a value or canceled

2018-05-25 Thread Thomas
The problem is that the action listener is not triggered on cancellation events. So I have no way to determine that the user finished to act with the picker if he cancelled its action... On Friday, May 25, 2018 at 7:21:19 AM UTC+2, Shai Almog wrote: > > We don't have consistent behavior for

[codenameone-discussions] Re: Programmaticaly triggering a press event on a picker button

2018-05-25 Thread Thomas
OK thanks. I previously tried with pressed() and it didn't work but calling release() after pressed() is actually working. On Friday, May 25, 2018 at 7:17:45 AM UTC+2, Shai Almog wrote: > > Since it derives from button you can invoke press() followed by release(). > -- You received this

[codenameone-discussions] Picker: how to determine if user picked a value or canceled

2018-05-24 Thread Thomas
What event should I listen to on a picker to be able to determine the new value choosed by the user? Because the ActionListeners are trigerred only if the user confirmed a value (so it is not if it canceled) and the focusLost() method of focusListeners is actually triggered in any cases but

[codenameone-discussions] Programmaticaly triggering a press event on a picker button

2018-05-24 Thread Thomas
I need to programmatically trigger a press event on a picker (so that the picker automatically open the picker dialog). How can I do that? -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop

[codenameone-discussions] Re: Why am I getting an Android Build Error due to issues with Manifest Merger?

2018-05-21 Thread Thomas
If the CN1 build cloud service is not broken, you probably have a wrong android setting in your codename_settings.properties file. You should post the log file provided by the cloud server to track it down On Tuesday, May 22, 2018 at 4:14:50 AM UTC+2, jaweil...@gmail.com wrote: > > IDE: IDEA >

[codenameone-discussions] Re: Make a better CodenameOne and get it adopted by more developers around the world

2018-05-19 Thread Thomas
Didn't know you already tried this kind of incentive when CN1 was launched. But I think that one of the mistake was to say you would reward a free basic subscription for any contribution. Had you said you MAY give a reaward (at you convenience) for a contribution if you consider it a worth one

[codenameone-discussions] Re: Make a better CodenameOne and get it adopted by more developers around the world

2018-05-18 Thread Thomas
I think the real issue with CN1 is the lack of user contributions. Despite CN1 beeing 6 years old now, the number of CN1libs is quite limited (and most are from the CN1 Team itself) and if you look at the github, you can see that the number of contributors to the source code is only 25. With

[codenameone-discussions] Re: better estimate of mm distances and dp/sp mesurement units support?

2018-05-15 Thread Thomas
Sorry but I don't understand what ou are saying here. I probably did not explain clearly enaugh the changes I am proposing. I think submiting a pull request would be easier than trying to explain in detail (I would do it as soon as my previous pull request is reviewed). Anyway I compilled with

[codenameone-discussions] Re: better estimate of mm distances and dp/sp mesurement units support?

2018-05-14 Thread Thomas
Yes I want to keep the millimeter unit as a supported mesurement unit in CN1, don't worry. But I also want to add dp and sp as possible additional units. In any case, I think it makes more sense to make getDeviceDensity() directly return the PPI value (so the value in metrics.densityDpi in

[codenameone-discussions] Re: better estimate of mm distances and dp/sp mesurement units support?

2018-05-14 Thread Thomas
I started to make the changes into CN1 source code to improve how densities are handled. One of the only issue I have is that currently density constants are small int values that actually do not match the PPI (pixels per inch) density. It would make more sense to have them as PPI values (like

[codenameone-discussions] Re: hot reload on native simulators?

2018-05-08 Thread Thomas
Having tested both, I approve of the fact that CN1 is more complete than Flutter on several aspects: - support of Java/Kotlin, which are familiar languages to many developers (while Dart requires learning a new language) and which allows to "easily" port one of the many libraries developed in

[codenameone-discussions] BlendMode for graphics

2018-05-07 Thread Thomas
I am currently implementing some custom components and, in some cases, I would like to be able to draw a shape over another one in the Graphic object using another Blend mode that the default one (that seems to be the ADD BlendMode). For example, I would like to draw a transparent shape in

[codenameone-discussions] Re: animate() only called once

2018-05-03 Thread Thomas
I called registerAnimatedInternal() in initComponent() yes (and it is correctly called as I have 'Animated' print into my console output). I don't know why it is cleared. Seems like a bug. For now I fix it by removing the super.animate() line (as my ancestor Component do not have any animation

  1   2   >