RE: [flexcoders] Flex 2 socket interface
Marc, The local server model is great but there are some troublesome aspects that can bit you: You need to serve a crossdomain.xml file over HTTP from the local server. This will allow a web based application to interoperate with a desktop based server. This is essential to get this to work. Basically this forces you to support both HTTP and XMLSocket/Socket in parallel. Other than getting the server installed you will be good to go. With a local server installed, it is quite easy to add fileIO and other features. In IFBIN we use a local server to run the service itself. Currently it runs a mixed HTTP/XMLSocket server locally providing secure authenticated file installation/configuration, IFBIN Service is just DRM lite. We wanted to provide our subscribers with 1 click file installation and this solution worked out very well. Marc, please contact me offlist and I will set you up with some examples of how to make this work. Cheers, Theodore Patrick IFBIN Networks Founder and CEO http://www.ifbin.com From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of apeonaut Sent: Sunday, March 05, 2006 3:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex 2 socket interface Note to moderator: this is an update of a previous message that for some reason did not get sent to the group. Hi I have a console based, desktop network management app written in Java. I'd like to build Flex 2 browser-based GUI for this desktop app but I don't want to use Enterprise Services (or any commercial middleware layer) to communicate with this app (due to deployment license) I have noticed that the IFBIN service (ifbin.com) uses a class called SYNC to communicate via socket to a local Python based server, which would be ideal in my case. I can port my Java app to Python. Does anyone have any examples of SYNC in use with Flash or Flex? thanks marc -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.1.1/272 - Release Date: 3/1/2006 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Opening a Socket Connection on the same machine where the browser is running
The magic answer here is to serve a 'crossdomain.xml' Policy file from localhost. This will allow the Flash Player to speak with the socket on localhost and communicate seamlessly. This is how IFBIN Installation works. http://localhost:5505/crossdomain.xml If IFBIN is installed and running, the above URL will serve a valid crossdomain file. Once the Policy file is digested by the player, you can then instanciate a Socket, XMLSocket, LoadVars, loadVariables, loadMovie against the localhost domain and share data, call methods and interact. With Socket you will need to call loadSecurityPolicy explicitly as this does not occur automatically like it does with all other data exchange features. The key is that the localmachine must permit interaction just as if it were a server itself, which in this case it is. The security here is predicated that the end user installed a executable application running on localhost. Interacting with this application via Flash is as simple as serving the Policy file. If you have any problems please feel free to email me offlist at either: Ted.Patrick AT CynergySystems DOT com Ted AT powersdk DOT com Ted AT ifbin DOT com Cheers, Ted :) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of schennamaraja Sent: Thursday, February 02, 2006 10:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Opening a Socket Connection on the same machine where the browser is running Hi Guys, I am trying to do the following. wondering if any one has comup with this situation and solved it. I am trying to open a socket coonection to the localhost (same machine) where the browser is. The actual Flex application is running on another box. but I need to invoke a local swing GUI application on the client machine. I have the SocketServer running in the Swing GUI listening on a port and I am trying to open a socket connection to that port and trying to send some data. I was wondering whether I can open a socket connection on the same machine. If I run the SWF file locally, I am able to connect to the local socket server. wondering is there a way to open a socket connection locally. thanks Srini -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.0/248 - Release Date: 2/1/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.0/248 - Release Date: 2/1/2006 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] FileReference Download
Just to add to Carson's post: There is a HTTP header corruption bug in Flash Player 8 Release and 8.5.0.133 players that will cause Upload and Download functionality to be limited. This bug has been fixed within 8.5.0.175 player. Here is what doesn't work seamlessly: 1. HTTP AUTH - Authorization Headers will corrupt data exchange. If you upload to an application running within an authorized HTTP session, in some browsers the upload will fail. I have seen this occur in Safari(OSX) and FireFox(Win32). 2. POST Parameters will corrupt data exchange on an Upload request. This is specific to FireFox(Win32) when additional HTTP POST parameters are added into a request. I have seen this occur in Safari(OSX) and FireFox(Win32). 3. HTTPS/SSL usage with FileReference requires a separate loading of a crossdomain policy file for use within the same domain. The FileReference functionality in FireFox(Win32) does not use the FireFox browser to exchange data, instead it uses native Win32 networking. I believe that many of the errors in Firefox are a result of upload and download requests traveling through win32 networking. When using Authorization headers, you will see the Internet Explorer Authorization Security Dialog appear in addition to the Firefox Authorization Security Dialog. The problem is that authorization headers are not shared between Firefox and Win32 Networking. Although you may have Auth session headers in Firefox, when you use upload/download, the header data is lost. Ideally I have found that it is best to use very simple upload logic for compatibility. I typically use URLRewriting to add parameters into the upload url path without the use of GET/POST parameters. I upload to a separate HTTP/HTTPS subdomain and pass a unique token within the upload request url like so: http://upload.myserver.com/upload/29879827342342342 The upload application saves the upload file data if the token exists and expires the token when an upload occurs or within 10 minutes. This methodology seems to work compatibly for all existing browsers and can be adapted to any security model. On the download requests URLRewriting is also very handy. To make sure the filename is returned consistently, I append the name into a URLRewritten request like so: http://upload.myserver.com/upload/2020938409987234/myFile.pdf In this case, 2020938409987234 is used to obtain a file but the name makes sure that the user will always be presented with 'myFile.pdf' within the FileReference SaveAs Dialog. I have seen several cases where the defaultFileName argument on the download method will fail when POST or GET Parameters are in use. If you call download with the above URL, the name will be myFile.pdf consistently. Please understand that these solutions are not ideal but they work well and I have yet to find a case that could not be adapted into an application. My 2 Cents, Ted Patrick Cynergy Systems, Inc. http://www.cynergysystems.com -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Carson Hager Sent: Wednesday, January 11, 2006 7:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] FileReference Download You cannot. In my opinion, this functionality is seriously limited in this regard. You also can't add anything to the multipartrequest form for uploads. You have to append to the URL. Your best bet is to use an httpservice or webservice that preallocates the row in the database returning the key to your Flex app. You can then use that key in the URL of your upload to tell your server script what row to place the data in. Carson Carson Hager Cynergy Systems, Inc. http://www.cynergysystems.com Email: [EMAIL PROTECTED] Office: 866-CYNERGY Mobile: 1.703.489.6466 -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, January 11, 2006 6:33 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] FileReference Download We want to use this functionality to save a document in the server along with some indexing information. Using the Flash sample we were able to do that using a ColdFusion page. However, we need to get back a id assigned at the time we indexed the uploaded document. How can we send this back to Flex, if the ColdFusion page is being called by the FileReferece.upload method which only returns true or false? |-+- | | | | | Carson Hager | | | [EMAIL PROTECTED]| | | m | | | Sent by: | | | flexcoders@yahoogroups.com | | | 01/06/2006 04:09 PM| | | Please respond to flexcoders | | | |
RE: [flexcoders] Re: ANY FLEX TREE GURUS?
Yes exactly. The icons used for the tree, would be SWF used through icon=@Embed('icon.swf'). These icons would have some drawing API calls in them allowing them to draw the lines as they are rendered. The icon is placed by the tree, the icon just needs to use the drawing API to render its drawing parts into a nested MovieClip. That said, I liked the example posted to this thread earlier. It extended the TreeRow class and added the lines via the drawing API in a similar manner as rows were rendered. This looked to be a much more reusable solution as it did not affect the icons in use but rather just modified the way rows were rendered in the tree. Plus there is something to be said for a working example. My 2 cents, Ted Patrick Cynergy Systems -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sufibaba Sent: Tuesday, January 03, 2006 3:23 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ANY FLEX TREE GURUS? Hi Ted, Thanks for your thoughts on this . Looks like the first method you've suggested is the better option. Question: I am a bit unclear about using the Drawing API embedded into SWF Icons. Are you suggesting to have code inside of the SWF that would render the lines according to it's position in the tree? Am I understanding this correctly. Tim --- In flexcoders@yahoogroups.com, Theodore E Patrick [EMAIL PROTECTED] wrote: Tim, I think this would best be done via the Drawing API embedded into SWF Icons in Flex 1.5 and Flex 2. Node Icons would need to draw this: -ICON Container Icons would need to draw this: -ICON | | | Since each Icon knows its position, it can readily draw the lines consistently. The trick here is that icons are refreshed in the Tree whenever the view changes. As they are attached anew, they would simply render out the state of the tree. The other route would be to use the drawing API and render the lines in a MC behind the tree based on the state of the DataProvider. I think this route would be more difficult as you would need to draw the nested state of all nodes at one time. With the prior method only the changes portion of the drawing changes as needed. I believe that depths get higher as you move south on the tree. If a parent draws a line all sibling and child nodes will naturally be above the drawn lines. My 2 cents, Ted Patrick Cynergy Systems _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sufibaba Sent: Monday, January 02, 2006 12:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ANY FLEX TREE GURUS? Happy New years to All, Does anyone know how to Modify the Flex2 Tree component to display connector lines -- Like the one shown under Rich Graphics at the following Link: HYPERLINK http://javascript.cooldev.com/scripts/cooltree/demos/superdemo/http://ja va script.cooldev.com/scripts/cooltree/demos/superdemo/ I know that flash is much more capable than javascript and the menu system can be even more robust than javascript or Java. Is it possible to do this in Flex2. Cheers, Tim -- Flexcoders Mailing List FAQ: HYPERLINK http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txthttp://g ro ups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: HYPERLINK http://www.mail-archive.com/flexcoders%40yahoogroups.comhttp://www.mail- ar chive.com/flexcoders%40yahoogroups.com _ YAHOO! GROUPS LINKS *Visit your group HYPERLINK http://groups.yahoo.com/group/flexcodersflexcoders; on the web. *To unsubscribe from this group, send an email to: HYPERLINK mailto:flexcoders- [EMAIL PROTECTED]flexcoder [EMAIL PROTECTED] *Your use of Yahoo! Groups is subject to the HYPERLINK http://docs.yahoo.com/info/terms/Yahoo! Terms of Service. _ -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006 -- Flexcoders Mailing List
RE: [flexcoders] ANY FLEX TREE GURUS?
Tim, I think this would best be done via the Drawing API embedded into SWF Icons in Flex 1.5 and Flex 2. Node Icons would need to draw this: -ICON Container Icons would need to draw this: -ICON | | | Since each Icon knows its position, it can readily draw the lines consistently. The trick here is that icons are refreshed in the Tree whenever the view changes. As they are attached anew, they would simply render out the state of the tree. The other route would be to use the drawing API and render the lines in a MC behind the tree based on the state of the DataProvider. I think this route would be more difficult as you would need to draw the nested state of all nodes at one time. With the prior method only the changes portion of the drawing changes as needed. I believe that depths get higher as you move south on the tree. If a parent draws a line all sibling and child nodes will naturally be above the drawn lines. My 2 cents, Ted Patrick Cynergy Systems From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sufibaba Sent: Monday, January 02, 2006 12:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ANY FLEX TREE GURUS? Happy New years to All, Does anyone know how to Modify the Flex2 Tree component to display connector lines -- Like the one shown under Rich Graphics at the following Link: http://_javascript_.cooldev.com/scripts/cooltree/demos/superdemo/ I know that flash is much more capable than _javascript_ and the menu system can be even more robust than _javascript_ or Java. Is it possible to do this in Flex2. Cheers, Tim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006
RE: [flexcoders] Something like interop between two swf instances
Try the LocalConnection Class. Each SWF application can register as a listener and allow function calls between separate player instances. I used it extensively on an Instant Messaging application some years back and it works great. LocalConnection is a jewel! Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sigges25 Sent: Wednesday, December 21, 2005 5:28 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Something like interop between two swf instances Hi! I need a way that two flex applications can communicate with eachotherss... Please no server-roundtrips or FlashCom... Is there a way on the client-side? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.2/208 - Release Date: 12/20/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.2/208 - Release Date: 12/20/2005 Yahoo! Groups Sponsor ~-- Most low income homes are not online. Make a difference this holiday season! http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Adding rows to a datagrid programmatically
Title: Re: [flexcoders] Adding rows to a datagrid programmatically Ralf, The DataGrid maps column data to a dataProvider via the columnName property. You can also employ cellRenderers and labelFunctions to render MovieClips/components and alternate text into the Datagrid from the dataProvider value. Here is an example dataGrid (Actually this is the DataGrid used within the Flash By Example UI): mx:DataGrid id=datagrid borderStyle=none height=100% width=100% change=datagrid_change() mx:columns mx:Array mx:DataGridColumn headerText=I textAlign=center columnName=icon cellRenderer=ifbin.cells.Icon width=20/ mx:DataGridColumn headerText=L textAlign=center columnName=license cellRenderer=ifbin.cells.Icon width=20/ mx:DataGridColumn headerText=Name textIndent=5 textAlign=left columnName=n width=200/ mx:DataGridColumn headerText=Author textIndent=5 textAlign=left labelFunction=authorNameLabel width=100/ mx:DataGridColumn headerText=Player textIndent=5 textAlign=left columnName=p width=60/ mx:DataGridColumn headerText=Flash textIndent=5 textAlign=left columnName=f width=50/ /mx:Array /mx:columns /mx:DataGrid I could do the following with this Datadrig instance: //create a dataProvider The DataProvider API decorates the base Array.prototype at runtime myData = [] datagrid.dataProvider = myData myData.addItem ( { icon:i32 , license:23 , n:My Example 1 , p:8 , f:8 } ) myData.addItem ( { icon:i32 , license:23 , n:My Example 2 , p:8 , f:8 } ) myData.addItem ( { icon:i32 , license:23 , n:My Example 3 , p:8 , f:8 } ) Using the addItem method within the DataProvider API broadcasts change events to the datagrid view causing it to update. You could also do this as they are identical: datagrid.addItem ( { icon:i32 , license:23 , n:My Example 1 , p:8 , f:8 } ) datagrid.addItem ( { icon:i32 , license:23 , n:My Example 2 , p:8 , f:8 } ) datagrid.addItem ( { icon:i32 , license:23 , n:My Example 3 , p:8 , f:8 } ) When the datagrid renders rows, it uses the cellRenderer to layout the cell column and used labelFunction to obtain the cell text value. Once you see this working, you can do great things with the DataGrid in terms of dynamically created values and inserting controls into the datagrid. The important thing to realize is that the DataGrid used the dataProvider API from within the component but it is also usable from the Array itself. If you happen to have 2 datagrids using the same dataProvider reference, both will update when data is added using the dataprovider API. If you add data using the base Array methods, you will not see data update within the view until the datagrid row is visually refreshed. If you rollover a datagrid row, all the data in the row will update from the dataProvider. This same model applies to all uses of the dataProvider model. If you are using Trees, Lists, ComboBox, DataGrid, Accordion, and many others, the dataProviders work essentially the same. Each control interprets dataProvider contents slightly differently according to its own features set. Just remember: Array == DataProvider via decoration! Here is the methods of the DataProvider API that are added into the Array.prototype object at runtime. dispatchQueue dispatchEvent removeEventListener addEventListener editField getEditingData removeItemsAt addItemsAt updateViews sortItems sortItemsBy getItemID getItemAt replaceItemAt removeItemAt removeAll addItemAt addItem addView What is really nice is that you can write a true DataProvider class by implementing this interface. On a prior Flex project we wrote a filtered DataProvider that allows you to hide certain records within a dataProvider by setting a filter value like so: myDP = new flow.DataProvider() myDatagrid.dataProvider = myDT myDP.addItem( { name:Ted, age=33 } ) myDP.addItem( { name:Fred, age=20 } ) myDP.addItem( { name:Jean, age=25 } ) // set the filter such that only records where age is less than 30 show myDP.filter = age30 Later in the app if you wanted to show all rows simply say: myDP.filter = undefined Hopefully this more than covers your initial question. Sorry for the rambling post. Cheers, Ted ;) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Ralf Rottmann Sent: Monday, December 05, 2005 9:57 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Adding rows to a datagrid programmatically Thanks Ted. I have created an Array of Objects which I assign to the dataProvider property of my DataGrid. If I have manually added Columns with names and headerTexts, do the Obj properties have to match ColumnNames, or does Flex kind of guess which property should be assigned to which column? Regards RR -- mobile: +49-(0)170-914-5495 email: [EMAIL PROTECTED] -Original Message- From: flexcoders@yahoogroups.com flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com
RE: [flexcoders] Adding rows to a datagrid programmatically
Title: Re: [flexcoders] Adding rows to a datagrid programmatically Correction: myDP = new flow.DataProvider() myDatagrid.dataProvider = myDT myDP.addItem( { name:Ted, age:33 } ) myDP.addItem( { name:Fred, age:20 } ) myDP.addItem( { name:Jean, age:25 } ) // set the filter such that only records where age is less than 30 show myDP.filter = age30 Ted :) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Theodore E Patrick Sent: Monday, December 05, 2005 12:18 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Adding rows to a datagrid programmatically Ralf, The DataGrid maps column data to a dataProvider via the columnName property. You can also employ cellRenderers and labelFunctions to render MovieClips/components and alternate text into the Datagrid from the dataProvider value. Here is an example dataGrid (Actually this is the DataGrid used within the Flash By Example UI): mx:DataGrid id=datagrid borderStyle=none height=100% width=100% change=datagrid_change() mx:columns mx:Array mx:DataGridColumn headerText=I textAlign=center columnName=icon cellRenderer=ifbin.cells.Icon width=20/ mx:DataGridColumn headerText=L textAlign=center columnName=license cellRenderer=ifbin.cells.Icon width=20/ mx:DataGridColumn headerText=Name textIndent=5 textAlign=left columnName=n width=200/ mx:DataGridColumn headerText=Author textIndent=5 textAlign=left labelFunction=authorNameLabel width=100/ mx:DataGridColumn headerText=Player textIndent=5 textAlign=left columnName=p width=60/ mx:DataGridColumn headerText=Flash textIndent=5 textAlign=left columnName=f width=50/ /mx:Array /mx:columns /mx:DataGrid I could do the following with this Datadrig instance: //create a dataProvider The DataProvider API decorates the base Array.prototype at runtime myData = [] datagrid.dataProvider = myData myData.addItem ( { icon:i32 , license:23 , n:My Example 1 , p:8 , f:8 } ) myData.addItem ( { icon:i32 , license:23 , n:My Example 2 , p:8 , f:8 } ) myData.addItem ( { icon:i32 , license:23 , n:My Example 3 , p:8 , f:8 } ) Using the addItem method within the DataProvider API broadcasts change events to the datagrid view causing it to update. You could also do this as they are identical: datagrid.addItem ( { icon:i32 , license:23 , n:My Example 1 , p:8 , f:8 } ) datagrid.addItem ( { icon:i32 , license:23 , n:My Example 2 , p:8 , f:8 } ) datagrid.addItem ( { icon:i32 , license:23 , n:My Example 3 , p:8 , f:8 } ) When the datagrid renders rows, it uses the cellRenderer to layout the cell column and used labelFunction to obtain the cell text value. Once you see this working, you can do great things with the DataGrid in terms of dynamically created values and inserting controls into the datagrid. The important thing to realize is that the DataGrid used the dataProvider API from within the component but it is also usable from the Array itself. If you happen to have 2 datagrids using the same dataProvider reference, both will update when data is added using the dataprovider API. If you add data using the base Array methods, you will not see data update within the view until the datagrid row is visually refreshed. If you rollover a datagrid row, all the data in the row will update from the dataProvider. This same model applies to all uses of the dataProvider model. If you are using Trees, Lists, ComboBox, DataGrid, Accordion, and many others, the dataProviders work essentially the same. Each control interprets dataProvider contents slightly differently according to its own features set. Just remember: Array == DataProvider via decoration! Here is the methods of the DataProvider API that are added into the Array.prototype object at runtime. dispatchQueue dispatchEvent removeEventListener addEventListener editField getEditingData removeItemsAt addItemsAt updateViews sortItems sortItemsBy getItemID getItemAt replaceItemAt removeItemAt removeAll addItemAt addItem addView What is really nice is that you can write a true DataProvider class by implementing this interface. On a prior Flex project we wrote a filtered DataProvider that allows you to hide certain records within a dataProvider by setting a filter value like so: myDP = new flow.DataProvider() myDatagrid.dataProvider = myDT myDP.addItem( { name:Ted, age=33 } ) myDP.addItem( { name:Fred, age=20 } ) myDP.addItem( { name:Jean, age=25 } ) // set the filter such that only records where age is less than 30 show myDP.filter = age30 Later in the app if you wanted to show all rows simply say: myDP.filter = undefined Hopefully this more than covers your initial question. Sorry for the rambling post. Cheers, Ted ;) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Ralf Rottmann Sent: Monday, December 05, 2005 9:57 AM To: flexcoders@yahoogroups.com Subject: Re
RE: [flexcoders] Adding rows to a datagrid programmatically
Ralf, If you are trying to add a row to a DataGrid you use the DataProviderAPI like so: myDataGrid.addItem( { a:Hello , b:2 } ) cheers, Ted ;) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Ralf Rottmann Sent: Monday, December 05, 2005 12:29 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Adding rows to a datagrid programmatically I looked for tutorials on the labs site but could not find any. Can somebody send a code example of how to add a row to a datagrid programmatically? Best regards Ralf -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 12/2/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 12/2/2005
RE: [flexcoders] Cross Server Socket Connection (NOT XMLSocket)
Ralf, We are working on a Socket Proxy Server at IFBIN. The proxy is hosted on your domain and allows you to connect to any port on any 3rd party server using Flash as the client with Player 8.5. It is useful for situations involving streaming and for data/port access to 3rd party domains. Basically once you connect to the proxy, you pass a server/port, and the proxy connects to the other server. From that point on the proxy behaves just like Regards, Ted Patrick From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Rottmann Sent: Thursday, December 01, 2005 5:17 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cross Server Socket Connection (NOT XMLSocket) Any idea how that should work? You call the Socket.connect(server, port) class to establish a connection (and that connection GETS established even without any policy files). On the other side there is a simple echo server. Who and how should the policy file get served via the socket? Where should it be placed on the simple echo server? I doubt that it works with policy files. Any ideas? Ralf Rottmann From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Cox Sent: Donnerstag, 1. Dezember 2005 16:09 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cross Server Socket Connection (NOT XMLSocket) Policy files are also applicable to socket connections afaik -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Rottmann Sent: 01 December 2005 15:02 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cross Server Socket Connection (NOT XMLSocket) Hi there, Is there any known way of allowing a flex/flash movie to establish socket connects cross server? E.g.: If I want to create a simple telnet client, host it on my private web page and want that telnet flash movie to connect to whatever server out there. Obviously policy files do not work as socket does not attempt an HTTP connect. Regards Ralf Rottmann -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 11/30/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 11/30/2005
RE: [flexcoders] Cross Server Socket Connection (NOT XMLSocket)
Does that mean that - being a proud IFBIN subscriber :-) - I will have access to the proxy server? Ralf, Yes. The socket proxy server will ship as an IFBIN example combined with full source for the server as well. There will be an example using Flex 2 that utilizes the example. At Spark Europe I showed an HTTP Client I wrote using flash.net.Socket that allow you raw access to HTTP headers and more. Using this library in production is problematic because connections to other HTTP servers from Flash is not permitted for good reason. Using the Socket Proxy, you can make this work seamlessly along with accessing any TCP/IP based socket protocol. The main purpose for the proxy's development is actually to scale out the Comet AMF Socket Server using clustering. The proxy can be easily modified to provide a clustering solution for any type of socket server in that the proxy server maintains client connections while the data is multi-plexed to a central server. Works sort of like so: X == Frontline Connection Servers B == BackEnd Logic Servers X X X X X X X X --- N | | | | | | | | == || B -- B The backend logic server is where the logic is actually executed. You can create several backend servers for failover where all live data is mirrored. Should a backend server overload, crash, or go postal, processing will failover to another backend server. We used this model with an XMPP server rollout 4 years ago and tested support for over 30,000 concurrent connections. XMPP is a much heavier server and the Comet model is much lighter and faster. Plus you can write your own server logic and use this model to scale deployment for lots of concurrent users. Personally, I think we will see some very large MMPG's for Flash Player 8.5 and we designed this as a solution to scale the server side. This server will also be in IFBIN but we need some time for the dust to settle and to resolve a protocol licensing AMF issue. As AMF is a Macromedia protocol, we are working to make sure our server does not violate any property rights before the code ships. We are working with Macromedia directly to get this resolved. More to come! Ted ;) -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 11/30/2005 Yahoo! Groups Sponsor ~-- AIDS in India: A lurking bomb. Click and help stop AIDS now. http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Annpuncing Log4x
I know I am biased as I work on the Cynergy team but Log4X is by far one of the best logging frameworks I have ever seen for Flex development. The key is that in reading 1 log you can see client events inline with server log events. You can see DB messages, WS calls, and client calls inline and in context. Log4X allows you to see in fine grained detail everything that is occurring in a large scale application from UI to DB in a single log. Special thanks to Cynergy for making this free. Ted :) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wolf Sent: Friday, December 02, 2005 7:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Annpuncing Log4x I am incredibly excited to announce the availability of Log4x to the Flex community. Log4x is a toolkit to assist in the development and runtime monitoring and debugging of applications built with Macromedia Flex. Based on and designed to integrate with Log4j, effectively the most popular logging framework ever developed, Log4x provides the Flex developer with a best-of-breed solution for instrumenting and logging their Flex based RIAs.Log4x takes advantage the Flex web services model, and can be intricately controlled by the developer on a per-application basis during development as well as by administrators in production. Integrating seamlessly with Log4j, Log4x provides a similar programming model making it intuitive for enterprise developers with Log4j experience. Log4x is being released under a community source license free of charge to all licensed Flex users. Features include: - Integrated logging between user experience and server layers. No other logging framework to date lets you bring together every tier of your enterprise flex application. - Ability to assign not only pre-set categories (INFO, DEBUG, WARN, ERROR) but also arbitrary logical application name spaces such as shopping cart, system, navigation, etc. - Logging levels are completely dynamic and can be enabled and disabled in real-time without having to ever recompile your Flex application. - Configurable batching with thresholds reduces network traffic and allows you to configure rules such as don't log unless an error occurs, then log the all steps that lead up to that error. - Based on industry standard frameworks and API's such as Log4j, XML, HTTP, etc. - Secure and compartmentalized. N applications can have N separate logs, each of which may be sending their log messages back to the server via (if configured) secured channels, preventing man-in-the-middle attacks that pry on sensitive data. Log4x is being released under a community source license free of charge to all licensed Flex users. Log4x can be downloaded by subscribing to Cynergy's new Flex Resources community. To get more information, view a video introduction, or download Log4x please click on the link below. http://www.cynergysystems.com/pages/how/technologies/flex/index.html -- Dave Wolf Cynergy Systems, Inc. Macromedia Flex Alliance Partner http://www.cynergysystems.com Email: [EMAIL PROTECTED] Office: 866-CYNERGY -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 11/30/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 11/30/2005 Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Java Pojo to AS pojo with ant
Can we get back to Flex development? This isnt EJBCoders, PojoCoders, or HibernateCoders, its FlexCoders. Ted :) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, November 22, 2005 4:19 PM To: flexcoders@yahoogroups.com Cc: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Java Pojo to AS pojo with ant Frank please read Dave's post about EJB. And please lets give proper names to the things. EJB and CMP will never more be the most popular persistence technology. I didn't want to mention alternatives like Toplink and Hibernate in an effort to keep the thread concise. It is honest to say that for persistence frameworks EJB with CMP is the market leader since it is an ubiqitous technology; it appears in every J2EE compliant container. That does not necessarily mean it is being used by everyone. Hibernate is the best product out there, but it's penetration as a 3rd party tool just can't compete with a technology that is embedded into platforms. So in saying that as a alternative to EJB with CMP, Hibernate is the current de-facto standard for persistence in the Java developer and architecture community. Hibernateis currentlythe closest product to a reference implementation of the EJB 3.0/JSR-220 persistence standardization effort.Currently two Hibernate employees even sit on the International voting panel for this JSR effort! How you ca dismiss this new standard with such disdai n is beyond me. Sure, Hibernate can be used without the new EJB3 persistence APIs, and yes, it is still more powerful than current market alternatives without it, but having said that, most developers love Hibernate since it persists most JavaBeans with no code changes to the existing beans. Great for migrations. I don't really understand these evangalistic arguments anyways.Tell me what happens to Hibernate wheneveryjava containerprovider includes their own standardized version of it? Touting a technology as dead or alive reveals an inflexibility that may not be in your development efforts best interests, both of you guys should know better, how many deprecated APIshave you had to thrown away over the years?Yet the root of those APIs continue toadapt and becomewhat theywhere originally intentioned. Anyone remember the JDBC type 1 then 2, then 3 drivers before type 4's got it right? Did you dump JDBC as well? Things change, I suggest you read the new JSR and tell me yo ur thoughts on it, instead of continuing to remind me that you had bad experiences with older technology. Sincerely, Frank Krul -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.3/174 - Release Date: 11/17/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.3/174 - Release Date: 11/17/2005
RE: [flexcoders] Compiling MXML Offline
Just do this: http://server/path/application.mxml.swf Save the SWF file. Done. Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dustin_speer Sent: Tuesday, November 22, 2005 9:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Compiling MXML Offline I understand this is possible, but my searching has not turned up a good tutorial on how to accomplish it. Anyone have any guide or insights? Thanks, DS -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.5/177 - Release Date: 11/21/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.5/177 - Release Date: 11/21/2005 Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/u8TY5A/tzNLAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] AJAX vs Flex whitepaper?? anyone??
The key differences here are project complexity, compatibility, and maintenance. AJAX applications are harder to develop and harder to maintain than Flex. There are details in using AJAX that produce compatibility problems as browsers vary in support DTML/XHTML/Javascript for AJAX rendering. AJAX requires allot of work to maintain a high level of compatibility and as WC3 Standard migrate and browsers implement them, AJAX backwards compatibility will be an issue. With Flash there is one standardized player that works compatibly cross-platform and cross-browser. The Flash player is also backward compatible in that future players will support legacy content. If you build an application in Flex 1.5 today, it will work in Flash Player 8.5, 9, 10 compatibly. One of the most hidden values of Flex is maintenance. Flex apps are surprisingly easy to maintain and change over time. You can restructure the presentation layer of a Flex application dramatically without breaking any of the core business logic. On LifeCoach (MAX Finalist), we had team members changing the look and feel of the app late in the development cycle and in several cases whole apps were repurposed and reskined in a short period of time. Truth be told, there are situations where both make allot of sense. In MXNA, the reporting charts features are a very good example of Flex and AJAX integration. http://weblogs.macromedia.com/mxna/reports/mostPopularPosts/index.cfm Flex interacts by modifying HTML information in an AJAX design and in turn HTML events cause the Flex UI to change as well. Also with Flash 8's support for External Interface, interaction with JavaScript (AJAX secret ingredient) is much more seamless and synchronous. The choice of which technology to use depends on your teams development skill set and overall development preference. There is also a problem in comparing Flex to AJAX in that one is a development tool and one is a set of techniques/loose apis. It would be more fair to compare ClearNova:ThinkCap to Macromedia:Flex. ThinkCap is a RAD tool for AJAX/J2EE development. http://www.clearnova.com/ Even comparing ThinkCap to Flex, you will find that Flex is dominant in compatibility and maintenance. Plus once you are working within the Flash Player, your creativity is more of a limitation than pure technology. If it were my choice Flex would win hands down. Then again I am biased towards the Flash Platform. My 2 Cents, Ted Patrick -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 0.0.344 / Virus Database: 267.12.4/146 - Release Date: 10/21/2005 Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Open source AMF solutions that work with flex
Just FYI: Flash 8.5 Player supports GZIP compression in the Socket Class. Ideally using plain XML, you can exchange GZIP'd XML binary files thus compressing the data exchange both ways. Also given that XML Parsing in 8.5 is much faster than 7/8 generation players, we will see data exchange with 8.5 become a more level playing field. Plus with E4X exchanging raw XML in a custom format is far simpler that it used to be. We will see an explosion of data exchange technology with F8.5. In the end, I think the technology choice is more appropriate to what skill set you have in-house. There are a ton of great Web Service development tools, where AMF only resides within the Flash space. Having worked with Cynergy on a Flex/Web Services project with hundreds of transactions per session, Web Service with AXIS/Tomcat is rock solid. Plus you really cannot beat free in this case especially in regards to scalability. My 2 Cents, Ted :) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wolf Sent: Sunday, October 23, 2005 5:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Open source AMF solutions that work with flex following pros and cons as they relate to SOAP vs. AMF. - AMF requires less bandwidth - AMF is faster to parse on the client side - AMF parsing time grows linearly, SOAP exponentially - SOAP is usually easier to debug - SOAP is easier to extend server side handling - SOAP is more widely supported by server and application vendors - SOAP is open and well documented Any one else want to add to that list? The only extreemly important things you left off are that - AMF requires the use of the FlashGateway and linking your POJO code to the FlashGateway libraries (such as Gateway class to get references to the HttpRequest etc) - AMF is not interoperable with third parties like SOAP would be. If I could sum up my point through this whole discussion as succinctly as possible, I want to get across that these decisions should be driven by your enterprise architecture. They should not be driven by blanket statements like AMF binary protocols good and fast, SOAP and XML slow and bad. No IT topology answer is that simple. Each has their advantages, each alligns differently into your overall architectures and requirements. In the end, you should make an *informed* decision. Experiences from folks that have deployed enterprise class Flex applications into production should be a gold mine for those working on doing the same in the future. -- Dave Wolf Cynergy Systems, Inc. Macromedia Flex Alliance Partner http://www.cynergysystems.com Email: [EMAIL PROTECTED] Office: 866-CYNERGY x85 The best public performance information that I have seen is from FlashOrb: http://www.flashorb.com/articles/soap_vs_flash_remoting_benchmark.shtml This is slightly outdated since the release of Flash 8. The memory leaks the article mentions have been addressed in later versions of Flash 7. An important distinction between the FlashOrb benchmarks and the ones Anatole posted are that these are comparing SOAP and AMF from within the Flash Player. I believe Anatole was comparing AMF in the Player to SOAP in IE. Another part of the discussion was some excited comments about something called E4X or ECMAScript for XML. This is really only a new syntax for traversing and writing xml. Kind of a Actionscript meets XPath thing. I would also expect that the rewriting of the Flash XML parsers will bring some dramatic improvements to performance. For details on E4X check out the ECMAScript 4.0 specifications. Kevin -Original Message- From: Robert Thompson [mailto:[EMAIL PROTECTED] Sent: Saturday, October 22, 2005 7:44 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Open source AMF solutions that work with flex Would either of you mind giving people like me a one-liner and perhaps a url to an introduction to the issue you are talking about? It sounds quite interesting, but I'm afraid I'm lost. -r --- Anatole Tartakovsky [EMAIL PROTECTED] wrote: Kevin, We had performance as a priority as weel . As a result we went further in reduction of metadata in packages by generating client-side proxies for all server-side methods thus giving much smaller footprint then SOAP or AMF. That was really minor improvememnt though - main benefits were in ability to extend the set of basic types to framework specific data types. The real performance issues start with thousands of rows in ( im most cases) relational format. AMF goes to some extent in those (and I was very pleased with performance results) but final performance is going to depend on ability to search, filter and render portions of information. Moreover, when you apply changes to those you
RE: [flexcoders] Re: Open source AMF solutions that work with flex
Robert, GZIP can be found here: http://www.gzip.org/ Decompressing a GZIP binary in Java http://javaalmanac.com/egs/java.util.zip/UncompressFile.html Enabling gzip compression for data services by Matt Chotin http://weblogs.macromedia.com/mchotin/archives/2004/11/enabling_gzip_c.cfm The other key is that GZIP is implemented in the HTTP 1.1 stack of Flash Player 8.5. Assuming that the base http 1.1 gzip is enabled at the server, then all text based data exchange technology should be enhanced without any special code changes. GZIP support was added to the Central Player and I believe that it made the Flash 8 player builds but I cannot find any documentation of this. I have an email out to some devs and will post back ASAP. The flash.net.ByteArray Class has 2 methods 'compress' and 'uncompress'. Combined with flash.net.Socket, one can exchange GZIP payloads with HTTP and HTTPS servers. The server must be able to receive the binary data and decompress and compress using gzip. Plus you will also need to roll your own HTTP 1.1 headers in this case. Web Services and AMF Remoting are HTTP based technologies. The next generation of data exchange will be based on persistent socket connections. The FP7,8 currently support XMLSocket and 8.5 has support for flash.net.Socket supporting a full streaming binary socket including AMF support. Considering that you can run a dedicated socket connection over low ports (80) and that socket connections are typically initiated within the consumer's firewall, persistant socket connections will flourish for exchanging data with Flex. Data exchange using AMF over Socket is very very fast and leaves AMF remoting and Web Services in the dust. Using Socket and AMF, I ran a test that exchanged 1000 object transactions in under 4 seconds on a local network. Considering that HTTP Headers and HTTP Parsing was removed in this model, this exchange is about 10X faster than both AMF Remoting and Web Services. Long term flash.net.Socket is the way to go but, currently there are only 2 servers supporting AMF over Socket. One being IFBIN Comet http://comet.ifbin.com/zornchat/ which I wrote and Flash Media Server has support for AMF over Socket. I expect we will be seeing an explosion of data exchange technologies with Flash 8.5 and flash.net.Socket. Sorry I wasn't clearer before. My 2 cents, Ted Ted, If one were to standardize their efforts on Flash Player 8.5 how would they implement this on the Web Service side if they were using NetBeans, for example. In-line with the ADMIN's recent guidelines, may I suggestion one more? ... and that would be that when someone goes into detail about something, that they, if it's convenient, provide URLs to places where those who are less experienced can begin to learn about the technology mentioned; e.g. GZIP on both the FLEX and Web Service side. I intend to use Apache Tomcat and I'm hoping that a JSP environment and using the NetBeans IDE proves well for this. -r --- Theodore E Patrick [EMAIL PROTECTED] wrote: Just FYI: Flash 8.5 Player supports GZIP compression in the Socket Class. Ideally using plain XML, you can exchange GZIP'd XML binary files thus compressing the data exchange both ways. Also given that XML Parsing in 8.5 is much faster than 7/8 generation players, we will see data exchange with 8.5 become a more level playing field. Plus with E4X exchanging raw XML in a custom format is far simpler that it used to be. We will see an explosion of data exchange technology with F8.5. In the end, I think the technology choice is more appropriate to what skill set you have in-house. There are a ton of great Web Service development tools, where AMF only resides within the Flash space. Having worked with Cynergy on a Flex/Web Services project with hundreds of transactions per session, Web Service with AXIS/Tomcat is rock solid. Plus you really cannot beat free in this case especially in regards to scalability. My 2 Cents, Ted :) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wolf Sent: Sunday, October 23, 2005 5:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Open source AMF solutions that work with flex following pros and cons as they relate to SOAP vs. AMF. - AMF requires less bandwidth - AMF is faster to parse on the client side - AMF parsing time grows linearly, SOAP exponentially - SOAP is usually easier to debug - SOAP is easier to extend server side handling - SOAP is more widely supported by server and application vendors - SOAP is open and well documented Any one else want to add to that list? The only extreemly important things you left off are that - AMF requires the use of the FlashGateway and linking your POJO code to the FlashGateway libraries
RE: [flexcoders] Flex component that encapsulates DENG?
Steve, Here are a few additional options for you. HTMLDraw Server-side image renderer. It renders HTML on the server and ships an image as a proxy. This is good for static content and web clipping applications. http://www.websupergoo.com/abcdrawhtml-1.htm The guys over at websupergoo are great although this component requires a .NET component FLOW A small group of IFBIN developers (including myself) are working on porting Flow to Flex. Flow is an XML renderer that supports rendering graphic, components, and data supporting rich layout. It is 90% compatible with the mx namespace with a few exceptions mostly attributed to runtime rendering. Using XML you can render rich forms on the fly and add lots of content into Flex through existing static or dynamic application servers. Flow will ship with Flash By Example and Flex By Example at http://www.ifbin.com . Simple Example: http://www.powersdk.com/sample/flow/FlowEdit.swf More complex examples will be online in the coming weeks. ExternalInterface - The Iframe solution combined with Flash Player 8s External Interface is a very good option. EI allows you much more fine grained control over _javascript_ events/methods and provides more seamless integration given the synchronous events and callbacks. Cheers, Ted :) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Steve Ocean Sent: Tuesday, September 06, 2005 11:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex component that encapsulates DENG? Flex needs a way to embed htmlbased contentin the app. As far as I know, no solution exists except IFRAMES. After trying everything I could think of for a week,I've come to the conclusionwhat's needed is a scalable component that uses something like DENG ( http://claus.packts.net/ ) to render HTML as a SWF. To be truly useful, the component would have to be able to render any foreign URL on demand,and at least do a decent job with most. Thoughts anyone? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] What I wish Flex/Flash Player could do...
The best way to test a wedge driver is with a Text Editor. Open NotePad Set the focus into Notepad Swipe a Card, Scan a barcode, Read an RFID. If the wedge driver is working, the reader should rapidly type a long string of characters into notepad. The string has a set of delimiters that correspond to encoding. It is very easy to parse these values into something meaningful with just String.split. It is typical for most input devices to ship with a wedge driver. This provides the simplest integration as each of these devices can be viewed as just a very fast keyboard. http://www.google.com/search?q=keyboard+wedge+driver http://www.programbl.com/ Plus the free ones that ship with the devices! Cheers, Ted ;) From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Sent: Thursday, August 18, 2005 1:25 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] What I wish Flex/Flash Player could do... Hello Ted, I was looking for a way to read a card reader from comm. port, as the current configuration I have to deal with uses a barcode scanner on the wedge. Any help would greatly be appreciated James From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Theodore E Patrick Sent: Tuesday, August 16, 2005 6:53 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] What I wish Flex/Flash Player could do... Flash can handle these via a standard MS Keyboard Wedge Driver. We shipped a kiosk with a card reader and the Flash Player can directly parse data entered. Basically all these devices can be reduced to keyboard input so when you swipe a card or scan a barcode, it just types data really fast. Actually I believe I have an example that does just this very thing Just put 3 V2 TextInput controls on stage and name the instances: ti_name, ti_card, ti_date and use this code: Key.addListener(this) function onKeyDown(){ var self = arguments.callee var k = String.fromCharCode(Key.getAscii()) if(self.storage == undefined) self.storage= self.storage = self.storage + k if(self.storage.split(?).length == 3 ){ var sname = self.storage.split(^)[1] var scardbase = self.storage.split(?;)[1].split(?)[0].split(=) ti_name.text = sname ti_card.text = scardbase[0] ti_date.text = scardbase[1] self.storage = } } This will parse the values from a standard 3 phase credit card reader. In the kiosk that used this we tested cards from starbucks, visa, amex, subway and all worked perfectly. When each type of device, you just need to know what to look for in parsing the data received. One less thing for Ethan :) Cheers, Ted J From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Bullotta Sent: Tuesday, August 16, 2005 1:20 PM To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com Subject: RE: [flexcoders] What I wish Flex/Flash Player could do... Here's another one for Ethan then... :) The Flash Player (along with Flex and AS) should have an input extensibility model that supports input focus management and input from other mechanisms/devices such as: - Barcode readers - RFID readers - Card readers - Others... This would open up a whole new class of applications for Flex/Flash. - Rick Bullotta SAP Labs, LLC From: flexcoders@yahoogroups.com on behalf of JesterXL Sent: Mon 8/15/2005 9:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What I wish Flex/Flash Player could do... I forwarded your request to the Central Dev group for Ethan Malasky to hopefully pick up. Since Central is hopefully the future of Flash, and ultimately Flex on the desktop, things like this are perfect. It just so happens SQL on the client was requested by multiple people already there, so your request from a different demographic WITH the keywords of occasionally connected just adds mad credence. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: DepthManager
The window may be on a different branch of the display list. This depends on the hierarchy of your MXML file and how the controls are instantiated at runtime. Have the window and the menu trace these values: trace( menu ) trace( window ) You will see a resulting path something like: _level0.application.blah.blah.blah.menu _level0.application.blah.blah.window If the two items are at the same level, then this is a depth issue. Otherwise I would bet dollars to donuts that they are on different paths. My 2 Cents, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rajesh Jayabalan Sent: Tuesday, August 16, 2005 10:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DepthManager Hi, I tried that, it does not work, the window still is showing on top of the menu. Rajesh J --- In flexcoders@yahoogroups.com, Theodore E Patrick [EMAIL PROTECTED] wrote: The method MovieClip.swapDepths accepts both a MovieClip instance and a number. One potential issue with usage of Number.MAX_VALUE is that there are not 1.79769313486231e+308 depths within the Flash Player. The error has to do with the input data not that swapDepths does not accept number as input. Try: menu.swapDepths( menu.getNextHighestDepth() ) My 2 cents, Ted ;) Hi, The method swapDepths accepts a UIObject as a parameter and not a number. Regards Rajesh J --- In flexcoders@yahoogroups.com, Philippe Maegerman [EMAIL PROTECTED] wrote: You might try to manualy adjust your menu's depth to be the max depth : menu.swapDepths(Number.MAX_VALUE) I hope it helps //Philippe -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- font face=arial size=-1a href=http://us.ard.yahoo.com/SIG=12hvptb0i/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124266881/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOOcmpgn=GRPRTP=http://groups.yahoo.com/;In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!/a./font ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] What I wish Flex/Flash Player could do...
Flash can handle these via a standard MS Keyboard Wedge Driver. We shipped a kiosk with a card reader and the Flash Player can directly parse data entered. Basically all these devices can be reduced to keyboard input so when you swipe a card or scan a barcode, it just types data really fast. Actually I believe I have an example that does just this very thing Just put 3 V2 TextInput controls on stage and name the instances: ti_name, ti_card, ti_date and use this code: Key.addListener(this) function onKeyDown(){ var self = arguments.callee var k = String.fromCharCode(Key.getAscii()) if(self.storage == undefined) self.storage= self.storage = self.storage + k if(self.storage.split(?).length == 3 ){ var sname = self.storage.split(^)[1] var scardbase = self.storage.split(?;)[1].split(?)[0].split(=) ti_name.text = sname ti_card.text = scardbase[0] ti_date.text = scardbase[1] self.storage = } } This will parse the values from a standard 3 phase credit card reader. In the kiosk that used this we tested cards from starbucks, visa, amex, subway and all worked perfectly. When each type of device, you just need to know what to look for in parsing the data received. One less thing for Ethan :) Cheers, Ted J From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Bullotta Sent: Tuesday, August 16, 2005 1:20 PM To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com Subject: RE: [flexcoders] What I wish Flex/Flash Player could do... Here's another one for Ethan then... :) The Flash Player (along with Flex and AS) should have an input extensibility model that supports input focus management and input from other mechanisms/devices such as: - Barcode readers - RFID readers - Card readers - Others... This would open up a whole new class of applications for Flex/Flash. - Rick Bullotta SAP Labs, LLC From: flexcoders@yahoogroups.com on behalf of JesterXL Sent: Mon 8/15/2005 9:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What I wish Flex/Flash Player could do... I forwarded your request to the Central Dev group for Ethan Malasky to hopefully pick up. Since Central is hopefully the future of Flash, and ultimately Flex on the desktop, things like this are perfect. It just so happens SQL on the client was requested by multiple people already there, so your request from a different demographic WITH the keywords of occasionally connected just adds mad credence. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] What I wish Flex/Flash Player could do...
lash Player 8 provides an new intrinsic class called ExternalInterface. This allows you to exchange data with external application in a standardized way synchronously in both directions. Flash can call an external function and get the return data and an external app can query the Flash Player in the opposite manner. With custom instances of input drivers in an external application, you can fire custom events into the player or query the external objects to obtain their state. Most input drivers work with _javascript_ and ActiveX allowing you to pipe data into Flash via ExternalInterface. I doubt that Macromedia would support custom input drivers now that ExternalInterface exists. The code I posted was intended to be player version neutral and should work in Flash 5 or higher, less those fancy v2 controls. This code is also focus neutral but is hardwired to the instance names of the V2 controls. It would be a trivial change to make this work through an event model. Ted ;) From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Bullotta Sent: Tuesday, August 16, 2005 2:47 PM To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com Subject: RE: [flexcoders] What I wish Flex/Flash Player could do... Thanks for the ideas! I've done similar things in the past - but specific listeners for various attached input devices would be a cleaner way to go, particularly when there are multiple input fields on a form that can accept remote or direct input. There are hacks that can be done with prefix and suffix codes to help identify input source, but they're messy. And the focus management can be even more painful :(. Good ideas though! From: flexcoders@yahoogroups.com on behalf of Theodore E Patrick Sent: Tue 8/16/2005 6:52 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] What I wish Flex/Flash Player could do... Flash can handle these via a standard MS Keyboard Wedge Driver. We shipped a kiosk with a card reader and the Flash Player can directly parse data entered. Basically all these devices can be reduced to keyboard input so when you swipe a card or scan a barcode, it just types data really fast. Actually I believe I have an example that does just this very thing Just put 3 V2 TextInput controls on stage and name the instances: ti_name, ti_card, ti_date and use this code: Key.addListener(this) function onKeyDown(){ var self = arguments.callee var k = String.fromCharCode(Key.getAscii()) if(self.storage == undefined) self.storage= self.storage = self.storage + k if(self.storage.split(?).length == 3 ){ var sname = self.storage.split(^)[1] var scardbase = self.storage.split(?;)[1].split(?)[0].split(=) ti_name.text = sname ti_card.text = scardbase[0] ti_date.text = scardbase[1] self.storage = } } This will parse the values from a standard 3 phase credit card reader. In the kiosk that used this we tested cards from starbucks, visa, amex, subway and all worked perfectly. When each type of device, you just need to know what to look for in parsing the data received. One less thing for Ethan :) Cheers, Ted J From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Bullotta Sent: Tuesday, August 16, 2005 1:20 PM To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com Subject: RE: [flexcoders] What I wish Flex/Flash Player could do... Here's another one for Ethan then... :) The Flash Player (along with Flex and AS) should have an input extensibility model that supports input focus management and input from other mechanisms/devices such as: - Barcode readers - RFID readers - Card readers - Others... This would open up a whole new class of applications for Flex/Flash. - Rick Bullotta SAP Labs, LLC From: flexcoders@yahoogroups.com on behalf of JesterXL Sent: Mon 8/15/2005 9:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What I wish Flex/Flash Player could do... I forwarded your request to the Central Dev group for Ethan Malasky to hopefully pick up. Since Central is hopefully the future of Flash, and ultimately Flex on the desktop, things like this are perfect. It just so happens SQL on the client was requested by multiple people already there, so your request from a different demographic WITH the keywords of occasionally connected just adds mad credence. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
RE: [flexcoders] IFBIN Begins...
Is this a FLEX OEM? btw? ie i thought it was a no no to deploy FLEX SWF's without FLEX server? We use 1 Flex License for the distribution server and 1 for the development server. The IFBIN Service proxies the http based flex swf onto the local machine from our distribution server. This use pattern is the exact model used by Central to display/install/update a Flex application except that we never write or cache content to the file system, rather everything is in memory while the IFBIN Service is running. Every time the IFBIN Service is launched the Flex SWF UI is proxied to the browser. This allows IFBIN to update the UI and add products into the service without a user download. As I understand licensing you can deploy FLEX swf files to a server with a Flex CPU License that does not actually have Flex installed. Given the high load on our production server we wanted to keep the server as simple as possible. Regards, Ted Patrick -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Flex and Central
Are you using localhost to install the Central application or do you have a fully qualified domain name for the Flex server? Central does not like localhost and installation is very problematic there. Ted :) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Joan Tan Sent: Friday, July 22, 2005 1:29 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex and Central Hmm... you usually get that error in Central if one or more of the files in your product.xml can't be found on your server. Can you check to be sure that all of the files defined in your product.xml are available? Thanks, Joan From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Laurent Bois Sent: Friday, July 22, 2005 9:24 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex and Central Hi everybody, Some weeks ago i began to work with Flex. Today, i have a mockup, done with Flex : several files (.mxml files for the application components, several .as files, several .xml files for data, some images files). .mxml .as files are in teh same folder. Resources files : .xml images are in subfolders. I'm trying to add this application in Central. I've installed Central and Flex integration Libraries. I've modified my Application .mxml file (including imports from mx.central.Shell, the initApp() function including the mx.central.Central.initApplication call, the function onActivate, etc...) I add a product.xml, the installer.swf file and icons in my application folder. Then i tried to install it : I get an error message in Central when installing telling me some of the files could not be downloaded. Please report to the server IP My application entry point file is : AAA.mxml i've set src value for my application to AAA.mxml.swf There are some guidelines in a file coming with the Flex SDK for Central Are there more detailed resources on how to develop Flex applications to be deployed in Central. Thanks for your help Regards Laurent -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] IFBIN Begins...
Flexcoders, As I stated in an earlier post I was working on a big Flex project. We launched the IFBIN Service this morning and will soon launch the Flex By Example subscription. http://www.ifbin.com I have been working on a new company, IFBIN Networks. We provide software examples for learning and reuse for Flash and Flex. The service application is written using Flex/Python and provides licensed access to a growing library of Flash and Flex software. We are currently in development with Flex content and will be launching the Flex By Example products in the next month. Technically, the IFBIN Service is a proxy server with logic for code authentication and software installation. The files are requested through a Flex UI and installed to the local machine. If one byte of an example is modified in the original, the service will not install it. You are one click from installing a Flex application onto your server. The application talks with the local proxy server via XMLSocket allowing the Flex shell to be served from within Flash, Flex Builder, or within a Browser. It is a new model of integration and provides a seamless secure local/remote feature set. In regards to Flex by Example, we have some really great projects in development. We will be providing 100% example coverage of the base Flex MXML tags and AS along with many applications and frameworks. Regards, Ted ;) -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] DataGrid labelFunction AMF
Sure. The key is that you need to build your DataGrid with defined columns before your data arrives in AMF. When DataProvider is set, the Columns and DataGrid are used as a template against DataProvider to define the view. You can define a labelFunction or cellRenderer to customize the rendering of any data or cell in the DataGrid. You can render columns that do not exist in your dataProvider by having labelFunction calculate or format the results. Take a look at mx:DataGridColumn. Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Devis Sent: Tuesday, July 19, 2005 6:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid labelFunction AMF Hi, it's possibile to write a LabelFunction for DataGrid with an AMF? for example i wish getNumberOrder(item) ... RemoteObject.getOrder(item.cod_cli).result.NUMBER_ORDER? ... pls can you give me some suggestion Devis -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] XMLsocket behaviour
Alberto, The onConnect callback receives a Boolean flag True if connected and False if not connected. When false just reconnect. function onConnect(connected){ if (connected){ //connected }else{ Sock.connect( Sock.server , Sock.port ) } } Although, when connected is false it return with a slight delay, so you might just connect there. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alberto Albericio Salvador Sent: Wednesday, July 13, 2005 6:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] XMLsocket behaviour Hi all, In my Flex application, I use XMLsocket to receive some server msgs. onConnect, onClose, etc events work fine but, when I cant connect to the socket, how can I tell mySocket to try reconnecting every, lets say, 20 seconds? I want something like : .onNotConnected = function () { ... } every 20 seconds :) Thanks all in advance! -- Alberto Albericio Salvador Aura S.A. Seguros Departamento Informática -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Extending DataGridColumn + emitting events = java.lang.NullPointerException
Use a cellrenderer, the cellRenderer API was designed to extends and provide custom inner layout of datagrid cells. There are some default objects that decorate each CellRenederer instance: var listOwner:MovieClip //the datagrid var getCellIndex:Function var getDataLabel:Function var owner:MovieClip //the dataGridColumn instance These are actually present whether you use a customCellRenderer or not. So in your case simply use these to listen/dispatch the events you need. Your Cellrenderer can add events onto these objects or broadcast events out to the DataGrid as things happen within the CellRenderer. For example say I have an inner checkbox within my CellRenderer. I would add a click event onto that control where it would do something like so. Note: 'com' is my cellRenderers inner component instance: function click(){ //obtain the index var index = getCellIndex() //obtain the columnName from the Datagrid var colName = listOwner.getColumnAt( index.columnIndex ).columnName //edit the data because the component data had changed listOwner.dataProvider.editField( index.itemIndex , colName , com.selected ) //set the dataproviders seletedIndex listOwner.selectedIndex = index.itemIndex //trigger a 'celledit' event in the datagrid listOwner.dispatchEvent( { type:cellEdit , cell:this , column:colName, value:com.selected } ) } Stump Flexcoders? Think again! :) Cheers, Ted ;) Well, I found you can simply pass a Function object to the custom DataGridCell and have the custom cell handle its own click method with that Function. The drawback is that the function must live in the same MXML file that the DataGridCell is declared in. I'd still much rather use Flex's own event handling mechanisms. Any other ideas? Have I stumped the flexcoders?! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Extending DataGridColumn + emitting events = java.lang.NullPointerException
Sorry correction, 'owner' in the datagrid is the DataGridRow not the column! -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Theodore E Patrick Sent: Monday, July 11, 2005 9:10 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Extending DataGridColumn + emitting events = java.lang.NullPointerException Use a cellrenderer, the cellRenderer API was designed to extends and provide custom inner layout of datagrid cells. There are some default objects that decorate each CellRenederer instance: var listOwner:MovieClip //the datagrid var getCellIndex:Function var getDataLabel:Function var owner:MovieClip //the dataGridColumn instance These are actually present whether you use a customCellRenderer or not. So in your case simply use these to listen/dispatch the events you need. Your Cellrenderer can add events onto these objects or broadcast events out to the DataGrid as things happen within the CellRenderer. For example say I have an inner checkbox within my CellRenderer. I would add a click event onto that control where it would do something like so. Note: 'com' is my cellRenderers inner component instance: function click(){ //obtain the index var index = getCellIndex() //obtain the columnName from the Datagrid var colName = listOwner.getColumnAt( index.columnIndex ).columnName //edit the data because the component data had changed listOwner.dataProvider.editField( index.itemIndex , colName , com.selected ) //set the dataproviders seletedIndex listOwner.selectedIndex = index.itemIndex //trigger a 'celledit' event in the datagrid listOwner.dispatchEvent( { type:cellEdit , cell:this , column:colName, value:com.selected } ) } Stump Flexcoders? Think again! :) Cheers, Ted ;) Well, I found you can simply pass a Function object to the custom DataGridCell and have the custom cell handle its own click method with that Function. The drawback is that the function must live in the same MXML file that the DataGridCell is declared in. I'd still much rather use Flex's own event handling mechanisms. Any other ideas? Have I stumped the flexcoders?! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Extending DataGridColumn + emitting events = java.lang.NullPointerException
a custom DataGridColumn object should be possible? --- In flexcoders@yahoogroups.com, Theodore E Patrick [EMAIL PROTECTED] wrote: Use a cellrenderer, the cellRenderer API was designed to extends and provide custom inner layout of datagrid cells. There are some default objects that decorate each CellRenederer instance: var listOwner:MovieClip //the datagrid var getCellIndex:Function var getDataLabel:Function var owner:MovieClip //the dataGridColumn instance These are actually present whether you use a customCellRenderer or not. So in your case simply use these to listen/dispatch the events you need. Your Cellrenderer can add events onto these objects or broadcast events out to the DataGrid as things happen within the CellRenderer. For example say I have an inner checkbox within my CellRenderer. I would add a click event onto that control where it would do something like so. Note: 'com' is my cellRenderers inner component instance: function click(){ //obtain the index var index = getCellIndex() //obtain the columnName from the Datagrid var colName = listOwner.getColumnAt( index.columnIndex ).columnName //edit the data because the component data had changed listOwner.dataProvider.editField( index.itemIndex , colName , com.selected ) //set the dataproviders seletedIndex listOwner.selectedIndex = index.itemIndex //trigger a 'celledit' event in the datagrid listOwner.dispatchEvent( { type:cellEdit , cell:this , column:colName, value:com.selected } ) } Stump Flexcoders? Think again! :) Cheers, Ted ;) Well, I found you can simply pass a Function object to the custom DataGridCell and have the custom cell handle its own click method with that Function. The drawback is that the function must live in the same MXML file that the DataGridCell is declared in. I'd still much rather use Flex's own event handling mechanisms. Any other ideas? Have I stumped the flexcoders?! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: HTTPService useProxy question...
First thanks for the response! Clears a lot of things up. But...if I read this correctly, then all the sites that I am requesting FROM have to have a crossdomain.xml file in their root web directory? Exactly. The Flash client works same as Java or JS in regards to security, cross domain data exchange is limited. The exception here is that Flash allows this with a light security measure in crossdomain.xml. It also provides access to low ports for XMLSocket and several other features. If you are accessing Internet WebServices, either write your own proxy or use the one included in Flex. Plus with the Flex proxy you also have whitelist security and support for HTTP authorization headers. useProxy=false is ideal if the only web service you are exchanging data is on your own server. Hope that helps. Ted ;) Thanks again, Michael --- In flexcoders@yahoogroups.com, Theodore E Patrick [EMAIL PROTECTED] wrote: When you set proxy=false you need to have crossdomain.xml files set-up to handle the flash player security sandbox. If you do not have crossdomain.xml files configured, the player will block the URL request internally. Here is the lowdown on crossdomain.xml. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14213 Here are some sample crossdomain.xml files: http://www.macromedia.com/crossdomain.xml http://www.yahoo.com/crossdomain.xml http://www.ifbin.com/crossdomain.xml These files are typically found on the server where the data is being requested. The Flash Player will automatically check this address for any domain or subdomain that is accessed. The Flex proxy gets around this restriction. Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of heybluez Sent: Friday, July 08, 2005 3:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] HTTPService useProxy question... Anyone bypass the flex proxy with useProxy=false? I have a flex app that currently uses the server as a proxy but we want to bypass the flex server and go directly to the source HTTP post/request. For example, one source is an RSS feed that will come up in a browser but is an XML file. When I use HTTPService and hit that with the default settings (i.e. Flex Proxy) it works. As soon as I turn that off (i.e. useProxy=false) it says that it cannot retrieve data! I am looking to see what I need to do...I did see this in the manual: -- Note: You must use the Flex proxy to correctly return HTTP status codes from a service. -- Is this my issue? The direct hit on the .rdf (i.e. XML) file does not return status codes?! Is that possible? Ideas? Thanks, -Michael -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] HTTPService useProxy question...
Sorry that should be useProxy=false. Ted ;) When you set proxy=false you need to have crossdomain.xml files set-up to handle the flash player security sandbox. If you do not have crossdomain.xml files configured, the player will block the URL request internally. Here is the lowdown on crossdomain.xml. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14213 Here are some sample crossdomain.xml files: http://www.macromedia.com/crossdomain.xml http://www.yahoo.com/crossdomain.xml http://www.ifbin.com/crossdomain.xml These files are typically found on the server where the data is being requested. The Flash Player will automatically check this address for any domain or subdomain that is accessed. The Flex proxy gets around this restriction. Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of heybluez Sent: Friday, July 08, 2005 3:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] HTTPService useProxy question... Anyone bypass the flex proxy with useProxy=false? I have a flex app that currently uses the server as a proxy but we want to bypass the flex server and go directly to the source HTTP post/request. For example, one source is an RSS feed that will come up in a browser but is an XML file. When I use HTTPService and hit that with the default settings (i.e. Flex Proxy) it works. As soon as I turn that off (i.e. useProxy=false) it says that it cannot retrieve data! I am looking to see what I need to do...I did see this in the manual: -- Note: You must use the Flex proxy to correctly return HTTP status codes from a service. -- Is this my issue? The direct hit on the .rdf (i.e. XML) file does not return status codes?! Is that possible? Ideas? Thanks, -Michael -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Flex external desktop application communication
The nice aspect of a local server (HTTP/XMLSocket) for integration is that you can interact with Flex applications in the browser cleanly within the security sandbox of the player. So long as the crossdomain.xml files are in place and valid, you can have Flex integrate with a local server without issue from a public website or intranet. FlexUI mx:Loader Local HTTP Server Local System FlexUI XMLSocket Local XMLSocket Server Local System In our case, we are licensing, installing, and configuring software via a Flex UI through a desktop Service. Within Flash, FlexBuilder, Eclipse(Zorn), Browsers, and Standalone Players, we can license, install, and configure software to the local file system securely. All content is distributed in a signed format that can be tested for authenticity within the Service before installation occurs. We shipped Beta 1 of the Service internally yesterday on WIN (OSX soon). We are about a week from announcing and the public beta will proceed afterwards. I will make sure to push the announcement onto Flexcoders a day in advance. There is nothing like a great example. Ted ;) Never thought it was possible, so i'm very keen to see how. Many ways :), some are... - LocalConnection - XMLSocket I wrote a Flash application in past, which used to communicate with MS Outlook and MS Excel. It was kind of experiment after someone on flashcoders asked about it.. If you are working for intranet applications, these things(custom ActiveX, standalone apps etc) are possible and easy.. BTW! Looking for Ted's experiment and his python socket server :) -abdul -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] XML Socket Doesn't Work
Chris, You need to use Delagate with XMLSocket callbacks. This should work: import mx.utils.Delegate; sock.onClose = Delegate.create( this, sockOnClose ); sock.onConnect = Delegate.create( this, sockOnConnect ); sock.onData = Delegate.create( this, sockOnData ); Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cshafer213 Sent: Thursday, July 07, 2005 2:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] XML Socket Doesn't Work Can Anyone Tell Me what is wrong with the following code to connect to an XML socket server? The stat Lable should display either status = Connected or status = Error when the button is clicked, and nothing is happening. Thanks, Chris Shafer, George Weiss Associates ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ public function serverConnected(success:Boolean) { if (success) { stat.text=Status = Connected; } else { stat.text=Status = Error; } } public function connect(event){ var socket:XMLSocket = new XMLSocket(); socket.onConnect=serverConnected; socket.connect(null, 9875); return } ]] /mx:Script mx:Text text=XML Test App width=205 textAlign=center / mx:Button label=Connect to XML Server click=connect() / mx:Label id = stat text=Status = width=144 textAlign=center / /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Push/AJAX via a Loader (Re: Flex external desktop application communication)
So a loader can be used to communicate with an HTTP Server in a push model?!!! Is this analagous to the way AJAX web sites push content to the client? Loader is for SWF/Image but there are ton of various ways to exchange data in Flash. The Flash Player has supported data exchange since version 4 in various forms. With the current 7 Player you have many options to exchange data: ActionScript Classes: LoadVars XML MovieClip.loadVariables XMLSocket MXML (built atop the above...) mx:Loader mx:Image mx:HTTPService mx:WebService **Others** The usage varies in form and function but each has strengths and weaknesses. In regards to a push model there are 2 primary ways to accomplish this: HTTP Poll with delayed response on server data. The AIM/ICQ Central client used this model with a custom HTTP server. The HTTP poll request would hang until the server had data to push, then the result would return. XMLSocket with true push == Ideal! I prefer the later because it works, is scalable, and you can shape the server side API as needed. There is a limited amount you can do with HTTP as each call is round-trip. With XMLSocket each pipe can send and receive data independently. The naming of XMLSocket is misleading, it should be NullSocket as the only required element is null byte delimiters in the message transport. If you use XMLSocket.onData callback the use of XML is optional and you can pass plain ASCII messages. Most of my server protocols look like this: Server Client: SYNC 0 1 2 Client Server: SYNC 1 55 8787 Client Server: SYNC 1 52 8223 Server Client: SYNC 0 1 4 Server Client: SYNC 0 2 2 Server Client: SYNC 0 1 3 I typically create an array using String.split on the value received and apply it to a function for handling the particular message. In testing this is about 20X faster than using XML as a payload. Parsing XML on the server and client are a huge waste when you typically can make due with far less. Parsing delimited text with String.split is 10x faster than XML parsing in Flash and you do not bloat memory in the player. Using String.split you can still use XML with inner message blocks using 'escape' and 'unescape' on send and receive or using an ASCII character that is illegal in XML like | or others. I have written over 20 XMLSocket servers with Python/Java and in every case, using delimited text was dramatically faster than using XML. For example, I have a simple echo client/server in Flash that can round-trip exchange 1000 messages in 1.3 seconds. You can't do that with HTTP, apache and IIS would explode. In the cases when I used mx:Loader, I was importing SWF files. With the Kiosk app, we were converting media formats. Flex/Flash would call a URL on the local server, the local server would fetch a media resource from the web, convert it to SWF, then return the data to the original loader request. This was essentially a proxy for media conversion of GIF/JPG/PNG/WMA/AnimatedGif. If so, I'm very curious as to how well this works in practice. (I suspect the devil is in the details here.) The loader documentation says the the url needs to be a swf or a jpg. Can you send down arbitrary data? If you are using data, it is best to use mx:HTTPService or just use XML/LoadVars, this will allow you to exchange data cleanly. Is it possible to access the content of a loader as bytes? No. There is no support for ByteArray to enable reading binary data. Central supports this and I could see some amazing uses for this in the regular Flash Player. Is it possible to access the content of a loader incrementally (up to bytesLoaded bytes)? No. Loader is really a MovieClip with a light API atop. By default, Loader will stream data into the MovieClip. If you are using SWF, it will do its default file streaming. Can you detect errors? Can you re-establish communication when there is an error? (Do you just dynamically create a new, invisble loader?). Yes although it is a kluge. Determining bytesloaded and detecting load failure is tricky. Flex makes it easier but nothing is perfect. I even think the docs mention a shortcoming of this, not sure. Do you need to destroy the loader after a period of time to release the bytes it accumulates? No just calling a different URL handles this. This is a base feature of MovieClip in the Flash Player. The benefit of this over XMLSocket would be: - Avoids issues of (client) firewalls with the use of an arbitrary port/protocol for XMLSocket This is not true, you can run XMLSocket over port 80! Support for low ports was enabled in 7,0,14,0 within crossdomain.xml files. XMLSocket works directly through firewalls without issue. In most cases the client side (behind the firewall) is initiating the connection so there is no issue at all. If you use port 80, this gets even cleaner. - Simply need to setup a servlet to handle a URL rather than configure a service to handle commmunication over a port. This is true, but the
RE: [flexcoders] Re: XML Socket Doesn't Work
Ah, there are 2 errors is there, socket is a temporary variable within the connect method and null is not a valid value for the server. Think of the mx:Script block as a class (because it is at runtime). I made this mistake first time round the MXML tree. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ import mx.utils.Delegate; var socket:XMLSocket public function serverConnected(success:Boolean) { if (success) { stat.text=Status = Connected; } else { stat.text=Status = Error; } } public function connect(event){ socket:XMLSocket = new XMLSocket(); socket.onConnect = Delegate.create( this , serverConnected ); socket.connect( 'localhost' , 9875); return } ]] /mx:Script mx:Text text=XMLSocket Test App width=205 textAlign=center / mx:Button label=Connect to XML Server click=connect() / mx:Label id=stat text=Status = width=144 textAlign=center / /mx:Application Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cshafer213 Sent: Thursday, July 07, 2005 8:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: XML Socket Doesn't Work --- In flexcoders@yahoogroups.com, Theodore E Patrick [EMAIL PROTECTED] wrote: Thanks for responding and putting me on the right track. I changed my code to add the Delegate as best I could but I still can't get it working: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ import mx.utils.Delegate; public function serverConnected(success:Boolean) { if (success) { stat.text=Status = Connected; } else { stat.text=Status = Error; } } public function connect(event){ var socket:XMLSocket = new XMLSocket(); socket.onConnect = Delegate.create( this, serverConnected ); socket.connect(null, 9875); return } ]] /mx:Script mx:Text text=XML Test App width=205 textAlign=center / mx:Button label=Connect to XML Server click=connect() / mx:Label id = stat text=Status = width=144 textAlign=center / /mx:Application Chris, You need to use Delagate with XMLSocket callbacks. This should work: import mx.utils.Delegate; sock.onClose = Delegate.create( this, sockOnClose ); sock.onConnect = Delegate.create( this, sockOnConnect ); sock.onData = Delegate.create( this, sockOnData ); Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cshafer213 Sent: Thursday, July 07, 2005 2:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] XML Socket Doesn't Work Can Anyone Tell Me what is wrong with the following code to connect to an XML socket server? The stat Lable should display either status = Connected or status = Error when the button is clicked, and nothing is happening. Thanks, Chris Shafer, George Weiss Associates ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ public function serverConnected(success:Boolean) { if (success) { stat.text=Status = Connected; } else { stat.text=Status = Error; } } public function connect(event){ var socket:XMLSocket = new XMLSocket(); socket.onConnect=serverConnected; socket.connect(null, 9875); return } ]] /mx:Script mx:Text text=XML Test App width=205 textAlign=center / mx:Button label=Connect to XML Server click=connect() / mx:Label id = stat text=Status = width=144 textAlign=center / /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Flex external desktop application communication
Actually I am working on one right now for my new company. I am using XMLSocket to connect to a locally running server combined with data pulled from remote webservices. It is very easy to integrate just about any feature you need as the local server can provide file system access and provides seamless read/write into the application. FLEXSWF HTTP LocalServer FLEXSWF XMLSocket LocalServer FLEXSWF WS RemoteServer I shipped a custom XMLSocket server last month for a Kiosk installation for Flash integration. The server provided media conversion for SWF display, PNG/JPG/GIF/AnimatedGIF/WMA/RM all running through a Flash UI. Additionally we integrated with an MSR (CC Reader) on the IBM AnyPlace Kiosk which pushed the CC value into Flash as an event. The other option is diving into Central. Using FileReference and FileReferenceList, you can read, write, upload download files as needed. All are good options but it depends on what you need. Having been down the kiosk path as recently as last week, using a custom XMLSocket/HTTP server is a very solid solution although I think I stand alone in this effort. Actually if all goes well my new company will have a public beta of a FlexUI Custom Server for download within a weeks time. :) Ted ;) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of superabe Sent: Tuesday, July 05, 2005 6:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex external desktop application communication Hello list, I know Flex excels at communicating with server-side data sources. Is there any way for a flex app to communicate with a desktop application installed on the same machine as where the app is being viewed (in a controlled kioskenvironment for e.g.) TIA, superabe -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Flex external desktop application communication
Abdul, I have not been busier. Flex/Flash application use is growing big time. I will be very interested to see Flexcoder reaction to our new product. If noone objects(?), I would like love to announce the product Beta on Flexcoders. I am not sure what the Flexcoder list policy is regarding product/beta announcements? More to come! Ted ;) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Abdul Qabiz Sent: Wednesday, July 06, 2005 11:27 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex external desktop application communication Yeah XMLSocket is always a good option. Ted, looks like you aredoing kick-ass stuff ;) -abdul From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Theodore E Patrick Sent: Wednesday, July 06, 2005 8:52 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex external desktop application communication Actually I am working on one right now for my new company. I am using XMLSocket to connect to a locally running server combined with data pulled from remote webservices. It is very easy to integrate just about any feature you need as the local server can provide file system access and provides seamless read/write into the application. FLEXSWF HTTP LocalServer FLEXSWF XMLSocket LocalServer FLEXSWF WS RemoteServer I shipped a custom XMLSocket server last month for a Kiosk installation for Flash integration. The server provided media conversion for SWF display, PNG/JPG/GIF/AnimatedGIF/WMA/RM all running through a Flash UI. Additionally we integrated with an MSR (CC Reader) on the IBM AnyPlace Kiosk which pushed the CC value into Flash as an event. The other option is diving into Central. Using FileReference and FileReferenceList, you can read, write, upload download files as needed. All are good options but it depends on what you need. Having been down the kiosk path as recently as last week, using a custom XMLSocket/HTTP server is a very solid solution although I think I stand alone in this effort. Actually if all goes well my new company will have a public beta of a FlexUI Custom Server for download within a weeks time. :) Ted ;) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of superabe Sent: Tuesday, July 05, 2005 6:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex external desktop application communication Hello list, I know Flex excels at communicating with server-side data sources. Is there any way for a flex app to communicate with a desktop application installed on the same machine as where the app is being viewed (in a controlled kioskenvironment for e.g.) TIA, superabe -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Computer software testing Macromedia flex Development Software developer YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Re: Performance.... Data Grid
The issue is the cursor motion over the datagrid under the Panel. There is a trick here that can work. Put the datagrid into an mx:Canvas, then put a rect stacked over the DataGrid in depth. Via ActionScript, hack a onMouseDown = function(){} into the rect by name. When you display your panel, make the rect visible otherside make it invisible. This will block cursor access to the DataGrid and stop all the mouse events from firing in the background since the rect surface intercepts them. This is clearly a hack, but it will block access to the mouse events driving the datagrid refresh logic and thus speed up the player when the panel is displayed. Let me code this up as an example and post it for review. Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nextadvantage Sent: Friday, July 01, 2005 6:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Performance Data Grid --- In flexcoders@yahoogroups.com, Theodore E Patrick [EMAIL PROTECTED] wrote: Thanks Ted, yes we are using cell renderer for an edit and preview icon and are using label functions for formating. Sucks... :) Does the Datagrid row have a 'labelFunction' or 'cellRenderer' in it? These force an update the DataGrid when the cursor of over the DataGrid content. The datagrid might be doing a ton of work as you draw a pop-up panel over the datagrid. Also tracing anything in labelFunction is a good way to drop your framerate to 1-2 fps. I have seen this happen time and time again in V2 controls. Ted ;) We are seeing very poor frame rates opening popup panels on top of data grids. Anyone else have this issue and any way to improve the performance? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Flex - the general feeling about the product is...
Jamie, I have been using Flex for 3 months but personally have 8 years of Flash experience. The key difference in moving from Flash to Flex is that Flex allows you to reconfigure and reuse where Flash cannot. In 3 consecutive projects late design changes to an application occurred seamlessly without affecting the core application logic. Since Flex uses managed ids, similar to a controls collection, you can move MXML around with near zero change to application logic. Attempting to do this within Flash would have resulted in a massive Library reorganization and taken 20x longer. Flex allows you to work at a much higher level and automate many of the mundane tasks Flash devs had to do to make RIAs. That said there are some things that Flash can still do better but both tools are extremely useful to Flex work. Integrating existing Flash content is very easy in Flex either via loading or embedding. Flex is also much deeper as a product than had originally thought. The compiler is stricter and provides more detailed errors. Naming convention errors fall the wayside as Flex detects the absence of a function or references to a name that is not defined. These simple naming errors would leave Flash devs banging their head on their desk for hours. Been there done that. I really like the WebServices integration. It could not be easier to exchange data and integrate with external systems. On the projects I have worked on the company has many existing SOAP services and wiring them into a seamless application UI is really quite simple. We completed one project integrating with JIRA bug tracking and one for a webmail system. Dare I say it but WebServices in Flex might be too easy. Another key feature for me is the ability to store application configuration data in XML. Flex can compile XML into your application as a object representation via the mx:Model tag. The following tag is the 1 or second tag in every one of my applications that I build. mx:Model source=config.xml id=config/ Anywhere within the application, I can read properties stored in the config variable and use then to configure any type of data including dataproviders, strings and other items. When I am done with development, the XML configuration file allows the client to edit the application data as needed without opening the MXML or AS files. Although I am new to Flex, the past few months of working in it full time have been a great learning experience. Having developed applications in Flash, you will make a seamless jump to Flex. Although I am still learning, everything is still within the Flash player and all existing Flash skills translate well in an application context. Your V2 and AS experience will allow you to Flex much deeper. I find myself running circles around the Java devs working in Flex given my deep understanding of the Player and ActionScript. My 2 cents, Ted Patrick PowerSDK Software Generally, are people happy with the Flex environment ? Are you finding it a productive development environment and are you happy with the apps you're creating ? Are there many really nasty 'problem areas' that you're waiting for Macromedia to address in a future release that you've found impossible - or very hard - to workaround ? Compared to developing a similar app in Flash, how're you finding the development speeds ? Thanks in advance! Cheers, Jamie. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Web Services and CF7
Anything goes really, I return numbers, string, bools, arrays, objects and combinations of all the above depending on what is needed. In the use cases we are using this data service for: Search Directory Articles Ecommerce Personalization The requests and responses are all different but we want a common way to develop them to completion. We would like a productive language like CF but it has to work in all cases. The fallback here is to just use Apache Axis with Java classes on the server side although I would prefer something simple and easy to change like CFC's. Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Muller Sent: Thursday, May 19, 2005 1:05 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Web Services and CF7 So, silly question, how are you structuring/formatting the data that you're returning from your webservice, something like arrays of objects or is it CF query result sets? Andrew On 5/19/05, Theodore E Patrick [EMAIL PROTECTED] wrote: Remoting is great but it has a core limitation of one request at a time due the way AMF was implemented in the player. This is not the case with WebService calls as each request gets its own XML object and its own request socket. Even though the payload might be larger and the parsing takes longer, I want to avoid the issue of having remoting lock-up the AMF pipe on a long running request. Call me paranoid. ;) The issue that I had heard about was that Flex 1.5 has trouble digesting CFC web services due to certain xml usage. I wanted to make sure that Flex 1.5 and CF7 had compatible SOAP formats. I know it sound ridiculous but I have heard firsthand of some problems with compatibility of these two. Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Muller Sent: Wednesday, May 18, 2005 9:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Web Services and CF7 Ted Is there any reason, since you're using CF7, why you wouldn't connect from Flex via Flash Remoting instead of Web Services, you'd be consuming the same CFC presumably and the data should be much less verbose... Andrew Andrew Muller Partner, RocketBoots http://www.rocketboots.com.au On 5/19/05, Theodore E Patrick [EMAIL PROTECTED] wrote: I am looking at using CF7 and CFC web services with Flex 1.5. I understand that some have seen issues with using these two togther or was this limited to CF6? Can anyone highlight the issue for me? Any help would be most appreciated. Cheers, Ted Patrick Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Web Services and CF7
Dave, Awesome, thanks for these! I completely forgot to check Bens blog. These are invaluable. 10 Points to Dave! Thanks, Ted ;) From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dave buhler Sent: Thursday, May 19, 2005 2:20 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Web Services and CF7 from: http://forta.com/blog/index.cfm?mode=ccatid=11 Using Flash Remoting With CFMX7? Watch Out For This One I mentioned this in a comment on a prior post , but it is important enough to warrant its own mention. If you are using Flash Remoting to access ColdFusion code, you may run into an issue in which ColdFusion could construct an invalid URL when appending a jsessionid. If this occurs the web server via which you are accessing your code could throw errors. The solution is simply, just add a ? To the end of the gateway URL, change /flashservices/gateway to /flashservices/gateway?, doing so ensures that the URL will be created correctly. This issue was discovered by our tech support folks, and I believe they'll be posting a TechNote on it shortly. CFC Results Via AMF And Case Inconsistencies I just spent a long time troubleshooting a Flex ColdFusion connectivity issue, and now that we've figured out what was going on I am sharing this in case it bites anyone else. There are two basic ways for Flex to invoke back-end ColdFusion CFCs, SOAP (Web Services) or AMF (Flash Remoting). My app had been using SOAP, but I needed to convert to AMF (the performance difference is significant). Last year Brandon Purcell wrote an excellent blog entry entitled Switching between webservices and Flash Remoting using Flex , and so I used his steps to make the switch. As he notes in that entry, ColdFusion variables returned via SOAP have their names converted to uppercase, whereas variables returned via AMF retain their original case, and so any binding code (or Flex code referencing returned data) needs to be converted from all caps to actual case. The converted code worked perfectly for CFC methods returning queries, they ran exactly as they did before, just a whole lot quicker. But my CFC methods returning structures all failed, none of my bindings and client-side code worked. The problem? Waldo Smeets figured this one out, unlike returned queries, returned structure members are all caps, even when using AMF. This is horribly inconsistent, and hopefully it'll be fixed in the future. For now, keep this in mind. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Web Services and CF7
I am looking at using CF7 and CFC web services with Flex 1.5. I understand that some have seen issues with using these two togther or was this limited to CF6? Can anyone highlight the issue for me? Any help would be most appreciated. Cheers, Ted Patrick Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Web Services and CF7
Remoting is great but it has a core limitation of one request at a time due the way AMF was implemented in the player. This is not the case with WebService calls as each request gets its own XML object and its own request socket. Even though the payload might be larger and the parsing takes longer, I want to avoid the issue of having remoting lock-up the AMF pipe on a long running request. Call me paranoid. ;) The issue that I had heard about was that Flex 1.5 has trouble digesting CFC web services due to certain xml usage. I wanted to make sure that Flex 1.5 and CF7 had compatible SOAP formats. I know it sound ridiculous but I have heard firsthand of some problems with compatibility of these two. Cheers, Ted ;) -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Muller Sent: Wednesday, May 18, 2005 9:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Web Services and CF7 Ted Is there any reason, since you're using CF7, why you wouldn't connect from Flex via Flash Remoting instead of Web Services, you'd be consuming the same CFC presumably and the data should be much less verbose... Andrew Andrew Muller Partner, RocketBoots http://www.rocketboots.com.au On 5/19/05, Theodore E Patrick [EMAIL PROTECTED] wrote: I am looking at using CF7 and CFC web services with Flex 1.5. I understand that some have seen issues with using these two togther or was this limited to CF6? Can anyone highlight the issue for me? Any help would be most appreciated. Cheers, Ted Patrick Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/