RE: [flexcoders] E4X filtering dynamically?
From Jeff Dyer: There is trick to use to reference an xml attribute dynamically. Use brackets with an @ prefix like this: var foo:String = access; // no @ here var bar:String = writeonly; classInfo..accessor.(@[foo] != bar) // @ here From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ripe101 Sent: Thursday, April 19, 2007 8:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] E4X filtering dynamically? Is it possible to have an E4X Regex or filter returned dynamically by a function? something like this: var testString:String = @name == \John\; var filtered:XMLList = employees.employee.( testString ); I have searched for an example somewhere and this is the closest I could find... var re:RegExp = new RegExp( ^Sch.* ); var filtered:XMLList = employees.employee.( re.test( last ) ); but I would ideally like both the regex and the target attribute being tested to be dynamic. Anyone? Thanks JK
Re: [flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?
On 4/20/07, Dave Wolf [EMAIL PROTECTED] wrote: Scott, Sillyness aside, there is substance to this and it was a great read, but i think what hurt it's purity is the undercurrent of MS is evil, watch them mentality. I assure you that undertone wasn't purposeful. I did flub the Sparkle reference, but then again, most people misunderstood what Sparkle was and the general understanding at large was the Sparkle was WPF/E. Code words are supposed to be confusing right? :=) Fair call :) I'll take you at your word on this one - but don't let that get out or people will think i'm soft, as in micro-soft :) I agree there was confusion and so i retract my point... As you said, aiming at that would have just undone the message I was trying to get out. Worth noting BTW, I am a MSFT Alumnus. Yeah, seems like a lof of MSFT folks floating about, even some folks behind Macromedia are now floating in MSFT? :) You know what would look good for Cynergy Systems .. Adobe Flex Alliance Partner Microsoft Alliance Partner - now that would be worthy of an MSFT Alumnus ;) hehe. -- Dave Wolf Cynergy Systems, Inc. Adobe Flex Alliance Partner http://www.cynergysystems.com http://www.cynergysystems.com/blogs Email: [EMAIL PROTECTED] dave.wolf%40cynergysystems.com Office: 866-CYNERGY --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Scott Barnes [EMAIL PROTECTED] wrote: Dave.C, Dave.W gets it :) He understands that the RIA space is not exclusive to one company but many, while I get the undercurrent of his blog-speech, I do however disagree with the dark evil plotting - MIX isn't because MAX exists, its actually because it's intent is to showcase a MIX of Microsoft Technologies in the one spot, consolidated. Usually PDC / TechEd are reserved for the 100% Microsoft pieces (except TechEd Australia were we are hoping to mix-it-up a bit more). Furthermore, we are looking to REMIX (Australia, Melbourne, June 25th - 26th) in the rest of the world based off what the US version does and so on.. point I'm thinking folks at times amplify the paranoia around Microsoft ;) Secondly, Sparkle was the code-name for Expression Blend, and JOLT was the code-name for Silverlight. I also get nervous when anyone uses the term Missiles,Big Bang and Microsoft. As when they do, i start to think of Cult Followings and ponder if I've been duped into some mystic cult (I'll be that guy running out in FBI handcuffs on Hard Copy saying I didn't know..I didn't know..) Sillyness aside, there is substance to this and it was a great read, but i think what hurt it's purity is the undercurrent of MS is evil, watch them mentality. I'm evil, Microsoft isn't though (just to clarify that). On 4/20/07, Dave Carabetta [EMAIL PROTECTED] wrote: I hope this isn't taken with as some sort of corporate shill for my employer, as it's honestly not my intent, but Dave Wolf, Vice President of Consulting at Cynergy Systems, gives an excellent summary as to why Silverlight is a phenomenally important announcement to the RIA industry and why it's not just some copycat Flash competitor. If you're looking for a balanced view of Silverlight's effect, check out his latest blog entry: http://www.cynergysystems.com/blogs/page/davewolf?entry=wake_up_and_see_the Regards, Dave Carabetta. Cynergy Systems, Inc. On 4/18/07, Scott Barnes [EMAIL PROTECTED] wrote: Its an annoyance of mine aswell. I'm confused as to why .NET remoting was dropped from Flash/Flex (haven't yet seen FLASH CS3 and whether its back but yeah, no idea and all i can say is Mark's got his head screwed on right and he can help with WebORB in that regard. Actually the Flex Builder integration is quite stunning I must say, it left both Andrew Shorten I drooling @ Feb Seattle Flex UG) That so sounded like a plug didn't it :) hehe. (Sorry it wasn't meant to be) On 18 Apr 2007 07:38:08 -0700, mvbaffa [EMAIL PROTECTED] wrote: I've been working with Flex since its alpha version. Before the release version was avaiable I had an application with AMFPHP ready. That is I really love Flex and i have been working with it since it's 1.5 version. But I am a .NET developer, I have a huge legacy in .NET Framework 2.0 and 1.1. I don't know why Adobe, up to this moment, is maintaining exclusive focus on Java. There are a lot of .NET developers that would like to have a server framework developed directly from Adobe. Applications are not only Client, they need a strong and consistent server Framework. I beleive that if Adobe maintains its exclusive focus on java it will loose, very soon a good number of .NET developers. Communications Foundations is really good and it will be better very soon. And it's price is very good, it is free ! I am still working on the Microsoft framework. But I beleive that WPF and SilverLight can
Re: [flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?
On 4/20/07, Michael Schmalle [EMAIL PROTECTED] wrote: I have to put my 2 cents down for prosperity sake. which is important :) All you people that live in cities and constantly sicken yourselves by your own pollution, need to live on a mountain for a couple years, look back at what you say and see how hilarious it all is. I live near a desert? does that' coun't for isolation and freedom of thoughts? (Sorry in Australia, our mountains are hard to come by at times). How many times can the battle of north and south be fought and... won? :) Until East West figure out it's time to join in, and then we go on Springer... i got dibs on the chair throwing... Listening to people engrossed in the politics of banter on the internet is much more funny than turning on the TV these days. They still have TV? you mean YouTube + TV can co-exist? next thing you'll say Silverlight and Flash can co-exist.. pft crazy talk. Scott, your just a person that likes getting people talking regardless of the side your on. Your good at it to. Oh stop, you say that to all the Evangelists.. now you're making me blush *blush in ascii art*. As far as Microsoft's world domination, I doubt it. No one ever 'wins' forever. I think most of the resistance you feel around your posts is exactly what Dave Wolf said... now theres options, people want choice. I guess that is what the market and developers 'against' Microsoft have been saying forever... WE WANT CHOICE! Watch what you wish for, you just may get it... I think that is what being human is all about. Peace, Mike If I didn't have leg cramps right about now, i'd stand and applaud you :) (Seriously - Politics is bound to happen when you have to large corporations saying to all of you - try my stuff, no try mine, nooo try mine... and so on.. Adobe Microsoft compete on a number of levels while at the same time - this will freak the kids out in the front row - without Microsoft, Adobe couldn't of gotten to where it is today. Without Microsoft Flash's penetration numbers wouldn't be where they are/were today (but its ok, no thanks required for the Updates / Default installs we put on the box when we ship etc). I should also mention sites like Honda, MySpace, YouTube and Movie Sites etc were also strong drivers in this space more so then us. Yet if i say this outloud then we could sober up a bit and no1 likes a buzz killer ;) Point: Lighten up folks, it's just technology - or should I say Silverlight, Light up the web! :) -- Regards, Scott Barnes Developer Evangelist Microsoft - whom wrote this with GMAIL.. shhh, don't tell HQ or they'll dock my pay ...as Hotmail and GMAIl cannot co-exist at all! it's in the rules alongside Silverlight and Flash :)
Re: [flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?
Take it from me: Thomson v Microsoft 1. The documents I've seen waht to make me through up (dry heave) 2. Microsoft is involved in patent them, z4 technologies $140 recently is proof. So is Sun's settlement for MS hacking code. 3. Would you trust Microsoft. Bill Gates is a desperate LOSER I don't care how much money he has -- STEVE JOBS IS AN INNOVATOR, Bill Gates is a huster stealing from you peole in their early 20's. Paul DeCoursey [EMAIL PROTECTED] wrote: I agree that there is room in the RIA space for another player. I think that MS has a few things going against it for this launch. First off it's a new plugin with little real world experience. It is going to take a long time for the market to become saturated enough for it to be relevant. It took many years for the Flash Player to gain acceptance, and it's still not a total success (read any posting on slashdot that is related to Flash to see what I mean). Throw on top of that Microsofts reputation in Internet Security and you have a user base that will be uneasy with the install. I see this going one of two ways. Silverlight takes more than 2 years to reach saturation, partially fueled by the reluctance of the population to upgrade to Vista. This causes developers to choose other options which in turn drive the next big web trend beyond RIA. Or Sliverlight is a moderate success and everyone is happy. Or (sorry, I just thought of this so it's actually 3 ways) Silverlight is a big success and clever developers like myself (I do totally rock ;) blend Flash, Flex, Silverlight and some other new emerging technologies that in turn drive innovation away from all the current RIA platforms to something far more advanced. This fits into my demented belief that the web is doomed to failure and something better is bound to replace it before it ends up killing us all. I can't say right now that I am totally excited about Silverlight. I would like to take a look at it and see what it can do. Paul deCoursey --- In flexcoders@yahoogroups.com, Dave Wolf [EMAIL PROTECTED] wrote: Scott, Sillyness aside, there is substance to this and it was a great read, but i think what hurt it's purity is the undercurrent of MS is evil, watch them mentality. I assure you that undertone wasn't purposeful. I did flub the Sparkle reference, but then again, most people misunderstood what Sparkle was and the general understanding at large was the Sparkle was WPF/E. Code words are supposed to be confusing right? :=) As you said, aiming at that would have just undone the message I was trying to get out. Worth noting BTW, I am a MSFT Alumnus. -- Dave Wolf Cynergy Systems, Inc. Adobe Flex Alliance Partner http://www.cynergysystems.com http://www.cynergysystems.com/blogs Email: [EMAIL PROTECTED] Office: 866-CYNERGY --- In flexcoders@yahoogroups.com, Scott Barnes scott.barnes@ wrote: Dave.C, Dave.W gets it :) He understands that the RIA space is not exclusive to one company but many, while I get the undercurrent of his blog-speech, I do however disagree with the dark evil plotting - MIX isn't because MAX exists, its actually because it's intent is to showcase a MIX of Microsoft Technologies in the one spot, consolidated. Usually PDC / TechEd are reserved for the 100% Microsoft pieces (except TechEd Australia were we are hoping to mix-it-up a bit more). Furthermore, we are looking to REMIX (Australia, Melbourne, June 25th - 26th) in the rest of the world based off what the US version does and so on.. point I'm thinking folks at times amplify the paranoia around Microsoft ;) Secondly, Sparkle was the code-name for Expression Blend, and JOLT was the code-name for Silverlight. I also get nervous when anyone uses the term Missiles,Big Bang and Microsoft. As when they do, i start to think of Cult Followings and ponder if I've been duped into some mystic cult (I'll be that guy running out in FBI handcuffs on Hard Copy saying I didn't know..I didn't know..) Sillyness aside, there is substance to this and it was a great read, but i think what hurt it's purity is the undercurrent of MS is evil, watch them mentality. I'm evil, Microsoft isn't though (just to clarify that). On 4/20/07, Dave Carabetta dcarabetta@ wrote: I hope this isn't taken with as some sort of corporate shill for my employer, as it's honestly not my intent, but Dave Wolf, Vice President of Consulting at Cynergy Systems, gives an excellent summary as to why Silverlight is a phenomenally important announcement to the RIA industry and why it's not just some copycat Flash competitor. If you're looking for a balanced view of Silverlight's effect, check out his latest blog entry: http://www.cynergysystems.com/blogs/page/davewolf?entry=wake_up_and_see_the Regards, Dave Carabetta. Cynergy Systems, Inc. On 4/18/07, Scott Barnes
Re: [flexcoders] showCloseButton visibility bug ?
OK here is an example : public function setState(state:String):void { switch(state) { case 'control_disabled': this.showCloseButton = false; // the close button is now not visible break; case 'control_enabled': this.showCloseButton = true;// the close button is not visible ! Need a redraw or something... ? break; } } Thanks Mika Alex Harui a écrit : Please submit a simple test case *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Mickael RUELLAN *Sent:* Thursday, April 19, 2007 7:42 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] showCloseButton visibility bug ? Hi All, I have a TitleWindow with showCloseButton property initially set to true. I set to false the showCloseButton property in order to prevent and indicate to user that the window can not be closed, the close button is not long visible. Now If I try to set to true the showCloseButton, I doesn't re-appear... I try to call invalidateProperty and commitProperty functions but close button is not redraw ! I don't know how to do a redraw of the close button in order to show it again... Is this a bug ? Is there an event or function that can do that ? I saw that if a modal Alert window is popup, the close button appear ! Any Idea ? Thanks Mika
RE: [flexcoders] Re: Module GC question
When you call unload on a ModuleInfo, you are just releasing one reference to it. There's no practical way for us to keep track of all references to things in a module and go clean them up. However, while I suppose it is the safe approach to clean everything, you might be better served knowing what things to clean. It makes it clearer what the connections are between modules and forces you to have a cleaner architecture in order to minimize the number of connection points. Note also that event listeners are backwards. someObj.addEventListener(event, myEvent) doesn't make an additional reference to someObj, it makes a reference from someObj to the owner of myEvent. -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kyle.vanvranken Sent: Thursday, April 19, 2007 8:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Module GC question So it would be best to remove all listeners that you can and set every var the module is using to null before unloading it to get that memory back. That's definitely doable I'm just surprised that unloading the module doesn't wipe out all those references. Thanks for the quick reply Alex!
Re: [flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?
Puff. Avalon or WPF just rocks! :-) I luv it. Great, to use a the user interface engine in application. Easier to leverage then the Flash ActiveX control g Weyert
Re: [flexcoders] Prana: IoC container for AS3
I think avoiding repeated code would a great advance if we use an IoC container that allows us only create the different code and inyect the shared functionality. Another great thing is AOP that would be a great thing since many different objects must face equal behaviour and we could do this as as aspect and inyect it by configuration. Maybe the problem is to think about how we must to adapt this kind of functionality to AS3 and Flex and not simply copy from the java/spring world to Flex. But for me is clear that many improvements in the upcoming months could be done with frameworks like Pranaq 2007/4/20, Brian Lesser [EMAIL PROTECTED]: Hi Carlos, et al, I have a question regarding the need for an ioc container for Flex as opposed to a pure AS3 or Flash project. Flex already provides a hierarchy of containers that contain controls and service proxies. The containers are usually responsible for setting the dependencies between controls and proxies. Setting dependencies can be done with databinding, simple assignment, or by setting up listeners. This is a very different situation from what a Java developer faces without an IOC container when writing servlets or JSP pages. In fact in Flex the built in visual state mechanism means we can set up dependencies and tear them down when states are entered and left. So, here's my question: what would an IOC container add that Flex doesn't provide and how would it improve our work or what we could do? Are you primarily thinking about aspects? Yours truly, -Brian Carlos Rovira wrote: Looks very promising :) Great! C. PD:mmm... no body else seems to be interested in this proyect? people know about the benefits of a IoC container? 19 Apr 2007 04:03:30 -0700, Christophe Herreman [EMAIL PROTECTED] com mailto:[EMAIL PROTECTED] lists%40herrodius.com: Hi Carlos, I don't really have an official roadmap, but here are some of the things I'd like to achieve: - IoC container - IoC utils for frameworks like Cairngorm and ARP - AOP framework - Mock Objects for FlexUnit - Reflection API - general utilities Reading this myself, it looks very optimistic ;-) but the motivation is there so, what the heck. A first version of the Reflection API has just been added to the SVN repo BTW. regards, Christophe -- __ Brian Lesser Assistant Director, Application Development and Integration Computing and Communications Services Ryerson University 350 Victoria St. Toronto, Ontario Phone: (416) 979-5000 ext. 6835 M5B 2K3 Fax: (416) 979-5220 Office: POD?? E-mail: [EMAIL PROTECTED] blesser%40ryerson.ca (Enter through LB99) Web: http://www.ryerson.ca/~blesserhttp://www.ryerson.ca/%7Eblesser __ -- ::| Carlos Rovira ::| http://www.carlosrovira.com ::| http://www.madeinflex.com
Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.
Hi Alex, I don't think I'm doing something special when loading -- just using the ModuleManager: var manager:ModuleManager = new ModuleManager(); this.myModule = ModuleManager.getModule( url ); this.myModule.addEventListener(ModuleEvent.READY, moduleReady ); this.myModule.addEventListener(ModuleEvent.ERROR, moduleError ); this.myModule.load(); .. it does work if I publish the application to the same domain I'm loading the module from. So I'm thinking the problem has to do with the local filesystem not being in the same domain as localhost, as you mentioned. I don't know why the LayoutContainer error is thrown when I run the app locally, but as I said - the same code works if I publish both application and module on the same host, so it does seem a bit strange to me. - Bjørn On 18/04/07, Alex Harui [EMAIL PROTECTED] wrote: The recipe says that you generate a link-report when compiling the main app, and use that link-report as -load-externs when compiling the module. The link-report for the main app should have layoutContainer in it. If it doesn't, you got the wrong version of mx.core.Application in your app. If it does, then there must be something unique about the load. Are you specifying a different application domain? -Alex -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *bjorn - *Sent:* Wednesday, April 18, 2007 7:58 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found. Hi Alex, I've got Flex Builder 2.0.1 and the library path for framework.swc is ${FRAMEWORKS}/libs/framework.swc .. I assume that will link to the 2.0.1version which shipped with the Flex Builder I'm using. As for the -load-externs, what do you mean? The classes are in my main app (although located in a package, yes - but could that cause problems?). What would the alternative be, putting all classes used by the modules in the root? That doesn't seem right to me. Best regards, Bjørn On 17 Apr 2007 06:00:57 -0700, Alex Harui [EMAIL PROTECTED] wrote: Could you be linking the main app against a 2.0 framework.swc? You need to link against 2.0.1. Also, normally you -load-externs against classes in the main app and not from some package. -Alex -- *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED] *On Behalf Of *bjorn - *Sent:* Monday, April 16, 2007 1:14 AM *To:* [EMAIL PROTECTED] ups.com *Subject:* [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found. Hi guys, I've got a simple text module which looks like this: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx= http://www.adobe.com/2006/mxml layout=absolute mx:Script ![CDATA[ import com.myapp.MyEventDispatcher; import com.myapp.MyTestEvent ; public function callSomethingInMainApp(e:Event): void { var event:MyTestEvent= new MyTestEvent(); MyEventDispatcher.getInstance().dispatchEvent( event ); } ]] /mx:Script mx:HBox mx:DateChooser x=10 y=10/ /mx:HBox /mx:Module I compile it with the -load-externs option to not include the classes I use from com.myapp However, when I try to load the module from my main application, this error is thrown: VerifyError: Error #1014: Class mx.core::LayoutContainer could not be found. at flash.display::MovieClip/nextFrame() at mx.core::FlexModuleFactory/::deferredNextFrame() at mx.core::FlexModuleFactory/::update () at mx.core::FlexModuleFactory/::moduleCompleteHandler() Anyone know what might cause this? Googling the error didn't help me much ... -- http://www.juicability.com - flex blog http://www.43min.com - funny movies -- http://www.juicability.com - flex blog http://www.43min.com - funny movies -- http://www.juicability.com - flex blog http://www.43min.com - funny movies
Re: [flexcoders] Can someone explain this?
from documentation: 1) BitmapData.copyPixels(). (a) Bitmap as I understood is the target. It has public bitmapData which copyPixels should be called. And the first parameter here is the source BitmapData. (b) I heven't tried that. But you can. ;) This way you can get answer to 2) by yourself. R. On 4/19/07, Ronnie Liew [EMAIL PROTECTED] wrote: A BitmapData object can be drawn to the screen by a Bitmap object in one of two ways: by using the vector renderer as a fill-bitmap shape, or by using a faster pixel-copying routine. The pixel-copying routine is substantially faster than the vector renderer, but the Bitmap object must meet certain conditions to use it: -No stretching, rotation, or skewing can be applied to the Bitmap object. -No color transform can be applied to the Bitmap object. -No blend mode can be applied to the Bitmap object. -No clipping can be done through mask layers or setMask() methods. -The image itself cannot be a mask. -The destination coordinates must be on a whole pixel boundary. The above is from the help file. 1) the pixel-copying routine is referring to BitmapData.copyPixels() ? 2) What does it mean by the Bitmap object must meet certain conditions to use it ? (a) the Bitmap object is referring to the source bitmap for copyPixels? or the target bitmap to be drawn? (b) We cannot use copyPixels when the source bitmap has been scaled etc ? Or after the copyPixel(), the target bitmap can no longer be scaled etc? or just the speed would be affected?
[flexcoders] Re: Getting started with CF and Flex
I figured that out. I had forgotten to set up the data source. I now get this error when I'm trying to run the program and I don't know how to address it: [MessagingError message='Unknown destination 'cfcontact-default' for service with id 'data-service'.']
RE: [flexcoders] Re: Finding the index of the first visible row in a Datagrid
verticalScrollPosition matches the offset of the first visible row From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of iko_knyphausen Sent: Thursday, April 19, 2007 11:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Finding the index of the first visible row in a Datagrid Oohps, misread your question. The total number should be in the length property. As for the first visible, I don't know, but you can use the datagrid.scrollToIndex method make sure a specific item is visible. --- In flexcoders@yahoogroups.com, Steven Lira [EMAIL PROTECTED] wrote: I'm trying to find the index of the row in a datagrid which is the first visible row. ex. If there are 100 rows but only 15 are visible at any given time, I want to know what the index is of first visible row presented in the window. If the window is scrolled down half way, I should find that the index of the first visible row is 50 (or something like that). Someone mentioned using listData but it is null. I also need to know what the total number of rows are. Thanks, Steve
RE: [flexcoders] Re: Setting DataGridColumn width programmatically visibleColumns
I would try copying every DataGridColumn in the columns array to make a completely new array of new DGC instances then set the columns property. var oldCols:Array = dg.columns; var n:int = oldCols.length; var newCols:Array = new Array(); for (var i:int = 0; i n; i++_ { var col:DataGridColumn = new DataGridColumn(); col.dataField = oldCols[i].dataField; col.headerText = oldCols[i].headerText; ... col.width = newlyCalculatedWidth; newCols.push(cols); } dg.cols = newCols; From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Thursday, April 19, 2007 11:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Setting DataGridColumn width programmatically visibleColumns Sorry if I am being really dense but I take it you can't just check the visible property of the column? Ben --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , parkerwhirlow [EMAIL PROTECTED] wrote: So, I'm finding that this is really a nasty bug, and I haven't found a good work-around. I've tried searching through the DataGrid.columnMap to ensure there's renderers for my column before setting the width. This works until you scroll horizontally. The columns that used to be visible, but aren't anymore still have renderers in columnMap... and as soon as you set the width on a non-visible column, bam... null reference error. I've submitted a bug report on Flex 2.0.1 through the normal feedback channel. Still looking for some kind of work-around if anyone knows of one, I really need something! thanks, PW --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , parkerwhirlow parkerwhirlow@ wrote: Hi, I have an issue where I've created a special routine to calculate the size of the columns in my DataGrid subclass. The problem I have is that I have several data grids that interact with eachother, and not all columns are visible (or were ever visible). When I programmatically set the width of the columns, if the columns have not been shown (are not in the 'visibleColumns' array) I get a null pointer error. See the stack trace below. Since I can't get to the 'visibleColumns' collection, how can I set the 'desired' widths of my columns without running into this error? Also, looking at the actual code, they tried to check for some timing on whether they had calc'd columns. But they don't check if the column you're setting the width on is in the 'visibleColumns' list. This seems like a relatively simple defect to fix... It should fall into that upper if block, and set the width on the column itself, right? thanks, Parker Whirlow __ TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::DataGrid/http://www.adobe.com/2006/flex/mx/internal::resize Column http://www.adobe.com/2006/flex/mx/internal::resizeColumn ()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\DataGrid.as:2462] at mx.controls.dataGridClasses::DataGridColumn/set width()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\dataGridClasses\D ataGridColumn.as:1048] at company.visualizations::MyGrid/company.visualizations:MyGrid::setDefault ColumnWidths()[C:\work\Flex\src\company\visualizations\MyGrid.as:1720] _ source at DataGrid:2462 // there's a window of time before we calc columnsizes // that someone can set width in AS if (!visibleColumns || visibleColumns.length == 0) { columns[col].setWidth(w); return; } if (w visibleColumns[col].minWidth) // ERROR IS HERE w = visibleColumns[col].minWidth;
RE: [flexcoders] FDS / CF Endpoints
Ah yes, Joao is on the right track - I forgot that CF7.0.2 uses an RMI bridge to connect the two. I was thinking of the configuration from a CF8 + LCDS 2.5 integrated installation that is in Beta 2 right now that makes this much simpler (and avoids the need for configuring RMI to get this to work). http://labs.adobe.com/wiki/index.php/Scorpio Pete From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of João Fernandes Sent: Thursday, April 19, 2007 2:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FDS / CF Endpoints Darren, when you request a fill, it will contact with rtmp or polling FDS server. Then FDS looks into the configuration and try to locate CFserver (not the client itself). Tries to connect to it (if no hostname is defined in the destination configuration) with RMI. ColdFusion accepts the connection if the IP is in the allowed IP list that you can find inside the CF administrator in the flex related window. Then if allowed, if checks for the CFC assembler, calls the fill method, returns to FDS and FDS returns to the client. The EndPoint must target always FDS and never CF. João Fernandes
[flexcoders] Open new browser popup
Hi all, Can somebody tell me how I can open a sized window in the users browser? At this moment I'm using navigateToURL(u,_blank) to open a new window but I want a new window with special sizes. Regards, Jaap Cammeraat
[flexcoders] Communicating between Flex and Embeded Swf loaded with loadBytes
Hi I have made a custom pre-loader for my Flex app that displays an embedded swf: [ Embed(source=/assets/ui/loader_panels.swf, mimeType=application/octet-stream) ] public var WelcomeScreenGraphic:Class; public function WelcomeScreen() { this.loadBytes( new WelcomeScreenGraphic() as ByteArray ); } This works fine but the swf needs to laod different xml files depending on the localeCode set in the flash vars of the main Flex App. How can I pass this variable into the swf so that it loads the correct xml file? Also is there a way for the flash file to dispatch an event or call a function in the flex app when the animation has finished? Thanks.
[flexcoders] FDS Scalability
How is the scalability with FDS with CF (and do you have to enable sticky clustering)? I also heard that FDS+CF is much slower than FDS+Java especially when traffic gets heavy. Ben Forta didn't admit it outright...but hinted at it. Have you experienced this kind of thing?
[flexcoders] Re: DataGrid variableRowHeight problem
Ah - paddingTop/paddingBottom on the *datagrid* (i.e. as opposed to on the item renderer or the text field) Brilliant, as usual, Alex. Thank you! --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: paddingTop/paddingBottom are adding the four pixels. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tsiesser Sent: Thursday, April 19, 2007 11:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid variableRowHeight problem Hi all - I am using a custom item renderer with a datagrid where variableRowHeight is set to true. The item renderer extends from UIComponent and contains a single UITextField. In renderer.commitProperties I explicitly set the UITextField and the item renderer to have the same height, which is usually 20 pixels. The height is actually rendering at 24 pixels. If I change the height to 18 pixels, the row renders at 22 pixels - always 4 more than what I set. This only happens when variableRowHeight is true - if I turn variableRowHeight off, I get the correct row height. Does anyone know why this is happening or what I can do to fix/work around it??? Thanks in advance!
[flexcoders] Issues with Flash Gateway
I'm developing and building on my local machine, but the ColdFusion server is on another machine in the network. What is the best practice for working this way as far as setting up my project so I can access CFCs to get data? I'm also having problems with the flex2gateway, when I access the url through a browser ie: http://myserver/flex2gateway I get a 500 null error instead of a blank page. I'm thinking I need to adjust my services-config.xml or maybe add a cross-domain.xml file, but at this point I don't even think my gatway is working.. Any help would be appreciated! --Bob
[flexcoders] Re: Open new browser popup
--- In flexcoders@yahoogroups.com, Jaap Cammeraat [EMAIL PROTECTED] wrote: Hi all, Can somebody tell me how I can open a sized window in the users browser? At this moment I'm using navigateToURL(u,_blank) to open a new window but I want a new window with special sizes. Regards, Jaap Cammeraat Hi Jaap, Wish the following code snippet will be a solution for your question. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script![CDATA[ private function openNewBrowser():Void { var sURL:String = 'javascript: window.open(,null,' + taArguments.text + ');void(0);'; getURL(sURL); }// ]]/mx:Script mx:TextArea id=taArguments width=200 height=100 text=height=200,width=400,status=yes,toolbar=no,menubar=no,location= no / mx:Button label=Open new Browser Window click=openNewBrowser() / /mx:Application Cheers, Mahesh Reddy.
[flexcoders] Re: Installing Flex On Vista Causes Reboots
I have all the latest drivers I could find. I also ran the memtest for 6+hours w/o any failures. Maybe I should try loading XP first and then Vista over it? I think I found the solution. I set up a dual boot system. I used XP to load the Flex software, then when I boot to Vista, I can run it just fine.
[flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?
Adobe constructed a great product. The conception and architecture are excelent, but the comercial strategy is not so good. Macromedia had something like 4 years ahead of Microsoft, since Flex 1.5, that was a very good product too. Macromedia insisted to to seel it for US$18 k, nobody bought it Microsoft at that time did not exist in RIA Market. Then Adobe came and Flex became more accessible. But Adobe charges FDS in US$ 20K and does not pay attention to .NET developers. Well it seems to me that this is another big mistake. if Adobe continues with this kind of comercial strategy, i am afraid that our beloved Flex will loose the race. --- In flexcoders@yahoogroups.com, Scott Barnes [EMAIL PROTECTED] wrote: On 4/20/07, Michael Schmalle [EMAIL PROTECTED] wrote: I have to put my 2 cents down for prosperity sake. 4 which is important :) All you people that live in cities and constantly sicken yourselves by your own pollution, need to live on a mountain for a couple years, look back at what you say and see how hilarious it all is. I live near a desert? does that' coun't for isolation and freedom of thoughts? (Sorry in Australia, our mountains are hard to come by at times). How many times can the battle of north and south be fought and... won? :) Until East West figure out it's time to join in, and then we go on Springer... i got dibs on the chair throwing... Listening to people engrossed in the politics of banter on the internet is much more funny than turning on the TV these days. They still have TV? you mean YouTube + TV can co-exist? next thing you'll say Silverlight and Flash can co-exist.. pft crazy talk. Scott, your just a person that likes getting people talking regardless of the side your on. Your good at it to. Oh stop, you say that to all the Evangelists.. now you're making me blush *blush in ascii art*. As far as Microsoft's world domination, I doubt it. No one ever 'wins' forever. I think most of the resistance you feel around your posts is exactly what Dave Wolf said... now theres options, people want choice. I guess that is what the market and developers 'against' Microsoft have been saying forever... WE WANT CHOICE! Watch what you wish for, you just may get it... I think that is what being human is all about. Peace, Mike If I didn't have leg cramps right about now, i'd stand and applaud you :) (Seriously - Politics is bound to happen when you have to large corporations saying to all of you - try my stuff, no try mine, nooo try mine... and so on.. Adobe Microsoft compete on a number of levels while at the same time - this will freak the kids out in the front row - without Microsoft, Adobe couldn't of gotten to where it is today. Without Microsoft Flash's penetration numbers wouldn't be where they are/were today (but its ok, no thanks required for the Updates / Default installs we put on the box when we ship etc). I should also mention sites like Honda, MySpace, YouTube and Movie Sites etc were also strong drivers in this space more so then us. Yet if i say this outloud then we could sober up a bit and no1 likes a buzz killer ;) Point: Lighten up folks, it's just technology - or should I say Silverlight, Light up the web! :) -- Regards, Scott Barnes Developer Evangelist Microsoft - whom wrote this with GMAIL.. shhh, don't tell HQ or they'll dock my pay ...as Hotmail and GMAIl cannot co-exist at all! it's in the rules alongside Silverlight and Flash :)
[flexcoders] Problems with XMLSocket
Hi mates, I'm trying to use XMLSocket class (flash.net.XMLSocket). Everything seems to work without problems. The socket connection established successfully, also disconnecting and sending data via connection works finely. The problem is that the class doesn't dispatch DataEvent when the data should be received from server. The server works, it is tested. Firewall switched off. The problem must be on client side - application or flash player security. This is my class: import flash.display.Sprite; import flash.events.*; import flash.net.XMLSocket; import flash.system.Security; import mx.controls.Alert; public class XMLSocketSender extends Sprite { private var hostName:String = anyhost; private var port:uint = 8000; private var socket:XMLSocket; public function XMLSocketSender():void { socket = new XMLSocket(); configureListeners(socket); Security.loadPolicyFile(xmlsocket://domain:8000); socket.connect(hostName, port); } public function testuj():void { var nahodneCislo:int = Math.random() * 100; sendCreateNode(nahodneCislo, testing, 192.168.0.11, int(Math.random()*100), int(Math.random()*100)); } public function sendCreateNode(RequestId:Number, Name:String, IPaddress:String, Latitude:Number, Longitude:Number):void { var request:XML = request id={RequestId}create_nms_nodename{Name}/ nameip_address{IPaddress}/ ip_addresspositionlatitude{Latitude}/ latitudelongitude{Longitude}/longitude/position/ create_nms_node/request socket.send(request); } private function configureListeners(dispatcher:IEventDispatcher):void { dispatcher.addEventListener(Event.CLOSE, closeHandler); dispatcher.addEventListener(Event.CONNECT, connectHandler); dispatcher.addEventListener(DataEvent.DATA, dataHandler); dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler); dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); } private function closeHandler(event:Event):void { Alert.show(XMLSocket connection was closed. \n\nDetails: + event, Sender); } private function connectHandler(event:Event):void { Alert.show(connectHandler: + event + \n\nConnected: + String(socket.connected), Sender); } private function dataHandler(event:DataEvent):void { Alert.show(dataHandler: + event.data, Sender); } private function ioErrorHandler(event:IOErrorEvent):void { Alert.show(XMLSocket error:\n + event, Sender); } private function progressHandler(event:ProgressEvent):void { Alert.show(progressHandler loaded: + event.bytesLoaded + total: + event.bytesTotal, Sender); } private function securityErrorHandler(event:SecurityErrorEvent):void { Alert.show(securityErrorHandler: + event, Sender); } } Please help, it's bordering me for week.
Re: [flexcoders] FDS Scalability
current version of CF might have some issues when dealing with large datasets due to the overhead created by createObject(). Regarding scalability, it should work fine since they scale each one on their own side. I never heard of scalability problems for any of those 2. I don't think that sticky sessions are a requirement for CF. João Fernandes boybles wrote: How is the scalability with FDS with CF (and do you have to enable sticky clustering)? I also heard that FDS+CF is much slower than FDS+Java especially when traffic gets heavy. Ben Forta didn't admit it outright...but hinted at it. Have you experienced this kind of thing?
Re: [flexcoders] Problem removing popup window
On 4/19/07, Alex Harui [EMAIL PROTECTED] wrote: I think you just have to step into the removePopUp code and see what's up That seems reasonable - except it works fine when I put the breakpoint in. If I remove the breakpoint.. the popup doesn't get removed. That doesn't make any sense at all because the breakpoint should not affect how the code runs. Here's what I did. I set the breakpoint at this line: PopUpManager.removePopUp(this); Then I debug the app... it stops.. I step through all the stuff... and the popup is removed. So I debug the app again, this time I just continue after the breakpoint. Still, the popup is removed. So I remove the breakpoint, and debug again. This time, the popup is NOT removed. Rick
[flexcoders] FlashVars from html
How can I use flashVars from html... In flash 8 i can receiving result from html files in swf file. How it works in as3 and flex? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[flexcoders] Re: Need help creating an image from a source control
Thanks Bjorn, I think I'm headed in the right direction now, but I still have one hurdle. I'm successfully copying the source image to the preview control, but I can't figure out how to only copy a portion of the source image instead of the whole thing. How do I get just a certain rectangle of the source image to pass into the BitmapData.draw() function? Any ideas? Thanks again, shaun --- In flexcoders@yahoogroups.com, Bjorn Schultheiss [EMAIL PROTECTED] wrote: On the click handler for my image i've got something like var dragInitiator:Canvas = event.currentTarget as Canvas; var dragInit:AssetPreviewPanelView = dragInitiator.parent as AssetPreviewPanelView; var dragSource:DragSource = new DragSource(); dragSource.addData( dragInit.dataProvider, dataProvider ); var proxyBitmapData:BitmapData = BitmapDataHelper.getUIComponentBitmapData( dragInit ); var dragProxy:Image = new Image(); var lc:LoaderContext = new LoaderContext(); lc.checkPolicyFile = true; dragProxy.loaderContext = lc; dragProxy.source = new Bitmap( proxyBitmapData ); DragManager.doDrag(dragInit, dragSource, event, dragProxy, 0, 0, 0.5, true); public static function getUIComponentBitmapData ( target:DisplayObject ):BitmapData { var bd : BitmapData = new BitmapData( target.width, target.height ); var m : Matrix = new Matrix(); bd.draw( target, m ); return bd; } Does this help? Bjorn On 20/04/2007, at 8:16 AM, Shaun wrote: I am working on a project where I need to create an image based on a user selected portion of a source image. The selected area of the source image needs to be scaled/stretched/shrunk to fit the specific dimensions of the new image. I'm basically looking for advice on how to accomplish this. Currently I have an image control in a canvas. The user clicks and drags to select the portion of the image they want to use. This works fine - I have the coordinates and size of the rectangle I need to copy from the source canvas. What I can't figure out is the best way to use those coordinates to get the underlying image from the canvas and put it into another control. I've tried creating a sprite containing a bitmap and using the BitmapData.draw function passing in the source canvas and what I believe is a correct matrix, but have not succeeded. Any pointers, examples to look at, etc. would be greatly appreciated. Thanks, Shaun Regards, Bjorn Schultheiss Senior Developer Personalised Communication Power Level 2, 31 Coventry St. South Melbourne 3205, VIC Australia T: +61 3 9674 7400 F: +61 3 9645 9160 W: http://www.qdc.net.au ((This transmission is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error, please notify the sender.---))
[flexcoders] Re: Two-Way Communication
I'm actually looking into that now, but I'm having a hard time finding any information about how to communicate using it apart from stream audio or video. Know of any examples that would be useful? --- In flexcoders@yahoogroups.com, Johannes Nel [EMAIL PROTECTED] wrote: as i suggested before look at the netconnection class and tunneling over rtmpt :80 On 19 Apr 2007 09:47:09 -0700, Matt [EMAIL PROTECTED] wrote: Since I don't seem to be getting there with my original basic idea of straight communication via port 80, let me rephrase the problem and hopefully I can get a better response. I have an environment that has a web server (Servlet container - Tomcat 6 to be precise) running on port 80. I am not able to open any additional ports for communication because of firewall constraints. I want to have a method of two-way communication via a single stateful connection. Is this possible? I have successfully made this function with a Socket, but only when my server is running on port 8080. If the server is running on port 80 I get a sandbox security violation. -- j:pn http://www.lennel.org
[flexcoders] Re: Call by value instead of Call by reference when copying ArrayCollection
No, it seems that Brian was right, it works fine without a loop. Great community, Thanks, Mane
[flexcoders] Re: FlashVars from html
Hey, I had to do this a couple of weeks ago and wrote a blog entry about it: http://www.kylehayes.info/blog/index.cfm/2007/2/22/Passing-URL-Variables-To-Flex http://www.kylehayes.info/blog/index.cfm/2007/3/5/Flex-HtmlTemplate-filetype-to-CFM-instead-of-HTML --- In flexcoders@yahoogroups.com, mychemic Carlo Gulliani [EMAIL PROTECTED] wrote: How can I use flashVars from html... In flash 8 i can receiving result from html files in swf file. How it works in as3 and flex? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[flexcoders] Re: Need help creating an image from a source control
BitmapData.copyPixels(). For future reference, it allows you to copy a portion of a bitmap specified by a rectangle - exactly what I need. Thanks for the help, Bjorn. --- In flexcoders@yahoogroups.com, Shaun [EMAIL PROTECTED] wrote: Thanks Bjorn, I think I'm headed in the right direction now, but I still have one hurdle. I'm successfully copying the source image to the preview control, but I can't figure out how to only copy a portion of the source image instead of the whole thing. How do I get just a certain rectangle of the source image to pass into the BitmapData.draw() function? Any ideas? Thanks again, shaun --- In flexcoders@yahoogroups.com, Bjorn Schultheiss bjorn.schultheiss@ wrote: On the click handler for my image i've got something like var dragInitiator:Canvas = event.currentTarget as Canvas; var dragInit:AssetPreviewPanelView = dragInitiator.parent as AssetPreviewPanelView; var dragSource:DragSource = new DragSource(); dragSource.addData( dragInit.dataProvider, dataProvider ); var proxyBitmapData:BitmapData = BitmapDataHelper.getUIComponentBitmapData( dragInit ); var dragProxy:Image = new Image(); var lc:LoaderContext = new LoaderContext(); lc.checkPolicyFile = true; dragProxy.loaderContext = lc; dragProxy.source = new Bitmap( proxyBitmapData ); DragManager.doDrag(dragInit, dragSource, event, dragProxy, 0, 0, 0.5, true); public static function getUIComponentBitmapData ( target:DisplayObject ):BitmapData { var bd : BitmapData = new BitmapData( target.width, target.height ); var m : Matrix = new Matrix(); bd.draw( target, m ); return bd; } Does this help? Bjorn On 20/04/2007, at 8:16 AM, Shaun wrote: I am working on a project where I need to create an image based on a user selected portion of a source image. The selected area of the source image needs to be scaled/stretched/shrunk to fit the specific dimensions of the new image. I'm basically looking for advice on how to accomplish this. Currently I have an image control in a canvas. The user clicks and drags to select the portion of the image they want to use. This works fine - I have the coordinates and size of the rectangle I need to copy from the source canvas. What I can't figure out is the best way to use those coordinates to get the underlying image from the canvas and put it into another control. I've tried creating a sprite containing a bitmap and using the BitmapData.draw function passing in the source canvas and what I believe is a correct matrix, but have not succeeded. Any pointers, examples to look at, etc. would be greatly appreciated. Thanks, Shaun Regards, Bjorn Schultheiss Senior Developer Personalised Communication Power Level 2, 31 Coventry St. South Melbourne 3205, VIC Australia T: +61 3 9674 7400 F: +61 3 9645 9160 W: http://www.qdc.net.au ((This transmission is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error, please notify the sender.---))
Re: [flexcoders] Security Sandbox Error
On 4/19/07, Alex Harui [EMAIL PROTECTED] wrote: What's the url of your swf? https://advanceweb.ads.duke.edu/entitylookup3/EntityLookup.swf. Loaded inside: https://advanceweb.ads.duke.edu/entitylookup3/index.cfm or sometimes: https://advanceweb.ads.duke.edu/entitylookup3/EntityLookup.html Either way, the SWF and the surrounding HTML file are always SSL. Rick
[flexcoders] Embeding an SWF
I know that to embed an swf you can do this: [Embed(source=/assets/myswf.swf)] public var swf_embeded_flex:Class; My question is the following: Is it possible to make /assets/mysqf.swf to be a variable? So I could have: var asset:String=/assets/myswf.swf; [Embed(source={asset})] public var swf_embeded_flex:Class; I know that the previous is incorrect and does not work, but is there a way to make it work? What would be the correct syntax. Thanks Terius
Re: [flexcoders] Set widths on individual tabs
From: Ravi Kumar Gummadi Sent: Thursday, April 19, 2007 3:49 PM To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] Set widths on individual tabs Hi Jack I worked on almost similar problem with different requirements Extend TabNavigator and extend TabBar as well In the extended TabBar override the createNavItem() method and then set the width for the resulting object/Button. Now in your custom TabNavigator , override createChildren() and then remove the default tabBar as child and assign the custom Tabbar u created as the child and add it. I know that this solution is not perfect. Any inputs from others wud be highly appreciated Regards ravi ** The information contained in this email, and any attachments hereto, is strictly confidential and solely intended for use by the individual(s) and/or entity(s) to which it is addressed. If you have received this email in error, please notify the System Manager at [EMAIL PROTECTED] as soon as possible. Thank you for your attention to this matter. ** From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack OMelia Sent: Wednesday, April 18, 2007 2:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Set widths on individual tabs Hi All, I have a tabNavigator where some of my tab labels get truncated. Some of my labels are short (like Home) and others are long (like Allocation Details). The long labels get truncated with an ellipsis even though there's still plenty of room for the tabs to expand to full width. If I set the tabWidth on the tabNavigator to show the full label, each tab becomes too long and they overrun the tabNavigator. There doesn't seem to be any way to set widths on individual tabs. There isn't even a TruncateToFit attribute to turn on or off. Has anyone ever figured out a way around this? Thanks, Jack __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[flexcoders] Getting progress events on Socket *write* (not read)
Is there a way to get a progress event on a socket write (flush)? Right now, the way I understand it, if you write data to a socket you have no way of knowing when the data has completely been flushed. This is a problem if you're writing a lot of data, because you could blow that buffer .. guessing the bandwidth (eg: by testing it) isn't a great solution either, for example, if you're on a wireless laptop that bandwidth may fluctuate and your original guess might be wrong. I guess you could continue to test the bandwidth connection, but that seems a bit unfortunate. Might be my only resolution here, though. Cheers, Tim.
Re: [flexcoders] Two-Way Communication
as i suggested before look at the netconnection class and tunneling over rtmpt :80 On 19 Apr 2007 09:47:09 -0700, Matt [EMAIL PROTECTED] wrote: Since I don't seem to be getting there with my original basic idea of straight communication via port 80, let me rephrase the problem and hopefully I can get a better response. I have an environment that has a web server (Servlet container - Tomcat 6 to be precise) running on port 80. I am not able to open any additional ports for communication because of firewall constraints. I want to have a method of two-way communication via a single stateful connection. Is this possible? I have successfully made this function with a Socket, but only when my server is running on port 8080. If the server is running on port 80 I get a sandbox security violation. -- j:pn http://www.lennel.org
Re: [flexcoders] Problem resizing datagrid columns
On 4/19/07, Alex Harui [EMAIL PROTECTED] wrote: The DataGrid will not let you partially fill it with columns so it will stretch all or just the last column to completely cover its width. Man it bugs me that it takes 6 hours for my posts to show up on this list. I figured out the problem. I was actaully setting the minWidth =) *kicks self*
[flexcoders] datagrid autoscrolls
I have a datagrid on a form with fields above and below. The datagrid displays 3 rows. I have custom renderers in the datagrid columns. When more than 3 rows exists, the datagrid will scroll when I move the cursor above or below the datagrid. When I open the combobox on the last visable row and move to the bottom of that list the datagrid autscrolls and closes the combobox list before I can make a selection.
[flexcoders] How to change a button icon at runtime in Flex1.5
Hi All, I am working on Flex 1.5. I need to change a button icon at runtime. Adobe docs say The icon must be embedded at compile time as a symbol in the SWF file, as opposed to being downloaded as an image from the server at runtime. Is there any way I could do change the icon dynamically? Thanks, Sweta
Re: [flexcoders] boolean not casting ok from string
ok Gordon. so i will make my wrapper. thanks to you and Alex. []'s Luís Eduardo. Gordon Smith escreveu: No, you cannot overload operators in AS3. The point has been made several times now: the only way to convert true to true and false to false is to write var btest:Boolean = someString == true; - Gordon *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Luis Eduardo *Sent:* Thursday, April 19, 2007 7:32 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] boolean not casting ok from string i see. So can i overload the = operator to it understand my needs? So i can do the converting transparently. btest:Boolean = false; i search on google and find it from a forum: overloading is still not supported in AS3 (and that includes operators) but dont know if its true. Alex Harui escreveu: It is weird, but that what the ECMAScript committee decided. It is a bit inconsistent, but you are actually calling functions and not really casting. So you'll have to live with converting as to whether the string == true -- *From:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com] *On Behalf Of *Luis Eduardo *Sent:* Wednesday, April 18, 2007 9:06 PM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* Re: [flexcoders] boolean not casting ok from string yeah shaun, you are rigth. After follow your sugestion i searched in the docs and found what you mean here: http://livedocs.adobe.com/flex/201/langref/package.html#Boolean http://livedocs.adobe.com/flex/201/langref/package.html#Boolean http://livedocs.adobe.com/flex/201/langref/package.html#Boolean http://livedocs.adobe.com/flex/201/langref/package.html#Boolean() Boolean its a function that have the same behavior than the Boolean constructor that take a non-empty string and convert it to true. aww. very weird. anyway thank you and the others to help understand what is going on here. now i will try to minimize the damages :) []'s, Luís Eduardo. shaun escreveu: Hi, Its not a bug. Note: the Constructor for Boolean in the docs. Think about it as if you have the following: var moo:String = Moo; if (moo) { // have a cow. }else{ //no cow. } So, Boolean(false) is true! var y; var x:Object; var b:Boolean = Boolean(false); trace(b1 false is +b.valueOf()); b = 0; trace(b2 (0) is +b.valueOf()); b = 1; trace(b3 (1) is +b.valueOf()); b = 2; trace(b4 (2) is +b.valueOf()); b = -1; trace(b5 (-1) is +b.valueOf()); b = null; trace(b6 (explicit null) is +b.valueOf()); b = x; trace(b7 (unassigned null, undef) is +b.valueOf()); b = y; trace(b8 (undef) is +b.valueOf()); b = (new Object() as Boolean); trace(b9 (as not a boolean ie, null) is +b.valueOf()); - b1 false is true b2 (0) is false b3 (1) is true b4 (2) is true b5 (-1) is true b6 (explicit null) is false b7 (unassigned null, undef) is false b8 (undef) is false b9 (as not a boolean ie, null) is false HTH, shaun
Re: [flexcoders] Security Sandbox Error
I'm posting a response I got off-list On 4/20/07, Matthew O'Meara [EMAIL PROTECTED] wrote: Likely when you are running from your dev environemnt it works fine, but when you run it through a browser on another machine is when it fails. Here's the rub! I don't have a dev environment. Shh, don't tell anyone. My swf files are compiled and generated to a directory mapped to the production web server...when I hit F11 to debug... sometimes I get the error, sometimes I don't. In any case, the SWF is *ALWAYS* located on the server, and it's ALWAYS accessed via SSL - both the SWF and the HTML file that flex generates. That being said... I tried the crossdomain.xml solution and it worked =) Thanks for the suggestion! Rick
[flexcoders] custom drag events for List -- how NOT to have scrollbar drag an item?
I have a list showing a variety of items. I use a custom ItemRederer to diplay the list items, which I want to be able to drag from the list as well. When the user drags an item, I want the DragProxy to be a different look than the ItemRenderer. I couldn't figure out how to override the built in drag functionality, so I went with the roll your own technique shows in the Docs. Problem is, when there are enough items in the list to make a scrollbar visible (policy is set to automatic), when I drag the scrollbar, I also end up starting a drag of the item that is under (?) the scrollbar where I clicked. Below is the code I'm using to initiate the drag. All the handlers are for the List. The renderer class is SongRenderer, and the proxy class is SongProxy (there's also a Song class, which is what the items in the List are). Anybody suggest a way to do this, either by overriding the built in drag events, or by somehow saying Yeah, unluess you're cliciking on the List's scrollbar(s)? Thanks! private function handleMouseDown(e:MouseEvent):void { mouseIsDown = true; } private function handleMouseUp(e:MouseEvent):void { mouseIsDown = false; } private function handleMouseMove(e:MouseEvent):void { if (!mouseIsDown ) { return; } var dragInit:List = e.currentTarget as List; var song:Song = dragInit.selectedItem as Song; var ds:DragSource = new DragSource(); ds.addData(song, song); var proxy:SongProxy = new SongProxy(); proxy.song = song; proxy.width = proxy.getExplicitOrMeasuredWidth(); proxy.height = proxy.getExplicitOrMeasuredHeight(); mouseIsDown = false; var offsetX:Number = -dragInit.contentMouseX + proxy.width/2; var offsetY:Number = -dragInit.contentMouseY; DragManager.doDrag(dragInit, ds, e, proxy, offsetX, offsetY); }
[flexcoders] Distinguish between open/closed folder and leafs in a tree's iconFunction
I couldn't find any references so far on how to check if I'm processing a leaf or a folder node, and in the last case if it's opened or closed in an iconFunction.. Any hints?
[flexcoders] rowCount bug in DataGrid?
I have a datagrid held within a vDividedBox. I need to know the number of visible rows as the dividedBox size changes. I tried using the divider events (dividerPress, dividerDrag, dividerRelease) and checking the rowCount of the DataGrid, however it appears that the rowCount is not updated at the time of the divider events. Sometimes rowCound is not updated with the event at all or lags considerably behind the event. I tried watching in the debugger and it appears that rowcount is not updated with the resize all the time. Any ideas? Should I be using something other than rowCount? Thanks, Steven
RE: [flexcoders] Problem removing popup window
Ah, try calling removePopup using callLater(). This magic incantation often solves problems like this for me. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Root Sent: Friday, April 20, 2007 9:44 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Problem removing popup window On 4/19/07, Alex Harui [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I think you just have to step into the removePopUp code and see what's up That seems reasonable - except it works fine when I put the breakpoint in. If I remove the breakpoint.. the popup doesn't get removed. That doesn't make any sense at all because the breakpoint should not affect how the code runs. Here's what I did. I set the breakpoint at this line: PopUpManager.removePopUp(this); Then I debug the app... it stops.. I step through all the stuff... and the popup is removed. So I debug the app again, this time I just continue after the breakpoint. Still, the popup is removed. So I remove the breakpoint, and debug again. This time, the popup is NOT removed. Rick
[flexcoders] Fade Effect and StartDelay Issue/Bug?
Seems like I'm having an issue with the Fade effect and using startDelay. I have the following Fade effect defined: mx:Fade id=fadeIn duration=200 alphaFrom=0.0 alphaTo=1.0 startDelay=1000/ This is used by a canvas component: mx:Canvas id=myCanvas width=400 height=400 visible={cb1.selected} showEffect={fadeIn} hideEffect={fadeOut} mx:Button label=test/ /mx:Canvas cb1 is a checkbox to play around with the fading in and out of the canvas. I'm starting out with the Canvas supposed to be invisible (checkbox unchecked). Here is the problem: When the visible property for the canvas is turned to true, Flex makes the canvas visible instantaneously and then after 1 second does the fade in effect. What should be happening is that the canvas is staying invisible and then doing the fade in. Anyone run into this problem? Seems like a bug in Flex to me, but then again, I could be overlooking something. Thanks, Jurgen
RE: [flexcoders] FDS Scalability
Actually, I've neither admitted not hinted this, and have no reason to believe that that is the case. ColdFusion deployed on Java can, and should, scale as well as the underlying Java server. --- Ben From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of boybles Sent: Thursday, April 19, 2007 10:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS Scalability How is the scalability with FDS with CF (and do you have to enable sticky clustering)? I also heard that FDS+CF is much slower than FDS+Java especially when traffic gets heavy. Ben Forta didn't admit it outright...but hinted at it. Have you experienced this kind of thing?
[flexcoders] Re: custom drag events for List -- how NOT to have scrollbar drag an item?
I created my own list component with drag n drop suport and here is what I did for that scenario... private function onMouseDown(event:MouseEvent):void{ //trace(mouseDown); var pt:Point = new Point(event.localX, event.localY); pt = DisplayObject(event.target).localToGlobal(pt); mouseDownPoint = globalToLocal(pt); draggedItem = event.currentTarget as IListItemRenderer; // Need to make sure event is not captured by items in a child list if (draggedItem draggedItem.parent == this) { //trace(initiateDrag); draggedItem.addEventListener (MouseEvent.MOUSE_MOVE, tryDrag); } } Notice that it checks the currentTarget and makes sure it is an IListItemRenderer
Re: [flexcoders] Problem removing popup window
I also tried this within my progressWindow component... public function remove():void { callLater(remove2); } public function remove2():void { PopUpManager.removePopUp(this); } Which also didn't work. I mean, it still works in at all times in debug mode with the breakpoint.. but not without. Frustrating! Rick
[flexcoders] Application design question: opinions welcomed
I am about to undertake the task of expanding a recently completed Flex app that utilizes Cairngorm. Its basically a workflow application to allow users to create large batches of PPT and PDF documents that are generated on the server. The existing application is for a specific type of document, and we're about to expand it to allow the generation of different kinds of documents, and I'm not yet sure how to best architect it. As it stands now, the application consists of the following screens, which for the most part are encountered in a chronological fashion. Dashboard - Create Worklist - Configure Documents - Preliminary Generation and Approval - Full Batch Generation - Document Delivery The app will eventually need to support the configuration and batch generation of several different types of documents. They will all require slightly different steps and levels of control. For instance, the first doc type we are adding will not utilize the Configure Documents and Preliminary Generation and Approval steps in the sequence described above. Document Delivery will be used for all doc types, and the layout of the screen should remain fairly consistent, but the logic behind the controls and specific data held in the components will vary from doc type to doc type. I realize this is very general, so I am really looking for overarching approaches. Do I need to do some sort of reverse code-behind, where I have a base MXML file for the screens that I can then extend/alter via script files? Should the whole deck of screens for each doc type be a module or should each screen be a module? Whats the best way to structure my Command and Event classes since I will have some generic and some that are doc type specific? Pointers anyone can give are appreciated, even if they're as general as suggestions on analysis patterns I can follow to better diagnose the situation myself. At this point I am just kind of stuck on where to even start on breaking things apart. Thanks, Ben
[flexcoders] Re: Dragging from a Datagrid to a tree CODE EXAMPLE
I made an example of what I'm talking about. I cant get it to accept an item (not have that red x) when I drag a datagrid row over the tree. ondragEnter is where the code that SHOULD handle it is. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.controls.dataGridClasses.DataGridColumn; import mx.events.DragEvent; import mx.collections.XMLListCollection; import mx.managers.DragManager ; import mx.controls.Tree; import mx.core.DragSource; import mx.controls.DataGrid; import mx.core.UIComponent; [Bindable] public var company:XML = list folder title=Firmware code=200 isBranch=true project projDef=D.002440 projDesc=Project3 / project projDef=D.000621 projDesc=Project4 / /folder folder title=Hardware code=300 isBranch=true project projDef=M.000237 projDesc=Project1 / project projDef=M.000169 projDesc=Project2 / /folder folder title=Misc code=400 isBranch=true / /list; [Bindable] public var myData:XML = list item title=item1/ item title=item2/ item title=item3/ /list; [Bindable] public var companyList:XMLListCollection = new XMLListCollection( company.folder ); [Bindable] public var companyList2:XMLListCollection = new XMLListCollection(myData.item ); private function treeLabel( item:Object ) : String{ var node:XML = XML(item); if( node.localName() == folder ) return [EMAIL PROTECTED]; else return [EMAIL PROTECTED]; } //THIS IS WHERE MY PROBLEMS ARE, I THINK! private function onDragEnter(event:DragEvent) : void{ event.preventDefault(); var ds:Array if (event.dragInitiator is DataGrid){ ds = event.dragSource.dataForFormat (items) as Array; } if (event.dragInitiator is Tree){ ds = event.dragSource.dataForFormat(treeItems) as Array; } for( var i:int = 0; i ds.length; i++ ){ trace(ds[i].projDef); } DragManager.acceptDragDrop(UIComponent(event.currentTarget)); } ]] /mx:Script mx:Tree id=myTree width=200 allowMultipleSelection=true dropEnabled=true labelFunction=treeLabel dragEnabled=true dragMoveEnabled=true dragEnter=onDragEnter(event) dataProvider={companyList} /mx:Tree mx:DataGrid dragEnabled=true dataProvider={companyList2} mx:columns mx:DataGridColumn headerText=Column 1 dataField=@title/ mx:DataGridColumn headerText=Column 2 dataField=/ /mx:columns /mx:DataGrid /mx:Application --- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote: Alex, ur the man for always replying to me :). I changed it to: private function onDragEnter(event:DragEvent):void{ event.preventDefault(); DragManager.acceptDragDrop(UIComponent(event.currentTarget)) } Maybe I should post some example code? --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: I think you have to call preventDefault on the event. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson Sent: Wednesday, April 18, 2007 7:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dragging from a Datagrid to a tree this seems pretty straight forward. I am dragging from a datagrid to a tree, but i get the red X. on the tree i set dragEnter=onDragEnter(event) dropEnabled=true then i have: private function onDragEnter(event:DragEvent):void{ DragManager.acceptDragDrop(UIComponent(event.currentTarget)) } What the buggers?!
Re: [flexcoders] Problem removing popup window
On 4/20/07, Tracy Spratt [EMAIL PROTECTED] wrote: Ah, try calling removePopup using callLater(). This magic incantation often solves problems like this for me. That's interesting doesn't seem to work... callLater(progressWindow.remove); //progressWindow.remove(); Seems to have no effect.. Rick
[flexcoders] Using relational database with flex (newbie help)
i know this is kinda not directly a flex question but i figure surely someone must use mysql in here for a flex app. anyway here goes. just a quick questionive got a database of students and i want to somewhat design a relational database so that i can run relational queries. unfortunately i dont know how to construct foreign keys in mysql using phpmyadmin. my idea was to have 4 tables namely students studentid name surname address etc etc enrolment studentid foreign key courseid foreign key course courseid coursename teachers teacherid teachername the tables above are simplified and will probably contain much more data. my main prblem is that i dont know how to set up foreign keys within phpmyadmin so that i can keep my database relational.
[flexcoders] LiveCycle Data Services beta expired?
I just installed the LCDS beta and I am trying to run it on Tomcat. I keep getting the following error when trying to launch the samples: Exception flex2.compiler.LicenseException I installed the following update, but I still get the error. http://www.adobe.com/cfusion/webforums/forum/messageview.cfm? forumid=72catid=640threadid=1259953enterthread=y any ideas? Has anyone else run into this? - Kevin
Re: [flexcoders] Using relational database with flex (newbie help)
Your tables must be InnoDB, but otherwise, you can set up the keys using raw SQL code in phpmyadmin: CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id) ) ENGINE=INNODB; CREATE TABLE child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE ) ENGINE=INNODB; look at the manual for more examples: http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key- constraints.html - Kevin On Apr 20, 2007, at 2:31 PM, munene_uk wrote: i know this is kinda not directly a flex question but i figure surely someone must use mysql in here for a flex app. anyway here goes. just a quick questionive got a database of students and i want to somewhat design a relational database so that i can run relational queries. unfortunately i dont know how to construct foreign keys in mysql using phpmyadmin. my idea was to have 4 tables namely students studentid name surname address etc etc enrolment studentid foreign key courseid foreign key course courseid coursename teachers teacherid teachername the tables above are simplified and will probably contain much more data. my main prblem is that i dont know how to set up foreign keys within phpmyadmin so that i can keep my database relational.
Re: [flexcoders] LiveCycle Data Services beta expired?
ahh restarted Tomcat and it's now working...the beauty of restart. - Kevin On Apr 20, 2007, at 2:36 PM, Kevin wrote: I just installed the LCDS beta and I am trying to run it on Tomcat. I keep getting the following error when trying to launch the samples: Exception flex2.compiler.LicenseException I installed the following update, but I still get the error. http://www.adobe.com/cfusion/webforums/forum/messageview.cfm? forumid=72catid=640threadid=1259953enterthread=y any ideas? Has anyone else run into this? - Kevin
Re: [flexcoders] Prana: IoC container for AS3
Thanks Carlos, I'll be interested to see what you come up with. Right now I'm experimenting with the best way to use static methods to handle cross-cutting security concerns within custom components. For example a combo box may only be able to show certain options to a user based on the user's role. The combo starts off with all the options available but must filter them before displaying them. To do that it calls a static method of a RoleFilter class. I'm not sure if that's the best way to go about it though. Here's the script from within a custom combo box as an example: mx:Script ![CDATA[ import com.somecompany.security.RoleFilter; private function init():void{ filterData(); } public function filterData():void{ dataProvider = RoleFilter.filterArrayCollection(unfilteredCollection); } ]] /mx:Script Note: unfilteredCollection is just an ArrayCollection of objects. Now, that's not a lot of code, but what bothers me is that I'd rather my custom combo box not know anything about my RoleFilter class. In fact I'd prefer it not know anything about filters at all. So, even though this works fine, I'm trying to come up with something more elegant. So far having the combo box's container set this up hasn't looked right either. So again, I'm interested to see what you end up with. Yours truly, -Brian Carlos Rovira wrote: I think avoiding repeated code would a great advance if we use an IoC container that allows us only create the different code and inyect the shared functionality. Another great thing is AOP that would be a great thing since many different objects must face equal behaviour and we could do this as as aspect and inyect it by configuration. Maybe the problem is to think about how we must to adapt this kind of functionality to AS3 and Flex and not simply copy from the java/spring world to Flex. But for me is clear that many improvements in the upcoming months could be done with frameworks like Pranaq 2007/4/20, Brian Lesser [EMAIL PROTECTED]: Hi Carlos, et al, I have a question regarding the need for an ioc container for Flex as opposed to a pure AS3 or Flash project. Flex already provides a hierarchy of containers that contain controls and service proxies. The containers are usually responsible for setting the dependencies between controls and proxies. Setting dependencies can be done with databinding, simple assignment, or by setting up listeners. This is a very different situation from what a Java developer faces without an IOC container when writing servlets or JSP pages. In fact in Flex the built in visual state mechanism means we can set up dependencies and tear them down when states are entered and left. So, here's my question: what would an IOC container add that Flex doesn't provide and how would it improve our work or what we could do? Are you primarily thinking about aspects? Yours truly, -Brian Carlos Rovira wrote: Looks very promising :) Great! C. PD:mmm... no body else seems to be interested in this proyect? people know about the benefits of a IoC container? 19 Apr 2007 04:03:30 -0700, Christophe Herreman [EMAIL PROTECTED] com mailto:[EMAIL PROTECTED] lists%40herrodius.com: Hi Carlos, I don't really have an official roadmap, but here are some of the things I'd like to achieve: - IoC container - IoC utils for frameworks like Cairngorm and ARP - AOP framework - Mock Objects for FlexUnit - Reflection API - general utilities Reading this myself, it looks very optimistic ;-) but the motivation is there so, what the heck. A first version of the Reflection API has just been added to the SVN repo BTW. regards, Christophe -- __ Brian Lesser Assistant Director, Application Development and Integration Computing and Communications Services Ryerson University 350 Victoria St. Toronto, Ontario Phone: (416) 979-5000 ext. 6835 M5B 2K3 Fax: (416) 979-5220 Office: POD?? E-mail: [EMAIL PROTECTED] blesser%40ryerson.ca (Enter through LB99) Web: http://www.ryerson.ca/~blesserhttp://www.ryerson.ca/%7Eblesser __ -- __ Brian Lesser Assistant Director, Application Development and Integration Computing and Communications Services Ryerson University 350 Victoria St. Toronto, Ontario Phone: (416) 979-5000 ext. 6835 M5B 2K3Fax: (416) 979-5220 Office: POD B-66-C E-mail: [EMAIL PROTECTED] (Enter through LIB-B99)Web: http://www.ryerson.ca/~blesser __
[flexcoders] LiveCycle Data Services PDF
I have been looking at the LCDS PDF creation capabilities and I have found that the PDF's created, 1) Cannot be previewed in the flex app, which means that the user has to deal with annoying popups etc... 2) Cannot be viewed in OSX Preview. Unfortunately, in my case, over 50% of my end users are running OS X and thus do not have Reader installed AND furthermore expect to be able to open PDF's in Preview. Does anyone know of a server-side conversion to make the PDF's compatible with Preview. Is this something that we would have to purchase LiveCycle Forms to accomplish? I love the integration of PDF in to Flex DS, I am just hoping that it can go further since right now it seems like there are still significant limitations. Has anyone else run into these problems and found workarounds? - Kevin
[flexcoders] layout is missing.....
hi :) so now i have Flex at work and at home... however, for some reason (at work), i dont have the layout propery(the check boexes, where you can align things the way you want to) in my Flex properties.. also, everything is just on one panel, not accordion, like i have at home. did i do something wrong? am i missing aplugin? how does your Flex look? help me fix it please. Thanks!
RE: [flexcoders] Re: Dragging from a Datagrid to a tree CODE EXAMPLE
Not sure I'll have time to look at this, but I think you have to handle dragOver and dragExit too. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson Sent: Friday, April 20, 2007 11:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Dragging from a Datagrid to a tree CODE EXAMPLE I made an example of what I'm talking about. I cant get it to accept an item (not have that red x) when I drag a datagrid row over the tree. ondragEnter is where the code that SHOULD handle it is. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=vertical mx:Script ![CDATA[ import mx.controls.dataGridClasses.DataGridColumn; import mx.events.DragEvent; import mx.collections.XMLListCollection; import mx.managers.DragManager ; import mx.controls.Tree; import mx.core.DragSource; import mx.controls.DataGrid; import mx.core.UIComponent; [Bindable] public var company:XML = list folder title=Firmware code=200 isBranch=true project projDef=D.002440 projDesc=Project3 / project projDef=D.000621 projDesc=Project4 / /folder folder title=Hardware code=300 isBranch=true project projDef=M.000237 projDesc=Project1 / project projDef=M.000169 projDesc=Project2 / /folder folder title=Misc code=400 isBranch=true / /list; [Bindable] public var myData:XML = list item title=item1/ item title=item2/ item title=item3/ /list; [Bindable] public var companyList:XMLListCollection = new XMLListCollection( company.folder ); [Bindable] public var companyList2:XMLListCollection = new XMLListCollection(myData.item ); private function treeLabel( item:Object ) : String{ var node:XML = XML(item); if( node.localName() == folder ) return [EMAIL PROTECTED]; else return [EMAIL PROTECTED]; } //THIS IS WHERE MY PROBLEMS ARE, I THINK! private function onDragEnter(event:DragEvent) : void{ event.preventDefault(); var ds:Array if (event.dragInitiator is DataGrid){ ds = event.dragSource.dataForFormat (items) as Array; } if (event.dragInitiator is Tree){ ds = event.dragSource.dataForFormat(treeItems) as Array; } for( var i:int = 0; i ds.length; i++ ){ trace(ds[i].projDef); } DragManager.acceptDragDrop(UIComponent(event.currentTarget)); } ]] /mx:Script mx:Tree id=myTree width=200 allowMultipleSelection=true dropEnabled=true labelFunction=treeLabel dragEnabled=true dragMoveEnabled=true dragEnter=onDragEnter(event) dataProvider={companyList} /mx:Tree mx:DataGrid dragEnabled=true dataProvider={companyList2} mx:columns mx:DataGridColumn headerText=Column 1 dataField=@title/ mx:DataGridColumn headerText=Column 2 dataField=/ /mx:columns /mx:DataGrid /mx:Application --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Nate Pearson [EMAIL PROTECTED] wrote: Alex, ur the man for always replying to me :). I changed it to: private function onDragEnter(event:DragEvent):void{ event.preventDefault(); DragManager.acceptDragDrop(UIComponent(event.currentTarget)) } Maybe I should post some example code? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: I think you have to call preventDefault on the event. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Nate Pearson Sent: Wednesday, April 18, 2007 7:48 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Dragging from a Datagrid to a tree this seems pretty straight forward. I am dragging from a datagrid to a tree, but i get the red X. on the tree i set dragEnter=onDragEnter(event) dropEnabled=true then i have: private function onDragEnter(event:DragEvent):void{ DragManager.acceptDragDrop(UIComponent(event.currentTarget)) } What the buggers?!
RE: [flexcoders] Embeding an SWF
embed means embedded at compile time, so no, you can't embed something at runtime. You have to load it useing SWFLoader From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Guillermo Villasana Sent: Friday, April 20, 2007 8:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Embeding an SWF I know that to embed an swf you can do this: [Embed(source=/assets/myswf.swf)] public var swf_embeded_flex:Class; My question is the following: Is it possible to make /assets/mysqf.swf to be a variable? So I could have: var asset:String=/assets/myswf.swf; [Embed(source={asset})] public var swf_embeded_flex:Class; I know that the previous is incorrect and does not work, but is there a way to make it work? What would be the correct syntax. Thanks Terius
RE: [flexcoders] rowCount bug in DataGrid?
You might check rowCount on updateComplete on the DataGrid From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven Lira Sent: Friday, April 20, 2007 8:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] rowCount bug in DataGrid? I have a datagrid held within a vDividedBox. I need to know the number of visible rows as the dividedBox size changes. I tried using the divider events (dividerPress, dividerDrag, dividerRelease) and checking the rowCount of the DataGrid, however it appears that the rowCount is not updated at the time of the divider events. Sometimes rowCound is not updated with the event at all or lags considerably behind the event. I tried watching in the debugger and it appears that rowcount is not updated with the resize all the time. Any ideas? Should I be using something other than rowCount? Thanks, Steven
RE: [flexcoders] Communicating between Flex and Embeded Swf loaded with loadBytes
If the swf is player 8, the code will be stripped so there won't be code to talk to. If the swf is player 9/cs3, then you should actually create a swc and import it as classes. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Giles Roadnight Sent: Friday, April 20, 2007 4:29 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Communicating between Flex and Embeded Swf loaded with loadBytes Hi I have made a custom pre-loader for my Flex app that displays an embedded swf: [ Embed(source=/assets/ui/loader_panels.swf, mimeType=application/octet-stream) ] public var WelcomeScreenGraphic:Class; public function WelcomeScreen() { this.loadBytes( new WelcomeScreenGraphic() as ByteArray ); } This works fine but the swf needs to laod different xml files depending on the localeCode set in the flash vars of the main Flex App. How can I pass this variable into the swf so that it loads the correct xml file? Also is there a way for the flash file to dispatch an event or call a function in the flex app when the animation has finished? Thanks.
Re: [flexcoders] LiveCycle Data Services beta expired?
Kevin, are you sure you replaced the file correclty? I have updated the file and the error was gone. João Fernandes
Re: [flexcoders] Embeding an SWF
Thanks alex, The reason I wanted to do this is because I wanted to able to load two different swf's (that have skins in it) and load one or the other, when I press a button. Is this possible? Alex Harui wrote: embed means embedded at compile time, so no, you can't embed something at runtime. You have to load it useing SWFLoader *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Guillermo Villasana *Sent:* Friday, April 20, 2007 8:39 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Embeding an SWF I know that to embed an swf you can do this: [Embed(source=/assets/myswf.swf)] public var swf_embeded_flex:Class; My question is the following: Is it possible to make /assets/mysqf.swf to be a variable? So I could have: var asset:String=/assets/myswf.swf; [Embed(source={asset})] public var swf_embeded_flex:Class; I know that the previous is incorrect and does not work, but is there a way to make it work? What would be the correct syntax. Thanks Terius
RE: [flexcoders] Problem removing popup window
Time for trace statements to make sure it does get called when there are no break points. I'd even trace out the numChildren of systemManager to see if it changed at all. Could it be that a replacement is being popped up? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Root Sent: Friday, April 20, 2007 10:46 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Problem removing popup window I also tried this within my progressWindow component... public function remove():void { callLater(remove2); } public function remove2():void { PopUpManager.removePopUp(this); } Which also didn't work. I mean, it still works in at all times in debug mode with the breakpoint.. but not without. Frustrating! Rick
[flexcoders] Flash Remoting / Flex / Datagrid
Does anyone know how I should go about detecting that a row has been changed when a grid is editable and then pushing the change to the server? I'm currently searching for some sort of explanation but haven't found anything yet.
[flexcoders] Re: Embeding an SWF
I think you'd need to embed both and call either SWF when it's needed. It's similar to what I had to do to swap SWF assets to get themes to switch in an app. Like this: http://www.scalenine.com/samples/themeSwapper/themeSwap.html Click on the buttons next to Choose a theme. Juan --- In flexcoders@yahoogroups.com, Guillermo Villasana [EMAIL PROTECTED] wrote: Thanks alex, The reason I wanted to do this is because I wanted to able to load two different swf's (that have skins in it) and load one or the other, when I press a button. Is this possible? Alex Harui wrote: embed means embedded at compile time, so no, you can't embed something at runtime. You have to load it useing SWFLoader *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Guillermo Villasana *Sent:* Friday, April 20, 2007 8:39 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Embeding an SWF I know that to embed an swf you can do this: [Embed(source=/assets/myswf.swf)] public var swf_embeded_flex:Class; My question is the following: Is it possible to make /assets/mysqf.swf to be a variable? So I could have: var asset:String=/assets/myswf.swf; [Embed(source={asset})] public var swf_embeded_flex:Class; I know that the previous is incorrect and does not work, but is there a way to make it work? What would be the correct syntax. Thanks Terius
[flexcoders] How to have a SWF load a different SWF
I would like my main swf, load another SWF and pass some parameters, (UserID, etc.). Can someone help me with the syntax for that? thanks bruce
[flexcoders] Re: FDS Scalability
People tend to trust what they know. I've heard alot of J2EE people telling me that CF performs poorly, is insecure and doesn't scale. I personally can't imagine that being the case, because I using Allaire ColdFusion in late 1994 (before Servlets existed) Does anyone know of any good benchmarks performed to test the various CGI platforms?
[flexcoders] Can Cartesian Chart DataTips be set to always be showing once the chart appears?
Hi All, I haven't had any trouble formatting the datatips in a PlotChart using the dataTipFunction but it is a requirement for me to have them showing all the time without mousing over them. The mouseSensitivity can be set to a large number, however, the mouse is still the trigger. Is there any thing like a label such as in the PieChart for Cartesian Charts? Thanks, Bob I.
[flexcoders] After I drag a tree node, how do I delete the old one?
I'm following the code here: http://weblogs.macromedia.com/pent/archives/2006/11/tree_drag_and_d.cfm It just shows u how to manually add drag support to a tree. The code is not complete though. Once you move a tree node it leaves the old copy. I can't seem to figure out how to deal with the old node. I think you have to add something in the dragComplete, but I don't know what. private function onDragComplete( event:DragEvent ) : void { tree.selectedIndex = -1; } help is greatly appreciated.
[flexcoders] Re: How to have a SWF load a different SWF
In the case of the swf being loaded is a Flex2 app, you can use the SWFLoader control. Check out: Flex 2 Developer's Guide Building User Interfaces for Flex Applications Using Controls SWFLoader control If the swf is Flash 8, I believe you use the loadMovie function to load swfs. - Chris --- In flexcoders@yahoogroups.com, boy_trike [EMAIL PROTECTED] wrote: I would like my main swf, load another SWF and pass some parameters, (UserID, etc.). Can someone help me with the syntax for that? thanks bruce
RE: [flexcoders] Re: Embeding an SWF
I'd just load the which ever SWF you want via SWFLoader. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of scalenine Sent: Friday, April 20, 2007 1:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Embeding an SWF I think you'd need to embed both and call either SWF when it's needed. It's similar to what I had to do to swap SWF assets to get themes to switch in an app. Like this: http://www.scalenine.com/samples/themeSwapper/themeSwap.html http://www.scalenine.com/samples/themeSwapper/themeSwap.html Click on the buttons next to Choose a theme. Juan --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Guillermo Villasana [EMAIL PROTECTED] wrote: Thanks alex, The reason I wanted to do this is because I wanted to able to load two different swf's (that have skins in it) and load one or the other, when I press a button. Is this possible? Alex Harui wrote: embed means embedded at compile time, so no, you can't embed something at runtime. You have to load it useing SWFLoader -- *From:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] *On Behalf Of *Guillermo Villasana *Sent:* Friday, April 20, 2007 8:39 AM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* [flexcoders] Embeding an SWF I know that to embed an swf you can do this: [Embed(source=/assets/myswf.swf)] public var swf_embeded_flex:Class; My question is the following: Is it possible to make /assets/mysqf.swf to be a variable? So I could have: var asset:String=/assets/myswf.swf; [Embed(source={asset})] public var swf_embeded_flex:Class; I know that the previous is incorrect and does not work, but is there a way to make it work? What would be the correct syntax. Thanks Terius
RE: [flexcoders] Can Cartesian Chart DataTips be set to always be showing once the chart appears?
A workaround for this, would be to a. override the finddatapoints and return all the items from all chartelements b. then set the showdatatips to false and back to true Everything should show up. -Sunil From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bobignacio Sent: Friday, April 20, 2007 1:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Can Cartesian Chart DataTips be set to always be showing once the chart appears? Hi All, I haven't had any trouble formatting the datatips in a PlotChart using the dataTipFunction but it is a requirement for me to have them showing all the time without mousing over them. The mouseSensitivity can be set to a large number, however, the mouse is still the trigger. Is there any thing like a label such as in the PieChart for Cartesian Charts? Thanks, Bob I.
[flexcoders] IFrame problem
Hey guys, I have often read that some of you are using the IFrame component. I downloaded it and wanted to check it out, but it just doesn't appear. Am I too stupid, or is there anything that has to be configured to get it working?? I use the namespace comp for my components and this is the code: comp:IFrame id=iFrame source=http://www.adobe.com/devnet/flex/; width=500 height=500 visible=true / Thanks, Mane
RE: [flexcoders] LiveCycle Data Services PDF
Hi, for (1), suggest the iFrame approach that many have used for integrating with HTML. for (2), this surprises me and it doesn't sound right. I'll defer to others on that team to answer, but it is late on a Friday and not sure if someone will see this before the weekend (the FDS team is largely on Eastern Daylight Time). -David From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Friday, April 20, 2007 3:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] LiveCycle Data Services PDF I have been looking at the LCDS PDF creation capabilities and I have found that the PDF's created, 1) Cannot be previewed in the flex app, which means that the user has to deal with annoying popups etc... 2) Cannot be viewed in OSX Preview. Unfortunately, in my case, over 50% of my end users are running OS X and thus do not have Reader installed AND furthermore expect to be able to open PDF's in Preview. Does anyone know of a server-side conversion to make the PDF's compatible with Preview. Is this something that we would have to purchase LiveCycle Forms to accomplish? I love the integration of PDF in to Flex DS, I am just hoping that it can go further since right now it seems like there are still significant limitations. Has anyone else run into these problems and found workarounds? - Kevin
Re: [flexcoders] Prana: IoC container for AS3
Hi Brian, I think you are referrin to Christophe and his project Prana, although I'd want to contribute if I can :) 2007/4/20, Brian Lesser [EMAIL PROTECTED]: Thanks Carlos, I'll be interested to see what you come up with. Right now I'm experimenting with the best way to use static methods to handle cross-cutting security concerns within custom components. For example a combo box may only be able to show certain options to a user based on the user's role. The combo starts off with all the options available but must filter them before displaying them. To do that it calls a static method of a RoleFilter class. I'm not sure if that's the best way to go about it though. Here's the script from within a custom combo box as an example: mx:Script ![CDATA[ import com.somecompany.security.RoleFilter; private function init():void{ filterData(); } public function filterData():void{ dataProvider = RoleFilter.filterArrayCollection(unfilteredCollection); } ]] /mx:Script Note: unfilteredCollection is just an ArrayCollection of objects. Now, that's not a lot of code, but what bothers me is that I'd rather my custom combo box not know anything about my RoleFilter class. In fact I'd prefer it not know anything about filters at all. So, even though this works fine, I'm trying to come up with something more elegant. So far having the combo box's container set this up hasn't looked right either. So again, I'm interested to see what you end up with. Yours truly, -Brian Carlos Rovira wrote: I think avoiding repeated code would a great advance if we use an IoC container that allows us only create the different code and inyect the shared functionality. Another great thing is AOP that would be a great thing since many different objects must face equal behaviour and we could do this as as aspect and inyect it by configuration. Maybe the problem is to think about how we must to adapt this kind of functionality to AS3 and Flex and not simply copy from the java/spring world to Flex. But for me is clear that many improvements in the upcoming months could be done with frameworks like Pranaq 2007/4/20, Brian Lesser [EMAIL PROTECTED] blesser%40ryerson.ca: Hi Carlos, et al, I have a question regarding the need for an ioc container for Flex as opposed to a pure AS3 or Flash project. Flex already provides a hierarchy of containers that contain controls and service proxies. The containers are usually responsible for setting the dependencies between controls and proxies. Setting dependencies can be done with databinding, simple assignment, or by setting up listeners. This is a very different situation from what a Java developer faces without an IOC container when writing servlets or JSP pages. In fact in Flex the built in visual state mechanism means we can set up dependencies and tear them down when states are entered and left. So, here's my question: what would an IOC container add that Flex doesn't provide and how would it improve our work or what we could do? Are you primarily thinking about aspects? Yours truly, -Brian Carlos Rovira wrote: Looks very promising :) Great! C. PD:mmm... no body else seems to be interested in this proyect? people know about the benefits of a IoC container? 19 Apr 2007 04:03:30 -0700, Christophe Herreman [EMAIL PROTECTED] com mailto:[EMAIL PROTECTED] lists%40herrodius.comlists%40herrodius.com: Hi Carlos, I don't really have an official roadmap, but here are some of the things I'd like to achieve: - IoC container - IoC utils for frameworks like Cairngorm and ARP - AOP framework - Mock Objects for FlexUnit - Reflection API - general utilities Reading this myself, it looks very optimistic ;-) but the motivation is there so, what the heck. A first version of the Reflection API has just been added to the SVN repo BTW. regards, Christophe -- __ Brian Lesser Assistant Director, Application Development and Integration Computing and Communications Services Ryerson University 350 Victoria St. Toronto, Ontario Phone: (416) 979-5000 ext. 6835 M5B 2K3 Fax: (416) 979-5220 Office: POD?? E-mail: [EMAIL PROTECTED] blesser%40ryerson.cablesser%40ryerson.ca (Enter through LB99) Web: http://www.ryerson.ca/~blesser http://www.ryerson.ca/%7Eblesser http://www.ryerson.ca/%7Eblesser __ -- __ Brian Lesser Assistant Director, Application Development and Integration Computing and Communications Services Ryerson University 350 Victoria St. Toronto, Ontario Phone: (416) 979-5000 ext. 6835 M5B 2K3 Fax: (416) 979-5220 Office: POD B-66-C E-mail: [EMAIL PROTECTED] blesser%40ryerson.ca (Enter through LIB-B99) Web: http://www.ryerson.ca/~blesserhttp://www.ryerson.ca/%7Eblesser __
[flexcoders] Re: Installing Flex On Vista Causes Reboots
Iko, You might try looking at your settings for Windows. There is one checkbox for Reboot on System Error. Make sure that is turned off so that you can at least see the error you are getting. I have seen Windows ship with this set to be true, normally on the dumbed down home editions of their OS's. So make sure that is off and at least it gives you a chance to further debug. Matthew --- In flexcoders@yahoogroups.com, realeyes_jun [EMAIL PROTECTED] wrote: Iko, Sorry you couldn't get the installer to run on Vista, but it did work for me - I was running Windows Vista Business Edition at the time - and others: - http://tech.groups.yahoo.com/group/flexcoders/message/66731 - http://tech.groups.yahoo.com/group/flexcoders/message/65094 -Jun --- In flexcoders@yahoogroups.com, iko_knyphausen iko@ wrote: I don't think the installer works on Vista. I installed on XP and then copied the installation directory over to my Vista machine. I think you will also have to install the the player and debug version of the player manually, by visiting the Adobe web site. Iko --- In flexcoders@yahoogroups.com, realeyes_jun jun@ wrote: John, Many developers are running Vista with Flex Builder - Including myself until I downgraded back to XP - so I don't think you encountering an issue with the Flex Builder setup program... sounds to me more like an issue with hardware. (Like the machine is having BSOD) I would double-check to make sure you have the most appropriate and up to date vid card drivers, bios firmware, vista patches. Also, running RAM diagnostics (I think there's a memory tester built into Vista) or disk check (cmdline chkdsk and/or vendor provided disk check tools) wouldn't hurt either. You might also want to check your Vista system/application logs to make sure you're not getting any errors when you run the installer. Also, if you bought Flex Builder, I would think that Adobe has 30 days support or something? Just in case it turns out to be the setup program which I think is not the case. -Jun --- In flexcoders@yahoogroups.com, j_lentzz jlentz@ wrote: Hi, I've got a new machine that I just installed a full copy of Vista Ultimate onto. I'm trying to install the latest Flex, but right after it finishes extracting the files, the machine reboots. I've tried setting the installation program to XP SP2 compatibility and checked run as administrator, but it still reboots the machine right after the files have been extracted. I've got Vista on my C drive and I'm installing (at least trying to) Flex onto my F drive. Does anyone have any ideas? One option I could do is to install XP first load Flex and then install Vista over it, but I'm not sure if that would help any. Any ideas would be great. Thanks, John
[flexcoders] Re: FDS Scalability
My bad, Ben. I guess I over-interpreted your comments in your March 9th blog when you were responding to Rick Root: http://www.forta.com/blog/index.cfm/2007/3/9/Planned-Scorpio-FDS- Enhancements You were talking about how much better Scorpio performance will be and downplaying current poor CF-FDS performance. I guess I thought you were conceding that there is some performance issues with CF 7.0.2 and FDS. I know you can't talk too much about it...but how will performance be improved with Scorpio? Boybles --- In flexcoders@yahoogroups.com, Ben Forta [EMAIL PROTECTED] wrote: Actually, I've neither admitted not hinted this, and have no reason to believe that that is the case. ColdFusion deployed on Java can, and should, scale as well as the underlying Java server. --- Ben From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of boybles Sent: Thursday, April 19, 2007 10:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS Scalability How is the scalability with FDS with CF (and do you have to enable sticky clustering)? I also heard that FDS+CF is much slower than FDS+Java especially when traffic gets heavy. Ben Forta didn't admit it outright...but hinted at it. Have you experienced this kind of thing?
[flexcoders] Re: IFrame problem
Mane, (blog entry) http://www.deitte.com/archives/2006/05/update_to_embed.htm A cpl things that need to be done assuming you already have the IFrame.mxml file and its namespace setup: 1) In the html-template folder in your project open index.template.html add this code to line 27 replacing the current script code: script language=JavaScript type=text/javascript !-- function moveIFrame(x,y,w,h) { var frameRef=document.getElementById(myFrame); frameRef.style.left=x; frameRef.style.top=y; frameRef.width=w; frameRef.height=h; } function hideIFrame(){ document.getElementById(myFrame).style.visibility=hidden; } function showIFrame(){ document.getElementById(myFrame).style.visibility=visible; } function loadIFrame(url){ top.frames[myFrame].location.href=url; } // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); // Version check based upon the values defined in globals var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); // Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback if ( hasProductInstall !hasRequestedVersion ) { // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed // DO NOT MODIFY THE FOLLOWING FOUR LINES // Location visited after installation is complete if installation is required var MMPlayerType = (isIE == true) ? ActiveX : PlugIn; var MMredirectURL = window.location; document.title = document.title.slice(0, 47) + - Flash Player Installation; var MMdoctitle = document.title; AC_FL_RunContent( src, playerProductInstall, FlashVars, MMredirectURL=+MMredirectURL+'MMplayerType='+M MPlayerType+'MMdoctitle='+MMdoctitle+, width, ${width}, height, ${height}, align, middle, id, ${application}, quality, high, bgcolor, ${bgcolor}, name, ${application}, wmode,opaque, allowScriptAccess,sameDomain, type, application/x-shockwave-flash, pluginspage, http://www.adobe.com/go/getflashplayer; ); } else if (hasRequestedVersion) { // if we've detected an acceptable version // embed the Flash Content SWF when all tests are passed AC_FL_RunContent( src, ${swf}, width, ${width}, height, ${height}, align, middle, id, ${application}, quality, high, bgcolor, ${bgcolor}, name, ${application}, wmode,opaque, flashvars,'historyUrl=history.htm% 3Flconid=' + lc_id + '', allowScriptAccess,sameDomain, type, application/x-shockwave-flash, pluginspage, http://www.adobe.com/go/getflashplayer; ); } else { // flash is too old or we can't detect the plugin var alternateContent = 'Alternate HTML content should be placed here. ' + 'This content requires the Adobe Flash Player. ' + 'a href=http://www.adobe.com/go/getflash/Get Flash/a'; document.write(alternateContent); // insert non-flash content } // -- /script This lets flex and javascript communicate. That should do it.
[flexcoders] Re: Installing Flex On Vista Causes Reboots
Hi Matthew, I am not the one that has the issues. I just shared my experience of installing on Vista by copying an XP installation over manually. The installer did not run at the time - quite possibly because I did not run it as Administrator - or maybe some other issue. It was prior to 2.01 The reboot issues are with John Lentz's install, who posted the original ... Cheers --- In flexcoders@yahoogroups.com, Matthew OMeara [EMAIL PROTECTED] wrote: Iko, You might try looking at your settings for Windows. There is one checkbox for Reboot on System Error. Make sure that is turned off so that you can at least see the error you are getting. I have seen Windows ship with this set to be true, normally on the dumbed down home editions of their OS's. So make sure that is off and at least it gives you a chance to further debug. Matthew --- In flexcoders@yahoogroups.com, realeyes_jun jun@ wrote: Iko, Sorry you couldn't get the installer to run on Vista, but it did work for me - I was running Windows Vista Business Edition at the time - and others: - http://tech.groups.yahoo.com/group/flexcoders/message/66731 - http://tech.groups.yahoo.com/group/flexcoders/message/65094 -Jun --- In flexcoders@yahoogroups.com, iko_knyphausen iko@ wrote: I don't think the installer works on Vista. I installed on XP and then copied the installation directory over to my Vista machine. I think you will also have to install the the player and debug version of the player manually, by visiting the Adobe web site. Iko --- In flexcoders@yahoogroups.com, realeyes_jun jun@ wrote: John, Many developers are running Vista with Flex Builder - Including myself until I downgraded back to XP - so I don't think you encountering an issue with the Flex Builder setup program... sounds to me more like an issue with hardware. (Like the machine is having BSOD) I would double-check to make sure you have the most appropriate and up to date vid card drivers, bios firmware, vista patches. Also, running RAM diagnostics (I think there's a memory tester built into Vista) or disk check (cmdline chkdsk and/or vendor provided disk check tools) wouldn't hurt either. You might also want to check your Vista system/application logs to make sure you're not getting any errors when you run the installer. Also, if you bought Flex Builder, I would think that Adobe has 30 days support or something? Just in case it turns out to be the setup program which I think is not the case. -Jun --- In flexcoders@yahoogroups.com, j_lentzz jlentz@ wrote: Hi, I've got a new machine that I just installed a full copy of Vista Ultimate onto. I'm trying to install the latest Flex, but right after it finishes extracting the files, the machine reboots. I've tried setting the installation program to XP SP2 compatibility and checked run as administrator, but it still reboots the machine right after the files have been extracted. I've got Vista on my C drive and I'm installing (at least trying to) Flex onto my F drive. Does anyone have any ideas? One option I could do is to install XP first load Flex and then install Vista over it, but I'm not sure if that would help any. Any ideas would be great. Thanks, John
Re: [flexcoders] Root sprite not responding to MouseEvent ?
The problem is that the Bitmap class is not an InteractiveObject, so it can't receive mouse or keyboard events. And the parent Sprite (the root of your application) doesn't receive mouse events because it doesn't have anything drawn into its hit area (child objects, like the bitmap, don't count). The easiest solution if you want to guarantee that your root sprite catches everything is to simply fill its graphics with a rectangle with zero alpha. You won't see anything, but all the pixels of the hit area will be set. Troy. On 4/19/07, Alex Harui [EMAIL PROTECTED] wrote: Then I would have some fullscreen child of the mainclass so the mouse has something to hit. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Ronnie Liew *Sent:* Thursday, April 19, 2007 12:46 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Root sprite not responding to MouseEvent ? Hi Alex, I am not creating a Flex Project, I am creating an Actionscript Project. Not too sure but in this case, I don't think the SystemManager is in the picture. Is that correct? On 4/20/07, Alex Harui [EMAIL PROTECTED] aharui%40adobe.com wrote: In a Flex app, the swf file's main class is SystemManager. It has some children one of which is the Application. If you click anywhere on the background of the application you should get mouseDown events. I do in my tests, and the target is the application because it totally covers the SystemManager. Are you in a different topology or seeing something else? Set a breakpoint on SystemManager.as:mouseDownHandler. -Alex From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Ronnie Liew Sent: Thursday, April 19, 2007 12:15 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Root sprite not responding to MouseEvent ? After some research and googling, the conclusion that I can draw is that for mouse event, it is abit unusual. Apparently, the main application class (which by default extends from a Sprite class), will not receive mouse events directly. Mouse events seemed to be the only exception, all other events like the keyboard events, enterframe work fine. In order for the main application class to receive mouse event, it must be through a child (capable of dispatching a mouse event) in the its display list via bubbling or capture phase. According to Colin Moock, Mouse interactions with vector content drawn via the graphics property of a .swf file's main class do not trigger mouse events. However, mouse interactions with vector content drawn via the graphics property of any other instance of InteractiveObject or its subclasses do trigger mouse events. So I guess, using the bitmap object probably fall under mouse interactions with vector content drawn via the graphics property? On 4/19/07, Ronnie Liew [EMAIL PROTECTED]ronnieliew%40gmail.com wrote: the main app is a sprite, it should respond to mouse move right? and it does have a child and that is the visible pixel. How come it doesn't trace out? Did you forget to add your Sprite to the Stage? e
[flexcoders] How to prevent Flex Apps from always loading from server. They never get cached
Hi All, How can one direct Flex to load from Cache and not from the server if both files are the same. Seems like Flex Apps always load from server even if both local cached swf and server swf are the same. As always, Thank you for all the help and support. Regards, Sean - http://www.HeliHobby.com P.S. You can read my solution for Flex Component communication here: http://www.helihobby.com/html/alon_desingpattern.html
[flexcoders] Flash 9 Stage size - 2880 x 2880 limitation
Does anyone know offhand if Flash 9 still has the 2880 x 2880 stage size limitation? I know that the bitmap related classes still have that limitation. Thanks! -Daniel
Re: [flexcoders] Flash 9 Stage size - 2880 x 2880 limitation
Still have the same size limitation. Who need's more? if fullscreen it's enabled to fp9? the file FP9 IDE limitation i'ts for work only . On 4/20/07, Daniel Wabyick [EMAIL PROTECTED] wrote: Does anyone know offhand if Flash 9 still has the 2880 x 2880 stage size limitation? I know that the bitmap related classes still have that limitation. Thanks! -Daniel -- Igor Costa www.igorcosta.org www.igorcosta.com skype: igorpcosta
Re: [flexcoders] Flash 9 Stage size - 2880 x 2880 limitation
I have a friend creating a huge wall-display project with a screen resolution of around 3600 x 3600 pixels. So, he should be able to create an app that's 1800x1800, and then simply go fullscreen which will scale Flash to the needed res (what you were saying). Igor Costa wrote: Still have the same size limitation. Who need's more? if fullscreen it's enabled to fp9? the file FP9 IDE limitation i'ts for work only . On 4/20/07, * Daniel Wabyick* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Does anyone know offhand if Flash 9 still has the 2880 x 2880 stage size limitation? I know that the bitmap related classes still have that limitation. Thanks! -Daniel -- Igor Costa www.igorcosta.org http://www.igorcosta.org www.igorcosta.com http://www.igorcosta.com skype: igorpcosta
Re: [flexcoders] Issues with Flash Gateway
The gateway url requires an ending forward slash http://myserver/flex2gateway/ As for projects that need CF, I deploy them to the test server (which is on another machine as well). I have a mapped drive (P:\) that maps to the CF Root on the other machine. So when setting up a new project I point to a folder on the mapped drive as output folder and specify the output url Output folder: P:\MyProject\ Output folder URL: http:\\mysever:8300\MyProject\ Whenever I Run or Debug an application, it gets deployed to P:\MyProject and opens the browser with http://myserver:8300/MyProject/name_of_app_mxml.html regards, Muzak - Original Message - From: b_clingan [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, April 20, 2007 1:09 PM Subject: [flexcoders] Issues with Flash Gateway I'm developing and building on my local machine, but the ColdFusion server is on another machine in the network. What is the best practice for working this way as far as setting up my project so I can access CFCs to get data? I'm also having problems with the flex2gateway, when I access the url through a browser ie: http://myserver/flex2gateway I get a 500 null error instead of a blank page. I'm thinking I need to adjust my services-config.xml or maybe add a cross-domain.xml file, but at this point I don't even think my gatway is working.. Any help would be appreciated! --Bob
[flexcoders] Reload (reinitialize) application
What is best way to reload / reinitialize the whole flex application from code? I want to be able to reset state of my application on timeout event, it seems that the easiest way is to somehow recreate the whole app or at least main view. Something like: Application.application = new MyApplication() but obviously Application.application is read only property. How else it can be done? Thanks, rd
Re: [flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?
For the record, I was very vocal about Flash's potential all those years ago as well (In 2004, I made this post http://www.mossyblog.com/archives/276.cfm). I'm not trying to stir the politics, but i even look at the CS3 sku's and ponder what the hell is going on? (keep it simple). Flash has always been one of these pieces that I thought had so much more potential than what it has today, I mean you're right FLEX 1.0 was not only ahead of the game - but - pre-AJAX movement, so there was enormous potential here and it's why since i'm in an openly honest mood I hate the very though LiveCycle + FLEX are living side by side another as I get that feeling again Here we go, different name, numbers stay about the same. (Yes I know I'm now being negative and being a Microsoft employee it's now sounding like FUD, but in 2004 I had these feelings and I was right, 2007 they are back, difference is i have MS Logo on my back). I love FLEX, just hate the distractions around it. On 4/20/07, mvbaffa [EMAIL PROTECTED] wrote: Adobe constructed a great product. The conception and architecture are excelent, but the comercial strategy is not so good. Macromedia had something like 4 years ahead of Microsoft, since Flex 1.5, that was a very good product too. Macromedia insisted to to seel it for US$18 k, nobody bought it Microsoft at that time did not exist in RIA Market. Then Adobe came and Flex became more accessible. But Adobe charges FDS in US$ 20K and does not pay attention to .NET developers. Well it seems to me that this is another big mistake. if Adobe continues with this kind of comercial strategy, i am afraid that our beloved Flex will loose the race. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Scott Barnes [EMAIL PROTECTED] wrote: On 4/20/07, Michael Schmalle [EMAIL PROTECTED] wrote: I have to put my 2 cents down for prosperity sake. 4 which is important :) All you people that live in cities and constantly sicken yourselves by your own pollution, need to live on a mountain for a couple years, look back at what you say and see how hilarious it all is. I live near a desert? does that' coun't for isolation and freedom of thoughts? (Sorry in Australia, our mountains are hard to come by at times). How many times can the battle of north and south be fought and... won? :) Until East West figure out it's time to join in, and then we go on Springer... i got dibs on the chair throwing... Listening to people engrossed in the politics of banter on the internet is much more funny than turning on the TV these days. They still have TV? you mean YouTube + TV can co-exist? next thing you'll say Silverlight and Flash can co-exist.. pft crazy talk. Scott, your just a person that likes getting people talking regardless of the side your on. Your good at it to. Oh stop, you say that to all the Evangelists.. now you're making me blush *blush in ascii art*. As far as Microsoft's world domination, I doubt it. No one ever 'wins' forever. I think most of the resistance you feel around your posts is exactly what Dave Wolf said... now theres options, people want choice. I guess that is what the market and developers 'against' Microsoft have been saying forever... WE WANT CHOICE! Watch what you wish for, you just may get it... I think that is what being human is all about. Peace, Mike If I didn't have leg cramps right about now, i'd stand and applaud you :) (Seriously - Politics is bound to happen when you have to large corporations saying to all of you - try my stuff, no try mine, nooo try mine... and so on.. Adobe Microsoft compete on a number of levels while at the same time - this will freak the kids out in the front row - without Microsoft, Adobe couldn't of gotten to where it is today. Without Microsoft Flash's penetration numbers wouldn't be where they are/were today (but its ok, no thanks required for the Updates / Default installs we put on the box when we ship etc). I should also mention sites like Honda, MySpace, YouTube and Movie Sites etc were also strong drivers in this space more so then us. Yet if i say this outloud then we could sober up a bit and no1 likes a buzz killer ;) Point: Lighten up folks, it's just technology - or should I say Silverlight, Light up the web! :) -- Regards, Scott Barnes Developer Evangelist Microsoft - whom wrote this with GMAIL.. shhh, don't tell HQ or they'll dock my pay ...as Hotmail and GMAIl cannot co-exist at all! it's in the rules alongside Silverlight and Flash :) -- Regards, Scott Barnes http://www.mossyblog.com
Re: [flexcoders] Flash 9 Stage size - 2880 x 2880 limitation
Daniel Wabyick wrote: I have a friend creating a huge wall-display project with a screen resolution of around 3600 x 3600 pixels. So, he should be able to create an app that's 1800x1800, and then simply go fullscreen which will scale Flash to the needed res (what you were saying). Afaik, the max stage size in Flash Player 9 is -8192 - +8192 (ish). Afaik, the max bitmap size is 2880x2880. Cheers, Claus. -- claus wahlers côdeazur brasil http://codeazur.com.br/ http://wahlers.com.br/claus/blog/
Re: [flexcoders] Flash 9 Stage size - 2880 x 2880 limitation
Afaik, the max stage size in Flash Player 9 is -8192 - +8192 (ish). Afaik, the max bitmap size is 2880x2880. And, just tested: The max visible stage size in the IDE is -3500 - +3500 (ish). You can enter X/Y values from -5760 - +5760 in the Info Panel. Cheers, Claus. -- claus wahlers côdeazur brasil http://codeazur.com.br/ http://wahlers.com.br/claus/blog/
[flexcoders] Is there any event fired after sorting the datagrid ?
Hi All, Is there any event fired after sorting the datagrid. I mean if I click the datagrid header then DataGridEvent.HEADER_RELEASE event is fired and rows get sorted, now i want an event to be fired when the sorting is done. I tried CollectionEvent.COLLECTION_CHANGE but didn't worked. Thanks Arpan __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com