[flexcoders] Tile and 100% width
If I create a Tile element with a percent-based width (and leave the height unset), it uses some weird method to determine the height, and it's typically two to three times as tall as it needs to be. Any suggestions for how to work around this? I'd like the tile to be 100% the width of its parent container, but just tall enough to fit its children. -Maciek
[flexcoders] PopUpButton.popUp
I'm using a PopUpButton with a custom menu (PopUpMenuButton doesn't quite do what I need), and I find that in some situations, the .popUp property is reset to null. The PopUpButton in question is never taken off the display list, and in the source, that's the only thing I can see that could update this, other than explicitly calling the setter, which I am pretty sure I'm *not* doing. Any ideas? This seems to happen especially when the window is resized. Thanks, Maciek
Re: [flexcoders] Dynamic Flex Stacked Column Chart
What do you mean by aligned with each other? -Original Message- From: Richard Rodseth rrods...@gmail.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dynamic Flex Stacked Column Chart Date: Thu, 23 Apr 2009 13:13:51 -0700 Trying one more time. Surely there's a call (validateNow() ?, invalidateDisplayList() ? that would force a column chart to display properly after its series array has been dynamically constructed? I haven't been able to find a JIRA bug though this may be related: http://bugs.adobe.com/jira/browse/FLEXDMV-1957 On Wed, Apr 15, 2009 at 1:23 PM, Richard Rodseth rrods...@gmail.com wrote: Did you have any luck with this? I have a binding function as follows mx:ColumnChart id=columnChart type=stacked height=100% width=100% dataProvider=model.chartData series={this.buildSeriesList(model.seriesSpec)} and the stacked columns are displayed, but not aligned with each other. Quite amusing, except when you have a deadline. This must be the known defect you referred to. Anyone know a workaround, or defect number? On Mon, Apr 6, 2009 at 9:20 AM, jeffreyr6915 jrwalk...@gmail.com wrote: I'd like to create a dynamic Flex Stacked Column Chart at runtime, based on values out of a database. The following are the steps that I currently follow (without success): 1. Query the database and populate chartIemArrayColl with ChartItem objects 2. Iterate through chartIemArrayColl and only create a a new columnseries object if there does not already exist on for that 'selection'. Add this columnseries to the columnset 3. Apply this to the chart Note: I used secondSeries instead of series because of a known defect in Flex that makes the charts off center if series is used. Problems: 1. The chartIemArrayColl contains items that contain the same 'name' but different 'value' and different 'selection'. However, in this case that particular 'name' is printed on the x-axis multiple times (not correct) 2. The 'selection' should be the legend, but when it is graphed it does not seem as though it is connected to the items actually charted What I'd like to achieve: 1. Column chart with a legend that contains only values of the 'selection' 2. Stacked Column chart that contains values where I can chart the following example: item1 (name=myName, selection=sel1, value=4) item2 (name=myName, selection=sel2, value=6) item3 (name=name3, selection=sel1, value=8) I expect a chart that has myName and name3 across the x-axis (myName should only appear once). A column should appear at myName that has one color/selection (value 4) stacked on top of another (value 6). A column should be at name3 with the same color/selection as item1 (value 8). Can you please help me with this? Thanks so much in advance ChartItem.as --- package com.dashboard.teamtrack.util { public class ChartItem { public var name:String; public var selection:String; public var value:int; public function ChartItem() { } } } Main.mxml --- for each(var currChartItem:ChartItem in chartIemArrayColl ) { if(!selectionArr.contains(currChartItem.selection)) { selectionArr.addItem(currChartItem.selection); var columnSeries:ColumnSeries = new ColumnSeries(); columnSeries.setStyle(itemRenderer, new ClassFactory(com.dashboard.itemrenderers.TriDiRenderer)); columnSeries.displayName = currChartItem.selection; columnSeries.yField = 'value';
RE: [flexcoders] Re: Accessibility stopped working
Yep, the sources are there--Gordon, you can set up a Flex library project for the sdk ($FLEX_HOME/frameworks/projects/framework/src). You then need to associate it with your project. I'm not sure if there's a config-based way to do this--I just always stop at a breakpoint in my code, try to step into framework code, and then FlexBuilder will tell me it doesn't have source and prompt me to add it. You'll want to set a breakpoint in the appropriate mx.accessibility.* class (and if that doesn't work, you'll probably want to confirm that your framework breakpoints are working by breaking on something like UIComponent createChildren() or something). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Alex Harui aha...@adobe.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Accessibility stopped working Date: Tue, 21 Apr 2009 23:14:41 -0700 Ok, I’m out of my area of knowledge. I didn’t even think we had good accessibility for mac. Did we not ship the sources for mx.accessibility.* I’m off duty for the night. Hopefully you’ll figure it out. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs.adobe.com/aharui From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Guy Morton Sent: Tuesday, April 21, 2009 10:10 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Accessibility stopped working I'm developing on a mac. I tired restarting the computer anyway. :-) How would I set a breakpoint in the accessibility classes? Guy On 22/04/2009, at 2:59 PM, Alex Harui wrote: I guess you could set breakpoints to see if code in ! the accimpl classes is getting run. When this happens, can you run some other Windows EXE that and use its accessibility features? Did you try restarting the computer? Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Guy Morton Sent: Tuesday, April 21, 2009 5:39 PM To! : flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Accessibility stopped working I have previously done a full clean and rebuild, and it made no difference. The link report from a month ago shows the accessibility classes were being included at that time. I just did a clean and build and generated a link repor! t...it h as entries like this: script name=/Applications/Adobe Flex Builder 3/sdks/3.1.0/frameworks/libs/framework.swc(mx/accessibility/AccImpl) mod=1214927782165 size=3103 optimizedsize=1768 def id=mx.accessibility:AccImpl / pre id=flash.accessibility:AccessibilityImplementation / dep id=mx.core:mx_internal / dep id=flash.accessibility:Accessibi! lityProperties / dep ! id=mx.accessibility:UIComponentAccImpl / dep id=mx.core:UIComponent / dep id=flash.events:Event / dep id=AS3 / dep id=flash.accessibility:Accessibility / /script But still, no accessibility appears i! n the actual binary. If I turn it off in the compiler, the link report doesn't have these entries, so it's clearly *trying* to include the accessibility features. They just aren't working. This is very frustrating. Guy On 22/04/2009, at 9:38 AM, Alex Harui wrote: Not sure. Do a full clean and rebuild. Generate a link-report and see if the accessibility classes are in the SWF Alex Harui Flex SDK Dev! eloper A! dobe Systems Inc. Blog: http://blogs.adobe.com/aharui From:! nb sp;flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Guy Morton Sent: Tuesday, April 21, 2009 4:08 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Accessibility stopped working Impor! tance: High This is really annoying. This happened to me back in January and now it has happened again. I've followed all the advice in the previous posts to no avail. Can someone from Adobe please throw me a clue here? Why would -accessible in the project properties suddenly stop working? As you may have guessed, it has stopped working for me again. The cause is a complete mystery. Guy On 16/01/2009, at 12:49 PM, Guy Morton wrote: ! And as mysteriously as it stopped working, it started working again *shrug* Guy On 16/01/2009, at 8:45 AM, Guy Morton wrote: To answer your other question, I also wondered if it was my client, so have checked the binary in Safari, Firefox and Opera and all agree there is no accessibility! on offer. On 16/01! /2009, a t 4:21 AM, Anthony DeBonis wrote: Try compiling with accessible turned off and get the ! swf size - when y! ou turn accessible compile back on the swf size should be a bit larger. This will tell you if the compile
RE: [flexcoders] chart axis renderers inside data area
I wonder if putting the AxisRenderer in the chart's annotationElements array would work... -Original Message- From: flexcoders@yahoogroups.com on behalf of thomas parquier Sent: Tue 4/21/2009 11:17 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] chart axis renderers inside data area There may be an easy way to get plain current axis but rendered inside the series area, ie not having to use drawing api for axis with labels and avoiding rewrite those getminmax, getlabels (with droplabels, etc) methods. thomas 2009/4/20 Tom Chiverton tom.chiver...@halliwells.com On Sunday 19 Apr 2009, thomas parquier wrote: Has anyone any suggestion about how to get axis rendered inside data area, as an overlay ? with someway no outside gutters... DataDrawingCannas from http://www.quietlyscheming.com/blog/charts/easy-custom-charts/ would do the job, maybe. -- Helping to autoschediastically brand unique ubiquitous architectures as part of the IT team of the year, '09 and '08 Tom Chiverton Developer Tel: +44 0161 618 5032 Fax: +44 0161 618 5099 tom.chiver...@halliwells.com 3 Hardman Square, Manchester, M3 3EB www.Halliwells.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.Halliwells.com. -- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056
Re: [flexcoders] how to convert Html pages or text(html text) into a pdf document.
AlivePDF is typically the way to go. What are your desired results? -Original Message- From: Hasain Sab hasainsa...@yahoo.co.in Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] how to convert Html pages or text(html text) into a pdf document. Date: Fri, 17 Apr 2009 18:25:00 - Hi Friends, can anybody suggest me how to convert Html pages or text(html text) into a pdf document on the fly . I have already used AlivePdf but did not got the desired results. please reply soon if any ideas. Thanks in Advance. Hasain
Re: [flexcoders] Re: Datagrid question
It seems like the license number is not just a button label--it's actually a part of your model. Perhaps that column should render the number associated with each user (if any). If there's a number, display that. If it's NaN (or -1, or whatever invalid number you choose), display it as a 'Generate' button and on click, update the model with the number, and update the display of the renderer. -Original Message- From: Pilby i...@pilby.us Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Datagrid question Date: Mon, 20 Apr 2009 10:59:20 -0700 Thanks for responding, Tracy. Let's say this is an application that allows generation of license numbers. Imagine this: You have 3 columns in the datagrid. The first and second columns are the first and last names of a person. The third column is a button (which is really part of an MXML component) that has it's 'label' set as Click to generate license number. When the user clicks the button, the logic to generate the license number is within the component and will be output to the label property of the button, and the button will no longer be clickable. The application allows multiple people to be listed in the datagrid. Outside the datagrid, there is a button that says Click to print all. Given the specs I described so far, it's clear that I have to be able to iterate through each row in the datagrid, extracting the data from each column of each row. Typically, I would just get the dataProvider array collection object, and the problem would be solved. But because the license number is being output through the label property of the button (which is part of a MXML component) and is not part of the original dataProvider data, I can't go that route. I figured I now have to somehow iterate through each row, grabbing the data of each column of the row and storing it somehow. Is there a way for me to get the license number from the label property of the buttons?
Re: [flexcoders] inter module communication
Does your top-level Application declare a TextCopyEvent type? If these are only defined in modules, you'll have problems because only one module will own that type. See the modules presentation on Alex's blog. -Maciek -Original Message- From: vikash kumar vikash.kuma...@in.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] inter module communication Date: Mon, 20 Apr 2009 19:23:10 +0530 Hi Flexcoders, I am working on a project having two module where i want to send message from first module to second module. The working of project is like say module 1 and module 2 are loaded into another Flex project, where I have inherited the Event class to a custom event class say TextCopyEvent. I want to send message from first module to the Second module but did not get success. I have done this by dispatching event TextCopyEvent at the parentApplication from module 1, on the other hand I have added an event listenerer at parentApplication in module 2 for the same event. My problem is that when I dispatch this event from module 1, class name of t he event TextCopyEvent catched in module 2 is something like com.events.textcopyev...@4bd24a1 and thus I got Type coercion error which say com.events.textcopyev...@4bd24a1 cannot be converted to com.events.TextCopyEvent. My question is there any other way of solving the problem or where I am making mistake. Any help will be thankful. Thanking you in advance. - Vikash kumar
Re: [flexcoders] how to avoid cacheing XML
Flex is at the mercy of the browser when it comes to things like HTTP request caching. -Original Message- From: David Pariente xxmapach...@yahoo.es Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] how to avoid cacheing XML Date: Fri, 17 Apr 2009 22:46:39 +0700 Thnx, I was wondering if there was a not so ugly technic for do that...reminds me my old times with AS...seems nothing changed...wonder why there is a tool for do so in AIR while there is not in FLEX En/na Maciek Sakrejda ha escrit: The foolproof (albeit ugly) way of doing this is to append a dummy variable, e.g., the current time, to your request: http://localhost/myapp/my.xml?time=128478334 http://localhost/myapp/my.xml?time=128478334 You can do this by adding a Date().getTime() parameter to your URLVariables. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com http://www.truviso.com -Original Message- From: David Pariente xxmapach...@yahoo.es mailto:xxmapachexx%40yahoo.es Reply-to: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] how to avoid cacheing XML Date: Thu, 16 Apr 2009 22:16:14 +0700 Hi all, I have a Flex3 app where i load an XML using URLRequest object. When i makechanges to the XML and upload it to the server, Flex still loads the old cached XML file. I saw there are options for specify not to cache content, but, seems they are only available to Air apps. How could i set it up for NEVER cache my XML file?? Thanx in advance :)
Re: [flexcoders] Being able to recognize when mouse is hovering over a line
You would have to listen for mouse events on the container where the line is drawn, and calculate to see if you're actually on (or near) the line. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: manorite04 bdins...@gmail.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Being able to recognize when mouse is hovering over a line Date: Thu, 16 Apr 2009 20:43:00 - Hi everyone, I am trying to be able to detect a mouseover event whenever a user hovers over a line drawn using the graphics.drawLine call. Is this possible at all? I am using the springgraph component that is out there but want to be able to display a tooltip explaining the connecting line between nodes. Thanks!
RE: [flexcoders] how to avoid cacheing XML
That's a good point--POSTs won't get cached unless something is seriously borked. See also this note from URLRequest docs: === Note: If running in Flash Player and the referenced form has no body, Flash Player automatically uses a GET operation, even if the method is set to URLRequestMethod.POST. For this reason, it is recommended to always include a dummy body to ensure that the correct method is used. The default value is URLRequestMethod.GET. === In my opinion, using a POST for something that's really a GET that you do not want cached is a little more bogus than appending a dummy parameter, but whatever floats your boat. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Tracy Spratt tspr...@lariatinc.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] how to avoid cacheing XML Date: Fri, 17 Apr 2009 12:21:21 -0400 If you have control over the server, you are supposed t be able to set html headers that prevent caching, but there are so many server and browser combinations, well, good luck. Note, if you use POST to fetch your data, it should not cache. Tracy Spratt, Lariat Services, development services available From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Friday, April 17, 2009 12:00 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] how to avoid cacheing XML Flex is at the mercy of the browser when it comes to things like HTTP request caching. -Original Message- From: David Pariente xxmapach...@yahoo.es Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] how to avoid cacheing XML Date: Fri, 17 Apr 2009 22:46:39 +0700 Thnx, I was wondering if there was a not so ugly technic for do that...reminds me my old times with AS...seems nothing changed...wonder why there is a tool for do so in AIR while there is not in FLEX En/na Maciek Sakrejda ha escrit: The foolproof (albeit ugly) way of doing this is to append a dummy variable, e.g., the current time, to your request: http://localhost/myapp/my.xml?time=128478334 http://localhost/myapp/my.xml?time=128478334 You can do this by adding a Date().getTime() parameter to your URLVariables. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com http://www.truviso.com -Original Message- From: David Pariente xxmapach...@yahoo.es mailto:xxmapachexx%40yahoo.es Reply-to: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] how to avoid cacheing XML Date: Thu, 16 Apr 2009 22:16:14 +0700 Hi all, I have a Flex3 app where i load an XML using URLRequest object. When i makechanges to the XML and upload it to the server, Flex still loads the old cached XML file. I saw there are options for specify not to cache content, but, seems they are only available to Air apps. How could i set it up for NEVER cache my XML file?? Thanx in advance :)
Re: [flexcoders] how to avoid cacheing XML
The foolproof (albeit ugly) way of doing this is to append a dummy variable, e.g., the current time, to your request: http://localhost/myapp/my.xml?time=128478334 You can do this by adding a Date().getTime() parameter to your URLVariables. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: David Pariente xxmapach...@yahoo.es Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] how to avoid cacheing XML Date: Thu, 16 Apr 2009 22:16:14 +0700 Hi all, I have a Flex3 app where i load an XML using URLRequest object. When i makechanges to the XML and upload it to the server, Flex still loads the old cached XML file. I saw there are options for specify not to cache content, but, seems they are only available to Air apps. How could i set it up for NEVER cache my XML file?? Thanx in advance :)
Re: [flexcoders] Cairngorm sub-applications Remoting
The 'destination null' seems to imply that your Flex-side remoting metadata is fubared. It's trying to contact a destination that was not configured--or somehow got unconfigured through the peer-appdomain swf loading. I've asked about doing something similar with Modules, and was told by Adobe folks on the list that this would be a Bad Idea. However, I believe they suggested separate apps--just as you are doing. Have you tried loading the .swfs into the same appdomain? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Erich Cervantez f...@noofusion.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm sub-applications Remoting Date: Thu, 16 Apr 2009 17:01:51 - Has anyone written two distinct Cairngorm-based applications, each capable of dispatching service calls (via RemoteObject) and tried loading one inside of the other? Essentially I have a parent application that uses SWFLoader to load a sub-application (in a peer Application Domain). The sub-application loads visually within the parent application but service calls from the sub-application result in a runtime error: TypeError: Error #1034: Type Coercion failed: cannot convert obj...@x to mx.messaging.messages.ErrorMessage. JBOSS logs show this: No destination with id 'null' is registered with any service. The first error appears to be a class-aliasing problem, but both of these apps are Cairngorm-based Flex applications...the registerClassAlias method shouldn't be required (besides, I tried that tactic already to no avail). This is the only Flex-equivalent of a bat-signal I can think of ;) Erich
Re: [flexcoders] building a dataprovider in Java
You probably want a List of Maps. Is this coming from a ResultSet from jdbc? In Java-ish pseudo-code, you'd do something like this: - ListMapString,Object list = new ArrayListMapString,Object(); - For each row in the result set -- MapString,Object row = new HashMap(); -- For each column in the result set metadata --- row.put(column name, row value) -- list.add(row) and then return the list to Flex. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: netdeep deep...@chartertn.net Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] building a dataprovider in Java Date: Wed, 15 Apr 2009 13:03:03 - I posted a few weeks back about how to create a chart dataprovider in Java to pass to Flex and the response I got back was to use Maps. I got sidetracked with other aspects of the code and now that I'm trying to code it, I am really drawing a blank. How would you create the following dataprovider in Java without using a custom object (i.e., the next data structure may have more or less elements than this one and I would need to use generic names for each data pair)? public var expenses:ArrayCollection = new ArrayCollection([ {Month:Jan, Profit:2000, Expenses:1500}, {Month:Feb, Profit:1000, Expenses:200}, {Month:Mar, Profit:1500, Expenses:500} ]);
Re: [flexcoders] Problem with LinearAxis on an horizontal axis
Enri, LinearAxis should do just what you expect--CategoryAxis is more like the behavior you are describing. Can you show us more details on your chart definition? -Maciek -Original Message- From: enriirne enrii...@yahoo.it Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Problem with LinearAxis on an horizontal axis Date: Sun, 12 Apr 2009 17:58:24 - For what I know, LinearAxis computes the *number* of samples, not a property on the data provider. I would like to plot my samples linearly on the horizontal axis. For example, I must plot with a LineChart these samples: {day:3 value:1} {day:5 value:4} {day:6 value:8} I'd like to put LinearAxis' min=1 and max=10, where 1 and 10 are day number. Then I'd like to see value=1 in the first third of the area, 4 and 8 close together, then some space till the maximum day number, which is 10. But, as I said, LinearAxis reasons on the number of samples, which in my case is 3. The only workaround I found is to artificially add empty samples for days 1,2,4,7,8,9,10 Is there a bettere way? Enri
RE: [flexcoders] Form field clearing
Alex's suggestion is probably the right thing to do, but you can also take a look at AdvancedForm from flexlib: http://flexlib.googlecode.com/svn/trunk/examples/AdvancedForm/AdvancedForm_Sample.swf -Maciek -Original Message- From: flexcoders@yahoogroups.com on behalf of smccran Sent: Thu 4/9/2009 6:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Form field clearing Hi all, I have a standard flex form, and I want to do a simple 'reset' function. At the moment I would simply set each field value as blank like this: private function clear():void { nameField.text = ; tel.text = ; email.text = ; } mx:Form x=10 y=105 id=jobRequest mx:FormItem label=Name required=true mx:TextInput id=nameField/ /mx:FormItem mx:FormItem label=Tel required=true mx:TextInput id=tel/ /mx:FormItem mx:FormItem label=Email required=true mx:TextInput id=email/ /mx:FormItem Is there a better way of doing this? Or a way I can just say jobRequest.reset? where 'jobRequest' is the form name. Thanks Shaun
RE: [flexcoders] Re: Illegible axis labels
I get the following error when trying to use your example: [RPC Fault faultString=Error #1088: The markup in the document following the root element must be well-formed. faultCode=Client.CouldNotDecode faultDetail=null] at mx.rpc.http::HTTPService/http://www.adobe.com/2006/flex/mx/internal::processResult()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:933] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:208] at mx.rpc::Responder/result()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:43] at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74] at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:409] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() -Original Message- From: flexcoders@yahoogroups.com on behalf of thomas parquier Sent: Thu 4/9/2009 10:40 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Illegible axis labels Has anyone encountered this problem ? Is there any workaround ? thanks, thomas 2009/4/9 thomas.parquier mailingli...@web-attitude.fr Setting gutterBottom (in chart mxml tag) and height (in axisrenderer tag) keeps height of axisRenderer fixed (good) but labels still get resized... ( http://web-attitude.fr/grapheur/grapheur.html, click on 'max' button on the left) Furthermore labels dont get staggered/rotated when canstagger=true and labelRotation=-45. thomas --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, sunild99 sunilbd...@... wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Richard Rodseth rrodseth@ wrote: Is there any way to control how much space is devoted to the axis compared to the chart? Or to control the width of a category (not of the column)? Or to set a minimum font size, after which the axis is dropped? You can use the gutter styles (gutterLeft, gutterRight, etc) to specify how much space is in between the chart and the edge of the chart control. Making your gutters bigger should allow more space for your axis labels. Sunil -- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056 -- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056
[flexcoders] tiling FormItems
I want to have a form with a tiled layout (instead of the default stacked). It looks like I can just put FormItem objects in another container (e.g., Tile) and do what I want, but this seems like cats and dogs sleeping together and lions lying down with lambs and just generally the end of days. I've looked at the source and FormItem seems to assume it's in a Form in a couple of places, but nothing that looks terribly important. Am I safe putting FormItems in a Tile? -Maciek
RE: [flexcoders] Cant receive socket data
You are an optimist: you are not listening for flash.events.IOErrorEvent.IO_ERROR or flash.events.SecurityErrorEvent.SECURITY_ERROR from the XMLSocket. -Original Message- From: flexcoders@yahoogroups.com on behalf of john fisher Sent: Thu 4/9/2009 2:11 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cant receive socket data yikes, please ignore extraneous asterisks in snippet. this is corrected: - the server code ( perl) snippet: my $NULLBYTE = pack( 'c', 0 ); if ( $1 eq new ) { print STDOUT request is: $1 sending xml data\n; print CONNSOCK $simdata ; print CONNSOCK $NULLBYTE; } the flex code snippet: var socket:XMLSocket = new XMLSocket(); socket.addEventListener(Event.CONNECT, connected); socket.addEventListener(DataEvent.DATA, dataReceived); socket.connect(localhost, 8989); private function connected(event:Event):void { socket.send(xmldata); } private function dataReceived(dataEvent:DataEvent):void { trace(dataEvent.data); var xml:XML = new XML(dataEvent.data); } Thanks winmail.dat
RE: [flexcoders] Cant receive socket data
Interesting. We ran into this issue with URLStream: http://bugs.adobe.com/jira/browse/FP-748 -- maybe your problem is related? Actually, searching Adobe JIRA for XMLSocket turns up a number of bugs that sound vaguely like what you're experiencing... -Maciek -Original Message- From: flexcoders@yahoogroups.com on behalf of john fisher Sent: Thu 4/9/2009 4:05 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cant receive socket data More debugging: If I send connect, request data (a short XML text which the server is looking for), then connect again, The data comes through. Note: I am watching in a packet sniffer and I never see the policy file come across any port, though I am able to connect. Note2: if I remove the nullbyte from the perl code no data ever appears. -puzzled John
Re: [flexcoders] Full date
Probably because you're using the wrong format string: http://livedocs.adobe.com/flex/3/langref/mx/formatters/DateFormatter.html#formatString I guess the C, Java, and .NET flavors did not provide enough inconsistent implementations... -Original Message- From: Thiago Rodrigues thiagotrr...@yahoo.com.br Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Full date Date: Wed, 8 Apr 2009 07:17:29 -0700 (PDT) Good morning everybody... Here in Brazil, our date format is: Day/Month/Year Hour:Minutes:Seconds I've made a function that return the curret date, but I also need the time (the full date)... With formatString = DD/MM/ HH:mm:ss only the hour appears... Needing some help here... tnx... The function: import mx.formatters.DateFormatter; private function getData():String{ var dt:Date; var dtf:DateFormatter = new DateFormatter(); dtf.formatString = DD/MM/; dt = new Date(); return dtf.format(dt).toString(); } Thiago TRR MSN: thiago...@hotmail.com E-mails: thiagotrr...@yahoo.com.br / thiago.trr@gmail.com Celular: (32) 8834-2656 Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
Re: [flexcoders] Re: How can I have my class return an ArrayCollection?
So you want a function to return a result before it's there? I think you can see the problem inherent in that design. In a runtime other than Flash, you could block if the user calls the function before the result is available, but Flash won't let you do that (and for good reason--the entire paradigm is built around nonblocking actions). I think the only think you can do is have Services extend EventDispatcher and dispatch an event when the result is returned, and listen for that in the client. -Maciek -Original Message- From: - - sailorse...@yahoo.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How can I have my class return an ArrayCollection? Date: Wed, 8 Apr 2009 08:35:32 -0700 (PDT) I tried that but it returns an empty ArrayCollection because it's only created within the ResultEvent Function once the HTTPService is successful... Thanks. From: valdhor valdhorli...@embarqmail.com To: flexcoders@yahoogroups.com Sent: Wednesday, April 8, 2009 11:20:44 AM Subject: [flexcoders] Re: How can I have my class return an ArrayCollection? Umm.. Add a public function that returns serviceArray ? --- In flexcod...@yahoogro ups.com, sailorsea21 sailorsea21@ ... wrote: Hi everyone, how can I have this following class return me an ArrayCollection whenever I call it [Bindable] public class Services { public var serviceArray: ArrayCollection; public var serviceXML:XML; public function getServices( ):void { var service:HTTPService = new HTTPService( ); service.url = test.php; service.useProxy = false; service.method = POST; service.resultForma t = e4x; service.showBusyCur sor = true; service.addEventLis tener(ResultEven t.RESULT, function (event:ResultEvent) :void { serviceArray = new ArrayCollection( ); serviceXML = event.result as XML; var ourxml:XML; for each(ourxml in serviceXML.elements ()) serviceArray. addItem(ourxml) ; } ); service.send( ); } }
Re: [flexcoders] Re: How can I have my class return an ArrayCollection?
At first glance, that looks right. Now you just need to add listeners (for ResultEvent.RESULT since you're just re-dispatching it--although it might be a good idea to create your own event type here) to the ClientServices object. Alternately, depending on how you're using this, since your class is bindable anway, you could simply have the HTTPService result handler update your servicesArray, and dispatch an event stating it's ready. E.g., something like [Bindable(event=foo)] public function get serviceList():ArrayCollection { return servicesArray; } and in your ResultEvent.RESULT listener, simply do // as before for each (... { ... } // Ideally, dispatch a custom event type, but this will work dipatchEvent(new Event('foo')); Then, clients binding to the serviceList() getter will automagically see updates as soon as the info arrives--e.g., something like: mx:Script ![CDATA[ var cs:ClientServices = new ClientServices(); ]] /mx:Script mx:List id=serviceList dataProvider={cs.servicesList}/ This is more useful if you're consuming ClientServices in MXML rather than ActionScript, since in ActionScript you have to go through BindingUtils, which is somewhat more awkward, but it still might be better than manually configuring listeners to ClientServices... -Maciek -Original Message- From: - - sailorse...@yahoo.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How can I have my class return an ArrayCollection? Date: Wed, 8 Apr 2009 09:39:05 -0700 (PDT) My problem wasn't receiving null... I send an HTTPService. The ResultEvent creates an ArrayCollection. I wanted my class to return that ArrayCollection but what is happening is right after my HTTPService is sent, my class returns my ArrayCollection before the ResultEvent has time to fill it... therefore it is null I'm now trying to implement an EventDispatcher but am getting a little confused... Does this look right??? : [Bindable] public class ClientServices extends EventDispatcher { private var serviceArray:ArrayCollection; private var serviceXML:XML; public function ClientServices (target:IEventDispatcher=null) { super(target); var service:HTTPService = new HTTPService(); service.url = 'test.php'; service.useProxy = false; service.method = 'POST'; service.resultFormat = 'e4x'; service.showBusyCursor = true; service.addEventListener(ResultEvent.RESULT, function (event:ResultEvent):void { serviceArray = new ArrayCollection(); serviceXML = event.result as XML; var ourxml:XML; for each(ourxml in serviceXML.elements()) serviceArray.addItem(ourxml); dispatchEvent(event) } ); service.send(); } } Thanks. From: actionscript_czar da...@ducharme.cc To: flexcoders@yahoogroups.com Sent: Wednesday, April 8, 2009 12:18:04 PM Subject: [flexcoders] Re: How can I have my class return an ArrayCollection? If you are having problems with it giving you a null object before the ResultEvent function is called then make a function that returns an empty ArrayCollection if it is currently null. Perhaps function getServiceArray( ):ArrayCollection { if( this.serviceArray == null ) { this.serviceArray = new ArrayCollection( ); } return this.serviceArray( ); } If that isn't what you are having problems with, perhaps more specificity could help us help you. --- In flexcod...@yahoogro ups.com, - - sailorsea21@ ... wrote: I tried that but it returns an empty ArrayCollection because it's only created within the ResultEvent Function once the HTTPService is successful.. . Thanks. _ _ __ From: valdhor valdhorlists@ ... To: flexcod...@yahoogro ups.com Sent: Wednesday, April 8, 2009 11:20:44 AM Subject: [flexcoders] Re: How can I have my class return an ArrayCollection? Umm.. Add a public function that returns serviceArray ? --- In flexcod...@yahoogro ups.com, sailorsea21 sailorsea21@ ... wrote: Hi everyone, how can I have this following class return me an ArrayCollection whenever I call it [Bindable] public class Services { public var serviceArray: ArrayCollection; public var serviceXML:XML; public function getServices( ):void { var service:HTTPService = new HTTPService( ); service.url = test.php; service.useProxy = false; service.method = POST; service.resultForma t = e4x; service.showBusyCur sor = true; service.addEventLis tener(ResultEven t.RESULT, function (event:ResultEvent) :void { serviceArray = new ArrayCollection( ); serviceXML = event.result as XML; var ourxml:XML; for each(ourxml in serviceXML.elements ()) serviceArray. addItem(ourxml) ; } ); service.send( ); } }
Re: [flexcoders] Re: How can I have my class return an ArrayCollection?
I haven't worked with it, actually, but the Language Reference docs are here: http://livedocs.adobe.com/flex/3/langref/mx/binding/utils/BindingUtils.html -Original Message- From: - - sailorse...@yahoo.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How can I have my class return an ArrayCollection? Date: Wed, 8 Apr 2009 12:02:11 -0700 (PDT) Hi Maciek, would you have an example for BindingUtils since I will be consuming ClientServices in ActionScript? Thanks. From: Maciek Sakrejda msakre...@truviso.com To: flexcoders@yahoogroups.com Sent: Wednesday, April 8, 2009 1:46:46 PM Subject: Re: [flexcoders] Re: How can I have my class return an ArrayCollection? At first glance, that looks right. Now you just need to add listeners (for ResultEvent. RESULT since you're just re-dispatching it--although it might be a good idea to create your own event type here) to the ClientServices object. Alternately, depending on how you're using this, since your class is bindable anway, you could simply have the HTTPService result handler update your servicesArray, and dispatch an event stating it's ready. E.g., something like [Bindable(event= foo)] public function get serviceList( ):ArrayCollectio n { return servicesArray; } and in your ResultEvent. RESULT listener, simply do // as before for each (... { ... } // Ideally, dispatch a custom event type, but this will work dipatchEvent( new Event('foo') ); Then, clients binding to the serviceList( ) getter will automagically see updates as soon as the info arrives--e.g. , something like: mx:Script ![CDATA[ var cs:ClientServices = new ClientServices( ); ]] /mx:Script mx:List id=serviceList dataProvider= {cs.servicesLis t}/ This is more useful if you're consuming ClientServices in MXML rather than ActionScript, since in ActionScript you have to go through BindingUtils, which is somewhat more awkward, but it still might be better than manually configuring listeners to ClientServices. .. -Maciek -Original Message- From: - - sailorsea21@ yahoo.com Reply-to: flexcod...@yahoogro ups.com To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] Re: How can I have my class return an ArrayCollection? Date: Wed, 8 Apr 2009 09:39:05 -0700 (PDT) My problem wasn't receiving null... I send an HTTPService. The ResultEvent creates an ArrayCollection. I wanted my class to return that ArrayCollection but what is happening is right after my HTTPService is sent, my class returns my ArrayCollection before the ResultEvent has time to fill it... therefore it is null I'm now trying to implement an EventDispatcher but am getting a little confused... Does this look right??? : [Bindable] public class ClientServices extends EventDispatcher { private var serviceArray: ArrayCollection; private var serviceXML:XML; public function ClientServices (target:IEventDispa tcher=null) { super(target) ; var service:HTTPService = new HTTPService( ); service.url = 'test.php'; service.useProxy = false; service.method = 'POST'; service.resultForma t = 'e4x'; service.showBusyCur sor = true; service.addEventLis tener(ResultEven t.RESULT, function (event:ResultEvent) :void { serviceArray = new ArrayCollection( ); serviceXML = event.result as XML; var ourxml:XML; for each(ourxml in serviceXML.elements ()) serviceArray. addItem(ourxml) ; dispatchEvent( event) } ); service.send( ); } } Thanks. _ _ _ _ _ _ From: actionscript_ czar da...@ducharme. cc To: flexcod...@yahoogro ups.com Sent: Wednesday, April 8, 2009 12:18:04 PM Subject: [flexcoders] Re: How can I have my class return an ArrayCollection? If you are having problems with it giving you a null object before the ResultEvent function is called then make a function that returns an empty ArrayCollection if it is currently null. Perhaps function getServiceArray( ):ArrayCollection { if( this.serviceArray == null ) { this.serviceArray = new ArrayCollection( ); } return this.serviceArray( ); } If that isn't what you are having problems with, perhaps more specificity could help us help you. --- In flexcod...@yahoogro ups.com, - - sailorsea21@ ... wrote: I tried that but it returns an empty ArrayCollection because it's only created within the ResultEvent Function once the HTTPService is successful.. . Thanks. _ _ __ From: valdhor valdhorlists@ ... To: flexcod...@yahoogro ups.com Sent: Wednesday, April 8, 2009 11:20:44 AM Subject: [flexcoders] Re: How can I have my class return an ArrayCollection? Umm.. Add a public function that returns serviceArray ? --- In flexcod...@yahoogro ups.com, sailorsea21 sailorsea21@ ... wrote: Hi everyone, how can I have this following class return me an ArrayCollection whenever I call it [Bindable] public class Services
RE: [flexcoders] select non-top level items in a hierarchical menu
Right, but that click does *not* cascade through parent menus--this is the problem. If I have a hierarchy, I can only use this trick on the top-most menu unless I add handlers to all menus in the chain, and I'm not sure how to find these a priori... -Maciek -Original Message- From: Tracy Spratt tspr...@lariatinc.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] select non-top level items in a hierarchical menu Date: Tue, 7 Apr 2009 00:33:39 -0400 The Menu will dispatch a plain “click” event for the parent nodes. Since menu options also dispatch “click”, you need to check for tht in the handler. Tracy Spratt, Lariat Services, development services available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Monday, April 06, 2009 6:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] select non-top level items in a hierarchical menu So it looks like I can fake this by tracking a stack of open menus and dynamically adding / removing MOUSE_DOWN listeners to the last menu opened / closed. This seems... ahem... less than ideal. Anyone have a better suggestion? -Maciek -Original Message- From: Maciek Sakrejda msakre...@truviso.com Reply-to: flexcoders@yahoogroups.com To: flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] select non-top level items in a hierarchical menu Date: Mon, 06 Apr 2009 13:07:37 -0700 I need the ability to select non-leaf items in a hierarchical menu--is this doable? Basically, suppose I have a dataProvider like this: [ { label: 'a' }, { label: 'b', children: [ { label: '1' }, { label: '2' } ] } ] I want to be able to select a, b, 1, or 2. I can do exactly what I want with a Tree, but I was hoping for something more compact. It seems that selecting a node that has children does not dispatch an ITEM_CLICK event: it just automatically opens the submenu. I'd like to open/close the submenu on rollOver/rollOut, and dispatch a normal ITEM_CLICK for that item on a click. -Maciek
Re: [flexcoders] Freelance / Contract Jobs
http://tech.groups.yahoo.com/group/flexjobs/ -Original Message- From: Kyle ktya...@gmail.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Freelance / Contract Jobs Date: Tue, 07 Apr 2009 17:57:26 - Does anyone have any good resources for finding Freelance / Contract work in Flex/Flash/Actionscript Development? Thanks! -Kyle
Re: [flexcoders] undefined SampleDataEvent
Have you changed the project properties to target FP10? -Original Message- From: Florian Heft mailingli...@fam-heft.de Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] undefined SampleDataEvent Date: Sun, 05 Apr 2009 17:02:31 +0200 Hello everybody, I'm playing around with the new sound capabilities of Flash10 and wanted to try out an example I found on the internet. Basically, I ported the DynamicSoundSample1 from http://www.adobe.com/devnet/flash/articles/dynamic_sound_generation/ to Flex 3. But I keep getting the error Flex error: type was not found or was not a compile-time constant: SampleDataEvent. Indeed, Flex Builder also doesn't show SampleDataEvent in the code completition of import flash.events.. According to the LiveDocs, SampleDataEvents should be available in Flex 3.3 (and I recently updated the SDK to 3.3 and updated the project options): http://livedocs.adobe.com/flex/3/langref/flash/events/SampleDataEvent.html What am I doing wrong? Simplest reproducable code: --- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import flash.events.SampleDataEvent; function sampleDataHandler(event:SampleDataEvent):void { } ]] /mx:Script /mx:Application --- Best regards, florian heft -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Re: Bizarre browser inconsistencies...?
This could be due to browser caching--it could be that you made the change, but the browser cached the old .swf, so you never actually tested that change. Some people append the current time to the .swf request to get around this issue. -Maciek -Original Message- From: one_rabbit_one sinewa...@btinternet.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Bizarre browser inconsistencies...? Date: Mon, 06 Apr 2009 13:54:49 - Thanks for your response. I had already got the crossdomain.xml set to allow both options... Anyway, strangely this morning it is working. Which is even stranger, since I haven't changed anything - but makes me concerned since if it is a sporadic fault, it will be difficult to know whether the viewer is able to see my whole showreel or not. I will try your re-routing solution.--- In flexcoders@yahoogroups.com, carloscarvalhar carloscarval...@... wrote: this may be happening because www.domain.com and domain.com are considered different domains in some browsers and others no. try to set the crossdomain to allow both, or redirect trough server always for only one domain.
Re: [flexcoders] Bar Chart Label - probably easy for most to resolve!!
CategoryAxis.labelFunction, and use IP for the categoryField. -Original Message- From: flexnewbie06 flexnewbi...@yahoo.ca Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Bar Chart Label - probably easy for most to resolve!! Date: Mon, 06 Apr 2009 18:54:24 - Hi all, I am wondering if it is possible to use a different field for the label than the one used in the axis category in a bar chart. To expand... mx:verticalAxis mx:CategoryAxis categoryField=displayName /mx:verticalAxis mx:series mx:BarSeries yField=ip xField=errorIndex displayName=Error Index styleName={barColor()}/ /mx:series I am trying to show a bar chart that shows a list of services delivered by their respect delivery %. I want the label field on the vertical axis to show the display name of the service but I want the bar series to be based on the IP of the service. If I try to use the display name of the service it backfires because sometimes there are duplicate services with the same name, then the bar chart just wigs out and draws those bars on top of each other. But there are never duplicate IP's so I'd be safe there. I just need clean labels. Obviously the above code doesn't work but that is where my brain is right now. Could anyone point me in the right direction. regards
[flexcoders] select non-top level items in a hierarchical menu
I need the ability to select non-leaf items in a hierarchical menu--is this doable? Basically, suppose I have a dataProvider like this: [ { label: 'a' }, { label: 'b', children: [ { label: '1' }, { label: '2' } ] } ] I want to be able to select a, b, 1, or 2. I can do exactly what I want with a Tree, but I was hoping for something more compact. It seems that selecting a node that has children does not dispatch an ITEM_CLICK event: it just automatically opens the submenu. I'd like to open/close the submenu on rollOver/rollOut, and dispatch a normal ITEM_CLICK for that item on a click. -Maciek
Re: [flexcoders] select non-top level items in a hierarchical menu
So it looks like I can fake this by tracking a stack of open menus and dynamically adding / removing MOUSE_DOWN listeners to the last menu opened / closed. This seems... ahem... less than ideal. Anyone have a better suggestion? -Maciek -Original Message- From: Maciek Sakrejda msakre...@truviso.com Reply-to: flexcoders@yahoogroups.com To: flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] select non-top level items in a hierarchical menu Date: Mon, 06 Apr 2009 13:07:37 -0700 I need the ability to select non-leaf items in a hierarchical menu--is this doable? Basically, suppose I have a dataProvider like this: [ { label: 'a' }, { label: 'b', children: [ { label: '1' }, { label: '2' } ] } ] I want to be able to select a, b, 1, or 2. I can do exactly what I want with a Tree, but I was hoping for something more compact. It seems that selecting a node that has children does not dispatch an ITEM_CLICK event: it just automatically opens the submenu. I'd like to open/close the submenu on rollOver/rollOut, and dispatch a normal ITEM_CLICK for that item on a click. -Maciek
Re: [flexcoders] Best approach for Dynamic UI generation from XML...
We do quite a bit of this at Truviso to dynamically generate Flex-based reports and live dashboards based on XML definitions. I think the details of how we do this could be improved, but the core structure is reasonably straightforward, through the magic of recursion. Basically, we have two types of components: Containers and Widgets. A Widget takes its XML definition and transforms our custom XML model to custom Flex components through a small series of (unfortunately) manual steps. A Container walks through its child definitions in the XML and instantiates new Containers or Widgets as appropriate. Having Factories for both Containers and Widgets helps keeps the coupling down. Are there limits on the sorts of things expected from your XML layer, or have you been given the daunting task of re-implementing mxmlc in actionscript? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Ilam Mougy imo...@yahoo.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Best approach for Dynamic UI generation from XML... Date: Fri, 03 Apr 2009 12:31:07 - I have a task of dynamically generating Flex UI forms from XML. I am free to design the look of the XML to be whatever I like. Is there a best approach to this problem, other than iterating over the XML and one by one creating objects that maps to Flex UI elements? Thanks,
[flexcoders] parent MenuItem in hierarchical menus?
Is there an easy way to get a reference to the parent MenuItem from an itemClick MenuEvent? I know I can use parentMenu and then dig around in the data descriptor, but it seems like there should be a cleaner way to do this... Specifically, I want to change my parent MenuItem's label when a certain child is chosen to reflect that selection. E.g., [stuff|v] -food --apples --oranges --milkshakes -cars --flying --not flying --amphibious I want each level to remember the last selection, so if the user selects food - oranges and then cars - flying, the menu would look something like [stuff|v] -food (oranges) --apples --oranges --milkshakes -cars (flying) --flying --not flying --amphibious Or would this be easier through a custom data descriptor? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] Dynamic creation of ComboBox in ActionScript
Brad, creationComplete is an event, and not a method or property. In MXML, these look very similar, but in ActionScript, you need to explicitly add an event listener to handle the event. E.g., comboBox.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreationComplete) and then elsewhere in the file, define the handler, as you would in MXML: private function handleCreationComplete(e:FlexEvent):void { ... } -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: brad.bueche b...@bueche.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Dynamic creation of ComboBox in ActionScript Date: Thu, 02 Apr 2009 13:24:31 - Big Picture: I'm trying to recreate the dynamic search interface in search coders app. I think it will be a great base for an sql front end. I can create combo-box's dynamically via the button. However, I want as much configuration as possible to come from a database (so I can change my app without going through all the red-tape of change control). Sooo... I need to create the ComboBox when the the button is pressed but THEN (here is the question): I need it to execute a function, conn.getData(), in order to have the ComboBox populated. In mxml, I would use creationComplete. However, actionscript does not seem to have this method for ComboBox. What do I use? I've searched the methods for ComboBox but nothing is jumping out at meexcept maybe initialized. Are the 3 phases of layout done before the call to a dataprovider (if I want the data at creationcomplete)? (Yes, I'm working through my flex authority issues too). And, while I'm at it, what would be the best method -- via actionscript-- for completely removing the ComboBox (and putting it out for garbage collection) if the minus button is pressed?
Re: [flexcoders] Using Sharde Object to communicate with a local SWF file from a desktop application
Depending on what you want, XMLSocket might be a better fit than SharedObject... -Original Message- From: Flap Flap flapflapl...@kilooctet.net Reply-to: flexcoders@yahoogroups.com To: FlexCoders flexcoders@yahoogroups.com Subject: [flexcoders] Using Sharde Object to communicate with a local SWF file from a desktop application Date: Thu, 2 Apr 2009 13:44:12 +0200 Hi all, I'm looking for info on how to use a shared object to do a communication between an C++ application that's run on the desktop and a swf file that's run locally on the desktop. I think it's quit easy for a C++ applciation to read and write SOL but I'm just thinking of read / write and lock issue... Have you any feedback on this or link to provide to me ? Thanks Benoît Milgram / Flapflap http://www.kilooctet.net I'm also a music mashup / bootlegs producer : http://www.djgaston.net
Re: [flexcoders] Change viewStack index from different Panels
selectedIndex is a property, not a method. Try click=myviewStack.selectedIndex = 0 -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Thiago Rodrigues thiagotrr...@yahoo.com.br Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Change viewStack index from different Panels Date: Thu, 2 Apr 2009 12:35:21 -0700 (PDT) Hello guys... After read some tutrorials and a introdutory book, I'm making my first application. I've two distinct panes and I wan't to change the index of a viewStack in pane 2 from a click action there belongs to a image located in pane 1. So: click=myviewStack.selectedIndex(0) I got the message: Attempeted of inaccessible method selectedIndex through a reference with static type in mx.controls:ViewStack . May you help me? Tnx. Thiago TRR MSN: thiago...@hotmail.com E-mails: thiagotrr...@yahoo.com.br / thiago.trr@gmail.com Celular: (32) 8834-2656 Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
Re: [flexcoders] Re: Ribbon in FLEX
Can we perhaps have a separate flexcoders-scott-barnes list to discuss whether or not Scott Barnes should be allowed to post to flexcoders and to what extent? Every post by Scott generates three to five posts discussing whether or not his commentary/evangelism is welcome here--this is unarguably more off-topic noise than his actual contributions. -Maciek -Original Message- From: Cole Joplin cole_jop...@yahoo.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Ribbon in FLEX Date: Wed, 1 Apr 2009 14:41:10 -0700 (PDT) More importantly, I have a concern. There is plenty of room in RIA and Microsoft-oriented forums and groups to make their case. I'm even fine with some open debate in Flexcoders. What I don't want to see is Microsoft's Rich Platforms Product Manager, let alone other Microsofties, spamming our Flex group with spin on thread after thread after thread. Given the traffic on this list, I hardly think that the 2-3 on-topic posts I've seen from Scott in the past week classify as spam. -- Jeffry Houser, Technical Entrepreneur Jeffry, no fair editing out the next sentence: More importantly, I have a concern. There is plenty of room in RIA and Microsoft-oriented forums and groups to make their case. I'm even fine with some open debate in Flexcoders. What I don't want to see is Microsoft's Rich Platforms Product Manager, let alone other Microsofties, spamming our Flex group with spin on thread after thread after thread. I'm not saying we are there, I'm saying I'm concerned about it. Just reading the language, the last couple of posts are certainly exploring that territory. I think there are more appropriate venues for that than Flexcoders. Being on-topic does not change the nature of the content. Take the third example. Looking over the body of threads of this group, I can't recall seeing a nice bullet-formatted explanation like the one offered by Scott of why IE does not want to support SVG. I'm not saying this was a copy-paste thing, but it is visually very different. Adobe, Microsoft, and others have plenty of propoganda (or spam) posts, and no one is arguing that point. But I'm not going to pretend this particular content is of the same casual nature of the posts typical members of this group make. Scott uses Microsoft's participation in standards bodies and knowledge of gui research that clearly expresses an authority posture to legitimize his point. The typical posts here are overtly subjective developer opinions taken with a grain of salt. Clearly not the same content. Secondly, this is not a response from a Flex developer, doing Flex stuff every work day. (...imagining Scott with a Flex sticker on his laptop as Steve Ballmer walks by...) This is a corporate-sounding explanation, from actual Microsoft management, on an Adobe Flex group, suggesting we use ribbons in Flex, ignore SVG and thank Microsoft for their h.264 standards compliance. Any part of that sentence not accurate? I'm sure Scott is not programming in Flex, and could not possibly be confused as a member of the Flex community or an objective observer. Therefore, his responses in this group must be viewed in the approriate context, in a truthful light. Clearly not a typical poster. If Flexcoders' threads become an active corporate information outlet for Adobe competitors, I don't think that's a good thing for the group. That is my point, and I think it's a perfectly legitimate one.
RE: [flexcoders]Where does my SWF gain it's weight?
If you have version control, just do a binary search through history to see where the bloat hit (something à la git bisect, though this can be easily scripted if you use another vcs). As far as actually analyzing a .swf and figuring out the bloat, perhaps someone else will chime in. You can generate a link report, but that won't really help with the actual byte-by-byte breakdown. -Original Message- From: flexcoders@yahoogroups.com on behalf of dorkie dork from dorktown Sent: Fri 3/27/2009 2:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders]Where does my SWF gain it's weight? Is there a tool or a way to find out what classes are making my SWF fat? It's been a few months since I last checked my SWF file size and it's 1.2mb. It used to be 600kb and I've made so many changes since then I don't know where the weight is coming in. winmail.dat
[flexcoders] synchronized DataTips?
Is there a way to link DataTips in Flex charting such that normally triggering a single DataTip will also show related data tips for other series? Specifically, I have | |+ |_ s1 |+ |_ s2 and I want to show the DataTip for both s1 and s2 at each corresponding '+' whenever either one is triggered. E.g., if a user hovers over the first '+' in s1, I want the DataTip for that '+' to show, as well as the DataTip for the first '+' in s2. Any ideas? -Maciek
RE: [flexcoders] httpservice formatted as Object 0 = 0 but 1 = 1
Could this have something to do with the fact that 0 coerced to a Boolean is false and '0' is true, whereas both 1 and '1' are true? -Original Message- From: flexcoders@yahoogroups.com on behalf of Gregory Kelley Sent: Thu 3/19/2009 9:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] httpservice formatted as Object 0 = 0 but 1 = 1 I have the following line in the xml returned from the call. rsp stat=ok typePartner/type object inv_text_end_dt= is_comm_paid=0 override_type_id= / /rsp When I reference event.result.rsp.is_comm_paid the result is 0 Now if I pull a record where the value is 1 then the xml looks like rsp stat=ok typePartner/type object inv_text_end_dt= is_comm_paid=1 override_type_id= / /rsp When I reference event.result.rsp.is_comm_paid the result is 1 Anyone see this before? If I need to create a sample I can but it would be late next week, For now I cast it as int then let it get coerced into a boolean. Thanks, Greg
Re: [flexcoders] using mxmlc/compc with 64-bit, 1.6 JVM
What kind of problems are you seeing. Perhaps this is the JVM segfault a co-worker ran into on a 64-bit JVM on OS X? -Original Message- From: Glenn Jones tgjone...@gmail.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] using mxmlc/compc with 64-bit, 1.6 JVM Date: Wed, 18 Mar 2009 09:10:05 -0500 I'm having problems trying to run the mxmlc/compc compilers with a 64-bit version of the 1.6 JVM. Has anyone else tried that kind of configuration? Does Flex support use of 64-bit JVM for compilation purposes? PS. I've only tried on Windows XP-64 so far, but would like to use 64-bit compile on Linux also
RE: [flexcoders] swf file size changes from build to build?
The size of the variation is indeed surprising: there's almost 200k between the extremes! I can't imagine something like embedding a different build date making that much of a difference... -Original Message- From: flexcoders@yahoogroups.com on behalf of Gordon Smith Sent: Wed 3/18/2009 8:52 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] swf file size changes from build to build? I think Alex was joking. He was simpily confirming that you don't get the same size each time you build (although I'm surprised by the size of the variation). What did you mean by myIntVar = 1 instead of 0? The SWFs should execute exactly the same. - Gordon From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Romeo Obane Sent: Wednesday, March 18, 2009 8:18 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] swf file size changes from build to build? I'm quite puzzled of what you've said about right date and time, what do you mean by that? Is the right date and time affects the swf file size? On Thu, Mar 19, 2009 at 5:47 AM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: Just wait for the right date and time. SWFs are zipped and there is some date/time bytes in the SWF that affect the compression table. No two builds are the same. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of fotis.chatzinikos Sent: Wednesday, March 18, 2009 9:55 AM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] swf file size changes from build to build? Hi, I am working on a project where the debug build is about 1MB. The problem is that from build to build i have seen the resulting swf changing sizes. The builds do not add or remove any code, its just minor changes ie myIntVar = 1 instead of 0. Last 5 builds: 1. 1086 KB 2. 1086 KB 3. 894 KB 4. 933 KB 5. 1087 KB I am not sure yet if this happens in the release build as well... Anybody seen that before? PS: Else i will keep rebuilding until i get the smaller possible size to publish... (just joking)
Re: [flexcoders] JVM segfault (!) running mxmlc on OS X
Anyone? -Original Message- From: Maciek Sakrejda msakre...@truviso.com Reply-to: flexcoders@yahoogroups.com To: flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] JVM segfault (!) running mxmlc on OS X Date: Mon, 16 Mar 2009 17:47:26 -0700 A co-worker of mine recently ran into a JVM segmentation fault (!) when running mxmlc on our project. This happens for both Java 1.5 and 1.6. I have not seen anything relevant in JIRA about OS X segfaults. Any ideas? His segfault information follows. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com Model: MacBook4,1, BootROM MB41.00C1.B00, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB Graphics: kHW_IntelGMA965Item, GMA X3100, spdisplays_builtin, 144 MB java... $ java -version java version 1.5.0_16 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284) Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing) the diagnostic message... Process: java [55236] Path: /usr/bin/java Identifier: java Version: ??? (???) Code Type: X86-64 (Native) Parent Process: bash [51581] Date/Time: 2009-03-16 16:53:18.806 -0700 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: 0x000d, 0x Crashed Thread: 0 Thread 0 Crashed: 0 ??? 0x000151c1 0 + 4294988225 1 ??? 0x0001676f 0 + 4294993775 2 ??? 0x00016a1c 0 + 4294994460 3 ??? 0x0001504d 0 + 4294987853 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0041 rbx: 0x7fff5fbfedd0 rcx: 0x rdx: 0x0014 rdi: 0x00018708 rsi: 0x552f3d726964706d rbp: 0x7fff5fbfeb10 rsp: 0x7fff5fbfeb10 r8: 0x901c45f2 r9: 0x r10: 0x r11: 0x r12: 0x0014 r13: 0x00018708 r14: 0x0015 r15: 0x rip: 0x000151c1 rfl: 0x00010293 cr2: 0x00018708 Binary Images: 0x7fff5fc0 - 0x7fff5fc2e643 dyld 97.1 (???) b40847f1ce1ba2ed13837aeccbf19284 /usr/lib/dyld
Re: [flexcoders] null parent for ChartLabel
That's the thing: nothing especially complicated going on. We have custom axes and custom labelFunctions, but we're using the stock AxisRenderer. We re-parent the Chart during this layout change, but that's it (we certainly don't re-parent the labels manually). Perhaps I'll try to see if I can get a simple re-parenting test case to repro this, and I'll file a bug with that. Thanks, Maciek -Original Message- From: Tom Chiverton tom.chiver...@halliwells.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] null parent for ChartLabel Date: Mon, 16 Mar 2009 13:00:27 + On Friday 13 Mar 2009, Maciek Sakrejda wrote: which, combined with the error, seems to imply that this ChartLabel has no parent (!), Chart labels are cached, much like item renderers. why this could be happening (I can't nail down a simple set of steps to this)? Any thoughts for workarounds? What are you doing to the data provider of the chart ? Do you have a customer chartlabel renderer or function ? You could also try changing the code to be: if(parent is AxisRenderer parent.rotation == 90) If the latter works, please file a bug with the patch in.
Re: [flexcoders] Perplexing regex/replace() issue
The issue is that you can't specify a replacement like that. You are effectively replacing every match with $1.toUpperCase(), which (since .toUpperCase() doesn't do anything with '$' or '1') just replaces it with '$1'--the original lowercase match. What you want is to use the second version of replace, where you provide a function to get the replacement (see examples at http://livedocs.adobe.com/flex/3/langref/String.html#replace() ). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: jimmy5804 jimmy5...@yahoo.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Perplexing regex/replace() issue Date: Mon, 16 Mar 2009 17:44:55 - put I don't control with a lot of properties that look like xx-yyy that I want to camelcase: xxYyy and I'd like to do this with a one-line replace() instead of a longer split/join approach. I've tried several variations of: var s:String = t.replace(/-([a-z])/g, $1.toUp
Re: [flexcoders] null parent for ChartLabel
I extended ChartLabel, overrode updateDisplayList() to do what you suggested, Tom, and set the titleRenderer on the AxisRenderer, and that seems to work around the issue. I still could be doing something wrong, but this looks like a framework issue. I'll check the latest sdk version and file a ticket if necessary. Thanks, -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Maciek Sakrejda msakre...@truviso.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] null parent for ChartLabel Date: Mon, 16 Mar 2009 09:42:37 -0700 That's the thing: nothing especially complicated going on. We have custom axes and custom labelFunctions, but we're using the stock AxisRenderer. We re-parent the Chart during this layout change, but that's it (we certainly don't re-parent the labels manually). Perhaps I'll try to see if I can get a simple re-parenting test case to repro this, and I'll file a bug with that. Thanks, Maciek -Original Message- From: Tom Chiverton tom.chiver...@halliwells.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] null parent for ChartLabel Date: Mon, 16 Mar 2009 13:00:27 + On Friday 13 Mar 2009, Maciek Sakrejda wrote: which, combined with the error, seems to imply that this ChartLabel has no parent (!), Chart labels are cached, much like item renderers. why this could be happening (I can't nail down a simple set of steps to this)? Any thoughts for workarounds? What are you doing to the data provider of the chart ? Do you have a customer chartlabel renderer or function ? You could also try changing the code to be: if(parent is AxisRenderer parent.rotation == 90) If the latter works, please file a bug with the patch in.
[flexcoders] JVM segfault (!) running mxmlc on OS X
A co-worker of mine recently ran into a JVM segmentation fault (!) when running mxmlc on our project. This happens for both Java 1.5 and 1.6. I have not seen anything relevant in JIRA about OS X segfaults. Any ideas? His segfault information follows. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com Model: MacBook4,1, BootROM MB41.00C1.B00, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB Graphics: kHW_IntelGMA965Item, GMA X3100, spdisplays_builtin, 144 MB java... $ java -version java version 1.5.0_16 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284) Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing) the diagnostic message... Process: java [55236] Path:/usr/bin/java Identifier: java Version: ??? (???) Code Type: X86-64 (Native) Parent Process: bash [51581] Date/Time: 2009-03-16 16:53:18.806 -0700 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: 0x000d, 0x Crashed Thread: 0 Thread 0 Crashed: 0 ??? 0x000151c1 0 + 4294988225 1 ??? 0x0001676f 0 + 4294993775 2 ??? 0x00016a1c 0 + 4294994460 3 ??? 0x0001504d 0 + 4294987853 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0041 rbx: 0x7fff5fbfedd0 rcx: 0x rdx: 0x0014 rdi: 0x00018708 rsi: 0x552f3d726964706d rbp: 0x7fff5fbfeb10 rsp: 0x7fff5fbfeb10 r8: 0x901c45f2 r9: 0x r10: 0x r11: 0x r12: 0x0014 r13: 0x00018708 r14: 0x0015 r15: 0x rip: 0x000151c1 rfl: 0x00010293 cr2: 0x00018708 Binary Images: 0x7fff5fc0 - 0x7fff5fc2e643 dyld 97.1 (???) b40847f1ce1ba2ed13837aeccbf19284 /usr/lib/dyld
Re: [flexcoders] char Type
It does not--you would typically use Strings instead. E.g., String.charAt(index) returns a String. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: christophe_jacquelin christophe_jacque...@yahoo.fr Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] char Type Date: Fri, 13 Mar 2009 11:46:38 - Hello, Did the char type exist in Flex ? And how to make it if not ? Thank you, Christophe,
Re: [flexcoders] Array of objects
Note that the annotation is only for compile-time checking (and only for MXML, it looks like?), so you were still mostly correct, Paul. If he wants to get really fancy and can require FlashPlayer 10, there's always Vector: http://livedocs.adobe.com/flex/3/langref/Vector.html -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Paul Andrews p...@ipauland.com Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Array of objects Date: Fri, 13 Mar 2009 09:02:55 - LOL, I should be doing the tutorials! http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=metadata_141_05.html Paul - Original Message - From: Paul Andrews p...@ipauland.com To: flexcoders@yahoogroups.com Sent: Friday, March 13, 2009 8:59 AM Subject: Re: [flexcoders] Array of objects - Original Message - From: christophe_jacquelin christophe_jacque...@yahoo.fr To: flexcoders@yahoogroups.com Sent: Friday, March 13, 2009 8:46 AM Subject: [flexcoders] Array of objects Hello, How to declare an array of n Objects of the class myClass ? How did we indicates the type of the object to the array ? private var myArray:Array = []; // You cannot give the array a dimension, nor can you type the obects it holds private var anArray:Array = new Array(); // alternative. Naturally it doesn't have to be private.. Please do some tutorials Christophe. Paul Thank you, Christophe, -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] null parent for ChartLabel
I'm getting the following stack trace when changing the layout of some charts: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.charts.chartClasses::ChartLabel/updateDisplayList()[C:\Work\flex \dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses \ChartLabel.as:262] at mx.core::UIComponent/validateDisplayList()[E:\dev\3.0.x\frameworks \projects\framework\src\mx\core\UIComponent.as:6214] at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x \frameworks\projects\framework\src\mx\managers\LayoutManager.as:602] at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x \frameworks\projects\framework\src\mx\managers\LayoutManager.as:675] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks \projects\framework\src\mx\core\UIComponent.as:8460] at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks \projects\framework\src\mx\core\UIComponent.as:8403] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() Line 262 in ChartLabel.as is the following: if(parent.rotation == 90 parent is AxisRenderer) which, combined with the error, seems to imply that this ChartLabel has no parent (!), and I've confirmed this in the debugger. I searched through my code and I'm not creating any ChartLabels directly. Any ideas why this could be happening (I can't nail down a simple set of steps to this)? Any thoughts for workarounds? Thanks, Maciek
Re: [flexcoders] Re: Question from a C developper
I prefer uint over Number for representing a long. To clarify, uint is just that: an unsigned 32-bit integer. A long is (typically) a signed 64-bit integral number. A uint will allow you to express numbers that are twice as large as the largest int, but that's only a small fraction of the range of long (and it ignores the negative range entirely). A Number, as mentioned before, is an IEEE-754 double (64-bit floating point number). The problem with representing longs as double is that at some point, you'll find a long x such that ((Number) x) == ((Number) x + 1) due to the properties of IEEE-754 floating point (i.e., there simply aren't enough bits in the representation to distinguish those two). I'm not sure what that long x is exactly. So basically, there is no long in ActionScript. You can approximate one with uint, you can approximate one with Number, or you can write your own BigInteger class and do the math internally. That's probably going to be quite ugly and complicated, especially since you can't use operator overloading for basic arithmetic. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] Fwd: Graph Question
You can create your own axis that extends, e.g., LinearAxis, and override guardMinMax to return better bounds. It's not pretty, but it works. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Vik vik@gmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Fwd: Graph Question Date: Fri, 6 Mar 2009 16:37:24 +0530 Hie any updates on this plz... Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- Forwarded message -- From: Vik vik@gmail.com Date: Thu, Mar 5, 2009 at 9:04 AM Subject: Graph Question To: flexcoders@yahoogroups.com Hie I have a column chart graph with vertical axis property baseAtZero = false; This is cool but there is a problem. That is, it sets the lowest value column as the base line and thereby making it almost impossible to see. Is there any way so that it can shows consider the base a value a bit less than the lowest value in my data so that even the lowest column is visible a bit. Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com
Re: [flexcoders] Re: Compressing messages/data: What binary/compression formats are workable in Flex?
I think (some) people were asking about the back-end to try to help you configure http compression, which is done differently with different servers. Given your requirements, that and XML is probably the way to go for the short term, although simple hand-rolled textual formats may offer much better performance with negligible complexity for some stuff. -Maciek -Original Message- From: David Adams dpad...@gmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Compressing messages/data: What binary/compression formats are workable in Flex? Date: Sat, 7 Mar 2009 08:38:33 +1100 On Sat, Mar 7, 2009 at 2:06 AM, valdhor valdhorli...@embarqmail.com wrote: You still avoid telling us your back-end setup. I give up. I'm not meaning to frustrate you - particularly since you're being kind enough to spend your time sending me suggestions. The back-end is called 4D and it definitely does not have server-side AMF support. I know the right people to ask and have already triple-checked that AMF support is not available. I've even checked with people that might have had reason to roll their own AMF support and none of them have. The main product itself isn't going to have new features added until the next version which doesn't have any announced date. I just didn't think it was worth wasting people's time trying to find an answer on the server-side as I've already got that covered. Thanks for your help.
Re: [flexcoders] AsyncToken with special chars
This sounds like your problem: https://bugs.adobe.com/jira/browse/SDK-18326 Fixed in the 3.0.3 that recently went out, according to the release notes. -Original Message- From: thibodeau.alain thibodeau.al...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] AsyncToken with special chars Date: Thu, 05 Mar 2009 16:58:59 - Hi there, I've run into an issue that I am sure others have, but I cannot find a solution. I am using cairngorm with a webservice. I need to send in my soap body the less than and greater than characters. In my mxml based on user input, I use lt;gt;. I follow the call and flex converts the lt;gt; to until the AsyncToken gets a hold of it. It should convert it back to lt;gt; for the soap call, however it takes the first and converts that too.. so the outgoing soap looks like this amp;lt;gt; instead of lt;gt;. Anyone know why this is happening or a solution? Thanks in advance
Re: [flexcoders] Help the Flex Team by taking our survey!
If anyone is interested in the fate of Flex on Linux, please take the survey--there are a number of Linux-related questions. Long live Flex Builder Linux! Maybe in 277 days we'll actually get a beta instead of a fifth alpha (or--God forbid--dropped support). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: flex_coders ve...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Help the Flex Team by taking our survey! Date: Fri, 27 Feb 2009 19:01:29 - Help the Flex team better understand who you are and what you're working on. This information is incredibly valuable to us. Please take 20 minutes and fill out our survey: http://www.surveymonkey.com/s.aspx?sm=vCfoIoZ0_2bLG6CTgVcntsVA_3d_3d Thanks for your time and help!
Re: [flexcoders] Question about how to draw a line connecting two UIComponent
It's not a drop-in library, but you may want to take a look at Simon Gladman's node-based UI: http://flexmonkey.blogspot.com/2008/10/visual-node-based-calculator-in-flex.html -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: carlo giordano giordano1...@gmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about how to draw a line connecting two UIComponent Date: Fri, 27 Feb 2009 17:42:10 +0100 Hi, I would connect two UIComponent like mx:Panel or flexmdi:MDIWindow with a line in such a way that the line continues to connect the two UIComponent when one or both get dragged around. Anyone has idea on how to implement it ? I try to use the Flex Wires library(http://code.google.com/p/flexwires/) but is not very useful to me because my goal is to develop a Flex based UML tool. However Flex Wires contains the right principles to start with my tool. Anyone have some tips suggest to me ? Thanks. Carlo.
Re: [flexcoders] Re: Loader or URLRequest Issues on Mac
As I'm answering my own questions here, I guess I'll just posted my findings :) I just wanted to point out that this is much appreciated. There's way too many forum threads that end with never mind--figured it out, which is not that helpful to the next guy who has the same question (flexcoders is actually pretty good about this, but I figure it can't hurt to encourage the behavior). Thanks, -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] Re: ToggleButtonBar xml based dataProvider (2)
Not by default, but there are about a million and a half examples if you search the web. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: markgoldin_2000 markgoldin_2...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ToggleButtonBar xml based dataProvider (2) Date: Thu, 26 Feb 2009 17:36:09 - Yeah, I see it now too. Do think it's possible to set an icon for a button at run time? --- In flexcoders@yahoogroups.com, bhaq1972 mbha...@... wrote: i'm no expert but i'd suggest not using XML as the dataprovideronly because of what the docs say and looking at the code prior to line 378 in NavBar.as I modified your dataprovider to look like this mx:dataProvider mx:Array mx:Object id=b4 label=G2 online=true icon=@Embed.../ etc.. /mx:Array /mx:dataProvider And it works fine. --- In flexcoders@yahoogroups.com, markgoldin_2000 markgoldin_2000@ wrote: Still can't understand why the following does not work: code: mx:ToggleButtonBar id=floorlines direction=vertical iconField=icon horizontalGap=5 itemClick=clickHandler (event); labelField=label creationComplete=floorLinesData(); height=100% fontSize=8 fontWeight=bold/ data: root lines id4/id labelG2/label onlinetrue/online icon@Embed('D:/projects/sfcs/assets/status_online.png')/icon /lines lines /root code: floorlines.dataProvider = resultXML.lines; error: Error: ERROR: The dataProvider of 'floorlines' must not contain objects of type flash.display.DisplayObject. at mx.controls::NavBar/set dataProvider()[C:\autobuild\3.2.0 \frameworks\projects\framework\src\mx\controls\NavBar.as:378] at tasktracking/floorLinesShowData() [D:\projects\sfcs\tasktracking\src\tasktracking.mxml:107] at modulecode::Classes/httpResult() [D:\projects\sfcs\UFDCommonLib\src\modulecode\Classes.as:62] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::di spatchRpcEvent()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::re sultHandler()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:193] at mx.rpc::Responder/result()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\Responder.as:43] at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74] at DirectHTTPMessageResponder/completeHandler() [C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.a s:403] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Thanks
Re: [flexcoders] Reading the output of an AIR application in C#
I think you should be able to have the C# app open an XML socket server, and communicate back through XMLSocket from Flex. It's much more straightforward than reimplementing LocalConnection, and much more flexible than communicating through a file. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: akila_ksri akila_k...@yahoo.co.in Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Reading the output of an AIR application in C# Date: Thu, 26 Feb 2009 11:16:44 - Hi, I have an Air application which is launched from a C# application using System.Diagnostics.Process.Start(myAirApp.exe). I need to be able to return some results from the Air app back to my C# app. Is there any way to do this? Any help regarding this would be greatly appreciated. Thanks in advance, Akila
Re: [flexcoders] Enum in Fles
This came up on this list recently and apparently it's not a great idea: http://tech.groups.yahoo.com/group/flexcoders/message/136096 We're using Granite DS which *does* generate a mirror ActionScript Enum type, but apparently this approach is fraught with peril (because Flash--unlike Java--won't guarantee that you have only one instance of your Enum). I've reviewed our usage, and we're not doing anything where this would hurt us, but I can easily imagine problems. E.g., if you put your Enum in an ArrayCollection and later try to find it by using getItemIndex, but you pass a different Enum instance to getItemIndex, the ArrayCollection won't find it because it uses == to compare objects, and two separate instances of the same Enum are not ==. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: sunmoorthy1 sunmoort...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Enum in Fles Date: Thu, 26 Feb 2009 21:22:47 - Hi, I am using BlazeDS for communicate Flex with java application. I want to know how to how to convert enum object to Flex ActionScript object.
Re: [flexcoders] Reading compressed file in AS 3
What are the other bytes ;) ? I've run into some issues working with low-level bit-twiddling before (only on Linux, but that still may be indicative of larger problems). For example, in FP9 on Linux, sending a payload with a POST URLRequest truncates the payload data at the first 0x00 byte (!). On FP10 in Linux, that seems to have been fixed, but I'm getting a different error that I have not yet tracked down. I'm not sure if your issue is related, but I'd make sure your data makes it to the client okay before you try to decompress it. E.g., can you compute a checksum for both client and server and compare? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: ACasualObserver pof...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Reading compressed file in AS 3 Date: Thu, 26 Feb 2009 21:45:19 - I have a program that create an XML string and write it to a file using either regular file function or zlib file function to create compressed file. This is done on the server. On the client, I can read and process the uncompressed file in an AS3 application using URLLoader and URLRequest. I have problem doing the same with compressed file. The code copies the data correctly to a ByteArray but uncompress method gives Error #2058: There was an error decompressing the data. What can be wrong and what is the solution. In case it is useful, the first 16 bytes of the file in HEX are: 1F 8B 08 00 00 00 00 00 00 0B CC BC 67 AF F4 CC They match the first 16 bytes of the ByteArray. Thanks.
Re: [flexcoders] Tons of errors using FlexBuilder on Ubuntu
I'm using it on Ubuntu 8.10 (was on 8.4 and 7.10 before that) and I haven't actually hit any code completion problems (except that an error pretty much anywhere in your mxml might kill code completion), but find all references is hopeless (should more accurately be called find some references sometimes maybe). I haven't really used FB in Windows (or Mac, for that matter), so I'm not sure if the situation is better there. Still, it's a tremendously useful tool (especially the graphical debugger). I certainly hope it makes it out of alpha on Linux eventually. And to the original poster--yes, go with Europa. We've hit a number of problems with Ganymede. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Tyler Kocheran rfkroc...@gmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Tons of errors using FlexBuilder on Ubuntu Date: Wed, 25 Feb 2009 10:30:23 -0800 Is anyone in Adobe still working on Flex Builder Linux? I am using it almost every day now, and I can say that I'm really happy with it, at least as far as Flex Builder is concerned. Sure there's no design view (which I'm still waiting for ;) ), and code completion is only barely there, but all in all, I can use it to create Flex applications and that rocks. I'm definitely willing to pay the dough to buy a Flex Builder license for Linux, should Adobe go ahead and complete it :) On Fri, Dec 26, 2008 at 7:02 AM, Fernando Wermus fernando.wer...@gmail.com wrote: In my case, it is much worse. I cant even install it. I tried to install it with many Eclipses in Ubunt 8.04 in my laptop. The fact is that it only runs in Ubuntu 7.04 7.10 according to Adobe's page. We are thinking to move to Mac definitily, because Linux isn't a good bet. Adobe is not really interested in a full support. Bye! On Wed, Dec 24, 2008 at 2:54 PM, Tyler Kocheran rfkroc...@gmail.com wrote: Now, before I start, I know that FlexBuilder Linux is in beta still and a lot of stuff isn't working. With that said, I'm experiencing a lot of problems that I don't think other people are experiencing. I'm using Ubuntu as my OS, and Ganymede for my Eclipse version with Flash Player 10 release version. (I can't seem to install Flash 10 Debug Players, does anyone know how to do that on Ubuntu?) When I try to compile my application, it launches fine (when i Run it, not when I Debug it. Debugging doesn't work because I don't have a debug player installed.) However, I'm getting nothing when it runs, just a big blue application that does nothing. I can't visually add anything to the display list, I can't log anything out to Arthropod, I basically can't do anything. When I try to embed my application via SWFObject, that's no working either. I get the alternative content every time. Now here are my questions, I'm going to try and discover the answers ASAP for them, but if you know anything, could you help me out? Does FlexBuilder for Linux need to be installed on a Europa release? Does FlexBuilder for Linux require you to use Flash Player 9 release and debug players? Will using the Flex ant tasks resolve some of the problems I'm having? Any help is much appreciated! Merry Christmas, everyone! http://ubuntuforums.org/showthread.php?p=6432138#post6432138 - TK -- And do this, knowing the time, that now it is high time to awake out of sleep; for now our salvation is nearer than when we first believed. -- Fernando Wermus. www.linkedin.com/in/fernandowermus http://mientretiempo.blogspot.com/ -- And do this, knowing the time, that now it is high time to awake out of sleep; for now our salvation is nearer than when we first believed.
Re: [flexcoders] design question: editing / saving complex value objects
Anyone? I'm sure this sort of thing comes up pretty frequently--I'd be curious to know how other Flex users tackle it. -Maciek -Original Message- From: Maciek Sakrejda msakre...@truviso.com Reply-To: flexcoders@yahoogroups.com To: flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] design question: editing / saving complex value objects Date: Wed, 18 Feb 2009 10:35:04 -0800 Suppose I have a class Calendar that mirrors a server-side class (we're not really working with Calendars, but I think this is a reasonably good and simple analogy): class Calendar { public var appointments:ArrayCollection; /* other stuff */ } Then I want users to be able to edit and save the Calendar: I have a CalendarEditor. Editing a Calendar is moderately complicated (e.g., adding, removing, or editing Appointments), so I want explicit save/cancel steps. When editing something really simple, this is not really a problem--when the user saves, I propagate the view state to the object; when she hits cancel, I don't do anything. However, the Calendar determines what combination of Appointments is valid (they can't overlap), and the Calendar is the dataProvider of the CalendarEditor, so I can't fully validate a combination of Appointments without adding them to the Calendar. This means I actually need to add the appointments to the Calendar before it is saved so that they can be (a) validated in combination and (b) used to update the view while the edit is in progress. This makes save/cancel steps trickier: do I (1) Clone the Calendar (and therefore have it provide a clone() method) when assigned in the dataProvider, modify the clone, and assign the dataProvider reference when the user hits save. (2) Clone the Calendar as above, but have the Editor modify the original, and restore the clone in case the user cancels. (3) Something more clever? The problem with (1) is that cloning may be somewhat complicated, and it feels ugly to have the Editor update the dataProvider reference (instead of modifying the actual object that was set as the data provider). (2) hits the same issue. Perhaps the solution is to maintain a private clone, and copy back the state on save? Or is the right answer here that the model should not expect that the editor will update the object it set as the dataProvider, but should instead expect an update through a mechanism like a Mate map? Any thoughts? (Please keep in mind that my experience with MVC frameworks is unfortunately minimal, though I'm looking into Mate right now). Thanks, Maciek
[flexcoders] Label as item renderer cuts off data when opaqueBackground specified
It looks like setting opaqueBackground on a Label used as an itemRenderer causes the item text to be cut off when the item is mid-scroll (at the end of the grid). This does not happen when opaqueBackground is not set. Small example: mx:DataGrid dataProvider={[ foo, bar, baz, quux ]} height=90 mx:columns mx:DataGridColumn dataField=category mx:itemRenderer mx:Component mx:Label opaqueBackground=0xFF/ /mx:Component /mx:itemRenderer /mx:DataGridColumn mx:DataGridColumn dataField=category/ /mx:columns /mx:DataGrid Anyone run into this? -Maciek
RE: [flexcoders] design question: editing / saving complex valueobjects
I could, but display (since the CalendarEditor component expects data from a Calendar) is still an issue, no? Perhaps I should just be doing what the DataGrid does when outfitted with an itemEditor and just assume that I should operate on the data directly. I can re-request the unaltered object from the server if the users cancels the edit. -Original Message- From: Tracy Spratt tspr...@lariatinc.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] design question: editing / saving complex valueobjects Date: Thu, 19 Feb 2009 14:36:42 -0500 Can you make the validation functionality independently available? Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Thursday, February 19, 2009 11:21 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] design question: editing / saving complex valueobjects Anyone? I'm sure this sort of thing comes up pretty frequently--I'd be curious to know how other Flex users tackle it. -Maciek -Original Message- From: Maciek Sakrejda msakre...@truviso.com Reply-To: flexcoders@yahoogroups.com To: flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] design question: editing / saving complex value objects Date: Wed, 18 Feb 2009 10:35:04 -0800 Suppose I have a class Calendar that mirrors a server-side class (we're not really working with Calendars, but I think this is a reasonably good and simple analogy): class Calendar { public var appointments:ArrayCollection; /* other stuff */ } Then I want users to be able to edit and save the Calendar: I have a CalendarEditor. Editing a Calendar is moderately complicated (e.g., adding, removing, or editing Appointments), so I want explicit save/cancel steps. When editing something really simple, this is not really a problem--when the user saves, I propagate the view state to the object; when she hits cancel, I don't do anything. However, the Calendar determines what combination of Appointments is valid (they can't overlap), and the Calendar is the dataProvider of the CalendarEditor, so I can't fully validate a combination of Appointments without adding them to the Calendar. This means I actually need to add the appointments to the Calendar before it is saved so that they can be (a) validated in combination and (b) used to update the view while the edit is in progress. This makes save/cancel steps trickier: do I (1) Clone the Calendar (and therefore have it provide a clone() method) when assigned in the dataProvider, modify the clone, and assign the dataProvider reference when the user hits save. (2) Clone the Calendar as above, but have the Editor modify the original, and restore the clone in case the user cancels. (3) Something more clever? The problem with (1) is that cloning may be somewhat complicated, and it feels ugly to have the Editor update the dataProvider reference (instead of modifying the actual object that was set as the data provider). (2) hits the same issue. Perhaps the solution is to maintain a private clone, and copy back the state on save? Or is the right answer here that the model should not expect that the editor will update the object it set as the dataProvider, but should instead expect an update through a mechanism like a Mate map? Any thoughts? (Please keep in mind that my experience with MVC frameworks is unfortunately minimal, though I'm looking into Mate right now). Thanks, Maciek
[flexcoders] design question: editing / saving complex value objects
Suppose I have a class Calendar that mirrors a server-side class (we're not really working with Calendars, but I think this is a reasonably good and simple analogy): class Calendar { public var appointments:ArrayCollection; /* other stuff */ } Then I want users to be able to edit and save the Calendar: I have a CalendarEditor. Editing a Calendar is moderately complicated (e.g., adding, removing, or editing Appointments), so I want explicit save/cancel steps. When editing something really simple, this is not really a problem--when the user saves, I propagate the view state to the object; when she hits cancel, I don't do anything. However, the Calendar determines what combination of Appointments is valid (they can't overlap), and the Calendar is the dataProvider of the CalendarEditor, so I can't fully validate a combination of Appointments without adding them to the Calendar. This means I actually need to add the appointments to the Calendar before it is saved so that they can be (a) validated in combination and (b) used to update the view while the edit is in progress. This makes save/cancel steps trickier: do I (1) Clone the Calendar (and therefore have it provide a clone() method) when assigned in the dataProvider, modify the clone, and assign the dataProvider reference when the user hits save. (2) Clone the Calendar as above, but have the Editor modify the original, and restore the clone in case the user cancels. (3) Something more clever? The problem with (1) is that cloning may be somewhat complicated, and it feels ugly to have the Editor update the dataProvider reference (instead of modifying the actual object that was set as the data provider). (2) hits the same issue. Perhaps the solution is to maintain a private clone, and copy back the state on save? Or is the right answer here that the model should not expect that the editor will update the object it set as the dataProvider, but should instead expect an update through a mechanism like a Mate map? Any thoughts? (Please keep in mind that my experience with MVC frameworks is unfortunately minimal, though I'm looking into Mate right now). Thanks, Maciek
Re: [flexcoders] Using Python with Flex
http://pyamf.org/ ? -Original Message- From: rbross77 ro...@cswllc.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Using Python with Flex Date: Tue, 17 Feb 2009 19:38:11 - Hello, I am look ing for some code example of using Python with Flex. I would like to be able to retrieve data using RemoteObjects and call the Python file/program to return the results in AMF format and not XML. Thank you,
Re: [flexcoders] Re: Flex RegExp issues
Python has a handy re.escape() for just this sort of situation, but it looks like ActionScript lacks it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: mmormando m...@mormando.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex RegExp issues Date: Mon, 09 Feb 2009 14:53:24 - We faced a similar problem where I'm working, everyone had to implement a filtering mechanism using user input, including some special characters. While we were comparing solutions it was noted that all but mine had troubles with the special characters.I was just using indexOf(string)-1 rather than the RegExp methods. Now, they kind of had me beat when we had to make it case-insensitive, they only had to add the i second parameter whereas I had to upper or lower case everything, so I had to type more characters there, but it was still way less than the escaping code they had to add. I guess long story short is, take a look at all of the tools in the box, and make sure you're using the right one for your use-case. --- In flexcoders@yahoogroups.com, Manu Dhanda manuraj.dha...@... wrote: The problem is: I am trying to filter an arraycollection(labels) against the text. Using a filter function and in there I am trying to use RegExp. More specifically, whenever I enter a text like 12.0, it returns me results with - character as well like 12-0 etc. So I want that whenever I enter . in my search, it should only return me results with . and NOT - and vice-versa. Thanks, Manu.
RE: [flexcoders] Java enum in Flex3
Thanks, Seth. I'd read the article, but your e-mail clarifies the issues. I've looked over our usage and I think we're safe for now, but this is sort of a time bomb, and it might make sense to fall back to just Strings. The only alternative I see is ensuring to use .equals() everywhere, which is tricky, especially when dealing with collections and other data structures (since they'll already be using the standard '==' equality checks). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Seth Hodgson shodg...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: RE: [flexcoders] Java enum in Flex3 Date: Wed, 4 Feb 2009 21:14:29 -0800 Hi Maciek, I don't know anything about Granite Data Services but a quick google search returns this: http://www.graniteds.org/jira/browse/GDS-228 The reason why they're getting multiple instances of their enum AS classes during deserialization is layed out in the post I linked to below - without a readResolve() hook in the Player there's no way to support reading singletons out of the AMF stream. This means that you have potentially many duplicate instances of each enum value floating around in the AVM. It looks like they've defined an equals() method as an attempt to work around this, but while that's a standard method defined on Java's base Object class there is no equals() method defined in the core ECMAScript/ActionScript libraries. If I were using client side enums in ActionScript, I'd expect simple equality checks to work correctly and they won't with this approach. Each of these classes will also add a bit to your swf size, but that's a minor concern unless you're using tons of enums :) I don't know what other value these classes may provide, perhaps some help with data validation, but be careful in your code anywhere you're expecting them to actually be singletons because they generally won't be. Best, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Wednesday, February 04, 2009 5:38 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Java enum in Flex3 Interesting. Any thoughts on Granite Data Services' approach? There is a custom externalization process for Java Enum objects, and a granite Enum class in ActionScript that all your (generated) Enums extend. The enum class takes care of reading/writing. The writeExternal() method just writes the name of the Enum; readExternal() tries to find the name of the object in the constants defined by the Enum. The RemoteAlias metadata is set up as for a standard Java class. Are we asking for trouble in using this method? Is there something inherently dangerous here? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Seth Hodgson shodg...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: RE: [flexcoders] Java enum in Flex3 Date: Wed, 4 Feb 2009 16:20:33 -0800 BlazeDS and LCDS roundtrip Java enums to the client and back as Strings. That's the only good option at present, and here's an in-depth explanation: http://greetingsfromoakland.blogspot.com/2009/02/enums.html Best, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of sunmoorthy1 Sent: Monday, December 29, 2008 1:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Java enum in Flex3 How to convert java enum values into Flex3 object. Any one went thru this problem? Please give your experties? Sundar
Re: [flexcoders] Re: services-config.xml question
This won't solve your http/https issue, but you *can* actually use relative urls in your AMF endpoints (though the standalone flash player doesn't seem to like this). If your swf is always deployed to a standard location (at least relative to the AMF URL), you can use this in your services-config file. Our endpoints look like this: endpoint uri=../../graniteamf/amf class=flex.messaging.endpoints.AMFEndpoint/ We still haven't found a good way to handle http vs https. You can always programmatically configure your channels and endpoints, but bleah... -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: tchredeemed apth...@liberty.edu Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: services-config.xml question Date: Tue, 03 Feb 2009 14:52:41 - I am not sure that really solves the problem... as I still have to type the server in. Anyone know any better solutions?
RE: [flexcoders] Java enum in Flex3
Interesting. Any thoughts on Granite Data Services' approach? There is a custom externalization process for Java Enum objects, and a granite Enum class in ActionScript that all your (generated) Enums extend. The enum class takes care of reading/writing. The writeExternal() method just writes the name of the Enum; readExternal() tries to find the name of the object in the constants defined by the Enum. The RemoteAlias metadata is set up as for a standard Java class. Are we asking for trouble in using this method? Is there something inherently dangerous here? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Seth Hodgson shodg...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: RE: [flexcoders] Java enum in Flex3 Date: Wed, 4 Feb 2009 16:20:33 -0800 BlazeDS and LCDS roundtrip Java enums to the client and back as Strings. That's the only good option at present, and here's an in-depth explanation: http://greetingsfromoakland.blogspot.com/2009/02/enums.html Best, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of sunmoorthy1 Sent: Monday, December 29, 2008 1:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Java enum in Flex3 How to convert java enum values into Flex3 object. Any one went thru this problem? Please give your experties? Sundar
Re: [flexcoders] Charting 1 minute data over 1 year
Have you suggested a thumbnail slider solution à la Google Finance (say, like here: http://www.meutzner.com/blog/index.cfm/2007/6/15/Google-Finance-with-Flex-from-Silvafug-last-night )? We've implemented something similar, and it works quite well. I can't share our implementation, but the example I linked has source. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Mark Easton mar...@azurebell.co.nz Reply-To: flexcoders@yahoogroups.com To: Flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] Charting 1 minute data over 1 year Date: Fri, 30 Jan 2009 11:04:42 +1300 Hi, I am trying to work out how best to produce a chart which allows a user to make sense of data logged every minute for up to 12 months (ie 524160 values). To complicate matters the graphs are are presented on a dashboard where the user can display many graphs at once - so we are not just displaying the one graph and the size of the graph will change depending on how many graphs are being displayed in the dashboard window. We are logging sensor data (temperature, current, vibration, humidity, wind speed etc). Client does not like a month, week, day, hour, minute drill down scenario - I tried that and it was rejected. He wants a line graph, but where we do have to average data would like to some idea of max and mins - maybe that can be done in point comment. Trouble is if we chart so many points then there are too many points for the mouse click to discern. Essentially the client would like to see the data always at maximum detail no matter what period is being looked at. I have read this http://www.cynergysystems.com/blogs/page/andrewtrice?entry=visualizing_large _data_sets, and am thinking that I will need to proceed in kind and to use an Image object and set BitmapData pixels directly - depending on how I decide to reimplement this thing. Of course I am limited by the number of pixels available along the x-axis for a given chart size. This is complicated as the client would like to zoom on the graph and also look at time slices. The client would also like to be able to see exceptions clearly on the graph - for example if there was a vibration spike. Also sometimes the sensor might not be operational so we need to see those breaks in the graph when no data was captured. All in all I am finding this a complicated requirement to unravel, as some of the requirements seem to be nonsensical - eg having a zoom - when the client always wants to see maximum detail??? So, I need to work out a design for this which will best meet the clients requirement and which flex can handle. Any comments and ideas are appreciated. I am working on this presently, so as I come up with ideas on how to proceed I will post them here. Cheers Mark
RE: [flexcoders] Charting 1 minute data over 1 year
How about, on the main graph, showing the raw data as limited by the slider, but on the slider, show points that average over some period of time, combined with a separate series for outlying points (those outside 1 or 2 standard deviations from the mean)? This gives you an overview of the general trends, a quick indication of outliers, and an ability to zoom in on any single section fairly easily. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Mark Easton mar...@azurebell.co.nz Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Charting 1 minute data over 1 year Date: Fri, 30 Jan 2009 12:16:16 +1300 Hi Maciek, Thanks for your response. Yes I have seen that example and I liked it. We still need to contend, though, with having 500,000 values to plot for the full graph. Using standard graphing that takes for ever to plot - in fact I could not get it to plot. 2000 values seems to the maximum number of points that can be plotted, or to be exact the number of pixels available on x-axis. So how can I take 500,000 points and : 1. Producre a graph that as closely as possible retains its shape? 2. Shows exceptional values If I were to massage the 500,000 points by taking sample of 250 points and averaging them, then I can miss important detail. I could use a vertical column graph with floating columns, where I plotted the line starting at min and ending at max for the plot point. Furthermore as the user used the slider to look at a smaller portion of the graph I would still want to plot at maximum pixel detail. That is if the user uses the slider to look at 1 month then that would allow me to plot points where each point was calculated from a smaller sample size. Cheers Mark -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]on Behalf Of Maciek Sakrejda Sent: Friday, 30 January 2009 11:21 a.m. To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Charting 1 minute data over 1 year Have you suggested a thumbnail slider solution à la Google Finance (say, like here: http://www.meutzner.com/blog/index.cfm/2007/6/15/Google-Finance-with-Flex-from-Silvafug-last-night )? We've implemented something similar, and it works quite well. I can't share our implementation, but the example I linked has source. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Mark Easton mar...@azurebell.co.nz Reply-To: flexcoders@yahoogroups.com To: Flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] Charting 1 minute data over 1 year Date: Fri, 30 Jan 2009 11:04:42 +1300 Hi, I am trying to work out how best to produce a chart which allows a user to make sense of data logged every minute for up to 12 months (ie 524160 values). To complicate matters the graphs are are presented on a dashboard where the user can display many graphs at once - so we are not just displaying the one graph and the size of the graph will change depending on how many graphs are being displayed in the dashboard window. We are logging sensor data (temperature, current, vibration, humidity, wind speed etc). Client does not like a month, week, day, hour, minute drill down scenario - I tried that and it was rejected. He wants a line graph, but where we do have to average data would like to some idea of max and mins - maybe that can be done in point comment. Trouble is if we chart so many points then there are too many points for the mouse click to discern. Essentially the client would like to see the data always at maximum detail no matter what period is being looked at. I have read this http://www.cynergysystems.com/blogs/page/andrewtrice?entry=visualizing_large _data_sets, and am thinking that I will need to proceed in kind and to use an Image object and set BitmapData pixels directly - depending on how I decide to reimplement this thing. Of course I am limited by the number of pixels available along the x-axis for a given chart size. This is complicated as the client would like to zoom on the graph and also look at time slices. The client would also like to be able to see exceptions clearly on the graph - for example if there was a vibration spike. Also sometimes the sensor might not be operational so we need to see those
RE: [flexcoders] Charting puzzle?
In LD_minutes, you have a data point with used: 48060 ( 6000). When you set a max, values larger than that are not plotted (questionable, and a decision that makes issues like this really hard to diagnose, but not entirely crazy). -Maciek -Original Message- From: flexcoders@yahoogroups.com on behalf of Eric Dunn Sent: Wed 1/28/2009 9:21 AM To: flexcoders Subject: [flexcoders] Charting puzzle? I am trying to build a chart to display the Long Distance used out of total allocated minutes. I have a Bar Chart and an array. If I want to display the minutes used without showing the total minutes, everything is fine and dandy. But when I add the mx:LinearAxis maximum = 6000 line, the chart does not populate. What am I missing? Here is the code: [Bindable] public var LD_minutes:ArrayCollection = new ArrayCollection([ {longDistance:minutes Used, used:48060} ]); mx:Panel title=Bar Chart y=567 x=29 height=368 width=901 mx:BarChart id=myChart dataProvider={LD_minutes} showDataTips=true height=245 width=799 mx:verticalAxis mx:CategoryAxis dataProvider={LD_minutes} categoryField=longDistance / /mx:verticalAxis mx:horizontalAxis mx:LinearAxis maximum=6000/ /mx:horizontalAxis mx:series mx:BarSeries yField=longDistance xField=used displayName=minutes used/ /mx:series /mx:BarChart /mx:Panel Eric W Dunn Adaption Technologies 281-465-3326 ed...@adpt-tech.com winmail.dat
Re: [flexcoders] How to compile multiple modules with mxmlc ant task
Refactor your build.xml to pass the module mxml target as an ant property, and call this from another target. E.g., target name=build-modules antcall target=build-module param name=module.mxml value=module1.mxml/ /antcall antcall target=build-module param name=module.mxml value=module2.mxml/ /antcall antcall target=build-module param name=module.mxml value=module3.mxml/ /antcall /target target name=build-module mxmlc file=flex/src/${module.mxml} ... -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: aejaz_98 aejaz...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] How to compile multiple modules with mxmlc ant task Date: Tue, 27 Jan 2009 18:31:32 - Hi, Is it possible to give multiple mxml files under the file property of mxmlc task ? Without this my build.xml is becoming very big due to repetition of many mxmlc sections, the only difference being the value of the file property. Thanks, Aejaz
Re: [flexcoders] Flex 3.3
Any chance the charts will be separated from FB? FB is a fine tool, but for, say, a build system, this coupling just doesn't make sense. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Matt Chotin mcho...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3.3 Date: Tue, 27 Jan 2009 09:39:19 -0800 Yes, it will be a separate download. We're also going to make this strategy better in Flex 4. Matt On 1/27/09 1:29 AM, Tom Chiverton tom.chiver...@halliwells.com wrote: On Monday 26 Jan 2009, Matt Chotin wrote: It's all bug fixes, and not a huge number of them. We're not going to have an associated Flex Builder release either, just the SDK (though we'll get the charts updated). So how will the chart updates be released ? In the past, the only way to get them was to install Builder and rip them out by hand. Are they now, finally, going to be available as a separate download ?
Re: [flexcoders] Re: Base one mxml component on another from Library
How does it not work (i.e., error message please)? That is the way to do it. The FlexMonkey testing tool does exactly this. At first glance, it looks like your namespace declaration for the modulecode is wrong: I think it should be the package name of the module (e.g., something like com.truviso.module.*), but without the error message, it's hard to tell. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: markgoldin_2000 markgoldin_2...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Base one mxml component on another from Library Date: Mon, 26 Jan 2009 17:35:00 - here is my simplified component definition: ?xml version=1.0 encoding=utf-8? modulecode:popupTitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 xmlns:modulecode=/UFDCommonLib/src/modulecode /modulecode:popupTitleWindow But that does not work. --- In flexcoders@yahoogroups.com, Paul Andrews p...@... wrote: - Original Message - From: markgoldin_2000 markgoldin_2...@... To: flexcoders@yahoogroups.com Sent: Monday, January 26, 2009 5:26 PM Subject: [flexcoders] Base one mxml component on another from Library I have a project with a common component library added to it as SWC. I am trying to create a mxml component in my project that would be based on a component from the library. How do I do that? Components are based on the component that's used at the top level in the component definition. I would assume it's just a case of using the component in the swc as the top component of your new component. Paul Thanks
[flexcoders] sorting data on non-grouped field in an advanceddatagrid
I have an ADG (simplified example that reproduces the issue follows). I want the data broken down by category, but sorted by value (which is *not* grouped) within each category. I thought the way to do this would be to set up a ListCollectionView to sort my data, then put a grouping collection on top. The GroupingCollection, however, seems to undo the ListCollectionView sorting. Is there a way to achieve this with the AdvancedDataGrid? If I bind sortedData to a plain DataGrid (with no grouping), this works as expected. Code follows: (note that within each group, things are *not* sorted by value). ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.collections.SortField; import mx.collections.Sort; import mx.collections.ListCollectionView; import mx.collections.ArrayCollection; public var myData:ArrayCollection = new ArrayCollection([ { category: 'foo', value: 4 }, { category: 'foo', value: 3 }, { category: 'foo', value: 7 }, { category: 'bar', value: 2 }, { category: 'bar', value: 1 }, { category: 'bar', value: 8 }, ]); public var sortedData:ListCollectionView = new ListCollectionView(myData); private function handleAdgInit(e:Event):void { var valSort:Sort = new Sort(); valSort.fields = [ new SortField('category'), new SortField('value', false, false, true) ]; sortedData.sort = valSort; sortedData.refresh(); gc.refresh(); } ]] /mx:Script mx:AdvancedDataGrid id=myADG width=100% height=100% allowMultipleSelection=true initialize=handleAdgInit(event) mx:dataProvider mx:GroupingCollection id=gc source={sortedData} mx:grouping mx:Grouping mx:GroupingField name=category/ /mx:Grouping /mx:grouping /mx:GroupingCollection /mx:dataProvider mx:columns mx:AdvancedDataGridColumn dataField=category/ mx:AdvancedDataGridColumn dataField=value/ /mx:columns /mx:AdvancedDataGrid /mx:Application -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] very odd error
This can also happen when you link against a certain class, but the version of that class supplied at runtime has changed. E.g., 1. you build module foo.swf against application bar.swf with load-externs 2. your module uses class Baz from bar.swf 3. you rebuild bar.swf, changing Baz slightly 4. without rebuilding foo.swf, you run bar.swf (which loads foo.swf) When foo.swf attempts to use Baz, you'll get that error, because Baz does not look like what bar.swf thinks it looks like. (Disclaimer: I'm not sure if this exact sequence replicates this issue-- I'm extrapolating from my Java experience here--but I've run into this in Flex previously under similar circumstances) -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: nwebb neilw...@gmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders flexcoders@yahoogroups.com Subject: [flexcoders] very odd error Date: Fri, 23 Jan 2009 12:55:50 + Erm TypeError: Error #1034: Type Coercion failed: cannot convert Tools.dal.dataObjects::dataoutsourcedmod...@9f82091 to Tools.dal.dataObjects.dataOutsourcedModels Done all the basic checks (classname, package, constructor). There are no two objects of the same name . Anyone else seen Flex do something like this before?
Re: [flexcoders] DataGrid - Smooth vertical scrolling
Paging. I've seen a couple of different implementations in blog posts; never actually tried this myself, but it's a common paradigm and the blog posts looked straightforward. I'm actually sort of surprised that neither the DataGrid nor the AdvancedDataGrid build this in. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: markgoldin_2000 markgoldin_2...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid - Smooth vertical scrolling Date: Thu, 22 Jan 2009 22:18:40 - I know that it is not a good idea to present a user with thousands of records in a DataGrid. But sometimes when he forgets to specify filters he may be introduced to a large number or records. Is there any kind of trick to make vertical scrolling as smooth as possible? Thanks
Re: [flexcoders] copyright notices in code
We had to add copyright notices to a number of .mxml and .as files, and wrote a short python script to do this. The only tricky part was that you can't put an XML comment before the XML preamble (the '?xml version=1.0...' part), but you can put it outside the root element. If your script can recognize the copyright header it spits out, updating it to a new wording is trivial (ours does not do this yet). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: arieljake arielj...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] copyright notices in code Date: Wed, 21 Jan 2009 03:57:31 - How do people add copyright notices to their code? When they create a new file? What if the notice changes? Do they use ant to add it before compilation to each file? Does compiling Flex remove the copyright notice? If so, should one worry about having a copyright notice in the code for if/when it is decompiled? Anyone notice that comments are removed from an MXML file when it is edited in design mode? Any and all responses are invited!
Re: [flexcoders] Application language files
Take a look at ResourceManager, and the resource module examples in the Developer Guide. We use this method, and it's been working pretty smoothly. We compile with locale= (the empty string), so that resources are *always* loaded at runtime (we found that this simplified things a little). You can pre-load a specific resource module (based on flashvars, I believe), so it's available at startup, but we just have a non-localized login screen where the user picks a locale. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Sceneshift j...@sceneshift.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Application language files Date: Mon, 19 Jan 2009 14:23:38 -0800 (PST) Hi guys, I want to store all my messages in a language class, common things like login fail messages etc, so I can easily change them later or perhaps add another language. I was talking with a friend about how best to do this, and we couldn't decide. At first we thought of making a LanguageManager singleton class with each translation as a const, but then we'd be bloating the application with unwanted languages. Maybe we could import a SWC at runtime with the correct language class? Can anyone suggest the best solution for working with languages? -- View this message in context: http://www.nabble.com/Application-language-files-tp21552940p21552940.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] warning on 'back' button before closing application?
Is there a way to warn the user that they're about to navigate away from the app through the browser's back button? This is actually a request from our users: we don't use BrowserManager (I don't think it would even make sense for us), but they are used to browser paradigms, and sometimes hit 'back' inadvertently, navigating away from the application. Is there a way to issue a warning beforehand? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
RE: [flexcoders] Re: Valid Date Ranges in Flex
You should be able to determine minDate and maxDate by calling new Date(Number.MIN_VALUE) and new Date(Number.MAX_VALUE). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Gregory Kelley gkel...@pngmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex Date: Wed, 14 Jan 2009 10:30:50 -0500 sheepish grin I knew that at some point in the past. Now that you say that it is very obvious. In my attempt to determine the earliest/latest date supported I tried the following but then all the date parts in the object are NaN. public static const MIN_DATE:Date = new Date(-Number.MAX_VALUE); public static const MAX_DATE:Date = new Date(Number.MAX_VALUE); Thanks, Greg From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Wednesday, January 14, 2009 10:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Valid Date Ranges in Flex The month ranges from 0 (January) to 11 (December). You asked for day 31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year 3000. --- In flexcoders@yahoogroups.com, Gregory Kelley gkel...@... wrote: In creating a date filterd report generation system, I was asked to add an option for returning all data. Rather than reworking the backend I just added a checkbox to the UI that says return all data. If that box is checked then the properties return the following constants (randomely created by yours truly as I couldn't determine from docs what was valid). public static const MIN_DATE:Date = new Date(1500,1,1); public static const MAX_DATE:Date = new Date(2999,12,31); Here is the interesting part those dates actually return the following data. MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500 MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000 The first evaluation makes sense the second one is a bit more confusing. I would expect if the date I assign is too big that the date returned would be earlier not in the future. Anyone know what the valid range is? Thanks for your time, Greg
RE: [flexcoders] Re: Valid Date Ranges in Flex
Ah, right. I'd forgotten that MIN and MAX are typically defined that way for floating point types. And I completely missed that you said you'd tried that--clearly I need more sleep. -Original Message- From: Gregory Kelley gkel...@pngmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex Date: Wed, 14 Jan 2009 14:10:41 -0500 Actually, just for anyone reading this in the future, Number.MIN_VALUE = The smallest representable non-negative, non-zero, number So the actual smallest number is negative Number.MAX_VALUE Greg From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Wednesday, January 14, 2009 1:02 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex You should be able to determine minDate and maxDate by calling new Date(Number.MIN_VALUE) and new Date(Number.MAX_VALUE). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Gregory Kelley gkel...@pngmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex Date: Wed, 14 Jan 2009 10:30:50 -0500 sheepish grin I knew that at some point in the past. Now that you say that it is very obvious. In my attempt to determine the earliest/latest date supported I tried the following but then all the date parts in the object are NaN. public static const MIN_DATE:Date = new Date(-Number.MAX_VALUE); public static const MAX_DATE:Date = new Date(Number.MAX_VALUE); Thanks, Greg __ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Wednesday, January 14, 2009 10:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Valid Date Ranges in Flex The month ranges from 0 (January) to 11 (December). You asked for day 31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year 3000. --- In flexcoders@yahoogroups.com, Gregory Kelley gkel...@... wrote: In creating a date filterd report generation system, I was asked to add an option for returning all data. Rather than reworking the backend I just added a checkbox to the UI that says return all data. If that box is checked then the properties return the following constants (randomely created by yours truly as I couldn't determine from docs what was valid). public static const MIN_DATE:Date = new Date(1500,1,1); public static const MAX_DATE:Date = new Date(2999,12,31); Here is the interesting part those dates actually return the following data. MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500 MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000 The first evaluation makes sense the second one is a bit more confusing. I would expect if the date I assign is too big that the date returned would be earlier not in the future. Anyone know what the valid range is? Thanks for your time, Greg
Re: [flexcoders] Re: warning on 'back' button before closing application?
Thanks, Jim. I don't think that'll work for us, but it's an interesting idea. I think one of the other problems is that by default, Firefox opens new windows in a new *tab*, thwarting the attempt to avoid the chrome. I think the onbeforeunload idea might work--we're actually already doing some other cleanup with that handler, so hopefully this should be straightforward. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: jim.abbott45 jim.abbot...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: warning on 'back' button before closing application? Date: Wed, 14 Jan 2009 22:52:11 - Your other choice is to have your entire application opened in a new, separate browser window, but with the browser 'chrome' history turned off. In that case, users cannot accidentally navigate away from the application, because there _is no_ navigation history to begin with. Of course not everyone likes the idea of opening new browser windows, so this technique may not be useful everywhere. Regards, Jim --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... wrote: Is there a way to warn the user that they're about to navigate away from the app through the browser's back button? This is actually a request from our users: we don't use BrowserManager (I don't think it would even make sense for us), but they are used to browser paradigms, and sometimes hit 'back' inadvertently, navigating away from the application. Is there a way to issue a warning beforehand? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
RE: [flexcoders] Re: CategoryAxis category order
Thanks, Amy. The nature of how we use charts would make a solution based around modifying the axis a lot simpler, but I may need to fall back to this approach. I think the problem is that an axis is unaware of its orientation, and left-to-right is isomorphic with bottom-to-top (to represent a cartesian chart with the standard x and y dimensions). This makes sense for numeric and datetime axes, but it seems counter-intuitive for a category axis. I wonder if I can monkey around with AxisBase.describeData()... -Original Message- From: flexcoders@yahoogroups.com on behalf of Amy Sent: Sun 1/11/2009 5:52 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: CategoryAxis category order --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... wrote: When I have a data provider like [ { category : foo, val : 1 }, { category : bar, val : 2 },{ category : baz, val : 3 } ] and graph this on a BarChart as category vs. val, the values are graphed bottom to top. That is, category foo is on the bottom, then bar, then baz at the top. Is there a way to reverse this order, and have the categories as foo, bar, baz bottom-to-top without having to re-sort the dataprovider (it is used elsewhere) or copy the data in reverse order (I'd rather extend the charting components to do the right thing)? How bout just creating a ListCollectionView that points to the same data and sort that? winmail.dat
RE: [flexcoders] Re: CategoryAxis category order
Hmm. No dice. Overriding describeData() to return super.describeData().reverse() does nothing... Maybe I'll go the ListCollectionView route. -Original Message- From: flexcoders@yahoogroups.com on behalf of Maciek Sakrejda Sent: Sun 1/11/2009 2:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: CategoryAxis category order Thanks, Amy. The nature of how we use charts would make a solution based around modifying the axis a lot simpler, but I may need to fall back to this approach. I think the problem is that an axis is unaware of its orientation, and left-to-right is isomorphic with bottom-to-top (to represent a cartesian chart with the standard x and y dimensions). This makes sense for numeric and datetime axes, but it seems counter-intuitive for a category axis. I wonder if I can monkey around with AxisBase.describeData()... -Original Message- From: flexcoders@yahoogroups.com on behalf of Amy Sent: Sun 1/11/2009 5:52 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: CategoryAxis category order --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... wrote: When I have a data provider like [ { category : foo, val : 1 }, { category : bar, val : 2 },{ category : baz, val : 3 } ] and graph this on a BarChart as category vs. val, the values are graphed bottom to top. That is, category foo is on the bottom, then bar, then baz at the top. Is there a way to reverse this order, and have the categories as foo, bar, baz bottom-to-top without having to re-sort the dataprovider (it is used elsewhere) or copy the data in reverse order (I'd rather extend the charting components to do the right thing)? How bout just creating a ListCollectionView that points to the same data and sort that? winmail.dat
RE: [flexcoders] Re: CategoryAxis category order
Ok, so it looks like a (reasonably simple) way to do this is to set the dataProvider of the CategoryAxis to originalDataProvider.toArray().reverse() on every update of originalDataProvider. A ListCollectionView to wrap originalDataProvider would have been cleaner, but there doesn't seem to be a simple way to say sort the opposite of how this is sorted by default. I tried to extend ListCollectionView into a ReverseListCollectionView by overriding getItemAt() and itemIndex(), but it looks like CategoryAxis actually uses IViewCursor, and I would have had to write my own. I think this solution works reasonably well for now. -Original Message- From: flexcoders@yahoogroups.com on behalf of Maciek Sakrejda Sent: Sun 1/11/2009 3:39 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: CategoryAxis category order Hmm. No dice. Overriding describeData() to return super.describeData().reverse() does nothing... Maybe I'll go the ListCollectionView route. -Original Message- From: flexcoders@yahoogroups.com on behalf of Maciek Sakrejda Sent: Sun 1/11/2009 2:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: CategoryAxis category order Thanks, Amy. The nature of how we use charts would make a solution based around modifying the axis a lot simpler, but I may need to fall back to this approach. I think the problem is that an axis is unaware of its orientation, and left-to-right is isomorphic with bottom-to-top (to represent a cartesian chart with the standard x and y dimensions). This makes sense for numeric and datetime axes, but it seems counter-intuitive for a category axis. I wonder if I can monkey around with AxisBase.describeData()... -Original Message- From: flexcoders@yahoogroups.com on behalf of Amy Sent: Sun 1/11/2009 5:52 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: CategoryAxis category order --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... wrote: When I have a data provider like [ { category : foo, val : 1 }, { category : bar, val : 2 },{ category : baz, val : 3 } ] and graph this on a BarChart as category vs. val, the values are graphed bottom to top. That is, category foo is on the bottom, then bar, then baz at the top. Is there a way to reverse this order, and have the categories as foo, bar, baz bottom-to-top without having to re-sort the dataprovider (it is used elsewhere) or copy the data in reverse order (I'd rather extend the charting components to do the right thing)? How bout just creating a ListCollectionView that points to the same data and sort that? winmail.dat
RE: [flexcoders] Which Unit Testing Framework to use?
For what it's worth, it's true that FlexMonkey is not a unit testing framework (it's more about generating functional tests for the UI), but it's fantastic (especially 0.6+). I first found out about it from this list earlier this week, and about a day later, I started moving our tests to it (from FunFX). Initially getting it working in Flex 3.0 was a pain (it is built against a library that was built against 3.1, which introduced some breaking api changes), but now that it's running, it's a great tool. It records interactions and essentially generates FlexUnit tests for you (in theory, it can generate test for any unit testing framework with asynchronous test case support, but it's currently tied into FlexUnit). I highly recommend it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Errol Thompson kiw...@acm.org Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Which Unit Testing Framework to use? Date: Sat, 10 Jan 2009 13:00:02 +1300 After a brief search on flex unit testing I found that FlexUnit is supposed to be the leader of the pack. I am interested in why you think FlexUnit is the leader of the pack. I know that Adobe have adopted it but its syntax for asserts and assert options are limited. On my blog (http://kiwi-et.blogspot.com/2008/12/assertive-tests.html), I compared the asserts available for FlexUnit, Fluint, FUnit, and FluxUint. I have written other blogs which talk about the differences between the frameworks. I haven't explored the use of FlexMonkey as the description of what it did didn't match my requirements. On my current project, we are using FlexUnit. - Errol Thompson Kiwi-ET Computing Education Research Wellington, New Zealand Phone: +64 21 210 1662 E-Mail: kiwiet (at) acm.org kiwiet (at) computer.org Web: www.teach.thompsonz.net -
[flexcoders] CategoryAxis category order
When I have a data provider like [ { category : foo, val : 1 }, { category : bar, val : 2 },{ category : baz, val : 3 } ] and graph this on a BarChart as category vs. val, the values are graphed bottom to top. That is, category foo is on the bottom, then bar, then baz at the top. Is there a way to reverse this order, and have the categories as foo, bar, baz bottom-to-top without having to re-sort the dataprovider (it is used elsewhere) or copy the data in reverse order (I'd rather extend the charting components to do the right thing)? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] Re: security sandbox violation in standalone player but not in browser
Interesting; however I'm using Evolution against an Exchange server, and my previous posts have showed up fine. I haven't gotten any of my messages to the list from that thread, nor Alex's reply (though I can see them through the web interface), but I did get your reply now. Maybe there are goblins in the tubes messing with my mail. -Maciek -Original Message- From: Tom Chiverton tom.chiver...@halliwells.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: security sandbox violation in standalone player but not in browser Date: Thu, 8 Jan 2009 13:54:45 + On Wednesday 07 Jan 2009, maciek9billion wrote: Please ignore. I checked using the Yahoo! Groups interface, and the message showed up just fine. Must be something funky with either my mail or flexcoders mail. GMail wont show posts you send to mailing lists until someone replies. -- Tom Chiverton Helping to competently introduce fifth-generation best-of-breed experiences This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] Creating an ArrayCollection object for charting
It looks like you're creating a String that looks like the code for the object (i.e., { foo: 'bar' }), and then casting that to Object. That won't do what you want. The thing is still a String. You need to actually programmatically create the Object. Alternately, you can use the JSON.decode() methods in some library (flexlib? or maybe corelib?) after programmatically constructing that String, but that's a completely backwards way of doing it. In the AS2 days, I believe you could also have used eval() to do this, but it's not hard to just construct the object itself programmatically. The code you need to change is inside the loops you've omitted. for each row: var currItem:Object = {}; then inside that loop, for each property you want to graph: currItem[element.name()] = element.valueOf(); and then outside that loop, but inside the per-row loop: simpleData.addItem(currItem); -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: john fisher j...@jpfisher.net Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Creating an ArrayCollection object for charting Date: Thu, 08 Jan 2009 15:28:37 -0800 Can I define this better? Anybody got an idea? john fisher wrote: ## This does not work: simpleData = new ArrayCollection([]); var st:String = new String(); #left out the loops here for clarity # st += '{' + name: + '' + statNode.name + ', ' ; # looped here through data # var elname:String = element.name(); var elvalue:Number = element.valueOf() ; st += elname + : + elvalue + , ; var newst:String = st.slice(0, st.length-2 ); cuts off last white space and comma newst += '}' ; simpleData.addItem( newst as Object ) ; trace(ServerPopUp:makeChart simpledata: = + ObjectUtil.toString(simpleData) ); ServerPopUp:makeChart simpledata: = (mx.collections::ArrayCollection)#0 filterFunction = (null) length = 1 list = (mx.collections::ArrayList)#1 length = 1 source = (Array)#2 [0] {name:se2, inpps:2233, refresh:3000, outpps:7799, conns:2211, inbps:1144, inpkts:3322, outbps:2233, outpkts:4433, inbytes:4455, outbytes:5544, cps:6655} uid = 9543B87D-14F5-0BC6-E2F0-B289C8EC32FC sort = (null) source = (Array)#2 # thanks John
[flexcoders] security sandbox violation in standalone player but not in browser
(sorry if this is a dupe, but the message I sent yesterday still hasn't posted to the list--they're usually up within minutes) Our application has been working fine in various browsers. I'm trying to get it to work in the standalone player (version 9 debug and 10 debug--same behavior--for Linux) for automated testing, but I'm hitting some security sandbox violations: *** Security Sandbox Violation *** Connection to http://localhost:8080/truviso/flex/main/../../foo halted - not permitted from http://localhost:8080/truviso/flex/main/main.swf This relative URL works just fine when loading the .swf through Firefox, IE, Safari, and Opera. We're using relative URLs because we need to be able to rename the webapp without rebuilding it. There's a crossdomain.xml file in truviso/crossdomain.xml and in the root with wide-open access (for now). Any ideas why the standalone player is unhappy with this relative URL? Anything I can do with respect to crossdomain.xml or other security configuration to get around this? Thanks, -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
RE: [flexcoders] Documentation on Flex 3
For general component and class/function reference, the language reference[1] is indispenable. This is what I use daily and it answers 90% of my questions. For a more in-depth treatment, I recommend the developer guide[2]. I believe Adobe's list of official docs is here[3]. [1]: http://livedocs.adobe.com/flex/3/langref/ [2]: http://livedocs.adobe.com/flex/3/html/help.html?content=Part2_DevApps_1.html [3]: http://www.adobe.com/support/documentation/en/flex/index.html -Original Message- From: flexcoders@yahoogroups.com on behalf of brucewhealton Sent: Wed 1/7/2009 9:17 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Documentation on Flex 3 Hello, Can someone help me with something. I wanted to know where one can find the most up to date documentation on the web for the various Flex 3 Components, classes, language reference and so on. I did a google search and found some documentation on some components, i.e. the mx:Text component, but it was to a website not affiliated with adobe. There is a livedocs link and a few other adobe links. Where might I go for the best, most recent documentation on everything in flex 3. There are so many options within Adobe Flex, from Help Help Contents, Help Dynamic Help, Help Search, that I don't know what would be the best or the easiest way to find out everything that I need to know when coding. Thanks in advance, Bruce winmail.dat
[flexcoders] scriptable flex testing (for continuous integration)
Earlier today, a fellow flexcoder asked about flex unit testing frameworks. After looking at the suggestions, I realized that I need similar advice, but focused on tests that can be run automatically, (as opposed to running interactively). It seems fluint is pretty slick, but the ant-based test runner seems to be AIR-based and I'm reluctant to introduce that dependency. I really want to have ant-based (or some kind of scripted) automation tests that we can plug into our CI system. Having GUI runners is nice for instant gratification, but I think scriptable runners are far more useful in the long term. Flexunit itself (hence flexmonkey) seems to do this right, but it looks like it uses the standalone player? This is the blog post I'm referring to: http://weblogs.macromedia.com/pmartin/archives/2006/06/flexunit_ant.html I'd like to test through the browser plugin (and not the standalone player) if possible, since we've hit some browser-specific issues before. Does anyone have more experience with this method of running FlexUnit tests (or any other kind of flex testing framework)? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
[flexcoders] security sandbox violation in standalone player but not in browser
Our application has been working fine in various browsers. I'm trying to get it to work in the standalone player (version 9 debug and 10 debug--same behavior--for Linux) for automated testing, but I'm hitting some security sandbox violations: *** Security Sandbox Violation *** Connection to http://localhost:8080/truviso/flex/main/../../foo halted - not permitted from http://localhost:8080/truviso/flex/main/main.swf This relative URL works just fine when loading the .swf through Firefox, IE, Safari, and Opera. We're using relative URLs because we need to be able to rename the webapp without rebuilding it. There's a crossdomain.xml file in truviso/crossdomain.xml and in the root with wide-open access (for now). Any ideas why the standalone player is unhappy with this relative URL? Anything I can do with respect to crossdomain.xml or other security configuration to get around this? Thanks, -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] re-passing variable arguments?
Yes, through the magic of higher-order functions: http://livedocs.adobe.com/flex/3/langref/Function.html#apply() -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: toofah_gm ga...@byu.edu Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] re-passing variable arguments? Date: Mon, 29 Dec 2008 22:58:14 - pass the variable arguments on to the generic continueFunction in this manner? I don't really want the args to be passed in a single Array, but want to call the continueFunction with the arguments split out like this dynamically continueFunction(args[0],
Re: [flexcoders] radio button is chosen when passing it through httpsservice
http://livedocs.adobe.com/flex/3/langref/mx/controls/RadioButtonGroup.html#selectedValue -Original Message- From: Jason B nos...@advancedonsite.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] radio button is chosen when passing it through httpsservice Date: Fri, 19 Dec 2008 16:55:38 - I was wondering if theres a way to pass which radio button is chosen when passing it through httpsservice, currently i have to specify an ID for each button then pass that but I'd like to handle one parameter being passed. mx:HTTPService mx:request xmlns= rmvpaymentdate {rmvpaymentdate.text} /rmvpaymentdate payment_type {rmvpayments_searchtype_group.??} /payment_type /mx:request /mx:HTTPService mx:RadioButtonGroup id=rmvpayments_searchtype_group/ mx:RadioButton x=375 y=12 label=Vehicles groupName=rmvpayments_searchtype/ mx:RadioButton x=450 y=12 label=Motorcycles groupName=rmvpayments_searchtype/ mx:RadioButton x=540 y=12 label=Both groupName=rmvpayments_searchtype selected=true/
Re: [flexcoders] Re: radio button is chosen when passing it through httpsservice
As the docs state, selectedValue gives you the value of the value property on the selected radiobutton. You either need to add a value attribute to your buttons in mxml, or just use RadioButtonGroup.selection.label (or whatever you want to pass along). RadioButtonGroup.selection gives you a reference to the selected RadioButton object itself, RadioButtonGroup.selectedValue is essentially a shortcut for RadioButtonGroup.selection.value. -Original Message- From: Jason B nos...@advancedonsite.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: radio button is chosen when passing it through httpsservice Date: Fri, 19 Dec 2008 17:14:03 - I tried selected Value but it passes null --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... wrote: http://livedocs.adobe.com/flex/3/langref/mx/controls/RadioButtonGroup.html#selectedValue -Original Message- From: Jason B nos...@... Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] radio button is chosen when passing it through httpsservice Date: Fri, 19 Dec 2008 16:55:38 - I was wondering if theres a way to pass which radio button is chosen when passing it through httpsservice, currently i have to specify an ID for each button then pass that but I'd like to handle one parameter being passed. mx:HTTPService mx:request xmlns= rmvpaymentdate {rmvpaymentdate.text} /rmvpaymentdate payment_type {rmvpayments_searchtype_group.??} /payment_type /mx:request /mx:HTTPService mx:RadioButtonGroup id=rmvpayments_searchtype_group/ mx:RadioButton x=375 y=12 label=Vehicles groupName=rmvpayments_searchtype/ mx:RadioButton x=450 y=12 label=Motorcycles groupName=rmvpayments_searchtype/ mx:RadioButton x=540 y=12 label=Both groupName=rmvpayments_searchtype selected=true/