[flexcoders] How to create line series dynamically.
Hi Folks, I am using the xml like data1.xml datas data date=8/1/2007 c3845=98 c6500=100 d1234=22 e5500=1 / data date=8/2/2007 c3845=48 c6500=97 d1234=33 e5500=11/ data date=8/3/2007 c3845=100 c6500=100 d1234=44 e5500=21 / data date=8/6/2007 c3845=98 c6500=98 d1234=55 e5500=31/ data date=8/7/2007 c3845=50 c6500=100 d1234=66 e5500=41 / data date=8/8/2007 c3845=100 c6500=97 d1234=77 e5500=51/ data date=8/9/2007 c3845=100 c6500=97 d1234=88 e5500=61/ data date=8/10/2007 c3845=1 c6500=97 d1234=99 e5500=71 / data date=8/13/2007 c3845=100 c6500=97 d1234=11 e5500=81/ /datas and my MXML code is mx:HTTPService id=srv1 url=../assets/data1.xml useProxy=false result=myData1=ArrayCollection(srv1.lastResult.datas.data) / mx:LineChart id=lineChart showDataTips=true dataProvider={myData1} width=400 height=170 x=0 y=0 !-- background elements -- mx:backgroundElements mx:GridLines mx:horizontalFill mx:SolidColor color=haloBlue alpha=0.2 / /mx:horizontalFill mx:horizontalAlternateFill mx:SolidColor color=haloSilver alpha=0.2 / /mx:horizontalAlternateFill mx:verticalFill mx:SolidColor color=haloBlue alpha=0.2 / /mx:verticalFill mx:verticalAlternateFill mx:SolidColor color=haloSilver alpha=0.2 / /mx:verticalAlternateFill /mx:GridLines /mx:backgroundElements !-- vertical axis -- mx:verticalAxis mx:LinearAxis baseAtZero=true title=Compliance Placed labelFunction=linearAxis_labelFunc / /mx:verticalAxis !-- horizontal axis -- mx:horizontalAxis mx:CategoryAxis id=ca categoryField=date title=August 2007 labelFunction=categoryAxis_labelFunc / /mx:horizontalAxis !-- horizontal axis renderer -- mx:horizontalAxisRenderer mx:AxisRenderer axis={ca} canDropLabels=true / /mx:horizontalAxisRenderer !-- series -- mx:series mx:LineSeries yField=c3845 displayName=c3845 / mx:LineSeries yField=c6500 displayName=c6500 / mx:LineSeries yField=d1234 displayName=d1234 / mx:LineSeries yField=e5500 displayName=e5500 / /mx:series /mx:LineChart mx:ControlBar height=41 y=178 mx:Legend id=legend dataProvider={lineChart} direction=horizontal width=398/ /mx:ControlBar The line chart is come nice. My Question is how to create the dynamic line series, when i change the xml like data date=8/13/2007 c3845=100 c6500=97 d1234=11 e5500=81 * f3300=55*/ with out changing the mxml code. please any one reply me -- Thanks Regards Swaminathan. M
[flexcoders] How do I dispatch an everything PropertyChangeEvent on this?
Hi guys, Disclaimer: this is probably a stupid question, but I've been trying to figure this out for way too long! I've got some code that does all sorts of things to this.foo, this.bar, and this.baz etc etc. At the moment I'm dispatching several standard PropertyChangeEvents as I change fields. What I'd like to do is once I've finished all my voodoo, dispatch a single event that says everything needs to be updated, but I need to do it to this rather than on a reference in a parent object, as it's a non-visual component that has no idea where it sits in the object graph. I *know* there's a simple solution to this... -J -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: How do I dispatch an everything PropertyChangeEvent on this?
Once again, two seconds after I post, the answer pops into my head... And as usual, the (simple) solution for anybody trawling the list in future: [Bindable(event=populated)] public class FooBar extends EventDispatcher { ... //Pay attention to me! dispatchEvent(new Event(populated)); -J On Fri, May 16, 2008 at 4:30 PM, Josh McDonald [EMAIL PROTECTED] wrote: Hi guys, Disclaimer: this is probably a stupid question, but I've been trying to figure this out for way too long! I've got some code that does all sorts of things to this.foo, this.bar, and this.baz etc etc. At the moment I'm dispatching several standard PropertyChangeEvents as I change fields. What I'd like to do is once I've finished all my voodoo, dispatch a single event that says everything needs to be updated, but I need to do it to this rather than on a reference in a parent object, as it's a non-visual component that has no idea where it sits in the object graph. I *know* there's a simple solution to this... -J -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Releasdate for flash player 10
is there allready a time shedule for the final release? Harald
RE: [flexcoders] ShowDataTip makes charts impossible to destroy arrgghh!
Not sure, how you are cleaning up your charts, but datatips are part of the systemManger.toolTipChildren. The best way to get rid of datatips is to position the mouse pointer where there are no items, which would make the number of datatips on the chart to be zero, which will remove the existing datatip children in InstanceCache's set count method by calling removeChild method. The src of datavisualization (which has charts, advanced data grid) should be in your sdk\lib\DMV-source.jar, which should get extracted once you apply your license. -Sunil From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Sent: Thursday, May 15, 2008 11:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ShowDataTip makes charts impossible to destroy arrgghh! hi- we are working on using the Profiler in FlexBuilder 3 to improve our app's memory use. We have a number of charts using flex charting, and we are trying to destroy them when they are no longer in use. This involves cleaning up a tangled web of references to get them out of memory. this works fine, except for charts which have the showDataTips property enabled. When the chart has been moused over and the dataTip shown, destruction becomes impossible! I suspect this is b/c the dataTip still exists and is bound to the chart, thus holding the chart itself in memory even when it has been set to null and removed. Does anyone have any clue how to eliminate the dataTip so we can get the chart out of memory? As a side note, it would greatly help if we could access the source of Pie or another chart-- we have the Professional licenses which give us charting, but we only get the code in swc form? Is there any way to see the source? thanks! Ryan image003.jpgimage004.jpg
[flexcoders] Anti Aliasing Flex Components
Hi All I am building a project in which we will most likely be using a lot of components at an angle. At small angles (like 5 degrees) the edges of these components look VERY blocky: http://giles.roadnight.name/RotationTest/RotationTest.html Is there any way round this? Thanks -- Giles Roadnight http://giles.roadnight.name
Re: [flexcoders] Re: RTMP port 2038
ServerConfig.getChannel(channel-idf).url =your url; Greetz Erik On 5/16/08, meteatamel [EMAIL PROTECTED] wrote: It is possible. In your Flex app, you can create a ChannelSet and add an RTMPChannel to it with the url that has the port, and then assign that ChannelSet to your Flex component (RemoteObject, Producer/Consumer, HTTPService/WebService, DataServcice). Check out the Actionscript API for these classes. -Mete --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Robert Csiki [EMAIL PROTECTED] wrote: Is it possible to change this port value in LCDS without the need to rebuild the SWF? Thanks.
Re: [flexcoders] Cannot install featurecom.adobe.flexbuilder.feature.standalone 3.0.194161
SOE? Perhaps you could get your admin to come over, give you full admin rights, install FB3, then reduce your rights again? or is that E a B? ;-) Paul - Original Message - From: barry.beattie [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, May 16, 2008 5:59 AM Subject: [flexcoders] Cannot install featurecom.adobe.flexbuilder.feature.standalone 3.0.194161 just downloaded and tried to install FB3. not good news. First time ever I've had a failure. The error said it could not update the plug-ins into Eclipse the problem could be my end: the SOE of my workstation has me set up as an almost admin ... but not fully (and I can't change it - although I can install other software: firefox, Apache, Coldfusion, etc) so I'm looking for a work-around. suggestions? thanx barry.b !SESSION 2008-05-16 14:52:03.667 --- eclipse.buildId=unknown java.version=1.5.0_11 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU Framework arguments: -application org.eclipse.update.core.standaloneUpdate -command install -from file:\C:\Program Files\Adobe\Flex Builder 3\com.adobe.flexbuilder.update.site/ -featureId com.adobe.flexbuilder.feature.standalone -version 3.0.194161 Command-line arguments: -application org.eclipse.update.core.standaloneUpdate -command install -from file:\C:\Program Files\Adobe\Flex Builder 3\com.adobe.flexbuilder.update.site/ -featureId com.adobe.flexbuilder.feature.standalone -version 3.0.194161 !ENTRY org.eclipse.update.core 4 0 2008-05-16 14:52:06.710 !MESSAGE Cannot install featurecom.adobe.flexbuilder.feature.standalone 3.0.194161 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] invalid column widths in DG before render.
In Flex, if a UI component has not been displayed, it has not yet measured it's size. This is what happens with the DataGrid as well. You could set the creationPolicy to all and wait for the creationComplete event before you retrieve the column widths and height. Greetz Erik On 5/16/08, aceoohay [EMAIL PROTECTED] wrote: I have written a bit of code that generates the xml needed to display an Excel Workbook with multiple worksheets. I have created a tabbed panel with 5 different grids one per panel. One of the features of the spreadsheet class is to grab the width of each column and create the same size column in Excel, this works well, except if the grid has not been displayed. In other words every tab that you display, the coresponding grid widths convert to Excel fine, the ones that you have not clicked get the data properly, but the sizes are very small, but not all the same size. To get the size of the column I use; Math.ceil(dg.columns[i].width) Any clues as to what might be going on, or better yet how to solve it? Paul
Re: [flexcoders] Re: Flash Player 10 is in prerelease!
On Friday 16 May 2008, Gordon Smith wrote: (my emphasis) For now, they're mainly interested in /developers/ using FP10 for compatibility /testing/. grumble They should have made a debug version then... -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
Re: [flexcoders] Re: Include images in SWC via compc
You can inspect the contents of the SWC with WinRar or a similar tool. It is just a zip-like container. Within it you will find at least 2 files: library.swf - This swf contains all compiled information catalog.xml - This file contains information about the contents of the swf As for information about the swf, this is described pretty well in the catalog.xml. If you want more information, there are a few applications that can inspect the contents of an swf. Some are even written in Adobe AIR. Greetz Erik On 5/15/08, Richard Rodseth [EMAIL PROTECTED] wrote: Are there any good (preferably GUI) tools for inspecting the contents of SWCs and SWFs. My colleague is still having no luck building the SWC that I now have working in FlexBuilder. I have a feeling the key is understanding what Flexbuilder does when you designate a file (eg src in my layout below) as the main source folder. Is there a compc equivalent, or just the -source-path option? On Wed, May 14, 2008 at 2:24 PM, Richard Rodseth [EMAIL PROTECTED]rrodseth%40gmail.com wrote: The good news is I was finally able to build my Resources SWC (containing images, stylesheets, and properties files that embed images) in Flexbuilder. The bad news is for my poor colleague who is gallantly doing the continuous integration work (with MSBuild and mxmlc/compc). In Flexbuilder, I ended up with the following layout: resourcesproj ..locale en_US ..images.properties ..src images ..zoom.png com ..stylesheets myapp.css In Flexbuilder, I had the images checked on the Assets tab, and the following additional compiler options -locale en_US -source-path=../locale/{locale} -include-resource-bundles=images,UIStrings -include-file myapp.css ../stylesheets/myapp.css Is there really no wildcard way to include all the images in the SWC from the command line without listing them explicitly in a config file? I guess Flexbuilder builds a list based on the checkboxes in the Assets tab? The properties files references the images like this zoom=Embed(images/zoom.png) I assume we would have to use images/zoom.png as the name in a -include-file directive? Hoping for better error messages and CI support in Flexbuilder 4...
[flexcoders] Re: DropShadow with WindowedApplication
Thx a lot Jeff ! --- In flexcoders@yahoogroups.com, Battershall, Jeff [EMAIL PROTECTED] wrote: Check this out: http://coenraets.org/blog/2008/02/salesbuilder-for-air-10/ Gives the exact how-to and good code samples and graphical assets to get you started. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of quantum_ohm Sent: Thursday, May 15, 2008 11:04 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DropShadow with WindowedApplication Nobody ? :-( -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Re: Flash Player 10 is in prerelease!
On Friday 16 May 2008, Gordon Smith wrote: (my emphasis) For now, they're mainly interested in /developers/ using FP10 for compatibility /testing/. grumble They should have made a debug version then... +1 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] itemFocusout in datagrid
Hi friends, Iam writing itemFocusOut event for my data grid and the code is as follows. public function focusOutHandlerEvent(event : DataGridEvent):void{ var validateValue : NumberValidator = new NumberValidator(); var validationResult : ValidationResultEvent; validationResult = validateValue.validate(event.itemRenderer.data.number); if(validationResult.type ==ValidationResultEvent.INVALID){ errMsg=invalid; }else{ errMsg=valid; } } // Item Edit End Event public function preventDefaultMethods(event : DataGridEvent):void{ if(event.reason ==DataGridEventReason.NEW_COLUMN || event.reason==DataGridEventReason.NEW_ROW || event.reason==DataGridEventReason.CANCELLED){ // keep the data as it is. return; } if(errMsg==invalid){ event.preventDefault(); } } Is this a proper way to implement the itemFocusOut event. Moreover when i enter the 'Enter' key it throws an error #1009, findNextItemRenderer() Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798
Re: [flexcoders] Flash Player 10 is in prerelease!
Got it working on flex-mojos http://blog.flex-mojos.info/2008/05/16/flash-player-10/ VELO On Thu, May 15, 2008 at 3:02 AM, Gordon Smith [EMAIL PROTECTED] wrote: http://labs.adobe.com/technologies/flashplayer10/ Gordon Smith Adobe Flex SDK Team
[flexcoders] Flash Player 10 Beta with Flex SDK 3.0.x
Flex SDK for Flash Player 10 Beta is now available. http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.x
[flexcoders] Number Text input as Eclipse Nebula NumberFormatter widget
Hi all! After two days google, I can't found any text input widget support input number formatter use patter as ###,###,##0.00. I'm porting some Eclipse RCP application to Flex. Please refer http://www.eclipse.org/nebula/widgets/formattedtext/formattedtext.php The main problems is textinput's carret when user input number. Sorry, my english not well
[flexcoders] Re: Flex Messaging Service + Drag and Drop List Component
--- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Jeffrey, You shouldn't attempt to send UI components from one app to another; you just need to send enough info to the peer for it to simulate the same behaviors as you're doing locally. There's no out-of-the-box support for synchronizing the UI of your Flex app across peers. Try sending identifiers for the component you're dragging, as well as for the drop target. In your messageHandler() method in the receiving app, use these identifiers to get references to the local UI components that match, and reparent the 'dragged' component under the local 'drop target' component. The reparenting could be simple and direct, and you could try to animate it once you get the basic scenario working if you wanted (you know where the 'dragged' component starts and where it ends up so maybe you could do a straight line animation to simulate the original drag and drop). Sorry, don't have time to code up anything at the moment. Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey Walker Sent: Thursday, May 15, 2008 3:33 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex Messaging Service + Drag and Drop List Component Thanks Seth, this helps a lot. But I am unclear on exactly what should be sent to the server inside of AsyncMessage. Below I have my drop handler and message handler. I am very new to Flex and I do not understand what to do in the message handler (i.e., where to set the received data) so that the consumers can actually see the drag an drop action happening. What do you mean by animate the item dragged along the simple path? I am using the built in drag and drop capabilities of ther List component. Can you please help me with my code? Thanks private function dragDropHandler(event:DragEvent):void ����������� { ����������� ��� ����������� ��� // Get the drop target component ��������������� var dropTarget:List = event.currentTarget as List; �������������� //Get dragged item �������������� var draggedItem:CustomImageRenderer = event.draggedItem as CustomImageRenderer; �������������� //Send the message to the server ������������� message = new AsyncMessage(); ������������� message.headers.dropTarget = dropTarget; ������������� message.headers.draggedItem = draggedItem; ������������� producer.send(message); ��������������� ����������� } ����������� private function messageHandler(event:MessageEvent):void ��� ��� ��� { ��� ��� ��� ��� //WHAT DO I DO HERE? ��� ��� ��� ��� ��� ��� ��� } -- Jeffrey On Thu, May 15, 2008 at 3:14 PM, Seth Hodgson [EMAIL PROTECTED] wrote: You can put anything you like into the body, or headers, of an AsyncMessage; a string, a number, an anonymous Object, a typed Object (if you use a typed Object be sure to tag it with [RemoteClass] metadata). You can control which subscribed Consumers receive the message by using the Consumer.selector property (a SQL-92 expression evaluated on the server against the headers of incoming messages; if the message headers satisfy the expression the message will be delivered to the Consumer), or by using the Consumer.subtopic property to subscribe to a subtopic (or range of subtopics) within a destination and using the Producer.subtopic property to control which specific subtopic sent messages go to. When building 'screen-sharing' style applications like this, you need to really keep network latency in mind. Some GUI frameworks will 'summarize' events before handing off to even local processing (i.e. collapsing a bunch of individual key strokes into a summary string containing all the characters typed since the last event dispatch and just dispatching that single event). This becomes even more important when you're considering sending lots of high frequency events over the network to peers. In this case, I'd recommend sending a single message to subscribed peers on drop complete, indicating which component was dragged and dropped along with its final location. You can then either just reparent the corresponding component immediately on the receiving peer, or animate it along a simple path. There are lots of options with this sort of thing, but you shouldn't try to generate and send a message for each pixel it is dragged. Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jeffreyr6915 Sent: Wednesday, May 14, 2008 11:01 PM To: flexcoders@yahoogroups.com Subject:
[flexcoders] logic code in another file
hello, usually when i'm doing a regular web application i have my html document, a small piece of javascript where i instantiate my general-purpose javascript objects and finally my especialists-objects. How can i do it with Flex? using the mx:Script tag i can add some logic and do direct access on the widgets. But what i really need is to separate the script from the rest, so interface and logic could be well managed.
[flexcoders] Why would mx.controls.NavBar.dataProvider not accept an array of DisplayObject? (3.0.0)
Hi, I'd like to specify a custom Array dataProvider to a mx.controls.ButtonBar instead of binding it to a ViewStack instance. I'm doing the following: var array:Array = new Array(); array.push(chart); // chart is a DisplayObject instance array.push(grid); // grid is a DisplayObject too buttons.dataProvider = array; ... but NavBar.dataProvider (ButtonBar extends NavBar) doesn't seem to like this array of DisplayObject and throws an error, as seen in NavBar source code: (Flex 3.0.0) else if ((value is IList IList(value).length 0 IList(value).getItemAt(0) is DisplayObject) || (value is Array (value as Array).length 0 value[0] is DisplayObject)) { var name:String = id ? className + ' + id + ' : a + className; message = resourceManager.getString( controls, errWrongType, [ name ]); throw new Error(message); } What is the reason behind throwing an error when an array of DisplayObject is given? Why would I have to wrap my DisplayObject instances in order to prevent this error? Thanks in advance, Regards. -- Fiouz
[flexcoders] Rich Text Editor - putting the toolbar above the textArea
There seems to be some weird things going on with the RichTextEditor layout that i cant quite understand. If you look at the RichTextEditor class (F3) its actually an mxml file made up of a Panel with two child components (TextArea and ControlBar containing a ToolBar). When i do traces i get this: trace(rte.numChildren) // 1 trace(rte.getChildAt(0)) // textArea trace(rte.getChildAt(1)) // throws error So, its ignoring the ControlBar as a child component - even though you can see it in the MXML. Given that the ControlBar has no id, this makes it difficult to target since you cannot do so directly via actionscript OR the Display List as evidenced above. The only way i can get to it is via teh parent property of teh RichTextEditor's tooBar property (as i said above, the toolbar is a child of the untargetable ContolBar which can also be referenced through the RichTextEditor property toolbar) eg. rte.toolbar.parent // this is a reference to the ControlBar With this in mind - the only way i can work out how to swap the components around is the following: var displayObj:DisplayObject = rte.toolbar; rte.toolbar.parent.removeChild(displayObj); rte.addChildAt(displayObj, 0); This seems like a clumsy workaround. Is my understanding of the AS3 Display List flawed, is there are more direct way i am missing?
Re: [flexcoders] logic code in another file
You need to use classes and put your logic there, just leave the use of the script tags to control the UI and communicate with the logic. I think it's time for you to introduce yourself to the concepts of Object-oriented design and class-based development. It'll be worth it, but the foothils are a little steep at first. Paul - Original Message - From: Leonardo To: flexcoders@yahoogroups.com Sent: Friday, May 16, 2008 12:12 AM Subject: [flexcoders] logic code in another file hello, usually when i'm doing a regular web application i have my html document, a small piece of javascript where i instantiate my general-purpose javascript objects and finally my especialists-objects. How can i do it with Flex? using the mx:Script tag i can add some logic and do direct access on the widgets. But what i really need is to separate the script from the rest, so interface and logic could be well managed.
Re: [flexcoders] Can AIR app get Workstation Credentials?
On Thursday 15 May 2008, Douglas Knudsen wrote: yes, on the wild internet I 100% agree. But what about a inTRAnet with strict IT rules in place? I just stepped away to make a cup of tea / go to the loo / sneeze / deal with a phone call, and when I came back the system had done it by itself. With single sign on, you loose any chance of being able to say 'you did this'. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
Re: [flexcoders] logic code in another file
For intro to OO some other topics, I've started to recommend the head first books to people: http://www.headfirstlabs.com/books/hfooad/ A book that is so inviting to read that it's ok to read at the toilet. That is sort of the is a book readable without pain test for me as I am used to read cartoons in the toilet. Best regards, Marcus Paul Andrews wrote: You need to use classes and put your logic there, just leave the use of the script tags to control the UI and communicate with the logic. I think it's time for you to introduce yourself to the concepts of Object-oriented design and class-based development. It'll be worth it, but the foothils are a little steep at first. Paul - Original Message - *From:* Leonardo mailto:[EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com *Sent:* Friday, May 16, 2008 12:12 AM *Subject:* [flexcoders] logic code in another file hello, usually when i'm doing a regular web application i have my html document, a small piece of javascript where i instantiate my general-purpose javascript objects and finally my especialists-objects. How can i do it with Flex? using the mx:Script tag i can add some logic and do direct access on the widgets. But what i really need is to separate the script from the rest, so interface and logic could be well managed.
RE: [flexcoders] coldfusion and Flex?
To my knowledge, no, you can't have CF7.02 and CF8 running on the same box, except maybe if one of them was a standalone instance or something, but it would be messy, and I doubt its worth the trouble. If you're really concerned that the upgrade is going to break something, then use VMWare or similar product to build your CF8 evaluation instance and test your code there. My experience tells me that as far as remoting is concerned, there's not a lot of difference. As far as project settings, if you're using default services-config.xml I doubt there will be an issue. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Shen Sent: Thursday, May 15, 2008 5:15 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] coldfusion and Flex? Hi Jeff, I use CF7.02 and I use default services-config. xml . Do you mean I do not need change FB project setting and Flex codes? I work in local pc, I can not install cf 7 and cf 8 in same system ,right? Thanks Mark - Original Message From: Battershall, Jeff [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, May 15, 2008 4:39:10 PM Subject: RE: [flexcoders] coldfusion and Flex? If you're using CF 7.02, the differences should be mimimal. The services-config. xml filea now has things broken out into separate files, so if you've done anything custom there, you'll have a small amount of work to do. Set up a dev instance using the developer edition of CF8 and test things out to be sure. Jeff -Original Message- From: [EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of markflex2007 Sent: Thursday, May 15, 2008 3:22 PM To: [EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] coldfusion and Flex? Hi, I am working with CF7,Flex and Cairngorm.the application works fine. My manager want to use CF8 now, I do not have idea what I have to change from setting up project to Flex coding etc. I need to know the steps before I switch cf7 to cf8. Do you have experience for this.Please give me a hit. Thanks Mark - - -- -- Flexcoders Mailing List FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups Links
Re: [flexcoders] Flash Player 10 Beta
On Thursday 15 May 2008, Nate Pearson wrote: Is it even the slightest good idea for flex developers to install this? No. It isn't a debug version, you have no way of knowing if you application is actually working OK with very extensive testing. I just don't want to build some apps and think they are okay then find out that my users running flash 9 can't use it. Then stick with the v9 player. There is no need (and it will hinder you) to install the v10 beta at this stage as the benefits are massively out weighted. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
Re: [flexcoders] Position Menu under LinkButton
Thank you! Works like a charm :-). -Greg On Fri, May 16, 2008 at 12:07 AM, Alex Harui [EMAIL PROTECTED] wrote: Menus get parented by the systemManager so you have to translate to its coordinate space var pt = new Point(0,0); pt = linkButton.localToGlobal(pt) menu.show(pt.x, pt.y) -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Greg Hess *Sent:* Thursday, May 15, 2008 3:02 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Position Menu under LinkButton Hi Folks, I am trying to position a Menu under a help LinkButton to give the user the help options. I thought I could use the link buttons x y (minus the height and width of the button) to position the menu in the middle under the button but it is not working. The LinkButton is a child of an HBox and its x y is always 0. I have been able to position the menu where the mouse x,y at time of click was (using Application.application.mouseX,Y) but I would prefer to have the menu always show at the same position relative to the button. Does anyone know how I can do this? Cheers, Greg
Re: [flexcoders] website
On Thursday 15 May 2008, nihilism machine wrote: can anyone send me a website which has no backend and uses easing, just so that i can get an idea of how to structure my mxml file. that would be very helpful, especially a site that is one single file. Many of these search results have code: http://community.adobe.com/ion/search.html?q=easinglbl=flex_product_adobelrx=8y=5 -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
Re: [flexcoders] Flash Player 10 Beta
On Thursday 15 May 2008, Nick Collins wrote: You should be fine. The new APIs (IK, 3D transformations, etc.) aren't available in Flex, so you won't be using them. They are available from Flex, should you require them. The open source Wiki has details on how to set this up. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] Re: AIR drag/drop via asynchronous download
I'm trying to create a drag/drop app where the data to be 'dropped' is actually on a remote filesystem. I'm using Cairngorm I have a Command that is fired by NativeDragComplete in the View and downloads the selected files to a temp directory, then populates the Clipboard with an AIR File list of those files. So far so good, but obviously the drag/download operation is asynchronous, so can I create some kind of callback to the drag handler in the View so that it knows when the clipboard data is ready, or just tell the Command where the drag went? Or is there a better way to do this?
[flexcoders] Re: How to tell if variable is an int, uint, or a Number?
Alrighty then, I filed a bug report since the following outputs int: var uintVar:uint = 5; trace(describeType(uintVar)[EMAIL PROTECTED]()); --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: I think there is a conceptual distinction between the runtime type of an AS3 value and the compile-time type of a var or parameter that holds such a value. The 'is' operator works on values. A value like 5 'is' both an int, a uint, and a Number because it is a legal value in the set of possible values for each of these types. But I would expect a var declared as var u:uint; to report itself via describeType() as a uint, just like int and Number do. It seems like a bug that it doesn't. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Whitelock Sent: Thursday, May 15, 2008 3:59 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to tell if variable is an int, uint, or a Number? Thanks for the suggestion, but it still considers an int to be a uint if the int is positive. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Sherif Abdou sherif626@ wrote: try using a dictionary instead of object - Original Message From: Paul Whitelock paul@ To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Sent: Thursday, May 15, 2008 4:11:19 PM Subject: [flexcoders] Re: How to tell if variable is an int, uint, or a Number? Well, it turns out that doesn't work either if the int is positive. If an int is positive all of the follow tests return true: var testInt:int = 5; var obj:Object = testInt; obj is int - true obj is uint - true obj is Number - true So, I'm back to assuming there is no way to tell an int from a uint. --- In [EMAIL PROTECTED] ups.com, Paul Whitelock paul@ wrote: I found another way that seems to work (not sure why though): var testUint:uint = 1; var testInt:int = -1; var testNumber:Number = 1.1; var obj:Object = testUint; trace (uint: + (obj is uint obj is int)); trace (int: + (obj is int !(obj is uint))); trace (Number: + ((obj is Number) !(obj is int) !(obj is uint))); Output: uint: true int: false Number: false obj = testInt; trace (uint: + (obj is uint obj is int)); trace (int: + (obj is int !(obj is uint))); trace (Number: + ((obj is Number) !(obj is int) !(obj is uint))); Output: uint: false int: true Number: false obj = testNumber; trace (uint: + (obj is uint obj is int)); trace (int: + (obj is int !(obj is uint))); trace (Number: + ((obj is Number) !(obj is int) !(obj is uint))); Output: uint: false int: false Number: true --- In [EMAIL PROTECTED] ups.com, Paul Whitelock paul@ wrote: Thanks! That did help, but it doesn't seem to work for a uint. Here's my test code: var testUint:uint = 1; var testInt:int = -1; var testNumber:Number = 1.1; var testString:String = test; var testDate:Date = new Date(); var testArray:Array = new Array(); var test:Array = [testUint, testInt, testNumber, testString, testDate, testArray]; for (var i:uint = 0; i test.length; i++) { var typeInfo:String = describeType( test[i]). @name.toString( ); trace(typeInfo) ; } And here's the output: int int Number String Date Array I'm guessing there's no way to identify a uint -- is that correct? --- In [EMAIL PROTECTED] ups.com, Alex Harui aharui@ wrote: There is code that might help in DataGrid.as: itemEditorItemEd itEndHandler _ _ __ From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Paul Whitelock Sent: Thursday, May 15, 2008 12:31 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] How to tell if variable is an int, uint, or a Number? I have a situation where an untyped variable is passed in a method call and I need to determine the data type for the variable. My first thought was to use typeof, but typeof returns number for an int, uint, or a Number. The operator is will not work on primitives. Is there any way to determine the data type of an untyped primitive object?
[flexcoders] A RPC version of the Flex Compiler API
Hi Flexcoders, I've recently implemented a RPC version of the Flex Compiler API. For more information, please check out the following blog: http://stopcoding.wordpress.com/2008/05/16/the-flex-compiler-api-rpc-style/ If you're interested in testing it, please shoot me an email. Thanks. Happy coding! -C
[flexcoders] Is there a way to change the timezone of Date object in Flex 1.5?
Hi, I'm working on an application with Flex as front end. I need to interact with back end only with GMT+0 date times or with the same timezone which my server is set up on. But as I've found out, any datetime instance created in Actionscript is by default will have the time zone set to system's local time zone. Also when this date is recieved on server as a result of time zone offset the date may skip a day or lag a day to what user has specified. Similar problem happens when recieving the date also, that is, any GMT +0 time which is received is converted to local time before displaying on the screen :(. Since i'm using DateField to get user input, any date chosen from DateChooser popup will be set to local time zone. Also the parseFunction property which can be set on a DateField is invoked only when the date is changed by typing manually into the text box, so we have no control over what is set through the DateChooser popup. Let me explain exactly what problem I am dealing with - Suppose the the server timezone is MST (GMT - 7) and the client machine is set on IST (GMT + 5:30), so there is a time difference of 12:30 hrs between the client and server. Now if a Date object is created and sent to server from the client machine any time before 12:30 PM (IST, say 11:00 AM on 22 May), flex gatway performs the time conversions according to the timezones of client and server and subtract 12:30 hrs from the time passed from the client and therefore the time goes to the previous day and the date received on the server is 21 May, 10:30 PM, which is not the date client has sent. So to resolve this issue, I want to set the timezone of the Date objects to what is there on the back end, so that no conversions take place while passing on the Date objects to the server. I know the Date object has timezone information relative to GMT and we can set the time to GMT time using Date.UTC(), but it does not change the timezone to GMT which will not serve the purpose. What I wanted to know if there is a way we can change the timezone of the Date object and if anyone has been able to do it (either with Flex 1.5 or 3.0)? If yes, could you please be generous enough to share the solution you appllied... Thanks
[flexcoders] Hide a menu on MOUSE_OUT
Hi Folks, I have a menu that displays when a user MOUSE_OVER a button, displaying help options. I would like the menu to hide if the user moves the mouse out of the menu. I thought simply adding a MOUSE_OUT event listener to the menu would give the me the event to trigger the hide, however the MOUSE_OUT event is dispatched as soon as the mouse goes over the menu. What I would like is: - if mouse is over button or menu, display the menu, else hide the menu How can I achieve this? Thanks, Greg
Re: [flexcoders] Flash Player 10 Beta
On Fri, May 16, 2008 at 3:18 PM, Tom Chiverton [EMAIL PROTECTED] wrote: On Thursday 15 May 2008, Nick Collins wrote: You should be fine. The new APIs (IK, 3D transformations, etc.) aren't available in Flex, so you won't be using them. They are available from Flex, should you require them. The open source Wiki has details on how to set this up. Am I missing something here or is the SWC missing something -- flash.display.Graphics. Graphics becomes available when I add the FP9 SWC, too, but obviously it doesn't contain the new API. Halp? Mark
RE: [flexcoders] Re: AIR drag/drop via asynchronous download
The way I approached this problem was having my command class fire off delegates for each download and listen for a successful download event. When the all the files in my batch have been downloaded, I updated a watched variable in my ModelLocator, which in turn executed other logic. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Carpenter Sent: Friday, May 16, 2008 9:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AIR drag/drop via asynchronous download I'm trying to create a drag/drop app where the data to be 'dropped' is actually on a remote filesystem. I'm using Cairngorm I have a Command that is fired by NativeDragComplete in the View and downloads the selected files to a temp directory, then populates the Clipboard with an AIR File list of those files. So far so good, but obviously the drag/download operation is asynchronous, so can I create some kind of callback to the drag handler in the View so that it knows when the clipboard data is ready, or just tell the Command where the drag went? Or is there a better way to do this? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Binding Model to selectedItem property not updating
I'm currently refactoring a small application to be more MVC and am running into a few binding issues. In my Model, I store all my dataProviders, which are Arrays (because they will not change) and I also have a typed object that stores my form state as individual objects. In my View, which is mostly a bunch of ComboBoxes, I have set the dataProvider to bind to the arrays in the Model, and set the selectedItem to bind to the form state properties. I added a button which will update the form state for one of the properties when clicked, which works (the ComboBox updates to the expected value) the first time, but not on subsequent clicks. I've attached a listener to the valueCommit event on the ComboBox, and it does fire the first time. I've tried changing the Model to use ArrayCollections instead, and used the Collection API to try and update the selectedItem (by setting the form state model to the value of a getItem() call) but that isn't working either. Is there a better way to handle storing and binding form state in a well designed Flex app? I'm not using a framework, and don't really want to at this point in time (the app is fairly small, and the deadline is approaching quickly.) Any help or insight is greatly appreciated! - Ken Code snippets: The ComboBox: mx:FormItem label=Age mx:ComboBox id=age dataProvider={model.ageList} rowCount=10 selectedItem={model.quotingFormState.age} / /mx:FormItem The function called to update the ComboBox (works on first click only): private function updateAge():void { model.quotingFormState.age = model.ageList[5]; }
[flexcoders] Re: AIR drag/drop via asynchronous download
Thanks Jeff - that's pretty much where I'm up to; I've implemented a ChangeWatcher that watches for an update on the ModelLocator, indicating completion of the download process. My problem now is how to make all this work with a TileList (my drag source) so that I can drag 'files' out of the TileList, then download them and copy the files into whatever target the user dragged to.
[flexcoders] LCDS and channel usage
Hi there, What channels are compatible with what service objects? For instance, I noticed the AMF family is not good for DataService. If you know of a ling that contains this service/channel matrix, I'd appreciate if you'll point it to me. Also: for each of the available services (DataService, HttpService, WebService, RemoteService), whenever they support multiple channels, what's the order these channels are being tried by the framework? Is this order configurable? How the framework decides the channel to use (the current channel)? Thanks, Robert
RE: [flexcoders] Is there a way to change the timezone of Date object in Flex 1.5?
http://flexblog.faratasystems.com/?p=289 -Kyle From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of vicky9nov Sent: Friday, May 16, 2008 9:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Is there a way to change the timezone of Date object in Flex 1.5? Hi, I'm working on an application with Flex as front end. I need to interact with back end only with GMT+0 date times or with the same timezone which my server is set up on. But as I've found out, any datetime instance created in Actionscript is by default will have the time zone set to system's local time zone. Also when this date is recieved on server as a result of time zone offset the date may skip a day or lag a day to what user has specified. Similar problem happens when recieving the date also, that is, any GMT +0 time which is received is converted to local time before displaying on the screen :(. Since i'm using DateField to get user input, any date chosen from DateChooser popup will be set to local time zone. Also the parseFunction property which can be set on a DateField is invoked only when the date is changed by typing manually into the text box, so we have no control over what is set through the DateChooser popup. Let me explain exactly what problem I am dealing with - Suppose the the server timezone is MST (GMT - 7) and the client machine is set on IST (GMT + 5:30), so there is a time difference of 12:30 hrs between the client and server. Now if a Date object is created and sent to server from the client machine any time before 12:30 PM (IST, say 11:00 AM on 22 May), flex gatway performs the time conversions according to the timezones of client and server and subtract 12:30 hrs from the time passed from the client and therefore the time goes to the previous day and the date received on the server is 21 May, 10:30 PM, which is not the date client has sent. So to resolve this issue, I want to set the timezone of the Date objects to what is there on the back end, so that no conversions take place while passing on the Date objects to the server. I know the Date object has timezone information relative to GMT and we can set the time to GMT time using Date.UTC(), but it does not change the timezone to GMT which will not serve the purpose. What I wanted to know if there is a way we can change the timezone of the Date object and if anyone has been able to do it (either with Flex 1.5 or 3.0)? If yes, could you please be generous enough to share the solution you appllied... Thanks
[flexcoders] Re: RTMP port 2038
Thank you all. The use case is we noticed we can't depoy the same webapp twice on the same server host (the second one won't work right, because port 2048 is already taken). We tried changing the port but it did not work as the initial port value is burnt into the SWF. BTW, I can't find the DataService in FB3 online help documentation. It used to be ther ein FB2. What happened? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Create your RTMPChannel in ActionScript and assign it to your components for use. When you want to change its URL, invoke disconnectAll() on your ChannelSet, update your RTMPChannel's URL, and reconnect (by making a remoting call, issuing a DataService fill, etc.) I'm not sure what the use case is here though? Distributing a swf that will work against various servers which may be running their RTMP endpoints on different ports? Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Thursday, May 15, 2008 3:27 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RTMP port 2038 Is it possible to change this port value in LCDS without the need to rebuild the SWF? Thanks.
RE: [flexcoders] Re: AIR drag/drop via asynchronous download
In my case, I was using a Tree control. Each element contains the meta data I need to have to drive the download process. When I start the drag, I take the data provider and create an array of value objects that I add to the drag source by dragSource.addData(resultItems,items); Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Carpenter Sent: Friday, May 16, 2008 11:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AIR drag/drop via asynchronous download Thanks Jeff - that's pretty much where I'm up to; I've implemented a ChangeWatcher that watches for an update on the ModelLocator, indicating completion of the download process. My problem now is how to make all this work with a TileList (my drag source) so that I can drag 'files' out of the TileList, then download them and copy the files into whatever target the user dragged to. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Flash Player 10 is in prerelease!
http://blog.tengerstudio.com/2008/05/16/flash-player-10-class-browser/ --- In flexcoders@yahoogroups.com, VELO [EMAIL PROTECTED] wrote: Any word on API? VELO On Thu, May 15, 2008 at 3:25 AM, Bjorn Schultheiss [EMAIL PROTECTED] wrote: Is there a new api to play with? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: http://labs.adobe.com/technologies/flashplayer10/ Gordon Smith Adobe Flex SDK Team
[flexcoders] AdvancedDataGrid: turning renderer into editor
Hi all - Anybody know from within an item renderer how to tell the AdvancedDataGrid to switch to the item editor for that cell? I tried the createItemEditor method but it doesn't seem to do it. Any ideas? Ryan
[flexcoders] LinkBar Question, How to get LinkBar item details programmatically?
Hi All, How to get the data behind a LinkBar item (e.g URL) on right mouse click? I have a LinkBar with 4 different items and a ContextMenu attached to the LinkBar. When user right click on each link the contextmenu give the option to open the link in a Tab or an external Browser window. I want to pass the URL behind each link item programmatically to my contextmenu. Thanks VN
[flexcoders] Re: Hide a menu on MOUSE_OUT
Try rollOver and rollOut. --- In flexcoders@yahoogroups.com, Greg Hess [EMAIL PROTECTED] wrote: Hi Folks, I have a menu that displays when a user MOUSE_OVER a button, displaying help options. I would like the menu to hide if the user moves the mouse out of the menu. I thought simply adding a MOUSE_OUT event listener to the menu would give the me the event to trigger the hide, however the MOUSE_OUT event is dispatched as soon as the mouse goes over the menu. What I would like is: - if mouse is over button or menu, display the menu, else hide the menu How can I achieve this? Thanks, Greg
RE: [flexcoders] LCDS and channel usage
Hi Robert, Chances are you're trying to use DataService with auto-sync enabled over an AMFChannel that doesn't have polling enabled; if that's the case you won't receive any pushed updates. Auto-sync can be disabled for a DataService (say you're just doing CRUD interactions with the server and don't need pushed data in your app), and in that scenario using an AMFChannel with polling disabled works fine. Any channel type can be used with any service component. There's a general overview of the channel options and why you'd prefer one over another here, and the doc team is currently working on lots of improvements to the official docset in these areas: http://www.dcooper.org/blog/client/index.cfm?mode=entryentry=8E1439AD-4E22-1671-58710DD528E9C2E7 In terms of which channels are used by the client to interact with the server, this is defined by the order that Channels are assigned to your client-side ChannelSet (if you set things up directly in code). Or in the more automatic case, it's based on your services-config.xml file default-channels config, or a specific service's default-channels or a specific destination's channels. The best practice is to just define this list once at the top level in services-config.xml within the services section: services ... default-channels channel ref=rtmp/ channel ref=amf-polling/ /default-channels /services This default setting is applied to all services and destinations, unless you override at a specific service or destination. There's really no good use case to do that though, so just define the set of channels clients should use here at the top level. This list of Channels is what is burned into your swf when you compile with the -services option, and it's used to dynamically construct a ChannelSet on the client at runtime. There's no magic in the ChannelSet to determine which Channel from among the set to connect with - it starts with the first, and advances through until it successfully connects. If it looses connectivity, it continues through the list from its current position. So this component provides reconnect and high-availability by falling back through its options. So for the example above, the client will first try to connect via RTMP to your server-side RTMP endpoint's URL, and if that fails (say the client has a firewall blocking that port), it will fall back to a connect attempt over your AMFChannel (which has polling enabled). Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 8:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS and channel usage Hi there, What channels are compatible with what service objects? For instance, I noticed the AMF family is not good for DataService. If you know of a ling that contains this service/channel matrix, I'd appreciate if you'll point it to me. Also: for each of the available services (DataService, HttpService, WebService, RemoteService), whenever they support multiple channels, what's the order these channels are being tried by the framework? Is this order configurable? How the framework decides the channel to use (the current channel)? Thanks, Robert
[flexcoders] mx.utils.URLUtil.replacePort() does not work?
Working in FB3: var newUri:String = URLUtil.replacePort(http://localhost: http://localhost: , ); The result is newUri = http://localhost:http://localhost: http://localhost:http://localhost: Should I log a bug?? Thanks.
Re: [flexcoders] Re: Hide a menu on MOUSE_OUT
Thank you! Adding a Menu even listener for MouseEvent.ROLL_OUT to hide the menu works perfect! -Greg On Fri, May 16, 2008 at 11:57 AM, redden96 [EMAIL PROTECTED] wrote: Try rollOver and rollOut. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Greg Hess [EMAIL PROTECTED] wrote: Hi Folks, I have a menu that displays when a user MOUSE_OVER a button, displaying help options. I would like the menu to hide if the user moves the mouse out of the menu. I thought simply adding a MOUSE_OUT event listener to the menu would give the me the event to trigger the hide, however the MOUSE_OUT event is dispatched as soon as the mouse goes over the menu. What I would like is: - if mouse is over button or menu, display the menu, else hide the menu How can I achieve this? Thanks, Greg
RE: [flexcoders] Re: RTMP port 2038
The RTMP endpoint runs its own internal server process to handle RTMP connections. This process needs to bind a port to accept connections on. If you're running multiple web apps on the same server, each with their own RTMP endpoint, these endpoints need to use unique ports (you can't have multiple processes bind the same server port to accept connections on). We deploy into a Java server as a web app which has pros and cons, and while the pros outweigh the cons, in this specific case RTMP configuration is not as trivial as it would be in a perfect world when you're deploying multiple apps in the same container. For servlet-based HTTP traffic, the servlet container is handling all network connections and IO, and routes inbound requests to the proper web app based on the requested URL; the web apps themselves aren't handling any network connections or HTTP traffic directly. This means that all of your web apps can be exposed on a single HTTP port (80 or 8400 or whatever) uniformly. But for RTMP, where we have to handle the networking ourselves, there's no safe way to have a single RTMP endpoint that services connections for any and all web apps because we're running within the context of a specific web app rather than as core code in front of all the web apps, and web application startup order isn't guaranteed to be deterministic and individual apps can be undeployed/redeployed at runtime making sharing a single RTMP endpoint defined in one web app with other web apps something we haven't tried to support - there are all kinds of ways for things to go wrong with that. An analogy would be trying to run each of your web apps in a unique instance of your Java server on the same machine. Try starting up multiple instances of Tomcat, each hosting just one of your web apps, where each Tomcat instance is configured to handle HTTP traffic on port 8400 - it doesn't work. So you need to define a unique port for each RTMP endpoint, and you'd need to build your client for each web app to use the proper corresponding port. Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 8:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: RTMP port 2038 Thank you all. The use case is we noticed we can't depoy the same webapp twice on the same server host (the second one won't work right, because port 2048 is already taken). We tried changing the port but it did not work as the initial port value is burnt into the SWF. BTW, I can't find the DataService in FB3 online help documentation. It used to be ther ein FB2. What happened? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Create your RTMPChannel in ActionScript and assign it to your components for use. When you want to change its URL, invoke disconnectAll() on your ChannelSet, update your RTMPChannel's URL, and reconnect (by making a remoting call, issuing a DataService fill, etc.) I'm not sure what the use case is here though? Distributing a swf that will work against various servers which may be running their RTMP endpoints on different ports? Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Thursday, May 15, 2008 3:27 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RTMP port 2038 Is it possible to change this port value in LCDS without the need to rebuild the SWF? Thanks.
RE: [flexcoders] Binding Model to selectedItem property not updating
If the value of model.ageList[5] does not change, no change event will be fired, and if quotingFormState doesn't dispatch change events for changes to the age property binding won't work then either. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ken Dunnington Sent: Friday, May 16, 2008 8:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Binding Model to selectedItem property not updating I'm currently refactoring a small application to be more MVC and am running into a few binding issues. In my Model, I store all my dataProviders, which are Arrays (because they will not change) and I also have a typed object that stores my form state as individual objects. In my View, which is mostly a bunch of ComboBoxes, I have set the dataProvider to bind to the arrays in the Model, and set the selectedItem to bind to the form state properties. I added a button which will update the form state for one of the properties when clicked, which works (the ComboBox updates to the expected value) the first time, but not on subsequent clicks. I've attached a listener to the valueCommit event on the ComboBox, and it does fire the first time. I've tried changing the Model to use ArrayCollections instead, and used the Collection API to try and update the selectedItem (by setting the form state model to the value of a getItem() call) but that isn't working either. Is there a better way to handle storing and binding form state in a well designed Flex app? I'm not using a framework, and don't really want to at this point in time (the app is fairly small, and the deadline is approaching quickly.) Any help or insight is greatly appreciated! - Ken Code snippets: The ComboBox: mx:FormItem label=Age mx:ComboBox id=age dataProvider={model.ageList} rowCount=10 selectedItem={model.quotingFormState.age} / /mx:FormItem The function called to update the ComboBox (works on first click only): private function updateAge():void { model.quotingFormState.age = model.ageList[5]; }
RE: [flexcoders] itemFocusout in datagrid
Usually, validation is handled in itemEditEnd and not itemFocusOut. Posting the actual stacktrace will help. Use a debug build so we can see line numbers From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jitendra jain Sent: Friday, May 16, 2008 4:09 AM To: flex group flex Subject: [flexcoders] itemFocusout in datagrid Hi friends, Iam writing itemFocusOut event for my data grid and the code is as follows. public function focusOutHandlerEvent(event : DataGridEvent):void{ var validateValue : NumberValidator = new NumberValidator(); var validationResult : ValidationResultEvent; validationResult = validateValue.validate(event.itemRenderer.data.number); if(validationResult.type ==ValidationResultEvent.INVALID){ errMsg=invalid; }else{ nb! sp; errMsg=valid; } } // Item Edit End Event public function preventDefaultMethods(event : DataGridEvent):void{ if(event.reason ==DataGridEventReason.NEW_COLUMN || event.reason==DataGridEventReason.NEW_ROW || event.reason==DataGridEventReason.CANCELLED){ // keep the data as it is. return; } n! bsp; if(errMsg==invalid){ event.preventDefault(); } } Is this a proper way to implement the itemFocusOut event. Moreover when i enter the 'Enter' key it throws an error #1009, findNextItemRenderer() Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798
RE: [flexcoders] Releasdate for flash player 10
is there allready a time shedule for the final release? I don't think this has been announced. Normally it's quite a few months between the first public beta and the final release. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harald Dehn Sent: Thursday, May 15, 2008 11:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Releasdate for flash player 10 is there allready a time shedule for the final release? Harald
Re: [flexcoders] Binding Model to selectedItem property not updating
Thanks Alex, I realized continuously setting the value to ageList[5] was pointless since it didn't change, and I made my form state model extend EventDispatcher, which made it possible to listen for propertyChange events being fired. But I am still trying to find information on the best way to handle binding a form's state in a more MVC style. Do I need to attach listeners to each of my form controls to manually update the state in my model each time the form changes? If my form control's selectedItem is bound to that same state model, will that cause an infinite loop of bindings firing one after the other? I've been unable to find examples of binding a form to a model beyond the very simple (and tightly coupled) examples in the Flex docs, or of two-way binding in general. On Fri, May 16, 2008 at 2:14 PM, Alex Harui [EMAIL PROTECTED] wrote: If the value of model.ageList[5] does not change, no change event will be fired, and if quotingFormState doesn't dispatch change events for changes to the age property binding won't work then either. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Ken Dunnington *Sent:* Friday, May 16, 2008 8:19 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Binding Model to selectedItem property not updating I'm currently refactoring a small application to be more MVC and am running into a few binding issues. In my Model, I store all my dataProviders, which are Arrays (because they will not change) and I also have a typed object that stores my form state as individual objects. In my View, which is mostly a bunch of ComboBoxes, I have set the dataProvider to bind to the arrays in the Model, and set the selectedItem to bind to the form state properties. I added a button which will update the form state for one of the properties when clicked, which works (the ComboBox updates to the expected value) the first time, but not on subsequent clicks. I've attached a listener to the valueCommit event on the ComboBox, and it does fire the first time. I've tried changing the Model to use ArrayCollections instead, and used the Collection API to try and update the selectedItem (by setting the form state model to the value of a getItem() call) but that isn't working either. Is there a better way to handle storing and binding form state in a well designed Flex app? I'm not using a framework, and don't really want to at this point in time (the app is fairly small, and the deadline is approaching quickly.) Any help or insight is greatly appreciated! - Ken Code snippets: The ComboBox: mx:FormItem label=Age mx:ComboBox id=age dataProvider={model.ageList} rowCount=10 selectedItem={model.quotingFormState.age} / /mx:FormItem The function called to update the ComboBox (works on first click only): private function updateAge():void { model.quotingFormState.age = model.ageList[5]; } -- The American Republic will endure until the day Congress discovers that it can bribe the public with the public's money. -- Alexis de Tocqueville
[flexcoders] Run time debug
I have created mm.cfg file in documents and settings\username folder. In the file I have entered this: ErrorReportingEnable=1 TraceOutputFileEnable=1 I have trace(something) in my code in many places. When I run it I can't find the file flashlog.txt anywhere. I am running on Server 2003. Please help.
Re: [flexcoders] Code Hinting in include-based Code Behind files
Anyone? ___ Joseph Balderson | http://joeflash.ca Flex Flash Platform Developer | Abobe Certified Developer Trainer Author, Professional Flex 3 (coming Winter 2008) Staff Writer, Community MX | http://communitymx.com/author.cfm?cid=4674 Joseph Balderson wrote: A potentially silly question, but one I have not managed to figure out. My question is, is there any way to get code hinting for MXML assets working in included as files? Often in my projects I use a pseudo-code behind for MXML files by simply including the AS code in the source prop for the Script tag in the MXML file. Say in CustomComponent.mxml, we have mx:Script source=CustomComponentCode.as/ ... mx:Button id=daBtn/ The problem is, in CustomComponentCode.as, I don't get code hinting for MXML assets declared in CustomComponent.mxml -- daBtn does not trigger code hinting, which is a real pain. I suppose one solution is to declare all component instances in AS, but that completely defeats the purpose of MXML. For smaller components, I usually land up coding the entire component in one MXML file, then separate out the AS from the MXML when it's done, but this can lead to spaghetti code, so it would be great if I could use the two files right from the start. I don't want to get into a debate about code behind techniques; I know there are other, more robust ways of using code behind such as using bona-fide classes, but the include technique seems a lot more logical and straightforward to me. Thanks,
Re: [flexcoders] Binding Model to selectedItem property not updating
Hi Ken, Do you know the Cairngorm framework ? It does what you want, and in this link you will find some intersting tutorials: http://www.davidtucker.net/category/cairngorm/ C ya On Fri, May 16, 2008 at 3:54 PM, Ken Dunnington [EMAIL PROTECTED] wrote: Thanks Alex, I realized continuously setting the value to ageList[5] was pointless since it didn't change, and I made my form state model extend EventDispatcher, which made it possible to listen for propertyChange events being fired. But I am still trying to find information on the best way to handle binding a form's state in a more MVC style. Do I need to attach listeners to each of my form controls to manually update the state in my model each time the form changes? If my form control's selectedItem is bound to that same state model, will that cause an infinite loop of bindings firing one after the other? I've been unable to find examples of binding a form to a model beyond the very simple (and tightly coupled) examples in the Flex docs, or of two-way binding in general. On Fri, May 16, 2008 at 2:14 PM, Alex Harui [EMAIL PROTECTED] wrote: If the value of model.ageList[5] does not change, no change event will be fired, and if quotingFormState doesn't dispatch change events for changes to the age property binding won't work then either. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Ken Dunnington *Sent:* Friday, May 16, 2008 8:19 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Binding Model to selectedItem property not updating I'm currently refactoring a small application to be more MVC and am running into a few binding issues. In my Model, I store all my dataProviders, which are Arrays (because they will not change) and I also have a typed object that stores my form state as individual objects. In my View, which is mostly a bunch of ComboBoxes, I have set the dataProvider to bind to the arrays in the Model, and set the selectedItem to bind to the form state properties. I added a button which will update the form state for one of the properties when clicked, which works (the ComboBox updates to the expected value) the first time, but not on subsequent clicks. I've attached a listener to the valueCommit event on the ComboBox, and it does fire the first time. I've tried changing the Model to use ArrayCollections instead, and used the Collection API to try and update the selectedItem (by setting the form state model to the value of a getItem() call) but that isn't working either. Is there a better way to handle storing and binding form state in a well designed Flex app? I'm not using a framework, and don't really want to at this point in time (the app is fairly small, and the deadline is approaching quickly.) Any help or insight is greatly appreciated! - Ken Code snippets: The ComboBox: mx:FormItem label=Age mx:ComboBox id=age dataProvider={model.ageList} rowCount=10 selectedItem={model.quotingFormState.age} / /mx:FormItem The function called to update the ComboBox (works on first click only): private function updateAge():void { model.quotingFormState.age = model.ageList[5]; } -- The American Republic will endure until the day Congress discovers that it can bribe the public with the public's money. -- Alexis de Tocqueville -- /** * Pedro Sena * System Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] SQL Lite syntax issue, need something cleared up regarding SELECT
While working on the login functionality of the application I'm developing, I noticed that SQL seems to be interpereted differently than what I'm used to. Here's my current select statement that I'm using for validation: sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; Which translates to: SELECT * FROM Up18Technicians WHERE TechName = Ross AND Password = 358029 Now, when the application gets to the execute portion, it throws this error: SQLError: 'Error #3115: SQL Error.', details:'no such column: Ross', operation:'execute' at flash.data::SQLStatement/internalExecute() at flash.data::SQLStatement/execute() at MatMgr::DataManager/techLogin()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr\DataManager.as:453] at MatMgr_Proto/login()[C:\Tech_Connect\MatMgr_Proto\src\MatMgrProtoSource.as:210] at MatMgr_Proto/__btnLogin_click()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr_Proto.mxml:18] This indicates that it is trying to find columns by the name of what was entered instead of trying to find values in those columns matching what I entered. I looked up SQL as its understood by SQL lite, but it seems a bit confusing and I'm unsure if it's even the problem. If it is, then I'm just wondering if it may have something to with perhaps the AND keyword isn't understood or maybe there's something up with how I'm using the WHERE clause. Here's the function I'm using to perform this in case it helps: public function techLogin(userName:String, pass:String):void { //This loads information needed to login technicians sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; trace(sqlText); selectStatement = new SQLStatement(); conn = new SQLConnection(); selectStatement.sqlConnection = conn; conn.open(dbFile); selectStatement.addEventListener(SQLEvent.RESULT, selectTechLoginResult); selectStatement.addEventListener(SQLErrorEvent.ERROR, errorHandler); selectStatement.text = sqlText; selectStatement.execute(); //Error happens here, doesn't go any further }
[flexcoders] Respecting backgroundImage aspect ratio
Hi Folks, Our application lets a user specify an image to use as a background for a component. We need to scale the image to fill the VBox container (max width or height) respecting the aspect ratio of the image. I have been setting the backgroundImage, and backgroundSize=100% styles on the VBox but the image is being stretched. How can I do this? Cheers, Greg
Re: [flexcoders] Binding Model to selectedItem property not updating
Thanks Pedro,I know of Cairngorm but unfortunately don't have time to factor it in on this project. I think I'll sort of fudge it with some BindingUtils calls for now, and start using a framework on the next app. :) I'm very interested in trying out Mate (http://mate.asfusion.com/) On Fri, May 16, 2008 at 3:11 PM, Pedro Sena [EMAIL PROTECTED] wrote: Hi Ken, Do you know the Cairngorm framework ? It does what you want, and in this link you will find some intersting tutorials: http://www.davidtucker.net/category/cairngorm/ C ya On Fri, May 16, 2008 at 3:54 PM, Ken Dunnington [EMAIL PROTECTED] wrote: Thanks Alex, I realized continuously setting the value to ageList[5] was pointless since it didn't change, and I made my form state model extend EventDispatcher, which made it possible to listen for propertyChange events being fired. But I am still trying to find information on the best way to handle binding a form's state in a more MVC style. Do I need to attach listeners to each of my form controls to manually update the state in my model each time the form changes? If my form control's selectedItem is bound to that same state model, will that cause an infinite loop of bindings firing one after the other? I've been unable to find examples of binding a form to a model beyond the very simple (and tightly coupled) examples in the Flex docs, or of two-way binding in general. On Fri, May 16, 2008 at 2:14 PM, Alex Harui [EMAIL PROTECTED] wrote: If the value of model.ageList[5] does not change, no change event will be fired, and if quotingFormState doesn't dispatch change events for changes to the age property binding won't work then either. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Ken Dunnington *Sent:* Friday, May 16, 2008 8:19 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Binding Model to selectedItem property not updating I'm currently refactoring a small application to be more MVC and am running into a few binding issues. In my Model, I store all my dataProviders, which are Arrays (because they will not change) and I also have a typed object that stores my form state as individual objects. In my View, which is mostly a bunch of ComboBoxes, I have set the dataProvider to bind to the arrays in the Model, and set the selectedItem to bind to the form state properties. I added a button which will update the form state for one of the properties when clicked, which works (the ComboBox updates to the expected value) the first time, but not on subsequent clicks. I've attached a listener to the valueCommit event on the ComboBox, and it does fire the first time. I've tried changing the Model to use ArrayCollections instead, and used the Collection API to try and update the selectedItem (by setting the form state model to the value of a getItem() call) but that isn't working either. Is there a better way to handle storing and binding form state in a well designed Flex app? I'm not using a framework, and don't really want to at this point in time (the app is fairly small, and the deadline is approaching quickly.) Any help or insight is greatly appreciated! - Ken Code snippets: The ComboBox: mx:FormItem label=Age mx:ComboBox id=age dataProvider={model.ageList} rowCount=10 selectedItem={model.quotingFormState.age} / /mx:FormItem The function called to update the ComboBox (works on first click only): private function updateAge():void { model.quotingFormState.age = model.ageList[5]; } -- The American Republic will endure until the day Congress discovers that it can bribe the public with the public's money. -- Alexis de Tocqueville -- /** * Pedro Sena * System Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ -- The American Republic will endure until the day Congress discovers that it can bribe the public with the public's money. -- Alexis de Tocqueville
RE: [flexcoders] SQL Lite syntax issue, need something cleared up regarding SELECT
That's not really a good way to go about using parameters with SQLite and you'll continue to have type issues. Everything is explained at the following link, including the solution to your problem: http://livedocs.adobe.com/flex/3/html/help.html?content=SQL_07.html !k _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bredwards358 Sent: Friday, May 16, 2008 1:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] SQL Lite syntax issue, need something cleared up regarding SELECT While working on the login functionality of the application I'm developing, I noticed that SQL seems to be interpereted differently than what I'm used to. Here's my current select statement that I'm using for validation: sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; Which translates to: SELECT * FROM Up18Technicians WHERE TechName = Ross AND Password = 358029 Now, when the application gets to the execute portion, it throws this error: SQLError: 'Error #3115: SQL Error.', details:'no such column: Ross', operation:'execute' at flash.data::SQLStatement/internalExecute() at flash.data::SQLStatement/execute() at MatMgr::DataManager/techLogin()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr\Data Manager.as:453] at MatMgr_Proto/login()[C:\Tech_Connect\MatMgr_Proto\src\MatMgrProtoSource.as:2 10] at MatMgr_Proto/__btnLogin_click()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr_Prot o.mxml:18] This indicates that it is trying to find columns by the name of what was entered instead of trying to find values in those columns matching what I entered. I looked up SQL as its understood by SQL lite, but it seems a bit confusing and I'm unsure if it's even the problem. If it is, then I'm just wondering if it may have something to with perhaps the AND keyword isn't understood or maybe there's something up with how I'm using the WHERE clause. Here's the function I'm using to perform this in case it helps: public function techLogin(userName:String, pass:String):void { //This loads information needed to login technicians sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; trace(sqlText); selectStatement = new SQLStatement(); conn = new SQLConnection(); selectStatement.sqlConnection = conn; conn.open(dbFile); selectStatement.addEventListener(SQLEvent.RESULT, selectTechLoginResult); selectStatement.addEventListener(SQLErrorEvent.ERROR, errorHandler); selectStatement.text = sqlText; selectStatement.execute(); //Error happens here, doesn't go any further }
RE: [flexcoders] Run time debug
On my system it is here: C:\Documents and Settings\tspratt\Application Data\Macromedia\Flash Player\Logs I think the docs explain how this is located, maybe an environment variable? Don't recall exactly. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Friday, May 16, 2008 3:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Run time debug I have created mm.cfg file in documents and settings\username folder. In the file I have entered this: ErrorReportingEnable=1 TraceOutputFileEnable=1 I have trace(something) in my code in many places. When I run it I can't find the file flashlog.txt anywhere. I am running on Server 2003. Please help.
Re: [flexcoders] SQL Lite syntax issue, need something cleared up regarding SELECT
Bread: I think you should use: sqlText = SELECT * FROM Up18Technicians WHERE TechName = ' + userName + ' AND Password = ' + pass + '; Look that I put some (') around your values C ya On Fri, May 16, 2008 at 4:18 PM, bredwards358 [EMAIL PROTECTED] wrote: While working on the login functionality of the application I'm developing, I noticed that SQL seems to be interpereted differently than what I'm used to. Here's my current select statement that I'm using for validation: sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; Which translates to: SELECT * FROM Up18Technicians WHERE TechName = Ross AND Password = 358029 Now, when the application gets to the execute portion, it throws this error: SQLError: 'Error #3115: SQL Error.', details:'no such column: Ross', operation:'execute' at flash.data::SQLStatement/internalExecute() at flash.data::SQLStatement/execute() at MatMgr::DataManager/techLogin()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr\DataManager.as:453] at MatMgr_Proto/login()[C:\Tech_Connect\MatMgr_Proto\src\MatMgrProtoSource.as:210] at MatMgr_Proto/__btnLogin_click()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr_Proto.mxml:18] This indicates that it is trying to find columns by the name of what was entered instead of trying to find values in those columns matching what I entered. I looked up SQL as its understood by SQL lite, but it seems a bit confusing and I'm unsure if it's even the problem. If it is, then I'm just wondering if it may have something to with perhaps the AND keyword isn't understood or maybe there's something up with how I'm using the WHERE clause. Here's the function I'm using to perform this in case it helps: public function techLogin(userName:String, pass:String):void { //This loads information needed to login technicians sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; trace(sqlText); selectStatement = new SQLStatement(); conn = new SQLConnection(); selectStatement.sqlConnection = conn; conn.open(dbFile); selectStatement.addEventListener(SQLEvent.RESULT, selectTechLoginResult); selectStatement.addEventListener(SQLErrorEvent.ERROR, errorHandler); selectStatement.text = sqlText; selectStatement.execute(); //Error happens here, doesn't go any further } -- /** * Pedro Sena * System Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Re: RTMP port 2038
Thanks Seth, you've explained it pretty clear. I got it - unique RTMP port is required for each RTMP endpoint. Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: The RTMP endpoint runs its own internal server process to handle RTMP connections. This process needs to bind a port to accept connections on. If you're running multiple web apps on the same server, each with their own RTMP endpoint, these endpoints need to use unique ports (you can't have multiple processes bind the same server port to accept connections on). We deploy into a Java server as a web app which has pros and cons, and while the pros outweigh the cons, in this specific case RTMP configuration is not as trivial as it would be in a perfect world when you're deploying multiple apps in the same container. For servlet-based HTTP traffic, the servlet container is handling all network connections and IO, and routes inbound requests to the proper web app based on the requested URL; the web apps themselves aren't handling any network connections or HTTP traffic directly. This means that all of your web apps can be exposed on a single HTTP port (80 or 8400 or whatever) uniformly. But for RTMP, where we have to handle the networking ourselves, there's no safe way to have a single RTMP endpoint that services connections for any and all web apps because we're running within the context of a specific web app rather than as core code in front of all the web apps, and web application startup order isn't guaranteed to be deterministic and individual apps can be undeployed/redeployed at runtime making sharing a single RTMP endpoint defined in one web app with other web apps something we haven't tried to support - there are all kinds of ways for things to go wrong with that. An analogy would be trying to run each of your web apps in a unique instance of your Java server on the same machine. Try starting up multiple instances of Tomcat, each hosting just one of your web apps, where each Tomcat instance is configured to handle HTTP traffic on port 8400 - it doesn't work. So you need to define a unique port for each RTMP endpoint, and you'd need to build your client for each web app to use the proper corresponding port. Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 8:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: RTMP port 2038 Thank you all. The use case is we noticed we can't depoy the same webapp twice on the same server host (the second one won't work right, because port 2048 is already taken). We tried changing the port but it did not work as the initial port value is burnt into the SWF. BTW, I can't find the DataService in FB3 online help documentation. It used to be ther ein FB2. What happened? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@ wrote: Create your RTMPChannel in ActionScript and assign it to your components for use. When you want to change its URL, invoke disconnectAll() on your ChannelSet, update your RTMPChannel's URL, and reconnect (by making a remoting call, issuing a DataService fill, etc.) I'm not sure what the use case is here though? Distributing a swf that will work against various servers which may be running their RTMP endpoints on different ports? Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Thursday, May 15, 2008 3:27 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RTMP port 2038 Is it possible to change this port value in LCDS without the need to rebuild the SWF? Thanks.
[flexcoders] The BlazeDS server ?
Hi Do I have to install BlazeDS if I want to use remoteobject with Coldfusion and Flex. I am very confuse when I need use BlazeDS.Please give me an idea. Thanks Mark
[flexcoders] Re: LCDS and channel usage
Thanks Seth, this really helps and your comments are very detailed and useful. I really appreciate these comprehensive comments of yours! I have a question though, in regards to your statement that Any channel type can be used with any service component and whit the example of a DataService using the AMFChannel. I tried the default AMF Channel configured in LCDS xml files (the one with id = my-amf) as the channel to be used by my DataService object. I got an error saying the DataService can't use this AMF channel. The same channel is successfully used by my RemoteObject class. I wonder why DataService can't use the AMF Channel in my case? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Robert, Chances are you're trying to use DataService with auto-sync enabled over an AMFChannel that doesn't have polling enabled; if that's the case you won't receive any pushed updates. Auto-sync can be disabled for a DataService (say you're just doing CRUD interactions with the server and don't need pushed data in your app), and in that scenario using an AMFChannel with polling disabled works fine. Any channel type can be used with any service component. There's a general overview of the channel options and why you'd prefer one over another here, and the doc team is currently working on lots of improvements to the official docset in these areas: http://www.dcooper.org/blog/client/index.cfm?mode=entryentry=8E1439AD-4\ E22-1671-58710DD528E9C2E7 In terms of which channels are used by the client to interact with the server, this is defined by the order that Channels are assigned to your client-side ChannelSet (if you set things up directly in code). Or in the more automatic case, it's based on your services-config.xml file default-channels config, or a specific service's default-channels or a specific destination's channels. The best practice is to just define this list once at the top level in services-config.xml within the services section: services ... default-channels channel ref=rtmp/ channel ref=amf-polling/ /default-channels /services This default setting is applied to all services and destinations, unless you override at a specific service or destination. There's really no good use case to do that though, so just define the set of channels clients should use here at the top level. This list of Channels is what is burned into your swf when you compile with the -services option, and it's used to dynamically construct a ChannelSet on the client at runtime. There's no magic in the ChannelSet to determine which Channel from among the set to connect with - it starts with the first, and advances through until it successfully connects. If it looses connectivity, it continues through the list from its current position. So this component provides reconnect and high-availability by falling back through its options. So for the example above, the client will first try to connect via RTMP to your server-side RTMP endpoint's URL, and if that fails (say the client has a firewall blocking that port), it will fall back to a connect attempt over your AMFChannel (which has polling enabled). Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 8:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS and channel usage Hi there, What channels are compatible with what service objects? For instance, I noticed the AMF family is not good for DataService. If you know of a ling that contains this service/channel matrix, I'd appreciate if you'll point it to me. Also: for each of the available services (DataService, HttpService, WebService, RemoteService), whenever they support multiple channels, what's the order these channels are being tried by the framework? Is this order configurable? How the framework decides the channel to use (the current channel)? Thanks, Robert
[flexcoders] Is the context-root value burnt into SWF?
Hi there, Say I'm using a context root value MyApp when compiling my LCDS-based Flex application. I package everything into an archive called MyApp.war, depoly it on my Tomcat, startup tomcat, access the application using http://localhost:8080/MyApp http://localhost:8080/MyApp , everything works fine (I have an index.html there that serves up the SWF) Now, if I want to deploy using a different context root for my application (say MyApp1)... call it using the URL http://localhost:8080/MyApp http://localhost:8080/MyApp1 1 ... nothing would work this time. The SWF still gets loaded, and that's it. It seems this context-root value that's set in flex_config.xml gets somehow burnt in the SWF? what can I do to have the app running under a different context root, without the need to rebuild the SWF? Also, a question: why this context-root configuration is required in Flex environment? An application normally auto-detects it's context root at runtime. An application is usually untied from a specific context root and can be deployed using any context root. Thanks, Robert
RE: [flexcoders] Re: LCDS and channel usage
Hi Robert, What's the specific error message you're seeing and where are you seeing it? If your amf channel is configured to poll you should be fine, and if it's not, as long as DataService.autoSyncEnabled = false you'll still be fine. Otherwise, I'd except you to get a warning in the client log, but no errors. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS and channel usage Thanks Seth, this really helps and your comments are very detailed and useful. I really appreciate these comprehensive comments of yours! I have a question though, in regards to your statement that Any channel type can be used with any service component and whit the example of a DataService using the AMFChannel. I tried the default AMF Channel configured in LCDS xml files (the one with id = my-amf) as the channel to be used by my DataService object. I got an error saying the DataService can't use this AMF channel. The same channel is successfully used by my RemoteObject class. I wonder why DataService can't use the AMF Channel in my case? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Robert, Chances are you're trying to use DataService with auto-sync enabled over an AMFChannel that doesn't have polling enabled; if that's the case you won't receive any pushed updates. Auto-sync can be disabled for a DataService (say you're just doing CRUD interactions with the server and don't need pushed data in your app), and in that scenario using an AMFChannel with polling disabled works fine. Any channel type can be used with any service component. There's a general overview of the channel options and why you'd prefer one over another here, and the doc team is currently working on lots of improvements to the official docset in these areas: http://www.dcooper.org/blog/client/index.cfm?mode=entryentry=8E1439AD-4E22-1671-58710DD528E9C2E7 In terms of whi! ch channels are used by the client to interact with the server, this is defined by the order that Channels are assigned to your client-side ChannelSet (if you set things up directly in code). Or in the more automatic case, it's based on your services-config.xml file default-channels config, or a specific service's default-channels or a specific destination's channels. The best practice is to just define this list once at the top level in services-config.xml within the services section: services ... default-channels channel ref=rtmp/ channel ref=amf-polling/ /default-channels /services This default setting is applied to all services and destinations, unless you override at a specific service or destination. There's really no good use case to do that though, so just define the set of channels clients s! hould use here at the top level. This list of Channels is what! is bur ned into your swf when you compile with the -services option, and it's used to dynamically construct a ChannelSet on the client at runtime. There's no magic in the ChannelSet to determine which Channel from among the set to connect with - it starts with the first, and advances through until it successfully connects. If it looses connectivity, it continues through the list from its current position. So this component provides reconnect and high-availability by falling back through its options. So for the example above, the client will first try to connect via RTMP to your server-side RTMP endpoint's URL, and if that fails (say the client has a firewall blocking that port), it will fall back to a connect attempt over your AMFChannel (which has polling enabled). Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 1! 6, 2008 8:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS and channel usage Hi there, What channels are compatible with what service objects? For instance, I noticed the AMF family is not good for DataService. If you know of a ling that contains this service/channel matrix, I'd appreciate if you'll point it to me. Also: for each of the available services (DataService, HttpService, WebService, RemoteService), whenever they support multiple channels, what's the order these channels are being tried by the framework? Is this order configurable? How the framework decides the channel to use (the current channel)? Thanks, Robert
RE: [flexcoders] The BlazeDS server ?
If you're running ColdFusion I believe it bundles support for RemoteObject so you should be all set. BlazeDS lets you hook your Flex client up to a Java app server, and server-side Java resources, for those who aren't running ColdFusion. Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markflex2007 Sent: Friday, May 16, 2008 1:27 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] The BlazeDS server ? Hi Do I have to install BlazeDS if I want to use remoteobject with Coldfusion and Flex. I am very confuse when I need use BlazeDS.Please give me an idea. Thanks Mark
[flexcoders] Re: mx.utils.URLUtil.replacePort() does not work?
Bug logged: https://bugs.adobe.com/jira/browse/SDK-15585 https://bugs.adobe.com/jira/browse/SDK-15585 --- In flexcoders@yahoogroups.com, Robert Csiki [EMAIL PROTECTED] wrote: Working in FB3: var newUri:String = URLUtil.replacePort(http://localhost: http://localhost: , ); The result is newUri = http://localhost:http://localhost: http://localhost:http://localhost: Should I log a bug?? Thanks.
Re: [flexcoders] SQL Lite syntax issue, need something cleared up regarding SELECT
And then google for sql injection. Best, Marcus Pedro Sena wrote: Bread: I think you should use: sqlText = SELECT * FROM Up18Technicians WHERE TechName = ' + userName + ' AND Password = ' + pass + '; Look that I put some (') around your values C ya On Fri, May 16, 2008 at 4:18 PM, bredwards358 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: While working on the login functionality of the application I'm developing, I noticed that SQL seems to be interpereted differently than what I'm used to. Here's my current select statement that I'm using for validation: sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; Which translates to: SELECT * FROM Up18Technicians WHERE TechName = Ross AND Password = 358029 Now, when the application gets to the execute portion, it throws this error: SQLError: 'Error #3115: SQL Error.', details:'no such column: Ross', operation:'execute' at flash.data::SQLStatement/internalExecute() at flash.data::SQLStatement/execute() at MatMgr::DataManager/techLogin()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr\DataManager.as:453] at MatMgr_Proto/login()[C:\Tech_Connect\MatMgr_Proto\src\MatMgrProtoSource.as:210] at MatMgr_Proto/__btnLogin_click()[C:\Tech_Connect\MatMgr_Proto\src\MatMgr_Proto.mxml:18] This indicates that it is trying to find columns by the name of what was entered instead of trying to find values in those columns matching what I entered. I looked up SQL as its understood by SQL lite, but it seems a bit confusing and I'm unsure if it's even the problem. If it is, then I'm just wondering if it may have something to with perhaps the AND keyword isn't understood or maybe there's something up with how I'm using the WHERE clause. Here's the function I'm using to perform this in case it helps: public function techLogin(userName:String, pass:String):void { //This loads information needed to login technicians sqlText = SELECT * FROM Up18Technicians WHERE TechName = + userName + AND Password = + pass; trace(sqlText); selectStatement = new SQLStatement(); conn = new SQLConnection(); selectStatement.sqlConnection = conn; conn.open(dbFile); selectStatement.addEventListener(SQLEvent.RESULT, selectTechLoginResult); selectStatement.addEventListener(SQLErrorEvent.ERROR, errorHandler); selectStatement.text = sqlText; selectStatement.execute(); //Error happens here, doesn't go any further }
[flexcoders] Panoramics XDEPTH HDRI 32bit Images
Hi Everyone, I would like to bring peoples attention to the 32 bit XDepth ( www.xdepth.com ) image format, and if possible get some help on how to get this to work within FLEX. I suspect it won't be possible at the moment. In the ideal scenario, I would like to combine a panoramic image in the XDP format, as the .xdp image can be renamed to .jpg its easy to bring the image into flex or any other program and edit with it as normal. The developers of XDepth have provided me with the code to use in a normal web page, but I have no idea if it can be used in flex. or If it can be integrated to control the images once it has passed through Flex or Pano2VR I have a number of 32bit images and panoramics (which I am not sure if the panoramics are now only 8bit after they pass through the pano creation software) , I assume so??? If I am not mistaken the only way to use the panoramas is probably flash paper or something If anyone would like access to these image for testing purposes I would be happy to provide some. this is the only code i have object id=xdcont classid=clsid:AB21F56B-651E-4644-994D- 56B3E78F8047 CODEBASE=http://www.xdepth.com/ocx/XDepth.ocx#version=1,0,0,8; width=500 height=391/object script language=JavaScript function showImage(imgName) { imgOn = (http://www.yourwebsite.com/images; + imgName) xdcont.SetImagePath(imgOn) } /script Hope someone can help cheers john my first flex site needs more work www.visual-image.co.uk
[flexcoders] Apache 1.3.26 vs 2.0 with Flex 2.0 app
I have a flex application that runs fine on Apache 2.0 (with IE). It just displays a blank page with Apache 1.3.26. Has anyone experienced this problem? Is it a known issue? Thanks!
RE: [flexcoders] Is the context-root value burnt into SWF?
A context root is a Java servlet-ism, which allows the container to route incoming requests to the correct web app. In HTML-land if you're using relative URLs, you generally never have to worry about this because the right value will be used automatically. It's a little more complicated for a non-HTML client. The context root for a web app can either be empty (i.e. /) or non-empty (i.e. /MyApp), and on the client when a swf loads, it can inspect its URL but it doesn't have any way to know what the server-side context root is. The MessageBrokerServlet that processes HTTP-based requests from Flex clients is not relative to where the swf was loaded from. You can define its path, which will generally be something like: http://{server}:{port}/{context.root}/messagebrokerservlet, but it could be anything. To send a request to it successfully, the client needs to use the correct context root. Take your URL below for example, http://localhost:8080/MyApp/..., is the context root / or is it /MyApp - who knows? Only the server. So unlike server name and port, the swf can't dynamically determine the correct context root value at runtime on the client. This means you need to either: 1. Specify it at compile time by hardcoding the proper context root into the URL in your services-config.xml file, or by using a {context.root} token in your URL in services-config.xml and passing the desired value at compile time using the mxmlc -context-root flag. 2. Hardcode it into your client side ActionScript code. 3. Use the web tier mxmlc compiler which can replace a {context.root} token with the correct value using HttpServletRequest#getContextPath() when you request a .mxml in the browser Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:45 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Is the context-root value burnt into SWF? Hi there, Say I'm using a context root value MyApp when compiling my LCDS-based Flex application. I package everything into an archive called MyApp.war, depoly it on my Tomcat, startup tomcat, access the application using http://localhost:8080/MyApp, everything works fine (I have an index.html there that serves up the SWF) Now, if I want to deploy using a different context root for my application (say MyApp1)... call it using the URL http://localhost:8080/MyApp1 ... nothing would work this time. The SWF still gets loaded, and that's it. It seems this context-root value that's set in flex_config.xml gets somehow burnt in the SWF? what can I do to have the app running under a different context root, without the need to rebuild the SWF? Also, a question: why this context-root configuration is required in Flex environment? An application normally auto-detects it's context root at runtime. An application is usually untied from a specific context root and can be deployed using any context root. Thanks, Robert
[flexcoders] Re: LCDS and channel usage
Hi Seth, I was getting the error because I did not restart my app server after switching the channel from RTMP to AMF, for my DataService. After making the change in data-management-config.xml, I just recompiled the Flex part, but forgot to restart Tomcat. Now after restarting the app server I don't see any errors, everything works fine, and I can see my DataService request with Charles, using AMF Channel this time. Sorry for the false alarm! My bad.. cheers, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Robert, What's the specific error message you're seeing and where are you seeing it? If your amf channel is configured to poll you should be fine, and if it's not, as long as DataService.autoSyncEnabled = false you'll still be fine. Otherwise, I'd except you to get a warning in the client log, but no errors. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS and channel usage Thanks Seth, this really helps and your comments are very detailed and useful. I really appreciate these comprehensive comments of yours! I have a question though, in regards to your statement that Any channel type can be used with any service component and whit the example of a DataService using the AMFChannel. I tried the default AMF Channel configured in LCDS xml files (the one with id = my-amf) as the channel to be used by my DataService object. I got an error saying the DataService can't use this AMF channel. The same channel is successfully used by my RemoteObject class. I wonder why DataService can't use the AMF Channel in my case? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@ wrote: Hi Robert, Chances are you're trying to use DataService with auto-sync enabled over an AMFChannel that doesn't have polling enabled; if that's the case you won't receive any pushed updates. Auto-sync can be disabled for a DataService (say you're just doing CRUD interactions with the server and don't need pushed data in your app), and in that scenario using an AMFChannel with polling disabled works fine. Any channel type can be used with any service component. There's a general overview of the channel options and why you'd prefer one over another here, and the doc team is currently working on lots of improvements to the official docset in these areas: http://www.dcooper.org/blog/client/index.cfm?mode=entryentry=8E1439AD-4\ E22-1671-58710DD528E9C2E7 In terms of whi! ch channels are used by the client to interact with the server, this is defined by the order that Channels are assigned to your client-side ChannelSet (if you set things up directly in code). Or in the more automatic case, it's based on your services-config.xml file default-channels config, or a specific service's default-channels or a specific destination's channels. The best practice is to just define this list once at the top level in services-config.xml within the services section: services ... default-channels channel ref=rtmp/ channel ref=amf-polling/ /default-channels /services This default setting is applied to all services and destinations, unless you override at a specific service or destination. There's really no good use case to do that though, so just define the set of channels clients s! hould use here at the top level. This list of Channels is what! is bur ned into your swf when you compile with the -services option, and it's used to dynamically construct a ChannelSet on the client at runtime. There's no magic in the ChannelSet to determine which Channel from among the set to connect with - it starts with the first, and advances through until it successfully connects. If it looses connectivity, it continues through the list from its current position. So this component provides reconnect and high-availability by falling back through its options. So for the example above, the client will first try to connect via RTMP to your server-side RTMP endpoint's URL, and if that fails (say the client has a firewall blocking that port), it will fall back to a connect attempt over your AMFChannel (which has polling enabled). Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 1! 6, 2008 8:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS and channel usage Hi there, What channels are compatible with what service objects? For instance, I noticed the AMF family is not good for DataService. If you know of a ling that contains this service/channel matrix, I'd appreciate if you'll point it to me. Also: for each of the available services (DataService, HttpService, WebService, RemoteService), whenever they support multiple channels, what's the order these channels are being tried by the framework? Is this order
[flexcoders] Re: LCDS and channel usage
Do you know why the template LCDS WAR uses RTMP channel in data-management-config.xml and the AMF one in remoting-config.xml? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Robert, What's the specific error message you're seeing and where are you seeing it? If your amf channel is configured to poll you should be fine, and if it's not, as long as DataService.autoSyncEnabled = false you'll still be fine. Otherwise, I'd except you to get a warning in the client log, but no errors. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS and channel usage Thanks Seth, this really helps and your comments are very detailed and useful. I really appreciate these comprehensive comments of yours! I have a question though, in regards to your statement that Any channel type can be used with any service component and whit the example of a DataService using the AMFChannel. I tried the default AMF Channel configured in LCDS xml files (the one with id = my-amf) as the channel to be used by my DataService object. I got an error saying the DataService can't use this AMF channel. The same channel is successfully used by my RemoteObject class. I wonder why DataService can't use the AMF Channel in my case? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@ wrote: Hi Robert, Chances are you're trying to use DataService with auto-sync enabled over an AMFChannel that doesn't have polling enabled; if that's the case you won't receive any pushed updates. Auto-sync can be disabled for a DataService (say you're just doing CRUD interactions with the server and don't need pushed data in your app), and in that scenario using an AMFChannel with polling disabled works fine. Any channel type can be used with any service component. There's a general overview of the channel options and why you'd prefer one over another here, and the doc team is currently working on lots of improvements to the official docset in these areas: http://www.dcooper.org/blog/client/index.cfm?mode=entryentry=8E1439AD-4\ E22-1671-58710DD528E9C2E7 In terms of whi! ch channels are used by the client to interact with the server, this is defined by the order that Channels are assigned to your client-side ChannelSet (if you set things up directly in code). Or in the more automatic case, it's based on your services-config.xml file default-channels config, or a specific service's default-channels or a specific destination's channels. The best practice is to just define this list once at the top level in services-config.xml within the services section: services ... default-channels channel ref=rtmp/ channel ref=amf-polling/ /default-channels /services This default setting is applied to all services and destinations, unless you override at a specific service or destination. There's really no good use case to do that though, so just define the set of channels clients s! hould use here at the top level. This list of Channels is what! is bur ned into your swf when you compile with the -services option, and it's used to dynamically construct a ChannelSet on the client at runtime. There's no magic in the ChannelSet to determine which Channel from among the set to connect with - it starts with the first, and advances through until it successfully connects. If it looses connectivity, it continues through the list from its current position. So this component provides reconnect and high-availability by falling back through its options. So for the example above, the client will first try to connect via RTMP to your server-side RTMP endpoint's URL, and if that fails (say the client has a firewall blocking that port), it will fall back to a connect attempt over your AMFChannel (which has polling enabled). Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 1! 6, 2008 8:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS and channel usage Hi there, What channels are compatible with what service objects? For instance, I noticed the AMF family is not good for DataService. If you know of a ling that contains this service/channel matrix, I'd appreciate if you'll point it to me. Also: for each of the available services (DataService, HttpService, WebService, RemoteService), whenever they support multiple channels, what's the order these channels are being tried by the framework? Is this order configurable? How the framework decides the channel to use (the current channel)? Thanks, Robert
[flexcoders] FlexModule_j2ee Issues with Flex3SDK
HI All, I am unable to use the FlexModule_j2ee with Flex3 SDK and BlazeDS. It seems like this is a Flex SDK Issue. The Error i am getting is : 05/16 11:35:23 ERROR java.lang.NullPointerException at flex.webtier.server.j2ee.BaseCompileFilter.getDependenciesFromCompilationUnits(BaseCompileFilter.java:215) at flex.webtier.server.j2ee.IncrementalCompileFilter.compileMxml(IncrementalCompileFilter.java:114) at flex.webtier.server.j2ee.BaseCompileFilter.mxmlToSwf(BaseCompileFilter.java:322) at flex.webtier.server.j2ee.BaseCompileFilter.invoke(BaseCompileFilter.java:60) at flex.webtier.server.j2ee.RecompileFilter.invoke(RecompileFilter.java:37) at flex.webtier.server.j2ee.PathExistsFilter.invoke(PathExistsFilter.java:42) at flex.webtier.server.j2ee.MxmlServlet.doGet(MxmlServlet.java:163) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at flex.bootstrap.BootstrapServlet.service(BootstrapServlet.java:114) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:619) Has any one succeded in deploying a Web App using BlazeDS+ Flex3SDK . If so could you pls post the list of JAR Files ( specifically what version of flex-webtier.jar you are using..) Thanks Mars
[flexcoders] Re: FlexModule_j2ee Issues with Flex3SDK
Hi All, The production-mode is set to false . ( As i found in one of the earlier posts that setting the production mode to true breaks the app with Flex2SDK.) Mars --- In flexcoders@yahoogroups.com, sk_acura [EMAIL PROTECTED] wrote: HI All, I am unable to use the FlexModule_j2ee with Flex3 SDK and BlazeDS. It seems like this is a Flex SDK Issue. The Error i am getting is : 05/16 11:35:23 ERROR java.lang.NullPointerException at flex.webtier.server.j2ee.BaseCompileFilter.getDependenciesFromCompilationUnits(BaseCompileFilter.java:215) at flex.webtier.server.j2ee.IncrementalCompileFilter.compileMxml(IncrementalCompileFilter.java:114) at flex.webtier.server.j2ee.BaseCompileFilter.mxmlToSwf(BaseCompileFilter.java:322) at flex.webtier.server.j2ee.BaseCompileFilter.invoke(BaseCompileFilter.java:60) at flex.webtier.server.j2ee.RecompileFilter.invoke(RecompileFilter.java:37) at flex.webtier.server.j2ee.PathExistsFilter.invoke(PathExistsFilter.java:42) at flex.webtier.server.j2ee.MxmlServlet.doGet(MxmlServlet.java:163) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at flex.bootstrap.BootstrapServlet.service(BootstrapServlet.java:114) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:619) Has any one succeded in deploying a Web App using BlazeDS+ Flex3SDK . If so could you pls post the list of JAR Files ( specifically what version of flex-webtier.jar you are using..) Thanks Mars
[flexcoders] bug in setMonth() method?
Hi, all; I'm working on making an app that will allow users to navigate from one month to the next based on a start date and end date. I noticed some interesting effects with the date object and days that fall outside the 1-31 range (http://tinyurl.com/5qc46j), so I thought I'd try something similar with months. What I find is if the current month is 11 and you add 1 to it, you'll actually wind up with a date that's not in the _next_ year, but one in the year following. Here's my code public function makeDisplayedMonths(beginDate:Date, endDate:Date):void { var today:Date= new Date(); //set up date for loop var parseDate:Date = beginDate; //equalize parsedate and enddate parseDate.setDate(1); endDate.setDate(1); while (parseDate = endDate) { //update date parseDate.setMonth(++parseDate.month); trace(parseDate, endDate); } } the trace is this Tue Jul 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Fri Aug 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Mon Sep 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Wed Oct 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Sat Nov 1 00:00:00 GMT-0500 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Mon Dec 1 00:00:00 GMT-0600 2008 Thu Jan 1 00:00:00 GMT-0600 2009 Fri Jan 1 00:00:00 GMT-0600 2010 Thu Jan 1 00:00:00 GMT-0600 2009 Note that it goes from Dec 1 2008 to Jan 1 2010, skipping 2009 altogether. Obviously now I know this I can code around it, but it seems like it should either throw an error that the month is out of range or just keep incrementing. Or have I missed something here? Thanks; Amy
[flexcoders] Re: Is the context-root value burnt into SWF?
Thanks Seth, I understand it's different in Flex world. So does this mean customers are stuck with the context root we used when compiling the application (e.g. which is equals to the application WAR filename, less the extension)? We do not package the source code, all they get is the SWFs and some html wrappers. Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: A context root is a Java servlet-ism, which allows the container to route incoming requests to the correct web app. In HTML-land if you're using relative URLs, you generally never have to worry about this because the right value will be used automatically. It's a little more complicated for a non-HTML client. The context root for a web app can either be empty (i.e. /) or non-empty (i.e. /MyApp), and on the client when a swf loads, it can inspect its URL but it doesn't have any way to know what the server-side context root is. The MessageBrokerServlet that processes HTTP-based requests from Flex clients is not relative to where the swf was loaded from. You can define its path, which will generally be something like: http://{server}:{port}/{context.root}/messagebrokerservlet, but it could be anything. To send a request to it successfully, the client needs to use the correct context root. Take your URL below for example, http://localhost:8080/MyApp/..., is the context root / or is it /MyApp - who knows? Only the server. So unlike server name and port, the swf can't dynamically determine the correct context root value at runtime on the client. This means you need to either: 1. Specify it at compile time by hardcoding the proper context root into the URL in your services-config.xml file, or by using a {context.root} token in your URL in services-config.xml and passing the desired value at compile time using the mxmlc -context-root flag. 2. Hardcode it into your client side ActionScript code. 3. Use the web tier mxmlc compiler which can replace a {context.root} token with the correct value using HttpServletRequest#getContextPath() when you request a .mxml in the browser Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:45 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Is the context-root value burnt into SWF? Hi there, Say I'm using a context root value MyApp when compiling my LCDS-based Flex application. I package everything into an archive called MyApp.war, depoly it on my Tomcat, startup tomcat, access the application using http://localhost:8080/MyApp, everything works fine (I have an index.html there that serves up the SWF) Now, if I want to deploy using a different context root for my application (say MyApp1)... call it using the URL http://localhost:8080/MyApp1 ... nothing would work this time. The SWF still gets loaded, and that's it. It seems this context-root value that's set in flex_config.xml gets somehow burnt in the SWF? what can I do to have the app running under a different context root, without the need to rebuild the SWF? Also, a question: why this context-root configuration is required in Flex environment? An application normally auto-detects it's context root at runtime. An application is usually untied from a specific context root and can be deployed using any context root. Thanks, Robert
[flexcoders] Re: Respecting backgroundImage aspect ratio
Hi Greg, Without going under the hood, you'll probably want to add a couple more layers to your component. The backgroundImage propeties of a container don't allow you to use the maintainAspectRation property. However, the Image control does. So, one way that you can work around this is to use a Canvas as the main component container and layer a VBox on top of an Image (used for the backgroundImage). This gets trick sometimes; depending on how you set the parent and/or child dimensions. But, if you set either the Image height or width exclusively, and use the maintainAspectRatio, the image will scale correctly. -TH --- In flexcoders@yahoogroups.com, Greg Hess [EMAIL PROTECTED] wrote: Hi Folks, Our application lets a user specify an image to use as a background for a component. We need to scale the image to fill the VBox container (max width or height) respecting the aspect ratio of the image. I have been setting the backgroundImage, and backgroundSize=100% styles on the VBox but the image is being stretched. How can I do this? Cheers, Greg
RE: [flexcoders] Re: Is the context-root value burnt into SWF?
What about allowing your customers to edit the HTML wrapper to pass a flashvar in to the swf that explicitly defines the context root they're deploying to? Your code could check for this value and do your own string replace of any {context.root} tokens in your channel uris with this value before connecting (be careful when handling empty context root values). Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 2:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Is the context-root value burnt into SWF? Thanks Seth, I understand it's different in Flex world. So does this mean customers are stuck with the context root we used when compiling the application (e.g. which is equals to the application WAR filename, less the extension)? We do not package the source code, all they get is the SWFs and some html wrappers. Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: A context root is a Java servlet-ism, which allows the container to route incoming requests to the correct web app. In HTML-land if you're using relative URLs, you generally never have to worry about this because the right value will be used automatically. It's a little more complicated for a non-HTML client. The context root for a web app can either be empty (i.e. /) or non-empty (i.e. /MyApp), and on the client when a swf loads, it can inspect its URL but it doesn't have any way to know what the server-side context root is. The MessageBrokerServlet that processes HTTP-based requests from Flex clients is not relative to where the swf was loaded from. You can define its path, which will generally be something like: http://{server}:{port}/{context.root}/messagebrokerservlet, but it could be anything. To send a request to it successfully, the client needs to use the correct context root. Take your URL below for example, http://localhost:8080/MyApp/..., is the context root / or is it /MyApp - who knows? Only the server. So unlike server name and port, the swf can't dynamically determine the correct context root value at runtime on the client. This means you need to either: 1. Specify it at compile time by hardcoding the proper context root into the URL in your services-config.xml file, or by using a {context.root} token in your URL in services-config.xml and passing the desired value at compile time using the mxmlc -context-root flag. 2. Hardcode it into your client side ActionScript code. 3. Use the web tier mxmlc compiler which can replace a {context.root} token with the correct value using HttpServletRequest#getContextPath() when you request a .mxml in the browser Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:45 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Is the context-root value burnt into SWF? Hi there, Say I'm using a context root value MyApp when compiling my LCDS-based Flex application. I package everything into an archive called MyApp.war, depoly it on my Tomcat, startup tomcat, access the application using http://localhost:8080/MyApp, everything works fine (I have an index.html there that serves up the SWF) Now, if I want to deploy using a different context root for my application (say MyApp1)... call it using the URL http://localhost:8080/MyApp1 ... nothing would work this time. The SWF still gets loaded, and that's it. It seems this context-root value that's set in flex_config.xml gets somehow burnt in the SWF? what can I do to have the app running under a different context root, without the need to rebuild the SWF? Also, a question: why this context-root configuration is required in Flex environment? An application normally auto-detects it's context root at runtime. An application is usually untied from a specific context root and can be deployed using any context root. Thanks, Robert
RE: [flexcoders] Re: LCDS and channel usage
Probably because if you're only using just one or the other in your app (data management or remoting) those would be the preferred default channels. But if you're using multiple services in the same app, which is common, you'd want to avoid defining unique channels for each service and instead use a common set of default channels across all of them. The docset for the upcoming 2.6 release does a much better job of explaining much of this than the current docs do. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 2:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS and channel usage Do you know why the template LCDS WAR uses RTMP channel in data-management-config.xml and the AMF one in remoting-config.xml? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Robert, What's the specific error message you're seeing and where are you seeing it? If your amf channel is configured to poll you should be fine, and if it's not, as long as DataService.autoSyncEnabled = false you'll still be fine. Otherwise, I'd except you to get a warning in the client log, but no errors. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS and channel usage Thanks Seth, this really helps and your comments are very detailed and useful. I really appreciate these comprehensive comments of yours! I have a question though, in regards to your statement that Any channel type ! can be used with any service component and whit the example of a DataService using the AMFChannel. I tried the default AMF Channel configured in LCDS xml files (the one with id = my-amf) as the channel to be used by my DataService object. I got an error saying the DataService can't use this AMF channel. The same channel is successfully used by my RemoteObject class. I wonder why DataService can't use the AMF Channel in my case? Thanks, Robert --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@ wrote: Hi Robert, Chances are you're trying to use DataService with auto-sync enabled over an AMFChannel that doesn't have polling enabled; if that's the case you won't receive any pushed updates. Auto-sync can be disabled for a DataService (say you're just doing CRUD interactions with the server and don't need pushed data in your app), and in that scenario usi! ng an AMFChannel with polling disabled works fine. ! ; g t; Any channel type can be used with any service component. There's a general overview of the channel options and why you'd prefer one over another here, and the doc team is currently working on lots of improvements to the official docset in these areas: http://www.dcooper.org/blog/client/index.cfm?mode=entryentry=8E1439AD-4E22-1671-58710DD528E9C2E7 In terms of whi! ch channels are used by the client to interact with the server, this is defined by the order that Channels are assigned to your client-side ChannelSet (if you set things up directly in code). Or in the more automatic case, it's based on your services-config.xml file default-channels config, or a specific service's default-channels or a specific destination's channels. The best practice is to just define this list once at the top level in services-config.xml within the services section: services ... default-channels channel ref=rtmp/ channel ref=amf-polling/ /default-channels /services This default setting is applied to all services and destinations, unless you override at a specific service or destination. There's really no good use case to do that though, so just define the set of channels clients s! hould use here at the top level. This list of Channels is what! is bur ned into your swf when you compile with the -services option, and it's used to dynamically construct a ChannelSet on the client at runtime. There's no magic in the ChannelSet to determine which Channel from among the set to connect with - it starts with the first, and advances through until it successfully connects. If it looses connectivity, it continues through the list from its current position. So t! his component provides reconnect and high-availability by fall! ing back through its options. So for the example above, the client will first try to connect via RTMP to your server-side RTMP endpoint's URL, and if that fails (say the client has a firewall blocking that port), it will fall back to a connect attempt over your AMFChannel (which has polling enabled). Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 1! 6, 2008 8:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS and channel
[flexcoders] TabBar and percentage width
Hi, all; I have a tabbar that is in an HBox that is in an Application. The TabBar and the HBox are both set to 100%. If the window is wider than the natural width of the tabbar and I then resize it, then everything works as expected...the tab labels will truncate and everything will squish together to reflect the change. If I then close the browser at that width and relaunch the app, the tabs are all full size and extend off the edge of the page with no way to get to them (unless you resize the browser window). Is this expected behavior? TIA; Amy
[flexcoders] Re: Is the context-root value burnt into SWF?
Thanks Seth. We're using an XML config file the SWF reads at startup, I can add there a node for the context root configuration, so everyone will be happy. Robert --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: What about allowing your customers to edit the HTML wrapper to pass a flashvar in to the swf that explicitly defines the context root they're deploying to? Your code could check for this value and do your own string replace of any {context.root} tokens in your channel uris with this value before connecting (be careful when handling empty context root values). Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 2:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Is the context-root value burnt into SWF? Thanks Seth, I understand it's different in Flex world. So does this mean customers are stuck with the context root we used when compiling the application (e.g. which is equals to the application WAR filename, less the extension)? We do not package the source code, all they get is the SWFs and some html wrappers. Robert --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@ wrote: A context root is a Java servlet-ism, which allows the container to route incoming requests to the correct web app. In HTML-land if you're using relative URLs, you generally never have to worry about this because the right value will be used automatically. It's a little more complicated for a non-HTML client. The context root for a web app can either be empty (i.e. /) or non-empty (i.e. /MyApp), and on the client when a swf loads, it can inspect its URL but it doesn't have any way to know what the server-side context root is. The MessageBrokerServlet that processes HTTP-based requests from Flex clients is not relative to where the swf was loaded from. You can define its path, which will generally be something like: http://{server}:{port}/{context.root}/messagebrokerservlet, but it could be anything. To send a request to it successfully, the client needs to use the correct context root. Take your URL below for example, http://localhost:8080/MyApp/..., is the context root / or is it /MyApp - who knows? Only the server. So unlike server name and port, the swf can't dynamically determine the correct context root value at runtime on the client. This means you need to either: 1. Specify it at compile time by hardcoding the proper context root into the URL in your services-config.xml file, or by using a {context.root} token in your URL in services-config.xml and passing the desired value at compile time using the mxmlc -context-root flag. 2. Hardcode it into your client side ActionScript code. 3. Use the web tier mxmlc compiler which can replace a {context.root} token with the correct value using HttpServletRequest#getContextPath() when you request a .mxml in the browser Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Friday, May 16, 2008 1:45 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Is the context-root value burnt into SWF? Hi there, Say I'm using a context root value MyApp when compiling my LCDS-based Flex application. I package everything into an archive called MyApp.war, depoly it on my Tomcat, startup tomcat, access the application using http://localhost:8080/MyApp, everything works fine (I have an index.html there that serves up the SWF) Now, if I want to deploy using a different context root for my application (say MyApp1)... call it using the URL http://localhost:8080/MyApp1 ... nothing would work this time. The SWF still gets loaded, and that's it. It seems this context-root value that's set in flex_config.xml gets somehow burnt in the SWF? what can I do to have the app running under a different context root, without the need to rebuild the SWF? Also, a question: why this context-root configuration is required in Flex environment? An application normally auto-detects it's context root at runtime. An application is usually untied from a specific context root and can be deployed using any context root. Thanks, Robert
[flexcoders] Re: Cannot install featurecom.adobe.flexbuilder.feature.standalone 3.0.194161
Perhaps you could get your admin to come over, give you full admin rights, install FB3, then reduce your rights again? or is that E a B? ;-) more like a PITA - or rather a snowflakes chance in hell. I bring this up because (like a mine canary) I may not be the only one this happens to. What I'm getting at is that I already have enough perms to install software as an Administrator (like Apache, ColdFusion, video card drivers and other stuff) but FlexBuilder fails. So far it's the only install to do so. there must be something in the install process that's choking, and at a guess it's tied up with how the FB libraries are added to the core Eclipse. I'm going to try a seperate Eclipse + FB plugin install on Monday to see if that works. It's a pity I didn't have access to this environment during the FB3 beta - it might have come in handy as feedback.
[flexcoders] Trying to apply scale9grid to an image loaded at runtime
I need to be able to load an image, allow the user to specify the scale9grid values, and then scale the image. I've tried a bunch of different things but either the scale9grid values aren't used or I get an invalid parameter exception. Is it possible to do this? Thanks, Tom
[flexcoders] How to do Flex,coldfusion and LCDS?
Hi, Please give me a idea how to set up the development enviroment for the purpose. I use Flex with remote object before but I do not have idea for developing with LCDS. Please let me know if you need some url for this. Thanks Mark
Re: [flexcoders] Re: Respecting backgroundImage aspect ratio
Got it, thanks Tim! Have a great weekend. -Greg mx:Canvas id=mainContent width=100% height=100% !--Layer 1 - the background image -- mx:VBox id=imageLayer x=0 y=0 width=100% height=100% verticalAlign=middle horizontalAlign=center !-- Set he image width and height to parent container dimension. -- mx:Image source=some.jpg width={imageLayer.width} height={ imageLayer.height} alpha=0.8 scaleContent=true maintainAspectRatio= true horizontalCenter=0 horizontalAlign=center verticalCenter=0 verticalAlign=middle / /mx:VBox !-- Layer 2 - Foreground content-- mx:VBox x=0 y=0 width=100% height=100% /mx:Canvas On Fri, May 16, 2008 at 5:33 PM, Tim Hoff [EMAIL PROTECTED] wrote: Hi Greg, Without going under the hood, you'll probably want to add a couple more layers to your component. The backgroundImage propeties of a container don't allow you to use the maintainAspectRation property. However, the Image control does. So, one way that you can work around this is to use a Canvas as the main component container and layer a VBox on top of an Image (used for the backgroundImage). This gets trick sometimes; depending on how you set the parent and/or child dimensions. But, if you set either the Image height or width exclusively, and use the maintainAspectRatio, the image will scale correctly. -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Greg Hess [EMAIL PROTECTED] wrote: Hi Folks, Our application lets a user specify an image to use as a background for a component. We need to scale the image to fill the VBox container (max width or height) respecting the aspect ratio of the image. I have been setting the backgroundImage, and backgroundSize=100% styles on the VBox but the image is being stretched. How can I do this? Cheers, Greg