[flexcoders] help with using Matrix() to skew an Image -- not skewing the right amount
I'm trying to skew an Image object to a varying amount, right down the center. I'm using the example math that I found in the help and in examples online, but for some reason the math doesn't seem to be working out. A cookie for anyone who can help me figure it out. I published the sample of my problem here http://www.pattyandtodd.com/files/flexexamples/matrixskew/Test.html and the source is here http://www.pattyandtodd.com/files/flexexamples/matrixskew/srcview/ ... The general gist is that I have the blue canvas (100x100), and am rendering both halves of it ( A and B ) (each 50x100) on the right: --- --- | | | A | B | | | | | | --- --- The slider sets how far the right half (B) is translated down (or up) -- as a percentage of the height of B. So a setting of 1 moves B down 100% of it's height. The left half (A) should stay at its original position (working!), but it's right half should skew (down or up) (working!) to match the left edge of B. But the edges are not matching up. My suspicions are that I'm messing up with radians, PI or something else I slept through in Trigonometry... Could anyone shed some light as to what's missing?
[flexcoders] Container backgroundImage aligned to top left?
Hey everyone, I'm trying to set a backgroundImage for a Container (well, a Canvas, but it looks like the BGimage stuff is handled in Container). I'd like the image to align itself to the top left, not the center which is the framework default. Has anyone come up with a good way to do this? Thanks! -- TC
[flexcoders] Re: embed image assets in a Source Path folder?
What kind of hackery is needed? It seems silly to not be able to use common resources across projects -- what's the point of all this great OOP practice if I can't reuse my items across projects? By the in windows I assume you mean that if I were (say) on a Mac [I WISH!] and tried this it would work?
[flexcoders] Re: embed image assets in a Source Path folder?
I think my issue is much more fundamental. I read about linking to common resource folders here: http://livedocs.adobe.com/flex/2/docs/0228.html http://livedocs.adobe.com/flex/2/docs/0228.html I created a linked folder in my project to a folder called TEST that has one .png file in it. My project Navigator looks like this: MyProject - views -- MyView.as - TEST -- add.png ...and TEST has the little shortcut folder icon next to it as I would suspect. Inside MyView.as, I tried to embed the png file: [Embed(source=../TEST/add.png)] but it could not find it. Can you not use Flex Builder's own linked folders to embed files?
[flexcoders] How to put MXML example into ASDOC?
I'm trying to be a good boy and AsDoc my new class that I wrote. I wanted to put in an example of using it, embedding a complete MXML document in the @example tag. My MXML document has a CDATA tag in it (for the script tag) which generated an error from the AsDoc executable until I removed it: Error#1085: The element type example must be terminated by a matching end-tag /example Once I took out the CDATA tag, the AsDoc ran, but the file it generated does not render the MXML tags, since I suspect the browser is seeing them as true tags, thus not showing them. If I view source I see them, but not in the visual rendering of the help file. Tried to wrap ALL the code (inside my listing tag) with a CDATA tag, but it brought back the same error. Any idea how to get MXML tags to show in the @example and listing tags? DO I need to escape ALL of the tags? That seems like it would be a giant pain in the you know what. Thanks! -- TC Here's a sample of the comment: /** * Intro comment here * * @example Description of the example here * listing *mx:List [ ... ] */mx:List * /listing */
[flexcoders] list itemrenderer rollover without backgroundColor / alpha?
I have an component (HBox) that I'm using for a List's itemRenderer. I added handlers for rollOver and rollOut to try to make a delete this item button appear and disappear for each item as you roll over / out of it. The button was fizzling on and off until I set the background color and alpha of the HBox (to 0x0 and 1.0)... then the button appeared and disappeared as expected. Changed the color to 0xFF to make it look better and thought I was home free. Only issue is that the list's selection highlight doesn't show thru the backgroundColor. Is there any other way to get the HBox's rollover handler to see the rollOver without setting the background color/alpha? Or am I doing something wrong? Thanks! -- TC
[flexcoders] custom drag events for List -- how NOT to have scrollbar drag an item?
I have a list showing a variety of items. I use a custom ItemRederer to diplay the list items, which I want to be able to drag from the list as well. When the user drags an item, I want the DragProxy to be a different look than the ItemRenderer. I couldn't figure out how to override the built in drag functionality, so I went with the roll your own technique shows in the Docs. Problem is, when there are enough items in the list to make a scrollbar visible (policy is set to automatic), when I drag the scrollbar, I also end up starting a drag of the item that is under (?) the scrollbar where I clicked. Below is the code I'm using to initiate the drag. All the handlers are for the List. The renderer class is SongRenderer, and the proxy class is SongProxy (there's also a Song class, which is what the items in the List are). Anybody suggest a way to do this, either by overriding the built in drag events, or by somehow saying Yeah, unluess you're cliciking on the List's scrollbar(s)? Thanks! private function handleMouseDown(e:MouseEvent):void { mouseIsDown = true; } private function handleMouseUp(e:MouseEvent):void { mouseIsDown = false; } private function handleMouseMove(e:MouseEvent):void { if (!mouseIsDown ) { return; } var dragInit:List = e.currentTarget as List; var song:Song = dragInit.selectedItem as Song; var ds:DragSource = new DragSource(); ds.addData(song, song); var proxy:SongProxy = new SongProxy(); proxy.song = song; proxy.width = proxy.getExplicitOrMeasuredWidth(); proxy.height = proxy.getExplicitOrMeasuredHeight(); mouseIsDown = false; var offsetX:Number = -dragInit.contentMouseX + proxy.width/2; var offsetY:Number = -dragInit.contentMouseY; DragManager.doDrag(dragInit, ds, e, proxy, offsetX, offsetY); }
[flexcoders] player and debug player produce different results!!
I have written what I thought was a simple function which produces different results when I RUN the code versus when I DEBUG the code (with no breakpoints). Here's the code: private var songs:ArrayCollection; private function getSongIDs():String { var songStr:String = ; for each(var song:Song in songs.source) { songStr += song.songID.toString() + ,; } songStr = (songStr.length == 0) ? songStr : songStr.substring(0,songStr.length - 1); return songStr; } songs is an ArrayCollection of Song instances. The Song class has a public Number variable called songID which IS set for all songs. The purpose of this function is to quickly grab a comma delimited list of the songIDs in the ArrayCollection of Songs. Once I use the function, I am sending this info as a parameter to a PHP script, and was having all sorts of issues. Trying to solve the problem, I now have the script just parrot back the parameters it was passed (it is echo-ing the parameter from the $_REQUEST array directly). When I run the code normally (with 2 Songs in the collection, with IDs of 23 and 24) I get this for songStr: null24,23 WHOA! Where did that null come from? When I DEBUG the code with no breakpoints (just using the debug player) I get this for songStr: 24,23 which is what I expected the code to do... What in the holy hell is going on? I think I am losing my mind. Thanks!
[flexcoders] Re: player and debug player produce different results!!
Fabulous. I decided to restart Builder and whammo, it worked like a charm. I'm suspecting that sending my XP laptop to Hibernate while running Eclipse may have honked something up? I've been doing it for months, and this is the first time I've run into any problems. Anyone else have any issues with running the Eclipse plugin (or Builder) for extended times and producing nonsense errors? -- Todd --- In flexcoders@yahoogroups.com, tddclare [EMAIL PROTECTED] wrote: I have written what I thought was a simple function which produces different results when I RUN the code versus when I DEBUG the code (with no breakpoints). Here's the code: private var songs:ArrayCollection; private function getSongIDs():String { var songStr:String = ; for each(var song:Song in songs.source) { songStr += song.songID.toString() + ,; } songStr = (songStr.length == 0) ? songStr : songStr.substring(0,songStr.length - 1); return songStr; } songs is an ArrayCollection of Song instances. The Song class has a public Number variable called songID which IS set for all songs. The purpose of this function is to quickly grab a comma delimited list of the songIDs in the ArrayCollection of Songs. Once I use the function, I am sending this info as a parameter to a PHP script, and was having all sorts of issues. Trying to solve the problem, I now have the script just parrot back the parameters it was passed (it is echo-ing the parameter from the $_REQUEST array directly). When I run the code normally (with 2 Songs in the collection, with IDs of 23 and 24) I get this for songStr: null24,23 WHOA! Where did that null come from? When I DEBUG the code with no breakpoints (just using the debug player) I get this for songStr: 24,23 which is what I expected the code to do... What in the holy hell is going on? I think I am losing my mind. Thanks!
[flexcoders] Upload file along with other associatred data?
I'm in the process of making a small form to upload a file to my PHP server. I'm using a FileReference and was following the examples in the AS3 documentation. It's working well. But I'd like to send additional information along with it (basically equivalent to hidden fields in an HTML form) like my user's ID, and the id of an associated item in the database. Does anyone have an example/code to do this? All the examples I see assume the file is the ONLY thing being uploaded. If possible, I'd like to get the same feedback as the myFileReference.upload() events, such as progress, complete, etc if possible, but that's secondary. Thanks! -- TC
[flexcoders] upload multiple FileReferences without FileReferenceList?
I have an area of my app where the user can make a new Thing and can upload 2 files against it (1 is an image, the other is a text file). I'd like to have the user interface show a TextInput for the title of the Thing, and then have 2 Browse buttons, one for the image and another for the text file. I'm essentially creating 2 FileReference instances, each with its own FileFilter. In order to upload the info to my (php) server, I'll have to make 3 round trips, each with a hit to the server, database, etc.: 1. Create the Thing in the database and respond with a success. 2. Assuming Success in 1, upload the Image, responding with a success. 3. Assuming Success in 2, upload the text file. I thought of using a FileReferenceList (seemed logical) but the fileList property is read only! I thought I could PUSH my 2 FileReferences onto it, but apparently not. So i either have to have one browse button where the user can pick BOTH the image and the text file (not very intuitive) or else do my round trips above. Does anyone know of another technique to upload two files with one round trip? I thought about trying to extend FileReferenceList and add a setter for fileList, but can't figure out how to find the source files in the flash package? I'll take any input on that as well. Thanks! -- TC
[flexcoders] constructor like arguments in MXML components?
I'm working on an app that has the need for several popup item editor kind of windows. Example: there are people in a list, and when you double click one of them, you get a popup (TitleWindow) with a form with fields for (and populated with the selected person's) FirstName, LastName, ... and save and cancel buttons. I'm also trying to use the same popup for entering a NEW person, so that the popup comes up with blank form items. My first approach was to make an MXML component based off of TitleWindow, since I have a lot of form elements and layout to add. But then I ran into the problem. I want to pass in a Person instance to populate the form (if I'm in edit mode) or else not pass in anything (null) if I'm in create-new mode. In AS, I'd have the contructor accept a p:Person = null parameter and that would be that. So.. my question finally. Is there a way / technoque to pass in contructor types of parameters to an MXML component, or do I need to suck it up and write the class in AS and deal with all the addChild's necessary to create the layout (oh, and it has states)? Thanks! -- TC
[flexcoders] Re: constructor like arguments in MXML components?
I talk to myself all the time, so why not do it on FlexCoders? I was thinking more about my problem: I had tried to do something like this: //code here to create new popup of my TitleWindow form, then... myTitleWindow.person = myPerson; But I was getting errors and/or nothing because myTitleWindow was not done creating its children before I set its person variable. So I did this: var myTitleWindow = //code to create the popup using my mxml extension //of TitleWindow with the set person() function in //it var myFunc:Function = function():void {myTitleWindow.person = myPerson} myTitleWindow.addEventListener(creationComplete, myFunc); Seems to work, and is finally gives me a reason to understand why one would ever create a variable of type Function. Comments or concerns are welcome... but I thought I'd share
[flexcoders] null pointer exception when creating DragProxy and assigning value?
I'm trying to create a custom DragProxy and assign a property of it that controls its appearance, but am getting a null pointer exception... ugh! I have a list that is driven by an arraycollection of Document objects. I want the items on the list to be draggable, and when they are dragged, to use a custom DragProxy that shows a paper image if the Document is available on paper, and some sort of electronic image if it is available electronically. So if you drag a document that is available in both formats, you'll see both images and the title. If it is only available hardcopy, you'll see the title and the paper image only. I made a DocumentDragProxy class (mxml), that has a Label to show the title, and two 50x50 images (one for paper, one for electronic). I also gave it a public setter to accept an instance of Document: public set document(theDocument:Document):void { if (!theDocument.electronic) { electronicIcon.visible = false; } if (!theDocument.paper) { paperIcon.visible = false; } titleLabel.text = theDocument.title; } and I have the label, and the two icon (Images) in the MXML. In my main app, I trap the MouseMove over the list, make sure the mouse is down, and try to start the drag: var doc:Document = myList.selectedItem as Document; var proxy:DocumentDragProxy = new DocumentDragProxy(); proxy.document = doc; and that's where it goes bad. I'm suspecting it's because the DocumentDragProxy has not finished creating all of its children, so they're still null? How would I go about letting the set happen from the main app, but waiting inside the DocumentDragProxy to make sure all the kiddies are in the pool before assigning something to them? Thanks a lot. I read lots of things, but none made too much sense. -- TOdd
[flexcoders] E4X descendent operator return type?
I'm trying a simple test, and either it's monday or my brain is broken... maybe both... I'm writing a login component, and fire off a HTTP service that returns XML as E4X. The response XML is a response tag with either a user tag or a fault tag inside of it. All I want to do is test if there is a user or fault in the response! I'm trying this: private function handle(e:ResultEvent):void { if (e.result..user) { trace(Yippee!) } if (e.result..fault) { trace(Boo!) } } The event is firing, but I always get Yippee even when I point at a file that has NO user tag. I've replaced the conditional with everything I can think of: e.result..user != null e.result..user != but it seems to fire no matter what. If the E4X parser does NOT find the descendant, what does it return? Is this documented anywhere in the (not so good) Flex/AS3 documentation? Thanks! -- TC
[flexcoders] Re: using itemRenderer with List, how can I set the icon?
I think by using an itemrenderer you are taking away the default ability for the list's default renderer to show the icons. How about taking your icon function code and move it into your item renderer. You can do conditionals inside the item renderer code based on the data parameter, which is the single item being rendered in the renderer. if (data.isThing1) { thing1icon.visible = true }; if (data.isThing2) { thing2icon.visible = true }; or something like that? I'm sure there's a more elegant way, but I don't want to hear you whine anymore (kidding... the least they could do was help other than just reply back uselessly) -- TC
[flexcoders] Re: The complete component communication solution for Flex. ALON DP.
Hey Sean, This is cool. Thanks for putting it out there. A question: In this part of the writeup: For example, the following line of code will show ( trace ) the instance name of the dispatching orangeBall object from within the scope of the whiteBall listening component. public method showSomething(event:EventsGlobals):void { trace(event.instance) } you type event as EventsGlobals, which is just the class that holds the constants. Shouldn't the type be ObjectDataEvent, which is the class that IS the event that gets passed? Seems that way from the rest of the following text, but I wanted to make sure (and it might confuse someone (me)) -- TC
[flexcoders] webservice wsdl parsing error? help?
Hi, I haven't worked with webservices much, but am needing to test out a service that was produced by a software package my company is evaluating. I'm building the flex front end to show the results. When I run what I have, I get errors when the application launches: === TypeError: Error #1034: Type Coercion failed: cannot convert to flash.xml.XMLNode. at mx.rpc.xml::SchemaContext/::httpResultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at ::DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::onComplete() === My application is relatively simple: === ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; public function handleResult(e:ResultEvent):void { trace( Result: + e.result ); } public function handleFault(e:FaultEvent):void { trace( Error: + e.fault.faultString ); } ]] /mx:Script mx:WebService id=mmWebService wsdl=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl; result=handleResult(event) fault=handleFault(event) /mx:WebService mx:Button id=getDataButton click=mmWebService.getVmdbHrrsJoin(63458); / /mx:Application === and I suspect I'm not doing something right with setting up the webservice, as the error occurs after the app starts, before I push the button. Here's the WSDL of the web service (I suspect my answer is here, but again, I'm dumb): === definitions name=MetaMatrixDataServices targetNamespace=http://com.metamatrix/NasaVDBjoin; #8722; types #8722; xsd:schema targetNamespace=http://com.metamatrix/NasaVDBjoin; xsd:import namespace=http://www.metamatrix.com/VmdbHrrsIntegration_Input; schemaLocation=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/NasaDemo/DataIntegrationPOC/HrrsVmdbIntegration/VmdbHrrsIntegration_Input.xsd/ xsd:import namespace=http://www.metamatrix.com/VmdbHrrsIntegration_Output; schemaLocation=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/NasaDemo/DataIntegrationPOC/HrrsVmdbIntegration/VmdbHrrsIntegration_Output.xsd/ /xsd:schema /types #8722; message name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg #8722; documentation Input message for operation VmdbHrrsIntegration_VmdbHrrsJoin/getVmdbHrrsJoin. /documentation part name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg element=schema1:VmdbHrrsJoin_Input/ /message #8722; message name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg #8722; documentation Output message for operation VmdbHrrsIntegration_VmdbHrrsJoin/getVmdbHrrsJoin. /documentation part name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg element=schema2:VmdbHrrsJoin_Output/ /message #8722; portType name=VmdbHrrsIntegration_VmdbHrrsJoin #8722; operation name=getVmdbHrrsJoin input message=tns:VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg/ output message=tns:VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg/ /operation /portType #8722; binding name=VmdbHrrsIntegration_VmdbHrrsJoin type=tns:VmdbHrrsIntegration_VmdbHrrsJoin soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ #8722; operation name=getVmdbHrrsJoin soap:operation style=document soapAction=VmdbHrrsIntegration_WS.VmdbHrrsIntegration_VmdbHrrsJoin.getVmdbHrrsJoin/ #8722; input soap:body use=literal/ /input #8722; output soap:body use=literal/ /output /operation /binding #8722; service name=MetaMatrixDataServices #8722; port name=VmdbHrrsIntegration_VmdbHrrsJoin binding=tns:VmdbHrrsIntegration_VmdbHrrsJoin soap:address location=http://quest3:8000/NasaVDBjoin/services/service/ /port
[flexcoders] Re: e4x with XMLListCollections?
Thanks for the reply. I'm wondering why I can't? According to the docs, myCollection.source gived an XMLList, and the XMLList docs say that This class (along with the XML, Namespace, and QName classes) implements powerful XML-handling standards defined in ECMAScript for XML (E4X) specification (ECMA-357 edition 2). I'm unfortunately in the process of trying to figure out how to use XML as a datasource (from a PHP page) and effectively use it to manage data throughout my Flex app. I thought the whole point of e4x was to NOT have to iterate through everything? Let me go about this a different way and see if anyone has a better idea for how to handle all of this information. I have XML coming down from php. The PHP is grabbing itfrom a relational database, where there is a table of trainingEvents (with unique keyID's) and a table of trainingEventInstances, which are many to 1 with the events. Some of the instances can override certain properties like price... catalog trainingEvent keyID=1 title=Programming 101 eventCost=499.99 trainingEventInstance keyID=1 location=Houston eventDate=02/11/2007 instanceCost=499.99 / trainingEventInstance keyID=2 location=Houston eventDate=04/19/2007 instanceCost=499.99 / trainingEventInstance keyID=3 location=Las Vegas eventDate=04/19/2007 instanceCost=299.99 / /trainingEvent trainingEvent keyID=2 title=Miter Saw Safety eventCost=300.00 trainingEventInstance keyID=4 location=Houston eventDate=12/25/2006 instanceCost=300.00 / /trainingEvent trainingEvent keyID=3 title=How to Fly The Shuttle eventCost=19.99 trainingEventInstance keyID=5 location=Florida eventDate=09/01/2007 instanceCost=1499.99 / trainingEventInstance keyID=6 location=Nevada eventDate=12/10/2006 instanceCost=499.99 / trainingEventInstance keyID=7 location=India eventDate=11/24/2006 instanceCost=19.99 / /trainingEvent /catalog I want to do the following things with it: 1. Display the structure in a tree, where there are trainingEvents at the topmost level, with their instances below them. (I'm doing this currently by putting the XML into an XMLListCollection and using it as the source for a tree, with label and icon functions. Works well). 2. Be able to drag and drop trainingEventInstances onto a Person (items in a listbox ) and have those trainingEventInstances assigned to them. 3. Show a datagrid of the titles, locations, and dates for any person's assignments. The problem I keep hitting is when I want to display the titles. The title is a property of the trainingEvent, not the trainingEventInstance... I could solve it by adding the title to the instances, but that seems like a lot like duplicating data to me. I would have assumed that I could, at any time, find the instance I need in the structure, go to its parent, and grab the title? The traverse all nodes method will work, but what when I have 1000 items in my catalog and the person is assigned to 100 of them. My label function in the datagrid would be going 100,000 loops to print the titles, which seems wrong. Can anyone tell me of a way to work with data coming from a relational database so that I can display relevant info as I need it? Thanks! -- TC --- In flexcoders@yahoogroups.com, Prakaz [EMAIL PROTECTED] wrote: I'm not sure if you will be able to directly access the trainingEvent title using the return statement you have given below. Looking at the structure of the XML, it seems inevitable that you'll have to iterate through each and every node to search for the KeyID you are looking for and when you find one grab the title from the parent node.Here is a code that works: the XML: mx:XML id=theCatalog catalog trainingEvent keyID=1 title=Programming 101 eventCost=499.99 trainingEventInstance keyID=1 trainingEventID=1 location=Houston eventDate=02/11/2007 instanceCost= 499.99 / trainingEventInstance keyID=2 trainingEventID=1 location=Houston eventDate=04/19/2007 instanceCost=499.99 / trainingEventInstance keyID=3 trainingEventID=1 location=Las Vegas eventDate=04/19/2007 instanceCost= 299.99 / /trainingEvent trainingEvent keyID=2 title=Miter Saw Safety eventCost=300.00 trainingEventInstance keyID=4 trainingEventID=2 location=Houston eventDate=12/25/2006 instanceCost= 300.00 / trainingEventInstance keyID=5 trainingEventID=2 location=Houston eventDate=12/25/2006 instanceCost=300.00 / trainingEventInstance keyID=6 trainingEventID=2 location=Houston eventDate=12/25/2006 instanceCost= 300.00 / trainingEventInstance keyID=7 trainingEventID=2 location=Houston eventDate=12/25/2006 instanceCost=300.00 / /trainingEvent /catalog /mx:XML public function getCourseTitle(instanceID:Number){ // Iterate through each Node of the XML for each(var parentNodes:XML in
[flexcoders] Object oriented / design pattern / application design books?
I've seen the light and am sold on the object oriented world. I'm smart enough about it to sound smart and do some good things, but still dumb enough not to know the right way to do things or the best way to apprach the problem. I'm confortable working with Flex, controls, data, components, etc. Where I'm falling short is the vision and strategy on designing the app and its objects to play nicely, communicate with each other, and provide the best flexibility. Can anyone recommend a list of books (or videos, etc.) for learning OOP, Design Patterns, Application Design, etc? I'd really like something that will help me in Flex, although I know php, vb, and a few others (not Java). Most of the books I see are either completely generic theory, so it's hard to tell one is better than another (hence my question), or they're targeted to a languange I don't use (Java, C++), so I won't get as much out of them as I'd like. Some are targeted at Flash, which is better, but is still Flash focussed, so not ideal? I have links to: Head First Design Patterns (http://www.amazon.com/gp/product/0596007124/ref=pd_cp_b_title/103-0966880-4095845?ie=UTF8) Programming Flex 2: The Comprehensive Guide to Creating Rich Media Applications with Adobe Flex (http://www.amazon.com/Programming-Flex-2-Comprehensive-Guide-Creating-Rich-Media-Applications-Adobe-Flex/dp/059652689X/sr=1-1/qid=1157055447/ref=sr_1_1/103-0966880-4095845?ie=UTF8s=books) which looked good, but I wanted to see if anyone else had better options or knew anything about those (the 2nd one is due out in January). Thanks! -- Todd -- 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/
[flexcoders] approach question: how to handle lookup table data?
I'm working to architect an app using Flex Data Services. As a simple example, let's consider the office management application. I have a Person class, who has all the normal properties, one of which is Level indicating the code for their level of seniority (A 1 2 ... 5 P -- for partner). These designators have changed in the past, and may change / be added to in the future. And we'll definitely want to use them to drill down for reports, metrics, etc. From my database background, I would have my People table have a field called levelID, which points to the Levels table having the ID and Name fields. My reports would be something like Select * from people where levelID = 3, etc. What about Flex and Data Services? I'll want to show that Person X has a level of P but also let them edit that person and pick off from a list of levels (comboBox), so I need a way to get that list (and add to it, in case somebody gets promoted to Y (yoda)) Should I have my Person class contain an instance of the Level class which has id and title properties? THat sounds easy, but with the number of parameters I'm dealing with, it sounds like a lot of effort. I'd also have to parse ALL the People to create my pick list of Levels... Or should I have the server FILL a collection of People (with their levelIDs) and another collection of Levels and use cursors, finds, etc. to match up the data? Or go totally uncoupled and just pass the level NAME to the client and have the server back end deal with the ID matching? I think my brain hurts. Any thoughts? Thanks! -- 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/
[flexcoders] Re: Flex Builder 2, getting slower as code grows
I've seen similar things with much smaller file sizes that are developed continuously or run over and over again (a.k.a. developed). Shutting down Builder and the browser that the app has been launched in repeatedly (we're using the Eclipse plugin and firefox, but whatever) seems to help out. We've had to reboot a few times when ig got really bad. It almost seems like a memory leak on our part. You hit some unknown threshold, and suddenly your... typing ... appears ... one ... l .. e ... t ... t ... e ... r (sorry) at a time. Can't wait for the mac version... Processor thing is weird... -- TC --- In flexcoders@yahoogroups.com, j_sevlie [EMAIL PROTECTED] wrote: Is there some kind of coding limitation on how much Flex Builder can handle before it gets completely unusable? I'm currently working on a rather complicated project that's sitting at about 1,700 lines of code, and the code editor in Flex Builder is getting painfully slow to work with. If I just start typing anything I can watch my CPU spike to 100% and sit there until I'm done typing. I still need to use Design mode because it's *awesome* for lining everything up. Is this a case where I'm just going to have to find a way to break everything up into smaller components? About 70% of the 1,700 lines is all Actionscript. I've got a P4 with 2 GB of RAM and Flex Builder will routinely consume 400-600MB of memory while I'm working. Thanks, Jacob -- 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/
[flexcoders] changing state of all itemrenderer instances?
I have a list using a custom MXML item renderer: mx:List id=personList itemRenderer=PersonRenderer dataProvider={people}/ I'd like the user to have a checkbox in the main application to decide if they want to see the people's pictures in the list or not. On change of the checkbox, I'd like to be able to say Hey list (or list's item renderer class), change all your items from the base state to a state called withPhoto. I tried to make a static function changeState for PersonRenderer, but then I can't access the currentState property... makes sense. I was thinking of looping through each item in the list and changing it's specific instance of PersonRenderer's state? But I'm not too sure how to do that. Or is there a better way to do it? I currently have the base and withPhoto states defined in the renderer, and would like to keep it in that one renderer. I considered just changing the list's itemRenderer to PersonRendererWithPhoto but then I'd lose any pretty transitions, fades, etc. as the photo is displayed... that's no good. Thanks! -- TC -- 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/
[flexcoders] add additional data to list-based drag and drop?
I have a few lists whose items I want to drag and drop to another component. I can roll my own and code the entire drag/drop operation, but I'm lazy. I looked at the list-based drag and drop features, which look cool: mx:List id=personList dragEnabled=true / mx:List id=eventList dragEnabled=true / but when I drop items on my eventual drag and drop target, I'd like the target to know a little more, like which list it came from (or more loosely coupled, what type of data it is (person or event). Is there a way to add a format to the list-based drag and drop dragSource, like iAmAPerson or iAmAnEvent? Or is this the line I cross and have to move into the DragDropManager? -- TC -- 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/
[flexcoders] custom component: how to tap into resize?
I'm creating a custom component extending UIComponent. Much of the component is drawn by the Drawing API during the updateDisplayList using settings calculated during the commitProperties. Works great. The problem arises when the end developer USING the component changes the size of it manually (example: the height and width are 150, and they create a button whose click changes the component's width to 300). My commitProps and updateDispList are VERY conditional - only redrawing the elements that NEED to be redraws to increase performance. What I can't find / missed is how to know the component itself resized and to set a flag that will tell my commitProps and updateDispList to redraw everything. What is that event / how do I tell they resized me? Thanks! -- TC -- 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/
[flexcoders] Re: Functionality Between Components and the Main Application
i completely agree with Jeff - using the events is the best way to go. If, for some reason that doesn't work for you, you can always reference the application using mx.core.Application.application, which is a reference to the top top Application (even if your swf is loaded inside another application's swf. You can also traverse the parent application(s) for nested apps with any component's parentApplication property: http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/ wwhelp.htm?context=LiveDocs_Partsfile=0644.html --- In flexcoders@yahoogroups.com, Battershall, Jeff [EMAIL PROTECTED] wrote: Your custom component should dispatch its events. The parent application which should be listening for them. Something like this might work: comp:MyComp itemClicked=popUpWindow(event)/ Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Megan Sent: Wednesday, August 23, 2006 1:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Functionality Between Components and the Main Application Hi! I've been trying to figure out how to do this sort of thing, and thought I'd ask before messing with it anymore. I have a toolbar that's in its own component, and it has some buttons on it that will open new windows/popups. What I need to have happen is, when one of the buttons gets clicked, the window pops up inside a container that's on the main application. Right now they show up at the top corner of the toolbar. I gave the VBox in the middle of the main application an ID, but when I try to tell the toolbar to open the window there, it gives me an error because that ID doesn't exist inside the toolbar... I've also tried telling the button to run a function in the main application to open the popup but it tells me that I'm calling a possibly undefined method through a reference with static type Class. I hope that makes sense. Any ideas? Thank you! -- 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/
[flexcoders] Easy way to publish flex app as standalone EXE?
Hey, In Flash you used to be able to publish a Projector (exe) file for Windows. I know there are a bunch of SWF to EXE apps out there (Zinc, etc), but I don't need any of the filesystem APIs, etc, I just need to put my app on a workstation with no internet access and no flash player install possible (gotta love the government)... Is there any Projector capability in Flex or any easy/cheap way to make it work? -- TC Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/TktRrD/gOaOAA/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/
[flexcoders] concise explanation of sizing (measured, explicit, preferred) custom components
Does anyone know of a good (reasonably plain language) writeup of how (and why and when) to use the various sizing properties when extending UIComponent? I've read the documentation in Help, but it hasn't fully sunk through my thick head yet. I'd like to understand enough to know not only WHAT they are, but WHY I'm setting them and HOW Flex uses them: ( ... means Height or Width. I DO understand that those mean! : )) - measured... - measuredPreferred... - explicit... - ... Thanks for any leads or any explanations you can give me! --TC Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/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/
[flexcoders] Extending ComboBox loses part of the skin?
I'm still using Beta 3 (stupid slow procurement department)... I'm working on extending framework components, and am playing with the combobox. When I run my version, it functions as expected, but the arrow on the combo box (what you click to deop it down) does not display. I put a generic combo next to it, and it looks fine. Here's my main app code: bah:StateComboBox id=todd x=30 y=30 rowCount=9 displayType={StateComboBox.NAMEABBREV} / mx:ComboBox x=30 y=90 dataProvider={todd.dataProvider} labelFunction=test / and the constructor of StateComboBox (which extends ComboBox): public function StateComboBox() { // let combobox do its thing super(); //add our dataprovider this.dataProvider = _data; this.labelFunction = labelFormatter; } I've got an array in there and a label function, but that's it. Other than super()-ing the ComboBox, is there somthing else I'm supposed to be doing? Or is this a bug in B3? (I'm using Player 9,0,16,0) Thanks! -- TC -- 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/
[flexcoders] strategery help: how to make crosshair on AreaChart
I have an area chart. As the user mouses around over it, I'd like a hirzontal and vertical crosshair (one horiz, one vert gridline, sort of) to track the mouse pointer. I see the annotationelements, and am already using it for my gridlines. I'm wondering if anyone has ideas of how to implement the crosshair? I'm guessing a canvas that I can use the drawing API on to draw the lines as the mouseMoves. But how to tie the position of the mouse over JUST the chart area showing the actual data (not over the axes labels, etc) to the X and Y to draw the lines? And how to get it to work in the annotationElements array? I'm assuming I need to make whatever I create a ChartElement, but I haven't ever actually cracked open the existing objects and tried to tie into them at such a low level. If anyone has any thoughts or guidance, even just for general ways to get into the source code and create a new class from them, I'd appreciate it. Thanks! Yahoo! Groups Sponsor ~-- Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/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/
[flexcoders] Help?: Fill not working in AreaSeries?
I'm making an AreaChart with 3 AreaSeries and a ColumnSeries to show my data.I didn't like the nasty orange,green,blue,tan color scheme, so have set offf to customize it.Here's what I have:mx:AreaChart dataProvider="{todd}" mx:series mx:Arraymx:AreaSeries name="total" displayName="Total" yField="total" mx:stroke mx:Stroke color="0x9A9A00" weight="2"/ /mx:stroke mx:fill mx:SolidColor color="0x00" alpha=".3"/ /mx:fill/mx:AreaSeriesmx:AreaSeries name="pass" displayName="Passed" yField="pass"/mx:AreaSeriesmx:AreaSeries name="fail" displayName="Failed" yField="fail"/mx:AreaSeriesmx:ColumnSeries name="vv" displayName="In Vamp;V" yField="vv" mx:fill mx:SolidColor color="0x00" alpha=".3"/ /mx:fill /mx:ColumnSeries /mx:Array /mx:series /mx:AreaChartThe ColumnSeries IS looking the way I tell it to (faded black) but the AreaSeries is NOT (still orange and solid). I copied the stroke and fills right out of the Help system's example on how to use alphas in chart fills (Flex 2.0 Developer's Guide Charting Components Formatting Charts Using fills) I tried removing the ColumnSeries, wondering if that was having a bad effect on it somehow, but no change.Any thoughts? __._,_.___ -- 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. __,_._,___
[flexcoders] Re: Help?: Fill not working in AreaSeries?
Excellent. Thanks, Ely. --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: use areaFill instead of fill. fill/stroke always apply to the individual items (i.e., on area and line series, the individual points). Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tddclare Sent: Friday, June 30, 2006 8:15 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Help?: Fill not working in AreaSeries? I'm making an AreaChart with 3 AreaSeries and a ColumnSeries to show my data. I didn't like the nasty orange,green,blue,tan color scheme, so have set offf to customize it. Here's what I have: mx:AreaChart dataProvider={todd} mx:series mx:Array mx:AreaSeries name=total displayName=Total yField=total mx:stroke mx:Stroke color=0x9A9A00 weight=2/ nbs! p; /mx:stroke mx:fill mx:SolidColor color=0x00 alpha=.3/ /mx:fill /mx:AreaSeries mx:AreaSeries name=pass displayName=Passed yField=pass/mx:AreaSeries mx:AreaSeries name=fail displayName=Failed yField=fail/mx:AreaSeries n! bsp; mx:ColumnSeries name=! vv disp layName=In Vamp;V yField=vv mx:fill mx:SolidColor color=0x00 alpha=.3/ /mx:fill /mx:ColumnSeries /mx:Array /mx:series /mx:AreaChart The ColumnSeries IS looking the way I tell it to (faded black) but the AreaSeries is NOT (still orange and solid). I copi! ed the stroke and fills right out of the Help system's example on how to use alphas in chart fills (Flex 2.0 Developer's Guide http://127.0.0.1:65142/help/topic/com.adobe.flexbuilder.help/html/Part2 _DevApps.html Charting Components http://127.0.0.1:65142/help/topic/com.adobe.flexbuilder.help/html/1 110.html Formatting Charts http://127.0.0.1:65142/help/topic/com.adobe.flexbuilder.help/html/1 142.html Using fills) http://127.0.0.1:65142/help/topic/com.adobe.flexbuilder.help/html/1 164.html I tried removing the ColumnSeries, wondering if that was having a bad effect on it somehow, but no change. Any thoughts? Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/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/