Re: [flexcoders] SQLite Insert Statements in a transaction
how much data are you dealing with. make your inserts synchronous perhaps On Tue, Aug 16, 2011 at 1:24 PM, Tac Tacelosky wrote: > ** > > > I'm trying to get my head around how to do a SQLite bulk insert using > transactions. This works, but it doesn't make sense to re-create a new > SQLStatement in the loop: > > private function onAddBulkContacts():void { > _responder = new Responder(resultEventHandler, errorEventHandler); > contacts_db.connection.begin(null, _responder); > var statement:SQLStatement; > > for (var i:uint=0; i statement = new SQLStatement(); > statement.sqlConnection = contacts_db.connection; > statement.text ="INSERT INTO contacts ('name', 'lastname') VALUES > (@NAME, @LASTNAME)"; > > statement.addEventListener(SQLErrorEvent.ERROR, > function(event:Event):void { > trace('statement error');}); > statement.addEventListener(SQLEvent.RESULT, function(event:Event):void > { trace('result'); }); > statement.parameters['@NAME'] = "Name " + i.toString(); > statement.parameters['@LASTNAME'] = "LastName " + i.toString(); > statement.execute(); > } > contacts_db.connection.commit(); > } > > What I want to do is create the SQLStatement once, let it compile, then > just pass in new arguments within the loop, the commit it at the end, e.g. > > private function onAddBulkContacts():void { > _responder = new Responder(resultEventHandler, errorEventHandler); > contacts_db.connection.begin(null, _responder); > var statement:SQLStatement; > > statement = new SQLStatement(); > statement.sqlConnection = contacts_db.connection; > statement.text ="INSERT INTO contacts ('name', 'lastname') VALUES > (@NAME, @LASTNAME)"; > > statement.addEventListener(SQLErrorEvent.ERROR, > function(event:Event):void { > trace('statement error');}); > statement.addEventListener(SQLEvent.RESULT, function(event:Event):void > { trace('result'); }); > > for (var i:uint=0; i statement.parameters['@NAME'] = "Name " + i.toString(); > statement.parameters['@LASTNAME'] = "LastName " + i.toString(); > statement.execute(); > } > contacts_db.connection.commit(); > } > > But the latter code throw an error saying that it can't execute the second > time through, since the statement itself is still executing (and I believe > will be in that state until the commit). I guess I can understand that the > statements get added to the execution queue, but it doesn't make sense that > I have to add the SQL text within the loop, exactly the thing I'm trying to > avoid. I'm sure there's a better way to do this, but I've spent way too > long hacking and reading trying to figure out what the proper sequence is. > Any ideas? > > Thanks, > > Tac > > -- j:pn \\no comment
[flexcoders] flexmojos - copy-flex-resources of rsls not working!
Hi, I am trying to copy the the dependent rsls into war using the copy- flex-resources plugin. However I'm getting the following error : [ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven- plugin:3.8:copy-flex-resources (copy-flex-resources) on project smh: Failure to find com.adobe.flex.fram textLayout:swz:4.1.0.16076 in https://repository.sonatype.org/content/groups/flexgroup was cached in the local repository, resolution will not be reattempted until the update val of sonatype-flex-repository has elapsed or updates are forced [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=com.adobe.flex.framework - DartifactId=textLayout -Dversion=4.1.0.16076 -Dpackaging=swz -Dfile=/ path/to/file I've already gone through the links( so pls suggest an alternate link in case u want to suggest :) ) : http://groups.google.com/group/flex-mojos/browse_thread/thread/6f47b2980275aaeb http://groups.google.com/group/flex-mojos/browse_thread/thread/2aa96d8d69e1ddb5 https://repository.sonatype.org/content/sites/maven-sites/flexmojos/3.8/copy-flex-resources-mojo.html I've followed listing of poms as specified in https://docs.sonatype.org/pages/viewpage.action?pageId=7045277 to resolve the above issue, I installed the swz file onto local repository using mvn install:install-file -DgroupId=com.adobe.flex.framework - DartifactId=textLayout -Dversion=4.1.0.16076 -Dpackaging=swz - Dfile=textLayout_1.1.0.604.swz (Side effect of this was this overwrote the existing pom config in repository ) and then ran mvn compile. I got the following error [ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven- plugin:3.8:copy-flex-resources (copy-flex-resources) on project smh: Failed to copy C:\Users\bharadke\.m2\repository\com\adobe\flex \framework\textLayout\4.1.0.16076\textLayout-4.1.0.16076.swz: The filename, directory name, or volume label syntax is incorrect -> [Help 1] Below are my pom.xml snippets 1. flex project pom : src/main/flex src/test/flex org.sonatype.flexmojos flexmojos-maven-plugin ${flex-mojos-plugin.version} true com.adobe.flex compiler ${flex.sdk.version} pom http://fpdownload.adobe.com/pub/swz/crossdomain.xml http://fpdownload.adobe.com/pub/swz/crossdomain.xml http://fpdownload.adobe.com/pub/swz/flex/$ {flex.sdk.version}/{artifactId}_{version}.{extension} http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/ {artifactId}_1.1.0.604.{extension} true /abc 2. web-application pom : smh org.sonatype.flexmojos flexmojos-maven-plugin ${flex-mojos-plugin.version} true compile copy-flex-resources copy-flex-resources com.adobe.flex compiler ${flex.sdk.version} pom true true I'm all over this issue , but couldnot find a solution. Any help is greatly appreciated
[flexcoders] SQLite Insert Statements in a transaction
I'm trying to get my head around how to do a SQLite bulk insert using transactions. This works, but it doesn't make sense to re-create a new SQLStatement in the loop: private function onAddBulkContacts():void { _responder = new Responder(resultEventHandler, errorEventHandler); contacts_db.connection.begin(null, _responder); var statement:SQLStatement; for (var i:uint=0; i
Re: [flexcoders] FB 4.5.1 export release build and RSL size
I've also seen this with the 3.6 SDK. There were definitely issues even compiling successfully in the 4.0 version of FlashBuilder, and while 4.5.x does successfully do the export to release builder, it seems the compilation size is now an issue. On Tue, Aug 16, 2011 at 8:06 AM, durnelln wrote: > ** > > > Hi all, > > I have migrated two Flex Builder/SDK 3.0 Projects all the way up to Flash > Builder/SDK 4.5.1. One project is a library project that compiles to an RSL. > The other project contains two applications that use the RSL library. > Everything now seems to be compiling and running correctly in 4.5.1 but I > have noticed that the RSL size is much bigger than before when I do an > Export Release Build of the applications: > > Flex Builder 3.0 & SDK 3.0 > library SWC (in library project bin folder) : 1107KB > library SWF (in applications project bin-release folder) : 507KB > > Flex Builder 4.5.1 & SDK 4.5.1 > library SWC (in library project bin folder) : 1102KB > library SWF (in applications project bin-release folder) : 977KB > > I always assumed that the RSL file size reduction (~50%) in Flex 3 was > because the debug information was being stripped out and the library > optimized as part of the Export Release Build. However this does not seem to > be happening in 4.5.1. Have I missed a configuration option or something? > How can I reduce the size of my release build RSL SWF in 4.5.1? > > Regards, > > Nick. > > >
[flexcoders] SWF in Flex app doesn't resize smoothly but appears to redraw during effect
I have a SWF that I load into a Flex application. When I apply a resize effect to it, the SWF doesn't just resize nice and smoothly, but appears to "struggle" to resize because (I think) it redraws itself repeatedly during the effect. The "redrawing", for lack of a better phrase, is more frequent when the mouse pointer hits a text field or any content within the SWF. My predecessor, who wrote the original code, took a snap shot of the SWF as a Bitmap and would then resize those and upon EffectEnd would swap back in the real SWF - which seems like a stupid amount of work for a Flash movie in a Flex app. It would seem to me that Adobe has a more efficient solution for this, or perhaps a solution isn't needed, but instead we're not approaching the problem in the best manner. Any help is appreciated. Thanks in advance, David
Re: [Bulk] Re: [flexcoders] Flex 4.5 - Custom NativeWindow and problems
Title: Re: [flexcoders] Flex 4.5 - Custom NativeWindow and problems
[flexcoders] FB 4.5.1 export release build and RSL size
Hi all, I have migrated two Flex Builder/SDK 3.0 Projects all the way up to Flash Builder/SDK 4.5.1. One project is a library project that compiles to an RSL. The other project contains two applications that use the RSL library. Everything now seems to be compiling and running correctly in 4.5.1 but I have noticed that the RSL size is much bigger than before when I do an Export Release Build of the applications: Flex Builder 3.0 & SDK 3.0 library SWC (in library project bin folder) : 1107KB library SWF (in applications project bin-release folder) : 507KB Flex Builder 4.5.1 & SDK 4.5.1 library SWC (in library project bin folder) : 1102KB library SWF (in applications project bin-release folder) : 977KB I always assumed that the RSL file size reduction (~50%) in Flex 3 was because the debug information was being stripped out and the library optimized as part of the Export Release Build. However this does not seem to be happening in 4.5.1. Have I missed a configuration option or something? How can I reduce the size of my release build RSL SWF in 4.5.1? Regards, Nick.
Re: [flexcoders] BrokenImageSkin
Why don't you do same in IOError handler & invalidate, i don't see why it shouldn't work. On Aug 15, 2011, at 11:09 PM, jitendra jain wrote: > > I dont want to give scaleContent when the image is successfully loaded. I > want on IOError.. If i mention it in .css it will apply for all the skins.. > > Thanks, > > with Regards, > Jitendra Jain > Software Engineer > 91-9979960798 > > > From: Srinivas Sandur Madhu Murthy > To: flexcoders@yahoogroups.com > Sent: Tue, 16 August, 2011 11:28:48 AM > Subject: Re: [flexcoders] BrokenImageSkin > > > > Did you try scaleContent? and also try using verticalAlign & horizontalAlign > [both css properties] along with scaleContent. > > Srinivas > > On Aug 15, 2011, at 10:51 PM, jitendra jain wrote: > >> >> >> Hi Coders, >> >> Iam using some Image Halo as well as Spark Image Controls. Whenever I am >> using Halo BrokenImageSkin for Image control, the swfloader is fit to the >> content size.. how can I restrict my Image control, not to go beyond its >> actual size when there is any IOError? >> >> >> >> Thanks, >> >> with Regards, >> Jitendra Jain >> Software Engineer >> 91-9979960798 >> >> > > >