[codenameone-discussions] Re: Components of the forms disappear II

2018-09-18 Thread Shai Almog
Hi,
the console of where this is happening. The console for the device if it 
happens there. For Android you can debug with a cable and for other devices 
there is this cn1lib 
https://www.codenameone.com/blog/native-logging-certificate-wizard.html

-- 
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/a0b31180-bfdd-4150-ba3c-9ce9d1c42873%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Components of the forms disappear II

2018-09-18 Thread rdvg1962
Hi,

I am a man older than 50 and I skipped java and object oriented programming 
to work on codename one.

I have doubts about the console you mention. Is the debug console that has 
my IDE (netbeans) or  what?

-- 
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/5a8431e2-e6d3-4f89-8086-5626c6117f25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Components of the forms disappear II

2018-09-14 Thread Shai Almog
Hi,
you would see a crash if a memory issue was involved. I suggest looking at 
the console for the device and seeing if something was printed when this 
happened.
Use a process of elimination to try and determine the part of the code 
that's responsible for this issue.

-- 
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/a8bf6b5b-1019-4c69-b472-8a384c043879%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Components of the forms disappear

2018-08-28 Thread Shai Almog
Hi,
from a cursory look I don't see anything that should cause this. If you can 
isolate the problem to a runnable test case it would help. I suggest 
logging to see what happens and ideally trying to reproduce it on the 
simulator where you can use the Component Inspector to try and understand 
what happened to the components.

-- 
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/69c02d88-9053-4a02-b509-ddec10b95c20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Components of the forms disappear

2018-08-28 Thread rdvg1962
Hi,

No, I'm going to show the code (really simple) for validation.

private void formaTienda(final Form fmLiber) {
final Form fmTienda = new Form(new BorderLayout());
fmTienda.getToolbar().setBackCommand("", e -> fmLiber.showBack());
fmTienda.getToolbar().getStyle().setAlignment(Label.LEFT);
fmTienda.setTitle(idioma.getTiendas());

TextField txNombreFiltro = new TextField();
TextField txNombreBusqueda = new TextField();
txNombreBusqueda.setHint(idioma.getTienda());

Container cnTiendas = new Container(BoxLayout.y());
cnTiendas.setScrollableY(true);

Container cnBusqueda = new Container(new 
BorderLayout()).add(BorderLayout.CENTER, txNombreBusqueda);
Container cnFiltro = new Container(new BorderLayout());

Style s = UIManager.getInstance().getComponentStyle("Menu");
FontImage iBusqueda = (FontImage) 
FontImage.createMaterial(FontImage.MATERIAL_SEARCH, s);
Button btBusqueda = new Button(iBusqueda, "Transparent");
cnBusqueda.add(BorderLayout.WEST, btBusqueda);
btBusqueda.addActionListener((ActionListener) (ActionEvent e) -> {
ArrayList lArt = leeArrayListTienda(txNombreBusqueda.getText(), 
"N");
if (lArt != null) {
if (lArt.size() < LIMITE_DATOS) {
cnTiendas.removeAll();
for (int i = 0; i < lArt.size(); i++) {
Tienda tDa = (Tienda) lArt.get(i);
Container cnItemTienda = creaItemTienda(fmTienda, 
tDa);
cnTiendas.add(cnItemTienda);
}
cnTiendas.revalidate();
fmTienda.replace(cnBusqueda, cnFiltro, 
CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, true, 200));
} else {
Dialog.show(idioma.getInformacion(), 
idioma.getMensaje21(), idioma.getContinuar(), null);
}
} else {
Dialog.show(idioma.getInformacion(), idioma.getMensaje41(), 
idioma.getContinuar(), null);
}
});

FontImage iFiltro = (FontImage) 
FontImage.createMaterial(FontImage.MATERIAL_FILTER_LIST, s);
Button btFiltro = new Button(iFiltro, "Transparent");
btFiltro.setVerticalAlignment(Label.BOTTOM);
btFiltro.setAlignment(CENTER);
btFiltro.setTextPosition(Label.BOTTOM);
cnFiltro.add(BorderLayout.WEST, btFiltro);
cnFiltro.add(BorderLayout.CENTER, txNombreFiltro);

btFiltro.addActionListener((ActionListener) (ActionEvent e) -> {
txNombreBusqueda.setText("");
txNombreFiltro.setText("");
fmTienda.replace(cnFiltro, cnBusqueda, 
CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, true, 200));
cnTiendas.removeAll();
});

txNombreFiltro.addDataChangeListener((int type, int index) -> {
String t = txNombreFiltro.getText();
if (t.length() < 1) {
for (Component cmp : cnTiendas) {
cmp.setHidden(false);
cmp.setVisible(true);
}
} else {
t = t.toLowerCase();
for (Component cmp : cnTiendas) {
boolean show = false;
String val = null;
if (cmp instanceof Container) {
val = (String) cmp.getClientProperty("busqueda");
}
show = val != null && val.toLowerCase().indexOf(t) > -1;
cmp.setHidden(!show);
cmp.setVisible(show);
}
}
cnTiendas.animateLayout(250);
});

s = UIManager.getInstance().getComponentStyle("Title");
FontImage iInformacion = 
FontImage.createMaterial(FontImage.MATERIAL_INFO, s);
fmTienda.getToolbar().addCommandToRightBar(new Command("", 
iInformacion) {
@Override
public void actionPerformed(ActionEvent evt) {
muestraInformacion(fmTienda, idioma.getTiendas(), 
idioma.getMensaje68() + idioma.getMensaje23());
}
});

FloatingActionButton btNuevo = 
FloatingActionButton.createFAB(FontImage.MATERIAL_ADD);
btNuevo.bindFabToContainer(fmTienda.getContentPane(), 
Component.RIGHT, Component.BOTTOM);
btNuevo.addActionListener((e) -> {
Tienda tDa = new Tienda();
mantenimientoTienda(fmTienda, tDa, ADICIONAR);
cnTiendas.revalidate();
});

fmTienda.add(BorderLayout.NORTH, cnBusqueda);
fmTienda.add(BorderLayout.CENTER, cnTiendas);
fmTienda.setTransitionOutAnimator(CommonTransitions.createSlide(
CommonTransitions.SLIDE_VERTICAL, true, 500));
fmTienda.show();
}

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Dis

[codenameone-discussions] Re: Components of the forms disappear

2018-08-27 Thread Shai Almog
Hi,
are you changing the layout in any way without validating after you showed 
the form?

-- 
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/3ac2aacf-f1d5-4219-a9c7-534d709ff6e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.