[flexcoders] Re: Problem with ModuleLoader and List in Flex 3 - Possible BUG
Hi Venkat, Thanks a lot.. The problem is solved. I don't have any issue with other classes,, is this problem occur only with DragManager class?? Thanks again Anz http://www.FlickrMailer.com --- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote: This is common reference issue with using modules. One of your modules is loading the dragmanager and the second one cannot access it. One solution is to reference the DragManager in your main application import mx.managers.DragManager; var dragManager:DragManager; HTH. - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, Anzer anzer@ wrote: Hi, I have two modules and each having lists to list different items. I am getting the below error when clicking on a list after loading second module. TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::DragManager$/get isDragging()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\ma nagers\DragManager.as:158] at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::dragScro ll()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\controls\l istClasses\ListBase.as:6989] at Function/http://adobe.com/AS3/2006/builtin::apply() at () at flash.utils::SetIntervalTimer/flash.utils:SetIntervalTimer::onTimer() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() I have uploaded a sample page to http://www.digitalmesh.com/staging/modulebug/ModuleTest.html Right click to see the source code. Please let me know if there is any solution to this problem. Thanks Anz
[flexcoders] Hover/Tool tips on datagrid headers?
I want to provide my users some descriptive text of the contents of a column in a data grid but I can't seem to give the headers tooltips or datatips. Am I missing a trick? (FB2)
Re: [flexcoders] Re: Custom HTTP Headers broken?
tested it and you are right, i have a roll back mechanism, when get fails i send a post a few seconds later notifying the server that a call has failed and that was what gave me the illusion that it was working. On Dec 28, 2007 11:34 PM, scott.royston [EMAIL PROTECTED] wrote: Just to answer my own question,i this looks like a known bug: https://bugs.adobe.com/jira/browse/SDK-11401 unfortunately its at the flash player level so I don't know the true resolution of the issue (will fix/wont fix/etc). I'm very curious how custom headers with an HTTP GET is working for you given that this seems to be a confirmed bug for everyone. Thanks again --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Johannes Nel [EMAIL PROTECTED] wrote: PUT would be determined by the sand box per se, no put outside it. With POST and GET its currently working for me with B3, so that is a bit weird. I have had issues with PUT in general even within the Sandbox but it was B1. sorry to not me of more help, read the security white paper if you have not On Dec 28, 2007 10:18 AM, scott.royston [EMAIL PROTECTED] wrote: I believe I have read all the docs, and I've definitely sniffed the http. If there is a particular piece of documentation you belive I've missed, please point me in the right direction. I'd be very interested in understanding why I can use custom headers in a PUT, but not a GET. Thanks --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com, Johannes Nel johannes.nel@ wrote: custom headers function within the sand box security. have you read the docs and http sniffed a bit? On Dec 27, 2007 3:46 PM, scott.royston scott.royston@ wrote: With the latest Flex 3 beta release, I can't get any custom headers to be sent without: 1) The method being POST (e.g. URLRequestMethod.POST) 2) Some data sent (e.g. request.data = new URLVariables(name=John+Doe);) This is on OS X using Safari or Firefox. Search the archives seems to indicate I should be able to add a custom header even with a simple HTTP GET, but the documentation is vague enough I thought I'd post here first to check before filing a bug. Thanks -- j:pn \\no comment -- j:pn \\no comment -- j:pn \\no comment
Re: [flexcoders] Add FDS returned AS3.0 native array to local SQLlite DB?
Innitially we returned an Object[] containing Vectors from FDS to the app and then just inserted that. The option we have settled on however was to build the sqlite db on the server and then just download it using get On Dec 30, 2007 9:57 PM, Scott Mulder [EMAIL PROTECTED] wrote: Another few questions I've been searching high and low for answers on. 1) My Flex Builder Beta 3 does not seem to have some classes / methods? Like flash.data.SQLMode? and the openAsync() method. Any idea why that would be missing or how to get it installed? 2) Most importantly, Does anyone have a favorite method to write from an Array that is received from FDS to a local SQLlite database? When I try to loop through like this which I have modified from an example: BEGIN CODE-- conn = new SQLConnection(); dbFile = File.applicationStorageDirectory.resolvePath(myDB.db); conn.open(dbFile); conn.begin(); var dropCreate:SQLStatement = new SQLStatement(); var insertRow:SQLStatement = new SQLStatement(); dropCreate.sqlConnection = conn; var sql:String = DROP TABLE IF EXISTS users; CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT,fName TEXT,lName TEXT,email TEXT,phone TEXT,city TEXT,state TEXT,zip TEXT,lsFName TEXT,lsLName TEXT,lsEmail TEXT,lsPhone TEXT,lsCity TEXT,lsState TEXT,lsZip TEXT) dropCreate.text = sql; dropCreate.execute(); var numRecords:int = users.length; for(var i:int = 0; i numRecords; i++) { insertRow.sqlConnection = conn; sql = INSERT INTO users (id,fName,lName,email,phone,city,state,zip,lsFName,lsLName,lsEmail,lsPhone,lsCity,lsState,lsZip) VALUES + (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); insertRow.text = sql; // set parameter values insertRow.parameters[ 0] = users[i].id; insertRow.parameters[ 1] = users[i].fName; insertRow.parameters[ 2] = users[i].lName; insertRow.parameters[ 4] = users[i].phone; insertRow.execute(); } conn.commit(); END CODE-- I get an error saying that SQLStatement.text property can't be changed as below: Error: Error #3106: Property cannot be changed while SQLStatement.executing is true. at Error$/throwError() at flash.data::SQLStatement/set text() at data::SQLHandler/createAndFillUserTable()[my/path/here/SQLHandler.as:79] I'm trying to create an offline copy of our online database for quicker response and then will update / sync the server when connected. and... 3) Before I start looking at code samples Is there any way to develop using LiveCycles on a Mac? Thanks in advance... again! Scott On Dec 28, 2007, at 12:13 PM, Jeffry Houser wrote: You probably need to create a new services-config file with a hard coded URL to the flex2gateway. I suspect (but haven't tested) that you need a cross domain file in the root of your server for Flash to access it. Scott Mulder wrote: I currently have a perfectly working RemoteObject on my shared hosting server (where I can't install my own server level stuff). After much messing around with the complier arguments it now connects just fine to the standard /flex2gateway/ pointer and a ColdFusion Service which returns native AMF binary objects so it's nice and fast. I am now trying to set up an AIR app that connects to the same CF Service and gets all of the same data in the local app where it is stored offline in an SQLlite DB and synced on changes. Any suggestions on how to get the same connection working when the app runs locally? Thanks in advance! Scott -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.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 -- j:pn \\no comment
Re: [flexcoders] Re: SharedObject security
Can you check if there's a way to retrieve such information via javascript? If yes then you can use external interface to get that information in Flex and so on. On Dec 30, 2007 11:02 PM, Ralf Bokelberg [EMAIL PROTECTED] wrote: Good point. I'm not aware of a possibility to identify a client machine. Maybe you add a enhancement request to Adobe's bugbase? Cheers Ralf. On Dec 30, 2007 12:02 AM, andrewwestberg [EMAIL PROTECTED]andrewwestberg%40yahoo.com wrote: Software Licensing. If I write an encrypted license token in a SharedObject, I don't want them to be able to simply copy the .sol file in order to share their checked-out license with their buddy in the next cubicle. By tieing the license to something hardware related such as a mac address or cpu id, it becomes less of a possibility. I'm contracted to develop a Flex/AIR client for nitroLM.com. They already have client libraries for .NET, C/C++, and Java all of which have access to hardware-related ids and serial numbers. It'd be nice if there was something similar in Flex/AIR. -Andrew --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: What is your usecase? Why are people allowed to copy files from other people's computer? Cheers Ralf.
Re: [flexcoders] Re: What event to catch
On Sat, Dec 29, 2007 at 02:29:18PM -, ben.clinkinbeard wrote: An example of this approach can be seen here: http://www.returnundefined.com/files/CheckBoxRenderers/srcview/index.html That is using a click event but the principle is identical. In this example, why is the event listener added to the Application instead of to the CenteredCheckBoxHeaderRenderer? Then you wouldn't have to check the event target. -Jeff
[flexcoders] How do I print multiple objects with no page breaks??
I'd like my application to print multiple objects without forced page breaks between them. If I use the PrintJob.addObject() method, there are forced page breaks. I have several textarea.htmltext objects, several graphs, and several legends that I would like to string together to form a document for printing. I want to have this come out paginated the way I want, not one object per page. Is there any way to do this in Flex 2 or 3 beta? Is there an example out there I can look at? Help would be much apprecaited - Thanks Tony
Re: [flexcoders] How do I print multiple objects with no page breaks??
create a bitmap, draw onto that bitmap the layout you want to print and print that bitmap On Dec 31, 2007 8:41 AM, anthony_morsey [EMAIL PROTECTED] wrote: I'd like my application to print multiple objects without forced page breaks between them. If I use the PrintJob.addObject() method, there are forced page breaks. I have several textarea.htmltext objects, several graphs, and several legends that I would like to string together to form a document for printing. I want to have this come out paginated the way I want, not one object per page. Is there any way to do this in Flex 2 or 3 beta? Is there an example out there I can look at? Help would be much apprecaited - Thanks Tony -- j:pn \\no comment
[flexcoders] Two way binding
I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id, name: item.name, description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem understanding why data-centric environment does not have a straight way of binding data both ways. All I would want is to assign a data source to my form and then specify data fields for each control in the form. Simple as this. Is this possible in Flex? Thanks
Re: [flexcoders] Two way binding
What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id, name: item.name, description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem understanding why data-centric environment does not have a straight way of binding data both ways. All I would want is to assign a data source to my form and then specify data fields for each control in the form. Simple as this. Is this possible in Flex? Thanks -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
Re: [flexcoders] Two way binding
And how data from server gets into the Model? Douglas Knudsen [EMAIL PROTECTED] wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id, name: item.name, description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem understanding why data-centric environment does not have a straight way of binding data both ways. All I would want is to assign a data source to my form and then specify data fields for each control in the form. Simple as this. Is this possible in Flex? Thanks -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
Re: [flexcoders] Two way binding
That's a wholly different thread. You would use WebService, HTTPservice, or RemoteObject to perform some sort of server call. Take a look at the docs on these tags and also at the examples on Adobe.com. For a ColdFusion based example, you can check this out http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 DK On Dec 31, 2007 10:14 AM, mark goldin [EMAIL PROTECTED] wrote: And how data from server gets into the Model? *Douglas Knudsen [EMAIL PROTECTED]* wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id, name: item.name, description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem understanding why data-centric environment does not have a straight way of binding data both ways. All I would want is to assign a data source to my form and then specify data fields for each control in the form. Simple as this. Is this possible in Flex? Thanks -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
RE: [flexcoders] Two way binding
Or the short answer, the same way you got the data into the dataProvider for the DataGrid. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Monday, December 31, 2007 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Two way binding That's a wholly different thread. You would use WebService, HTTPservice, or RemoteObject to perform some sort of server call. Take a look at the docs on these tags and also at the examples on Adobe.com. For a ColdFusion based example, you can check this out http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 DK On Dec 31, 2007 10:14 AM, mark goldin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: And how data from server gets into the Model? Douglas Knudsen [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id http://item.id/ , name: item.name http://item.name/ , description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem understanding why data-centric environment does not have a straight way of binding data both ways. All I would want is to assign a data source to my form and then specify data fields for each control in the form. Simple as this. Is this possible in Flex? Thanks -- Douglas Knudsen http://www.cubicleman.com http://www.cubicleman.com/ this is my signature, like it? -- Douglas Knudsen http://www.cubicleman.com http://www.cubicleman.com this is my signature, like it?
RE: [flexcoders] Newbie Flex Application
Code looks ok on quick skim. What is not working? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of obi.wasabi Sent: Saturday, December 29, 2007 1:08 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie Flex Application Hi, This is my first, perhaps ambitious FLEX application. The object is building a DVD catalog. The form uses: Text Inputs Combo Box Text Area Radio Buttons I could use assistance with Getting the Field Data into XML, then Putting the XML file for use as the DataProvider for a Datagrid(View) code ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute viewSourceURL=srcview/index.html mx:Style Label{fontFamily: Verdana; fontSize: 10pt; fontWeight: bold;} /mx:Style mx:Script ![CDATA[ import flash.events.Event; [Bindable]public var titleOverview:XML private function addOverview(e:Event):void{ var titleOverview:XML = dvdCollection dvd titlePulp Fiction/title; genreAction/genre; actorsJohn Travolta, Sam Jackson/actors; directorsQuentin Tarantino/directors producersLawrence Bender /producers; /dvd /dvdCollection } ]] /mx:Script mx:Panel title=DVD Collection: Add Title height=500 width=530 paddingTop=5 paddingLeft=5 paddingRight=5 paddingBottom=5 mx:Accordion id=dvdAccordion height=450 width=500 x=10 y=31 mx:Form id=dvdOverview label=Overview height=507 width=635 mx:Label text=Title: width=48 height=19 / mx:TextInput id=dvdTitle width=290 height=25/ mx:Label text=Genre: width=49 height=15 / mx:ComboBox width=290 mx:ArrayCollection mx:StringAction/mx:String mx:StringSci-Fi/mx:String mx:StringDrama/mx:String mx:StringForeign/mx:String mx:StringComedy/mx:String mx:StringHorror/mx:String mx:StringChildren's/mx:String mx:StringRomance/mx:String /mx:ArrayCollection /mx:ComboBox mx:Label text=Actors: / mx:TextArea id=dvdActors width=450 / mx:Label text=Director: / mx:TextInput id=dvdDirector width=290 height=25/ mx:Label text=Producer(s): / mx:TextInput id=dvdProducers width=290 height=25/ mx:Button label=Add DVD Overiew id=addOverviewBtn click=addOverview(event);/ /mx:Form mx:Form id=dvdDetails label=Details height=508 width=635 mx:Label text=Plot: / mx:TextArea id=dvdPlot width=450 / mx:Label text=Review: / mx:TextArea id=dvdReview width=450 / mx:Label text=Rating: / mx:RadioButton groupName=dvdRating id=dvdWatachable label=Watachable width=150/ mx:RadioButton groupName=dvdRating id=dvdHorrible label=Horrible width=150/ mx:RadioButton groupName=dvdRating id=dvdAwesome label=Awesome width=150/ mx:Label text=Date Purchased (MM/DD/): / mx:DateField id=dvdPurchaseDate width=125 / mx:Label text=Price (dollars . cents) : / mx:HBox width=200 mx:Text text=$/mx:TextInput width=50 height=20/mx:Text text=./mx:TextInput width=50 height=20/ /mx:HBox mx:Label text=Date Released (MM/DD/): / mx:DateField id=dvdReleaseDate width=125 / mx:Label text=Length (HH MM SS) : width=265/ mx:HBox width=200 mx:TextInput width=50 height=20/mx:Text text=:/mx:TextInput width=50 height=20/mx:Text text=:/mx:TextInput width=50 height=20/ /mx:HBox mx:Button label=Add DVD Details id=addDetailsBtn / /mx:Form /mx:Accordion /mx:Panel mx:Panel title=DVD Collection: View Titles height=300 width=59% paddingTop=5 paddingLeft=5 paddingRight=5 paddingBottom=5 x=0 y=518 mx:DataGrid width=100% editable=true variableRowHeight=true x=538 height=250 dataProvider={titleOverview.dvd} mx:columns mx:DataGridColumn dataField=title headerText=Title editable=false / mx:DataGridColumn dataField=genre headerText=Genre editable=false / mx:DataGridColumn dataField=actors headerText=Actors editable=true / mx:DataGridColumn dataField=directors headerText=Director editable=false / mx:DataGridColumn dataField=producers headerText=Producer editable=true / /mx:columns /mx:DataGrid /mx:Panel mx:Panel x=538 y=0 width=450 height=500 layout=absolute title=DVD Collection: Detailed View /mx:Panel /mx:Application /code
RE: [flexcoders] Newbie XML to ArrayCollection Confusion
You can't convert directly, unless you use resultFormat=object(default), which converts your sml into a nested dynamic object structure. But you have no control over this conversion, and it can have some side-effects, particularly with data type conversions. People often convert xml into an ArrayCollection of strongly typed objects, because accessing strongly typed pbjects is significantly faster than accessing XML, which this can help performance with very large data displays (hundreds of renderers). You will need to loop over the XMLList (xmlData.score), and build the value object items and add them to the ArrayCollection manually. But, why not simply use XMLListCollection? hScores = new XMLListCollection(xmlData.score); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of t_singe Sent: Sunday, December 30, 2007 12:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie XML to ArrayCollection Confusion I'm hoping someone can help explain how to retrieve an XML doc via webservice and then create an ArrayCollection from it. Using the code and xml below, I am able to retrieve the xml alright and access the nodes, but when I attempt to convert the xml object to an array I end up with a single element array. My xml document looks like: ?xml version=1.0 encoding=UTF-8 ? - scores score position=14/score score position=21/score score position=32/score score position=43/score score position=55/score score position=60/score score position=79/score score position=86/score score position=98/score score position=107/score /scores My webservice event handler looks like: public function hScoresHandler(event:ResultEvent):void { var xmlResult:XML ; var hScores = new ArrayCollection(); xmlResult = new XML(event.result); // This properly outputs the entire XML document trace(xmlResult); // These properly output the content from different nodes in the // XMLM document trace(first (0) position: + xmlResult.score[0]); trace(five position: + xmlResult.score[5]); trace(five position: + [EMAIL PROTECTED]); // Convert XML to Array hScores = ArrayUtil.toArray(xmlResult); // For some reason this outputs a null string trace(hScores); // Why is the length only one? trace(length: + hScores.length); }
RE: [flexcoders] Two way binding
I am probably a complete dumb. But dataModel does not have dataProvider property. How do I pull data into model then? Tracy Spratt [EMAIL PROTECTED] wrote: Or the short answer, the same way you got the data into the dataProvider for the DataGrid. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Monday, December 31, 2007 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Two way binding That's a wholly different thread. You would use WebService, HTTPservice, or RemoteObject to perform some sort of server call. Take a look at the docs on these tags and also at the examples on Adobe.com. For a ColdFusion based example, you can check this out http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 DK On Dec 31, 2007 10:14 AM, mark goldin [EMAIL PROTECTED] wrote: And how data from server gets into the Model? Douglas Knudsen [EMAIL PROTECTED] wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id, name: item.name, description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem understanding why data-centric environment does not have a straight way of binding data both ways. All I would want is to assign a data source to my form and then specify data fields for each control in the form. Simple as this. Is this possible in Flex? Thanks -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Re: stacked ColumnChart min/max , series that go above max disappear !
Actually I found the solution for the max value, I just change my value if it is more than max to the max value. The problem with minimum still exist. having value for example 60 for the stacked chart and maximum=50 minimum=10 I will change my value to 50 . but for some reason if the minimum value is not 0 it won't display the bar ! --- In flexcoders@yahoogroups.com, alex [EMAIL PROTECTED] wrote: Hi, Encountered a strange problem... I want to limit the vertical axis in stacked ColumntChart , the problem is that if one of the series is more than the maximum it won't show it, only the series that are below the max ! Is it possible that the series which is above the max value will be shown only until this max value ? Thank you !
RE: [flexcoders] Two way binding
By dataModel, are you referring to the ShoppingCart class you posted? You have to put the data into it. Get the data from the server, however you wish, and in the result handler, assign the data to an instance of the data model class, using the methods or properties it provides. Then bind the form elements to propeties in the model. Now, I would suggest using an XML object instance as the data model. In the result handler, assign the result xml to an instance variable typed as XML. Then bind the form elements to that: mx:Text [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ...? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Monday, December 31, 2007 11:45 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Two way binding I am probably a complete dumb. But dataModel does not have dataProvider property. How do I pull data into model then? Tracy Spratt [EMAIL PROTECTED] wrote: Or the short answer, the same way you got the data into the dataProvider for the DataGrid. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Monday, December 31, 2007 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Two way binding That's a wholly different thread. You would use WebService, HTTPservice, or RemoteObject to perform some sort of server call. Take a look at the docs on these tags and also at the examples on Adobe.com http://adobe.com/ . For a ColdFusion based example, you can check this out http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 DK On Dec 31, 2007 10:14 AM, mark goldin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: And how data from server gets into the Model? Douglas Knudsen [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id http://item.id/ , name: item.name http://item.name/ , description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem
RE: [flexcoders] Two way binding
Aha, I see. Why would you suggest am xml based model over a class based one? Tracy Spratt [EMAIL PROTECTED] wrote: By dataModel, are you referring to the ShoppingCart class you posted? You have to put the data into it. Get the data from the server, however you wish, and in the result handler, assign the data to an instance of the data model class, using the methods or properties it provides. Then bind the form elements to propeties in the model. Now, I would suggest using an XML object instance as the data model. In the result handler, assign the result xml to an instance variable typed as XML. Then bind the form elements to that: mx:Text [EMAIL PROTECTED] ? Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Monday, December 31, 2007 11:45 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Two way binding I am probably a complete dumb. But dataModel does not have dataProvider property. How do I pull data into model then? Tracy Spratt [EMAIL PROTECTED] wrote: Or the short answer, the same way you got the data into the dataProvider for the DataGrid. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Monday, December 31, 2007 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Two way binding That's a wholly different thread. You would use WebService, HTTPservice, or RemoteObject to perform some sort of server call. Take a look at the docs on these tags and also at the examples on Adobe.com. For a ColdFusion based example, you can check this out http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 DK On Dec 31, 2007 10:14 AM, mark goldin [EMAIL PROTECTED] wrote: And how data from server gets into the Model? Douglas Knudsen [EMAIL PROTECTED] wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id, name: item.name, description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public function getItemCount():int { return items.length; } public function getTotal():Number { return total; } } } Two questions: 1. How the data is getting into a picture here? 2. How am I using this model in my mxml file? Sorry if I am asking something obvious, but I am just having problem understanding why data-centric environment does not have a straight way of binding data both ways. All I would want is to assign a data source to my form and then specify data fields for each control in the form. Simple as this. Is this possible in Flex? Thanks -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
RE: [flexcoders] Looking for tool to auto generate class diagrams from a Flex project
Check out the program enterprise architect ---nimer From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of andiboarder Sent: Saturday, December 29, 2007 3:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Looking for tool to auto generate class diagrams from a Flex project Hi! I have written an AIR application for my diploma thesis and now i need to create class diagrams for my documentetion. The application has more than 100 classes, so creating the diagram by hand would take days. There must be a way to create class diagrams with Flex Builder. The Outline view already shows properties and methodes. I hope there is a plugin or a tool to create the diagrams, because I have not enough time left to do it by hand. Thanks in advance, Andreas Ritter
RE: [flexcoders] Two way binding
Simplicity. Less code. Maintainability. Standardization, well known API. Note that in the scenario I describe, the simplicity produces a dependency between the client data model and the data transport. If someone changes the XML you are consuming, you will have to change the code. For some this is unacceptable and they require level of abstraction between the transport and the model. It is just up to your particular requirements. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Monday, December 31, 2007 12:36 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Two way binding Aha, I see. Why would you suggest am xml based model over a class based one? Tracy Spratt [EMAIL PROTECTED] wrote: By dataModel, are you referring to the ShoppingCart class you posted? You have to put the data into it. Get the data from the server, however you wish, and in the result handler, assign the data to an instance of the data model class, using the methods or properties it provides. Then bind the form elements to propeties in the model. Now, I would suggest using an XML object instance as the data model. In the result handler, assign the result xml to an instance variable typed as XML. Then bind the form elements to that: mx:Text [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ...? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Monday, December 31, 2007 11:45 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Two way binding I am probably a complete dumb. But dataModel does not have dataProvider property. How do I pull data into model then? Tracy Spratt [EMAIL PROTECTED] wrote: Or the short answer, the same way you got the data into the dataProvider for the DataGrid. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Monday, December 31, 2007 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Two way binding That's a wholly different thread. You would use WebService, HTTPservice, or RemoteObject to perform some sort of server call. Take a look at the docs on these tags and also at the examples on Adobe.com http://adobe.com/ . For a ColdFusion based example, you can check this out http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 DK On Dec 31, 2007 10:14 AM, mark goldin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: And how data from server gets into the Model? Douglas Knudsen [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public
[flexcoders] Re: stacked ColumnChart min/max , series that go above max disappear !
I found the solution :) filterData=false --- In flexcoders@yahoogroups.com, alex [EMAIL PROTECTED] wrote: Actually I found the solution for the max value, I just change my value if it is more than max to the max value. The problem with minimum still exist. having value for example 60 for the stacked chart and maximum=50 minimum=10 I will change my value to 50 . but for some reason if the minimum value is not 0 it won't display the bar ! --- In flexcoders@yahoogroups.com, alex myth_drannon@ wrote: Hi, Encountered a strange problem... I want to limit the vertical axis in stacked ColumntChart , the problem is that if one of the series is more than the maximum it won't show it, only the series that are below the max ! Is it possible that the series which is above the max value will be shown only until this max value ? Thank you !
Re: [flexcoders] Re: How do I print multiple objects with no page breaks??
anthony_morsey escreveu: Have you done this? Do you have a code sample? I'm only a beginner with Flex, but this doesn't seem like the right way to do this. Does anyone have a code sample for the issue I have described below? Someone must have done this before? Tony --- In flexcoders@yahoogroups.com, Johannes Nel [EMAIL PROTECTED] wrote: create a bitmap, draw onto that bitmap the layout you want to print and print that bitmap On Dec 31, 2007 8:41 AM, anthony_morsey [EMAIL PROTECTED] wrote: I'd like my application to print multiple objects without forced page breaks between them. If I use the PrintJob.addObject() method, there are forced page breaks. I have several textarea.htmltext objects, several graphs, and several legends that I would like to string together to form a document for printing. I want to have this come out paginated the way I want, not one object per page. Is there any way to do this in Flex 2 or 3 beta? Is there an example out there I can look at? Help would be much apprecaited - Thanks Tony -- j:pn \\no comment -- 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 __ NOD32 2758 (20071231) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com Printing from bitmaps is not the best way, specially if you have text since it wil be aliased. To print multiple objects insert them inside a Canvas and print that Canvas. Regards, Frederico Garcia
RE: [flexcoders] Two way binding
Let me make sure I understand. You are talking about something like this: ?xml version=1.0? !-- Models\ModelTagEmptyString.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Model id=employeemodel source=httpmodelsource /mx:Model /mx:Application where httpmodelsource returns the following xml: employees employee nameJohn Doe/name phone555-777-66555/phone email[EMAIL PROTECTED]/email activetrue/active /employee employee nameJane Doe/name phone555-777-66555/phone email[EMAIL PROTECTED]/email activetrue/active /employee /employees Tracy Spratt [EMAIL PROTECTED] wrote: Simplicity. Less code. Maintainability. Standardization, well known API. Note that in the scenario I describe, the simplicity produces a dependency between the client data model and the data transport. If someone changes the XML you are consuming, you will have to change the code. For some this is unacceptable and they require level of abstraction between the transport and the model. It is just up to your particular requirements. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Monday, December 31, 2007 12:36 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Two way binding Aha, I see. Why would you suggest am xml based model over a class based one? Tracy Spratt [EMAIL PROTECTED] wrote: By dataModel, are you referring to the ShoppingCart class you posted? You have to put the data into it. Get the data from the server, however you wish, and in the result handler, assign the data to an instance of the data model class, using the methods or properties it provides. Then bind the form elements to propeties in the model. Now, I would suggest using an XML object instance as the data model. In the result handler, assign the result xml to an instance variable typed as XML. Then bind the form elements to that: mx:Text [EMAIL PROTECTED] ? Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Monday, December 31, 2007 11:45 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Two way binding I am probably a complete dumb. But dataModel does not have dataProvider property. How do I pull data into model then? Tracy Spratt [EMAIL PROTECTED] wrote: Or the short answer, the same way you got the data into the dataProvider for the DataGrid. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Monday, December 31, 2007 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Two way binding That's a wholly different thread. You would use WebService, HTTPservice, or RemoteObject to perform some sort of server call. Take a look at the docs on these tags and also at the examples on Adobe.com. For a ColdFusion based example, you can check this out http://www.acfug.org/index.cfm?fa=meetings.meetingdetailEventID=177 DK On Dec 31, 2007 10:14 AM, mark goldin [EMAIL PROTECTED] wrote: And how data from server gets into the Model? Douglas Knudsen [EMAIL PROTECTED] wrote: What's wrong with this? mx:TextInput text={ someReferenceToAModel.property } / Now, you can use the Binding tag to bind the value in the above back to the source, your datagrid in this case, but its not really a good idea, though YMMV. DK On Dec 31, 2007 9:33 AM, markgoldin_2000 [EMAIL PROTECTED] wrote: I am trying to figure out what both ways of data binding are. Basically we have two subjects for data binding: DataGrid and a Form. With DataGrid it is pretty clear: dataProvider. But with form? It does not have such a dataProvider property (Which is in my opinion it should have). So, what's a solution for that? DataModel? Which it turn does not have dataProvider either. But it does have a source. Source of what? Data? Ok, let's stick to dataModel. But then I am reading that it's better to use class-based models. Here is an example of class-based model form Help: package { [Bindable] public class ShoppingCart { public var items:Array = []; public var total:Number = 0; public var shippingCost:Number = 0; public function ShoppingCart() { } public function addItem(item:Object, qty:int = 1, index:int = 0):void { items.splice(index, 0, { id: item.id, name: item.name, description: item.description, image: item.image, price: item.price, qty: qty }); total += parseFloat(item.price) * qty; } public function removeItemAt(index:Number):void { total -= parseFloat(items[index].price) * items[index].qty; items.splice(index, 1); if (getItemCount() == 0) shippingCost = 0; } public
[flexcoders] Re: Newbie XML to ArrayCollection Confusion
Thanks for the suggestion Tracy, I will look into that! --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: You can't convert directly, unless you use resultFormat=object(default), which converts your sml into a nested dynamic object structure. But you have no control over this conversion, and it can have some side-effects, particularly with data type conversions. People often convert xml into an ArrayCollection of strongly typed objects, because accessing strongly typed pbjects is significantly faster than accessing XML, which this can help performance with very large data displays (hundreds of renderers). You will need to loop over the XMLList (xmlData.score), and build the value object items and add them to the ArrayCollection manually. But, why not simply use XMLListCollection? hScores = new XMLListCollection(xmlData.score); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of t_singe Sent: Sunday, December 30, 2007 12:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie XML to ArrayCollection Confusion I'm hoping someone can help explain how to retrieve an XML doc via webservice and then create an ArrayCollection from it. Using the code and xml below, I am able to retrieve the xml alright and access the nodes, but when I attempt to convert the xml object to an array I end up with a single element array. My xml document looks like: ?xml version=1.0 encoding=UTF-8 ? - scores score position=14/score score position=21/score score position=32/score score position=43/score score position=55/score score position=60/score score position=79/score score position=86/score score position=98/score score position=107/score /scores My webservice event handler looks like: public function hScoresHandler(event:ResultEvent):void { var xmlResult:XML ; var hScores = new ArrayCollection(); xmlResult = new XML(event.result); // This properly outputs the entire XML document trace(xmlResult); // These properly output the content from different nodes in the // XMLM document trace(first (0) position: + xmlResult.score[0]); trace(five position: + xmlResult.score[5]); trace(five position: + [EMAIL PROTECTED]); // Convert XML to Array hScores = ArrayUtil.toArray(xmlResult); // For some reason this outputs a null string trace(hScores); // Why is the length only one? trace(length: + hScores.length); }
[flexcoders] Data Bind question
Hello folks, I have the following returned from a webservice: begin code soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soap:Body ns1:findAllByModuleResponse xmlns:ns1=http://www.fuxiontechnologies.com/SectionService; ns1:sectionSet ns2:Section xmlns:ns2=http://objects.model.fuxiontechnologies.com; assetType xmlns=http://objects.model.fuxiontechnologies.com; descriptionJornal/description id-1/id /assetType id xmlns=http://objects.model.fuxiontechnologies.com;2/id module xmlns=http://objects.model.fuxiontechnologies.com; id3/id moduleNameBIBLIOTECA/moduleName /module sectionName xmlns=http://objects.model.fuxiontechnologies.com;JORNAIS/sectionName /ns2:Section ns2:Section xmlns:ns2=http://objects.model.fuxiontechnologies.com; assetType xmlns=http://objects.model.fuxiontechnologies.com; descriptionActa de Reunião/description id-1/id /assetType id xmlns=http://objects.model.fuxiontechnologies.com;4/id module xmlns=http://objects.model.fuxiontechnologies.com; id3/id moduleNameBIBLIOTECA/moduleName /module sectionName xmlns=http://objects.model.fuxiontechnologies.com;ACTAS DE REUNIÕES/sectionName /ns2:Section ns2:Section xmlns:ns2=http://objects.model.fuxiontechnologies.com; assetType xmlns=http://objects.model.fuxiontechnologies.com; descriptionDocumento/description id-1/id /assetType id xmlns=http://objects.model.fuxiontechnologies.com;3/id module xmlns=http://objects.model.fuxiontechnologies.com; id3/id moduleNameBIBLIOTECA/moduleName /module sectionName xmlns=http://objects.model.fuxiontechnologies.com;MANUAIS E REGULAMENTOS INTERNOS/sectionName /ns2:Section ns2:Section xmlns:ns2=http://objects.model.fuxiontechnologies.com; assetType xmlns=http://objects.model.fuxiontechnologies.com; descriptionPlano de Actividade/description id-1/id /assetType id xmlns=http://objects.model.fuxiontechnologies.com;8/id module xmlns=http://objects.model.fuxiontechnologies.com; id3/id moduleNameBIBLIOTECA/moduleName /module sectionName xmlns=http://objects.model.fuxiontechnologies.com;PLANOS DE ACTIVIDADES/sectionName /ns2:Section ns2:Section xmlns:ns2=http://objects.model.fuxiontechnologies.com; assetType xmlns=http://objects.model.fuxiontechnologies.com; descriptionArtigo/description id-1/id /assetType id xmlns=http://objects.model.fuxiontechnologies.com;9/id module xmlns=http://objects.model.fuxiontechnologies.com; id3/id moduleNameBIBLIOTECA/moduleName /module sectionName xmlns=http://objects.model.fuxiontechnologies.com;GARIMPO/sectionName /ns2:Section ns2:Section xmlns:ns2=http://objects.model.fuxiontechnologies.com; assetType xmlns=http://objects.model.fuxiontechnologies.com; descriptionLivro/description id-1/id /assetType id xmlns=http://objects.model.fuxiontechnologies.com;1/id module xmlns=http://objects.model.fuxiontechnologies.com; id3/id moduleNameBIBLIOTECA/moduleName /module sectionName xmlns=http://objects.model.fuxiontechnologies.com;LIVROS/sectionName /ns2:Section ns2:Section xmlns:ns2=http://objects.model.fuxiontechnologies.com;
[flexcoders] Re: Problem with ModuleLoader and List in Flex 3 - Possible BUG
Hello Anz, This problem will happen with any managers that you use. DragManager, PopupManager etc - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, mailtoanzer [EMAIL PROTECTED] wrote: Hi Venkat, Thanks a lot.. The problem is solved. I don't have any issue with other classes,, is this problem occur only with DragManager class?? Thanks again Anz http://www.FlickrMailer.com --- In flexcoders@yahoogroups.com, rueter007 rueter007@ wrote: This is common reference issue with using modules. One of your modules is loading the dragmanager and the second one cannot access it. One solution is to reference the DragManager in your main application import mx.managers.DragManager; var dragManager:DragManager; HTH. - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, Anzer anzer@ wrote: Hi, I have two modules and each having lists to list different items. I am getting the below error when clicking on a list after loading second module. TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::DragManager$/get isDragging()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\ma nagers\DragManager.as:158] at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::dragScro ll()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\controls\l istClasses\ListBase.as:6989] at Function/http://adobe.com/AS3/2006/builtin::apply() at () at flash.utils::SetIntervalTimer/flash.utils:SetIntervalTimer::onTimer() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() I have uploaded a sample page to http://www.digitalmesh.com/staging/modulebug/ModuleTest.html Right click to see the source code. Please let me know if there is any solution to this problem. Thanks Anz
[flexcoders] Re: SharedObject security
You can only retrieve a mac address in javascript in IE 6.x. IE 7.x and any firefox don't allow it. This also doesn't solve my problem for AIR apps. I went ahead and created an enhancement request in the Adobe bug database, but nobody can see its status (including myself) since it's marked as security-related. -Andrew --- In flexcoders@yahoogroups.com, Peeyush Tuli [EMAIL PROTECTED] wrote: Can you check if there's a way to retrieve such information via javascript? If yes then you can use external interface to get that information in Flex and so on. On Dec 30, 2007 11:02 PM, Ralf Bokelberg [EMAIL PROTECTED] wrote: Good point. I'm not aware of a possibility to identify a client machine. Maybe you add a enhancement request to Adobe's bugbase? Cheers Ralf. On Dec 30, 2007 12:02 AM, andrewwestberg [EMAIL PROTECTED]andrewwestberg%40yahoo.com wrote: Software Licensing. If I write an encrypted license token in a SharedObject, I don't want them to be able to simply copy the .sol file in order to share their checked-out license with their buddy in the next cubicle. By tieing the license to something hardware related such as a mac address or cpu id, it becomes less of a possibility. I'm contracted to develop a Flex/AIR client for nitroLM.com. They already have client libraries for .NET, C/C++, and Java all of which have access to hardware-related ids and serial numbers. It'd be nice if there was something similar in Flex/AIR. -Andrew --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Ralf Bokelberg ralf.bokelberg@ wrote: What is your usecase? Why are people allowed to copy files from other people's computer? Cheers Ralf.
Re: [flexcoders] Re: SharedObject security
Don't use the MAC address. A significant number of users switch between wired and wifi connections. On Dec 31, 2007 1:16 PM, andrewwestberg [EMAIL PROTECTED] wrote: You can only retrieve a mac address in javascript in IE 6.x. IE 7.x and any firefox don't allow it. This also doesn't solve my problem for AIR apps. I went ahead and created an enhancement request in the Adobe bug database, but nobody can see its status (including myself) since it's marked as security-related. -Andrew --- In flexcoders@yahoogroups.com, Peeyush Tuli [EMAIL PROTECTED] wrote: Can you check if there's a way to retrieve such information via javascript? If yes then you can use external interface to get that information in Flex and so on. On Dec 30, 2007 11:02 PM, Ralf Bokelberg [EMAIL PROTECTED] wrote: Good point. I'm not aware of a possibility to identify a client machine. Maybe you add a enhancement request to Adobe's bugbase? Cheers Ralf. On Dec 30, 2007 12:02 AM, andrewwestberg [EMAIL PROTECTED]andrewwestberg%40yahoo.com wrote: Software Licensing. If I write an encrypted license token in a SharedObject, I don't want them to be able to simply copy the .sol file in order to share their checked-out license with their buddy in the next cubicle. By tieing the license to something hardware related such as a mac address or cpu id, it becomes less of a possibility. I'm contracted to develop a Flex/AIR client for nitroLM.com. They already have client libraries for .NET, C/C++, and Java all of which have access to hardware-related ids and serial numbers. It'd be nice if there was something similar in Flex/AIR. -Andrew --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Ralf Bokelberg ralf.bokelberg@ wrote: What is your usecase? Why are people allowed to copy files from other people's computer? Cheers Ralf.
[flexcoders] Help!!!!! Flv Rtmp Security exception on changing viewstacks
Hello Flex Gurus; I m having one streaming video(rtmp) player resides in my View Stack as my MyRed5FLv Player mxml component, video is working fine but issue I m having ,when I m changing my view stack screen its giving me this Security error: SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://www.synergyi.com/intouch/index.swf cannot access rtmp://synergyi.com/oflaDemo. No policy files granted access. Steps I followed , 1) I was having flex streaming code then i change into swf loading of flash made streaming player but same error 2)crossdomain files already exist on my server http://www.synergyi.com/intouch/crossdomain.xml even on other location too http://www.synergyi.com/crossdomain.xml 3) here is link which says something about this http://weblogs.thekeunster.com/?p=13 but dint work for me see problem at www.synergyi.com/intouch by changing screens from home to other . Looking for your response ,Thanks in advance and Happy new year to all Thanks Sajid Hussain . Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[flexcoders] Design view oddities?
Hi All, I'm using Flex 3 Beta 3 and still having some oddities with design view where my components don't layout correctly. I know there is a similar issue resolved with an updated weborb.swc which I am using but, with some components I still do not get a usable design view. It actually looks like these may be my custom components from Flex 2 anyone have a similar experience? A fix? -Ken
[flexcoders] interface inheretence
Hello, I just wanted to make sure my logic was correct so I don't waste a bunch of time typing up all this code to find out it doesn't work. With the given class structure: # UserModel implements IUserModel # ChildUserModel1 extends UserModel implements IUserModel, IChildUserModel # ChildUserModel2 extends UserModel implements IUserModel, IChildUserModel # ChildUserModel3 extends UserModel implements IUserModel, IChildUserModel etc. If I have a class instance where the exact implementation could be any of the above classes, and is determined at run time, would it be safe/correct to define a variable of type IUserModel and then strong type it as either IUserModel or IChildUserModel depending on its expected implementation? For instance: # var user:IUserModel; # user = new UserModel(); # trace( IUserModel(user).someUserProperty ); # user = new ChildUserModel2(); # trace( IChildUserModel(user).someChildUserProperty ); (assuming the properties are defined in the interface of course) Is there a safer/more correct way to accomplish this given that the property always starts off as a UserModel and may or may not become any one of the ChildUserModel classes who share a common interface? note: Any of this can be changed, I just need to be able to have a class that acts as an IChildUserModel when it is one, or as a UserModel when it's not. There is only one kind of UserModel, so I'm not sure if the IUserModel interface is even necessary. I just wasn't sure how to define the variable so it could be either one. Any input or advice will be greatly appreciated. Thanks for your time! ...aaron
[flexcoders] Re: What event to catch
You certainly could put the listener there but that would cause a number of disadvantages. It would make for a less clear separation of duties because your renderer class would then contain logic as well. In the context of a large application you definitely would not want to be setting data and performing similar actions in a multitude of different places like that either as it would make maintenance and troubleshooting a nightmare. It would also make your renderer far less generic/reusable. In a real application the listener wouldn't be at the Application root but in an appropriately high-level view, such as a screen/page/form. HTH, Ben --- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: On Sat, Dec 29, 2007 at 02:29:18PM -, ben.clinkinbeard wrote: An example of this approach can be seen here: http://www.returnundefined.com/files/CheckBoxRenderers/srcview/index.html That is using a click event but the principle is identical. In this example, why is the event listener added to the Application instead of to the CenteredCheckBoxHeaderRenderer? Then you wouldn't have to check the event target. -Jeff
[flexcoders] Re: Data Bind question
Hi Everyone, First of all, Happy New Year Second, I have managed to resolve the problem. It had nothing to do with the ArrayCollection returned from the webservice. I was having a null object, which was not instantiated yet. This had to do with the order of component creation within flex. All the best, Fidel.
RE: [flexcoders] Icon for Button
DGColumn extends CSSStyleDecl and is assigned as the styleName property of each renderer. When you call setStyle, you are adding new styles that each renderer will pick up, just as if it were a normal CSS selector. I would expect icon, MyIconClass to work. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Glasser Sent: Monday, December 31, 2007 9:39 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button Alex, This looks like a very useful piece of information, of which I was not previously aware. It's not quite clear to me what you mean, however. Could you expand on it a little, or else point me to some documentation that does? When you say the column is the styleName, what exactly do you mean? Is that the column header text, or perhaps the dataField property of the DataGridColumn? Also, since the DataGridColumn class extends CSSStyleDeclaration, what would be the effect of calling setStyle(icon, MyIconClass) on the DataGridColumn object itself? Alex Harui [EMAIL PROTECTED] wrote: The styleName for all renderers is the column it belongs to. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding the button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button {public function deleteRowGrid() { super(); styleName = DeleteRow; } } I am using styleName to set an icon for the button. DeleteRow style is declared in the main application. When I run my code I have a button in the column but with no icon. Any idea why? Thanks
RE: [flexcoders] Hover/Tool tips on datagrid headers?
If you set the tooltip property on the headerrenderer instance, it doesn't show? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of simonjpalmer Sent: Monday, December 31, 2007 2:02 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Hover/Tool tips on datagrid headers? I want to provide my users some descriptive text of the contents of a column in a data grid but I can't seem to give the headers tooltips or datatips. Am I missing a trick? (FB2)
RE: [flexcoders] vertical text alignment within datagridcolumn
verticalAlign, paddingTop, paddingBottom? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of candysmate Sent: Saturday, December 29, 2007 8:17 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] vertical text alignment within datagridcolumn My datagridcolumn uses an itemrenderer: mx:DataGridColumn headerText= dataField=problem width=20 textAlign=center editable = false rendererIsEditor=true mx:itemRenderer mx:Component className =rendererStyle2 mx:Text /mx:Text /mx:Component /mx:itemRenderer /mx:DataGridColumn I need the text character displayed within the column to be centered vertically. How can I do this please? I've tried things like padding within the CSS style 'rendererStyle2' but this only caused part of the character to be obscured (blanked) without it's actual position within the column altering? Where am I going wrong?