Editing Spark DataGrid

2016-10-23 Thread ImadEddine
Salam All Members

When I start editing cell in 

this annoy the customers

Thank-you very match 



--
View this message in context: 
http://apache-flex-users.246.n4.nabble.com/Editing-Spark-DataGrid-tp13899.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Unzip ANE for Flex\AIR Desktop App

2016-10-23 Thread Fréderic Cox
You can use File.applicationDirectory and put the 7za.exe in your project
folder. I placed it in /native_bin/win/7za.exe. Make sure the file has
"execute" permissions (right-click for properties of the file in Flash
Builder).

I have defined it as NativeProgramsSettings.UNZIP =
File.applicationDirectory.resolvePath("native_bin/win/7za.exe"); for
Windows and NativeProgramsSettings.UNZIP =
File.applicationDirectory.resolvePath("native_bin/mac/7za"); for Mac
(depending on Capabilities.OS)

Then for unzipping (I don't use zip functionality in my app) it is as
follows:

private function unzipNative(zipFile:File):void{

this.dispatchEvent(new Event("indicatorShowRequest"));

var targetDir:File = File.applicationStorageDirectory.resolvePath("unzipped"
);

targetDir.createDirectory();

targetDir = targetDir.resolvePath("unzip_" + new Date().time + "_" +
Math.round(Math.random()*1));

targetDir.createDirectory();

tempDirectoryForZip = targetDir;

var npInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo;

npInfo.executable = NativeProgramsSettings.UNZIP;

var args:Vector. = new Vector.;

args.push("x");

args.push(zipFile.nativePath);

args.push("-r");

args.push("-o" + targetDir.nativePath);

npInfo.arguments = args;

var np:NativeProcess = new NativeProcess;

np.addEventListener(NativeProcessExitEvent.EXIT, npUnzipExitHandler);

np.start(npInfo);

}


For zip you need to have different arguments of course. You can check by
googling "7za command line".


Hope it works for you

On Fri, Oct 21, 2016 at 8:23 AM, Deepak MS  wrote:

> Interesting. I never knew about that. Doesn't that mean user needs to have
> 7za installed on their systems? If so, what if users don't have it
> installed. Can we package the 7za.exe within our AIR app and use it?
>
> I looked into some of the examples. But not quite getting it to work:
>
> Same code with pretty print : https://codepaste.net/82gk2q
>
>
> if(NativeProcess.isSupported)
> {
> var nativeProcessStartupInfo:NativeProcessStartupInfo = new
> NativeProcessStartupInfo();
> var file:File = new File('c://zip//7za.exe'); //instead of using it from
> local file system, i want to place exe file withing source and use it here
> nativeProcessStartupInfo.executable = file;
> var processArgs:Vector. = new Vector.();
> processArgs.push("7z e file.zip");//+localZipFile.nativePath);
> //"file.zip"
> resides inside "c://zip//", tried "7za e file.zip", tried "7za.exe
> file.zip", none of those work
> nativeProcessStartupInfo.arguments = processArgs;
> process = new NativeProcess();
> process.start(nativeProcessStartupInfo);
> process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA,
> onOutputData);
> process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
> process.addEventListener(NativeProcessExitEvent.EXIT, onExit);
> process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR,
> onIOError);
> process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR, onIOError);
> }
>
> For all the options that i tried above, I get following trace:
>
> (onOutputData)
> Got:
> 7-Zip (A) 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
>
> (onErrorData)
> Error:
> Incorrect command line
>
> (onExit)
> Process exited with  7
>
>
> Kindly let me know if I am missing something there.
>
> On Thu, Oct 20, 2016 at 6:53 PM, Fréderic Cox 
> wrote:
>
> > I successfully used 7za for both Mac and Windows. You don't need a native
> > extension for desktop but you can just use the NativeProcess API with the
> > extendedDesktop profile.
> >
> > On Thu, Oct 20, 2016 at 10:48 AM, Deepak MS 
> > wrote:
> >
> > > Hi Hans,
> > > Yes, I did try that. It works fine for smaller files. But
> unfortunately,
> > > unzipping process crashes if we use it for bigger files. My zip file
> size
> > > is around 500MB.  It fails at ByteArray.uncompress() as it tries to
> > > uncompress entire file at a time. That is the reason I was looking out
> > for
> > > native way of unzipping the file.
> > >
> > > For iOS, I have used ANEZipFile library :
> > > https://github.com/xperiments/ANEZipFile
> > >
> > > It works flawlessly and takes just 5 - 6 seconds to unzip a 500MB zip
> > file.
> > > That is just for iOS though.
> > >
> > > There is another library:
> > > http://airnativeextensions.com/extension/com.distriqt.ZipUtils which
> > works
> > > on both iOS and Android, but it's not free.
> > >
> > > -Deepak
> > >
> > >
> > > On Thu, Oct 20, 2016 at 1:49 PM, Hans Nuecke 
> wrote:
> > >
> > > > Hi,
> > > >
> > > > I use an openSource Library for that: http://flex.coltware.com/2010/
> > > > 05/01/as3-zip-unzip-lib-airxzip/
> > > >
> > > > Search for keywords "coltware airxzip" and you'll find some nice
> posts
> > at
> > > > stackoverflow with links to the sources or a swc file. And also hints
> > how
> > > > to use it.
> > > >
> > > > BTW: What unzipt ANE are you using? I'm considering going the other
> >