[codenameone-discussions] Can't drag and drop components inside Containers since plugin 3.5.5

2016-10-10 Thread Clement Levallois
As described in the title. Help! Without this, my students can't apply any 
interesting layout... Thx!

If you are experiencing an issue please mention the full platform your 
issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator 
Device

-- 
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/541b18d5-fbcd-4282-81e8-673c464a3ef9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: IOS warnings, Multiple Unsequenced Modificaitons to SP

2016-10-10 Thread Dave Dyer
There are other warnings, from the VM code, that look like they ought to
be important, for example 


- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
  return [self application:application openURL:url sourceApplication:nil 
annotation:nil];
}

/code/ios/boardspace-2.74-sources/dist/Develop-src/CodenameOne_GLAppDelegate.m:243:16:
 
Null passed to a callee that requires a non-null argument

-- 
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/4a84ed7b-864c-42f2-ac1f-49676a97960d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: SignatureComponent

2016-10-10 Thread Bryan Buchanan
I wouldn't say it's a lack of responsiveness, it's just not _as_ responsive 
as the native code.

The SignatureComponent seems about the same as my component (which you'd 
hope as it's exactly the same code).

It's not really an issue - on a fast, newish tablet the difference is 
probably not noticeable.

On Tuesday, October 11, 2016 at 12:57:36 PM UTC+10, Shai Almog wrote:
>
> Do you see the lack of responsiveness in the SignatureComponent too?
>

-- 
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/a43954f7-76b3-4054-8b0d-ca5c2fcba549%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: SignatureComponent

2016-10-10 Thread Shai Almog
Do you see the lack of responsiveness in the SignatureComponent too?

-- 
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/ab8c4771-de81-4286-812f-eb176c2c5cce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: IOS warnings, Multiple Unsequenced Modificaitons to SP

2016-10-10 Thread Shai Almog
Please file an issue.
I'm guessing we never see this since we hardly every use 2D arrays as they 
are slower

-- 
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/88d14690-6bfe-45bb-aea5-13a37f4be9f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Issue with Samsung Galaxy S3 Neo

2016-10-10 Thread Shai Almog
Hi,
thanks!

I'm not sure I follow you. Capture to gallery behavior is pretty different 
between devices e.g. on iOS things don't make it into the gallery and some 
developers want them not to appear while others do. 
We tried to "normalize" this as much as reasonably possible but in this 
particular niche Android is as fragmented as hell (in native and in cross 
platform tools). 

If you can provide illustrative samples (screenshots) of what's going wrong 
and specific Android device/OS version number we might be able to give you 
a better response.

-- 
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/3e8547e6-64d2-42c7-968c-673be7830625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: iOS Builder Error: Problem with provisioning profile or certificate

2016-10-10 Thread Shai Almog
Hi,
we don't support that use case. We only support the paid apple account 
certificate system. 
You can file an RFE for this although I'm not sure if this is something we 
can technically support.

-- 
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/72145828-26ed-4e89-9cda-a49382b9b92f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: SignatureComponent

2016-10-10 Thread Bryan Buchanan
Forgot the code.

On Tuesday, October 11, 2016 at 10:47:47 AM UTC+10, Bryan Buchanan wrote:
>
> I've adapted the code from the SignatureComponent (see Form2.java), which 
> works fine. I've also tried some native Android code - 
>
>
> http://www.mysamplecode.com/2011/11/android-capture-signature-using-canvas.html
>
> They both work pretty much the same, but the native Android code is 
> noticeably more responsive (on a Nexus 7).  The SignatureComponent code 
> looks pretty simple, so I guess there's maybe nothing to be done to make it 
> work a little bit smoother ?
>

-- 
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/31e7f0f9-3b47-44e6-bf46-852adfe64617%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.webbtide.tpd.timeclock;

import com.codename1.ui.Button;
import com.codename1.ui.Component;
import com.codename1.ui.Container;
import com.codename1.ui.Display;
import com.codename1.ui.Graphics;
import com.codename1.ui.Image;
import com.codename1.ui.Stroke;
import com.codename1.ui.events.ActionEvent;
import com.codename1.ui.events.ActionListener;
import com.codename1.ui.geom.GeneralPath;
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.layouts.GridLayout;
import com.codename1.util.StringUtil;
import java.util.Calendar;
import java.util.List;
import java.util.TimeZone;

/**
 * @author bryanb
 */
public class Form2 extends BJBForm {

SignaturePanel canvas;
Image signatureImage;

public Form2() {
}

@Override
public Form2 init() {

setTitle("Enter Signature");
setLayout(new BorderLayout());
setScrollableX(false);
setScrollableY(false);

canvas = new SignaturePanel();
canvas.setUIID("BorderContainer");

Container c = new Container(new GridLayout(1, 2));

Button clear = new BorderButton("Clear");
clear.addActionListener((ActionListener) (ActionEvent evt) -> {
canvas.clear();
});
c.add(clear);

Button save = new BorderButton("Save");
save.addActionListener((ActionListener) (ActionEvent evt) -> {

/**
 * save stuff and talk
 */
String employee = CommonContext.INSTANCE.getEmployee();
List l = StringUtil.tokenize(employee, " ");
String name = l.get(0);

Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
int hour = calendar.get(Calendar.HOUR_OF_DAY);

String talk;
if (hour > 11) {
talk = "Good Afternoon " + name + ", enjoy your evening";
} else {
talk = "Good Morning " + name + ", have a good day";
}
if (CommonContext.INSTANCE.getTts() != null && CommonContext.INSTANCE.getTts().isSupported()) {
CommonContext.INSTANCE.getTts().say(talk);
}

signatureImage = canvas.getImage();
/**
 * get the image from the component
 */
/*
Image buffer = Image.createImage(canvas.getWidth(), canvas.getHeight());
Graphics g = buffer.getGraphics();

g.translate(-canvas.getAbsoluteX(), -canvas.getAbsoluteY());
canvas.paintComponent(g);
g.translate(canvas.getAbsoluteX(), canvas.getAbsoluteY());

ByteArrayOutputStream stream = new ByteArrayOutputStream();
ImageIO.getImageIO().save(buffer, stream, ImageIO.FORMAT_PNG, 1);
byte[] byteArray = stream.toByteArray();

String base64 = Base64.encodeNoNewline(byteArray);
 */
/**
 * return to first form
 */
CommonContext.INSTANCE.getForm1().show();

});
c.add(save);

addComponent(BorderLayout.SOUTH, c);
addComponent(BorderLayout.CENTER, canvas);

setBackCommand(CommonContext.INSTANCE.getForm1());

return this;
}

@Override

protected void onShowCompleted() {
super.onShowCompleted();

}

public class BorderButton extends Button {

int h = Display.getInstance().convertToPixels(8, false);

public BorderButton() {
super("");
setUIID("BorderButton");
setPreferredH(getPreferredH() < h ? h : getPreferredH());
}

public BorderButton(St

[codenameone-discussions] SignatureComponent

2016-10-10 Thread Bryan Buchanan
I've adapted the code from the SignatureComponent (see Form2.java), which 
works fine. I've also tried some native Android code - 

http://www.mysamplecode.com/2011/11/android-capture-signature-using-canvas.html

They both work pretty much the same, but the native Android code is 
noticeably more responsive (on a Nexus 7).  The SignatureComponent code 
looks pretty simple, so I guess there's maybe nothing to be done to make it 
work a little bit smoother ?

-- 
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/24c3c2c8-4ec3-4e5b-bb5e-9f85c9ceee69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: logfile

2016-10-10 Thread Dave Dyer

I use this code to capture the contents of a log file.  Its a bit obscure 
because it threads
a needle through the standard codename1 class "Log" to create a temporary 
log file.

class LogCapture extends Log
{Log oldLog;
StringWriter myWriter;
LogCapture() 
{ oldLog = Log.getInstance();
  install(this);  
}
protected Writer createWriter() throws IOException 
{return(myWriter = new StringWriter());
}

public String dispose()
{
install(oldLog);
return(myWriter.toString());
}
}

then, this code can capture a stack trace as a string

public static String getStackTrace(Throwable t)
{
LogCapture cap = new LogCapture();
Log.e(t);
return cap.dispose();
}

Rather than redirect System.out, I use my own redirectable printer for 
debugging 
messages. Depending on the situation, I redirect it to a network stream, a 
string 
builder, or a logging window that's part of my app.


-- 
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/fc2d8587-7127-4cbd-9c33-120672d181bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] IOS warnings, Multiple Unsequenced Modificaitons to SP

2016-10-10 Thread Dave Dyer

compiling my main IOS project, I get thousands of warnings of this type.  
This is not a bullshit
warning, the order of argument processing in C++ is undefined.  You ought 
to produce code that
does not produce this warning.

I'm tracking an unexplained hard crash, this is exactly the kind of warning 
that may be
relevant if the compiler finds something it thinks it can optimize within 
the rules.

Here's a sample sequence that generates the warning.

SP++;

PUSH_OBJ(alloc2DArray(threadStateData, (*(--SP)).data.i, (*(--SP)).data.
i, &class_array2__com_codename1_ui_geom_Rectangle, &
class_array1__com_codename1_ui_geom_Rectangle, sizeof(JAVA_OBJECT))); /* 
MULTIANEWARRAY */





-- 
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/9ca4f9d7-c80f-4988-bbfa-61621cd00b03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Issue with Samsung Galaxy S3 Neo

2016-10-10 Thread Lorenzo Sheogorath
Hi I discovered this product just today and from what I can tell you did an 
amazing job.

However I encountered a little issue.

I was trying the Camera Demo template as it was the main constraint to be 
able to adopt this product for our group.
The app open the camera correctly and take correctly the photo saving it in 
the gallery

However the application doesn't show the photo on my phone. This on a 
Samsung Galaxy S3 Neo model GT-I9301I with Android 4.4.2. The update is the 
last distribuited with OTA by Samsung for Italian market. (There is a newer 
update but was released for the spanish market and wasn't released OTA 
requiring manual flash with Odin or Heimdall that I didn't make)

Trying the same application on a Huawei Y560 (Android 5.1.1) showed the 
correct beheviour (the photo showed correctly in the application after 
being taken).

What way can I use to know what went wrong? Is this a know issue or there 
are similar know issues?


Thanks 

-- 
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/d4c5893a-24bc-4d69-8dbb-55b1001e2891%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.