Re: [flexcoders] Understanding Custom Event Creation
Right Eric, this was a quick and dirty example. Another thing to note: Event bubbling is dangerous. Only make your event bubble if it is absolutely necessary. I have made some big components and learned the hard way. :) This is just my opinion but event bubbling almost breaks OOP encapsulation. If there is a chance some instance that has not 'subscribed' to your api gets your event, BUGS happen. This problem is synonymous to name collisions and since the compiler can't type check events, here in lies the problem. This can also hurt a dev that does not truly understand bubbling and is trying to use your component or application. Mike On Sat, Jun 14, 2008 at 9:40 AM, EECOLOR [EMAIL PROTECTED] wrote: Whenever you create a custom event. Make sure you override the *clone*method. If you do not do that you will get strange results when re-dispatching an event. Greetz Erik On 6/12/08, Michael Schmalle [EMAIL PROTECTED] wrote: Hi package my.event.package { public class MyEvent extends Event { public static const IS_GREATER_CHANGED:String = isGreaterChanged; public var isGreater:Boolean; public function MyEvent(type:String, isGreater:Boolean) { super(type); this.isGreater = isGreater; } } } // app as file [Event(type=isGreaterChanged, type=my.event.package.MyEvent)] ... var e:MyEvent = new MyEvent(MyEvent.IS_GREATER_CHANGED, true); dispatchEvent(e); ... event handler private function isGreaterHandler(event:MyEvent):void { trace(event.isGreater); } Mike -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
[flexcoders] Re: Split up data inside itemrenderer
Here is my main mxml file: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; height=100% layout=absolute creationComplete=startupServices() xmlns:lib=flexlib.containers.* styleName=ListItems xmlns:view=view.* verticalGap=0 !-- Call the XML list with the waiting folders -- mx:HTTPService id=getWaitingItems url=http://192.168.1.197/PHP/adminFolders/getFolders.php; method=GET useProxy=false result=waitingItems_results(event)/ !-- Calling the IMDB for results -- mx:HTTPService id=IMDBSearch url=http://192.168.1.197/PHP/adminFolders/imdbphp-1.0.3/imdbXMLsearch.php; method=GET result=imdbSearch_results(event) mx:request !--name{SearchBox.text}/name searchtypemovie/searchtype -- /mx:request /mx:HTTPService !-- Getting the IMDB item details -- mx:HTTPService id=IMDBDetails url=http://192.168.1.197/PHP/adminFolders/imdbphp-1.0.3/imdbXML.php; method=GET result=imdbDetails(event) mx:request xmlns= !--mid{imdbList.selectedItem.imdbid}/mid-- /mx:request /mx:HTTPService mx:Style source=css/whiteTheme.css/ mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.collections.IList; import mx.utils.ArrayUtil; public function startupServices():void { getWaitingItems.send(); } public function waitingItems_results(event:ResultEvent):void { waitingItems = event.result.allWaiting.folder as ArrayCollection; } [Bindable] private var waitingItems:ArrayCollection; public function imdbSearch_results(event:ResultEvent):void { imdbSearch = event.result.IMDBresult.movie as ArrayCollection; } [Bindable] private var imdbSearch:ArrayCollection; [Bindable] public var imdbPlots:ArrayCollection; public var newPlotsArray:Array; public function imdbDetails(event:ResultEvent):void { // First determine if the result can be converted or present itself as an array. // We can use the mx.collections.ILis interface for that if (IMDBDetails.lastResult.IMDBdata.movie.plots.plot is IList) { // when true, call the IList.toArray() method newPlotsArray = IMDBDetails.lastResult.IMDBdata.movie.plots.plot.toArray(); } else{ // when false, use the ArrayUtil.toArray() method to convert the result newPlotsArray = ArrayUtil.toArray(IMDBDetails.lastResult.IMDBdata.movie.plots.plot); } // Create a new ArrayCollection using 'newArray' imdbPlots = new ArrayCollection(newPlotsArray); } ]] /mx:Script mx:VBox width=960 height=100% horizontalCenter=0 top=0 verticalGap=0 mx:Spacer height=59/ mx:HBox width=100% mx:Spacer width=100%/ mx:Label text=You have 4 items in query x=828 y=10/ /mx:HBox mx:HRule width=100% strokeWidth=1 strokeColor=#C4C4C4/ mx:Spacer height=22/ mx:TabNavigator id=tn width=100% height=90% tabWidth=140 view:moviesView label=Movies width=100% height=100%/ mx:VBox label=TV-Shows enabled=false/ mx:VBox label=Maintance enabled=false/ /mx:TabNavigator mx:Canvas width=100% mx:Text text=TEST textAlign=center horizontalCenter=0 top=10 color=#595959/ /mx:Canvas /mx:VBox /mx:Application Here is my itemrenderer for mx:List: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=925 height=74 mx:Script
Re: [flexcoders] Understanding Custom Event Creation
That's a pretty broad statement to make. I think bubbling system-wide events are a great way to achieve loose coupling between UI and business code. But then again if you're listening for a NewUserCreated event, your function should be expecting a NewUserCreatedEvent, not an Event. -Josh On Sun, Jun 15, 2008 at 9:03 PM, Michael Schmalle [EMAIL PROTECTED] wrote: Right Eric, this was a quick and dirty example. Another thing to note: Event bubbling is dangerous. Only make your event bubble if it is absolutely necessary. I have made some big components and learned the hard way. :) This is just my opinion but event bubbling almost breaks OOP encapsulation. If there is a chance some instance that has not 'subscribed' to your api gets your event, BUGS happen. This problem is synonymous to name collisions and since the compiler can't type check events, here in lies the problem. This can also hurt a dev that does not truly understand bubbling and is trying to use your component or application. Mike On Sat, Jun 14, 2008 at 9:40 AM, EECOLOR [EMAIL PROTECTED] wrote: Whenever you create a custom event. Make sure you override the *clone*method. If you do not do that you will get strange results when re-dispatching an event. Greetz Erik On 6/12/08, Michael Schmalle [EMAIL PROTECTED] wrote: Hi package my.event.package { public class MyEvent extends Event { public static const IS_GREATER_CHANGED:String = isGreaterChanged; public var isGreater:Boolean; public function MyEvent(type:String, isGreater:Boolean) { super(type); this.isGreater = isGreater; } } } // app as file [Event(type=isGreaterChanged, type=my.event.package.MyEvent)] ... var e:MyEvent = new MyEvent(MyEvent.IS_GREATER_CHANGED, true); dispatchEvent(e); ... event handler private function isGreaterHandler(event:MyEvent):void { trace(event.isGreater); } Mike -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'. -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] [BlazdeDS] setting concurrency property through actionAcript
Hi all, in this document : http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=rpc_07.html it says you can You can set the concurrency property on a RemoteObject component's mx:method tag but I don't use method tag, does that mean I cant set concurrency to be last ? how can I tell my remoteCall to use concurrency =last? I use following code to invoke remote Object : var token:AsyncToken = roService.getQuickPickList(12345); token.addResponder(new AsyncResponder( function(data:Object, token:Object):void { // lalala }, function(info:Object, token:Object):void { }, token )); basicaly I want to make sure every subsequent request cancel out any existing request currently running .looks like that concurrency property will do just that, but I cant seem to find where I can set that all suggestions are appreciated Kind Regards levancho
[flexcoders] Printing full page w/ no margins
Does anybody know why I can't get anything to print in the bottom or right margins of my flexPrintJob? When I preview (and print) any components they end up begin flush with the upper and left sides of the paper with a significant margin on the bottom and right margins. The only think I can do to get the print job to look okay is to pad the top and left equally to what the bottom and right margins are already at, but that really shrink the printable area down. Here is a very basic example of my problem , http://www.wolffebrothers.com/printProblem.jpg -- [EMAIL PROTECTED] 785-832-9154
Re: [flexcoders] Understanding Custom Event Creation
Didn't mean it to be 'broad'. I agree but there are still problems with it. Mike On Sun, Jun 15, 2008 at 8:53 AM, Josh McDonald [EMAIL PROTECTED] wrote: That's a pretty broad statement to make. I think bubbling system-wide events are a great way to achieve loose coupling between UI and business code. But then again if you're listening for a NewUserCreated event, your function should be expecting a NewUserCreatedEvent, not an Event. -Josh On Sun, Jun 15, 2008 at 9:03 PM, Michael Schmalle [EMAIL PROTECTED] wrote: Right Eric, this was a quick and dirty example. Another thing to note: Event bubbling is dangerous. Only make your event bubble if it is absolutely necessary. I have made some big components and learned the hard way. :) This is just my opinion but event bubbling almost breaks OOP encapsulation. If there is a chance some instance that has not 'subscribed' to your api gets your event, BUGS happen. This problem is synonymous to name collisions and since the compiler can't type check events, here in lies the problem. This can also hurt a dev that does not truly understand bubbling and is trying to use your component or application. Mike On Sat, Jun 14, 2008 at 9:40 AM, EECOLOR [EMAIL PROTECTED] wrote: Whenever you create a custom event. Make sure you override the *clone*method. If you do not do that you will get strange results when re-dispatching an event. Greetz Erik On 6/12/08, Michael Schmalle [EMAIL PROTECTED] wrote: Hi package my.event.package { public class MyEvent extends Event { public static const IS_GREATER_CHANGED:String = isGreaterChanged; public var isGreater:Boolean; public function MyEvent(type:String, isGreater:Boolean) { super(type); this.isGreater = isGreater; } } } // app as file [Event(type=isGreaterChanged, type=my.event.package.MyEvent)] ... var e:MyEvent = new MyEvent(MyEvent.IS_GREATER_CHANGED, true); dispatchEvent(e); ... event handler private function isGreaterHandler(event:MyEvent):void { trace(event.isGreater); } Mike -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'. -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
RE: [flexcoders] Re: Split up data inside itemrenderer
You can't do complex assignments outside of a function, because of the way the mxml is compiled into the as class. Override the set data() function and store your data in a local var, then call invalidateProperties(). Then do your work in a commitProperties override. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pioplacz Sent: Sunday, June 15, 2008 7:07 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Split up data inside itemrenderer Here is my main mxml file: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml height=100% layout=absolute creationComplete=startupServices() xmlns:lib=flexlib.containers.* styleName=ListItems xmlns:view=view.* verticalGap=0 !-- Call the XML list with the waiting folders -- mx:HTTPService id=getWaitingItems url=http://192.168.1.197/PHP/adminFolders/getFolders.php http://192.168.1.197/PHP/adminFolders/getFolders.php method=GET useProxy=false result=waitingItems_results(event)/ !-- Calling the IMDB for results -- mx:HTTPService id=IMDBSearch url=http://192.168.1.197/PHP/adminFolders/imdbphp-1.0.3/imdbXMLsearch.p hp http://192.168.1.197/PHP/adminFolders/imdbphp-1.0.3/imdbXMLsearch.php method=GET result=imdbSearch_results(event) mx:request !--name{SearchBox.text}/name searchtypemovie/searchtype -- /mx:request /mx:HTTPService !-- Getting the IMDB item details -- mx:HTTPService id=IMDBDetails url=http://192.168.1.197/PHP/adminFolders/imdbphp-1.0.3/imdbXML.php http://192.168.1.197/PHP/adminFolders/imdbphp-1.0.3/imdbXML.php method=GET result=imdbDetails(event) mx:request xmlns= !--mid{imdbList.selectedItem.imdbid}/mid-- /mx:request /mx:HTTPService mx:Style source=css/whiteTheme.css/ mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.collections.IList; import mx.utils.ArrayUtil; public function startupServices():void { getWaitingItems.send(); } public function waitingItems_results(event:ResultEvent):void { waitingItems = event.result.allWaiting.folder as ArrayCollection; } [Bindable] private var waitingItems:ArrayCollection; public function imdbSearch_results(event:ResultEvent):void { imdbSearch = event.result.IMDBresult.movie as ArrayCollection; } [Bindable] private var imdbSearch:ArrayCollection; [Bindable] public var imdbPlots:ArrayCollection; public var newPlotsArray:Array; public function imdbDetails(event:ResultEvent):void { // First determine if the result can be converted or present itself as an array. // We can use the mx.collections.ILis interface for that if (IMDBDetails.lastResult.IMDBdata.movie.plots.plot is IList) { // when true, call the IList.toArray() method newPlotsArray = IMDBDetails.lastResult.IMDBdata.movie.plots.plot.toArray(); } else{ // when false, use the ArrayUtil.toArray() method to convert the result newPlotsArray = ArrayUtil.toArray(IMDBDetails.lastResult.IMDBdata.movie.plots.plot); } // Create a new ArrayCollection using 'newArray' imdbPlots = new ArrayCollection(newPlotsArray); } ]] /mx:Script mx:VBox width=960 height=100% horizontalCenter=0 top=0 verticalGap=0 mx:Spacer height=59/ mx:HBox width=100% mx:Spacer width=100%/ mx:Label text=You have 4 items in query x=828 y=10/ /mx:HBox mx:HRule width=100% strokeWidth=1 strokeColor=#C4C4C4/ mx:Spacer height=22/ mx:TabNavigator id=tn width=100% height=90% tabWidth=140 view:moviesView label=Movies width=100% height=100%/ mx:VBox label=TV-Shows enabled=false/ mx:VBox label=Maintance enabled=false/ /mx:TabNavigator mx:Canvas width=100% mx:Text text=TEST textAlign=center horizontalCenter=0 top=10 color=#595959/ /mx:Canvas /mx:VBox /mx:Application Here is my itemrenderer for mx:List: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=925 height=74 mx:Script ![CDATA[ //I keep on getting the error here. var queryStr:String = data.stars; var params:Array = queryStr.split(,); ]] /mx:Script mx:Style source=../css/whiteTheme.css/ mx:states mx:State name=moreInfo mx:SetProperty name=height value=250/ mx:AddChild relativeTo={mainCanvas} position=lastChild mx:HRule x=57 y=67 strokeWidth=1 strokeColor=#E3E3E3 width=860/ /mx:AddChild mx:AddChild relativeTo={mainCanvas} position=lastChild mx:HBox x=57 y=72 height=166 horizontalAlign=right width=860 horizontalGap=15 mx:VBox verticalGap=0 mx:Label x=57 y=72 text=Director: color=#00/ mx:Text text={data.director} color=#343434 height=15/ mx:Spacer height=2/ mx:Label text=Writers: color=#00 height=17/ mx:Text text=n/a color=#343434 height=15/ /mx:VBox mx:VBox verticalGap=0 mx:Label text=Actors: color=#00 height=17/ mx:Repeater id=myrep dataProvider={data.actors.actor} mx:Text text={myrep.currentItem} color=#343434 height=15/ /mx:Repeater /mx:VBox mx:VBox verticalGap=0 height=100% width=100% mx:Label x=57 y=72 text=Plot Summary:
[flexcoders] fisheye dataprovider change
Hi, I am doing this adding of images and removal of images at run time to the fisheye data provider. While adding the images fisheye works fine but after removal of one of the items...the fisheye doesn't adjust itself so that all the images occupy the space availableThe removed image space is left with out getting occupied. How can i make sure that fisheye adjusts itself after adding and removal of items at run time. Another question is, I am changing the fisheye direction ( horizontal to vertical)..fisheye width and height alignment at run time... After changing all this, if I add one more item at run timeor remove one of them... All the images overlap one over the other, and the alignment doesn't happen proper... http://flexaired.googlepages.com/ObjectDock.air This is the component I am working...if you find some time...Can you please right click on it change the dock direction and then do add docklet or remove docklet. You will know the problem more clearly. Please help Thanks Regards, Sudha.
Re: [flexcoders] Re: HTTPService Bug
I wrote about DTO serialization and object instantiation, awhile back. Relies on ObjectTranslator, along with xmlDecode: http://booleanbetrayal.com/2007/05/18/httpservice-xmldecode-objecttranslator-and-rabidsquirrels/ Hope that helps. On Thu, Jun 12, 2008 at 12:34 AM, Alex Harui [EMAIL PROTECTED] wrote: How are you converting from XML to object? You may need a custom converter as I think our default code will try to make numbers out of anything that is a valid number. There's probably not enough info to know it is a string. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rafael Faria *Sent:* Wednesday, June 11, 2008 9:27 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: HTTPService Bug --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, LazerWonder [EMAIL PROTECTED] wrote: Wherever you get the returned XML object from... does it pass in a 1 or 2? Or does it pass a 1.0 / 2.0. As far as I know, HTTPService does not transform data (some one more experience can correct me if I am wrong). It just spits back to you what it receives. The XML Returns 1.0 and 2.0; But when it become an object the number 1.0 becomes 1; If you have control over the server side of things (that is, where the HTTPService connects to) you might need to see if 1.0/2.0 is being passed to the XML object or maybe only 1 / 2 is being passed to the object. If you have no control over this, then you might need to add the .0 manually; or if you do have control but Flex still trip the .0 off, then try adding quotation marks around 1.0 / 2.0 on the server side. That's what i had to do. Add manually, although i still think that FLEX shouldn't mess around whatever you pass as a variable. You can also do a trace (which I'm sure you already did - but I thought I'll just plug this in here anyways) statement on the returned object, just to see what you get. Yeah i did indeed and that's why i'm saying it's returning as integer and not as a string which is the one i need. =/
[flexcoders] fisheye dataprovider change
Hi, I am doing this adding of images and removal of images at run time to the fisheye data provider. While adding the images fisheye works fine but after removal of one of the items...the fisheye doesn't adjust itself so that all the images occupy the space availableThe removed image space is left with out getting occupied. How can i make sure that fisheye adjusts itself after adding and removal of items at run time. Another question is, I am changing the fisheye direction ( horizontal to vertical)..fisheye width and height alignment at run time... After changing all this, if I add one more item at run timeor remove one of them... All the images overlap one over the other, and the alignment doesn't happen proper... http://flexaired.googlepages.com/ObjectDock.air This is the component I am working...if you find some time...Can you please right click on it change the dock direction and then do add docklet or remove docklet. You will know the problem more clearly. Please help Thanks Regards, Rambabu.
[flexcoders] Flex Server option suddenly disabled?
i went to open and begin work on my project and now flex server option is disabled? its doing everything on a local file ... all i did was open the project but some how it no longer references a server location etc for me to validate under flex properties/ server please help
[flexcoders] Newbie help with Flex Builder CS3
Hello all, I have to say that this relates to some very basic things that I guess I don't yet have a good handle on yet. Ok, the first issue relates to a problem I am having with the Flash Player. I did address the issue previously on this list of not having the correct Flash Player, the debug version installed. I got answers for this on the list and got things installed correctly. However, I cannot get any applications to run when I select the run button within Flex Builder CS3 (from here on, I'll just say from within flex). When I do click on that button, it brings up the browser which says that I need the Flash Player. So, to check things out, I go to adobe.com and indeed the Flash content there plays just fine. I right click on it and see that indeed I have the Flash Player 9, debugger version, working just fine. If I try to test a flex application from within flex, I get that error in the browser saying that I need Flash Player. This started because I was trying to fix a problem that was happening when I tried to display an application with a datagrid component. It was giving me an error saying that it could not read the xml file or find it. So, I tried to redefine the Flex workspace. This demonstrated another newbie problem I have and that is relating to the workspace designation in Flex. If I change the workspace after I've been working on a project/application, will that cause serious problems? This is an embarrassing problem as I'm not new to web development. I've done web development and have used a variety of applications. So, with regard to the workspace would changing this by going to Switch Workspace cause a problem of this nature? I'm sorry if I'm confusing. I have been learning flex using a couple of different texts for learning, and it was only recently that I ran into these errors. Any help or advice would be greatly appreciated. Thanks, Bruce
[flexcoders] Flex Newbie help - part 2 - related problems
Anyway, the reason this trouble started was because I was trying to test out a dataGrid that was to be populated by an xml file. I was following a training video on the site Lynda.com It ran fine on the video but when I tried that out it said that there was a problem related to accessing the dataSource which was the very simple xml file with one top level container element and one repeating element. Since I was using the same exercise files that the instructor was using, I was quite stumped as to why this wasn't working on my system. In fact, the instructor was using a Windows Vista system as well as I am. So, I tried looking at the xml file properties from within Flex Builder by right-clicking. I tried removing the check box for Archive file and the one for Read Only. That didn't help at all, and I continued to get the errors. I was expected to get a 2 column display. I tried a number of different toggles of the Properties of the xml file to see if anything would help. I did notice that when I selected Run from within Flex, that the browser window that comes up did not have a direct path like this: c:\flexapps\workspace\demoapp\bin-debug\myappfile.html Instead I was seeing file:///c:/etc. etc. with more characters.. .something you might see if editing a file in DW or another program where the site is not defined. Anyway, I feel stumped with all this. I'm dealing with 3 issues here that are confusing me. Please help. If I can pass any files or information to help anyone that would help me, please let me know and I'll do that so that we can get this figured out.
[flexcoders] Flex Newbie help - part 2 - related problems
Sorry, please ignore the prior posting as it went before I had a chance to edit it clearly. This is a very depressing problem to run into as I thought I was moving on nicely with learning Flex. Also, I'm not entirely sure how to describe what is going on, which makes finding a solution rather overwhelming difficult as I cannot even find out where the problems exist. Is the problem related to how I setup Flex, how the workspace is defined, how the file is accessed? I ran into a very confusing problem recently that I discovered when I was trying to test out a dataGrid that was to be populated by an xml file. I was following a training video on the site Lynda.com It ran fine on the video but when I tried that out it said that there was a problem related to accessing the dataSource which was a very simple xml file with one top level container element and one repeating element. Since I was using the same exercise files that the instructor was using, I was quite stumped as to why this wasn't working on my system. In fact, the instructor was using a Windows Vista system as well as I am. So, I tried looking at the xml file properties from within Flex Builder by right-clicking. I tried removing the check box for Archive file and the one for Read Only. That didn't help at all, and I continued to get the errors. I was expected to get a 2 column display. I tried a number of different toggles of the Properties of the xml file to see if anything would help. I did notice that when I selected Run from within Flex, that the browser window that comes up did not have a direct path like this: c:\flexapps\workspace\demoapp\bin-debug\myappfile.html Instead I was seeing file:///c:/etc. etc. with more characters.. .something you might see if editing a file in DW or another program where the site is not defined. Anyway, I feel stumped with all this. Please help. If I can pass any files or information to help anyone that would help me, please let me know and I'll do that so that we can get this figured out. I'm not sure how this would be done, but I am open to suggestions, Thanks, Bruce
[flexcoders] Re: [ANN] Flex-mojos 1.0-RC4
Flex-mojos 1.0 final is out. Have the same Rc4 content. http://blog.flex-mojos.info/2008/06/16/10-final/ I hope every one enjoy it. VELO On Fri, Jun 13, 2008 at 12:13 AM, Marvin Froeder [EMAIL PROTECTED] wrote: Hi guys, Final flex-mojos RC for 1.0. Almost all reported issues fixed. Take a look here: http://blog.flex-mojos.info/2008/06/13/rc4/ Nice weekend to every one. VELO
[flexcoders] Re: Newbie help with Flex Builder CS3 - update
Hello all, For reasons I cannot understand, this problem is somewhat fixed. What I mean is that the application using a DataGrid which pulls in data from an XML file is working in Firefox browser. It is not working in Internet Exployer, which instead keeps telling me that I need the Flash Player. As I stated, I can run Flash applications in Internet Explorer without any problem but from Flex, if I run an application and choose Internet Explorer for the browser, it says that I need the Flash Player. Ok, so the other question I had was in relation to what happens and things appear in the browser address bar when I select run from the Application file in Flex. It seems to display to me like one might see in Dreamweaver when the site is not defined or when the page is not yet saved. Specifically, I see this as the link in the browser when I select run from Flex. file:///C:/Users/Public/Documents/Flex%20Builder%203/Chapter11/chapter11Begin/bin-debug/HTTPServiceDemo.html That's what appears in the browser address bar when I test from Flex. The screen I see on the instructor's computer has the path as: c:\flex3\workspace\chapter11\bin-debug\HTTPServiceDemo.html Isn't it possible that things are not quite right if this is happening? Can anyone offer me any help, suggestions, or etc? Again, why might this work in Firefox but I get an error in IE saying that I need Flash Player, which works fine with Flash on websites across the web. thanks, Bruce --- In flexcoders@yahoogroups.com, brucewhealton [EMAIL PROTECTED] wrote: Hello all, I have to say that this relates to some very basic things that I guess I don't yet have a good handle on yet. Ok, the first issue relates to a problem I am having with the Flash Player. I did address the issue previously on this list of not having the correct Flash Player, the debug version installed. I got answers for this on the list and got things installed correctly. However, I cannot get any applications to run when I select the run button within Flex Builder CS3 (from here on, I'll just say from within flex). When I do click on that button, it brings up the browser which says that I need the Flash Player. So, to check things out, I go to adobe.com and indeed the Flash content there plays just fine. I right click on it and see that indeed I have the Flash Player 9, debugger version, working just fine. If I try to test a flex application from within flex, I get that error in the browser saying that I need Flash Player. This started because I was trying to fix a problem that was happening when I tried to display an application with a datagrid component. It was giving me an error saying that it could not read the xml file or find it. So, I tried to redefine the Flex workspace. This demonstrated another newbie problem I have and that is relating to the workspace designation in Flex. If I change the workspace after I've been working on a project/application, will that cause serious problems? This is an embarrassing problem as I'm not new to web development. I've done web development and have used a variety of applications. So, with regard to the workspace would changing this by going to Switch Workspace cause a problem of this nature? I'm sorry if I'm confusing. I have been learning flex using a couple of different texts for learning, and it was only recently that I ran into these errors. Any help or advice would be greatly appreciated. Thanks, Bruce
[flexcoders] Re: Flex Server option suddenly disabled?
turns out its in the bugs listings http://bugs.adobe.com/jira/browse/FB-12197
[flexcoders] Re: closing and reopening windows in Air App
Why no one is answering? On 6/13/08, Omar Fouad [EMAIL PROTECTED] wrote: Hi list, I got a small application that opens a window. I used another mxml (AboutWindow.mxml) file that has mx:WIndowBla bla blamx:WIndow/ in it. In the Main mxml file I have a button and when I click to this button I open() it by: private var AboutWin:AboutWindow = new AboutWindow(); pivate function ShowAboutWindow():void { AboutWIn.open(); } This works great, when I click the button in the main Application the AboutWin Shows, and When I close it, it closes perfectly. But if I re-click the Icon again the AboutWin would not open again. Is there something that I am missing? Thanks ** -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- Sent from Gmail for mobile | mobile.google.com Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
[flexcoders] Re: Flex Css Html Css
hi I also use this really helpfull method, and I found a limit (or flex bug?) with this: I use it in a popup window, that I display as a canvas via a state change. it's a very simple component with my canvas, and Vboxes, labels, etc... wherever I use my repeated background in this component, it displays the background only the first time I call the component. after this, no way to see it back... I choosed a different way to skin, so I don't personnaly need an answer, but if somebody has one for the future, it could be good regards makar --- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote: This is how I do it: I create an empty component named RepeatedBackgroundBox.mxml: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% /mx:VBox Next I create an AS file named RepeatedBackground.as: /* RepeatedBackground Use this BorderSkin with backgroundImage Embed properties scaleGridTop, scaleGridBottom, scaleGridLeft, and scaleGridRight do not work. */ package { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Graphics; import flash.display.Loader; import flash.events.Event; import flash.events.IOErrorEvent; import flash.geom.Matrix; import flash.net.URLRequest; import mx.controls.Image; import mx.core.BitmapAsset; import mx.graphics.RectangularDropShadow; import mx.skins.RectangularBorder; import mx.core.Application; import mx.core.UIComponent; public class RepeatedBackground extends RectangularBorder { private var tile:BitmapData; private var imgCls:Class; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); // Use UIComponent to handle any container // Check if parent is valid // In some Application initializaton states this might be false, I was getting an error if( this.parent != null ) { // The backgroundImage on the parent will become so we need to keep the class around // for every object updateDisplayList if( imgCls == null ) { var backgroundImage:Object = UIComponent( this.parent ).getStyle( backgroundImage ); if( backgroundImage != null backgroundImage != ) { imgCls = Class( backgroundImage ); (this.parent as UIComponent).setStyle( backgroundImage, ); } } // Do the actually bitmap filling here if( imgCls != null ) { try { // imgCls could be a symbol in a SWF and the class will not work var background:BitmapAsset = BitmapAsset(new imgCls()); tile = background.bitmapData; var transform: Matrix = new Matrix(); graphics.clear(); graphics.beginBitmapFill(tile, transform, true); graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); } catch( e:TypeError ) { // Throw an custom error if imgCls is not a valid type throw new Error( backgroundImage value is not a valid image class ); } finally { ;// Catch all just ignore } } } } } } Now, a CSS file with the RepeatedBackgroundBox definition: RepeatedBackgroundBox { paddingRight: 10; paddingLeft: 10; paddingTop: 5; borderSkin: ClassReference(RepeatedBackground); background-image: Embed(/assets/images/bg.gif); } Now all I have to do to use it is: custom:RepeatedBackgroundBox Other components here /custom:RepeatedBackgroundBox --- In flexcoders@yahoogroups.com, xaero xaero@ wrote: And then How can I set the page's background like in the HTML Css? That is: background-repeat: repeat-x; background-PositionX: left; background-PositionY: bottom; --- In flexcoders@yahoogroups.com, Michael Schmalle teoti.graphix@ wrote: No, you can't do this. Flex CSS is not 'real' css and does not conform to WC3. Mike
Re: [flexcoders] Re: closing and reopening windows in Air App
how are you closing it? On 16/06/2008, at 9:00 AM, Omar Fouad wrote: Why no one is answering? On 6/13/08, Omar Fouad [EMAIL PROTECTED] wrote: Hi list, I got a small application that opens a window. I used another mxml (AboutWindow.mxml) file that has mx:WIndowBla bla blamx:WIndow/ in it. In the Main mxml file I have a button and when I click to this button I open() it by: private var AboutWin:AboutWindow = new AboutWindow(); pivate function ShowAboutWindow():void { AboutWIn.open(); } This works great, when I click the button in the main Application the AboutWin Shows, and When I close it, it closes perfectly. But if I re-click the Icon again the AboutWin would not open again. Is there something that I am missing? Thanks ** -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- Sent from Gmail for mobile | mobile.google.com Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
[flexcoders] Cinematically Animated Charts; Speed issues?
Hi guys, Just wondering. Has anyone tried to create animated visualizations with the Flex charting framework? I am trying to create some Rosling-style visualizations[1] for some financial data ( personal ) to see if I can reveal something interesting. The question I have and would like to answer before wasting more time is: Do you think that I can achieve a similar performance with the Flex Charting framework? I imagine it was not designed with cinematic speed in mind... In that case, I guess I would be better off creating some simpler bubble chart implementation using pv3d for rendering ( for example ), or just use a different platform for this experiment. Thanks, A [1] http://uiblog.aldobucchi.com/2008/06/hans-rosling-and-his-dancing-bubbles.html -- Aldo Bucchi +56 9 7623 8653 skype:aldo.bucchi http://aldobucchi.com/
[flexcoders] Re: Flex Css Html Css
Have you seen degrafa? You can do all this via CSS. http://blog.benstucki.net/?p=46 --- In flexcoders@yahoogroups.com, Michael Schmalle [EMAIL PROTECTED] wrote: Hi, Well.. you can't really unless you create a custom skin. There are some open source stuff out there that allows you to use a background repeat algorithm. There is no background position styles either. So really, what you want to do cannot be done with Flex3 css. Mike On Mon, Jun 9, 2008 at 1:27 AM, xaero [EMAIL PROTECTED] wrote: And then How can I set the page's background like in the HTML Css? That is: background-repeat: repeat-x; background-PositionX: left; background-PositionY: bottom; --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Michael Schmalle teoti.graphix@ wrote: No, you can't do this. Flex CSS is not 'real' css and does not conform to WC3. Mike -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
Re: [flexcoders] LCDS gets Killed !!!
Hi Jitendra and Seth, Thank you for your valuable suggestions. I am trying it out. Now I can access the Java code through LCDS and is working fine. But we don't know why exe is not executing. But it is fine we are debugging it out... Thank you once again.. Chitra On Fri, Jun 13, 2008 at 11:01 PM, Seth Hodgson [EMAIL PROTECTED] wrote: This has nothing to do with LCDS. Perhaps your app server defines a security restriction on the Runtime class or exec() method. I've never tried making a Runtime.exe() call from a Servlet. I'd suggest debugging this by dropping your call into a simple Servlet or JSP, and be sure to make your call within a try/catch and dump out any Exception info. Once that's working (assuming it can), it'll work fine from within a remote object hosted by LCDS. In terms of the general approach, you're doing the right thing. There's no way to kick off an executable from within the browser player directly. Good luck, Seth From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Chitra S.Pai Sent: Thursday, June 12, 2008 8:16 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] LCDS gets Killed !!! Hi Seth, Actually the server get destroyed when I call the Java function which contain a new process. I don't know why? Is this because LCDS doesn't allow child process in it ? I am really confused what is actually happening. As the server command prompt get closed also I cannot trace what is going on.. Actually I am trying to run an external exe through Java code using LCDS and Flex. Flex cannot directly instantiate the exe so I am going through Java and all.. And to run Java code with Flex I am using LCDS as interface. Do I have some other option to run Java code with Flex and without LCDS Hope there is a solution for this... Chitra On Fri, Jun 13, 2008 at 12:12 AM, Seth Hodgson [EMAIL PROTECTED]shodgson%40adobe.com wrote: What do you mean by killed? Is your call to exec() throwing an Exception, and if so is it showing up in your server logs? Seth From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Chitra S.Pai Sent: Thursday, June 12, 2008 6:36 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] LCDS gets Killed !!! Hi, I am trying to run a Java code from LCDS and I am facing the following problem.. LCDS process gets killed... In the Java function I am trying to invoke an exe using runtime.exec(); The Java code is working fine when tested separately. Please... Help me.. Chitra
RE: [flexcoders] Firefox 3 and Flex Debug Not Working ?
OK, file a bug. Bugs.adobe.com/jira. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Walters Sent: Saturday, June 14, 2008 8:39 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Firefox 3 and Flex Debug Not Working ? Done: MAC 9,0,124,0 true Added a trace as well and again the trace works in Safari but not Firefox 3. Mark Walters [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://digitalflipbook.com http://digitalflipbook.com On Sat, Jun 14, 2008 at 11:08 PM, Alex Harui [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I would add a text label that traces out version and isDebugger from flash.system.Capabilities. From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Mark Walters Sent: Saturday, June 14, 2008 4:08 PM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] Firefox 3 and Flex Debug Not Working ? - I have Flash Debug Player 9.0.124 installed - tracing from Flex does not go to the output panel with Firefox 3 - tracing from Flex does go to the output panel with Safari - on OSX 10.5.3 I've heard that there are a few issues related to the 10.5.3 update removing the Debug player. Even though I knew I had the debug player installed by right-clicking, I went ahead and uninstalled and reinstalled. Again I confirmed that it is the debug player by right-clicking AND trace works when I switch the browser to Safari. But trace does not work when the browser is set to Firefox 3. Anyone else having these issues? Mark Walters [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://digitalflipbook.com http://digitalflipbook.com
RE: [flexcoders] Re: Help me understand custom drag/drop events
Why not just set a flag instead of calling preventDefault, then check the flag afterwards. BTW, you shouldn't be dispatching COLLECTION_CHANGE yourself. Best to use itemUpdated when changing quantity. A COLLECTION_CHANGE will fire when the default code inserts the dropped items. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bredwards358 Sent: Saturday, June 14, 2008 9:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Help me understand custom drag/drop events I do want the dragged items inserted into the DP, I just want to add a function call to the end of that which inserts the new row into a local database table. My problem is that the for-loop which checks for duplicate entries and merely prevents the default event and updates a value in the DP makes it difficult to do what I want without doing it for every row in the DP. Here's what I have thus far: private function dragToOrders(event:DragEvent):void { var draggedItems:Object = new Object(); draggedItems = event.dragSource.dataForFormat(items); var n:int = orderDetailArray.length; for (var i:int = 0; i n; i++)//Looping through to check for duplicate entries { if (orderDetailArray[i].UniqueID == draggedItems[0].UniqueID) { orderDetailArray[i].Qty ++; event.preventDefault(); adgOrders.dataProvider.dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE)); trace(Update fired);//Placeholder foractual update function return; } adgOrders.dataProvider.dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE)); trace(Insert fired); //Placeholder for actual insert function } } Works well and perfect for just putting new items into the data provider and updating current ones, but while I can update items in the both the DP and the database just fine, I just can't figure out where to put the function call to my insert function to put a new row in the DB. So basically I figured early Friday was to see if it was possible to modify the default event ever so slightly, to call the insertToDataBaseFunction(); right after the normal behavior of inserting it into the dataProvider. Looks simple, problem is, I'm just not sure where to start. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: IIRC, the DragDrop event is the right place and you were already doing that. If you don't preventDefault that event, it will insert the dragged items into the DP. I haven't been paying close attention so I'm not clear what problem you ran into that makes you think this isn't the way to go.
RE: [flexcoders] Error #2025: The supplied DisplayObject must be a child of the caller
Makesure mainWindow is the right parent. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of guillaumeracine Sent: Saturday, June 14, 2008 10:40 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Error #2025: The supplied DisplayObject must be a child of the caller Hi i made a slideshow component. For example their is a main Canvas (mainCanvas) that contains 3 nested canvas (canvas1,canvas2,canvas3). All 4 canvas have the same size dans completely overlaps each other. When the user click to see a previous Canvas i call this code: mainWindow.swapChildren( canvas2,canvas1 ); To make the previous Canvas (canvas1) visible. Ok all works fine if my component is directly nested in a mx:application tag. But in a real world application, i need to nest it in some hierachy of Canvas. This is where i get this error message when calling the swapChidren method : IllegalArgument Error #2025: The supplied DisplayObject must be a child of the caller. I really don't understand why because when i trace canvas2.parent and canvas1.parent, mainCanvas is returned... So the following mxml code works for swapChildren: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml details ommited... comp:HomeSlideShow id=slideShow y=0 width=610 height=200 dataProvider={slideShowProvider} verticalScrollPolicy=off horizontalScrollPolicy=off borderStyle=solid borderThickness=1 borderColor=#00 horizontalCenter=0 / mx:Application/ BUT NOT THIS ONE: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml details ommited... mx:Canvas details ommitted... mx:Canvas details ommited... mx:Image source=assets/accueil/slideshow/slideshowHeader_fr.jpg/ comp:HomeSlideShow id=slideShow y=0 width=610 height=200 dataProvider={slideShowProvider} verticalScrollPolicy=off horizontalScrollPolicy=off borderStyle=solid borderThickness=1 borderColor=#00 horizontalCenter=0 / /mx:Canvas /mx:Canvas mx:Application/