[flexcoders] Re: HELP! - Can not access Web Service!
Hi, In FP 9 and up you have to explicitly allow SOAP headers in your crossdomain policy file: allow-http-request-headers-from domain=* headers=SOAPAction/ /Johan --- In flexcoders@yahoogroups.com, Craig cra...@... wrote: I get error below if webservice asmx and URL of domain do not match... they both have to have http://www or no 'www' in order to run... otherwise I get the following error below BUT my cross domain is at the root of the webserver!! what am I doing wrong???: [RPC Fault faultString=Security error accessing url faultCode=Channel.Security.Error faultDetail=Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://www.velocitytrading.net/VTOrdEnt.asmx?WSDL)] at mx.rpc.wsdl::WSDLLoader/faultHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at DirectHTTPMessageResponder/securityErrorHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() CROSS DOMAIN ?xml version=1.0? !DOCTYPE cross-domain-policy SYSTEM http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd; cross-domain-policy allow-access-from domain=http://velocitytrading.net/ allow-access-from domain=http://www.velocitytrading.net/ allow-access-from domain=*.*/ /cross-domain-policy
[flexcoders] Re: Parent State.setProp on child breaks after certain depth
Just found creationPolicy :-) --- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote: This code is the TourDeFlex State example expanded. There is a ViewStack1 with 2 panes, the second pane has ViewStack2 on it with 2 panes. Added to the Register state !-- Set properties of ViewStack1 to Pane 2 -- mx:SetProperty target={viewstack1} name=selectedIndex value=1/ !-- Set properties of ViewStack2 to Pane 2 -- mx:SetProperty target={viewstack2} name=selectedIndex value=1/ wants to change to ViewStack1:pane2 where ViewStack2 exists, and then ViewStack2:pane2. ViewStack has a createCompleteHandler with message. The Need To Register? button makes the State change. The Property selectedIndex not found on StateTest and there is no default value error is thrown because apparently Flex has has not instantiated ViewStack2 at the moment the parent State change wants to manipulate a property of this child - the creationComplete message appears _after_ the state change is attempted. This means that State changes cannot be used to configure gui components that are on different event bubbling chains - which I was experimenting with. Curious to know if there is a way to make this work? Going to try the excellent suggestion of using a set method bound to the model locator variable that the commands manipulate, but wondered about the above. Not sure how code turns out when pasted in. Thanks, Mic ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical verticalAlign=middle horizontalAlign=center backgroundGradientColors=[0x00,0x323232] viewSourceURL=srcview/index.html !-- The Application class states property defines the view states.-- mx:states mx:State name=Register !-- Add a TextInput control to the form. -- mx:AddChild relativeTo={loginForm} position=lastChild mx:FormItem id=confirm label=Confirm: mx:TextInput/ /mx:FormItem /mx:AddChild !-- Set properties on the Panel container and Button control.-- mx:SetProperty target={loginPanel} name=title value=Register/ mx:SetProperty target={loginButton} name=label value=Register/ !-- Set properties of ViewStack1 to Pane 2 -- mx:SetProperty target={viewstack1} name=selectedIndex value=1/ !-- Set properties of ViewStack2 to Pane 2 -- mx:SetProperty target={viewstack2} name=selectedIndex value=1/ !-- Remove the existing LinkButton control.-- mx:RemoveChild target={registerLink}/ !-- Add a new LinkButton control to change view state back to the login form.-- mx:AddChild relativeTo={spacer1} position=before mx:LinkButton label=Return to Login click=currentState=''/ /mx:AddChild /mx:State /mx:states mx:Script ![CDATA[ import mx.controls.Alert; private function onCreationComplete():void{ mx.controls.Alert.show(CreationComplete from ViewStack2); } ]] /mx:Script mx:Panel id=loginPanel title=Login color=0xff borderAlpha=0.15 horizontalScrollPolicy=off verticalScrollPolicy=off width=50% height=50% mx:VBox width=100% height=100% borderStyle=solid borderThickness=2 borderColor=#F6E808 backgroundColor=#B7B1B1 mx:VBox width=100% height=100% borderStyle=solid borderThickness=2 borderColor=#F70606 mx:ViewStack id=viewstack1 width=100% height=100% mx:Canvas id=canvas1_1 label=View 1 width=100% height=100% borderStyle=solid borderThickness=2 borderColor=#2509F9 mx:Text y=0 text=ViewStack1:Panel1 width=100% height=50%/ /mx:Canvas mx:VBox id=vbox1_2 mx:Text y=0 text=ViewStack1:Panel2 width=100% height=10%/ mx:ViewStack id=viewstack2 creationComplete=onCreationComplete() width=100% height=100% borderStyle=solid borderThickness=3 borderColor=#C50BFA mx:Canvas mx:Text y=0 text=ViewStack2:Panel1 width=100% height=50%/ /mx:Canvas
[flexcoders] BlazeDS Stack traces
Hey guys, Is there any way to get a stack trace from BlazeDS when things go wrong? I have this in services-config: logging target class=flex.messaging.log.ConsoleTarget level=All properties prefix[BlazeDS] /prefix includeDatefalse/includeDate includeTimefalse/includeTime includeLevelfalse/includeLevel includeCategoryfalse/includeCategory /properties filters patternEndpoint.*/pattern patternService.*/pattern patternConfiguration/pattern /filters /target /logging I get lots of debug info telling me about the java.lang.NullPointerException response that's being built, but no stack trace is anywhere to be seen :( Cheers, -Josh -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Josh 'G-Funk' McDonald - j...@joshmcdonald.info - http://twitter.com/sophistifunk - http://flex.joshmcdonald.info/
[flexcoders] cropping image under mask
I am trying to crop image in different different shape, for this , I am trying to use the technique of masking here is what i am trying to do : function drawBMP(): void { var bd:BitmapData = new BitmapData(maskedImage.width, maskedImage.height, true, 0); bd.draw(maskedImage); target.source = new Bitmap(bd); } mx:Image alpha=.3 source=small.jpg mx:filters flash.filters:BlurFilter blurX=20 blurY=20/ /mx:filters /mx:Image mx:Image id=maskedImage mask={topMask} source=small.jpg /mx:Image !--the image mask-- mx:HBox id=topMask height=100 width=100 borderStyle=solid backgroundColor=#ff/ mx:Button click=drawBMP() x=1260 y=184/ It works when we set x, y of the images to 0,0... it gets screwed up when u increase the x and y of the image.. its because of masking.. can any body please suggest me the solution
Re: [flexcoders] cropping image under mask
- Original Message - From: Mayur Bais To: flexcoders@yahoogroups.com Sent: Monday, February 23, 2009 10:23 AM Subject: [flexcoders] cropping image under mask I am trying to crop image in different different shape, for this , I am trying to use the technique of masking snip It works when we set x, y of the images to 0,0... it gets screwed up when u increase the x and y of the image.. its because of masking.. can any body please suggest me the solution You don't say what it gets screwed up means. Assuming it means we can't see the image anymore then that's because you've moved the image outside of the area that the mask allows to be showed. Put mask and image in a container and move the container, not the image. Paul
[flexcoders] Using an Alert when handling another event?
I'm using a SuperTabNavigator control from the flexlib package. When the user clicks on the close button for a tab it fires the tabClose event. I have specified a handler for this in the mxml for the SuperTabNavigator component: tabClose=confirmTabDelete(event); In the confirmTabDelete function I would like to pop up an Alert with YES | NO buttons. According to the SuperTabNavigator docs I can cancel the delete action by calling event.preventDefault() within the confirmTabDelete function. My problem is that the Alert box uses its own handler function for the YES/NO button clicks. I'm not sure how that handler function can reference the event object to call preventDefault(). private function confirmTabDelete(event:SuperTabEvent):void { Alert.show(Are you sure you want to delete this tab?, Confirm delete, Alert.YES | Alert.NO, this, alertListener, null, Alert.NO); } private function alertListener(eventObj:CloseEvent):void { if (eventObj.detail==Alert.NO) { //Now what? How to call preventDefault() on the event object in confirmTabDelete? } } Is the secret in the this which is being used as the parent for the Alert? Any help would be great. }
[flexcoders] combo box help
hi this is praneeth here! when i select one item in combo box it should interact with data base and get the the data so that it should generate dynamic tree in new states .This is my requirement So plz help me out in solving bzc iam new in flex Thankyou.
[flexcoders] Re: parse SOAP response for values
Tracey - thanks for the help. got it with this private function getRBValueByAttribute(attributeName:String):String { var soapNS:Namespace = dataXML.namespace(SOAP-ENV); var typNS:Namespace = dataXML.namespace(typ); var body:XMLList = dataXML.soapNS::Body; return body..typNS::entity.typNS::attribute.(@id == attributeName).children()[0]; } cheers flexcoder you did it again :-) martin --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Unless your xml is very simple, you should not guess at the e4x expession, but rather work your way to the node you want by using temporary variables and tracing the results as you go. To do this you must use a resultHandler, and do not use lastResult. Start with something like: private function handleResult(event:ResultEvent):void var xmlResult:XML = XML(event.result) trace(xmlResult.toXMLString()); //CRITICAL step, verify your structure Then get the next node in the path you want, trace again, etc. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of m_ollman Sent: Wednesday, February 18, 2009 4:23 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: parse SOAP response for values Tracy :-) Thought about the namespace issue - some examples where talking about the SOAP Header being removed automatically, I was'nt seeing that. The reult format is E4X. However I could not get into the structure using childNode etc. So I would start by defining the namespace it. SOAP-ENV... typ=http://ruleburst.com/ruleserver/9.1/rulebase/types http://ruleburst.com/ruleserver/9.1/rulebase/types in AS public var typ:Namespace = new Namespace(http://ruleburst.com/ruleserver/9.1/rulebase/types http://ruleburst.com/ruleserver/9.1/rulebase/types ); Next step I'm not sure about the path to the attribute. WS.Assess.lastResult.typ::session-data.global.global_1.abc570. WS.Assess.lastResult.typ::assess-response.session-data.list-entity.entit y.abc570 Will test in the morning when back at desk. Rushed out so fast I left my USB! doh Cheers martin --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: One big hassle with SOAP is the namespaces. Once you get that straight, you can use normal e4x expressions on it. Where are you having difficulty? Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of m_ollman Sent: Wednesday, February 18, 2009 12:38 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] parse SOAP response for values I have been looking around for a few hours - Flex Cookbook has some info about mapping types. But no real method of getting into the structure. I need to grab the value of an attribute - abc570, which will be EOPO + 4 other attributes. SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/ xmlns:typ=http://ruleburst.com/ruleserver/9.1/rulebase/types http://ruleburst.com/ruleserver/9.1/rulebase/types http://ruleburst.com/ruleserver/9.1/rulebase/types http://ruleburst.com/ruleserver/9.1/rulebase/types SOAP-ENV:Header/ SOAP-ENV:Body typ:assess-response typ:session-data typ:list-entity entity-type=global typ:entity id=global_1 typ:attribute id=abc570 inferencing-type=intermediate type=text typ:text-valEOPO/typ:text-val /typ:attribute ** ETC - 4 more vales ** /typ:entity /typ:list-entity /typ:session-data /typ:assess-response /SOAP-ENV:Body /SOAP-ENV:Envelope Handler is private function RBcompleteHandler(event:Event) : void { var dataXML:XML = XML(event.target.data); } any help much appreciated rgds martin
[flexcoders] Re: Grid with header sections spanning the whole grid
Something like this? ?xml version=1.0? !-- dpcontrols/adg/ColumnGroupADG2NestedGroups.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup; import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn; private function addADG():void { var adg:AdvancedDataGrid = new AdvancedDataGrid; var column1:AdvancedDataGridColumn = new AdvancedDataGridColumn var column2:AdvancedDataGridColumn = new AdvancedDataGridColumn var column3:AdvancedDataGridColumn = new AdvancedDataGridColumn var column4:AdvancedDataGridColumn = new AdvancedDataGridColumn var column5:AdvancedDataGridColumn = new AdvancedDataGridColumn var group1:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup var group2:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup var group3:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup group1.children = [column2,column3] group2.children = [column4,column5] group3.children = [group1,group2] adg.groupedColumns = [column1,group3] this.addChild(adg) } ]] /mx:Script mx:AdvancedDataGrid id=myADG width=100% mx:groupedColumns mx:AdvancedDataGridColumn/ mx:AdvancedDataGridColumnGroup mx:AdvancedDataGridColumnGroup mx:AdvancedDataGridColumn/ mx:AdvancedDataGridColumn/ /mx:AdvancedDataGridColumnGroup mx:AdvancedDataGridColumnGroup mx:AdvancedDataGridColumn/ mx:AdvancedDataGridColumn/ /mx:AdvancedDataGridColumnGroup /mx:AdvancedDataGridColumnGroup /mx:groupedColumns /mx:AdvancedDataGrid mx:Button label=add with as click=addADG()/ /mx:Application also, if you haven't, check out lockedColumnCount and sortExpertMode
[flexcoders] How to display chart legend when using custom ItemRenderer
Hey all, I'm using a custom ItemRenderer for my Column Chart found here: http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=2postId=2021 Everything is working great except the Legend is transparent for each series using the ItemRenderer. Anyone know how to fix or have any ideas? Thanks!
[flexcoders] Re: Feedback and ideas re: publishing a collection of poems
Wow, first If a different computer on the web could use a different font you don t have to worry about that, font s are embeded into the app, not accessed on the user side. mx:TextArea text={'this'+ '\n' +'is'+ '\n' +'a'+ '\n' +'test'} width=100% height=100/ \n = new line OR mx:TextArea width=100% height=100% selectable=false editable=false mx:htmlText ![CDATA[ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ ]] /mx:htmlText /mx:TextArea br/ = break text scrolling automatically, but with controls added for the person reading the poem - like what ? play scroll pause scroll stop scroll ?
[flexcoders] Display legend color when using custom ColumnSeries ItemRenderer
I've followed a tutorial found here: http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=2postId=2021 to create a custom ItemRenderer for my ColumnChart. Everything is working great except the legend won't pick up the color used in my custom item renderer, instead the legend is transparent. Is there another class I need to implement? Any ideas would be appreciated, thanks!
[flexcoders] Re: Detaching RichTextArea controls
well, the rte is actually a panel +textarea + controlbar + toolbar when clicking one of the buttons a function get's called PRIVATE function setTextStyles(type:String, value:Object = null):void this function check's if there is a current selection on the textarea if not set's the style if there is it set's the style only for the selection var tf:TextFormat; var beginIndex:int = textArea.getTextField().selectionBeginIndex; var endIndex:int = textArea.getTextField().selectionEndIndex; if (beginIndex == endIndex) { tf = previousTextFormat; } else tf = new TextFormat(); etc textArea.getTextField().setTextFormat(tf,beginIndex,endIndex); textArea.invalidateDisplayList(); textArea.validateDisplayList(); so, extending this one would be a pain. I vote for make your own from scratch just get the control bar and for the click events make your own function that changes the textarea that has focus I'm not saying this is the best approach(it's just what I would do).
[flexcoders] Re: Accordion question - height minus header space
child's height or width can be specified percent wise width=100% myComponent.percentWidth = 100; but if you have to you have to http://livedocs.adobe.com/flex/3/langref/mx/containers/Accordion.html quote : headerHeight=depends on header font styles = Number(myAccordion.getStyle('headerHeight'))
[flexcoders] Re: Using Modules and Remote Objects
I have used many other technologies, but am new to flex. We are porting the front end of a large enterprise application to Flex. Has anyone been using remoteObject with modules, and if so, is there anything different that you had to do in calling your remoteObject usin modules compared to deploying everything in a single application? I described the problem in my prior post, below. Any help would be appreciated. --- In flexcoders@yahoogroups.com, cortlandian ar...@... wrote: My flex 3 application, deployed on JBoss with BlazeDS, uses a Remote Object to get data from a class in a jar file. The application worked fine while all the code was deployed as a single Application mxml file. I then moved some of the code to a Module mxml file, which I navigated thru a Tab Navigator/VBox/Module Loader combination from inside the main application file. If the mx:RemoteObject tag was included in the Module mxml file, upon running the application nothing would display under the tab loading that module. If I removed the mx:RemoteObject tag, the module does load and display. Of course, I cannot do anything useful because I am unable to access the remote object and fetch data. If I include the mx:RemoteObject tag in the main application module, nothing displays. So how do you set up applications which use RemoteObjects and modules? Any help is much appreciated. Have a nice day!
[flexcoders] Calling C++ app or service from flex on Mac
Hi everyone, I am in dire need of being able to call a C++ app or service on Mac from flex. I am willing to go the AIR way for this though that's not optimal. I have spent some time trying to figure out the Netscape plugin architecture which is supported on safari but it's sub-optimal for me to go that route. I already have a C++ dll that I have invoked with flex on the Windows side using an Active/X plugin successfully. Now I need to compile the dll into some format on Mac and then communicate back and forth with flex. I have seen some open source bridge projects that enclose flash player in an MFC object but that doesn't help me on mac. Is it as simple as doing some Netstream class from flex to connect to either an app or a service (if there are services on Mac like there are on Windows) and just do a localhost communication back and forth? If so, what are the limitations of such approaches? Any sample apps out there? Regards Priyanka
[flexcoders] Re: Relative Layout Question
Hm you also said something about a resize I completely blanked on that. Are you doing a manual resize of the component? (mouse involved?) Nope. Just responding to screen resizes. The application is set up to use ~100% of the browser width height, and the components are automatically resized when the user resizes the browser. I would like to have the two panels also resize automatically so that they still occupy the same amount of space relative to each other. I haven't tried out your example yet.. I will give it a shot first thing tomorrow. Thanks! Keith
[flexcoders] Re: How to access module app. controls from within module?
--- In flexcoders@yahoogroups.com, spinglittery ch...@... wrote: When I call itemclick=parentApplication.clickHandler(); from my Module to the main App. where clickHandler = public function clickHandler(event:ItemClickEvent):void { _modUrl = modules/ + event.label + .swf; moduleHandler(_modUrl); ... it doesn't work -although clickHandler works to load modules from the main app. Can anyone give me any pointers as to what I am doing wrong, please? Plz , find out you are getting correct Module path. ie. modUrl trace it out what exact path you are getting.
Re: [flexcoders] Using an Alert when handling another event?
You need to use preventDefault() in the confirmTabDelete function and then display the Alert box. Then when the user clicks ok, close the tab programmatically. I'm not familiar with SuperTabNavigator but normally this kind of events are only dispatched as a result of a user action, so when you close the tab programmatically the second time, this will really close it without going through the event handler. private function confirmTabDelete( event:SuperTabEv ent):void { Alert.show( Are you sure you want to delete this tab?, Confirm delete, Alert.YES | Alert.NO, this, alertListener, null, Alert.NO); event.preventDefault(); // Prevent default here } private function alertListener( eventObj: CloseEvent) :void { if (eventObj.detail= =Alert.NO) { closeTab(); // Really close the tab here } } -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com --- On Sat, 2/21/09, lanekelly5 lkel...@gmail.com wrote: From: lanekelly5 lkel...@gmail.com Subject: [flexcoders] Using an Alert when handling another event? To: flexcoders@yahoogroups.com Date: Saturday, February 21, 2009, 10:18 PM I'm using a SuperTabNavigator control from the flexlib package. When the user clicks on the close button for a tab it fires the tabClose event. I have specified a handler for this in the mxml for the SuperTabNavigator component: tabClose=confirmTa bDelete(event) ; In the confirmTabDelete function I would like to pop up an Alert with YES | NO buttons. According to the SuperTabNavigator docs I can cancel the delete action by calling event.preventDefaul t() within the confirmTabDelete function. My problem is that the Alert box uses its own handler function for the YES/NO button clicks. I'm not sure how that handler function can reference the event object to call preventDefault( ). private function confirmTabDelete( event:SuperTabEv ent):void { Alert.show( Are you sure you want to delete this tab?, Confirm delete, Alert.YES | Alert.NO, this, alertListener, null, Alert.NO); } private function alertListener( eventObj: CloseEvent) :void { if (eventObj.detail= =Alert.NO) { //Now what? How to call preventDefault( ) on the event object in confirmTabDelete? } } Is the secret in the this which is being used as the parent for the Alert? Any help would be great. }
Re: [flexcoders] Re: perl and AMF
On Thursday 19 Feb 2009, Rob Kunkle wrote: I think you can force flex to use AMF0. See RemoteObjectAMF0 from renaun.com -- Tom Chiverton Helping to collaboratively grow appliances This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] Re: HTTPRequest and Air too slow?
On Wednesday 18 Feb 2009, florian.salihovic wrote: Any ideas regarding Air and some problems when it comes to network issues? I don't recall any. Did you try a stripped down test case ? -- Tom Chiverton Helping to widespreadedly disseminate visionary e-services This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] Flex Apps on Flash 10 Crashes Browser
On Thursday 19 Feb 2009, Don Kerr wrote: All my Flex 3 apps work fine with Flash Player 9, but crash the browser when the user upgrades to Flash 10. We've got Flex 3 apps, and see no issues with Player 10. Any updates on any pending patches/hot fixes from Adobe? The obvious question would seem to be if you are using too much memory. What does the Profiler say ? -- Tom Chiverton Helping to carefully leverage integrated mindshares This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] Flex ShareObject | Firefox Reported Web Forgery
On Friday 20 Feb 2009, bsyyu wrote: I found one of my designed Flex website is blocked by Firefox with Reported Web Forgery. This is probably because it's been mis-reported by an end user. I believe FireFox uses Google service, so you should look there. -- Tom Chiverton Helping to augmentatively deploy principle-centered users This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Resizing text based on containerdimensions
Hi all, I'm struggling with following issue : I want a component which can show a text (a spell to be more precise). This text is defined by a number of lines, which I want to maintain (so no wordwrapping allowed). I hope to find a solution where I can get a container with the text in it and when I resize the container, the text itselves will resize also, so it will fit the container again. Does anybody know how to achieve this? Which container I need to use? How to calculate fontsize based on containerdimensions and number of lines ? Thanks in advance
[flexcoders] Re: Grid with header sections spanning the whole grid
No, that only groups items in the header area. I want something that does the heading area in-line with the items. Here is a screenshot of what I am looking for (came from MS word): http://i40.tinypic.com/2evx8xt.png --- In flexcoders@yahoogroups.com, alinmircea_s alinmirce...@... wrote: Something like this? also, if you haven't, check out lockedColumnCount and sortExpertMode
[flexcoders] Re: ToggleButtonBar xml based dataProvider
Not a problem at all. The following works fine: for each(var node:XML in resultXML..label) { taskList.push(node.toString()); floorTasks.dataProvider = taskList;
[flexcoders] Dynamically change HBox based upon height/width of Image
I am have a (large) Image Control whose source property is based upon which (smaller) Image Control is selected in an itemrenderer of a tile list. The 'large' Image Control is contained within an HBox that has a border along with a background. I would like to have the HBox resize when a new image is selected from the tilelist's itemrenderer. I can not seem to be able to grab the new image's width and height in order to resize the HBox. Any insight on how I might get these values? Thanks for the assistance.
[flexcoders] Set DataGrid selected items
How does one set a datagrid's selected items? If needed, I will use ADG instead. I have a datagrid that I want to preselect the selected items. I know how to get the selected items just not how to set them. Thanks!
[flexcoders] Re: Set DataGrid selected items
Also, I tried changing the dataGrid.selectedItems array directly and that doesn't seem to work.
[flexcoders] Re: Calling C++ app or service from flex on Mac
Just use AIR and Shu http://shu-player.com . Simple. --- In flexcoders@yahoogroups.com, Priya Shah shahpriya...@... wrote: Hi everyone, I am in dire need of being able to call a C++ app or service on Mac from flex. I am willing to go the AIR way for this though that's not optimal. I have spent some time trying to figure out the Netscape plugin architecture which is supported on safari but it's sub-optimal for me to go that route. I already have a C++ dll that I have invoked with flex on the Windows side using an Active/X plugin successfully. Now I need to compile the dll into some format on Mac and then communicate back and forth with flex. I have seen some open source bridge projects that enclose flash player in an MFC object but that doesn't help me on mac. Is it as simple as doing some Netstream class from flex to connect to either an app or a service (if there are services on Mac like there are on Windows) and just do a localhost communication back and forth? If so, what are the limitations of such approaches? Any sample apps out there? Regards Priyanka
[flexcoders] Re: HTTPRequest and Air too slow?
Yes, actually i did so. I ran an URLLoader against different backend api calls. Those are usually defined values for server-side calls. I had a slighty overhead: ~80 - 120ms + parsing the data and adding it into an ArrayCollection compared to the values i got via Charles. So i can be sure that an HTTP request done by Air (ActionScript/Flex) will not behave differently then a HTTP request by another application? And we should take a look in some other corners of the system? Best regards. --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote: On Wednesday 18 Feb 2009, florian.salihovic wrote: Any ideas regarding Air and some problems when it comes to network issues? I don't recall any. Did you try a stripped down test case ? -- Tom Chiverton Helping to widespreadedly disseminate visionary e-services This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
RE: [flexcoders] Re: Using Modules and Remote Objects
Typically, the RemoteObject tags, and all classes being sent and received by RO are in the main app. The Modules only have view classes and no new data classes Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of cortlandian Sent: Sunday, February 22, 2009 4:52 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Using Modules and Remote Objects I have used many other technologies, but am new to flex. We are porting the front end of a large enterprise application to Flex. Has anyone been using remoteObject with modules, and if so, is there anything different that you had to do in calling your remoteObject usin modules compared to deploying everything in a single application? I described the problem in my prior post, below. Any help would be appreciated. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, cortlandian ar...@... wrote: My flex 3 application, deployed on JBoss with BlazeDS, uses a Remote Object to get data from a class in a jar file. The application worked fine while all the code was deployed as a single Application mxml file. I then moved some of the code to a Module mxml file, which I navigated thru a Tab Navigator/VBox/Module Loader combination from inside the main application file. If the mx:RemoteObject tag was included in the Module mxml file, upon running the application nothing would display under the tab loading that module. If I removed the mx:RemoteObject tag, the module does load and display. Of course, I cannot do anything useful because I am unable to access the remote object and fetch data. If I include the mx:RemoteObject tag in the main application module, nothing displays. So how do you set up applications which use RemoteObjects and modules? Any help is much appreciated. Have a nice day!
[flexcoders] Working with images of varying proportions
I have an app that loads several images into mx:Image tags with scaleContent=true and width=160 / height=120. The problem is not all of my images have these proportions, and for odd sized images they end up being loaded into the upper left hand corner instead of centered in the restricting image box. All I'm trying to do is have a box 160x120 pixels, then load in images of various sizes dynamically and have them 1) scale to fit within this box, and 2) render centered vertically/horizontally in this box. Is there any way I can do this not knowing the actual image sizes (and using images of different proportions)? Thanks!
[flexcoders] Creating Nestable data MXML Components
I'm looking to create nestable MXML data components. I'm working on a validation codebase for a current requirement and the default Flex validators weren't sufficient for me. I'm basically looking to create something that would look like this in MXML: v:ConjunctionValidator v:NotNullValidator/ v:StringNotEmptyValidator/ /v:ConjunctionValidator I've already got my codebase together, I just would like to be able to stack it in MXML rather than wire it together in Actionscript. My ConjunctionValidator actionscript class defines a add(value:IValidator) method for adding sub validators. How would I get Flex to recognize this and respond to it? I also have other visual components that rely off of validators. The ultimate goal would be to do something like this in Flex: va:ValidatorTextField v:ConjunctionValidator ... /v:ConjunctionValidator /va:ValidatorTextField Is doing something like this possible? -- And do this, knowing the time, that now it is high time to awake out of sleep; for now our salvation is nearer than when we first believed.
[flexcoders] Re: properties and methods of a datagrid from item renderer
Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H click=doHoldRelease(data);/ /mx:HBox /mx:Component mx:DataGrid width=887 height=20 id=dg1 y=28 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg2 y=48 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg3 y=68 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid The trace statement needs to display dg1, dg2, dg3 depending on where the user was when they clicked the button. Actually I need to pass the dg(1,2,3).dataprovider, and the the selectedIndex. BTW ValidatedCheckBox is a data aware checkbox component we wrote. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: mx:DataGrid id=dg mx:columns mx:DataGridColumn mx:itemRenderer mx:Component From in here, outerDocument.dg is the DataGrid for this inline renderer You can also use owner in most cases Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Sunday, February 22, 2009 1:08 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] properties and methods of a datagrid from item renderer How do you access the properties and methods of a datagrid from an an item renderer/inline component? I have a component that is called from multiple datagrids. In certain cases I need to call a routine that manipulates the datagrid, whichever one has the item renderer in it. I need to access the selectedIndex, and the dataprovider to pass to the outerDocument routine that I call. How can you reference grid from whence you came? Paul
[flexcoders] Accessing parentDocument using custom events?
Is it possible to have a custom component in an itemRenderer access a variable in the parentDocument using a custom event? Not sure how to do this so I'm looking for an example.
[flexcoders] Re: Working with images of varying proportions
Have you tried taking the width/height off of the component and see how it handles the images of varying sizes? - Alex C --- In flexcoders@yahoogroups.com, byte.sensei byte.sen...@... wrote: I have an app that loads several images into mx:Image tags with scaleContent=true and width=160 / height=120. The problem is not all of my images have these proportions, and for odd sized images they end up being loaded into the upper left hand corner instead of centered in the restricting image box. All I'm trying to do is have a box 160x120 pixels, then load in images of various sizes dynamically and have them 1) scale to fit within this box, and 2) render centered vertically/horizontally in this box. Is there any way I can do this not knowing the actual image sizes (and using images of different proportions)? Thanks!
Re: [flexcoders] Working with images of varying proportions
For something similar i do the following, you should be able to change it to do what you want quite easily..: mx:Image id=selectedProductImageID verticalCenter=0 complete=imageLoaded() source={selectedPhoto} left=5 / Now the important bit is the complete=imageLoaded(): and the imageLoaded function: private function imageLoaded():void { if (selectedProductImageID.content.loaderInfo.width = selectedProductImageID.content.loaderInfo.height) { selectedProductImageID.width = 330; selectedProductImageID.height = 330*selectedProductImageID.content.loaderInfo.height/selectedProductImageID.content.loaderInfo.width ; } else { selectedProductImageID.height = 330 ; selectedProductImageID.width = 330*selectedProductImageID.content.loaderInfo.width/selectedProductImageID.content.loaderInfo.height; } } On Mon, Feb 23, 2009 at 9:36 PM, byte.sensei byte.sen...@yahoo.com wrote: I have an app that loads several images into mx:Image tags with scaleContent=true and width=160 / height=120. The problem is not all of my images have these proportions, and for odd sized images they end up being loaded into the upper left hand corner instead of centered in the restricting image box. All I'm trying to do is have a box 160x120 pixels, then load in images of various sizes dynamically and have them 1) scale to fit within this box, and 2) render centered vertically/horizontally in this box. Is there any way I can do this not knowing the actual image sizes (and using images of different proportions)? Thanks! -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
[flexcoders] Re: Working with images of varying proportions
Yes, when I try that the images don't scale into my 160x120 box. The images are a wide variety of sizes (e.g. 300x700, 1280x1024, 150x50) they are really inconsistent in proportion. When I take off the image width/height I get the full image size and not a scaled 160x120 version. -Dan --- In flexcoders@yahoogroups.com, oneworld95 oneworl...@... wrote: Have you tried taking the width/height off of the component and see how it handles the images of varying sizes? - Alex C --- In flexcoders@yahoogroups.com, byte.sensei byte.sensei@ wrote: I have an app that loads several images into mx:Image tags with scaleContent=true and width=160 / height=120. The problem is not all of my images have these proportions, and for odd sized images they end up being loaded into the upper left hand corner instead of centered in the restricting image box. All I'm trying to do is have a box 160x120 pixels, then load in images of various sizes dynamically and have them 1) scale to fit within this box, and 2) render centered vertically/horizontally in this box. Is there any way I can do this not knowing the actual image sizes (and using images of different proportions)? Thanks!
RE: [flexcoders] Re: properties and methods of a datagrid from item renderer
Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 8:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H click=doHoldRelease(data);/ /mx:HBox /mx:Component mx:DataGrid width=887 height=20 id=dg1 y=28 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg2 y=48 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg3 y=68 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid The trace statement needs to display dg1, dg2, dg3 depending on where the user was when they clicked the button. Actually I need to pass the dg(1,2,3).dataprovider, and the the selectedIndex. BTW ValidatedCheckBox is a data aware checkbox component we wrote. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: mx:DataGrid id=dg mx:columns mx:DataGridColumn mx:itemRenderer mx:Component From in here, outerDocument.dg is the DataGrid for this inline renderer You can also use owner in most cases Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aceoohay Sent: Sunday, February 22, 2009 1:08 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] properties and methods of a datagrid from item renderer How do you access the properties and methods of a datagrid from an an item renderer/inline component? I have a component that is called from multiple datagrids. In certain cases I need to call a routine that manipulates the datagrid, whichever one has the item renderer in it. I need to access the selectedIndex, and the dataprovider to pass to the outerDocument routine that I call. How can you reference grid from whence you came? Paul
Re: [flexcoders] Re: perl and AMF
I used Storable::AMF, which supports AMF3. On 24/02/2009, at 1:25 AM, Tom Chiverton wrote: On Thursday 19 Feb 2009, Rob Kunkle wrote: I think you can force flex to use AMF0. See RemoteObjectAMF0 from renaun.com -- Tom Chiverton Helping to collaboratively grow appliances This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ? partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Flex Apps on Flash 10 Crashes Browser
Profiler looks good. Apps with small memory usage and apps with much more, all crash the browser equally. Crazy. Hard to know why. Matt's response to post a bug doesn't help me now. So, I'm stuck. Do you know if you have to compile/debug Flex Builder 3 in Flash 10 debugger if you want the app to work in Flash 10? Currently I have Flash 9 debug running on Flex 3. Thanks, Don --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote: On Thursday 19 Feb 2009, Don Kerr wrote: All my Flex 3 apps work fine with Flash Player 9, but crash the browser when the user upgrades to Flash 10. We've got Flex 3 apps, and see no issues with Player 10. Any updates on any pending patches/hot fixes from Adobe? The obvious question would seem to be if you are using too much memory. What does the Profiler say ? -- Tom Chiverton Helping to carefully leverage integrated mindshares This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] [Complicated ? :-p] dynamic itemRenderer + dataprovider problems
Hello all, I a have a List component which at runtime I change its dataProvider AND item renderer via a button click. Everything runs smoothly until new data are added to the data provider that is current. The list picks up the change, but after this when i try to switch to the second provider + renderer (via the button) i get the following: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::List/createItemRenderer() at mx.controls::List/http://www.adobe.com/2006/flex/mx/internal::getMeasuringRenderer() at mx.controls::List/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher() both item renderers and data providers are initialized and i can switch between them without problems up to the point described earlier. Does it ring a bell? the switching code is the following: tileListID.itemRenderer = friendsActionsRenderer ; tileListID.dataProvider = friendsDataProvider ; Thanks, Fotis
[flexcoders] Re: Working with images of varying proportions
Thanks for the insight. I did something very similar, although I'm using HBox/VBox components to layout my app so I had to put a VBox wrapper around the image like this: mx:VBox id=image_01_wrapper width=100 height=100% verticalAlign=middle horizontalAlign=center mx:Image id=image_01 source={'http://media.basspro.com/'+current_product.image_url_01} complete={image_resize(image_01,100,75)} alpha=0/ /mx:VBox Then my image_resize() function takes an Image object and desired width/height as parameters: private function image_resize (img:Image,w:int,h:int):void { var img_width:int = img.content.loaderInfo.width; var img_height:int = img.content.loaderInfo.height; if (img_width/img_height = w/h) { //image is wider than box proportions - resize based on width img.width = w; img.height = w/img_width*img_height; } else { //image is taller than box proportions - resize based on height img.height = h; img.width = h/img_height*img_width; } //Alert.show(img.width.toString() + x + img.height.toString()); var fade_in:Fade = new Fade(); fade_in.target = img; fade_in.alphaFrom = 0; fade_in.alphaTo = 1; fade_in.play(); } I also added the fade in tween so that the images gradually fade in when they have been resized. Anyway, your code below got me going. Thanks! -Dan --- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzini...@... wrote: For something similar i do the following, you should be able to change it to do what you want quite easily..: mx:Image id=selectedProductImageID verticalCenter=0 complete=imageLoaded() source={selectedPhoto} left=5 / Now the important bit is the complete=imageLoaded(): and the imageLoaded function: private function imageLoaded():void { if (selectedProductImageID.content.loaderInfo.width = selectedProductImageID.content.loaderInfo.height) { selectedProductImageID.width = 330; selectedProductImageID.height = 330*selectedProductImageID.content.loaderInfo.height/selectedProductIm ageID.content.loaderInfo.width ; } else { selectedProductImageID.height = 330 ; selectedProductImageID.width = 330*selectedProductImageID.content.loaderInfo.width/selectedProductIma geID.content.loaderInfo.height; } } On Mon, Feb 23, 2009 at 9:36 PM, byte.sensei byte.sen...@... wrote: I have an app that loads several images into mx:Image tags with scaleContent=true and width=160 / height=120. The problem is not all of my images have these proportions, and for odd sized images they end up being loaded into the upper left hand corner instead of centered in the restricting image box. All I'm trying to do is have a box 160x120 pixels, then load in images of various sizes dynamically and have them 1) scale to fit within this box, and 2) render centered vertically/horizontally in this box. Is there any way I can do this not knowing the actual image sizes (and using images of different proportions)? Thanks! -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@...,
Re: [flexcoders] [Complicated ? :-p] dynamic itemRenderer + dataprovider problems
Problem solved :-) It seems that something similar to a race condition happened as i was changing both the data provider AND the item renderer at the same time. The solution is to use call later in the switch method: pseudo: switch() { list.dataProvider = aDataProvider ; callLater(switchRenderer,[theRenderer]) ; } On Mon, Feb 23, 2009 at 11:17 PM, fotis.chatzinikos fotis.chatzini...@gmail.com wrote: Hello all, I a have a List component which at runtime I change its dataProvider AND item renderer via a button click. Everything runs smoothly until new data are added to the data provider that is current. The list picks up the change, but after this when i try to switch to the second provider + renderer (via the button) i get the following: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::List/createItemRenderer() at mx.controls::List/ http://www.adobe.com/2006/flex/mx/internal::getMeasuringRenderer() at mx.controls::List/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher() both item renderers and data providers are initialized and i can switch between them without problems up to the point described earlier. Does it ring a bell? the switching code is the following: tileListID.itemRenderer = friendsActionsRenderer ; tileListID.dataProvider = friendsDataProvider ; Thanks, Fotis -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
[flexcoders] Re: How to access module app. controls from within module?
Thanks. Putting event in as a parameter solved it. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Not sure I understood. I would think you would get an exception give than you didn't pass any parameters into clickHandler() Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of spinglittery Sent: Sunday, February 22, 2009 4:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to access module app. controls from within module? When I call itemclick=parentApplication.clickHandler(); from my Module to the main App. where clickHandler = public function clickHandler(event:ItemClickEvent):void { _modUrl = modules/ + event.label + .swf; moduleHandler(_modUrl); ... it doesn't work -although clickHandler works to load modules from the main app. Can anyone give me any pointers as to what I am doing wrong, please?
[flexcoders] Re: properties and methods of a datagrid from item renderer
Alex: I removed the hbox (I would like to figure out how to center the checkbox, but that is for a different thread). When I execute the trace statement, I get the name of the module that contains the panel that contains the tab navigatior that contains the canvas that contains the datagrid. What I need is the datagrid itself. Any other ideas? Paul --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 8:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H click=doHoldRelease(data);/ /mx:HBox /mx:Component mx:DataGrid width=887 height=20 id=dg1 y=28 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg2 y=48 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg3 y=68 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid The trace statement needs to display dg1, dg2, dg3 depending on where the user was when they clicked the button. Actually I need to pass the dg(1,2,3).dataprovider, and the the selectedIndex. BTW ValidatedCheckBox is a data aware checkbox component we wrote. --- In flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: mx:DataGrid id=dg mx:columns mx:DataGridColumn mx:itemRenderer mx:Component From in here, outerDocument.dg is the DataGrid for this inline renderer You can also use owner in most cases Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Sunday, February 22, 2009 1:08 PM To: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] properties and methods of a datagrid from item renderer How do you access the properties and methods of a datagrid from an an item renderer/inline component? I have a component that is called from multiple datagrids. In certain cases I need to call a routine that manipulates the datagrid, whichever one has the item renderer in it. I need to access the selectedIndex, and the dataprovider to pass to the outerDocument routine that I call. How can you reference grid from whence you came? Paul
RE: [flexcoders] Re: properties and methods of a datagrid from item renderer
If you removed the HBox, are you still using mx:Component or just the ValidatedCheckBox directly. If you are using it VCB directly, then the following should work: private function doHoldRelease(data:Object):void { trace(owner.id); } If not, please provide more information on how your code looks now that you've removed the HBox. For centering, see: http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende.html Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 3:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: I removed the hbox (I would like to figure out how to center the checkbox, but that is for a different thread). When I execute the trace statement, I get the name of the module that contains the panel that contains the tab navigatior that contains the canvas that contains the datagrid. What I need is the datagrid itself. Any other ideas? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 8:18 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H click=doHoldRelease(data);/ /mx:HBox /mx:Component mx:DataGrid width=887 height=20 id=dg1 y=28 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg2 y=48 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg3 y=68 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid The trace statement needs to display dg1, dg2, dg3 depending on where the user was when they clicked the button. Actually I need to pass the dg(1,2,3).dataprovider, and the the selectedIndex. BTW ValidatedCheckBox is a data aware checkbox component we wrote. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: mx:DataGrid id=dg mx:columns mx:DataGridColumn mx:itemRenderer mx:Component From in here, outerDocument.dg is the DataGrid for this inline renderer You can also use owner in most cases Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Sunday, February 22, 2009 1:08 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] properties and methods of a datagrid from item renderer How do you access the properties and methods of a datagrid from an an item renderer/inline component? I have a component that is called from multiple datagrids. In certain cases I need to call a routine that manipulates the datagrid, whichever one has the item renderer in it. I need to access the selectedIndex, and the dataprovider to pass to the outerDocument routine that I call. How can you reference grid from whence you came? Paul
Re: [flexcoders] Locale Resource Problem Compiling Automation with Maven
Hi Brad, You need to add the resource-bundle dependency too. VELO On Fri, Feb 13, 2009 at 6:50 PM, Brad Keck bradley_k...@intuit.com wrote: I am trying to compile my code with automation libraries so that it can be tested with silk. Currently, I am able to do this without trouble in Flex Builder using this command line argument: -include-libraries ...\automation.swc ...\automation_agent.swc ...\FlexTechDomain.swc (... represents the full path on my local machine) However, we have continuous integration using a maven build so I am trying to get it to build that way. When I do so, however, I am getting these error messages: [ERROR] Unable to resolve resource bundle automation for locale en_US. [ERROR] Unable to resolve resource bundle automation_agent for locale en_US. Any clue why this is? Here are the dependencies in my pom: dependency groupIdcom.adobe.Flex.sdk/groupId artifactIdautomation_agent/artifactId typeswc/type version3.0.0/version scopeinternal/scope /dependency dependency groupIdcom.adobe.Flex.sdk/groupId artifactIdautomation/artifactId typeswc/type version3.0.0/version scopeinternal/scope /dependency dependency groupIdcom.adobe.Flex.sdk/groupId artifactIdFlexTechDomain/artifactId typeswc/type version3.0.0/version scopeinternal/scope /dependency Thank you, -Brad Keck
[flexcoders] Re: properties and methods of a datagrid from item renderer
Alex: How can I use the validatedCheckBox directly, I thought I needed to wrap it in a component to use it as an item renderer in multiple datagrids? Paul --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: If you removed the HBox, are you still using mx:Component or just the ValidatedCheckBox directly. If you are using it VCB directly, then the following should work: private function doHoldRelease(data:Object):void { trace(owner.id); } If not, please provide more information on how your code looks now that you've removed the HBox. For centering, see: http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende. html Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 3:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: I removed the hbox (I would like to figure out how to center the checkbox, but that is for a different thread). When I execute the trace statement, I get the name of the module that contains the panel that contains the tab navigatior that contains the canvas that contains the datagrid. What I need is the datagrid itself. Any other ideas? Paul --- In flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 8:18 AM To: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H click=doHoldRelease(data);/ /mx:HBox /mx:Component mx:DataGrid width=887 height=20 id=dg1 y=28 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg2 y=48 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg3 y=68 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid The trace statement needs to display dg1, dg2, dg3 depending on where the user was when they clicked the button. Actually I need to pass the dg(1,2,3).dataprovider, and the the selectedIndex. BTW ValidatedCheckBox is a data aware checkbox component we wrote. --- In flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: mx:DataGrid id=dg mx:columns mx:DataGridColumn mx:itemRenderer mx:Component From in here, outerDocument.dg is the DataGrid for this inline renderer You can also use owner in most cases Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Sunday, February 22, 2009 1:08 PM To: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] properties and methods of a datagrid from item renderer How do you access the properties and methods of a datagrid from an an item renderer/inline component? I have a component that is called from multiple datagrids. In certain cases I need to call a routine that manipulates the datagrid, whichever one has the item renderer in it. I need to access the selectedIndex, and the dataprovider
RE: [flexcoders] Re: properties and methods of a datagrid from item renderer
Assuming ValidatedCheckBox implements IListItemRenderer, mx:DataGridColumn itemRenderer=ValidatedCheckBox / Is ValidatedCheckBox written in MXML or AS? Not that it would affect the answer... Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 4:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: How can I use the validatedCheckBox directly, I thought I needed to wrap it in a component to use it as an item renderer in multiple datagrids? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: If you removed the HBox, are you still using mx:Component or just the ValidatedCheckBox directly. If you are using it VCB directly, then the following should work: private function doHoldRelease(data:Object):void { trace(owner.id); } If not, please provide more information on how your code looks now that you've removed the HBox. For centering, see: http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende. html Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 3:22 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: I removed the hbox (I would like to figure out how to center the checkbox, but that is for a different thread). When I execute the trace statement, I get the name of the module that contains the panel that contains the tab navigatior that contains the canvas that contains the datagrid. What I need is the datagrid itself. Any other ideas? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 8:18 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H click=doHoldRelease(data);/ /mx:HBox /mx:Component mx:DataGrid width=887 height=20 id=dg1 y=28 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg2 y=48 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg3 y=68 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid The trace statement needs to display dg1, dg2, dg3 depending on where the user was when they clicked the button. Actually I need to pass the dg(1,2,3).dataprovider, and the the selectedIndex. BTW ValidatedCheckBox is a data aware checkbox component we wrote. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: mx:DataGrid id=dg mx:columns mx:DataGridColumn mx:itemRenderer mx:Component From in here, outerDocument.dg is the DataGrid for this inline renderer You can also use owner in most cases Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog:
[flexcoders] Re: properties and methods of a datagrid from item renderer
ValidatedCheckBox extends CheckBox. If I do; mx:DataGridColumn itemRenderer=ValidatedCheckBox / How do I set the ValidatedCheckBox properties such as; checkedValue=R uncheckedValue=H click=doHoldRelease(data); So that I can get the proper values, and do the specialized code needed on click? Paul --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Assuming ValidatedCheckBox implements IListItemRenderer, mx:DataGridColumn itemRenderer=ValidatedCheckBox / Is ValidatedCheckBox written in MXML or AS? Not that it would affect the answer... Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 4:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: How can I use the validatedCheckBox directly, I thought I needed to wrap it in a component to use it as an item renderer in multiple datagrids? Paul --- In flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: If you removed the HBox, are you still using mx:Component or just the ValidatedCheckBox directly. If you are using it VCB directly, then the following should work: private function doHoldRelease(data:Object):void { trace(owner.id); } If not, please provide more information on how your code looks now that you've removed the HBox. For centering, see: http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende. html Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 3:22 PM To: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: I removed the hbox (I would like to figure out how to center the checkbox, but that is for a different thread). When I execute the trace statement, I get the name of the module that contains the panel that contains the tab navigatior that contains the canvas that contains the datagrid. What I need is the datagrid itself. Any other ideas? Paul --- In flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 8:18 AM To: flexcoders@yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H click=doHoldRelease(data);/ /mx:HBox /mx:Component mx:DataGrid width=887 height=20 id=dg1 y=28 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg2 y=48 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid mx:DataGrid width=887 height=20 id=dg3 y=68 x=5 mx:columns mx:DataGridColumn width=27 headerText=Rel itemRenderer={cbHoldRelease} rendererIsEditor=true editorDataField=selected paddingLeft=1/ /mx:columns /mx:DataGrid The trace statement needs to display dg1, dg2, dg3 depending on where the user was when they clicked the button. Actually I need to pass the dg(1,2,3).dataprovider, and the the selectedIndex. BTW ValidatedCheckBox is a data aware checkbox
[flexcoders] Changing text size in mx:HTML (webkit) ? #air
Had been looking for ways to make text bigger or smaller in mx:HTML control, something equivalent in fireworks and safari by simply pressing cmd -/+ keys, but somehow there's no native API to call in the AIR's html control, am I missing something here ?
[flexcoders] Re: Set DataGrid selected items
?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; private function selectNow(event:MouseEvent):void { if(event.target.name == one) { aqe.selectedCells = [{ rowIndex : 1, columnIndex : 1}] } else { aqe.selectedCells = [ { rowIndex : 1, columnIndex : 1},{ rowIndex : 3, columnIndex : 3 }] } } private function selectNow2(event:MouseEvent):void { if(event.target.name == one) { aqe2.selectedItem = datap.getItemAt(0) } else { aqe2.selectedItems = [datap.getItemAt(0),datap.getItemAt(3)] } } private function selectNow3(event:MouseEvent):void { if(event.target.name == one) { aqe3.selectedIndex = 2 } else { aqe3.selectedIndices = [1,3] } } ]] /mx:Script mx:ArrayCollection id=datap mx:Object a=test b=ing c=this d=component/ mx:Object a=test b=ing c=this d=component/ mx:Object a=test b=ing c=this d=component/ mx:Object a=test b=ing c=this d=component/ /mx:ArrayCollection mx:AdvancedDataGrid id=aqe selectionMode=multipleCells dataProvider={datap} mx:columns mx:AdvancedDataGridColumn dataField=a/ mx:AdvancedDataGridColumn dataField=b/ mx:AdvancedDataGridColumn dataField=c/ mx:AdvancedDataGridColumn dataField=d/ /mx:columns /mx:AdvancedDataGrid mx:Button name=one label=select one cell above click=selectNow(event)/ mx:Button label=select two cells above click=selectNow(event)/ mx:AdvancedDataGrid id=aqe2 selectionMode=multipleRows dataProvider={datap} mx:columns mx:AdvancedDataGridColumn dataField=a/ mx:AdvancedDataGridColumn dataField=b/ mx:AdvancedDataGridColumn dataField=c/ mx:AdvancedDataGridColumn dataField=d/ /mx:columns /mx:AdvancedDataGrid mx:Button name=one label=select one row above by item click=selectNow2(event)/ mx:Button label=select two rows above by items click=selectNow2(event)/ mx:AdvancedDataGrid id=aqe3 selectionMode=multipleRows dataProvider={datap} mx:columns mx:AdvancedDataGridColumn dataField=a/ mx:AdvancedDataGridColumn dataField=b/ mx:AdvancedDataGridColumn dataField=c/ mx:AdvancedDataGridColumn dataField=d/ /mx:columns /mx:AdvancedDataGrid mx:Button name=one label=select one row above by index click=selectNow3(event)/ mx:Button label=select two rows above by indices click=selectNow3(event)/ /mx:Application Hope this helps.
[flexcoders] Re: HTTPRequest and Air too slow?
--- In flexcoders@yahoogroups.com, florian.salihovic florian.saliho...@... wrote: Yes, actually i did so. I ran an URLLoader against different backend api calls. Those are usually defined values for server-side calls. I had a slighty overhead: ~80 - 120ms + parsing the data and adding it into an ArrayCollection compared to the values i got via Charles. So i can be sure that an HTTP request done by Air (ActionScript/Flex) will not behave differently then a HTTP request by another application? And we should take a look in some other corners of the system? Here is one place I have found a difference: http://flexdiary.blogspot.com/2007/07/flex-reorders-url-string- parameters.html
RE: [flexcoders] Bug? Width of single-character label...
This sounds like a bug to me. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jasonbriggs99 Sent: Tuesday, February 17, 2009 4:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Bug? Width of single-character label... If I have two labels: mx:Label id=label1 text=: / mx:Label id=label2 text=:: / The assigned width of label2, with two characters, is significantly less than the width of label1, with only a single character. I can work around this behaviour by assigning the text of label1 to be : -- i.e. inserting a trailing space. Is this a bug, or am I missing something? Thanks
RE: [flexcoders] Displaying Extremely large fonts
Interesting... I suspect that this is a limit with TextField the Flash Player. I didn't check whether embedding the font gets around the problem. However, TextField is on its way to becoming obsolete and the limit doesn't seem to apply to FTE, the new Flash Text Engine in Player 10. As a demonstration of this, the following Flex 4 app ?xml version=1.0 encoding=utf-8? FxApplication xmlns=http://ns.adobe.com/mxml/2009; layoutVerticalLayout//layout TextBox text=Hello fontFamily=Verdana fontSize=1000/ /FxApplication renders properly because TextBox uses FTE rather than TextField. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Stephen More Sent: Tuesday, February 17, 2009 7:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Displaying Extremely large fonts Is there a way to display extremely large fonts in Flash ? I have tried: var format:TextFormat = new TextFormat(); format.font = Verdana; format.color = 0x00; format.size = 72; [TextLineMetrics ascent:72, descent:16, leading:0, width:40, height:88, x:2] format.size = 144; [TextLineMetrics ascent:127, descent:27, leading:0, width:71, height:154, x:77] format.size = 288; [TextLineMetrics ascent:127, descent:27, leading:0, width:71, height:154, x:77] But the height never gets larger than 154. textfield.width = stage.stageWidth; textfield.height = stage.stageHeight; I am looking to display text almost as large as the stage, do I need to use a different font or an embedded font ? -Thanks
RE: [flexcoders] Re: properties and methods of a datagrid from item renderer
In my blog, I subclassed DataGridColumn so you could specify those values there. You can create custom class factories as well. But you should be ok using mx:Component, I just didn't know what pattern you were using. Does this mean that trace(owner.id) didn't work? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 5:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer ValidatedCheckBox extends CheckBox. If I do; mx:DataGridColumn itemRenderer=ValidatedCheckBox / How do I set the ValidatedCheckBox properties such as; checkedValue=R uncheckedValue=H click=doHoldRelease(data); So that I can get the proper values, and do the specialized code needed on click? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: Assuming ValidatedCheckBox implements IListItemRenderer, mx:DataGridColumn itemRenderer=ValidatedCheckBox / Is ValidatedCheckBox written in MXML or AS? Not that it would affect the answer... Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 4:22 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: How can I use the validatedCheckBox directly, I thought I needed to wrap it in a component to use it as an item renderer in multiple datagrids? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: If you removed the HBox, are you still using mx:Component or just the ValidatedCheckBox directly. If you are using it VCB directly, then the following should work: private function doHoldRelease(data:Object):void { trace(owner.id); } If not, please provide more information on how your code looks now that you've removed the HBox. For centering, see: http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende. html Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 3:22 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: I removed the hbox (I would like to figure out how to center the checkbox, but that is for a different thread). When I execute the trace statement, I get the name of the module that contains the panel that contains the tab navigatior that contains the canvas that contains the datagrid. What I need is the datagrid itself. Any other ideas? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 8:18 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: Thanks for the reply. What I am doing is not quite an inline component. I have 1 component in my mxml file that is referenced by 3 different datagrids like this; mx:Component id=cbHoldRelease mx:HBox textAlign=center mx:Script ![CDATA[ private function doHoldRelease(data:Object):void { trace('What datagrid called me?'); } ]] /mx:Script inp:ValidatedCheckBox checkedValue=R uncheckedValue=H
RE: [flexcoders] Re: properties and methods of a datagrid from item renderer
FWIW, this worked for me: mx:DataGrid id=dg initialize=dg.dataProvider=[{ label: 'foo' }] mx:columns mx:DataGridColumn dataField=label mx:itemRenderer mx:Component mx:CheckBox click=trace(owner['id']) / /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Monday, February 23, 2009 9:26 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: properties and methods of a datagrid from item renderer In my blog, I subclassed DataGridColumn so you could specify those values there. You can create custom class factories as well. But you should be ok using mx:Component, I just didn't know what pattern you were using. Does this mean that trace(owner.id) didn't work? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 5:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer ValidatedCheckBox extends CheckBox. If I do; mx:DataGridColumn itemRenderer=ValidatedCheckBox / How do I set the ValidatedCheckBox properties such as; checkedValue=R uncheckedValue=H click=doHoldRelease(data); So that I can get the proper values, and do the specialized code needed on click? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: Assuming ValidatedCheckBox implements IListItemRenderer, mx:DataGridColumn itemRenderer=ValidatedCheckBox / Is ValidatedCheckBox written in MXML or AS? Not that it would affect the answer... Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 4:22 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: How can I use the validatedCheckBox directly, I thought I needed to wrap it in a component to use it as an item renderer in multiple datagrids? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: If you removed the HBox, are you still using mx:Component or just the ValidatedCheckBox directly. If you are using it VCB directly, then the following should work: private function doHoldRelease(data:Object):void { trace(owner.id); } If not, please provide more information on how your code looks now that you've removed the HBox. For centering, see: http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende. html Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com] On Behalf Of aceoohay Sent: Monday, February 23, 2009 3:22 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: properties and methods of a datagrid from item renderer Alex: I removed the hbox (I would like to figure out how to center the checkbox, but that is for a different thread). When I execute the trace statement, I get the name of the module that contains the panel that contains the tab navigatior that contains the canvas that contains the datagrid. What I need is the datagrid itself. Any other ideas? Paul --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com, Alex Harui aharui@ wrote: Probably: private function doHoldRelease(data:Object):void { trace(document.owner.id); } BTW, Using an HBox to center a checkbox is heavy and prevents you from directly using owner. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders% 40yahoogroups.commailto:flexcoders% 40yahoogroups.com
Re: [flexcoders] Accessing parentDocument using custom events?
First of all why do you need to do this? I'm not sure I understand exactly what you are trying to do but you can inject data into item renderer form parent document and access that data inside the renderer. Or you can hold references to your component (visual component) inside a model class dispatch an event which will be handled by a command and inside that command get the reference to that visual component. HTH, Claudiu From: oneworld95 oneworl...@yahoo.com To: flexcoders@yahoogroups.com Sent: Monday, February 23, 2009 10:05:15 PM Subject: [flexcoders] Accessing parentDocument using custom events? Is it possible to have a custom component in an itemRenderer access a variable in the parentDocument using a custom event? Not sure how to do this so I'm looking for an example.