apache-flex

sqlite & flex - insert into if not exists?

北城以北 提交于 2019-12-23 16:26:43
问题 I'm using flex to develop my first desktop app and I'm working with sqlite for the first time as well. I'm creating my database and all the tables and I would also like to add a few rows of data into a couple of the tables so that the users have some data to work with on first install. The only problem I'm having is every time I run the program it keeps inserting the same data over and over again. I'm just wondering if its possible to do a - INSERT INTO IF NOT EXISTS. or some other kind of

Flash app depends on Flex. Are there any SWF bytecode size optimizers?

痞子三分冷 提交于 2019-12-23 16:03:50
问题 Hello world application that uses Flex, compiled with optimize=true has size 178K. How to reduce application size? We do not like to use RSL, we don't like to avoid Flex. Largest part of resulting SWF is unused bytecode. Are there any tools to optimize bytecode — drop unused methods, classes, give methods shorter names and so on? I know some such tools for Java bytecode. Any there any for SWF? 回答1: The size is the cost of the Flex API. You don't get to pick and choose which parts are compiled

How to bind property of View to property of class using Flex MATE

天涯浪子 提交于 2019-12-23 15:48:45
问题 Lately i discovered MATE (for Flex development) and was wondering: how do i bind a property in a view (actually a navigatorcontent component) to another property in a class so that they stay in synchronization (meaning that whenever the property in the class changes the property in the view also changes). So if we have a view called Target.mxml and a property targertProp how do we bind it to the class called SourceClass with property SourceProp? Thanks in advance 回答1: <Injectors target="

Properly serializing flash.utils.Dictionary to a SharedObject

五迷三道 提交于 2019-12-23 15:44:16
问题 I have a convenience collection class in my Flex project called HashMap, which is essentially a wrapper around the flash.utils.Dictionary with a bunch of convenience methods and an added (synced) ArrayCollection so that I can pass the HashMap to bindable controls that want an ArrayCollection. That all works fine. What doesn't work fine, I'm finding out just now, is putting that HashMap in a local SharedObject. Registering the class causes it to be stored and come back as the proper type, and

Add search icon inside spark TextInput in Flex

对着背影说爱祢 提交于 2019-12-23 15:41:10
问题 I want to add search icon inside the spark TextInput control. Is there a way by which I can extend the TextInput control and add a child to it. Thanks 回答1: You shouldn't extend TextInput itself. The main power of Spark architecture is skinning possibility. You can create your own skin based on standard TextInputSkin and place icon there. I think there will not any problems. 回答2: I faced the same problem wanting to get a search icon in a spark TextInput. It was very simple to copy the existing

How can I use URL parameters while debugging in Flash Builder 4?

淺唱寂寞╮ 提交于 2019-12-23 13:07:29
问题 How can I use URL parameters while debugging in Flash Builder 4? 回答1: Modify your html template In the "html-template" directory in your project open "index-template.html" up and modify the following lines of code to suite your needs: var flashvars = {}; if (swfobject.getQueryParamValue("foo") && swfobject.getQueryParamValue("abc")) { flashvars.foo = swfobject.getQueryParamValue("foo"); flashvars.abc = swfobject.getQueryParamValue("abc"); } Please note that this is for a Flex 4 SDK project.

Flash Builder 4 suddenly stops doing auto-complete for some classes

怎甘沉沦 提交于 2019-12-23 12:45:05
问题 A project we've been working on for weeks in Flash Builder suddenly has stopped being navigable: all the nice features of Flash Builder like auto-completion, jump to definition, even search for References are only partially working -- they work for some classes but not for others. I've tried restarting Flash Builder, closing and opening the project, re-creating the project, but this bad situation persists. Moreover, it happened at about the same time for 2 other developers on the same project

How can I get the ItemRenderer of a Flex Spark List from its DataProvider Object?

試著忘記壹切 提交于 2019-12-23 12:28:58
问题 In Flex I can create an ItemRenderer to represent each item in the Lists DataProvider but how do I access the instance of the ItemRenderer via the DataProviders Object? Something like myList.getItemRenderer(dp.getItemAt(10)); 回答1: public function getItemRenderer(list:List, item:Object):ItemRenderer { var dataGroup:DataGroup = list.dataGroup; var n:int = dataGroup.numElements; for (var i:int = 0; i < n; i++) { var renderer:ItemRenderer = dataGroup.getElementAt(i) as ItemRenderer; if (renderer

Client Java vs (Adobe) Flash for web applications, what to choose and when

こ雲淡風輕ζ 提交于 2019-12-23 12:27:07
问题 A few years ago client Java was unsuitable for web development because a remarkable part of web users did not have Java installed. ( I don't remember exact numbers, more than 10%). Now I see the Google Analytics stats for a big site and it tells that >98% of users have Java installed. Is these stats very biased by Javascript usage? As I understand Google Analytics measure only users that has Javascript. Is the picture similar on other big sites? Does client Java have really "stopper"

How to handle right to left languages in Flash (pre version 10)?

丶灬走出姿态 提交于 2019-12-23 12:26:55
问题 We are currently working with Flex creating a web application. We are having trouble taking Arabic text from the user and displaying correctly (like in a chat feature). While presumably Flash 10 will solve this problem, we don't want to force our users to upgrade. Flash flips the order of the sentence's words. so if I wrote something like "Hello World" in the text field, it will appear as "World Hello" in the chat area. Is there a standard way to work with Right to Left languages in Flash?