1

My CN1 based app has been on the App Store and Google Play for a couple of months and works fine but when I rebuild the identical code now on NetBeans locally or through CN1 Build Servers, I'm unable to scroll through the list of containers like before.

The code is similar to the CN1 contacts demo here.

From the .codenameone folder I see.....

UpdateStatus.properties
#
#Fri Mar 27 12:34:19 MDT 2020
CodenameOne_SRCzip=118
CodenameOneJar=118
CodeNameOneBuildClientJar=105
designer=108
CLDC11Jar=108
JavaSEJar=118
lastUpdate=1585334059359
guiBuilder=107

Thx @Shai for the suggestions. A few updates:

  1. Problem still occurred with setAllowEnableLayoutOnPaint(true)
  2. Tested the CN1 contacts list demo and scrolling worked
  3. Primary difference with my code from that demo is that I’m using URLImage as in the 2nd CN1 example at https://www.codenameone.com/javadoc/com/codename1/ui/URLImage.html
  4. I was able to get my container of rows to scroll again by removing any use of URLImage
  5. Tested further by adding a URLImage to certain rows and not to others As soon as a row is assigned a URLImage it ceases to be a scrollable contact point for the container. As long as some of the other rows don’t have URLImages the whole container can be scrolled (when my finger gets to one of those rows). As soon as I run a trial where all the visible rows are URLImages, it’s not possible to scroll the container at all.
  6. I tried to replicate this problem with the CN1 URLImage example ref’d above but that example links to a nestoria api that seems to be unavailable now.
  7. Since this still works on code compiled in Jan. but fails for that same code recompiled now, I still wonder whether something has changed with my build process but I’ve not been able to replicate the issue with a CN1 demo.
  8. Will keep this open for now in case there are further suggestions but I can get by for now by minimizing my use of URLImage (reluctant to call these URLImages earlier in the app session because a lot of times the user might not even need these icons).

Thanks, Mike

13
  • Can you modify the contacts demo to reproduce this issue so you can file an issue with sample code? I don't see how URLImage should impact scrolling behsvior but it might break a layout if you have things such as nested scrollables etc.
    – Shai Almog
    Apr 6, 2020 at 2:11
  • Thx @Shai for the suggestion. I spent several hours trying to add URLImages to the contacts demo but have probably passed the point of diminishing returns on that approach. I kept running into other coding problems (c.getId() is alway null so the section where I added the URLImage code is always bypassed and I don’t see another method available to extract a contact from the sakila customer table). Perhaps a simpler way forward - the referenced URLImage demo in CN1’s documentation includes an out-of-date API, do you have a working version of that demo? Thx, Mike Apr 6, 2020 at 21:38
  • I'm not sure the API is out of date. If something is out of date we deprecate it. My concern is that you might have run into an unintended edge case that might indicate a bug either in our code or yours.
    – Shai Almog
    Apr 7, 2020 at 3:45
  • The link to api.nestoria.co.uk/api yields 404 Not Found. Is there an alternative link to use for that 2nd CN1 URLImage example? Apr 7, 2020 at 12:04
  • Not that I'm aware of. It seems the whole website is no longer available. Might be a temporary thing though.
    – Shai Almog
    Apr 8, 2020 at 2:29

1 Answer 1

1

No it didn't. Try the contacts demo, it's working right? How is your code different from that.

I'm guessing you're seeing artifacts related to the optimization of setAllowEnableLayoutOnPaint(). To test this in your root form invoke:

form.setAllowEnableLayoutOnPaint(true);

Before showing it. Then see if the problem is resolved. Assuming it is try to find the area that triggers this and follow up with us based on that. Notice that setting this to true has significant scrolling performance implications.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.