wei-spring / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

Editing Textfield freezes app on iOS #1312

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have been experiencing an odd behaviour in my recents builds that did not 
happen before. Whenever I try to edit a Textfield and write into it, the app 
freezes. Only happens on iOS, not on Android nor simulator.

I have been able to narrow down the problem and create a test case. Steps to 
reproduce the problem.

- Create a Form with a Tab Container

- In one Tab, do the following:

  Create a BoxLayout Y Container and make it ScrollableY

  Place a TextField into it

- In the other tab, just add a List (no need to attach any Renderer to it)

And that´s it. The app will freeze if you try to write in the TextField.

I have only tested with the old vm, so I don´t know if it is reproducible with 
the new one. That´s why I have not filed an issue on this.

Original issue reported on code.google.com by cverd...@gmail.com on 26 Jan 2015 at 5:44

GoogleCodeExporter commented 9 years ago
Please post your test case as code so I can try it out.  I have lots of 
examples like the one you posted here and they work fine for me.

Original comment by st...@weblite.ca on 28 Jan 2015 at 12:45

GoogleCodeExporter commented 9 years ago
Closing until I receive a test case.

Original comment by st...@weblite.ca on 30 Jan 2015 at 4:36

GoogleCodeExporter commented 9 years ago
Sorry, I am on a bussiness travell with no access to my production tools. I
can get to this as soon as I can back next week
El 28/01/2015 01:45, <codenameone@googlecode.com> escribió:

Original comment by cverd...@gmail.com on 30 Jan 2015 at 7:55

GoogleCodeExporter commented 9 years ago
No worries.  I just closed it to clean up my dashboard.  I'll reopen when there 
is a test case.

Original comment by steve.ha...@codenameone.com on 30 Jan 2015 at 8:01

GoogleCodeExporter commented 9 years ago
Hi

This test case has been checked with:
- ios.newVM=false
- Device iPad 1

-------------------

package com.test;

import com.codename1.ui.Container;
import com.codename1.ui.Display;
import com.codename1.ui.Form;
import com.codename1.ui.List;
import com.codename1.ui.Tabs;
import com.codename1.ui.TextField;
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.layouts.BoxLayout;
import com.codename1.ui.plaf.UIManager;
import com.codename1.ui.util.Resources;
import java.io.IOException;

public class MyApplication {

    private Form current;

    public void init(Object context) {
        try {
            Resources theme = Resources.openLayered("/theme");
            UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[0]));
        } catch(IOException e){
            e.printStackTrace();
        }
    }

    public void start() {
        if(current != null){
            current.show();
            return;
        }
        TextField text = new TextField();        
        Container box = new Container(new BoxLayout(BoxLayout.Y_AXIS));
        box.setScrollableY(true);
        box.addComponent(text);        
        List list = new List();        
        Tabs tab = new Tabs();
        tab.addTab("", box);
        tab.addTab("", list);        
        Form hi = new Form("Hi World");     
        hi.setLayout(new BorderLayout());
        hi.addComponent(BorderLayout.CENTER, tab);
        hi.show();
    }

    public void stop() {
        current = Display.getInstance().getCurrent();
    }

    public void destroy() {
    }

}

Original comment by cverd...@gmail.com on 1 Feb 2015 at 11:36

GoogleCodeExporter commented 9 years ago

Original comment by steve.ha...@codenameone.com on 1 Feb 2015 at 1:19

GoogleCodeExporter commented 9 years ago
Your test case is working fine for me on both the old and new VM.  I tested 
newVM on iPhone4S iOS 8.1.  I tested the old vm on iPad 2 (iOS 7.1) (via Xcode 
simulator).  Don't have access to any older devices.

If you can add more information or a new test case that will fail, I'll reopen.

Original comment by steve.ha...@codenameone.com on 3 Feb 2015 at 6:59