[flexcoders] Re: Illegible axis labels
--- In flexcoders@yahoogroups.com, thomas.parquier mailingli...@... wrote: Furthermore labels dont get staggered/rotated when canstagger=true and labelRotation=-45. The label rotation won't work unless the fonts are embedded. Another option would be to target Flash Player 10 and use a device font for your labels. Device fonts in Flash Player 10 can be faded, rotated, etc. Just a guess, but maybe it IS staggering your labels. Perhaps it's difficult to observe because the fonts are so small? Are you using a DateTimeAxis? Have you set any of the properties on DateTimeAxis like: dataUnits, dataInterval, labelUnits, interval, unitSize, padding, etc? Not saying any of those properties will address your problem, but not a bad place to start. Sunil
[flexcoders] Re: FLEX defaut xml parser issue with Auto Exponential conversion issue
resultFormat is a property of the HTTPService that you're probably using to retrieve the XML. http://livedocs.adobe.com/flex/3/langref/mx/rpc/http/HTTPService.html#resultFormat Sunil --- In flexcoders@yahoogroups.com, Ramabhadra Reddy ramabhadrare...@... wrote: Thanks Tracy Spratt for your quick reply. Still i have doubt on resultFormat=e4x attribute setting. where do i set this attribute in my code. is this attribue belongs to data grid component? override public function set data(value:Object):void{ super.data = value; cusipvalue =value.cusipvalue; Alert.show(cusip); Here the alert is showing Infinite value . i.e value object it self having exponential converted value. How i can i apply this resultFormat=e4x attribute for value:Object param --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: You have left the resultFormat at its default value which is object. This causes Flex to convert your xml into a tree of dynamic objects. This has many side effects, among which is attempting to guess at the data type from the content, and it often guesses wrong. Set resultFormat=e4x and get your data unmodified, and handle the datatyping yourself. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ramabhadra Reddy Sent: Tuesday, April 07, 2009 11:52 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLEX defaut xml parser issue with Auto Exponential conversion issue cusipvalue7898778E345/cusipvalue if you see above xml tag value, that is having E char. this E is causing the issue. above value(7898778E345) displaying as Infinite When i display this value on flex grid. the reason is this value has E. so the flex parser is implecitly convertion is faling. 7898778E345 = 7898778 * 10 Power of 345 = too big value = Infinite. Is there any way to instruct flex defalut xml parser to stopping auto conversion into expaning exponential value?. Any help is appriciated. Thanks, Rama
[flexcoders] Re: Problems opening window from AIR system tray app
I think your guess to the problem is right on, your main application extends Sprite, not NativeApplication. What was the exception you got when the app extended NativeApplication? Regards, Sunil --- In flexcoders@yahoogroups.com, michob mic...@... wrote: I just found a reference that is doing something very similar (see below); but somehow I still have problems with mine. http://www.adobe.com/devnet/air/flex/quickstart/creating_non-rectangular_windows.html Thanks again, Mitch. --- In flexcoders@yahoogroups.com, michob michob@ wrote: Hi folks, I'm working on an AIR app that lives in the system tray / dock. It should not have a visible window at startup, only a system tray icon. After some event, I would like to create one of two windows (depending on the event). I've got the system tray part working, but can't get the window to open... TrayApp.as: class TrayApp extends Sprite { // etc function processEvent() { var wnd:Window = new MyWindow(); mywindow.open(); } // etc } MyWindow.mxml: mx:Window xmlns:mx=http://www.adobe.com/2006/mxml; width=400 height=300 mx:Label text=hello, world/ /mx:Window When I run this, I get an exception deep in UIComponent: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::updateC\ allbacks()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\\ UIComponent.as:5124] I suspect that maybe I can't call the open() of Window from my app that extends Sprite because some of the application framework is missing (like layout managers, etc..). Maybe it has to extend Application/NativeApplication instead? I tried that, but got another odd exception. Anyone know how to do this? Thanks, Mitch.
[flexcoders] Re: Best option for implementing a growl like notification system ?
Hi, I won't comment on what the best approach is but, maybe you can look at Christian Cantrell's Growl implementation for AIR: article: http://weblogs.macromedia.com/cantrell/archives/2007/10/make_text_fade.html code: http://code.google.com/p/as3notificationlib/ Sunil --- In flexcoders@yahoogroups.com, Arpit Mathur mathur.ar...@... wrote: Hi all, I had a question regarding an AIR utility class that I am trying to finish. The class is pretty simple, it is basically an AIR implementation of the Mac Growl UI (notification windows that pop open on the right edge of the display). Most AIR applications seem to use some implementation of the functionality so I decided to write a generic one that I could open source and let everyone use it. My question is pretty simple. Like growl, I wanted to bring out a number of rectangular notification windows that fade out after some time. There are 3 ways I can see this being accomplished: 1) Open new NativeWindow for each notification 2) Open one transparent nativeWindow add children to it calculate its size based on the number of children being added (notifications), and then place the window appropriately on the screen's edge 3) Open one transparent nativeWindow to the size of the screen (resolution), and add notifications to its right edge. Is there one implementation over another that may have better performance ? #2 seems it may since it creates one native window of the exact size it needs, but its the most work. Any thoughts ?
[flexcoders] Re: HTML component does not display images
Maybe you need a body tag in your html? --- In flexcoders@yahoogroups.com, florian.salihovic florian.saliho...@... wrote: What am i missing? Passing htmlHttp Worldimg src='pic1.png' //html to the HTML component's htmlText property will only display the text, not the image. Best regards.
[flexcoders] Re: How to stop null on delayed execution.
--- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Is there any refrence for a component (particualy containers) life cycle? This page in the Flex Developer's Guide was very helpful in explaining how to override the Flex component life cycle methods. I also recommend reading the pages before/after this page as well: http://livedocs.adobe.com/flex/3/html/ascomponents_advanced_3.html#209794
[flexcoders] Re: Is there a way to detect mouse button state without tracking events?
Hi, You can use Event.MOUSE_LEAVE to detect when mouse has left the stage. You can listen for MouseEvent.MOUSE_MOVE if you need to know when the mouse is back. Can you listen for MOUSE_LEAVE and dispatch your own MOUSE_UP event to stop the list from scrolling? Sunil --- In flexcoders@yahoogroups.com, Dave Kong davek...@... wrote: This is a very urgent issue for us. =( Any help is deeply appreciated! On Thu, Mar 5, 2009 at 5:14 PM, Dave Kong davek...@... wrote: I need to find out at this particular moment, if the mouse button is up or down. Trying to work around the issue with wmode=transparent in FF. If I scroll a list, and drags cursor outside of the player and then releases the button. That mouseUp event is never captured by Flash Player, so when I move mouse cursor back, buttonDown is always true for all mouse events. So I need a workaround on moues re-entry to detect if button is truly down, if not, call the scrollThumb's releaseButton function so it won't keep on scrolling. Thanks!
[flexcoders] Re: file.upload() works fine on mac os x, does not work on a PC
Are you doing this w/an account that does not have the local admin privilege on the Windows workstation? Or does it work when you use HTTP? Just a guess, Sunil --- In flexcoders@yahoogroups.com, tchredeemed apth...@... wrote: I tried this in all browsers on my mac (firefox, safari, camino), and it uploaded fine. I tried this on all browsers on my pc (firefox, ie6, ie7), and it did not. file.upload( new URLRequest( _appGlobals.serverURL+data/attachment/?order_id=+_appGlobals.order.id ) ); serverURL = https://www.oursite.com/ order_id is set for some reason, it is faulting! any ideas why?
[flexcoders] Re: Repeaters and databinding
Your myData Array needs to be an ArrayCollection. ArrayCollections will dispatch CollectionChange events, Arrays do not. So your repeater never gets notified that an item was added to your Array. Sunil --- In flexcoders@yahoogroups.com, Jason jason.merr...@... wrote: Simple question. Why does example 1 below work as expected, but example 2 does not (the Pear checkbox is not added)? I thought repeaters, like other components, responded to changes in the dataprovider through databinding. -- EXAMPLE 1 ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; applicationComplete=init() mx:Script ![CDATA[ [Bindable] private var myData:Array = [{ label:Banana }, { label:Pear }, { label:Orange } ]; ]] /mx:Script mx:Repeater id=myRepeater dataProvider={myData} mx:CheckBox id=checkBox label={myRepeater.currentItem.label} / /mx:Repeater /mx:Application -- EXAMPLE 2 ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; applicationComplete=init() mx:Script ![CDATA[ [Bindable] private var myData:Array = [ { label:Banana } ]; [Bindable] private var fruit1:Object = new Object(); private function init():void { fruit1.label = Pear; myData.push(fruit1); } ]] /mx:Script mx:Repeater id=myRepeater dataProvider={myData} mx:CheckBox id=checkBox label={myRepeater.currentItem.label} / /mx:Repeater /mx:Application -- How would you handle a situation like in Example 2, where the dataprovider changes after the repeater initally runs (in this case, after the applicationComplete event)? Thanks. Jason Merrill
[flexcoders] Re: XML Parsing - maintaining a record pointer
Another idea would be to put your data into an XMLListCollection, get a view cursor to the list with createCursor(). Now you can use the the view cursor to iterate over your XMLListCollection and use the cursor's bookmark property to remember your position when necessary. Probably more work than necessary for a simple scenario... in which case try and follow Tracy's advice to just do it w/e4x. Sunil --- In flexcoders@yahoogroups.com, Libby libbychan...@... wrote: hi, flexCoders! thanks for all ur help in the past! Does Flex maintain your record pointer while reading an xml file? basically what i want to do is read each line and when I hit certain values, read on for 4 or 5 records, then return to the original process without starting back at the last record read at the first read. I can do this the hard way of course by maintaining my own pointer and treating the file as a giant array, but surely there is an easier way? for each (var xmlNode:XML in xml.children()) { // do stuff // if(xmlNode.something==aValue) { for each (var xmlNode:XML read on into the file thanks, Libby
[flexcoders] Re: DYNAMIC actionscript child layout.
Doh! Jeffry is right, it's a Canvas which positions child components by x,y coordinates. So use a VBox or HBox or something :) --- In flexcoders@yahoogroups.com, Jeffry Houser j...@... wrote: I think that x and y values are defaulted to 0, 0; which would put your text in the top left of the canvas. The box may layout the canvas, but will not lay out children of the canvas. This looks like it might be a createChildren method? I would usually position elements in the updateDisplayList method.
[flexcoders] Re: DYNAMIC actionscript child layout.
Um, I think you just need to think about this a little differently. It's a percent value, so by definition it can only be 0-100. If you want a child component to be half the width of it's parent container, then you set the child component's width to be 50%... just like you would do in HTML. If that's not making sense, post some sample code and perhaps I or someone else can show you how to restructure it to use percent widths/heights. Sunil --- In flexcoders@yahoogroups.com, - - sailorse...@... wrote: Using the percentWidth and percentHeight, how can I use values other than 0-100 ? Can I use the width of a component divided by two??? testlayout.width/2 How can I accomplish this? Thanks. -David
[flexcoders] Re: perl and AMF
I haven't used this but there is a Perl AMF library: http://www.simonf.com/flap/ Perhaps this is the ancient implementation you're referring to. --- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: Is anyone using perl as a backend for remoting? I can't find a complete implementation that isn't fairly ancient, but perhaps i'm looking in the wrong places... Guy
[flexcoders] Re: DYNAMIC actionscript child layout.
I think you want something like this: var parentCanvas:Canvas = new Canvas(); parentCanvas.percentWidth =100; parentCanvas.percentHeight = 100; var childCanvas:Canvas = new Canvas(); childCanvas.percentWidth = 100; childCanvas.percentHeight = 100; var childText:Text = new Text(); childText.percentWidth = 100; parentCanvas.addChild(childCanvas); parentCanvas.addChild(childText); Let the childCanvas be 100% of the height of it's parent. The parent container will know to leave enough room for childText. I'm not explaining this very well, but the above code should do what you're looking for. --- In flexcoders@yahoogroups.com, - - sailorse...@... wrote: Hi Sunil, this is what I'm trying to replicate in actionscript: mx:Canvasid=parentCanvas width=100% height=100% mx:Canvasid=childCanvas width={parentCanvas.width} height={parentCanvas.height-childText.height}//mx:Canvas In MXML this layout is DYNAMIC, meaning if I resize my window, all my components are also resized... How can I replicate this in actionscript? Thank you. -David
[flexcoders] Re: DYNAMIC actionscript child layout.
In Actionscript, you can use the percentWidth and percentHeight properties to specify width and height of your components. --- In flexcoders@yahoogroups.com, sailorsea21 sailorse...@... wrote: Hi everyone, when I create my layout with mxml components, my layout is dynamic. If I resize my browser window, my components are also resized. How can I achieve this in actionscript using addChild??? var Layout:Canvas = new Canvas(); graphLayout.width=testlayout.width/2; graphLayout.height=testlayout.width/2; layout_graphs.addChild(graphLayout); testlayout is my vbox that will be parent to the canvas. Thanks.
[flexcoders] Re: Showing grid in line series graph
You need to specify a Stroke to use for the grid lines. You can make the Stroke for the grid lines bolder by setting the weight property of the Stroke to a number greater than 1. If you view the source of this example, you can see one way of doing this: http://blog.sunild.com/2008/08/inverting-chart-series.html Sunil --- In flexcoders@yahoogroups.com, Vik vik@... wrote: Hie That worked thankx.. but the grid lines are very light. almost hard to see.. how to make them look a bit bold? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com
[flexcoders] Re: sprite.startDrag() - Only one sprite is draggable at a time :-(
Here are some links I've book marked on drag and drop: - Adobe help http://livedocs.adobe.com/flex/3/html/help.html? content=05_Display_Programming_14.html About half way through this page, they talk about what to do when you need to work around the limitation of startDrag only working on one thing at a time. - earlier post in this group from Doug McCune about this topic http://tech.groups.yahoo.com/group/flexcoders/message/126160 I think they are both similar approaches, but haven't really read them in a while.
[flexcoders] Re: Idiots guide to crossdomain.xml
If your SWF is hosted on server A, and it needs to access data from servers B, C, and D then you need to put a cross domain policy file on servers B, C, and D that permit access from server A. Note, these servers (A,B,C,D) are different servers ... the names are not aliases. It kind of sounded like one of your host names is an alias for the other. The cross domain policy file you deploy on each web server should allow access from server A, since that is where your SWF is hosted: allow-access-from domain=serverA.domain.com / Also, newer versions of the Flash player will complain if your cross domain policy file does not have a site-control tag. Here's a simple one I use: site-control permitted-cross-domain-policies=master-only/ Which means there's only one policy file for my site. Adobe has some good resources on their site: http://www.adobe.com/devnet/security/ Check out the articles titled Cross-domain policy file specification and Understanding security changes in Flash Player 10. Regards, Sunil
[flexcoders] Re: How to implement right click drill down for either PieChart or ColumnChart
--- In flexcoders@yahoogroups.com, tungchau81 tungcha...@... wrote: I have two problems: Problem#1: I know how to create right-click menu using ContextMenu and ContextMenuItem. However, I do not know how to make the right-click menu to show up **if and only if** a user clicks on a wedge of a PieChart or a column of a ColumnChart, not anywhere else. I did this with an AreaChart by adding an event listener for mouse clicks to each AreaSeries object. I imagine you could do the same thing with PieSeries or ColumnSeries. I'm not sure what to say about your second problem, I did the above in an AIR application :) Regards, Sunil
[flexcoders] Re: FadeIn Effect not working with custom item renderers in List
I got your example to work by removing the Canvas tags from this snippet: mx:itemRenderer mx:Component mx:Canvas mx:Label text={data.label} blendMode=layer/ /mx:Canvas /mx:Component /mx:itemRenderer Sunil
[flexcoders] Re: Chart DataTime series - forcing the start and end points?
--- In flexcoders@yahoogroups.com, jamiebadman jamie.bad...@... wrote: Hi, Is there a way to force the start and end points of the date time axis? I need to show exactly one month on a chart though I may not have a full month's worth of data to display. Thanks in advance, Jamie. The DateTimeAxis for charts has minimum and maximum properties that you can specify w/Date objects. Sunil
[flexcoders] Re: Illegible axis labels
--- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... 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
[flexcoders] Re: Generating random colors, excluding others
--- In flexcoders@yahoogroups.com, gr33neye501 dev...@... wrote: Hi guys I'm trying to generate a series of random colours, but would like to exclude certain colour and closely related shade. For example, i'd like create any colours except red or similar shades. Anyone know of how I could do this. It's a really subjective thing I know. Help really appreciated ;-)
[flexcoders] Re: Generating random colors, excluding others
--- In flexcoders@yahoogroups.com, gr33neye501 dev...@... wrote: Hi guys I'm trying to generate a series of random colours, but would like to exclude certain colour and closely related shade. For example, i'd like create any colours except red or similar shades. Anyone know of how I could do this. It's a really subjective thing I know. Help really appreciated ;-) Hi, I had to do something similar recently. I used HSB color values to generate distinct colors, and then converted them to RGB. I saw you message this morning, and whipped up an example of my ColorManager class using Degrafa: http://blog.sunild.com/2009/01/generating-many-different-colors-with.html To exclude colors, you can modify the code that generates colors to omit the hues you don't want. HTH, Sunil PS: sorry if this is a repost (Yahoo's beta Rich-Text Editor broke on me)
[flexcoders] Re: Properly remove children
Hi, Just wanted to mention something I (in the comments) of one of Ted Patrick's blog posts. He says that there's a known bug in Flash Player 9 where weak references were preventing objects from being garbage collected: http://www.onflex.org/ted/2008/09/useweakreferencesboolean-false.php From earlier reading, I started to use weak references for when ever possible, and thought I didn't have to worry about removing the event listeners. I upgraded to Flash Player 10, however, it still seemed like the weak refs were preventing GC (admittedly a newbie w/using the Flex Profiler). This very last comment on this JIRA bug seems to have reached the same conclusion as I have, that the issue may not be 100% fixed in Flash Player 10: http://bugs.adobe.com/jira/browse/FP-291 Suffice it to say, I have adopted the sage advice of others on this list and now always remove any listeners that I add (weak ref or not). HTH, Sunil
[flexcoders] Re: why the air app can not see the nativeMenu
I don't see a problem w/your example. Note that on Mac OS X the native menu is not attached to the application window, like it would be on a Windows application. HTH, Sunil
[flexcoders] Re: SpeedoMeter
I concur, Thomas Gonzalez's gauge component rocks. Cheers, Sunil
[flexcoders] Re: AIR 1.5 upgrade issue?
Hi, Not sure if this is your problem, but I recall reading something recently about changes to the HTMLLoader.loadString() method in AIR 1.5. I googled and found this blog post (which offers a solution): http://arunbluebrain.wordpress.com/2008/12/09/changes-to-htmlloaderloadstring-in- air-15/ Cheers, Sunil
[flexcoders] Re: Bug: flash.display.Graphics being removed.
Usually, when code completion stops working in Flex Builder, it's because the I'm editing has an error/omission in it... Sunil --- In flexcoders@yahoogroups.com, li wenzhi [EMAIL PROTECTED] wrote: in my flex project using flexsdk3.1, while coding in flexbuilder, the uicomponent cannot auto hint the graphics attribute after . graphics missing in flexsdk3.1? -- lwz7512 Ultrapower Flex Team Leader OpenRIA -- A Window You Exploring RIA World http://www.rimeeting.cn From: flexaustin [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, December 6, 2008 5:56:11 AM Subject: [flexcoders] Bug: flash.display.Graphics being removed. Has anyone had this issue? I do the following (using Flex Builder 3 w/ sdk 3.1 and Flash Player 10). // BEGIN CODE - - - - -- import flash.display. Graphics; public function get drawGraphics( ):Graphics { if(_drawing) { return _drawing.graphics; } else { return null; } } // END CODE - - - - Every 3rd or 4th time I save my file, Flex Builder removes my import statement then I get t1046 Type not found...
[flexcoders] Re: X-axis values in flex chart
Have you tried using the AxisRenderer styles canDropLabels and/or canStagger? Also, the docs for canDropLabels seem to say that behavior may be different based on the type of axis ... maybe you can try using another type of axis like DateTimeAxis instead of CategoryAxis? Regards, the other Sunil --- In flexcoders@yahoogroups.com, Sefi Ninio [EMAIL PROTECTED] wrote: Anyone? On Tue, Nov 18, 2008 at 8:44 PM, Sefi Ninio [EMAIL PROTECTED] wrote: Hi Sunil. Thanks for the time you took to answer. Unfortunately, this doesn't work either. I just tried it... On Tue, Nov 18, 2008 at 7:19 PM, Sunil Bannur [EMAIL PROTECTED] wrote: Did you try using labelRenderer property in AxisRenderer. Here is a sample from livedocs http://livedocs.adobe.com/flex/3/html/help.html? content=charts_formatting_11.html -Sunil --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Sefi Ninio sefi.ninio@ wrote: Hey. I ended up calculating the number of tick labels to skip and used the labelFunction to return the value every calculated value. This works great - I have a label every 10th value, and all values are displayed in the chart as they should. Only problem is that the label font size is still very small (actually, it's exactly the same size as when all labels are displayed). I even tried to define horizontalAxisRenderers and in it a custom renderer with a specified fontSize but tis didn't work either... Does anyone have any ideas on how this can be accomplished? What I need is to display every Xth label, with a readable font size... Thanks, Sefi On Tue, Nov 18, 2008 at 10:36 AM, sefi.ninio sefi.ninio@ wrote: Hey I have a Flex LineChart with a lot of x values (around 300) - which makes them not readable within the chart's container height/width. Is there a way to make the chart display, say, every fifth value? I am using: mx:horizontalAxis mx:CategoryAxis dataProvider={row} categoryField=x labelFunction=formatHorizontalAxis / /mx:horizontalAxis The formatHorizontalAxis function formats unix-time into MM/DD/ using DateFormatter, and I suppose I could also implement it to return every 5th value, but I was wondering if there is a better way to do this. Thanks, Sefi
[flexcoders] Re: LinkBar | mx:dataProvider | does not work
Hi, Just a guess: when you specify the dataProvider that way, maybe need to put your view stack inside of a mx:Component tag: mx:LinkBar mx:dataProvider mx:Component mx:ViewStack / /mx:Component /mx:dataProvider /mx:LinkBar --- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote: HmmmI would have expected that to work. It seems you have to specify the dataprovider property as part of the LinkBar... ?xml version=1.0? !-- Simple example to demonstrate the LinkBar control. -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Panel title=LinkBar Control Example height=75% width=75% horizontalAlign=center paddingTop=10 paddingBottom=10 paddingLeft=10 paddingRight=10 mx:LinkBar color=#FF fontWeight=bold dataProvider={myViewStack}/ !-- Define the ViewStack and the two child containers. -- mx:ViewStack id=myViewStack borderStyle=solid width=100% height=80% mx:Canvas id=search backgroundColor=#CC label=Search width=100% height=100% mx:Label text=Search Screen color=#00/ /mx:Canvas mx:Canvas id=custInfo backgroundColor=#CC label=Customer Info width=100% height=100% mx:Label text=Customer Info color=#00/ /mx:Canvas mx:Canvas id=accountInfo backgroundColor=#FFCCFF label=Account Info width=100% height=100% mx:Label text=Account Info color=#00/ /mx:Canvas /mx:ViewStack /mx:Panel /mx:Application --- In flexcoders@yahoogroups.com, ilikeflex ilikeflex@ wrote: Hi I have below sample code(Code1) which is working fine and i have taken from livedocs. Now i have made modification to code1 and changed to code2. In code2 i am declaring the dataprovider property of the linkbar in a different way.I am using the mx:dataProvider tag.In this case linkbar does not show viewstack contents. I have been putting my head into this but could not find any solution. Any pointers are highly appreciated. Thanks Rajan Code1: ?xml version=1.0? !-- Simple example to demonstrate the LinkBar control. -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Panel title=LinkBar Control Example height=75% width=75% horizontalAlign=center paddingTop=10 paddingBottom=10 paddingLeft=10 paddingRight=10 mx:LinkBar color=#FF fontWeight=bold dataProvider={myViewStack}/ !-- Define the ViewStack and the two child containers. -- mx:ViewStack id=myViewStack borderStyle=solid width=100% height=80% mx:Canvas id=search backgroundColor=#CC label=Search width=100% height=100% mx:Label text=Search Screen color=#00/ /mx:Canvas mx:Canvas id=custInfo backgroundColor=#CC label=Customer Info width=100% height=100% mx:Label text=Customer Info color=#00/ /mx:Canvas mx:Canvas id=accountInfo backgroundColor=#FFCCFF label=Account Info width=100% height=100% mx:Label text=Account Info color=#00/ /mx:Canvas /mx:ViewStack /mx:Panel /mx:Application Code2: ?xml version=1.0? !-- Simple example to demonstrate the LinkBar control. -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Panel title=LinkBar Control Example height=75% width=75% horizontalAlign=center paddingTop=10 paddingBottom=10 paddingLeft=10 paddingRight=10 mx:LinkBar color=#FF fontWeight=bold mx:dataProvider !-- Define the ViewStack and the two child containers. -- mx:ViewStack id=myViewStack borderStyle=solid width=100% height=80% mx:Canvas id=search backgroundColor=#CC label=Search width=100% height=100% mx:Label text=Search Screen color=#00/ /mx:Canvas mx:Canvas id=custInfo backgroundColor=#CC label=Customer Info width=100% height=100% mx:Label text=Customer Info color=#00/ /mx:Canvas mx:Canvas id=accountInfo backgroundColor=#FFCCFF label=Account Info width=100% height=100% mx:Label text=Account Info color=#00/ /mx:Canvas /mx:ViewStack /mx:dataProvider /mx:LinkBar /mx:Panel /mx:Application
[flexcoders] Re: ComboBox with Add New... item
--- In flexcoders@yahoogroups.com, frosifer [EMAIL PROTECTED] wrote: Does anyone have a good way of creating a ComboBox where the first item is an Add New... option that is NOT part of the underlying data collection (i.e., the data provider). I do not want to add an item at the beginning of the data provider, and I want to make sure changes in the collection are reflected in the dropdown. Hope this question makes sense. Hi, you can use the prompt property of the ComboBox: http://livedocs.adobe.com/flex/3/langref/mx/controls/ComboBox.html Sunil
[flexcoders] Re: Plotting values equal to Zero on the Line Chart
Hi, When there is no data for a given day, are you representing this with an actual 0 (zero), or a null value? My experience is that when the data is 0, the chart plots data on the axis and often it looks like there is no value at that point (because the chart line is plotted on the axis itself). Enable dataTips for your chart and mouse over a point with no data, does a tool tip appear? I would expect no tool tip when the value is null. The way I understand it, interpolateValues is only used when the data is missing (null), not zero. So it sounds like you have no value, not a zero value :) Sunil --- In flexcoders@yahoogroups.com, David Unger [EMAIL PROTECTED] wrote: I'm relatively new to flex, and I have been using the line charting control to display a line chart of how many times a media type on my site has been accessed on a daily basis. The problem is that any time I have a value of zero for any one day there is a break in my chart. If I set interpolateValues to true on each of my line series, it just connects the line to the next day with a value, instead of connecting to the a value of zero on the X axis. I have searched all over to find an answer on how to plot values of zero on the access and have come up empty handed. Is there a straightforward way to do this? Am I missing something?
[flexcoders] Re: decrementing the x axis on a chart
I concur, massaging the data is perhaps the way to go. Another option would be to just generate your chart and rotate it 180 degrees ... but this might have other issues (i.e. upside down text, or data-tips, etc.) I did a data massaging approach here: http://blog.sunild.com/2008/08/inverting-chart-series.html Two important things to note: 1) I used the dataFunction property of the AreaSeries (LineSeries in your case) to massage the data. In my case I negated the value of each data point. This modifies the data to be plotted, not the actual data itself. 2) I used the labelFunction property of the LinearAxis to format the labels. So even though my data was plotted as a negative number, the axis labels show them being positive. I think you can achieve what you're looking for by doing something similar. Sunil --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: HI, You're goung to have to massage the data to get your desired result. Youcan also use a second dataProvider and layer it on top of the first dataProvider (alpha = 0), if you want to keep the labels intact. -TH --- In flexcoders@yahoogroups.com, flexie_eric flexie_eric@ wrote: Can someone tell me how to to reverse the scale on an axis in flex so that it decrements rather then increments. ie, if my x values are 0 to 10 on the x-axis i want the x scale to show 10 to 0.
[flexcoders] Re: flicker problem with zoom effect
I think this depends on how you've setup your effects. For example, I had funny problems w/effects that were part of view state transitions. This happened because I neglected to specify where in the transitions that the add child/remove child actions should have occurred (b/c I didn't use AddChildAction or RemoveChildAction). Might be easier to pinpoint if you post your code or a simple example. Sunil --- In flexcoders@yahoogroups.com, Seth Caldwell [EMAIL PROTECTED] wrote: I'm using a zoom effect, and when I remove a popup window, the hide effect zoom-shrinks the popup. then when the zoom finishes, the popup is removed. This all works, but when finishing, the whole site flickers briefly afterwards. Its quite annoying. Has anyone encountered this and know of a fix? See the example at http://www.collarfree.com - click on one of the smaller images to see it zoom and center in a popup. Click and the popup shrinks and disappears and then the site flickers. Apologies if this has been previously addressed, I searched as well as I could and didn't find anything. Seth Caldwell Project Manager / Developer collarfree work (805) 450-1741 e-mail mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] web blocked::blocked::blocked::http://www.collarfree.com/ www.collarfree.com
[flexcoders] Re: Issue with runtime adding of axis labels in DateTimeAxis
For what it's worth, I do this all the time with charts: call removeItemAt(0), and then call addItem( newDateHere ) It works well. The oldest date is removed from the beginning of the array collection and a newer one is tacked on to the end, the chart updates automatically. No need to call any other methods (like refresh). As suggested a code example would help... Sunil --- In flexcoders@yahoogroups.com, Arun Shankar [EMAIL PROTECTED] wrote: dataprovider which is an ArrayCollection for the dateTimeAxis is bindable one. My code looks something like this ArrayCollection.removeItemAt(0); ArrayCollection.addItem(date object); ArrayCollection.refresh(); i believe the first item would get removed and the new date object would get added to the end of the list and the call to refresh() should ultimately makes the chart to redraw with the new change in the collection. i guess flex caches the dateTime axis labels which is ultimately causing this problem. I tried clearing the cache but I could not do that because there is no straight forward to do that in flex. --- On Mon, 15/9/08, Pan Troglodytes [EMAIL PROTECTED] wrote: From: Pan Troglodytes [EMAIL PROTECTED] Subject: Re: [flexcoders] Issue with runtime adding of axis labels in DateTimeAxis To: flexcoders@yahoogroups.com Date: Monday, 15 September, 2008, 9:25 PM This may be caused by a lack of binding in your data objects. Can you post an short, simple example that replicates your issue? On Mon, Sep 15, 2008 at 4:21 AM, arajendr [EMAIL PROTECTED] wrote: Hi All, I've been facing this problem for a while. My application gets new data every 5 mins and I need to update the DateTime axis label at runtime to include the new label data which would ultimately shift the axis one item to the left so that the left most axis label would be removed from chart and the new axis data would get added to the right most part of the axis. I've been able to get the new axis label data on the right most part but the left axis label data which i've removed from the dataProvider collection is still appearing in the chart. is it a bug with DateTime axis? Anyone have come across this problem before? let me know if you have seen this kind of problem before and whats the workaround. Cheers Arun -- Jason Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/
[flexcoders] Re: Displaying a date in a line chart
Hi, Here are two approaches I've used: 1) Using a DateTimeAxis: If the data representing your dates is in the format that can be easily converted into a Date object (see docs for the Date constructor), your DateTimeAxis will understand the dates implicitly. Otherwise, you need to write a parseFunction (see DateTimeAxis docs) so your data can be converted into a Date object. Then as Tom suggested, use the labelFunction property to specify a function that will return a properly formatted date string ... in the labelFunction use a DateFormatter to print the dates in the UK format ( or just use the Date object's toLocale method). 2) Using a CategoryAxis: Instead of using a DateTimeAxis, consider using a CategoryAxis. This approach is similar, except now you don't need to worry about writing a parseFunction. Just write a labelFunction as described above. The CategoryAxis won't deal with dates as nicely as DateTimeAxis, but it works nicely for fixed date ranges (it wouldn't be so good for doing a Google Finance type of chart where you can change time frames of the chart). Check out the docs for the labelFunction and parseFunction properties of the DateTimeAxis (or CategoryAxis). They show the function signature that's required, from there it's easy :) Sunil --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 10 Sep 2008, gr33neye501 wrote: The data is a collection of Date objects, and is displayed in US format. I am trying to get the axis to display the date in DD/YY/ or DD/MM/YY format. Just use a label function on the Axis(Renderer). -- Tom Chiverton 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. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. 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.
[flexcoders] Re: Hi
OS X comes w/Apache installed ... you used to start it by editing /etc/hostconfig or by any of the usual command line methods: sudo apachectl start (etc). Looks like in OS X 10.5 you can also start it by going to System Prefs - Sharing and then enabling Web sharing. I believe the default location of document root is in /Library/WebServer/Documents I normally use MAMP which is a little overkill if you just want a web server... http://www.mamp.info/en/index.php PS: Macs rule :) --- In flexcoders@yahoogroups.com, Robert Thompson [EMAIL PROTECTED] wrote: Thanks. For whatever reason nothing appears in the bottom right corner for me, even on Internet Explorer, for the FLEX3 Component Explorer. I'll check the sdk directory though. Tried to run it right from the explorer.html but it wouldn't for Safari or Firefox. I imagine it needs the http:// protocol instead of file:// I've figured out a lot since I got my MacPro but not how to start a small Web Server to test things via http:// Any Mac machines rule people out there that know how to do this? -r On Sep 9, 2008, at 4:15 AM, Haykel BEN JEMIA wrote: Paul and Nancy were talking about the bottom right pane of the explorer that displays the source of the selected control. The sources of the explorer are available with Flex Builder. They are under sdks\version\samples\explorer. On Tue, Sep 9, 2008 at 8:24 AM, Robert Thompson [EMAIL PROTECTED]wrote: Nancy, We might be talking about different things. (1) Under the FLEX 2.0 examples, you could, for example, go to the FLEX Style Explorer, http://www.adobe.com/devnet/flex/samples/style_explorer/ (2) Then click on Experience the application which leads you to here, http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html (3) You can then Right Click anywhere on the app and click View Source and it appears for the MXML page, and then to the left you see all the files for actionscript, components, etc. And There is a download source (ZIP) link at the bottom. Does any of this appear for you for the FLEX 3.0 component explorer below, http://examples.adobe.com/flex3/componentexplorer/explorer.html Or for any other FLEX 3.0 example for that matter? Hopefully they will be updated soon. -r
[flexcoders] Repeat SSL certificate warnings in AIR app on Windows
I'm working on an AIR project that uses a Timer to fetch data w/an HTTPService. The UI for the appliance uses a self signed SSL certificate. As expected, the AIR app throws up a warning dialog about not trusting the self signed cert. But I get different behavior on this between Windows and Mac OS: - On the Mac OS X 10.5, I am warned only once about the cert. - On Windows XP, I am warned each time an HTTPService is used (when authenticating w/the appliance, and each time the Timer triggers an update). I know I can install the certificate in the browser to make it trust it... but the average user of the appliance wouldn't necessarily know this. This seems like a bug, any thoughts or suggestions would be greatly appreciated. Here's a really simple app that exhibits this behavior. Clicking the Reload button on Win XP generates the cert warning each time, but not on Mac OS. Sorry, the URL below is for a private IP ... the example is so simple, you don't need to run it anyway :) ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; width=800 height=600 layout=vertical creationComplete=init() viewSourceURL=srcview/index.html mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; public function init():void { loginService.addEventListener(ResultEvent.RESULT, handleResult); loginService.send(); } public function handleResult(event:ResultEvent):void { pageContentsTA.text = event.result.toString(); } public function handleReload(event:MouseEvent):void { loginService.send(); } ]] /mx:Script mx:HTTPService id=loginService url=https://10.0.86.29/; resultFormat=text / mx:Button id=reloadBN label=Reload click=handleReload(event) / mx:TextArea id=pageContentsTA width=100% height=500 / /mx:WindowedApplication Cheers, Sunil
[flexcoders] Re: Multiple select with mx:List
Hi, Per the documentation for the List component: The user can select one or more items from the list, depending on the value of the allowMultipleSelection property. The docs for this property say it's a boolean property, and the standard means for selecting multiples apply (shift-click or control-click). Also, there is a selectedIndices property which is An array of indices in the data provider of the selected items. http://livedocs.adobe.com/flex/3/langref/mx/controls/List.html Cheers, Sunil --- In flexcoders@yahoogroups.com, Joshua Jackson [EMAIL PROTECTED] wrote: Dear all, How do I do multiple selection with mx:List. Is there any parameter that I have to set? Because I can only select on item from mx:List. Could anyone give me a hint on this? Many thanks.