RE: [flexcoders] strategy for Composite component as itemRenderer in DataGrid or List
I've used 1) and 2) before and both works fine for me. 1) is a bit tricky some times as you have to take care when to access listData because it is not necessarily there during the whole lifecycle of your item renderer. 2) is neat, especially when you use parameterized ItemRenderers on those columns because then your itemRenderer does not need to be hardwired to a formatter function in the parent document scope (or whereever you place it) i.e. mx:DataGridColumn itemRenderer={new CustomClassFactory(YourItemRenderer, {formatFunction: anotherObjectsomeFunction}} / YourItemRenderer then just needs a public var formatFunction:Function and you're all set. CustomClassFactory itself is a subclass of mx.core.ClassFactory - for more info on this technique see Antatole's blog entry http://flexblog.faratasystems.com/?p=91 Dirk. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Hagenlock Sent: Thursday, December 21, 2006 2:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] strategy for Composite component as itemRenderer in DataGrid or List Hello, I'm trying to create a strategy for creating a summary/detail editing interface using either mx.List or mx.DataGrid (with one column). I've created a composite component, which uses two States, a summary (with a text label and a checkbox) and a detail (based on summary with some other controls). That dataProvider I plan on using is an ArrayCollection which is a collection of Object instances of various classes, where each class implements a toString() function which returns an XML formatted String (of the String class). I point that last bit out because the toString() function is getting called and the results are being returned, rather than the instance reference itself in some of the test cases I've done. Incidentally, I can use this dataProvider model with a basic DataGrid without issues. I've chosen to attempt to do this with a DataGrid or List, as opposed to a VBox with a repeater because of the efficiences of the pattern the DataGrid/List are based on as well as gaining the drag/drop features. I'm fine with doing the binding between the properties in the objects in the ArrayCollection to the controls in the composite component, I'm having difficulty gaining a reference to the ArrayCollection objects as objects. Briefly, I've explored: 1) implements=mx.controls.listClasses.IDropInListItemRenderer on the composite component coupled with 'get listData()' and 'set listData()' functions. 2) Using a custom formatter function which returns a reference to the object (applied in the datagrid column) or list. And various tweaks on the above concepts... If anyone has done this sort of thing, could you point me in the right direction? It would be much appreciated. -Steve -- 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] Re: crossdomain.xml - is there an alternative ?
Thanks guys - but no joy - I have crossdomain.xml (which is set to allow any domain) in the doc root on the server side and also in the same directory as the swf. I still get the security error. Regarding the LoadPolicyFile question - I tried to load it from https://serverdomain.com:9443/ - not from 'mydomain' - thinking about it, this may be kinda dumb - I'll try loading it from 'mydomain' instead. However if this works, then there's something I don't really understand... Isn't the point of the crossdomain.xml file to control whether or not the Flashplayer can access the remote domain and therefore should be hosted ON that remote domain ? If you can host it locally and therefore change it to whatever you like, then what's the point in having the control there at all ? Cheers, Jamie. --- In flexcoders@yahoogroups.com, Jeremy Rottman [EMAIL PROTECTED] wrote: Mark is correct, if you put your crossdomain.xml file inside of the document root that is the first place flex / flash look for it, if it doesn't find it inside of there, then the second place it looks is the directory that the swf is sitting inside of. So place your crossdomain.xml file in http://mydomain.com and that should work. Just a quick question for you though when you used LoadPolicyFile where you trying to load it from httpS://mydomain:9443/ or were you trying to load it from http://mydomain.com? The port number might be throwing it off. I've gotten LoadPolicyFile to work on a few things but I loaded it from a standard URL like http://mydomain.com/project/crossdomain.xml hope this helps. Good luck. Jeremy On 12/20/06, Mark McCray [EMAIL PROTECTED] wrote: Have you tried placing the crossdomain.xml file in whatever https://mydomain:9443/; maps its docroot to? Because that is where it will look I think. On Dec 20, 2006, at 11:33 AM, jamiebadman wrote: Hi, I'm trying to access https webservices from a flex app hosted under http and I'm getting security errors. The full error states that there's a security sandbox violation trying to access https://mydomain:9443/ccx/myservice So it would seem this could be resolved with a crossdomain.xml file placed at that location, right ? However the location doesn't actually exist on the server. the /ccx portion of the URL is to do with a product called 'Cape Clear' which manages the webservices and it would seem that requests that go into /ccx and beyond are somehow intercepted and dealt with by CapeClear. So there's actually not a physical location to place the crossdomain.xml that I can make out. I tried using the LoadPolicyFile approach to have it load the crossdomain.xml from a different location - but this didn't seem to do anything from Flex. I also tried 'allowInsecureDomain' but again, no effect. Does anyone have any suggestions - any ideas on how we can get this to work ? Thanks in advance, Jamie.
[flexcoders] Canvas zoom / preview / Navigator
Basically I want to do someting like the 'Navigator' view box in yahoo maps (http://maps.yahoo.com/ top right corner). This view would be generated from a Canvas wich contains various graphic Components... Do you have any directions to do that : - zoom in a canvas (do I have to manually change the widths of every components ???) - get the user visible portion of the canvas - global snapshot of the canvas, to re insert it in a preview box ?? Any clue would be very appreciated !!! Mathieu LEMAIRE
[flexcoders] Re: Second post: Really stuck on a problem which should be really easy? :(
Hi there, Yes I have verified it is in the wwwroot folder, and can see it in the services browser in flex 2 builder. Here is the full code snippet. Thank you for having a look! ?xml version=1.0 encoding=utf-8? mx:Canvas initialize=pages.getAllAsQuery('page_name, window_title'); xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:RemoteObject id=pages destination=ColdFusion source=kkmis.models.PagesGateway mx:method name=get result=dataHandler(event)/ /mx:RemoteObject mx:Script ![CDATA[ // import mx.data.messages.PagedMessage; import mx.rpc.events.ResultEvent; import mx.collections.ArrayCollection; import models.Pages; // is used by Flex Builder 2 [Inspectable(defaultValue=true)] [Bindable] public var voPage:Pages; private function dataHandler (event:ResultEvent):void { viewstack1.selectedChild = detail; voPage = event.result as models.Pages; } private function savePage():void { pages.save(voPage); } ]] /mx:Script mx:ViewStack creationPolicy=all selectedIndex=1 id=viewstack1 width=100% height=100% x=0 y=0 mx:Canvas id=detail label=details width=100% height=100% backgroundAlpha=0.59 mx:Form x=0 y=0 width=100% height=100% mx:FormItem label=Page name mx:TextInput id=page_name width=250 text={voPage.page_name}/ /mx:FormItem mx:FormItem label=Window title mx:TextInput id=window_title width=500 text={voPage.window_title}/ /mx:FormItem mx:FormItem label=Comment title mx:TextInput id=comment_title width=500 text={voPage.comment_title}/ /mx:FormItem mx:HBox width=100% mx:Button click=savePage(); label=Save changes id=save_changes/ mx:Button click=viewstack1.selectedChild=list; label=Cancel id=cancel/ /mx:HBox /mx:Form /mx:Canvas mx:Canvas id=list label=list width=100% height=100% top=0 mx:DataGrid doubleClick=pages.get (dg.selectedIndex + 1) doubleClickEnabled=true id=dg xmlns:mx=http://www.adobe.com/2006/mxml; dataProvider={pages.getAllAsQuery.lastResult} top=0 bottom=0 right=0 left=0/ /mx:Canvas /mx:ViewStack /mx:Canvas
RE: [flexcoders] FDS without identity property?
I dont think you can, FDS needs to know the which field in the object is tje unique identifier to be able to keep track of it. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Lietz Sent: Wednesday, December 20, 2006 2:21 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS without identity property? Hi List, is there a way to use FDS without the identity property? Objects have an identity in the VM and I want to use that identity - not an artifical one. Is FDS unable to send back the same object (in a delete or update operation) which it receives from my Java backend? tia, O. -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L’expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s’il est retransmis sans son autorisation. Si vous n’êtes pas le destinataire visé du présent message ou si vous l’avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l’expéditeur.
[flexcoders] Re: component CSS
I tried adding mx:Style source=main.css/ to the component but get a compiler warning Warning: CSS type selectors are not supported in components. Perhaps you were suggesting setStyle but it seems cumbersome to have to do it through code on every component. --- In flexcoders@yahoogroups.com, Bjorn Schultheiss [EMAIL PROTECTED] wrote: load the css in the component On 21/12/2006, at 4:06 PM, graysonpierce wrote: css/ In this application I have a component that has a button that sets a styleName to a name defined with dot in main.css like this:
[flexcoders] Re: Secure RTMP on Websphere 5.1 and 5.1.1
Hi Seth, Thanks for help. Finally, I've managed to run RTMPS on Websphere with selfsigned cert. You are very right that it does not need Worker Manager. The only tricky part is creating your own SSL Configuration and putting right things in right places (client and server keystore/truststore). Big thanks, Bartek --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi, Two things: 1. I checked with the developer who worked on the Websphere RTMP support and was told that version 6 is supported, below that isn't explicitly. However, if things are working for you on 5.1/5.1.1 without configuring a WorkManager you wouldn't need to do anything differently for secure RTMPS connections. 2. For secure connections in general you'll want to serve the swf/html wrapper securely as well (over HTTPS) and use the same cert for both HTTP and RTMP. The player doesn't provide a way to import certs so if you're using a self-signed cert on the server when you attempt to make an RTMPS connection the browser won't pop up a cert accept dialog. Because the cert isn't in the browser store the RTMPS connection will fail. If you request the swf/mxml/html over HTTPS protected by the same cert you'll get the browser prompt. If you accept it the cert will be added to your browser store and then when the player makes its RTMPS connection and the server uses that same cert to secure the connection the cert will be found in the browser store and the connection will succeed. You may also want to enable client logging (mx:TraceTarget) to see what's happening with your connection in more detail. HTH, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of baardos Sent: Tuesday, December 19, 2006 6:03 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Secure RTMP on Websphere 5.1 and 5.1.1 Hi, I've been trying to setup secure RTMP channel and the problem is that a cosumer in the Flex client is timed out when it tries to subscribe. I cannot see a subscibe message in the logs - for sure it is there received by the server when I use unsecured RTMP. It seems like the client was sending a request to a wrong location or it was ignored by the server. I've noticed one small thing there. RTMP on Websphere 5.1 and 5.1.1 works without setting up the Message Worker mentioned in the documentation. Is it WAS 6.0 specific only? Is it by any chance required by secured RTMP? I would be grateful for any help. Cheers, Bartek
Re: [?? Probable Spam] [flexcoders] Flashvars not passing into flex?
1. object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354 2. id=fileupload width=200 height=150 3. codebase=http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab; 4. param name=movie value=fileupload.swf / 5. param name=quality value=high / 6. param name=bgcolor value=#869ca7 / 7. param name=allowScriptAccess value=sameDomain / 8. embed src=fileupload.swf quality=high bgcolor=#869ca7 9. width=200 height=150 name=fileupload align=middle 10. play=true 11. loop=false 12. quality=high 13. allowScriptAccess=sameDomain 14. type=application/x-shockwave-flash 15. pluginspage=http://www.adobe.com/go/getflashplayer; 16. /embed 17. /object rumpleminzeflickr wrote: Hi there, i'm adding a flex app into an existing web page. I'm using macromedia dream weaver to link to the .swf, which is all good and the app displays. However the actualy flashvars don't get passed in. Any ideas? Many thanks, Brett script type=text/javascript AC_FL_RunContent ( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/ http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=7,0,19,0','width','500','height','375','src','Flex FileUpload','quality','high','pluginspage','http://www.macromedia.com/ http://www.macromedia.com/ go/getflashplayer','movie','FlexFileUpload' ); //end AC code /scriptnoscriptobject classid=clsid:D27CDB6E-AE6D-11cf-96B8- 44455354 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swfl http://download.macromedia.com/pub/shockwave/cabs/flash/swfl ash.cab#version=7,0,19,0 width=500 height=375 param name=movie value=FlexFileUpload.swf param name=quality value=high param name=FlashVars value=test=true embed src=FlexFileUpload.swf FlashVars=test=true quality=high pluginspage=http://www.macromedia.com/go/getflashplayer http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=500 height=375/embed /object/noscript
[flexcoders] big composite object or smaller pieces of the pie?
Ok, working on a project here where we are discussing what is a best approach to retrieving data to Flex. In our case we have a model domain with say 20 objetcs. All of them can be composed into one 'fat' composite object. From a Flex UI perspective, is it better to: A) fetch the whole fat composed object and return it to the user allowing the user to operate on all facets of the model domain without returning to the DB. Once the user mashes SAVE somewhere, the whole fat composed object is sent to the server for processing. or B) fetch pieces of the object seperately as the user requests them. Thus the FlexUI is working with smaller pieces, but many more trips to the DB. What are your thoughts and experiences? Obviously the quick answer is 'it depends', we wouldn't want to use A if the composite object is really bulky, I'm thinking about the less extreme cases. For example, a composite object such as a Customer object that has say a array of Address objects, a array of Orders with each Order having a array of Products, and basic customer info. -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
Re: [flexcoders] How do you access data.[param] in component?
I don't work with datagrids so I'm not sure where the variable data comes from. My only guess is that the initialize event is being thrown too early and that data hasn't been set yet. Try using another event like creationComplete or an event of the parent object. - Dan On 12/20/06, securenetfreedom [EMAIL PROTECTED] wrote: I have a component comprised of a mx:Text field that is rendered in a datagrid. I am trying to access the data.name and the data.descr of the data that is bound to the component so that I can use both in one mx:Text field and not two. If I access them separately like this it works fine: mx:Text id=title_txt text={data.name} fontWeight=bold fontSize=10 paddingBottom=0 / mx:Text id=desc_txt text={data.descr} height=60 width=100% color=#77 fontSize=10 / However, if I try something like this, I get the error 'Error #1009: Cannot access a property or method of a null object reference.' mx:Script ![CDATA[ private function text_init():void { //title_txt.htmlText =b+data.name+/bbr+data.descr; var txt: String; var title:String = data.name; var desc:String = data.descr; title_txt.htmlText =b+title+/bbr+ desc; } ]] /mx:Script mx:Text id=title_txt fontSize=10 paddingBottom=0 initialize=text_init() / I have tried many different approaches and it seems Flex keeps heading me off at the pass. Any suggestions would be appreciated. Thanks, Jeff
RE: [flexcoders] big composite object or smaller pieces of the pie?
We have the same here... Consumer with addresses, contact methods, payments methods and billing schedules... we fetch the entire object graph, let the user make any changes he wants and then send back in one shot on commit() using FDS. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Thursday, December 21, 2006 9:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] big composite object or smaller pieces of the pie? Ok, working on a project here where we are discussing what is a best approach to retrieving data to Flex. In our case we have a model domain with say 20 objetcs. All of them can be composed into one 'fat' composite object. From a Flex UI perspective, is it better to: A) fetch the whole fat composed object and return it to the user allowing the user to operate on all facets of the model domain without returning to the DB. Once the user mashes SAVE somewhere, the whole fat composed object is sent to the server for processing. or B) fetch pieces of the object seperately as the user requests them. Thus the FlexUI is working with smaller pieces, but many more trips to the DB. What are your thoughts and experiences? Obviously the quick answer is 'it depends', we wouldn't want to use A if the composite object is really bulky, I'm thinking about the less extreme cases. For example, a composite object such as a Customer object that has say a array of Address objects, a array of Orders with each Order having a array of Products, and basic customer info. -- Douglas Knudsen http://www.cubicleman.com http://www.cubicleman.com this is my signature, like it? -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] ComboBox Filter headerRenderer in DataGrid
Hi There, I've managed to put a ComboBox in the Header of my DataGrid. How can I use the comboBox to create a filter on the DataGrid column?
Re: [flexcoders] component CSS
Yeah, placing null in CSS won't work. The more important question is why do you want the upskin of the button to be null? What's your desired effect? If it's to have no skin, just a button label on up, but visible skins on rollover and down, you could always either create a programmatic skin that draws nothing, and assign that as the skin, or else create a transparent png and assign that as your skin. -p On 12/21/06 12:06 AM, graysonpierce [EMAIL PROTECTED] wrote: Hello, I have a simple CSS question. I have an application with a css called main.css like this: mx:Style source=main.css/ In this application I have a component that has a button that sets a styleName to a name defined with dot in main.css like this: mx:Button styleName=simplebutton/ if in main.css, I set the upskin for the button using the notation .simplebutton { upskin: ClassReference(null); } but it's ignored. However if I do this in the component it works: mx:Button styleName=simplebutton upskin={null}/ -- 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] Problem with FileReference.upload()
Hi all, I discovered a problem with uploading files to a server in flex2 using FileReference.upload (). My code includes something like this: [...] private var fileRef:FileReference = new FileReference(); private function someHandler(event:Event):void { var request:URLRequest = new URLRequest(band/upload_image); fileRef.upload(request); } [...] On the backend I use ruby on rails to handle the upload. The problem is that every time fileRef.upload(request); gets called a new session will be created in rails (that means I have to re-authenticate my user before every upload request). On the other hand, if I replace e.g. fileRef.upload(request); with navigateToURL(request,_blank); (even if this makes no sense here) the existing session will be used. So why does fileRef.upload(...) creates a new server session on every request? Is this a bug? Best regards René
[flexcoders] Re: Accordion header style problem
I found nothing in flex style explorer to help me. I also did that: var tabHeader:TabHeader = AccordionID.getTabAt(0); tabHeader.setStyle(cornerRadius,6); But it doesn't work at my purpose at all, I have tried my best, but Who can help me? --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: See the Flex Style Explorer, it is great for, well, exploring styles. http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplo rer.html Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of zedan_gu Sent: Wednesday, December 20, 2006 3:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Accordion header style problem Hi,everyone. I am new for flex2,I has a problem about accordion header style, can I set the header's cornerRadius style? Because I want to set my accordion's corners to be rounded. How can I achieve it? Thanks.
RE: [flexcoders] Problem with FileReference.upload()
Its a bug, thats the way the Flash Player works, its not a Flex thing. I've submitted this bug before. Also it happens only with FF... IE works fine. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rene.sprotte Sent: Thursday, December 21, 2006 4:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Problem with FileReference.upload() Hi all, I discovered a problem with uploading files to a server in flex2 using FileReference.upload (). My code includes something like this: [...] private var fileRef:FileReference = new FileReference(); private function someHandler(event:Event):void { var request:URLRequest = new URLRequest(band/upload_image); fileRef.upload(request); } [...] On the backend I use ruby on rails to handle the upload. The problem is that every time fileRef.upload(request); gets called a new session will be created in rails (that means I have to re-authenticate my user before every upload request). On the other hand, if I replace e.g. fileRef.upload(request); with navigateToURL(request,_blank); (even if this makes no sense here) the existing session will be used. So why does fileRef.upload(...) creates a new server session on every request? Is this a bug? Best regards René -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] FDS: DataService.getItem, AsyncToken and IResponder
Hi, Here is my call to getItem: var token : AsyncToken = getDataService().getItem( identity ); token.addResponder( responder_ ); Here is my result event handler: public function result( data : Object ) : void { var event : ResultEvent = ResultEvent( data ); modelLocator_.companyFilterList = CompanyFilterList ( event.message.body[0] ); // modelLocator.companyFilterList = CompanyFilterList( event.result ); } event.result is null event.message.body[0] contains the object I'm expecting. I expected event.result to contain my object. Any ideas as to what I'm doing wrong? TIA
Re: [flexcoders] Problem with FileReference.upload()
You can read this post documenting the bug and its workarounds here: http://www.5etdemi.com/blog/archives/2006/10/php-filereference-and-sessions-a-bug-from-hell/ Patrick Dimitrios Gianninas a écrit : Its a bug, thats the way the Flash Player works, its not a Flex thing. I've submitted this bug before. Also it happens only with FF... IE works fine. *Dimitrios Gianninas* *RIA Developer* *Optimal Payments Inc.* *From:* [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] *On Behalf Of *rene.sprotte *Sent:* Thursday, December 21, 2006 4:33 AM *To:* [EMAIL PROTECTED] ups.com *Subject:* [flexcoders] Problem with FileReference. upload() Hi all, I discovered a problem with uploading files to a server in flex2 using FileReference. upload (). My code includes something like this: [...] private var fileRef:FileReferen ce = new FileReference( ); private function someHandler( event:Event) :void { var request:URLRequest = new URLRequest( band/upload_ image); fileRef.upload( request); } [...] On the backend I use ruby on rails to handle the upload. The problem is that every time fileRef.upload( request); gets called a new session will be created in rails (that means I have to re-authenticate my user before every upload request). On the other hand, if I replace e.g. fileRef.upload( request); with navigateToURL( request, _blank); (even if this makes no sense here) the existing session will be used. So why does fileRef.upload( ...) creates a new server session on every request? Is this a bug? Best regards René * AVIS IMPORTANT * * WARNING * Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender.
[flexcoders] Re: ComboBox Filter headerRenderer in DataGrid
Assuming you're using a collection as the dataProvider for your DataGrid, you can do this easily with the filterFunction property of the collection. Look at the docs and you'll see that filterFunction should refer to a function that accepts a single param of type Object and returns true or false. Create a property that your filterFunction uses to determine the return value and then just change the value of that property in the change handler of the ComboBox. HTH, Ben --- In flexcoders@yahoogroups.com, loisgh1961 [EMAIL PROTECTED] wrote: Hi There, I've managed to put a ComboBox in the Header of my DataGrid. How can I use the comboBox to create a filter on the DataGrid column?
[flexcoders] Re: Cairngorm 2.1 - calling a webservive more than once
I'm getting some strange behaviour also. The first time I call the WebService, event.result contains the data I'd expect. The second time though, the data is found in event.result.result - is this the same as you're seeing ? Any ideas anyone ?! Also, does anyone have any examples of using the new CairngormMessage feature ? The online docs supplied with 2.1 are so sparse - there's no in-depth explanation of anything and no examples at all. Jamie. --- In flexcoders@yahoogroups.com, Robin Burrer [EMAIL PROTECTED] wrote: Hi there, This is driving me mad When I try to call a webservice more than once the webservice object returns an empty object. The result method still gets triggered but the returned data object has no properties... Everything works fine for the first time though. The same service works fine in a Cairngorm 2.0 app. Any ideas? Regards Robin
Re: [flexcoders] Re: Accordion header style problem
Accordion Headers do not have a cornerRadius style available currently. If you want accordion headers, you have three options: (Setting the ³cornerRadius² style on an accordion affects the overall container, not the accordion headers). 1. Create a graphical skin for accordion headers 2. Create a programmatic skin for accordion headers -p On 12/21/06 8:59 AM, zedan_gu [EMAIL PROTECTED] wrote: I found nothing in flex style explorer to help me. I also did that: var tabHeader:TabHeader = AccordionID.getTabAt(0); tabHeader.setStyle(cornerRadius,6); But it doesn't work at my purpose at all, I have tried my best, but Who can help me? --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: See the Flex Style Explorer, it is great for, well, exploring styles. http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplo rer.html Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of zedan_gu Sent: Wednesday, December 20, 2006 3:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Accordion header style problem Hi,everyone. I am new for flex2,I has a problem about accordion header style, can I set the header's cornerRadius style? Because I want to set my accordion's corners to be rounded. How can I achieve it? 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 / \® PETER BAIRD 888/ \888User Experience Consultant 88/ / \88Adobe Consulting | Adobe Systems, Inc 8/ /8\ \8275 Grove St. Newton, MA / /888\ \ \8\
[flexcoders] dataGrid Help, populating - newbie array question (consider it a an xmas gift)
Good morning, Sorry, to post this again, but I'm goin in circles and confused how to populate a datagrid properly with an array collection as a dataProvider. I'm able to use an mx:ArrayCollection or a single array in an array collection, but how do I populate it automatically with an array collection holding 3 arrays, like this? mx:DataGrid id=dgFeatured1 width=250 height=150 styleName=mainText top=208 left=46 itemClick=itemClickEvent(event); mx:ArrayCollection mx:source mx:Object Poll=Do You Like Law And Order Number=53 owner=batanga/jumpman type=1/ mx:Object Poll=When Do You Do Most Of Your Christmas... Number=49 owner=batanga/jumpman type=1/ mx:Object Poll=Can I Date Your Daughter Number=54 owner=batanga/DonaldRumsfeld type=1/ /mx:source /mx:ArrayCollection mx:columns This works, but I want to do the same thing as above with my arrays in an array collection, this probably something really basic I don't grasp how to use. This works, but only with one array in my array collection... var _data_fastest:Object = RemotingProvider.getInstance().getPolls(); fastestAC = new ArrayCollection(_data_fastest.fastest); I want to the following, why does this not work the same way, what am I not grasping: fastestAC = new ArrayCollection(_data_fastest.fastest,_data_.id,_data.type); then I want to use the dataProvider so I can populate it just like the first example and then get my selected item. Thanks flex genius!
[flexcoders] RegExp
I am trying to create a regular expression that essentially parses out all the html of a text string. (i.e. - Remove all text between lt; and gt;). I am not the seasoned regex pro, but my attempts have failed based on research within the livedocs: var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi Does anyone see what is wrong? var stringToEdit : String = lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'gt;lt;htmlgt;lt;headgt;text I should seelt;/headgt;lt;/htmlgt;; var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi var newStr : String = stringToEdit.replace(pattern, ); trace(newStr); //Desired Output: text I should see //Actual output :-( !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhtmlheadtext I should see/head/html
Re: [flexcoders] Canvas zoom / preview / Navigator
I just made something like this, here is the part of my code, hopes help you out. after setup the image and slider, use zoomChange() function to change the image height and width, remember to disable the verticalScrollPolicy and horizontalScrollPolicy. public function zoomChange():void{ myImage.height=uint(fixedImageHeight*hSlider.value/100); myImage.width=uint(fixedImageWidth*hSlider.value/100); } mx:Image id=myImage x=0 y=0 source=image.jpg creationComplete=imageWidth=myImage.width; imageHeight=myImage.height; getSize(event); myPBar.visible=false; / mx:VSlider id=hSlider right=10 bottom=115 width=100 height=200 minimum=10 maximum=150 value=70 change=zoomChange() labels=['zoom : 10%','zoom : 150%'] styleName=myHSlider allowTrackClick=true liveDragging=true mouseOver=scaleVbox.alpha=.5 mouseOut=scaleVbox.alpha=.0 alpha=1 tickLength=10 tickColor=#00 showTrackHighlight=true trackColors=#ff,#ccff33 / On 12/21/06, ecpmaz [EMAIL PROTECTED] wrote: Basically I want to do someting like the 'Navigator' view box in yahoo maps (http://maps.yahoo.com/ top right corner). This view would be generated from a Canvas wich contains various graphic Components... Do you have any directions to do that : - zoom in a canvas (do I have to manually change the widths of every components ???) - get the user visible portion of the canvas - global snapshot of the canvas, to re insert it in a preview box ?? Any clue would be very appreciated !!! Mathieu LEMAIRE -- Willy -- maybe today is a good day to write some code, hold on, late me take a nap first ... Zzzz --
Re: [flexcoders] Re: SEO Compatibility
I guess it isn't as large a problem as maybe I've been suggesting, after having talked about it in this thread. My whole problem is that I don't like urls that look like this: http//domain.com/some/path/#other/path - which in all the examples, is what you could end up with, if you try to combine a regular indexable set of html files (or a server side app or whatever), with an self updating deep link solution that uses the hash portion of the url (like all current flash based deep link systems do). At the end of the day the problem is largely cosmetic I suppose, but it's still a problem I'd like to find a solution for. :-) The optimal solution, imo, would be some way to have the pages get indexed by search engines, then kick you into the app, at the app level, rather than shoe horning the app in at the index level. Kevin N. hank williams wrote: Either way, it's reconciling the two urltypes that's the crux of the problem as I see it. Kevin, You keep saying this, and maybe I am missing the big picture here, but I am not clear why it is necessary to reconcile these two url types, or how they relate to each other at all. It seems to me you can use them both, they exist for different purposes and there is no problem. You seem to think that that is not right, and below categorize it as so large a problem. What am I not understanding? Regards, Hank
[flexcoders] FDMS destinations and inheritance
Guys, I'm trying to properly set up a relationship between a class View, which has a FDMS destination called View, and in Hibernate has a relationship called parent which points to a ViewContainer. The trick is that ViewContainer is a sub-class of View. So normally I would create my managed relationship like this: destination id=View ... many-to-one property=parent destination=ViewContainer lazy=true / ... /destination and destination id=ViewContainer ... one-to-many property=childViews destination=Views lazy=false / ... /destination NOW isn't this going to wreak havoc on FDS if the same object (a ViewContainer) actually matches more than one destination? specifically when my Application class has a managed relationship to View, and those views could be ViewContainers... How should this be solved properly? thanks, PW
[flexcoders] Re: dataGrid Help, populating - newbie array question (consider it a an xmas gift)
First I think you're confused about the semantics of ArrayCollection... it is not a collection of arrays, but rather a Collection interface wrapper on a single array. When you define the dataProvider statically in mxml the way you did, what you're doing is creating a single array of Objects (each object having 3 properties) So you want to do the same thing with the ArrayCollection in code... var dp:ArrayCollection = new ArrayCollection(); var o:Object = new Object(); o.Poll=Do You Like Law And Order; o.Number=53; o.owner=batanga/jumpman o.type=1; dp.addItem(o); dgFeatured1.dataProvider = dp; GoodLuck! PW --- In flexcoders@yahoogroups.com, {reduxdj} [EMAIL PROTECTED] wrote: Good morning, Sorry, to post this again, but I'm goin in circles and confused how to populate a datagrid properly with an array collection as a dataProvider. I'm able to use an mx:ArrayCollection or a single array in an array collection, but how do I populate it automatically with an array collection holding 3 arrays, like this? mx:DataGrid id=dgFeatured1 width=250 height=150 styleName=mainText top=208 left=46 itemClick=itemClickEvent (event); mx:ArrayCollection mx:source mx:Object Poll=Do You Like Law And Order Number=53 owner=batanga/jumpman type=1/ mx:Object Poll=When Do You Do Most Of Your Christmas... Number=49 owner=batanga/jumpman type=1/ mx:Object Poll=Can I Date Your Daughter Number=54 owner=batanga/DonaldRumsfeld type=1/ /mx:source /mx:ArrayCollection mx:columns This works, but I want to do the same thing as above with my arrays in an array collection, this probably something really basic I don't grasp how to use. This works, but only with one array in my array collection... var _data_fastest:Object = RemotingProvider.getInstance().getPolls (); fastestAC = new ArrayCollection(_data_fastest.fastest); I want to the following, why does this not work the same way, what am I not grasping: fastestAC = new ArrayCollection (_data_fastest.fastest,_data_.id,_data.type); then I want to use the dataProvider so I can populate it just like the first example and then get my selected item. Thanks flex genius!
[flexcoders] Re: Datagrid scrolling woes!
I don't know if you're just trying to be misleading, or mis-typed something, but it doesn't help any if you're passing wrong information. DataGrid (or List for that matter) doesn't have a vPosition property at all. I don't know the answer for sure, but there's a 'scrollPosition' property on dataGrid.verticalScrollBar ... thats the one I'd look at first. good luck. PW --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: For DataGrid, setting vPosition=myrowIndex will scroll the grid to the desired line. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cameron Ray Sent: Wednesday, December 20, 2006 6:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Datagrid scrolling woes! Hello all, I'm trying to accomplish something that is seemingly easybut is driving me bananas due to the fact that it's not working. I want to setup a function that can be called and that function will scroll my datagrid to a specific row within that datagrid. Here's what I've got (that doesn't work)any thoughts? _ public function scrollDG():void { dgUserRequest.editedItemPosition = {columnIndex:0, rowIndex:dgUserRequest.dataProvider.length-1}; } ]] /mx:Script mx:Button label=Scroll click=scrollDG()/ mx:Text text={app.userInfo.firstname}'s Videos/ mx:DataGrid id=dgUserRequest x=22 y=128 dataProvider={app.vidInfo2} width=850 height=700 headerStyleName=headerStyle mx:columns mx:DataGridColumn headerText=Thumbnail dataField=thumb_name itemRenderer=components.dgRenderImage width=104/ mx:DataGridColumn headerText=Video Title dataField=projectname id=title fontWeight=bold paddingLeft=10/ mx:itemRenderer mx:Component mx:VBox verticalAlign=middle mx:Text text={data.projectname}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:DataGridColumn mx:DataGridColumn headerText= dataField=projectid itemRenderer=components.dgEditProject width=120/ mx:DataGridColumn headerText=Last Modified dataField=lastmodified itemRenderer=components.dgLastMod width=150/ mx:DataGridColumn headerText= dataField=projectid itemRenderer=components.dgDeleteProject width=75/ /mx:columns /mx:DataGrid Thanks for the help. -Cameron
[flexcoders] Re: E4X and nodes without children
Hello, I was just curious if anyone had an idea as to why trace examples examples 3,4,and 5 for myXML1 and myXML3 in the code snippet from the last post don't return what you'd expect from viewing the xml whereas 3,4,5 for myXML2 does. I think it's a bug in AS3 with e4x expressions and xml nodes without children, but I figured I'd see if anyone in the group would be able to prove otherwise. Main reason this is a concern is because I am trying to programatically select a node in a tree that's driven by an XML file using this functionality of e4x. Thanks in advance, Jun --- In flexcoders@yahoogroups.com, coderjun [EMAIL PROTECTED] wrote: Hello, I have been working on a tree control that's driven by an xml file. What I have be trying to do is to select an item in the tree by first searching the dataProvider, the XML object that represents the xml file. What I have noticed is that the expressions , , and == don't seem to work on attributes in nodes that do not have any children. Remember, this is an xml file for a tree control and I may have items that don't have any children. This to me seems very odd, especially since = and = seem to work just fine... I submitted a bug report on the Adobe site but since they won't respond to a bug submittal I figured I'd post it here to see if anyone had a response or experience with my issue. It's really frustrating since this issue is preventing me from accessing a single node in the xml directly. Below is a code example, as simple as possible, I took the file and the tree control out of the equation. (I also based my XML for the example off of sample code from the Flex help docs.) You'll notice what is broken that you'd think would work is trace examples 3,4,and 5 for myXML1 and myXML3. -Jun ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete() mx:Script ![CDATA[ private var myXML1:XML=order book ISBN=1 titleBaking Extravagant Pastries with Kumquats/title author lastNameContino/lastName firstNameChuck/firstName /author pageCount238/pageCount /book book ISBN=2 / book ISBN=3 titleEmu Care and Breeding/title editor lastNameCase/lastName firstNameJustin/firstName /editor pageCount115/pageCount /book /order; private var myXML2:XML=order book ISBN=1 titleBaking Extravagant Pastries with Kumquats/title author lastNameContino/lastName firstNameChuck/firstName /author pageCount238/pageCount /book book ISBN=3 / book ISBN=2 titleEmu Care and Breeding/title editor lastNameCase/lastName firstNameJustin/firstName /editor pageCount115/pageCount /book /order; private var myXML3:XML=order book ISBN=1 /book book ISBN=2 /book book ISBN=3 /book /order; private function onCreationComplete():void { // Trace out pieces of myXML1 trace(' myXML1 START '); trace('myXML1 EXAMPLE 1: ' + myXML1.book[0]); trace('myXML1 EXAMPLE 2: ' + myXML1.book.(@ISBN = 1 @ISBN = 3)); trace('myXML1 EXAMPLE 3: ' + myXML1.book.(@ISBN 1 @ISBN 3)); trace('myXML1 EXAMPLE 4: ' + myXML1.book.(@ISBN==2)); trace('myXML1 EXAMPLE 5: ' + myXML1..*.(attribute('ISBN')==2)); trace('~~'); // Trace out pieces of myXML2 trace(' myXML2 START '); trace('myXML2 EXAMPLE 1: ' + myXML2.book[0]); trace('myXML2 EXAMPLE 2: ' + myXML2.book.(@ISBN = 1 @ISBN = 3)); trace('myXML2 EXAMPLE 3: ' + myXML2.book.(@ISBN 1 @ISBN 3)); trace('myXML2 EXAMPLE 4: ' + myXML2.book.(@ISBN==2)); trace('myXML2 EXAMPLE 5: ' + myXML2..*.(attribute('ISBN')==2)); trace('~~'); // Trace out pieces of myXML3 trace(' myXML3 START '); trace('myXML3 EXAMPLE 1: ' + myXML3.book[0]); trace('myXML3
RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once
In 2.1 you have to initialize the webservice yourself, it doesnt do it for you anymore. Search the list to find the answer, it was talked about before. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Wednesday, December 20, 2006 10:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm 2.1 - calling a webservive more than once Hi there, This is driving me mad When I try to call a webservice more than once the webservice object returns an empty object. The result method still gets triggered but the returned data object has no properties... Everything works fine for the first time though. The same service works fine in a Cairngorm 2.0 app. Any ideas? Regards Robin -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] Re: RegExp
a couple quick things.. I'm by no means an expert at regex... but... the first backslash is unnecessary isn't it? is not a meta character, so the \ after the first / isn't needed. also, don't you want to remove ALL characters between the and ? so I'd change the inner [a-zA-Z0-9]* to .*? (the question mark makes it a lazy quantifier instead of an agressive quantifier) And one last thing, is you may need the multi-line flag also (if the XML has line breaks... so I'd give this a shot... haven't tried it myself though /lt;.*?gt;/gim good luck PW --- In flexcoders@yahoogroups.com, e_baggg [EMAIL PROTECTED] wrote: I am trying to create a regular expression that essentially parses out all the html of a text string. (i.e. - Remove all text between lt; and gt;). I am not the seasoned regex pro, but my attempts have failed based on research within the livedocs: var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi Does anyone see what is wrong? var stringToEdit : String = lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'gt;lt;htmlgt;lt;headgt;text I should seelt;/headgt;lt;/htmlgt;; var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi var newStr : String = stringToEdit.replace(pattern, ); trace(newStr); //Desired Output: text I should see //Actual output :-( !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhtmlheadtext I should see/head/html
RE: [flexcoders] Re: Datagrid scrolling woes!
Oops, maybe that was 1.5. I'll check a bit. And all my advice comes with a money-back warranty! Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of parkerwhirlow Sent: Thursday, December 21, 2006 12:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Datagrid scrolling woes! I don't know if you're just trying to be misleading, or mis-typed something, but it doesn't help any if you're passing wrong information. DataGrid (or List for that matter) doesn't have a vPosition property at all. I don't know the answer for sure, but there's a 'scrollPosition' property on dataGrid.verticalScrollBar ... thats the one I'd look at first. good luck. PW --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: For DataGrid, setting vPosition=myrowIndex will scroll the grid to the desired line. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Cameron Ray Sent: Wednesday, December 20, 2006 6:29 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Datagrid scrolling woes! Hello all, I'm trying to accomplish something that is seemingly easybut is driving me bananas due to the fact that it's not working. I want to setup a function that can be called and that function will scroll my datagrid to a specific row within that datagrid. Here's what I've got (that doesn't work)any thoughts? _ public function scrollDG():void { dgUserRequest.editedItemPosition = {columnIndex:0, rowIndex:dgUserRequest.dataProvider.length-1}; } ]] /mx:Script mx:Button label=Scroll click=scrollDG()/ mx:Text text={app.userInfo.firstname}'s Videos/ mx:DataGrid id=dgUserRequest x=22 y=128 dataProvider={app.vidInfo2} width=850 height=700 headerStyleName=headerStyle mx:columns mx:DataGridColumn headerText=Thumbnail dataField=thumb_name itemRenderer=components.dgRenderImage width=104/ mx:DataGridColumn headerText=Video Title dataField=projectname id=title fontWeight=bold paddingLeft=10/ mx:itemRenderer mx:Component mx:VBox verticalAlign=middle mx:Text text={data.projectname}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:DataGridColumn mx:DataGridColumn headerText= dataField=projectid itemRenderer=components.dgEditProject width=120/ mx:DataGridColumn headerText=Last Modified dataField=lastmodified itemRenderer=components.dgLastMod width=150/ mx:DataGridColumn headerText= dataField=projectid itemRenderer=components.dgDeleteProject width=75/ /mx:columns /mx:DataGrid __ Thanks for the help. -Cameron
RE: [flexcoders] Re: Datagrid scrolling woes!
Ok, its verticalScrollPosition in 2.0. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of parkerwhirlow Sent: Thursday, December 21, 2006 12:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Datagrid scrolling woes! I don't know if you're just trying to be misleading, or mis-typed something, but it doesn't help any if you're passing wrong information. DataGrid (or List for that matter) doesn't have a vPosition property at all. I don't know the answer for sure, but there's a 'scrollPosition' property on dataGrid.verticalScrollBar ... thats the one I'd look at first. good luck. PW --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: For DataGrid, setting vPosition=myrowIndex will scroll the grid to the desired line. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Cameron Ray Sent: Wednesday, December 20, 2006 6:29 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Datagrid scrolling woes! Hello all, I'm trying to accomplish something that is seemingly easybut is driving me bananas due to the fact that it's not working. I want to setup a function that can be called and that function will scroll my datagrid to a specific row within that datagrid. Here's what I've got (that doesn't work)any thoughts? _ public function scrollDG():void { dgUserRequest.editedItemPosition = {columnIndex:0, rowIndex:dgUserRequest.dataProvider.length-1}; } ]] /mx:Script mx:Button label=Scroll click=scrollDG()/ mx:Text text={app.userInfo.firstname}'s Videos/ mx:DataGrid id=dgUserRequest x=22 y=128 dataProvider={app.vidInfo2} width=850 height=700 headerStyleName=headerStyle mx:columns mx:DataGridColumn headerText=Thumbnail dataField=thumb_name itemRenderer=components.dgRenderImage width=104/ mx:DataGridColumn headerText=Video Title dataField=projectname id=title fontWeight=bold paddingLeft=10/ mx:itemRenderer mx:Component mx:VBox verticalAlign=middle mx:Text text={data.projectname}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:DataGridColumn mx:DataGridColumn headerText= dataField=projectid itemRenderer=components.dgEditProject width=120/ mx:DataGridColumn headerText=Last Modified dataField=lastmodified itemRenderer=components.dgLastMod width=150/ mx:DataGridColumn headerText= dataField=projectid itemRenderer=components.dgDeleteProject width=75/ /mx:columns /mx:DataGrid __ Thanks for the help. -Cameron
[flexcoders] Re: Cairngorm 2.1 - calling a webservive more than once
Sounds like maybe you're loading the WSDL more than once, probably on each call. loadWSDL() should only be called once. HTH, Ben --- In flexcoders@yahoogroups.com, jamiebadman [EMAIL PROTECTED] wrote: I'm getting some strange behaviour also. The first time I call the WebService, event.result contains the data I'd expect. The second time though, the data is found in event.result.result - is this the same as you're seeing ? Any ideas anyone ?! Also, does anyone have any examples of using the new CairngormMessage feature ? The online docs supplied with 2.1 are so sparse - there's no in-depth explanation of anything and no examples at all. Jamie. --- In flexcoders@yahoogroups.com, Robin Burrer rburrer@ wrote: Hi there, This is driving me mad When I try to call a webservice more than once the webservice object returns an empty object. The result method still gets triggered but the returned data object has no properties... Everything works fine for the first time though. The same service works fine in a Cairngorm 2.0 app. Any ideas? Regards Robin
RE: [flexcoders] Copy Object
I found an example, this was posted by Bjorn Schultheiss. function clone(source:Object):*{ var myBA:ByteArray = new ByteArray(); myBA.writeObject(source); myBA.position = 0; return(myBA.readObject()); } Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Thursday, December 21, 2006 1:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Copy Object Hi all! Is there a way to copy the content of an object into another object without losing the reference of the second one? Thx!
RE: [flexcoders] Copy Object
One of the neatest solutions to this uses byteArray to make a copy. Search the archives here for a full example. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Thursday, December 21, 2006 1:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Copy Object Hi all! Is there a way to copy the content of an object into another object without losing the reference of the second one? Thx!
[flexcoders] Re: Cairngorm 2.1 - calling a webservive more than once
I have a similar issue, when I call webservices more than once whit cairngorm 2.1, that I still haven't solved. Now you have to manually call webService.loadWSDL(), plus there is another weird thing happening that didn't happen with version 2.0. basically it changes the way I'm accessing the results, but not in a consistent way, for example: I'm calling the same webservices twice and in order to get the results I have to change the reference to the return value: when I call my service for the first time I get: soap:Envelope mlns:soap=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd= http://www.w3.org/2001/XMLSchema mlns:xsi= http://www.w3.org/2001/XMLSchema-instance soap:Body CreateTokenResponse xmlns= http://www.xxx.net/schemas/services/sso CreateTokenResult563ee119-802a-47bc-8d37- a5995e576ae6/CreateTokenResult / CreateTokenResponse /soap:Body / soap:Envelope on the command to access the result I use public function result( event:Object ) : void { loginModel.tokenSSO = event.result; executeNextCommand(); } then with executeNextCommand() method (I'm using a sequenceCommand) I call another command that calls the same webservices but this time I assign the result to a different variable. this the return value: soap:Envelope mlns:soap= http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema mlns:xsi=http://www.w3.org/2001/XMLSchema-instance soap:Body CreateTokenResponse xmlns=http://www.xxx.net/schemas/services/sso CreateTokenResult a6628f61-3f20-4dbe-aa23- e34efa3e3796/CreateTokenResult / CreateTokenResponse /soap:Body / soap:Envelope This time in order to access the results I need to do this: public function result( event:Object ) : void { loginModel.tokenApp = event.result.CreateTokenResult; } this happens for other services too, where with cairngorm 2.0 I was able to access the results with event.result now I need to specify the name of the soap tag that contains the result. The real problem here is that this does not apply to all the services but just some. And the weirdest case is the sample that I have explained above where the strategy to access the result of the same service changes depending on when you call it (first time event.result, second time event.result.CreateTokenResult), and I don't see any difference in the soap returned from the service. I decided to have ServiceLocator extending the UIComponent and compiling the new Carngorm.swf (2.1) and everything start working as before. Someone suggest that this could be the result of calling loadWSDL(); more than once so I used this: if( !isWSDLLoaded ) { isWSDLLoaded = true; WebService( service ).loadWSDL(); } but nothing changed
[flexcoders] Re: Copy Object
Thnaks Tracy, but it actually creates a new object into the object that I want to copy to. I need to keep the original reference of this object and then get the contents from other objects a copy them. Greetings. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: I found an example, this was posted by Bjorn Schultheiss. function clone(source:Object):*{ var myBA:ByteArray = new ByteArray(); myBA.writeObject(source); myBA.position = 0; return(myBA.readObject()); } Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Thursday, December 21, 2006 1:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Copy Object Hi all! Is there a way to copy the content of an object into another object without losing the reference of the second one? Thx!
[flexcoders] combobox in itemRenderer header of datagrid, sending events to datagrid... not wanted
Hi it's me again, I have a custom item Renderer for my header of my datagrid with a combo box. When I click on the combo box, the dataGrid is receiving the click event for an item that is highlighted. How do I prevent this from happening? Why does clicking on the combo box trigger an event in the datagrid anyhow? Is where you have to capture the event? How to do this easily please. Thanks, Patrick
[flexcoders] Flex Post with Special Characters
Here is the thing, i have a Flex Application that POST into a PHP Script. Real Simple, the script send a Email with the data from the Flex. My Problem is: What i have to do , in Flex our in PHP Script, so that charters like ç , á , ~ can be send in the Email correctly. At the moment, if the e-mail have characters like ç i receve char like this §. Thanks in Advance, Core
Re: [flexcoders] Re: E4X and nodes without children
trace calls toString() on it's arguments which behaves differently on XML depending on whether it has complex content or not. Complex content returns what you would expect. Simple content does not return the outer tag. If you always want the outer tag use toXMLString(). See the API docs on XML.toString() for complete details. - Dan On 12/21/06, coderjun [EMAIL PROTECTED] wrote: Hello, I was just curious if anyone had an idea as to why trace examples examples 3,4,and 5 for myXML1 and myXML3 in the code snippet from the last post don't return what you'd expect from viewing the xml whereas 3,4,5 for myXML2 does. I think it's a bug in AS3 with e4x expressions and xml nodes without children, but I figured I'd see if anyone in the group would be able to prove otherwise. Main reason this is a concern is because I am trying to programatically select a node in a tree that's driven by an XML file using this functionality of e4x. Thanks in advance, Jun --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, coderjun [EMAIL PROTECTED] wrote: Hello, I have been working on a tree control that's driven by an xml file. What I have be trying to do is to select an item in the tree by first searching the dataProvider, the XML object that represents the xml file. What I have noticed is that the expressions , , and == don't seem to work on attributes in nodes that do not have any children. Remember, this is an xml file for a tree control and I may have items that don't have any children. This to me seems very odd, especially since = and = seem to work just fine... I submitted a bug report on the Adobe site but since they won't respond to a bug submittal I figured I'd post it here to see if anyone had a response or experience with my issue. It's really frustrating since this issue is preventing me from accessing a single node in the xml directly. Below is a code example, as simple as possible, I took the file and the tree control out of the equation. (I also based my XML for the example off of sample code from the Flex help docs.) You'll notice what is broken that you'd think would work is trace examples 3,4,and 5 for myXML1 and myXML3. -Jun ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete() mx:Script ![CDATA[ private var myXML1:XML=order book ISBN=1 titleBaking Extravagant Pastries with Kumquats/title author lastNameContino/lastName firstNameChuck/firstName /author pageCount238/pageCount /book book ISBN=2 / book ISBN=3 titleEmu Care and Breeding/title editor lastNameCase/lastName firstNameJustin/firstName /editor pageCount115/pageCount /book /order; private var myXML2:XML=order book ISBN=1 titleBaking Extravagant Pastries with Kumquats/title author lastNameContino/lastName firstNameChuck/firstName /author pageCount238/pageCount /book book ISBN=3 / book ISBN=2 titleEmu Care and Breeding/title editor lastNameCase/lastName firstNameJustin/firstName /editor pageCount115/pageCount /book /order; private var myXML3:XML=order book ISBN=1 /book book ISBN=2 /book book ISBN=3 /book /order; private function onCreationComplete():void { // Trace out pieces of myXML1 trace(' myXML1 START '); trace('myXML1 EXAMPLE 1: ' + myXML1.book[0]); trace('myXML1 EXAMPLE 2: ' + myXML1.book.(@ISBN = 1 @ISBN = 3)); trace('myXML1 EXAMPLE 3: ' + myXML1.book.(@ISBN 1 @ISBN 3)); trace('myXML1 EXAMPLE 4: ' + myXML1.book.(@ISBN==2)); trace('myXML1 EXAMPLE 5: ' + myXML1..*.(attribute('ISBN')==2)); trace('~~'); // Trace out pieces of myXML2 trace(' myXML2 START '); trace('myXML2 EXAMPLE 1: ' + myXML2.book[0]); trace('myXML2 EXAMPLE 2: ' + myXML2.book.(@ISBN = 1 @ISBN = 3)); trace('myXML2 EXAMPLE 3: ' + myXML2.book.(@ISBN 1 @ISBN 3)); trace('myXML2 EXAMPLE 4: ' + myXML2.book.(@ISBN==2)); trace('myXML2 EXAMPLE 5: ' + myXML2..*.(attribute('ISBN')==2)); trace('~~'); // Trace out pieces of myXML3 trace(' myXML3 START '); trace('myXML3 EXAMPLE 1: ' + myXML3.book[0]); trace('myXML3 EXAMPLE 2: ' + myXML3.book.(@ISBN = 1 @ISBN = 3)); trace('myXML3 EXAMPLE 3: ' + myXML3.book.(@ISBN 1 @ISBN 3)); trace('myXML3 EXAMPLE 4: ' + myXML3.book.(@ISBN==2)); trace('myXML3 EXAMPLE 5: ' + myXML3..*.(attribute('ISBN')==2)); trace('~~'); } ]] /mx:Script /mx:Application
Re: [flexcoders] Flashvars not passing into flex?
!-- In the HTML source add this to the javascript func... -- AC_FL_RunContent( flashvars,'historyUrl=history.htm%3Flconid=' + lc_id + '', flashvars,myFlashVarValue=Hello from the html page, ... !-- In the object embed html source add... -- param name=flashvars value=myFlashVarValue=Hello from the html page/ embed flashvars=myFlashVarValue=Hello from the html page ... !-- In the .mxml app add this inside a script block... -- public var myFlashVarValue:String; private function initApp():void { // Catch FlashVars Here myFlashVarValue = Application.application.parameters.myFlashVarValue; // other init code here } Then make sure you call the initApp() with creationComplete=initApp() in the Application block. NOTE: If you alter your html application page, it will be over written each time you save your app. So save it under another name and test. Jeff --- In flexcoders@yahoogroups.com, Meaglith Ma [EMAIL PROTECTED] wrote: 1. object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354 2. id=fileupload width=200 height=150 3. codebase=http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab; 4. param name=movie value=fileupload.swf / 5. param name=quality value=high / 6. param name=bgcolor value=#869ca7 / 7. param name=allowScriptAccess value=sameDomain / 8. embed src=fileupload.swf quality=high bgcolor=#869ca7 9. width=200 height=150 name=fileupload align=middle 10. play=true 11. loop=false 12. quality=high 13. allowScriptAccess=sameDomain 14. type=application/x-shockwave-flash 15. pluginspage=http://www.adobe.com/go/getflashplayer; 16. /embed 17. /object rumpleminzeflickr wrote: Hi there, i'm adding a flex app into an existing web page. I'm using macromedia dream weaver to link to the .swf, which is all good and the app displays. However the actualy flashvars don't get passed in. Any ideas? Many thanks, Brett script type=text/javascript AC_FL_RunContent ( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/ http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=7,0,19,0','width','500','height','375','src','Flex FileUpload','quality','high','pluginspage','http://www.macromedia.com/ http://www.macromedia.com/ go/getflashplayer','movie','FlexFileUpload' ); //end AC code /scriptnoscriptobject classid=clsid:D27CDB6E-AE6D-11cf-96B8- 44455354 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swfl http://download.macromedia.com/pub/shockwave/cabs/flash/swfl ash.cab#version=7,0,19,0 width=500 height=375 param name=movie value=FlexFileUpload.swf param name=quality value=high param name=FlashVars value=test=true embed src=FlexFileUpload.swf FlashVars=test=true quality=high pluginspage=http://www.macromedia.com/go/getflashplayer http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=500 height=375/embed /object/noscript
[flexcoders] Question on design patterns
I have built several flex applications since its initial release and these apps have been very large and complicated. They usually consist of components within components within components, etc. I am sure everyone else has done the same. I have a couple of questions about design patterns, I think I already know my answer, however I am curious about everyone's opinion. 1) Should I put HTTPServices into components and pass urls to the components (allowing them to handle posting data and handling the result) or 2) Should I put all of my HTTPServices on the application level (i.e. the primary controller) and use data binding and events to communicate with the components. 3) Is there a better way to handle this, especially when your component heirarchy gets deep? Thanks for you input, Ethan
RE: [flexcoders] Question on design patterns
Search the list of the internet for Cairngorm thats the best answer :) Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of farmetha Sent: Thursday, December 21, 2006 1:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question on design patterns I have built several flex applications since its initial release and these apps have been very large and complicated. They usually consist of components within components within components, etc. I am sure everyone else has done the same. I have a couple of questions about design patterns, I think I already know my answer, however I am curious about everyone's opinion. 1) Should I put HTTPServices into components and pass urls to the components (allowing them to handle posting data and handling the result) or 2) Should I put all of my HTTPServices on the application level (i.e. the primary controller) and use data binding and events to communicate with the components. 3) Is there a better way to handle this, especially when your component heirarchy gets deep? Thanks for you input, Ethan -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] Re: RegExp
Parker, Thanks, but that did not do the trick. It still returned the full HTML. yes, you are right though...that first back slash was not needed. Hmm, back to the drawing board I guess. It stinks, I found a regular expression that does what I need but it does not compile in AS3. I'll keep hammering the books and tutorials to try and figure this out. newbies to regex and deadlines don't mix well. --- In flexcoders@yahoogroups.com, parkerwhirlow [EMAIL PROTECTED] wrote: a couple quick things.. I'm by no means an expert at regex... but... the first backslash is unnecessary isn't it? is not a meta character, so the \ after the first / isn't needed. also, don't you want to remove ALL characters between the and ? so I'd change the inner [a-zA-Z0-9]* to .*? (the question mark makes it a lazy quantifier instead of an agressive quantifier) And one last thing, is you may need the multi-line flag also (if the XML has line breaks... so I'd give this a shot... haven't tried it myself though /lt;.*?gt;/gim good luck PW --- In flexcoders@yahoogroups.com, e_baggg e_baggg@ wrote: I am trying to create a regular expression that essentially parses out all the html of a text string. (i.e. - Remove all text between lt; and gt;). I am not the seasoned regex pro, but my attempts have failed based on research within the livedocs: var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi Does anyone see what is wrong? var stringToEdit : String = lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'gt;lt;htmlgt;lt;headgt;text I should seelt;/headgt;lt;/htmlgt;; var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi var newStr : String = stringToEdit.replace(pattern, ); trace(newStr); //Desired Output: text I should see //Actual output :-( !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhtmlheadtext I should see/head/html
[flexcoders] Is this a bug in mx:List?
I was implementing a filter on a list of values and noticed that when I scroll down the list and then try and filter an error is thrown. Here is the error: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::List/::adjustVerticalScrollPositionDownward() at mx.controls::List/mx.controls:List::configureScrollBars() at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::updateDisplayList() at mx.controls::List/mx.controls:List::updateDisplayList() at mx.core::UIComponent/validateDisplayList() at mx.managers::LayoutManager/::validateDisplayList() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() seems to be an indexing problem based at this line list: h = rowInfo[rowCount - 1].y + rowInfo[rowCount - 1].height; (line 789 in my code base) Here is the code I used to generate the result. (This is based on a Ben Forta example. he used a datagrid -- the erro does not occure with datagrid just list.) The code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=initApp() mx:Script ![CDATA[ // On startup public function initApp():void { // Set filter function // Be careful to set filterFunction // only after ArrayCollection has been // populated. myData.filterFunction=processFilter; } // Filter function public function processFilter(item:Object):Boolean { var result:Boolean=false; // If no filter text, or a match, then true if (!item.length || item.indexOf(txtFilter.text) = 0) result=true; return result; } private var theSource:Array = [foo, bar, foobar, flex, adobe, ajax, java, drstrange] ]] /mx:Script !-- Data (use ArrayCollection) -- mx:ArrayCollection id=myData source={theSource} /mx:ArrayCollection !-- UI -- mx:HBox width=100% mx:Label text=Filter:/ mx:TextInput id=txtFilter width=100% change=myData.refresh()/ /mx:HBox mx:List dataProvider={myData} width=100% height=82 /mx:List /mx:Application
Re: [flexcoders] Question on design patterns
Am Donnerstag, 21. Dezember 2006 19:54 schrieb farmetha: I have built several flex applications since its initial release and these apps have been very large and complicated. They usually consist of components within components within components, etc. I am sure everyone else has done the same. I have a couple of questions about design patterns, I think I already know my answer, however I am curious about everyone's opinion. 1) Should I put HTTPServices into components and pass urls to the components (allowing them to handle posting data and handling the result) or 2) Should I put all of my HTTPServices on the application level (i.e. the primary controller) and use data binding and events to communicate with the components. 3) Is there a better way to handle this, especially when your component heirarchy gets deep? You can use multiple controllers and models and group them in a main application. com.example.customers.control.CustomersController com.example.customers.model.CustomersModel com.example.products.control.ProductsController com.example.products.model.ProductsModel com.example.main.Application com.example.main.model.ApplicationModel com.example.main.model.PresentationModel O. -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] DataGrid row focus
How do I make a row in a DataGrid have focus when a screen loads?
RE: [flexcoders] DataGrid row focus
this hightlights the 3rd row: myDataGrid.selectedIndex = 2; Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of eweibust Sent: Thursday, December 21, 2006 3:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid row focus How do I make a row in a DataGrid have focus when a screen loads? -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] Re: E4X and nodes without children
Dan, I'm a bonehead...thanks for keeping me from losing my mind...I've tested with your tips, and all is well now, and I learned something while we were at it. For anyone else who didn't know about how to properly trace XML nodes with simple content, here's the livedoc with the info that Dan was referring to: http://livedocs.macromedia.com/labs/as3preview/docs/wwhelp/wwhimpl/commo\ n/html/wwhelp.htm?context=LiveDocs_Partsfile=0125.html Thanks again! -Jun --- In flexcoders@yahoogroups.com, Daniel Freiman [EMAIL PROTECTED] wrote: trace calls toString() on it's arguments which behaves differently on XML depending on whether it has complex content or not. Complex content returns what you would expect. Simple content does not return the outer tag. If you always want the outer tag use toXMLString(). See the API docs on XML.toString() for complete details. - Dan On 12/21/06, coderjun [EMAIL PROTECTED] wrote: Hello, I was just curious if anyone had an idea as to why trace examples examples 3,4,and 5 for myXML1 and myXML3 in the code snippet from the last post don't return what you'd expect from viewing the xml whereas 3,4,5 for myXML2 does. I think it's a bug in AS3 with e4x expressions and xml nodes without children, but I figured I'd see if anyone in the group would be able to prove otherwise. Main reason this is a concern is because I am trying to programatically select a node in a tree that's driven by an XML file using this functionality of e4x. Thanks in advance, Jun --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, coderjun misc@ wrote: Hello, I have been working on a tree control that's driven by an xml file. What I have be trying to do is to select an item in the tree by first searching the dataProvider, the XML object that represents the xml file. What I have noticed is that the expressions , , and == don't seem to work on attributes in nodes that do not have any children. Remember, this is an xml file for a tree control and I may have items that don't have any children. This to me seems very odd, especially since = and = seem to work just fine... I submitted a bug report on the Adobe site but since they won't respond to a bug submittal I figured I'd post it here to see if anyone had a response or experience with my issue. It's really frustrating since this issue is preventing me from accessing a single node in the xml directly. Below is a code example, as simple as possible, I took the file and the tree control out of the equation. (I also based my XML for the example off of sample code from the Flex help docs.) You'll notice what is broken that you'd think would work is trace examples 3,4,and 5 for myXML1 and myXML3. -Jun ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete() mx:Script ![CDATA[ private var myXML1:XML=order book ISBN=1 titleBaking Extravagant Pastries with Kumquats/title author lastNameContino/lastName firstNameChuck/firstName /author pageCount238/pageCount /book book ISBN=2 / book ISBN=3 titleEmu Care and Breeding/title editor lastNameCase/lastName firstNameJustin/firstName /editor pageCount115/pageCount /book /order; private var myXML2:XML=order book ISBN=1 titleBaking Extravagant Pastries with Kumquats/title author lastNameContino/lastName firstNameChuck/firstName /author pageCount238/pageCount /book book ISBN=3 / book ISBN=2 titleEmu Care and Breeding/title editor lastNameCase/lastName firstNameJustin/firstName /editor pageCount115/pageCount /book /order; private var myXML3:XML=order book ISBN=1 /book book ISBN=2 /book book ISBN=3 /book /order; private function onCreationComplete():void { // Trace out pieces of myXML1 trace(' myXML1 START '); trace('myXML1 EXAMPLE 1: ' + myXML1.book[0]); trace('myXML1 EXAMPLE 2: ' + myXML1.book.(@ISBN = 1 @ISBN = 3)); trace('myXML1 EXAMPLE 3: ' + myXML1.book.(@ISBN 1 @ISBN 3)); trace('myXML1 EXAMPLE 4: ' + myXML1.book.(@ISBN==2)); trace('myXML1 EXAMPLE 5: ' + myXML1..*.(attribute('ISBN')==2)); trace('~~'); // Trace out pieces of myXML2 trace(' myXML2 START '); trace('myXML2 EXAMPLE 1: ' + myXML2.book[0]); trace('myXML2 EXAMPLE 2: ' + myXML2.book.(@ISBN = 1 @ISBN = 3)); trace('myXML2 EXAMPLE 3: ' + myXML2.book.(@ISBN 1 @ISBN 3)); trace('myXML2 EXAMPLE 4: ' + myXML2.book.(@ISBN==2)); trace('myXML2 EXAMPLE 5: ' + myXML2..*.(attribute('ISBN')==2)); trace('~~'); // Trace out pieces of myXML3 trace(' myXML3 START '); trace('myXML3 EXAMPLE 1: ' + myXML3.book[0]);
RE: [flexcoders] Re: RegExp
For regexs, I've found this site to be pretty helpful: http://regexlib.com/default.aspx I can usually find a related expression and then get mine working using what I see there. hth, matt horn flex docs -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of e_baggg Sent: Thursday, December 21, 2006 2:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: RegExp Parker, Thanks, but that did not do the trick. It still returned the full HTML. yes, you are right though...that first back slash was not needed. Hmm, back to the drawing board I guess. It stinks, I found a regular expression that does what I need but it does not compile in AS3. I'll keep hammering the books and tutorials to try and figure this out. newbies to regex and deadlines don't mix well. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , parkerwhirlow [EMAIL PROTECTED] wrote: a couple quick things.. I'm by no means an expert at regex... but... the first backslash is unnecessary isn't it? is not a meta character, so the \ after the first / isn't needed. also, don't you want to remove ALL characters between the and ? so I'd change the inner [a-zA-Z0-9]* to .*? (the question mark makes it a lazy quantifier instead of an agressive quantifier) And one last thing, is you may need the multi-line flag also (if the XML has line breaks... so I'd give this a shot... haven't tried it myself though /lt;.*?gt;/gim good luck PW --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , e_baggg e_baggg@ wrote: I am trying to create a regular expression that essentially parses out all the html of a text string. (i.e. - Remove all text between lt; and gt;). I am not the seasoned regex pro, but my attempts have failed based on research within the livedocs: var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi Does anyone see what is wrong? var stringToEdit : String = lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'gt;lt;htmlgt;lt;headgt;text I should seelt;/headgt;lt;/htmlgt;; var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi var newStr : String = stringToEdit.replace(pattern, ); trace(newStr); //Desired Output: text I should see //Actual output :-( !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhtmlheadtext I should see/head/html
Re: [flexcoders] Question on design patterns
Am Donnerstag, 21. Dezember 2006 20:51 schrieb Dimitrios Gianninas: Search the list of the internet for Cairngorm thats the best answer :) Don't think so. 8) O. -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Canvas zoom / preview / Navigator
Regarding generating the snapshot or thumbnail drawing... Sorry if this isn't incredibly helpful, but I'd start with understanding BitmapData stuff. To do the snapshot I'm guessing you're going to want to capture the BitmapData of the Canvas (and that will include all the components it contains) and then resize and redraw that in your thumbnail component. Maybe this link will help: http://www.cynergysystems.com/blogs/page/andrewtrice?entry=realtime_thumbnails_of_flex_uicomponents here's another one from the same guy's blog: http://www.cynergysystems.com/blogs/page/andrewtrice?entry=flex_2_bitmapdata_tricks_and I'm not entirely sure what happens if you try to get the bitmapData object from a canvas that uses clipping. I'm guessing you'll want to have one inner container component that doesn't clip the content, then you'll want to get the bitmapData of that component, not the outer Canvas. Hopefully bitmapData will return the entire bitmapData of a container, even if not all of that container is visible on the screen. Can anyone confirm this? I'm too lazy to try it out right now. Doug ecpmaz wrote: Thank you for your code, but I do not simply work with pictures but with an entire canvas filled with various components (textinputs, buttons, pictures...etc) Mathieu LEMAIRE
[flexcoders] Re: DataGrid row focus
Thanks Dimitrios, One question. The code you showed works for highlighting a row. But I have some code associated with me hitting Enter when a row is selected. This logic isn't working with the selectedIndex code. I'm still having to manually click the row with my mouse before hitting Enter. What I would like is the screen to load, with a row selected, and the user simply able to hit Enter without using the mouse to select a row first. Erik --- In flexcoders@yahoogroups.com, Dimitrios Gianninas [EMAIL PROTECTED] wrote: this hightlights the 3rd row: myDataGrid.selectedIndex = 2; Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of eweibust Sent: Thursday, December 21, 2006 3:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid row focus How do I make a row in a DataGrid have focus when a screen loads? -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] Simple Video Question
Pls excuse what seems to be a naive question, but how does one go about creating a progress bar when using FMS to stream video with the videoDisplay component? Thanks for any clues... larry larson' nyc
RE: [flexcoders] Re: DataGrid row focus
thats a damn good question... just created a sample app, tried dg.setFocus() and it still doesn't work. Hopefully someone has the answer. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of eweibust Sent: Thursday, December 21, 2006 4:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataGrid row focus Thanks Dimitrios, One question. The code you showed works for highlighting a row. But I have some code associated with me hitting Enter when a row is selected. This logic isn't working with the selectedIndex code. I'm still having to manually click the row with my mouse before hitting Enter. What I would like is the screen to load, with a row selected, and the user simply able to hit Enter without using the mouse to select a row first. Erik --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Dimitrios Gianninas [EMAIL PROTECTED] wrote: this hightlights the 3rd row: myDataGrid.selectedIndex = 2; Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of eweibust Sent: Thursday, December 21, 2006 3:43 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] DataGrid row focus How do I make a row in a DataGrid have focus when a screen loads? -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] Changing the text in each dataGrid row to a different color
Okay I am going to try and be as clear as possible with this, so bare with me. What I am trying to do is make it so that when my arraycollection objects that I have retrieved from a web service are loaded in (by using the dataProvider attribute) my dataGrid that some sort of code will take place changing the color of each line of text (all the objects stored in the array collection are string types) and display each rows text in a different color. Now after looking into it, it seems the only way to alter the color of the text is to use some sort of style or format but it seems it only effects text in a textArea, textField, textInput etc... SOOO I figured why not create a itemRenderer that contains one of those and put it into the dataGrid... Which I did and still can't figure out a way to make it so you can dynamically alter the color based on a set of rbg values stored in a array the same size as the rowCount of the datagrid. so I am rather stumpped in what to do.. I DON'T want to change the background color of each row, so alternatingItemColor is out of the question, I just want the text displayed in each row to be a different color And I want all this color changing to happen either before the data is inputted into the dataGrid (manipulating the arraycollection some how..) or when its all already in there, it all needs to happen in code no user interaction. I was thinking perhaps maybe I could create a item Renderer object that contains the compenent (the textArea in it) and just make a array of item Renderer objects and pass those into the dataGrid, but I don't think that is possible. ANY IDEAS AT ALL!! On how to change the color of the text in each row of the datagrid to a different color would be a HUGE, HUGE!!! help. Or any info on how to setup a datagrid listener that listens for when a object (a row) from the arraycollection is added to the datagrid... Perhaps I could use that info some how to my advantage. email me, if you like I don't care I just need a answer to this its driving me crazy! I can change the background row color based on a array of rgb values but I can't change the color of the item in that row based on array of rgb values, ARG! thanx in advanced.
[flexcoders] Re: RegExp
How about this: var pattern:RegExp = new RegExp((.*?)|(/.*?), g); text = text.replace(pattern, ); Paul --- Paul Whitelock Denver, Colorado -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of e_baggg Sent: Thursday, December 21, 2006 2:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: RegExp Parker, Thanks, but that did not do the trick. It still returned the full HTML. yes, you are right though...that first back slash was not needed. Hmm, back to the drawing board I guess. It stinks, I found a regular expression that does what I need but it does not compile in AS3. I'll keep hammering the books and tutorials to try and figure this out. newbies to regex and deadlines don't mix well. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , parkerwhirlow thunder.stumpges+yahoo@ wrote: a couple quick things.. I'm by no means an expert at regex... but... the first backslash is unnecessary isn't it? is not a meta character, so the \ after the first / isn't needed. also, don't you want to remove ALL characters between the and ? so I'd change the inner [a-zA-Z0-9]* to .*? (the question mark makes it a lazy quantifier instead of an agressive quantifier) And one last thing, is you may need the multi-line flag also (if the XML has line breaks... so I'd give this a shot... haven't tried it myself though /lt;.*?gt;/gim good luck PW --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , e_baggg e_baggg@ wrote: I am trying to create a regular expression that essentially parses out all the html of a text string. (i.e. - Remove all text between lt; and gt;). I am not the seasoned regex pro, but my attempts have failed based on research within the livedocs: var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi Does anyone see what is wrong? var stringToEdit : String = lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'gt;lt;htmlgt;lt;headgt;text I should seelt;/headgt;lt;/htmlgt;; var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi var newStr : String = stringToEdit.replace(pattern, ); trace(newStr); //Desired Output: text I should see //Actual output :-( !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhtmlheadtext I should see/head/html
[flexcoders] hot spot
i want to put a state map into an mxml form. easy enough. but then i want to add hot spotslike in dreamweaver. i have all the graphic formats i could need to do this. if you need an example http://www.pioneertelephonedirectories.com (some arent turned on) if you have any ideas please let me know. the problem i ran in to was that i need a precise size (such as a vector shape) instead of a gif (which saves as a bulky square even with trans background) thanks !!
Re: [flexcoders] Changing the text in each dataGrid row to a different color
The common solution is to add the color or style name to the items of your dataprovider and bind to this property inside your itemrenderer. Cheers, Ralf On 12/21/06, retrogamer4ever [EMAIL PROTECTED] wrote: Okay I am going to try and be as clear as possible with this, so bare with me. What I am trying to do is make it so that when my arraycollection objects that I have retrieved from a web service are loaded in (by using the dataProvider attribute) my dataGrid that some sort of code will take place changing the color of each line of text (all the objects stored in the array collection are string types) and display each rows text in a different color. Now after looking into it, it seems the only way to alter the color of the text is to use some sort of style or format but it seems it only effects text in a textArea, textField, textInput etc... SOOO I figured why not create a itemRenderer that contains one of those and put it into the dataGrid... Which I did and still can't figure out a way to make it so you can dynamically alter the color based on a set of rbg values stored in a array the same size as the rowCount of the datagrid. so I am rather stumpped in what to do.. I DON'T want to change the background color of each row, so alternatingItemColor is out of the question, I just want the text displayed in each row to be a different color And I want all this color changing to happen either before the data is inputted into the dataGrid (manipulating the arraycollection some how..) or when its all already in there, it all needs to happen in code no user interaction. I was thinking perhaps maybe I could create a item Renderer object that contains the compenent (the textArea in it) and just make a array of item Renderer objects and pass those into the dataGrid, but I don't think that is possible. ANY IDEAS AT ALL!! On how to change the color of the text in each row of the datagrid to a different color would be a HUGE, HUGE!!! help. Or any info on how to setup a datagrid listener that listens for when a object (a row) from the arraycollection is added to the datagrid... Perhaps I could use that info some how to my advantage. email me, if you like I don't care I just need a answer to this its driving me crazy! I can change the background row color based on a array of rgb values but I can't change the color of the item in that row based on array of rgb values, ARG! thanx in advanced. -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany
Re: [flexcoders] hot spot
If you give every area a unique color, you could use getPixel to get the pixel value under the mouse cursor. Cheers, Ralf. On 12/22/06, littleazar [EMAIL PROTECTED] wrote: i want to put a state map into an mxml form. easy enough. but then i want to add hot spotslike in dreamweaver. i have all the graphic formats i could need to do this. if you need an example http://www.pioneertelephonedirectories.com (some arent turned on) if you have any ideas please let me know. the problem i ran in to was that i need a precise size (such as a vector shape) instead of a gif (which saves as a bulky square even with trans background) thanks !! -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany
[flexcoders] serve local live video - flex FMS
I am looking to serve two live streams from a set of surveillance cameras onto the web. I have gone through the tutorials and a few samples but I can't seem to get it to work within my app. Anyone know of a simple way to connect to FMS, find the video and just serves it up? Thanks ps. I have searched around everywhere before posting
[flexcoders] masking with a sprite
Hi I am loading swfs from a backend server that are produced by our own renderer. If I simply load these swfs into an image the background colour form the swf floods the whoel stag enad makes it impossible to see anything other than the last one to load. I need to mask the swfs so we just see what we are supposed to. I found an example in the help for the DisplayObject class. It seemed to do everything that I wanted - it used a Sprite, drew a rectangle on it, added it as a child then set it as a mask. However when I try this when the addchild function is called saying that it cannot convert the Sprite to a Display object: Type Coercion failed: cannot convert flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent. What am doing wrong? I hope someone can help. The example I was looking at is: import flash.text.TextField; import flash.display.Sprite; import flash.events.MouseEvent; var tf:TextField = new TextField(); tf.text = Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. tf.selectable = false; tf.wordWrap = true; tf.width = 150; addChild(tf); var square:Sprite = new Sprite(); square.graphics.beginFill(0xFF); square.graphics.drawRect(0, 0, 40, 40); addChild(square); tf.mask = square; tf.addEventListener(MouseEvent.MOUSE_DOWN, drag); tf.addEventListener(MouseEvent.MOUSE_UP, noDrag); function drag(event:MouseEvent):void { square.startDrag(); } function noDrag(event:MouseEvent):void { square.stopDrag(); } Giles Roadnight
[flexcoders] Unable to resolve class for ResourceBundle
Hello list; I am getting the error Unable to resolve class for ResourceBundle in my project every time FlexBuilder does an automatic build, or when I chose Build Project if automatic builds are disabled. The only way to get the build to succeed is to chose Project-Clean. This works every time. I've tried using the compiler option -incremental=false, but it has no effect. I've created a very simple project that illustrates the problem. Localization.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:local=* local:MyCanvas/ /mx:Application MyCanvas.mxml: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=400 height=300 mx:Label text=@Resource( bundle='strings', key='Hello' )/ /mx:Canvas ../locale/en_US/Strings.properties: Hello=Hello World (the locale directory is in the parent directory of the project to avoid the overlapping class-path warning.) In the project's settings I have added a source path that points to the ../locale/en_US directory. To see the problem, do a clean and then make a change in Localization.mxml. Save the file and let FlexBuilder do an automatic build. You should see the unable to resolve class for ResourceBundle: strings_properties error. Any ideas? Thanks. Tobias.
RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once
Hi Dirk, That might be the reason indeed. I had the loadWSDL in my delegate just before I call the method of the webservive. I guess I should be in the Services.mxml. I can't really figure out where to put it though Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Eismann Sent: Thursday, 21 December 2006 6:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once Any change you're calling loadWSDL() more than once on your WebService instance? This could be the reason. Dirk. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robin Burrer Sent: Thursday, December 21, 2006 6:54 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm 2.1 - calling a webservive more than once I switched back to v 2.0 and all works fine now. I don't really have the time to debug this. I'm quite happy with version 2.0 and don't really see a reason to upgrade Thanks for your reply anyway! Robin From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Thursday, 21 December 2006 4:37 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm 2.1 - calling a webservive more than once Add this to your Application mxml file. !-- Logging configured in MXML. -- mx:TraceTarget !-- 2 is represents the LogEventLevel.DEBUG constant. -- mx:level2/mx:level /mx:TraceTarget If you can paste the soap going back and forth to the list it would help to diagnose your problem. You could also grab a program called ServiceCapture to grab the soap messages. http://kevinlangdon.com/serviceCapture/ http://kevinlangdon.com/serviceCapture/ On 12/20/06, Robin Burrer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi there, This is driving me mad When I try to call a webservice more than once the webservice object returns an empty object. The result method still gets triggered but the returned data object has no properties... Everything works fine for the first time though. The same service works fine in a Cairngorm 2.0 app. Any ideas? Regards Robin
RE: [flexcoders] Re: Copy Object
Then I am not following what you want at all. Can you explain further? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Thursday, December 21, 2006 1:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Copy Object Thnaks Tracy, but it actually creates a new object into the object that I want to copy to. I need to keep the original reference of this object and then get the contents from other objects a copy them. Greetings. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: I found an example, this was posted by Bjorn Schultheiss. function clone(source:Object):*{ var myBA:ByteArray = new ByteArray(); myBA.writeObject(source); myBA.position = 0; return(myBA.readObject()); } Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Daniel Sent: Thursday, December 21, 2006 1:14 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Copy Object Hi all! Is there a way to copy the content of an object into another object without losing the reference of the second one? Thx!
[flexcoders] DataService commit() doesn't finish.
Hi guys, I have some functionality that used to work that isn't working anymore... using FDMS and HibernateAssembler. From Flex, I've made one single change and used DataService.commit(), and added a responder to the AsyncToken. On the server, I can trace through the HibernateAssembler.updateItem() and everything goes fine. The commit code doesn't get called though because Transactions are true, and the syncSession is used. There is some server trace of an AcknowledgeMessage getting sent, but the responder never gets called, and if I refresh the flex client, the values are not saved. Please see the log trace below, and let me know if I missed anything. thanks, PW 12/21 15:49:55 user [Flex] 15:49:55.658 [DEBUG] [Message.Data.transacted] Before invoke service: data-service incomingMessage: Flex Message (flex.data.messages.DataMessage) operation = transacted id = null clientId = 37BE2173-400E-D4C7-CBC3-2943A841449A correlationId = destination = Model messageId = F4DE4EEE-9D72-806C-A4DB-A76BC6F02C11 timestamp = 1166744995648 timeToLive = 0 body = [ Flex Message (flex.data.messages.DataMessage) operation = update id = ASObject(32376284){id=1163778853188464256078} clientId = CCD745B5-3C9E-C584-4ED4-A7666B51EEF4 correlationId = F4DE4EEE-9D72-806C-A4DB-A76BC6F02C11 destination = Application messageId = 8577BADB-417B-D762-5E92-A76B983BAA25 timestamp = 0 timeToLive = 0 body = [ [ selecteddisplay ], [EMAIL PROTECTED], [EMAIL PROTECTED] ] hdr(newReferencedIds) = {displays= [ {id=1156440527883820192695}, {id=1164384322718557235986}, {id=1164388051550092880785}, {id=1164467025953663641911}, {id=1164467032523719875336}, {id=1164467037039304665983} ]} hdr(prevReferencedIds) = {displays= [ {id=1156440527883820192695}, {id=1164384322718557235986}, {id=1164388051550092880785}, {id=1164467025953663641911}, {id=1164467032523719875336}, {id=1164467037039304665983} ]} ] hdr(DSEndpoint) = my-rtmp 12/21 15:49:55 user [Flex] 15:49:55.819 [DEBUG] [DataService.Transaction] Started transaction using jndi name: java:comp/UserTransaction 12/21 15:49:55 user [Flex] 15:49:55.949 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1156440527883820192695 - [EMAIL PROTECTED] 12/21 15:50:06 user [Flex] 15:50:06.864 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164384322718557235986 - [EMAIL PROTECTED] 12/21 15:50:11 user [Flex] 15:50:11.261 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164388051550092880785 - [EMAIL PROTECTED] 12/21 15:50:15 user [Flex] 15:50:15.707 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164467025953663641911 - [EMAIL PROTECTED] 12/21 15:50:19 user [Flex] 15:50:19.753 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164467032523719875336 - [EMAIL PROTECTED] 12/21 15:50:23 user [Flex] 15:50:23.789 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164467037039304665983 - [EMAIL PROTECTED] 12/21 15:50:27 user [Flex] 15:50:27.684 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1156440527883820192695 - [EMAIL PROTECTED] 12/21 15:50:27 user [Flex] 15:50:27.784 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164384322718557235986 - [EMAIL PROTECTED] 12/21 15:50:27 user [Flex] 15:50:27.805 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164388051550092880785 - [EMAIL PROTECTED] 12/21 15:50:27 user [Flex] 15:50:27.825 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164467025953663641911 - [EMAIL PROTECTED] 12/21 15:50:27 user [Flex] 15:50:27.845 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164467032523719875336 - [EMAIL PROTECTED] 12/21 15:50:27 user [Flex] 15:50:27.855 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1164467037039304665983 - [EMAIL PROTECTED] 12/21 15:50:43 user [Flex] 15:50:43.577 [DEBUG] [DataService.Hibernate] Get object from hibernate with id=1163778853188464256078 - [EMAIL PROTECTED] 8634a 12/21 15:52:31 debug Pool skimmer cleaning objects from the pool that have exceeded their allotted lifespan, has 1 pooled objects to evaluate 12/21 15:56:28 debug MM GC collected 0 messages, 0 remaining. 12/21 15:56:28 debug DMGC collected 0 caches, 0 remaining. 12/21 15:56:28 debug DMGC collected 0 destinations, 4 remaining. 12/21 15:58:27 user [Flex] 15:58:27.604 [DEBUG] [Message.Data.transacted] After invoke service: data-service reply: Flex Message
[flexcoders] flex java connectivity
Hi all, I am trying to deploy my ear file with flex/ enabled . I am trying to call the Java services from flex apps, but some how it is failing throwing up the following trace: [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at mx.messaging::ChannelSet/::faultPendingSends() at mx.messaging::ChannelSet/channelFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging::Channel/mx.messaging:Channel::connectFailed() at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed() at mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::statusHandler() I have spent more than a day on this but still unsucessful..:( PS: I am new to flex. Can some one know any ways to resolve this. Most of the forums say to configure ur context root service-config.xml in the flex-config.xml. I have done that , but still i get this error ..? Thanks, Santosh. Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
RE: [flexcoders] Re: Copy Object
So you don't really want a copy, you want to put the property values from another object in to the current one. Is that right? Are you trying to be generic? Can't you just read the values from the other and set them in the first? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, December 21, 2006 8:26 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Copy Object Then I am not following what you want at all. Can you explain further? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Thursday, December 21, 2006 1:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Copy Object Thnaks Tracy, but it actually creates a new object into the object that I want to copy to. I need to keep the original reference of this object and then get the contents from other objects a copy them. Greetings. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: I found an example, this was posted by Bjorn Schultheiss. function clone(source:Object):*{ var myBA:ByteArray = new ByteArray(); myBA.writeObject(source); myBA.position = 0; return(myBA.readObject()); } Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Daniel Sent: Thursday, December 21, 2006 1:14 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Copy Object Hi all! Is there a way to copy the content of an object into another object without losing the reference of the second one? Thx!
[flexcoders] Re: FDS: Using Hibernate second-level cache possible?
Jeff, Niko I don't know exactly your problem, but I DO know where two session factories could come from =) I was stepping through all the HibernateManager code just today and see the following in the HibernateManager.createSessionFactory... (it creates one session factory for general purpose stuff, then another for sync or updates/inserts Hope this might help. PW _ sessionFactory = hibernateConfig.buildSessionFactory(); if (useTransactions) { // If the DataService is managing transactions, then we need to change the context of the Hibernate // session such that the DataService's management of the transaction will handle commiting and closing // the session -- this is only needed on sync methods, not on get, fill or count methods hibernateConfig.setProperty(hibernate.current_session_context_class, flex.data.adapters.FlexHibernateSessionContext); //hibernateConfig.setProperty(hibernate.transaction.factory_class, org.hibernate.transaction.JTATransactionFactory); //hibernateConfig.setProperty(jta.UserTransaction, TransactionUtility.USER_TX_JNDI_NAME); syncSessionFactory = hibernateConfig.buildSessionFactory(); } --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: I think the important part of the error is here: ... 41 more Caused by: net.sf.ehcache.CacheException: Cannot parseConfiguration CacheManager. Attempt to create a new instance of CacheManager using the diskStorePath /tmp/cache which is already used by an existing CacheManager. The source of the configuration was classpath. at net.sf.ehcache.CacheManager.configure(CacheManager.java:248) at net.sf.ehcache.CacheManager.init(CacheManager.java:193) at net.sf.ehcache.CacheManager.init(CacheManager.java:180) at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124) It seems like there are two session factories being started up which are configured to use the same cache. This could be because you have two web apps on the same machine each using hibernate. I don't think that flex would be trying to create two SessionFactories unless you were using more than one hibernate configuration file. Flex should share one session factory from all destinations which use the same hibernate configuration file. There must be some way to set the path name of the cache... maybe you just need to specify a different path name for this cache for the FDMS version of hibernate? Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Niko Schmuck Sent: Wednesday, December 06, 2006 8:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS: Using Hibernate second-level cache possible? Hi together, As a newbie I would like to get your advices on how to use the Hibernate caching for Flex Data Management Services. Is this possible at all or a contra-diction to the HibernateAssembler? For my java applications I currently use second-level caching to speed up data access with Hibernate (3.2), which I would also like to use for my Flex app: For this I use in the Hibernate mapping definition (inside the class element): cache usage=read-write/ Unfortunately if I turn EhCache on (via the hibernate configuration) ... property name=cache.provider_classorg.hibernate.cache.EhCacheProvider/propert y ... the tomcat logs show an ugly stack-trace: CacheException: Attempt to restart an already started EhCacheProvider. See below for the exception in its full-length beauty. The only way to overcome this, to avoid caching at all by setting: property name=cache.provider_classorg.hibernate.cache.NoCacheProvider/propert y (Also using the recommended SingletonEhCacheProvider does not help) Any help much appreciated. Thanks, Niko 2006-12-05 08:57:08,737 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/useradmi n] - Servlet /useradmin threw load() exception java.lang.ExceptionInInitializerError at flex.data.assemblers.HibernateManager.createSessionFactory(HibernateMana ger.java:66) at flex.data.assemblers.HibernateManager.init(HibernateManager.java:44) at flex.data.assemblers.HibernateAssembler.initialize(HibernateAssembler.ja va:137) at flex.messaging.factories.JavaFactory$JavaFactoryInstance.createInstance( JavaFactory.java:254) at flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.j ava:93) at flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination. java:76) at flex.data.adapters.JavaAdapter.server(JavaAdapter.java:158) at flex.data.adapters.JavaAdapter.setSettings(JavaAdapter.java:119) at flex.messaging.Destination.createAdapter(Destination.java:279) at flex.messaging.Destination.initDestination(Destination.java:103) at
Re: [flexcoders] Re: SEO Compatibility
One of the open source solutions I occasionaly use *cough* *cough* *drupal* *cough* has a mod redirect / mod rewrite htaccess file (i'm combining words). Any url that is entered into the site gets rewritten or redirected. It is a dynamic system that allows you to dynamically redirect to the content you want without hard coding paths or directories. So you would create a dynamic page (doesn't really exist - only in the database) and then an alias to reach it. For example, www.test.com/myalias. Actually a lot of systems use this (wordpress, etc). All urls entered in to the site would be redirected to index.php. At this point you could with the super awesome power of server side code, deliver page links dynamically and content dynamically. I recently did a project with FXT and did exactly that. You pass the data as an xml model into a script tag under the body tag. Search engines pick this up. My Flex app pulled this xml in and then used it as a dataprovider for numerous controls. I've asked in the wish list for Macromedia at the time before it was Adobe to let us specify the type of extension for the published html wrapper. Right now if you click publish or run it creates a HTML page. So somewhere in the options it would be nice to choose the page extension type (php, asp, jsp, etc) of the page we are publishing. I've also investigated and requested a way to pick my template page that Flex finds and then replaces the tokens which it is looking for inside of it. This may all be possible already. I've been mostly only learning the API, mostly. Now that I've had a chance to think about it a default Adobe Page and Link Management admin site might be the solution. It would be created and deployed to bin or bin-admin with every project. Then you would upload that to the server along with the contents of your bin directory. A developer could login to it on the server. The Adobe Page Manager would use an xml file or database to create the aliases. The alias would be for different states in a Flex app. When you create an alias there would be a place where you could call the services or page associated with that state and alias. It would then wrap that content in a xml tag like in FXT for indexing. You could also pass any links back to the page. The content and links would be in the noscript / script / area of the page and not be visible to the user but it would be visible to the search bots. Because it uses a single page index.php and .htaccess mod rewrite it would redirect all traffic to the single index page (php, asp, java). That page would take that url alias, search the xml file or database and serve up the appropriate content (in the background hidden to users). I hope that makes sense. It would manage aliases, content for that alias, links for the alias and state to pass to the embedded flash swf. I can actually imagine how it would work. On 12/21/06, Kevin Newman [EMAIL PROTECTED] wrote: I guess it isn't as large a problem as maybe I've been suggesting, after having talked about it in this thread. My whole problem is that I don't like urls that look like this: http//domain.com/some/path/#other/path - which in all the examples, is what you could end up with, if you try to combine a regular indexable set of html files (or a server side app or whatever), with an self updating deep link solution that uses the hash portion of the url (like all current flash based deep link systems do). At the end of the day the problem is largely cosmetic I suppose, but it's still a problem I'd like to find a solution for. :-) The optimal solution, imo, would be some way to have the pages get indexed by search engines, then kick you into the app, at the app level, rather than shoe horning the app in at the index level. Kevin N. hank williams wrote: Either way, it's reconciling the two urltypes that's the crux of the problem as I see it. Kevin, You keep saying this, and maybe I am missing the big picture here, but I am not clear why it is necessary to reconcile these two url types, or how they relate to each other at all. It seems to me you can use them both, they exist for different purposes and there is no problem. You seem to think that that is not right, and below categorize it as so large a problem. What am I not understanding? Regards, Hank -- 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] Indeterminate progress bar
When I set a progress bar to be indeterminate, it doesn't animate in polled mode or even in event mode. Is there a way to get it to animate other than calling setProgress directly? Cheers, Lach
[flexcoders] What is this error - Array and Array cannot be reconciled - ?
Hi I am getting this error : VerifyError: Error #1068: Array and Array cannot be reconciled. I am not getting why? I have created a popup, which contains components like colorpicker, textarea etc. and I am passing the seected values when user presses save button. I am storing these values in a dictionary where key is the component name and firing a custom event and passing the whole dictionary. I am also passing an array which is one of the value in the dictionary. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[flexcoders] Re: RegExp
Paul, Thank you! That worked great. --- In flexcoders@yahoogroups.com, Paul Whitelock [EMAIL PROTECTED] wrote: How about this: var pattern:RegExp = new RegExp((.*?)|(/.*?), g); text = text.replace(pattern, ); Paul --- Paul Whitelock Denver, Colorado -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of e_baggg Sent: Thursday, December 21, 2006 2:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: RegExp Parker, Thanks, but that did not do the trick. It still returned the full HTML. yes, you are right though...that first back slash was not needed. Hmm, back to the drawing board I guess. It stinks, I found a regular expression that does what I need but it does not compile in AS3. I'll keep hammering the books and tutorials to try and figure this out. newbies to regex and deadlines don't mix well. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , parkerwhirlow thunder.stumpges+yahoo@ wrote: a couple quick things.. I'm by no means an expert at regex... but... the first backslash is unnecessary isn't it? is not a meta character, so the \ after the first / isn't needed. also, don't you want to remove ALL characters between the and ? so I'd change the inner [a-zA-Z0-9]* to .*? (the question mark makes it a lazy quantifier instead of an agressive quantifier) And one last thing, is you may need the multi-line flag also (if the XML has line breaks... so I'd give this a shot... haven't tried it myself though /lt;.*?gt;/gim good luck PW --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , e_baggg e_baggg@ wrote: I am trying to create a regular expression that essentially parses out all the html of a text string. (i.e. - Remove all text between lt; and gt;). I am not the seasoned regex pro, but my attempts have failed based on research within the livedocs: var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi Does anyone see what is wrong? var stringToEdit : String = lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'gt;lt;htmlgt;lt;headgt;text I should seelt;/headgt;lt;/htmlgt;; var pattern : RegExp = /\lt;[a-zA-Z0-9]*gt;/gi var newStr : String = stringToEdit.replace(pattern, ); trace(newStr); //Desired Output: text I should see //Actual output :-( !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhtmlheadtext I should see/head/html
Re: [flexcoders] Unable to resolve class for ResourceBundle
Tobias, TechNote at www.adobe.com/go/4a146409 identifies Project-Clean as the solution for bug 174788 (last bug on that TechNote's list). Here is the text: - *174788:* Incremental compiling shows error after updating a resource bundle properties file, for example, Error: Unable to resolve a class for ResourceBundle: TestResources_properties In Flex Builder, clean the project in order to remove the error. Has anyone else who has experienced this found any solution other than repeatedly executing Project-Clean? I have one project that I have had this problem on and it is s annoying. Can anyone from Adobe confirm if the next dot release of FB2 might have bug 174788 fixed? Tobias, sorry I can not currently offer anything more than you already know. hth, g On 12/21/06, tobiaspatton [EMAIL PROTECTED] wrote: Hello list; I am getting the error Unable to resolve class for ResourceBundle in my project every time FlexBuilder does an automatic build, or when I chose Build Project if automatic builds are disabled. The only way to get the build to succeed is to chose Project-Clean. This works every time. ...
[flexcoders] Re: Canvas zoom / preview / Navigator
Yes that is exactly what I needed ! I will come back to you when I will have solved that clipping issue. For the zoom feature, I just found a property of the Canvas : scaleX, scaleY... looks pretty much what I was looking for ! Mathieu LEMAIRE