Losing data bindings after seemingly unrelated event.
Hi All, We're developing an application that permits selection of page objects for editing from multiple views. We're trying to data-bind each of the views to a shared selection object to reduce the connections between components. This is working fine so long as you don't interact with other parts of the application. We also have a section list that filters the list of pages visible to the user. It appears that changing the section causes the views to lose their bindings to the selection object. This is confusing because, section selection only operates on another 'pages' array. I don't understand why it would affect the data bindings at all, especially since the bindings are to an unrelated object. I've attached a stripped down version of the application that exhibits the same behavior. To see what I'm talking about: 1. Click on the page labels on the right side of the app. The word 'selected' should appear next to the page you clicked last. 2. Click on 'First' or 'Second' on the combo box to the left. 3. Click on the page labels again to the right. They no longer change. The text for a page label is { page.label }{ selected(selection.list) ? ' (selected)' : '' }. Changes to selection.list automatically update this data binding expression (at least until you change the selection). I would greatly appreciate any insight that anyone can provide. Also, I would love to find an in-depth reference describing how data binding works in Flex/Flash. Thanks, Alex Cruikshank Engineer Carbon Five testBindingProblem.mxml Description: Binary data TestView.mxml Description: Binary data
RE: [flexcoders] Cairngorm Commands finish loading: initialize Vs . creationComplete
creationComplete is when the componentis fully created. Initialize is a little earlier in the cycle (componentcreated by not really measured and laid out). When in doubt I say use creationComplete. Often it doesnt matter, but since creationComplete comes later you can feel more confident that everything you might rely on exists. Matt From: Robert Moss [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 2:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm Commands finish loading: initialize Vs. creationComplete I had the same question. I substituted creationComplete for initialize and everything seemed to work just fine. Can anyone give pros and cons to when you should use creationComplete versus initialize? I noticed that you use creationComplete when working with central applications. I read the ASdocs for mx.core UIObject but it doesn't give when to use one or the otherand I guess I'm not smart enough or experienced enough to extrapolate. Thanks, Robert [EMAIL PROTECTED] 02/04 4:58 PM Has anyone else seemed to have a need for the Cairngorm framework to fire an event when the commands are finishedbeing added to the FrontController? My issue is that the EventBroadcaster cannot broadcast an event if it has not been added yet. So if I use the initialize event in my main mxml file to call a function that broadcastsan event it will not work because it may not have been added yet. At this time I have added _root.commandsHaveBeenRegistered(); at the end of my Control.as file after the commandshave been added. It kind of acts like the onLoad event in the body tag in HTML. Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Losing data bindings after seemingly unrelated e vent.
I spent too much time playing around with this and cant figure out whats going wrong. If you debug further youll see that the original contents of the project.pages array are getting corrupted (the elements are getting deleted or something). I tried removing certain bindings and didnt really see much in the way of improvement. You can see everything go haywire without even selectinga page, just select First, then Second, then First again and youll see the TestViews disappear (if you put a backgroundcolor on the views youll see its really the label being set to empty string, not the thing disappearing). The selection then has even more problems for reasons that I couldnt decipher. See if you can eliminate data binding from the equation entirely. Just have everything set using event handlers and getter/setters, eliminate the curly braces. There may be something about all the bindings and relationships that is getting it confused at runtime, but I couldnt figure it out at all. The binding mechanism itself is a little much for me to try to explain right now J But we use a different mechanism in Flex than was written for Flash. You can see a little more of how it all gets set up if you look at the generated-as files (see keep-generated-as in flex-config) but I warn you that you may be seeing a little too much sausage being made J Matt From: Alex Cruikshank [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 5:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Losingdata bindings after seemingly unrelated event. Hi All, We're developing an application that permits selection of page objects for editing from multiple views. We're trying to data-bind each of the views to a shared selection object to reduce the connections between components. This is working fine so long as you don't interact with other parts of the application. We also have a section list that filters the list of pages visible to the user. It appears that changing the section causes the views to lose their bindings to the selection object. This is confusing because, section selection only operates on another 'pages' array. I don't understand why it would affect the data bindings at all, especially since the bindings are to an unrelated object. I've attached a stripped down version of the application that exhibits the same behavior. To see what I'm talking about: 1. Click on the page labels on the right side of the app. The word 'selected' should appear next to the page you clicked last. 2. Click on 'First' or 'Second' on thecombo box to the left. 3. Click on the page labels again to the right. They no longer change. The text for a page label is { page.label }{ selected(selection.list) ? ' (selected)' : '' }. Changes to selection.list automatically update this data binding _expression_ (at least until you change the selection). I would greatly appreciate any insight that anyone can provide. Also, I would love to find an in-depth reference describing how data binding works in Flex/Flash. Thanks, Alex Cruikshank Engineer Carbon Five
ViewStack resizing
I just noticed that ViewStack has an undocumented property: resizeToContent to force ViewStack containers to resize when you navigate to a different child container, set the resizeToContent property to true. This is mentioned on the Developing Flex Applications but it is not documented on the Flex ActionScript and MXML API Reference. And the best part is... it works :) I think this should be added to the Flex ActionScript and MXML API Reference? -- Mika
Re: [flexcoders] createChild
Robert Brueckmann wrote: I implemented the creationPolicy=auto and my tab navigator is still creating all of the children at load time. Like I said, I have an empty Tab navigator in the MXML code itselfwhen the user logs in, I trigger a [snip] If you're creating children dynamically, then that won't work. So let's stick with your approach and go back to your original problem: you have a TabNavigator to which you're adding tabs dynamically, and you say the tabs are not expanding to 100%. Can you show us a simplified version of this code (with the problem showing)? Something I can run and test locally? Manish
Re: [flexcoders] Installing Flex under a full Jrun
Content-type: text/plain; format=flowed Content-Disposition: inline hello, we have done the same thing but for the sample.war and path is http://localhost:8100/ but in samples session code is not working . what will be the problem. Asking for whitelist error path http://localhost:8100/explorer/misc/ServerSessionDemo.mxml Sagar
Re: [flexcoders] DataGridColumn sortCompareFunction arguments dua l personality
Thanks Matt, had grabbed wrong end of the stick on that one. Much closer now. Noticed that the compare callback for sortItems doesn't get the third array flags argument mentioned in the docs - I was going to see if that would specify ascending or descending order, worked around by having separate sort functions for each direction. I'm trying to track the sort column and ascending/descending as instance properties in my view - this almost works but under some conditions the arrows in the header get out of sync with my asc/desc property. Is there a way to dig into the header_mc property of the datagrid and force the up/down arrow to display one way or the other? Thanks, Robin /02/2005, at 5:27 PM, Matt Chotin wrote: x-tad-biggerYep, looks like we only pass you the values, not the object for the rows themselves. Guess youll need to set sortOnHeaderRelease to false and instead call sortItems yourself with a custom compareFunc./x-tad-bigger x-tad-bigger /x-tad-bigger x-tad-biggerMatt/x-tad-bigger
Re: popup
right, but how can I call a webservices in a popup?. Or I need to do another flex and aspx files for it? --- In flexcoders@yahoogroups.com, Tarik Ahmed [EMAIL PROTECTED] wrote: Yup, you can have pop-ups creating pop-ups. And call webservices or remote objects. From: Miguel D�az Valenzuela [EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: popup I don´t know if i´m bad, but I can understand that popup is a child object of a mxml main page. In this case, Can I do a Webservice in this popup, or for this case I need to do other form? --- In flexcoders@yahoogroups.com, Matt Horn wrote: Miguel, you use the PopUpManager to create TitleWindow containers. This is documented in the Using Layout Containers chapter of the Developing Flex Applications book. hth, matt h _ From: Miguel D�az Valenzuela [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 3:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] popup hi flexcoders How can i do a Popup in Flex?. nothing more to say, thanks in advance Yahoo! Groups Sponsor ADVERTISEMENT oups/S=1705007207:HM/EXP=1108497873/A=2532114/R=2/SIG=12ko99l5v/*http://clk. atdmt.com/NFX/go/yhxxxnfx002014nfx/direct/01/time=1108411473489180 :HM/A=2532114/rand=238584719 _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service . Yahoo! Groups Links
RE: [flexcoders] Re: popup
Miguel, right, but how can I call a webservices in a popup?. Or I need to do another flex and aspx files for it? If you pick up the documentation, or perhaps the free PDF download of the chapter at http://flexbook.iterationtwo.com/ we cover a lot of material including how to make service calls, whether they are webservices, remoteobject, etc. You're asking pretty general questions, which are probably covered in more depth in the documentation than any one person will be able to answer right now. Why not: 1. Create a simple app that calls your webservice correctly 2. Add a popup to that simple app 3. Invoke the webservice from the popup instead of the main app - perhaps on a button press in the first instance ? I'd build up gently to what you're trying to doif anything isn't working as advertised in the documentation or books, then I'm sure people will jump in with help at that point. Once you have a simple app successfully calling your webservice, and you have that app popping up a window, perhaps post your MXML at that point and someone will be able to point out the mistakes. Good luck ! Steven -- Steven Webster Technical Director iteration::two This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened.
Re: popup
great, will check it out, thanks Steven --- In flexcoders@yahoogroups.com, Steven Webster [EMAIL PROTECTED] wrote: Miguel, right, but how can I call a webservices in a popup?. Or I need to do another flex and aspx files for it? If you pick up the documentation, or perhaps the free PDF download of the chapter at http://flexbook.iterationtwo.com/ we cover a lot of material including how to make service calls, whether they are webservices, remoteobject, etc. You're asking pretty general questions, which are probably covered in more depth in the documentation than any one person will be able to answer right now. Why not: 1.Create a simple app that calls your webservice correctly 2.Add a popup to that simple app 3.Invoke the webservice from the popup instead of the main app - perhaps on a button press in the first instance ? I'd build up gently to what you're trying to doif anything isn't working as advertised in the documentation or books, then I'm sure people will jump in with help at that point. Once you have a simple app successfully calling your webservice, and you have that app popping up a window, perhaps post your MXML at that point and someone will be able to point out the mistakes. Good luck ! Steven -- Steven Webster Technical Director iteration::two This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened.
RE: [flexcoders] Installing Flex under a full Jrun
Hi Sagar,If you install samples at http://localhost:8100/samples/, you won't get an error because, by default Samples/WEB-INF/flex/flex-config.xml comeswith pre-defined whitelist.If you open "WEB-INF/flex/flex-config.xml" and lookfor followingxml node: remote-objects !-- all locations may be specified as a URL relative to the web server document root, or a complete http URL; to specify relative to the context root, please include {context.root} NOTE: do not use a leading slash with {context.root} -- !-- The location of the AMF Gateway. The value below is used when calling a page over http or when protocol is specified as http -- amf-gateway{context.root}/amfgateway/amf-gateway !-- The location of the AMF Gateway to use when calling a page over https or when protocol is specified as https -- amf-https-gateway{context.root}/amfgateway/amf-https-gateway !-- use proxy specified via flashvars or query parameter ?remoteURL=XXX -- allow-url-overridefalse/allow-url-override !-- a list of urls accessible via this remote objects proxy -- whitelist !-- whitelist config for unnamed objects -- unnamed sourcesamples.*/source sourcesamples/source !-- Uncomment the source element below to enable access to all classes during development. We strongly recommend not allowing access to all source files in production, since this exposes Java and Flex system classes. source*/source -- /unnamed !-- whitelist config for named objects -- named object name="SampleEmployeeRO" sourcesamples.explorer.EmployeeManager/source typestateful-class/type allow-unnamed-accesstrue/allow-unnamed-access /object /named /whitelist /remote-objects See the highlighted section, it needs to be changed to accoringly if you want to access the service. You can also read the comments below those red lines, which says, if you do source*/source, you would be able to access all the classesWhich is indeed not a recommended for production environment. So you can now change sourcesamples.*/source to source*/source, to make your application work. Please look at the Flex docs for more: http://livedocs.macromedia.com/flex/15/flex_docs_en/0786.htm. Please go through the documentation for guidelines and best practices to avoid any mistake or problems at later times. Hope that helps, -abdul -Original Message-From: Ketan R Bengali [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 15, 2005 2:53 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Installing Flex under a full JrunContent-type: text/plain; format=flowedContent-Disposition: inlinehello,we have done the same thing but for the sample.war and path is http://localhost:8100/but in samples session code is not working .what will be the problem.Asking for whitelist errorpathhttp://localhost:8100/explorer/misc/ServerSessionDemo.mxmlSagar
Re: Wrap Header in DataGrid Using Action Script
Richard, I experimented with different ways, and this works for me: mx:DataGridColumn headerText=Base{newline}Price ($) columnName=base width=65 / Andrew --- In flexcoders@yahoogroups.com, richardm1400 [EMAIL PROTECTED] wrote: Hi All, Hopefully someone can help as there seems to be a lot of really smart FLEX coder out there. I want to be able to dynamically create DataGrid headers that will wrap, but I can not figure out the correct syntax. I tried to search the archived messages, but did not find a solution. If I missed it just point me to the message. Here is a simple code sample. Any suggestions? Thanks, Richard ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Panel mx:Script ![CDATA[ function getHeaders(){ var myVal:String = Line 1; var myVal2:String = Line 2; dg.headerCells[0].value = myVal +\n + myVal2; //Does not wrap dg.columns[1].headerText = myVal + newline + myVal; // Does not wrap } ]] /mx:Script mx:DataGrid id=dg headerHeight=30 creationComplete=getHeaders (); mx:columns mx:Array mx:DataGridColumn columnName=col1 / mx:DataGridColumn columnName=col2 / mx:DataGridColumn headerText=Start{newline}end columnName=col2 / /mx:Array /mx:columns /mx:DataGrid /mx:Panel /mx:Application
Flex opensource library... anyone??
hi all, I believe that parallel to the cairngorm initiative there should be someone organizing a component library (org.flexcoders.* ?). I have seen a lot of good ideas and code on this list... enhanced components, utility classes, etc. We should take advantage of timing... The all time utopia of a centralized community effort is much more feasible at this early stage. I wonder if there is anyone already walking this road and I have missed it. If not, maybe someone should create a blog to capture feedback, propose components, recieve contributions, dictate guidelines, delegate development.. etc. Perhaps a sourceforge project... I would really like to hear ideas on this matter. a little wishlist... Components: portlet-like panels.. resize, edit, move, etc... ( like coenraet's ) resizable title windows click and hold context menus Classes: - Decorators ( mix-ins ) for basic classes - - Array: shuffle(), random(), contains( val ), unique(), insertAt( index ), etc... - - String: replace( search, replacement [, flags...] ) , - - Math: randomRange( min, max ) - - UIComponent ( doubleClick event ) etc Validators: - localized currency, localized SSNs or similar, etc... Animation, tweens - penner? any contributions more than welcome cheers, -- : Aldo Bucchi : mobile (56) 8 429 8300
RE: [flexcoders] DataGridColumn sortCompareFunction arguments dua l personality
Dig into DataGrid and look for sortDirection, sortIndex (I think) and placeSortArrow. The latter being the only one thats documented. sortDirection may also help with your ascending/descending issue. Matt From: Robin Hilliard [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 3:30 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] DataGridColumn sortCompareFunction arguments dua l personality Thanks Matt, had grabbed wrong end of the stick on that one. Much closer now. Noticed that the compare callback for sortItems doesn't get the third array flags argument mentioned in the docs - I was going to see if that would specify ascending or descending order, worked around by having separate sort functions for each direction. I'm trying to track the sort column and ascending/descending as instance properties in my view - this almost works but under some conditions the arrows in the header get out of sync with my asc/desc property. Is there a way to dig into the header_mc property of the datagrid and force the up/down arrow to display one way or the other? Thanks, Robin /02/2005, at 5:27 PM, Matt Chotin wrote: Yep, looks like we only pass you the values, not the object for the rows themselves. Guess youll need to set sortOnHeaderRelease to false and instead call sortItems yourself with a custom compareFunc. Matt
Re: [flexcoders] Anyone used Flash Remoting for .NET and Flex 1.5?
Yes Dirk, I just recently did some very simple Flash Remoting calls to .NET. (for example, getting a listing of images in a directory). Very simple, worked like a charm. (using MM Flash Remoting) Steve Dirk Eismann wrote: Out of interest: has anyone successfully used Flex 1.5 RemoteObject against .NET - either with the MM Flash Remoting product or something similar (like FlashORB)? What was your experience? Did it work? Thanks, Dirk. Yahoo! Groups Links
RE: [flexcoders] hiding/showing datagrid items
That looks like it would make a really cool custom component, synchronizing a tree on the left with a grid on the right. It will be hard in just a datagrid because I don't think the cells can be different widths on different lines. Your indentations couldn't overlap. Tracy -Original Message- From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 9:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] hiding/showing datagrid items I'm trying to find the best way to approach a datagrid display issue. What's the best way to show and hide different portions of a datagrid that displays hierarchical arrangements? The effect of the display is to show and hide different parts of a hierarchy - a tree with rows attached, for lack of a better way of saying it. Let's say the display is something like this: Category 1 Item 1 Item 2 -- Item n Category 2 Subcategory 1 Item 1 Item 2 .. Item n Subcategory 2 Item 1 Item 2 .. Item n Category 3 Item 1 Item 2 .. Item n .. Category n What's the best way to approach showing and hiding the category and subcategory names and the items within them? Should I tie a datagrid to a tree - or can all this be accomplished within a datagrid? Or is there another approach? - Tom Yahoo! Groups Links
RE: [flexcoders] Flex and Persistence -- namlely XML file persistence?
You are going to have to have some middle tier on the server to persist your data. (umm, local shared objects maybe, but, naw.) A very simple testing tier might consist of a JSP page that reads and writes to a text file. Use HTTPService to communicate with it. Reading it into flex and parsing the string into a dom is easy. I am not sure if you can toString() an xml dom in Flex and get out the string. I manually generate my strings (concatenate). Let me know if a sample file access JSP would be helpful. Tracy -Original Message- From: stealthbaz [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 9:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex and Persistence -- namlely XML file persistence? Hi all. Im new to the flex world, and I'm still trying to get my arms around the whole picture. I think that i have the rudimentaray stuff under wraps, but I have some questions about persistence. I have been through Chris Coenraet's restaurant tutorial (never knew how badly i spelled restaruant till then!) at http://coenraets.com/tutorials/restaurant/index.jsp And in that he demonstrated 3 different ways to approach data services (HTTP services, Remote Objects, and Web Services), but in alot of the other training materials, its common to work from an XMl file to load in the data model. I see lots of way to alter the data structure in memory, but as a poor man's prototype, is there a way to persist the changes to the xml document? I guess i could go through all the work to make a business tier to store the data, but it seems like alot of overhead while im just training and messing around. Thoughts? Yahoo! Groups Links
RE: [flexcoders] hiding/showing datagrid items
At 12:24 PM 2/15/2005, you wrote: That looks like it would make a really cool custom component, synchronizing a tree on the left with a grid on the right. It will be hard in just a datagrid because I don't think the cells can be different widths on different lines. Your indentations couldn't overlap. What I'm trying now is to patch together the effect using different kinds of components. The main feature that's important is the ability to expand and contract different groups of rows in a datagrid. What I'm trying now: breaking up the data into individual data grids and adapting the Expansion demo (in Flex Explorer) to show and hide them. It's not going particularly well, so any help would be appreciated. It would help if I could figure out how to style the text in individual cells of a datagrid. Also, I couldn't make the linewrap work with the headerText=Base{newline}Price ($) code posted in another message on this list. I even set variableRowHeight to true, and it didn't make a difference. - Tom
datagrid row count
I have a datagrid fed by a two-node xml file. It keeps adding extra rows. How do I make it display only the rows that have data in them?
RE: [flexcoders] hiding/showing datagrid items
I just got the header wrap to work. I had to set headerHeight=30 to see both rows. Individual cell/column styling probably will require a custom cell renderer. To hide/show specific row sets you will need to manipulate the dg's underlying dataProvider. Tracy -Original Message- From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 12:23 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] hiding/showing datagrid items At 12:24 PM 2/15/2005, you wrote: That looks like it would make a really cool custom component, synchronizing a tree on the left with a grid on the right. It will be hard in just a datagrid because I don't think the cells can be different widths on different lines. Your indentations couldn't overlap. What I'm trying now is to patch together the effect using different kinds of components. The main feature that's important is the ability to expand and contract different groups of rows in a datagrid. What I'm trying now: breaking up the data into individual data grids and adapting the Expansion demo (in Flex Explorer) to show and hide them. It's not going particularly well, so any help would be appreciated. It would help if I could figure out how to style the text in individual cells of a datagrid. Also, I couldn't make the linewrap work with the headerText=Base{newline}Price ($) code posted in another message on this list. I even set variableRowHeight to true, and it didn't make a difference. - Tom Yahoo! Groups Links
RE: [flexcoders] ViewStack resizing
Did you look in the Flex 1.5 version of the API docs? resizeToContent is documented there. http://livedocs.macromedia.com/flex/15/asdocs_en/mx/containers/ViewStack.htm l Stephen Gilson Flex Doc -Original Message- From: Mika Kiljunen [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 1:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ViewStack resizing I just noticed that ViewStack has an undocumented property: resizeToContent to force ViewStack containers to resize when you navigate to a different child container, set the resizeToContent property to true. This is mentioned on the Developing Flex Applications but it is not documented on the Flex ActionScript and MXML API Reference. And the best part is... it works :) I think this should be added to the Flex ActionScript and MXML API Reference? -- Mika Yahoo! Groups Links
Re: Flex and Persistence -- namlely XML file persistence?
Thanks. I konw how to do what you were suggesting. I was hoping to find an even cheaper / simpler solution. Oh well. No big :) --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: You are going to have to have some middle tier on the server to persist your data. (umm, local shared objects maybe, but, naw.) A very simple testing tier might consist of a JSP page that reads and writes to a text file. Use HTTPService to communicate with it. Reading it into flex and parsing the string into a dom is easy. I am not sure if you can toString() an xml dom in Flex and get out the string. I manually generate my strings (concatenate). Let me know if a sample file access JSP would be helpful. Tracy -Original Message- From: stealthbaz [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 9:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex and Persistence -- namlely XML file persistence? Hi all. Im new to the flex world, and I'm still trying to get my arms around the whole picture. I think that i have the rudimentaray stuff under wraps, but I have some questions about persistence. I have been through Chris Coenraet's restaurant tutorial (never knew how badly i spelled restaruant till then!) at http://coenraets.com/tutorials/restaurant/index.jsp And in that he demonstrated 3 different ways to approach data services (HTTP services, Remote Objects, and Web Services), but in alot of the other training materials, its common to work from an XMl file to load in the data model. I see lots of way to alter the data structure in memory, but as a poor man's prototype, is there a way to persist the changes to the xml document? I guess i could go through all the work to make a business tier to store the data, but it seems like alot of overhead while im just training and messing around. Thoughts? Yahoo! Groups Links
Flex app bringing down Tomcat
Hi flexcoders, I am running the Flex Store application from webapps/samples on my machine under Tomcat, and it works just fine. However, when I move the Flex Store application to Tomcat on a Unix box and try to run it via a browser (http://remoteMachineName:8080/samples then click Flex Store), it thinks and thinks and then I get the Page Cannot Be Displayed page. I check Tomcat's catalina.out and see the following: X connection to pascal:15.0 broken (explicit kill or server shutdown). The Flex Explorer Hello World sample works fine and the Flex Explorer Web Services sample gives a Could not load WSDL message. Any ideas what would cause a Flex app to bring down Tomcat? Is this a whitelist/security issue? Is this a memory issue? Could Tomcat be missing JAR files in /tomcat/common/lib? Here are the JAR files in Tomcat's common/lib: ant-launcher, ant, commons-collections-3.1, commons-dbcp-1.2.1, commons-el, commons-pool-1.2, jasper-compiler, jasper-runtime, jsp-api, naming-common, naming-factory, naming-java, naming-resources, servlet-api. Any help is appreciated, -Will Will Cox UCSD San Diego, CA
show listener
I have a component...a empty canvas that has a show listener that simply calls trace to write test to the log file, ok? I then have my initial application load up with a tab navigator with a single tab that pulls in a very similar empty component but with a show listener that makes a call to a function that prints static test to the log file instead. On this page that contains the tab navigator, I have a creationComplete listener that triggers a method that dynamically adds the aforementioned component, the first empty canvas with the trace print function, to the tab navigator using the createChild method of the tab navigator. I load up the app, the second tab is dynamically created without a hitch...only problem is, the show listener never triggers the function in this dynamically created tab...nor does it ever trigger the function, whether I go back to the first tab and then come back to the dynamically added tab...but every time I head back to the first tab, the statically coded-in tab, that component's show listener triggers the function that writes static test to the log file. Why would the show listener on a dynamically added component never trigger when dynamically added to a navigator like the tab navigator? Robert L. Brueckmann Web Developer Merlin Securities, LLC 595 Madison Avenue New York, NY 10022 p: 212.822.4821 f: 212.822.4820 This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited.If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other FederalGovernment Agency, are not deposits of or guaranteed by Merlin Securities,LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.
RE: [flexcoders] Flex app bringing down Tomcat
Previously answered in Macromedia Flex Forum - http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=346; threadid=951951messageid=3405361 - Cathy -Original Message- From: wcucsd [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 1:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex app bringing down Tomcat Hi flexcoders, I am running the Flex Store application from webapps/samples on my machine under Tomcat, and it works just fine. However, when I move the Flex Store application to Tomcat on a Unix box and try to run it via a browser (http://remoteMachineName:8080/samples then click Flex Store), it thinks and thinks and then I get the Page Cannot Be Displayed page. I check Tomcat's catalina.out and see the following: X connection to pascal:15.0 broken (explicit kill or server shutdown). The Flex Explorer Hello World sample works fine and the Flex Explorer Web Services sample gives a Could not load WSDL message. Any ideas what would cause a Flex app to bring down Tomcat? Is this a whitelist/security issue? Is this a memory issue? Could Tomcat be missing JAR files in /tomcat/common/lib? Here are the JAR files in Tomcat's common/lib: ant-launcher, ant, commons-collections-3.1, commons-dbcp-1.2.1, commons-el, commons-pool-1.2, jasper-compiler, jasper-runtime, jsp-api, naming-common, naming-factory, naming-java, naming-resources, servlet-api. Any help is appreciated, -Will Will Cox UCSD San Diego, CA Yahoo! Groups Links
datagrid styling
Is there a way to style datagrid headers without using a custom headerRenderer - say, with CSS? If not, can anyone provide or point to an example of using a custom headerRender for datagrid header styling?
Re: [flexcoders] show listener
I suppose there could be a number of possible reasons, but I'd start by looking to see if it could be a synchronicity issue, ie. perhaps you are trying to assign an event listener to that object before that object is done being created. Can you post a snippet of your code so we can see exactly how/when you are adding the event listener? At 01:40 PM 2/15/2005, you wrote: I have a component...a empty canvas that has a show listener that simply calls trace to write test to the log file, ok? I then have my initial application load up with a tab navigator with a single tab that pulls in a very similar empty component but with a show listener that makes a call to a function that prints static test to the log file instead. On this page that contains the tab navigator, I have a creationComplete listener that triggers a method that dynamically adds the aforementioned component, the first empty canvas with the trace print function, to the tab navigator using the createChild method of the tab navigator. I load up the app, the second tab is dynamically created without a hitch...only problem is, the show listener never triggers the function in this dynamically created tab...nor does it ever trigger the function, whether I go back to the first tab and then come back to the dynamically added tab...but every time I head back to the first tab, the statically coded-in tab, that component's show listener triggers the function that writes static test to the log file. Why would the show listener on a dynamically added component never trigger when dynamically added to a navigator like the tab navigator? Robert L. Brueckmann Web Developer Merlin Securities, LLC 595 Madison Avenue New York, NY 10022 p: 212.822.4821 f: 212.822.4820 This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security. Yahoo! Groups Sponsor ADVERTISEMENT http://us.ard.yahoo.com/SIG=12947tg1o/M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/EXP=1108579253/A=2532114/R=2/SIG=12kd9t0q4/*http://clk.atdmt.com/NFX/go/yhxxxnfx002014nfx/direct/01/time=1108492853036846 [] -- Yahoo! Groups Links * To visit your group on the web, go to: * http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/ * * To unsubscribe from this group, send an email to: * mailto:[EMAIL PROTECTED][EMAIL PROTECTED] * * Your use of Yahoo! Groups is subject to the http://docs.yahoo.com/info/terms/Yahoo! Terms of Service.
RE: [flexcoders] datagrid row count
At 12:59 PM 2/15/2005, you wrote: Set the datagrid property: rowCount=2. Thanks. I had set variableRowHeight to true while experimenting with making a line break in the datagrid header. Guess that overrides the specified row height. Once I removed that property, the rowheight worked. - Tom -Original Message- From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 12:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] datagrid row count I have a datagrid fed by a two-node xml file. It keeps adding extra rows. How do I make it display only the rows that have data in them? Yahoo! Groups Links Yahoo! Groups Sponsor ADVERTISEMENT http://us.ard.yahoo.com/SIG=1297hkbih/M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/EXP=1108575769/A=2532114/R=2/SIG=12k5dovlc/*http://clk.atdmt.com/NFX/go/yhxxxnfx002014nfx/direct/01/time=1108489369998455 [] [] -- Yahoo! Groups Links * To visit your group on the web, go to: * http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/ * * To unsubscribe from this group, send an email to: * mailto:[EMAIL PROTECTED][EMAIL PROTECTED] * * Your use of Yahoo! Groups is subject to the http://docs.yahoo.com/info/terms/Yahoo! Terms of Service.
Re: [flexcoders] Flex opensource library... anyone??
Aldo Bucchi wrote: - flex coders are encouraged to work with much more abstract concepts (components and a pseudo document model structure rather than Somebody should port all the wonderful Flash code to Flex. I guess it'll happen on a need basis. Manish
Re: [flexcoders] Losing data bindings after seemingly unrelated e vent.
Thanks for taking a look at this. I'm guessing the problem has to do with some difference in how the repeater instantiates the TestViews between initialization and subsequent refreshes. I took a look at the generated-as, but I haven't had time to get my head around it. I think the corruption of the list might be a separate problem caused by the slice() function. I haven't gotten to the bottom of it, but replacing it with my own slice method fixed the list corruption issue without fixing the data binding issue. I took your advice and made the change event handling explicit. This fixed the problem. I'll probably go ahead and use explicit event handling whenever I'm using a repeater. I've attached the working sources for anyone who's interested. Thanks Again, Alex On Mon, 14 Feb 2005 22:10:12 -0800, Matt Chotin [EMAIL PROTECTED] wrote: I spent too much time playing around with this and can't figure out what's going wrong. If you debug further you'll see that the original contents of the project.pages array are getting corrupted (the elements are getting deleted or something). I tried removing certain bindings and didn't really see much in the way of improvement. You can see everything go haywire without even selecting a page, just select First, then Second, then First again and you'll see the TestViews disappear (if you put a backgroundcolor on the views you'll see it's really the label being set to empty string, not the thing disappearing). The selection then has even more problems for reasons that I couldn't decipher. See if you can eliminate data binding from the equation entirely. Just have everything set using event handlers and getter/setters, eliminate the curly braces. There may be something about all the bindings and relationships that is getting it confused at runtime, but I couldn't figure it out at all. The binding mechanism itself is a little much for me to try to explain right now J But we use a different mechanism in Flex than was written for Flash. You can see a little more of how it all gets set up if you look at the generated-as files (see keep-generated-as in flex-config) but I warn you that you may be seeing a little too much sausage being made J Matt From: Alex Cruikshank [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 5:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Losing data bindings after seemingly unrelated event. Hi All, We're developing an application that permits selection of page objects for editing from multiple views. We're trying to data-bind each of the views to a shared selection object to reduce the connections between components. This is working fine so long as you don't interact with other parts of the application. We also have a section list that filters the list of pages visible to the user. It appears that changing the section causes the views to lose their bindings to the selection object. This is confusing because, section selection only operates on another 'pages' array. I don't understand why it would affect the data bindings at all, especially since the bindings are to an unrelated object. I've attached a stripped down version of the application that exhibits the same behavior. To see what I'm talking about: 1. Click on the page labels on the right side of the app. The word 'selected' should appear next to the page you clicked last. 2. Click on 'First' or 'Second' on the combo box to the left. 3. Click on the page labels again to the right. They no longer change. The text for a page label is { page.label }{ selected(selection.list) ? ' (selected)' : '' }. Changes to selection.list automatically update this data binding expression (at least until you change the selection). I would greatly appreciate any insight that anyone can provide. Also, I would love to find an in-depth reference describing how data binding works in Flex/Flash. Thanks, Alex Cruikshank Engineer Carbon Five Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. testBindingProblem.mxml Description: Binary data TestSelection.as Description: Binary data TestView.mxml Description: Binary data
RE: Mouse cursor change question
How can Ichange the mouse cursor to a hand, just like the hand cursor we get when the mouse is hovered over a mx:Link control? And how do I change it back to the normal cursor? Thanks.
Re: [flexcoders] hiding/showing datagrid items
At 02:55 PM 2/15/2005, you wrote: Tracy Spratt wrote: To hide/show specific row sets you will need to manipulate the dg's underlying dataProvider. You could apply a filter to show only the nodes that are open -- http://manish.revise.org/archives/2005/01/31/data-filtering-using-a-custom-dataprovider/http://manish.revise.org/archives/2005/01/31/data-filtering-using-a-custom-dataprovider/ Yes - I was looking at your sample and thinking the answer was in there somewhere. I'm not sure what you mean by open in referring to a node. Maybe it would be possible to add a tag in the xml source that isn't displayed but identifies a group of nodes in the datagrid as being of a certain type - then the filter could use that tag as a basis for toggling show and hide. I'm just grasping at straws here - but could your example be adapted to do something like this? - Tom
RE: [flexcoders] RE: Mouse cursor change question
Ive answered this in a previous post, but here is the answer again: Chris, The useHandCursor property is a property of MovieClip and only works if there is a onRelease handler. You can look at the documentation here: http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.htm?href=""> You'll probably need to create a subclass of Image and implement an onRelease handler that does nothing. Jason -Original Message- From: Chris Phillips [mailto:[EMAIL PROTECTED]] Sent: Monday, January 03, 2005 4:56 PM To: Flex Coders Subject: [flexcoders] Force the hand cursor So, I've read the docs. And I've played aroundwith the code. I still can't figure out how to force the hand curcor to show. I have this, but it doesn't work. mx:Image mouseOver=event.target.useHandCursor=true; mouseDown=mainPhoto.source=event.target.source width=100 height=75 maintainAspectRatio=true source={photoURL(photos.currentItem)} / Could someone tell me how to force the hand cursor to show over particular elements? I'll be using it over both the Image tag and the Text tag. Thanks, -- Chris Phillips www.dealerpeak.com Senior Application Developer Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ From: Pilby [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 12:04 PM To: Flex Coders Subject: [flexcoders] RE: Mouse cursor change question How can I change the mouse cursor to a hand, just like the hand cursor we get when the mouse is hovered over a mx:Link control? And how do I change it back to the normal cursor? Thanks.
RE: [flexcoders] Re: Flex app bringing down Tomcat
I think it's the server processing of the @Embed which converts images into formats understood by the Flash player. - Cathy -Original Message- From: wcucsd [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 4:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex app bringing down Tomcat Cathy, Thank you...I set headless-server in flex-config.xml to true and it worked! Do you know why that switch is required to be on for Flex Store but not Flex Explorer? Is it that Flex Store has layered containers? I know it's not the images in Flex Store because I have another app that I based on Flex Store that breaks in the same way yet it has no images. Thanks, -Will --- In flexcoders@yahoogroups.com, Cathy Murphy [EMAIL PROTECTED] wrote: Previously answered in Macromedia Flex Forum - http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm? catid=346 threadid=951951messageid=3405361 - Cathy -Original Message- From: wcucsd [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 1:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex app bringing down Tomcat Hi flexcoders, I am running the Flex Store application from webapps/samples on my machine under Tomcat, and it works just fine. However, when I move the Flex Store application to Tomcat on a Unix box and try to run it via a browser (http://remoteMachineName:8080/samples then click Flex Store), it thinks and thinks and then I get the Page Cannot Be Displayed page. I check Tomcat's catalina.out and see the following: X connection to pascal:15.0 broken (explicit kill or server shutdown). The Flex Explorer Hello World sample works fine and the Flex Explorer Web Services sample gives a Could not load WSDL message. Any ideas what would cause a Flex app to bring down Tomcat? Is this a whitelist/security issue? Is this a memory issue? Could Tomcat be missing JAR files in /tomcat/common/lib? Here are the JAR files in Tomcat's common/lib: ant-launcher, ant, commons-collections- 3.1, commons-dbcp-1.2.1, commons-el, commons-pool-1.2, jasper- compiler, jasper-runtime, jsp-api, naming-common, naming-factory, naming- java, naming-resources, servlet-api. Any help is appreciated, -Will Will Cox UCSD San Diego, CA Yahoo! Groups Links Yahoo! Groups Links
Re: [flexcoders] datagrid styling
At 01:56 PM 2/15/2005, you wrote: Sure, you can just use the headerStyle property. try this: Great - thanks. Now - how can I get rid of the lightblue theme highlight in the header? Tried a bunch of stuff that didn't work.
Flex Get Togethers? i.e. Meetings, Conferences, Conventions, etc?
Have any Flex events come into existence yet? I know of many annual technology specific convocations (like JavaOne, Flashforward, next month's TheServerSide Java Symposium, etc). Have any meetings, conferences, conventions, etc been planned around Flex yet? (Other than as a subtopic at Macromedia's Annual MAX Conference.) Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'
Re: [flexcoders] Flex Get Togethers? i.e. Meetings, Conferences, Conventions, etc?
At 1:45 PM 2/15/5, Greg Hamer wrote: Have any Flex events come into existence yet? No Flex World at Moscone or Javits (boy, a name like that would draw the curious ;-), but there's currently a range of virtual events... click http://www.macromedia.com/events and select by product to get a tailored display. Another way to look at this is to consider the Flex authoring process as one step in getting a larger job done, with Flex-specific content being one constituency at a larger show... events which feature web technology solving financial, educational or other problems could be a good resource for either track events or birds-of-a-feather sessions. jd John Dowdell, Macromedia Developer Support, San Francisco (Best to reply on-list, to avoid my mighty spam filters!) Technotes: http://www.macromedia.com/support/search/ Technical daily diary: http://www.macromedia.com/go/blog_jd
RE: [flexcoders] Flex Get Togethers? i.e. Meetings, Conferences, Conventions, etc?
Hi, I do think we will have at least one or a few folks at the ServerSide and since Java One is in SF that is local for much of the team. Who on this list will be at one or the other or both? We could set up an informal get together somewhere if enough folks are interested. :) -David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 4:55 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex Get Togethers? i.e. Meetings, Conferences, Conventions, etc? At 1:45 PM 2/15/5, Greg Hamer wrote: Have any Flex events come into existence yet? No Flex World at Moscone or Javits (boy, a name like that would draw the curious ;-), but there's currently a range of virtual events... click http://www.macromedia.com/events and select by product to get a tailored display. Another way to look at this is to consider the Flex authoring process as one step in getting a larger job done, with Flex-specific content being one constituency at a larger show... events which feature web technology solving financial, educational or other problems could be a good resource for either track events or birds-of-a-feather sessions. jd John Dowdell, Macromedia Developer Support, San Francisco (Best to reply on-list, to avoid my mighty spam filters!) Technotes: http://www.macromedia.com/support/search/ Technical daily diary: http://www.macromedia.com/go/blog_jd Yahoo! Groups Links
Flex Get Togethers? ATTENDING ServerSide OR JavaOne?
David, I will be in town for ServerSide and am interested in joining a get together. (www.theserverside.com/symposium/ ) Have not yet committed on JavaOne (since it is June 27-30) ( http://java.sun.com/javaone/sf/) Please let me know if you do schedule get togethers at either. David Mendels [EMAIL PROTECTED] wrote: Hi,I do think we will have at least one or a few folks at the ServerSide andsince Java One is in SF that is local for much of the team. Who on thislist will be at one or the other or both? We could set up an informal gettogether somewhere if enough folks are interested. :)-David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 4:55 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex Get Togethers? i.e. Meetings, Conferences, Conventions, etc? At 1:45 PM 2/15/5, Greg Hamer wrote: Have any Flex events come into existence yet? No "Flex World" at Moscone or Javits (boy, a name like that would draw the curious ;-), but there's currently a range of virtual events... click http://www.macromedia.com/events and select by product to get a tailored display. Another way to look at this is to consider the Flex authoring process as one step in getting a larger job done, with Flex-specific content being one constituency at a larger show... events which feature web technology solving financial, educational or other problems could be a good resource for either track events or birds-of-a-feather sessions. jd Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'