[flexcoders] Re: Mimic IGoogle with Flex 3
--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: At the link I sent there is a link labeled Custom buttons in windows. Is that what you are trying to do? --- In flexcoders@yahoogroups.com, thelordsince1984 loreboa@ wrote: --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: --- In flexcoders@yahoogroups.com, thelordsince1984 loreboa@ wrote: --- In flexcoders@yahoogroups.com, Gregor Kiddie gkiddie@ wrote: Take a look at the MDI stuff in FlexLib. We've produced the effect you are looking for with them. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of thelordsince1984 Sent: 28 January 2009 10:10 To: flexcoders@yahoogroups.com Subject: [flexcoders] Mimic IGoogle with Flex 3 Hi, i would create an app that has the same functionality that igoogle provides.. in particular i would have same panels and drag and drop around a main panel with a layout like tilegrid or grid?And if i want to add panels at run time? Anybody knows a solution for this kind of problem? Thanks in advance Regards Lorenzo Thanks for the reply. It's very very cool. where can i found samples to work with it? Thanks again Regards Lorenzo Try http://code.google.com/p/flexmdi/ Thanks, i see that MDIWindow by default provide close, minimize and restore buttons. how can i add a new button to allow modify on windows? thanks thanks, it's what i'm looking for... anybody knows about to save a specific RIA's configuration? For example suppose that a user opens the browser, modify components contained in a generic application and save the modifications. So when the users restarts the application would retrieve the same configuration saved in the previous login... Thanks in advance Lorenzo
[flexcoders] Bug in ADG?, possible to bind labelFunction to editor with no dataField?
Hi, Does anyone have any idea how to edit data that does not come from fixed object properties i.e. myObject.Name but myObject.Attributes[2] which might be name? I have a 2D array, array of rows and array of cells for each row, both are arbitrary. I have this successfully displayed my data in AdvancedDataGrid via labelFunction. public function getContentLabel(item:GridRow, column:CustomLabelColumn) : String { if(item != null) { return item.Cells.getGridLabelCellAt(column.columnIndex).Label; } else { return null; } } How do I edit the data in these columns? I looked at http://www.adobe.com/livedocs/flex/3/html/help.html?content=celleditor_8.html#197235 and tried messing around with itemEditBegin and itemEditEnd. I have itemEditBegin working successfully where I am able to display my label in a text box. The itemEditEnd for ADG seems to crash because I'm using typed objects instead of plan strings or XML. In fact I'm convinced there is a bug in the itemEnd base handler. I tried calling preventDefault from the grids itemEnd function but no luck, I am forced to overwrite the event.reason so that the base class doesnt destroy my itemEditor. My issue is here: In AdvancedDataGridBaseEx.as private function itemEditorItemEditEndHandler(event:AdvancedDataGridEvent):void ... var newData:Object = itemEditorInstance[_columns[event.columnIndex].editorDataField]; var property:String = _columns[event.columnIndex].dataField; var data:Object = event.itemRenderer.data; var typeInfo:String = ; //WHY is this only XML??? my data variable has plan String text and yet I never make it into the typeInfo == String part since typeInfo is because the XML loop never executes on an object; for each(var variable:XML in describeType(data).variable) { if (property == variab...@name.tostring()) { typeInfo = variab...@type.tostring(); break; } } if (typeInfo == String) { //NEVER make it here if (!(newData is String)) newData = newData.toString(); } //.. //CRASH HERE since property is null. // data = Some Text; if (data[property] != newData) { bChanged = true; data[property] = newData; }
Re: [flexcoders] Common base class for components
Hi Jules, Object Oriented programming in my mind is about making use of references to objects. With this in mind, here is a way I use to centralise common functionality (functions) that I can access throughout my application: 1. Create an object in the Application mxml file - this will be referenced throughout your application components eg: objApp:Object = new Object(); 2. Create functions inside a script block in the Application mxml file eg: public function myUsefulFunction(): void { ... } 3. Add references to my functions to objApp object - no () after the function name as it is a reference to it, not a call to it eg: objApp.myUsefulFunction = myUsefulFunction; I can also include function classes here and make reference to their functions 4. Pass objApp as a reference to each component - I must be sure that the deepest component is chained back to the Application mxml by passing this reference through all its parents eg: comp:mypanel id= objApp={objApp} / 5. Inside each component, bind objApp eg: [Bindable] public var objApp:Object; 6. Call my functions from whereever I want to, from any component that has a reference to objApp eg: objApp.myUsefulFunction(); 7. I am not just limited to passing references to functions this way either. I can pass references to child objects and even move them around the stage, etc. also eg: objApp.myPanel.x = objApp.myOtherPanel.x + objApp.myOtherPanel.width + 10; Hope this helps you. Works really well for me. It seems a very easy way to use the power of object oriented referencing to talk to anything, anywhere in an application. And if I ever want to know anything about any object, I can usually query it via reference to objApp. Could call it the objApp framework if it hasn't already got a name :o) Cheers, Martyn Jules Suggate wrote: Is it possible for an MXML file to implement an interface? Sounds intriguing ... but won't resolve my issue unfortunately. It's the implementation code that I want them to share. I have developers on my team who are less than keen on having to duplicate repetitive code around the place -- they want to focus on cool effects, state transitions and backend integration :-) And I don't want repeated code everywhere in the app since if we want to change something, there'll eventullay be hundreds of places where we have to do so if the code is copy+pasted around the place... On Fri, Jan 30, 2009 at 05:25, Fotis Chatzinikos fotis.chatzini...@gmail.com mailto:fotis.chatzini...@gmail.com wrote: why do not you make your components implement an interface with these methods you describe? On Thu, Jan 29, 2009 at 10:54 AM, Jules Suggate julian.sugg...@gmail.com mailto:julian.sugg...@gmail.com wrote: Just to resume this thread, what I meant was to still use MXML and all the Flex components, but to introduce common functionality to all our Views (mxml files). Perhaps it's better to think of weaving this in than using inheritance, since that would require multiple inheritance AFAICT. I don't want anything fancy -- just a getter/setter pair: public function get model():IViewModel { // some common code } private var _model:IViewModel; public function set model(value:IViewModel):void { // more common code } To save writing out this code again and again, would I have to put this code in an include file, and include from each View? On Thu, Dec 18, 2008 at 06:41, Alex Harui aha...@adobe.com mailto:aha...@adobe.com wrote: In theory, if your base class implements IUIComponent, then your visual components will work in Flex *From:* flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com] *On Behalf Of *Jules Suggate *Sent:* Wednesday, December 17, 2008 8:56 AM *To:* flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com *Subject:* [flexcoders] Common base class for components Hi list, anyone know if it's possible to have all our components inherit from a common base component of our own making? There are some things in our app that every View component will have to do at loadtime, and it'd be nice to just write that code once and have all the other components inherit it... Last time I checked in Flex 3 Beta 2 there was some vague suggestion of using Template Components, but that seemed like an afterthought in the SDK at the time. Just thought I'd check to see if you knew of any tricks for doing it :)
RE: [flexcoders] Silent Print from Flex on Kiosk
Yeah, The Flash Player doesn’t allow silent printing, as some wag would write an advertising swf which printed out their entire promotional literature of 2000 pages on your printer every time you checked your email… Nate is right, if you have JS code that works, call out to that, or use some other means of interacting with the printer (we have a client side DotNet component to handle our printing needs). Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nate Beck Sent: 29 January 2009 17:18 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Silent Print from Flex on Kiosk Just a theory... but you might be able to use ExternalInterface to call the same methods within user.js, and pass the content. Since you're already got it working within Javascript. I wish I knew more about FlexPrintJob. On Thu, Jan 29, 2009 at 8:41 AM, Jeremi Bergman jere...@gmail.com mailto:jere...@gmail.com wrote: I have a flex app that I need to print an image. I have Firefox Setup running the app. in user.js for FF i have: user_pref(†print.always_print_silent†,true); user_pref(†print.show_print_progress†,false); This works perfectly when using firefox's print functionality on any standard site. It prints directly to the default printer without any user interaction. Within my App I have: public static function printCoupon(obj:UIComponent):void { // Create an instance of the FlexPrintJob class. var printJob:FlexPrintJob = new FlexPrintJob(); // Start the print job. if (printJob.start() != true) return; // Add the object to print. Do not scale it. printJob.addObject(obj, FlexPrintJobScaleType.NONE); // Send the job to the printer. printJob.send(); } The UIComponent passed in is an Image. It prints the image, but it prompts me with the print diologe box. Any thoughts? Thanks. -- Cheers, Nate http://blog.natebeck.net http://blog.natebeck.net
[flexcoders] Re: Visible issue
I've got something like creationCompleteHandler: var sysTrayIcon:SystemTrayIcon = NativeApplication.nativeApplication.icon as SystemTrayIcon; sysTrayIcon.addEventListener(MouseEvent.CLICK,undock); undock: if (!stage.nativeWindow.visible){ stage.nativeWindow.visible = true; stage.nativeWindow.activate(); }else{ stage.nativeWindow.visible=false; } and it works here to show/hide the main application window. Where are you assigning the event handler, and why are you using the funny inline function syntax ? If you stop it in the debugger, what is the bit that is actually null ? -- Tom Chiverton Thank Tom very much. In my country, few days ago is Lunar new year so I don't work and reply :( Your solution is very good if the event handler in MXML file. I correct my code follow you and have good result. But I have only special case, the event handler in AS class My code in main.mxml ?xml version=1.0 encoding=utf-8? mx:WindowedApplication mx:Script ... /mx:Script !--Call AS class -- com:SysTrayApp /com:SysTrayApp /mx:WindowedApplication and code in systrayapp.as file package com { import flash.desktop.DockIcon; import flash.desktop.NativeApplication; import flash.desktop.SystemTrayIcon; import flash.display.Loader; public class SysTrayApp extends Sprite { public function SysTrayApp():void{ NativeApplication.nativeApplication.autoExit = false; var icon:Loader = new Loader(); var iconMenu:NativeMenu = new NativeMenu(); var showCommand:NativeMenuItem = iconMenu.addItem(new NativeMenuItem(Show)); showCommand.addEventListener(Event.SELECT, function(event:Event):void { NativeApplication.nativeApplication.activeWindow.stage.nativeWindow.visible = true; }); } So the error display when I click show menuitem in taskbar TypeError: Error #1009: Cannot access a property or method of a null object reference. In debug mode the error at line NativeApplication.nativeApplication.activeWindow.stage.nativeWindow.visible = true; how to solve it?
RE: [flexcoders] RE: ItemEditors and rowHeight
You can say that again ;) Wading through 24.5k lines of code is somewhat turgid... I played around with the y offset (seeing the editor is taller than the renderer) but it sits the editor on top of the grid rather than in it, which looks more than a little bit funky. It appears the main issue is that the grid doesn't re-do the layout when an editor is added, which I'll assume is for performance reasons rather than a bug! I'll have some fun today hacking up the ADG and see if I can't make something happen, if not well time to re-think the UI ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: 29 January 2009 19:17 To: flexcoders@yahoogroups.com Subject: [flexcoders] RE: ItemEditors and rowHeight ADG is done by a different team, but in DG, editorXOffset and related properties help you put the editor just about anywhere
RE: [flexcoders] dynamic context menu problem
The solution I put in place for a similar problem... Add some javascript to eat the right click event (so the default menu isn't shown), and have it dispatch an event to the application. The application then dispatches a RIGHT_CLICK event having it bubble. Any UI component listening for that event captures is and prevents it from bubbling further (You want to let it get to the topmost point in the display list, and catch it on the way back down). That UI component opens up the menu you've set up for it. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Michael Pelz-Sherman Sent: 29 January 2009 19:53 To: flexcoders@yahoogroups.com Subject: [flexcoders] dynamic context menu problem I'm struggling to find an elegant solution to this problem: I have a Flex app that has a dynamic context (right-click) menu. The menu contains different items depending on whether various objects are selected. Ideally, I'd like to re-generate the menu options right when the user right-clicks, but I haven't found a reasonable way to do this. So instead I'm re-generating the menus every time the user (left) clicks, which is kind of expensive and is having unwanted side-effects. Unfortunately, MouseEvent.RIGHT_CLICK is AIR-only. Any suggestions would be most appreciated! - Michael
Re: [flexcoders] Re: Mimic IGoogle with Flex 3
Just keep an Array of indexes. Whenever a user changes the layout, update the array and save it on the backend ... On Fri, Jan 30, 2009 at 10:46 AM, thelordsince1984 lore...@katamail.comwrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, valdhor valdhorli...@... wrote: At the link I sent there is a link labeled Custom buttons in windows. Is that what you are trying to do? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, thelordsince1984 loreboa@ wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, valdhor valdhorlists@ wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, thelordsince1984 loreboa@ wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gregor Kiddie gkiddie@ wrote: Take a look at the MDI stuff in FlexLib. We've produced the effect you are looking for with them. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of thelordsince1984 Sent: 28 January 2009 10:10 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Mimic IGoogle with Flex 3 Hi, i would create an app that has the same functionality that igoogle provides.. in particular i would have same panels and drag and drop around a main panel with a layout like tilegrid or grid?And if i want to add panels at run time? Anybody knows a solution for this kind of problem? Thanks in advance Regards Lorenzo Thanks for the reply. It's very very cool. where can i found samples to work with it? Thanks again Regards Lorenzo Try http://code.google.com/p/flexmdi/ Thanks, i see that MDIWindow by default provide close, minimize and restore buttons. how can i add a new button to allow modify on windows? thanks thanks, it's what i'm looking for... anybody knows about to save a specific RIA's configuration? For example suppose that a user opens the browser, modify components contained in a generic application and save the modifications. So when the users restarts the application would retrieve the same configuration saved in the previous login... Thanks in advance Lorenzo -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
RE: [flexcoders] ItemEditors and rowHeight
Yeah, I've played with those properties, I have no problem having the ItemEditor sitting on top of the grid (which is what happens with an itemEditor in reality) at any size... I want the row which contains the cell I'm editing to resize itself so that the editor still appears to be a part of the row, which those do not help with. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Randy Martin Sent: 30 January 2009 05:39 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ItemEditors and rowHeight Here you go: http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_5.htm l http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_5.ht ml HTH, ~randy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Gregor Kiddie Sent: Thursday, January 29, 2009 9:17 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ItemEditors and rowHeight Looking through SearchCoders, it looks like this question has been asked repeatedly, and never with a good solution, but hey, I may as well ask again! I have an AdvancedDataGrid using the default renderer. When I edit a cell though, I want to show an ItemEditor that is taller than the row. I've tried numerous combinations of events and setting height properties to no good effect. So while I go away and delve into the ADG code to try and work out a solution, has anyone managed this successfully, and is willing to save me some head scratching time? Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk
Re: [flexcoders] itemRenderer data question (recycling)
we agree to disagree in that case. why lists based components. 1. automatic recycling 2. easier to tap into events and determine which item was clicked etc 3. itemrenderer factories repeaters are useful and we use them, but its the correct tool for the time, and mostly the correct tool is some list based control, for us anyway. On Fri, Jan 30, 2009 at 6:09 AM, Tracy Spratt tspr...@lariatinc.com wrote: …repeater is rarely the sollution… I disagree intensely. It depends entirely on the problem. Repeater should not be used to replace a List-based control for a large number of items. But it should always be considered when you start using addChild() statements driven by some data structure. And it can replace List for a limited number of items, or if you use a paged navigation instead of scroll. Repeater has gotten an undeserved bad rap from folks using it improperly. Tracy Spratt Lariat Services Flex development bandwidth available -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Johannes Nel *Sent:* Wednesday, January 28, 2009 5:05 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] itemRenderer data question (recycling) mmm, repeater is rarely the sollution IMO. remember that they render all the items (when they do not recycle) and not only the visible parts like a list. On Wed, Jan 28, 2009 at 11:23 AM, nwebb neilw...@gmail.com wrote: Ah right - wasn't aware that repeaters didn't recycle - thanks. On Fri, Jan 23, 2009 at 6:34 PM, Alex Harui aha...@adobe.com wrote: If there aren't going to me more than a few dozen funds you can use repeater and avoid recycling. Otherwise, you'll have to live with recycling and add other data like when it changed last so you can determine whether to color it or not. *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *nwebb *Sent:* Friday, January 23, 2009 12:54 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] itemRenderer data question (recycling) Yes sorry - I was scant with the details because I know people don't read long posts. I'm just using a standard array for the dp rather than an ArrayCollection and I am overwriting the array each time. Eventually I think that each bundle may have completely different items (they are actually funds - this is a financial app) , but in my test data I just have 4 funds. It was a question out of curiosity more than anything else. I was trying to knock something together quickly as this is just a prototype screen. at the moment (in the test data) I have the same 4 funds for each bundle. From the UIDs I get, it looks like the renderers get recycled and always in the same order - ie the renderer that was last used to display item4 is then used to display item1 the next time around. If you knew your List would never scroll, and you had the same four items, I wondered if there was a way to turn off recycling, or at least get the renderer in position1 to be in position1 again after a refresh. n.b. Currently I send in the old percent new percent, the override set data and determine the state using those values, so the uissue is solved, but curious to know if there is a way to get the same renderers being reused in the same order for a scenario like i described. On Thu, Jan 22, 2009 at 6:43 PM, Alex Harui aha...@adobe.com wrote: That didn't quite make sense. What is the dataprovider for the % list? Why would different bundles have data items with the same UID? Are you resetting the dataProvider when someone selects a different bundle? If the dp for the % list is a set of fields computed from the selected bundle, don't reset the dp and have those items in the dp dispatch change events. That should keep recycling to a minimum. If that doesn't work, try using a DataGrid with 1 column and headers turned off. It is possible that List has a different recycling algorithm than DG *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *nwebb *Sent:* Thursday, January 22, 2009 4:14 AM *To:* flexcoders *Subject:* [flexcoders] itemRenderer data question (recycling) Hi, I have 2 List components on a page. The one on the left displays the names of some bundles - e.g. *Bundle 1* The one on the right displays the items in the selected bundle, plus a percentage value - e.g. *item1 - 10%* *item2 - 55%* *item3 - 61%* The items are the same for all bundles, but their percentages may change as the user selects different bundles. If that happens I want to highlight that itemRenderer. (eg when the percentage changes, highlight renderer) I looked at a similar example from Alex Harui - he compares a DataGrid's listData.UID to the previous UID (stored as a property on the renderer). If they match, he knows he has the same item and changes that value. I
Re: [flexcoders] ItemEditors and rowHeight
have you considered using a sub renderer as an editor. on the adg you have a rendererProviders which allow you to alter the individual rows, var t:AdvancedDataGridRendererProvider = new AdvancedDataGridRendererProvider(); t.depth = 2; t.columnIndex = 1; t.columnSpan = 0; t.rowSpan = ... etc. I have found this class very useful when dealing with the ADG. On Fri, Jan 30, 2009 at 12:29 PM, Gregor Kiddie gkid...@inpses.co.ukwrote: Yeah, I've played with those properties, I have no problem having the ItemEditor sitting on top of the grid (which is what happens with an itemEditor in reality) at any size… I want the row which contains the cell I'm editing to resize itself so that the editor still appears to be a part of the row, which those do not help with. Gk. *Gregor Kiddie* Senior Developer *INPS* Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Randy Martin *Sent:* 30 January 2009 05:39 *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] ItemEditors and rowHeight Here you go: http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_5.html HTH, ~randy *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Gregor Kiddie *Sent:* Thursday, January 29, 2009 9:17 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] ItemEditors and rowHeight Looking through SearchCoders, it looks like this question has been asked repeatedly, and never with a good solution, but hey, I may as well ask again! I have an AdvancedDataGrid using the default renderer. When I edit a cell though, I want to show an ItemEditor that is taller than the row. I've tried numerous combinations of events and setting height properties to no good effect. So while I go away and delve into the ADG code to try and work out a solution, has anyone managed this successfully, and is willing to save me some head scratching time? Gk. *Gregor Kiddie* Senior Developer *INPS* Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk -- j:pn \\no comment
Re: [flexcoders] Mimic IGoogle with Flex 3
Lorenzo You should check this out. http://jwopitz.wordpress.com/2008/01/24/simple-drag-n-drop-for-flex-ala-igoogle/ Regards Igor Costa www.igorcosta.org On Wed, Jan 28, 2009 at 8:10 AM, thelordsince1984 lore...@katamail.comwrote: Hi, i would create an app that has the same functionality that igoogle provides.. in particular i would have same panels and drag and drop around a main panel with a layout like tilegrid or grid?And if i want to add panels at run time? Anybody knows a solution for this kind of problem? Thanks in advance Regards Lorenzo -- Igor Costa www.igorcosta.com www.igorcosta.org
RE: [flexcoders] BindingUtils and ResourceManager Question
Thanks for the suggestions, Johannes. Unfortunately, using an explicit event won't scale well in a big application since every access of a resource string from ActionScript will require this treatment. I've done a -keep-generated-actionscript and tried to grok the ActionScript code the Flex compiler generates when specifying a data binding in MXML and it just doesn't make sense to me just yet. I'm still on the hunt for a code sample using a ChangeWatcher or some means to set up the binding without explicit events. My objective is a single line of code just like using BindingUtils.bindProperty. It seems like I should be able to write a similar class as BindingUtils and expose an API that takes a Function as the chain property, instead of an Object. Anyway, thanks for your suggestion. Erik From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Johannes Nel Sent: Wednesday, January 28, 2009 4:01 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] BindingUtils and ResourceManager Question on rereading your post i realise that what you are after is change events (but my post will also help a bit me thinks) a few people did custom annotations which function like an event listener, just google a bit, i think it will make your life easier. old post/// ok, i will approach it slightly differently. I would use a presentation model to bind the text to, so component control text=presModel.someText/ /component in my pres model class presModel { [Bindable(localChange)] [Bindable (someTextChange)] public function get someText():String [Bindable(localChange)] [Bindable (someOtherTextChange)] public function get someOtherText():String } this way you have groups of text that update at the same time when your local changes (which in the workflow we use would look something like this (still inside this presModel) [Trigger (path=myModel.theLocalleValueIWantToKnowAbout)] public function set localle(localle:String) { dispatchEvent(localChange) } where this localChange event will update all the strings which have a bindable declared with that custom event name. the trigger annotation is basically an event listener and is the same as saying in my local presentation model notify me when the applications localle changes, thus someAppModel.addEventListener(localChange) jpn On Wed, Jan 28, 2009 at 12:09 AM, Thomas, Erik erik_tho...@intuit.com mailto:erik_tho...@intuit.com wrote: Having just localized a medium sized application into Spanish, I ran into a recurring pattern I had to work around that I really shouldn't have to, specifically around data binding localized resources from ActionScript. For example, in MXML, one can data bind a localized resource and when the localeChain is switched dynamically, all bound clients will requery their values and the new language will display: mx:Label text={resourceManager.getString(ResourceEnums.COMMON, 'labelAppointments}/ When the localeChain is switched, the label above will automatically update to the Spanish version, just like magic. This is a very cool feature of Flex 3 resource management. However, there are many use cases where I need to bind to resource bundles from within ActionScript, sort of like this: public class Foo { [Bindable] public var bar:String; public function Foo() { bar = ResourceManager.getString(ResourceEnums.COMMON, 'labelAppointments'); } } When the localeChain is updated, bar is obviously not automatically updated because bar is not bound to the resource, it is just a simple assignment. BindingUtil.bindProperty and bindSetter don't appear to offer parameters that will work with ResourceManager. I've experimented a little, but it does not appear possible to use BindingUtils to bind to a resource. I had to work around this by listening for a localeChange event and then reassigning the resource to the variable. This does not scale. So my question is simple: can you bind a variable to a resource in ActionScript? If so, how? Thanks! Erik Erik Thomas | Small Business Group, Intuit | Staff Engineer | 650-944-2602 -- j:pn \\no comment
RE: [flexcoders] BindingUtils and ResourceManager Question
HI Yves: This is a great suggestion! It's pretty readable and doesn't require changes anywhere else but where you instantiate the property. I will write a class to manage this, though we can't refactor our MXML (way too much code) to use the same mechanism. This will just be for those use cases where we need to bind in ActionScript which is fortunately a pretty small percentage. Thank you! Erik From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: Wednesday, January 28, 2009 6:50 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] BindingUtils and ResourceManager Question What we have done is to separate ourselves from the resource manager a bit. We have created a new class that basically has a bindable property called value. This class is passed the name of the string that is localized in the resource manager and hooks to the resource manager. It monitor for changes on the resource manager and when they are detected, the class sends an event that triggers the binding. So, it can be used directly in MXML or in the .as file by using the BindingUtils class. In pseudo code (.as file): var localizedProp:LocalizedProperty = LocalizedProperty.create(Bundle, localized property); BindingUtils.bindProperty( this, your variable, localizedProp, value); In pseudo code (.mxml file): [Bindable] var localizedProp:LocalizedProperty = LocalizedProperty.create(Bundle, localized property); mx:label text={localizedProp.value}/ http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/ msgId=135445/stime=1233144154/nc1=4507179/nc2=3848640/nc3=4836040
[flexcoders] reducing white space from chart
Hie Could anyone please help on this http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585threadid=1419947forumid=60 Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com
[flexcoders] Reducing white space in charts
Hie any idea on http://www.adobe.com/cfusion/webforums/forum/messageview.cfm? forumid=60catid=585threadid=1419947enterthread=y i m not able to reduce un-necessary space in right and bottom side of chart components
[flexcoders] Login/Registration Page ?
I have been searching all over the internet for something like a video on how to create a Flex Login page and Registration page. So I appreciate if someone could point me in the right direction on how to do this type of project. I will be using it with ASP.NET and I will be setting up a database with SQL Server 2008. This is the code/page I have so far: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute color=#060707 mx:Label x=187 y=238 text=UserName:/ mx:Label x=187 y=283 text=Password:/ mx:Label x=187 y=179 text=Enter Your Username And Password fontWeight=bold fontSize=14/ mx:TextInput x=262 y=236 id=username/ mx:TextInput x=262 y=281 id=password/ mx:Button id=submit x=262 y=328 label=submit / mx:Label x=187 y=376 text=You must register first before you enter website./ mx:Image x=187 y=20 width=150 height=113 autoLoad=true scaleContent=true mx:sourceimages/DjRuthless.jpg/mx:source /mx:Image mx:Label x=350 y=65 text=Doc's Old School Jams fontWeight=bold fontSize=26 fontFamily=Georgia color=#00/ /mx:Application
Re: [flexcoders] Does anyone know how to disable mouseover for a button.
mx:Button enabled="false" ... / yms0411 wrote: Hi i'm making a kiosk application at the moment and I want to disable all mouse actions on a button such as mouseover, rollover, rollout, etc I've extended Button and wrote the following code on the constructor this.addEventListener(MouseEvent.MOUSE_OVER, ignoreMouseEvent, true); private function ignoreMouseEvent(event:MouseEvent):void { event.stopPropagation(); } I've tried this, but it doesn't seem to be working. Any suggestions to how i can approach this? Thanks __ Information from ESET NOD32 Antivirus, version of virus signature database 3811 (20090129) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Dr Martyn Bowis (PhD Engineering) Director Net Design Ltd New Zealand www.netdesign.co.nz Mob: +64 21 932626 Skype: mbowis MSN: mbowis @ msn.com Truth brings Freedom The content of this email is confidential. If you are not the intended recipient, you must not use or distribute this information in any way, shape or form. Please notify the send of this error. Thank you.
[flexcoders] Serializing derived complex types from XML
Hi all, I am having a hard time serializing derived complex types from XML. I used the Import Web Service wizard to create proxy classes for the SOAP described elements. The XML that I am consuming comes from a .NET backed and include typing statements like this: AssetType xsi:type=CarAssetType / This element is always serialized as an instance of AssetType not an instance of CarAssetType. Does flex not support derived typing during XML serialization? Thanks for the help, Derek Basch
[flexcoders] Serializing derived complex types from XML
Hi all, I am having a hard time serializing derived complex types from XML. I used the Import Web Service wizard to create proxy classes for the SOAP described elements. The XML that I am consuming comes from a .NET backed and include typing statements like this: AssetType xsi:type=CarAssetType / This element is always serialized as an instance of AssetType not an instance of CarAssetType. Does flex not support derived typing during XML serialization? Thanks for the help, Derek Basch -- View this message in context: http://www.nabble.com/Serializing-derived-complex-types-from-XML-tp21734847p21734847.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Mask stops working when scaling hits .91
I apply a mask to my Canvas component which works great. I have a child component of the Canvas which is an image that gets scaled. When the scaling of the child hits .91, the mask stops working. Any ideas?
[flexcoders] Re: flex 2 tilelist datachange effects
I don't know how many people on this list are still using Flex 2 but it can't be too many. Is there some reason you can't update to Flex 3? If Flex 3 offers something that you can't do in Flex 2, then that would give me high motivation to upgrade. --- In flexcoders@yahoogroups.com, johndoematrix johndoemat...@... wrote: please guys help needed on this issue. am a newbie in flex and reading through the way this was done in the flex 2 flex store is confusing coz its mainly done in actionscript. would like to know how to achieve the same result using mxml or if there is a datachange effect for a flex 2 tile list like there is for flex 3. thanks
[flexcoders] Re: tiltle window called through states disabling application
Application.application.enabled = false ? --- In flexcoders@yahoogroups.com, stinasius stinas...@... wrote: hi guys i have a title window that i call through view states. i would like to know how to disable the whole application when the title window is opened without using the popup class. thanks
[flexcoders] Re: Mimic IGoogle with Flex 3
Check out Shared Objects. I my current application, whenever a user moves a window, I save that in a shared object so when the same user comes back her windows are where she left them. At http://livedocs.adobe.com/flex/3/html/help.html?content=lsos_3.html there is an LSOHandler class that I use for saving/retrieving shared objects. anybody knows about to save a specific RIA's configuration? For example suppose that a user opens the browser, modify components contained in a generic application and save the modifications. So when the users restarts the application would retrieve the same configuration saved in the previous login... Thanks in advance Lorenzo
Re: [flexcoders] Reducing white space in charts
I had the same problem, and wasn't about to get it completely eliminated. I used the following styles on my AxisRenderer for both the horizontal and vertical axes: showLabels: false; showLine: false; tickPlacement: none; minorTickPlacement: none; axisStroke: ClassReference(Stroke); I did this in code, but it should be possible via CSS too, although my experience with CSS is that it isn't very reliable. Note that I didn't want the axis appearing at all - if you do, you will have to adjust the styles. If you're still stuck, I suggest you look in the Flex source code, at the AxisRenderer.as file to see how it renders the axisrenderer, and then change it. The chart classes might help too. 2009/1/30 Vik S. Kumar vik@gmail.com: Hie any idea on http://www.adobe.com/cfusion/webforums/forum/messageview.cfm? forumid=60catid=585threadid=1419947enterthread=y i m not able to reduce un-necessary space in right and bottom side of chart components -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Playing sound from an array instead of a file
Can the Sound object be used somehow to play from a byte array of sound data instead of loading a URL? I want to load the URL separately into the byte array and then play the sound. I need real time behavior so using the new Flash 10 SoundMixer class or accessing the array after loading the sound object doesn't work for me! Regards
Re: [flexcoders] Login/Registration Page ?
Consider using a ViewStack or States as a starting point. Paul - Original Message - From: Verdell dasle...@yahoo.com To: flexcoders@yahoogroups.com Sent: Friday, January 30, 2009 1:59 AM Subject: [flexcoders] Login/Registration Page ? I have been searching all over the internet for something like a video on how to create a Flex Login page and Registration page. So I appreciate if someone could point me in the right direction on how to do this type of project. I will be using it with ASP.NET and I will be setting up a database with SQL Server 2008. This is the code/page I have so far: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute color=#060707 mx:Label x=187 y=238 text=UserName:/ mx:Label x=187 y=283 text=Password:/ mx:Label x=187 y=179 text=Enter Your Username And Password fontWeight=bold fontSize=14/ mx:TextInput x=262 y=236 id=username/ mx:TextInput x=262 y=281 id=password/ mx:Button id=submit x=262 y=328 label=submit / mx:Label x=187 y=376 text=You must register first before you enter website./ mx:Image x=187 y=20 width=150 height=113 autoLoad=true scaleContent=true mx:sourceimages/DjRuthless.jpg/mx:source /mx:Image mx:Label x=350 y=65 text=Doc's Old School Jams fontWeight=bold fontSize=26 fontFamily=Georgia color=#00/ /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Login/Registration Page ?
These threads should get you started... http://www.nabble.com/geting-info-of-a-user-who-has-loged-in-td21292230.html#a21352413 http://www.nabble.com/flex-login-popup-help-needed-please-td20772482.html#a20833766 --- In flexcoders@yahoogroups.com, Verdell dasle...@... wrote: I have been searching all over the internet for something like a video on how to create a Flex Login page and Registration page. So I appreciate if someone could point me in the right direction on how to do this type of project. I will be using it with ASP.NET and I will be setting up a database with SQL Server 2008. This is the code/page I have so far: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute color=#060707 mx:Label x=187 y=238 text=UserName:/ mx:Label x=187 y=283 text=Password:/ mx:Label x=187 y=179 text=Enter Your Username And Password fontWeight=bold fontSize=14/ mx:TextInput x=262 y=236 id=username/ mx:TextInput x=262 y=281 id=password/ mx:Button id=submit x=262 y=328 label=submit / mx:Label x=187 y=376 text=You must register first before you enter website./ mx:Image x=187 y=20 width=150 height=113 autoLoad=true scaleContent=true mx:sourceimages/DjRuthless.jpg/mx:source /mx:Image mx:Label x=350 y=65 text=Doc's Old School Jams fontWeight=bold fontSize=26 fontFamily=Georgia color=#00/ /mx:Application
[flexcoders] Generated html page backgroundcolour
I have my Flexbuilder set to the default settings. How can I make sure the generated HTML wrapper has a white backgroundColor. I know its something to do with ${bgcolor}. But how do I set this? Any help would be appreciated.
[flexcoders] Re: Generated html page backgroundcolour
I just realized mx:Application backgroundColor=white etc generates the white background in the generated html wrapper --- In flexcoders@yahoogroups.com, bhaq1972 mbha...@... wrote: I have my Flexbuilder set to the default settings. How can I make sure the generated HTML wrapper has a white backgroundColor. I know its something to do with ${bgcolor}. But how do I set this? Any help would be appreciated.
[flexcoders] PIE - Animated pie chart still displays old data when updated???
Hi everyone, I created an animated pie chart that is divided into 3 segments. mx:PieChart dataProvider= {test} mx:series mx:PieSeries labelPosition= outside nameField=name field=field mx:showDataEffect mx:SeriesInterpola te/ /mx:showDataEffect /mx:PieSeries /mx:series /mx:PieChart The pie animates perfectly but when new data comes in, if the new data has only data for 2 out of the 3 segments, it will animate correctly and display the sections correctly but the old data from the 3rd section remains as if it's cached somehow. If I minimize IE and then restore it, the old data disappears as if the page refreshes... Is there a way to automatically refresh the page still animating the pie charts. If I remove the animation I do not have this problem. Thanks. -David
[flexcoders] Re: Common base class for components
--- In flexcoders@yahoogroups.com, Jules Suggate julian.sugg...@... wrote: Is it possible for an MXML file to implement an interface? Sounds intriguing ... but won't resolve my issue unfortunately. It's the implementation code that I want them to share. I have developers on my team who are less than keen on having to duplicate repetitive code around the place -- they want to focus on cool effects, state transitions and backend integration :-) And I don't want repeated code everywhere in the app since if we want to change something, there'll eventullay be hundreds of places where we have to do so if the code is copy+pasted around the place... You could do something like monkey patching UIComponent to include your boilerplate. Another option is to simply have an as file that you include. A third option is to have a class that encapsulates the common functionality, and use composition to add it to your classes (where the classes _have_ a someClass rather than _being_ a someClass). A fourth option is to create a class with all static methods, similar to how the Math class works. HTH; -Amy
[flexcoders] Re: Common base class for components
--- In flexcoders@yahoogroups.com, Martyn Bowis mar...@... wrote: Hi Jules, Object Oriented programming in my mind is about making use of references to objects. With this in mind, here is a way I use to centralise common functionality (functions) that I can access throughout my application: 1. Create an object in the Application mxml file - this will be referenced throughout your application components eg: objApp:Object = new Object(); 2. Create functions inside a script block in the Application mxml file eg: public function myUsefulFunction(): void { ... } 3. Add references to my functions to objApp object - no () after the function name as it is a reference to it, not a call to it eg: objApp.myUsefulFunction = myUsefulFunction; I can also include function classes here and make reference to their functions 4. Pass objApp as a reference to each component - I must be sure that the deepest component is chained back to the Application mxml by passing this reference through all its parents eg: comp:mypanel id= objApp={objApp} / 5. Inside each component, bind objApp This seems to me to be an ideal recipe for making your application tightly coupled. Before you commit to changing your architecture in this way, please check out these links: http://www.adobe.com/devnet/flex/articles/loose_coupling.html http://www.adobe.com/devnet/flex/articles/graduating_pt1.html A more standard way to handle this type of thing is to use events to notify the application that it needs to do something--and letting the application figure out what that something is. HTH; Amy
[flexcoders] FW: Sandbox violation:Access denied
Hi, I wrote an application that has an SWFLoader to load another swf movie/application into the main application. The server where my sub application is served from already has the crossdomain.xml, letting any domain to access data from it. However, I got the following error message: SecurityError: Error #2047: Security sandbox violation: parent: http://submovie.swf http://submovie.swf http://submovie.swf http://submovie.swf http://submovie.swf http://submovie.swf http://submovie.swf http://submovie.swf cannot access file:///C:/Documents file:///C:\Documents file:///C:\Documents file:///C:\Documents and Settings/IvanS/My Documents/Flex Builder 2/parentApp.swf. at flash.display::DisplayObject/get parent() at mx.managers::SystemManager/::executeCallbacks() at mx.managers::SystemManager/::docFrameHandler() Does anyone have any idea how to handle this? Thanks, Sanket. -**Nihilent*** *** All information contained in this communication is confidential, proprietary, privileged and is intended for the addressees only. If youhave received this E-mail in error please notify mail administrator by telephone on +91-20-39846100 or E-mail the sender by replying to this message, and then delete this E-mail and other copies of it from your computer system. Any unauthorized dissemination,publication, transfer or use of the contents of this communication, with or without modifications is punishable under the relevant law. Nihilent has scanned this mail with current virus checking technologies. However, Nihilent makes no representations or warranties to the effect that this communication is virus-free. Nihilent reserves the right to monitor all E-mail communications through its Corporate Network. *** *-
Re: [flexcoders] Re: Common base class for components
I've just read this article. Very nice... Does anyone could explain me or point me some URL about the correct flow of Flex building components methods calls. I've never seen any documentation about it. As far as I understand, after invalidateProperties method, the further calls will happen commitProperties measure updateDisplayList Is it in that order? Is there any other important calls to know on? Cheers -- Marco Catunda On Thu, Jan 29, 2009 at 2:00 PM, Amy amyblankens...@bellsouth.net wrote: http://www.munkiihouse.com/?p=37
[flexcoders] checkbox itemEditor in DataGrid
Hi, I have add a checkbox itemEditor in DataGrid, I want to make current row selected when I select the checkbox. Please give me a deal how to do that. Thanks you for your help Mark my current code mx:DataGrid x=531 y=273 editable=true dataProvider={inventoryDB} mx:DataGridColumn headerText=Selection dataField=mySelectin labelFunction=selectLabeler itemEditor=mx.controls.CheckBox editorDataField=selected width=80/ /mx:DataGrid private function selectLabeler( item:Object, col:* ) : String { if(item.mySelectin == ){ item.mySelectin = false; } return item.mySelectin ? Yes : Not; }
Re: [flexcoders] dynamic context menu problem
Thanks Gregor! This is slightly more elegant than the solution I've come up with. I *think* I follow you up to the last sentence. How do you force the UI component to display its context menu? The display() method is AIR-only... right? Is this an actual ContextMenu instance or a UI component masquerading as a ContextMenu? - Michael From: Gregor Kiddie gkid...@inpses.co.uk To: flexcoders@yahoogroups.com Sent: Friday, January 30, 2009 5:22:20 AM Subject: RE: [flexcoders] dynamic context menu problem The solution I put in place for a similar problem… Add some javascript to eat the right click event (so the default menu isn’t shown), and have it dispatch an event to the application. The application then dispatches a “RIGHT_CLICK” event having it bubble. Any UI component listening for that event captures is and prevents it from bubbling further (You want to let it get to the topmost point in the display list, and catch it on the way back down). That UI component opens up the menu you’ve set up for it. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, LondonSW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co. uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ inps.co.uk From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Michael Pelz-Sherman Sent: 29 January 2009 19:53 To: flexcod...@yahoogro ups.com Subject: [flexcoders] dynamic context menu problem I'm struggling to find an elegant solution to this problem: I have a Flex app that has a dynamic context (right-click) menu. The menu contains different items depending on whether various objects are selected. Ideally, I'd like to re-generate the menu options right when the user right-clicks, but I haven't found a reasonable way to do this. So instead I'm re-generating the menus every time the user (left) clicks, which is kind of expensive and is having unwanted side-effects. Unfortunately, MouseEvent.RIGHT_ CLICK is AIR-only. Any suggestions would be most appreciated! - Michael
[flexcoders] Re: ItemEditors and rowHeight
--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote: Yeah, I've played with those properties, I have no problem having the ItemEditor sitting on top of the grid (which is what happens with an itemEditor in reality) at any size... I want the row which contains the cell I'm editing to resize itself so that the editor still appears to be a part of the row, which those do not help with. Could you persuade the renderer behind the editor to remeasure itself to a larger size when the editor shows up?
[flexcoders] [flexcoder] RemoteClass + ArrayCollection question
Right now I'm playing around with the RemoteClass feature with a few ActionScript classes. What I've noticed is that if I have a single object I can nest AS classes. So if I have two AS classes foo and bar I can have the following work [RemoteClass(alias=com.ca.foo.Foo)] public class foo { public var ID:int; public something:bar; } this gets converted correctly when I call a function that returns a foo. bar is correctly identified as a bar and is placed as such. Now here's where I've run into trouble. If I try to have an array of bars I can't figure out how to get this to work correctly. Example: [RemoteClass(alias=com.ca.foo.Foo)] public class foo { public var ID:int [ArrayElementType(MenuItemSetting)] public something:ArrayCollection; } This does not work. When I return from the remoteObject call foo is done correctly up to the ArrayCollection. The ArrayCollection has objects in it instead of MenuItemSettings. Here is the result function that has objects for the ArrayCollection Items public function Success(event:ResultEvent):void { var test:foo; if(event.result != null) { test = MenuItemPackage(event.result); } } However, here's where it utterly baffles me. In my result function if I add this one line of code to it, the objects for all items in the collection become type bar. public function Success(event:ResultEvent):void { var test:foo; bar(event.result.something[0]); if(event.result != null) { test = foo(event.result); } } I do realize this will have issues if there are no elements in the ArrayCollection or if the result is null. What the heck is happing here? I can even put the breakpoint in before the bar(event.result.something[0]); and look at result and it is typed to the bar. My other question is, can this be done automatically? Or do I need to leave in the bar(event.result.something[0]);? Thanks for the help.
[flexcoders] How to encode query parameters?
Hi All, Every service call to my server requires query params (POST and GET), even some POST requests will send query params. I have found that with HTTPService if I specify the Object with key value pairs in send( queryParams) it does not send the xml I set as the data property. Some of my query params need encoding but I cant seem to find a urlencode(str) in Flex 3 SDK like in JavaScript. Does anyone know how I can encode a string for a query param? Any help much appreciated. Greg
[flexcoders] Re: BindingUtils and ResourceManager Question
--- In flexcoders@yahoogroups.com, Thomas, Erik erik_tho...@... wrote: Thanks for the suggestions, Johannes. Unfortunately, using an explicit event won't scale well in a big application since every access of a resource string from ActionScript will require this treatment. I've done a -keep-generated-actionscript and tried to grok the ActionScript code the Flex compiler generates when specifying a data binding in MXML and it just doesn't make sense to me just yet. I'm still on the hunt for a code sample using a ChangeWatcher or some means to set up the binding without explicit events. My objective is a single line of code just like using BindingUtils.bindProperty. It seems like I should be able to write a similar class as BindingUtils and expose an API that takes a Function as the chain property, instead of an Object. Anyway, thanks for your suggestion. Have you seen this presentation? http://tinyurl.com/databinding I've found it really useful. HTH; Amy
RE: [flexcoders] Re: Common base class for components
If you can find Deepa's presentation at Max, I'd read that (You can probably get it on Adobe TV). It was the best presentation I've seen on the component lifecycle. So much so, I'm threatening to staple it to some developers heads round here. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Marco Catunda Sent: 30 January 2009 15:32 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Common base class for components I've just read this article. Very nice... Does anyone could explain me or point me some URL about the correct flow of Flex building components methods calls. I've never seen any documentation about it. As far as I understand, after invalidateProperties method, the further calls will happen commitProperties measure updateDisplayList Is it in that order? Is there any other important calls to know on? Cheers -- Marco Catunda On Thu, Jan 29, 2009 at 2:00 PM, Amy amyblankens...@bellsouth.net mailto:amyblankenship%40bellsouth.net wrote: http://www.munkiihouse.com/?p=37 http://www.munkiihouse.com/?p=37
Re: [flexcoders] Does anyone know how to disable mouseover for a button.
He doesn't want to disable the button... He just doesn't want the button to change it's look when he rolls over it with the mouse. The way I've done it in the past is to make the upState and the overState the same. HTH, Nate On Thu, Jan 29, 2009 at 7:06 PM, Martyn Bowis mar...@netdesign.co.nzwrote: mx:Button enabled=false ... / yms0411 wrote: Hi i'm making a kiosk application at the moment and I want to disable all mouse actions on a button such as mouseover, rollover, rollout, etc I've extended Button and wrote the following code on the constructor this.addEventListener(MouseEvent.MOUSE_OVER, ignoreMouseEvent, true); private function ignoreMouseEvent(event:MouseEvent):void { event.stopPropagation(); } I've tried this, but it doesn't seem to be working. Any suggestions to how i can approach this? Thanks __ Information from ESET NOD32 Antivirus, version of virus signature database 3811 (20090129) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Dr Martyn Bowis (PhD Engineering) Director Net Design Ltd New Zealand www.netdesign.co.nz Mob: +64 21 932626 Skype: mbowis MSN: mbowis @ msn.com http://www.netdesign.co.nz/ Truth brings Freedom The content of this email is confidential. If you are not the intended recipient, you must not use or distribute this information in any way, shape or form. Please notify the send of this error. Thank you. -- Cheers, Nate http://blog.natebeck.net LogoForBanner.gif
RE: [flexcoders] dynamic context menu problem
I wrote a routine that all my UIComponents can link into which uses the standard Flex Menu in place of throwing up the context menu. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Michael Pelz-Sherman Sent: 30 January 2009 15:44 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] dynamic context menu problem Thanks Gregor! This is slightly more elegant than the solution I've come up with. I *think* I follow you up to the last sentence. How do you force the UI component to display its context menu? The display() method is AIR-only... right? Is this an actual ContextMenu instance or a UI component masquerading as a ContextMenu? - Michael From: Gregor Kiddie gkid...@inpses.co.uk To: flexcoders@yahoogroups.com Sent: Friday, January 30, 2009 5:22:20 AM Subject: RE: [flexcoders] dynamic context menu problem The solution I put in place for a similar problem... Add some javascript to eat the right click event (so the default menu isn't shown), and have it dispatch an event to the application. The application then dispatches a RIGHT_CLICK event having it bubble. Any UI component listening for that event captures is and prevents it from bubbling further (You want to let it get to the topmost point in the display list, and catch it on the way back down). That UI component opens up the menu you've set up for it. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co. uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ inps.co.uk From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Michael Pelz-Sherman Sent: 29 January 2009 19:53 To: flexcod...@yahoogro ups.com Subject: [flexcoders] dynamic context menu problem I'm struggling to find an elegant solution to this problem: I have a Flex app that has a dynamic context (right-click) menu. The menu contains different items depending on whether various objects are selected. Ideally, I'd like to re-generate the menu options right when the user right-clicks, but I haven't found a reasonable way to do this. So instead I'm re-generating the menus every time the user (left) clicks, which is kind of expensive and is having unwanted side-effects. Unfortunately, MouseEvent.RIGHT_ CLICK is AIR-only. Any suggestions would be most appreciated! - Michael
RE: [flexcoders] Re: ItemEditors and rowHeight
That's what I've been playing with today, but again, once the Grid is rendered, I can't seem to make it re-layout the rows. I took a look at the AdvancedDataGridRendererProviders that Johannes suggested, but it falls under the same category. I feel I'm missing something totally obvious, but no-one else seems to have found a decent solution either, so maybe not... Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Amy Sent: 30 January 2009 15:48 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ItemEditors and rowHeight --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gregor Kiddie gkid...@... wrote: Yeah, I've played with those properties, I have no problem having the ItemEditor sitting on top of the grid (which is what happens with an itemEditor in reality) at any size... I want the row which contains the cell I'm editing to resize itself so that the editor still appears to be a part of the row, which those do not help with. Could you persuade the renderer behind the editor to remeasure itself to a larger size when the editor shows up?
Re: [flexcoders] Playing sound from an array instead of a file
I saw a demo at MAX where they used Alchemy ( http://labs.adobe.com/technologies/alchemy/) to unencode an OGG Vorbis file and play it. Maybe it's something similar to what you're trying to do. On Fri, Jan 30, 2009 at 6:19 AM, Jo Morano jo.moran...@gmail.com wrote: Can the Sound object be used somehow to play from a byte array of sound data instead of loading a URL? I want to load the URL separately into the byte array and then play the sound. I need real time behavior so using the new Flash 10 SoundMixer class or accessing the array after loading the sound object doesn't work for me! Regards -- Cheers, Nate http://blog.natebeck.net
[flexcoders] Re: How to encode query parameters?
You might look for the global ActionScript functions encodeURI() or encodeURIComponent()? http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/package.html#encodeURI() Marc --- In flexcoders@yahoogroups.com, Greg Hess flexeff...@... wrote: Hi All, Every service call to my server requires query params (POST and GET), even some POST requests will send query params. I have found that with HTTPService if I specify the Object with key value pairs in send( queryParams) it does not send the xml I set as the data property. Some of my query params need encoding but I cant seem to find a urlencode(str) in Flex 3 SDK like in JavaScript. Does anyone know how I can encode a string for a query param? Any help much appreciated. Greg
[flexcoders] Accessing XML child nodes in a LineChart
Hi all, I'm trying to use an XML document as the dataprovider for a chart and not able to make it work. A test case follows... mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal width=100% height=100% mx:XMLListCollection id=statsXml mx:source mx:XMLList dailyStats run time=00:00 campus name=Atlanta56/campus campus name=Miami71/campus campus name=Los Angeles21/campus campus name=New York25/campus campus name=Chicago45/campus campus name=Orlando34/campus campus name=San Francisco28/campus /run run time=01:00 campus name=Atlanta41/campus campus name=Miami46/campus campus name=Los Angeles24/campus campus name=New York61/campus campus name=Chicago51/campus campus name=Orlando33/campus campus name=San Francisco29/campus /run run time=02:00 campus name=Atlanta67/campus campus name=Miami32/campus campus name=Los Angeles14/campus campus name=New York47/campus campus name=Chicago40/campus campus name=Orlando30/campus campus name=San Francisco24/campus /run run time=03:00 campus name=Atlanta49/campus campus name=Miami55/campus campus name=Los Angeles33/campus campus name=New York12/campus campus name=Chicago62/campus campus name=Orlando42/campus campus name=San Francisco48/campus /run /dailyStats /mx:XMLList /mx:source /mx:XMLListCollection mx:Stroke id = s1 color=red weight=2/ mx:LineChart id=lchart height=100% width=100% dataProvider={statsXml.descendants('run')} mx:horizontalAxis mx:CategoryAxis categoryField=@time/ /mx:horizontalAxis mx:verticalAxis mx:LinearAxis title=Minutes/ /mx:verticalAxis mx:series mx:LineSeries yField=campus.(@name=='Orlando') displayName=Orlando lineStroke={s1}/ /mx:series /mx:LineChart mx:Legend dataProvider={lchart}/ /mx:Application Using 'dataProvider={statsXml}', I wasn't getting anything. Adding the '.descendants('run)' I at least got the time indicators on the horizontal axis. But nothing I've tried actually draws the line. Of course the ultimate goal is to have a line for each campus. But I'd like to see it work with at least one... ;-) thanks for any help, Greg
[flexcoders] Create Application from database error?
I have setup a login system with Flex and ASP.NET and SQL Server 2008 Pro. I have already setup everything for the SQL database for the username and password. I also setup the permissions for the database; so that it has a database name, sql user name and password for the security. Now when I go to Create Application from Database, I give it a name, then when I get to the screen Simple SQL Server Connection I put in the server name localhost, database name sample:testdb, Username;flexUser, and then the password. When I click test connection, it comes back with this error: java.sql.SQLException: Login failed for user 'flexUser'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:599) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.init(ConnectionJDBC2.java:331) at net.sourceforge.jtds.jdbc.ConnectionJDBC3.init(ConnectionJDBC3.java:50) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178) at org.eclipse.datatools.connectivity.db.generic.JDBCConnection.createConnection(JDBCConnection.java:87) at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104) at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53) at org.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory.createConnection(JDBCConnectionFactory.java:52) at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:77) at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:354) at com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnectionSimple(BaseConnectionProfilePage.java:70) at com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnection(BaseConnectionProfilePage.java:51) at org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage$1.widgetSelected(ConnectionProfileDetailsPage.java:85) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at com.adobe.flexbuilder.dbwizard.ui.DbWizard$8.widgetSelected(DbWizard.java:598) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at com.adobe.flexbuilder.dbwizard.actions.DBWizardAction.run(DBWizardAction.java:69) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java:112) at
[flexcoders] Re: How to cancel HTTPRequest?
Once you sent a HTTP request, you cannot cancel it any more from the client side. You could send a second request to the server to cancel the previous request but that can lead to very unpleasant effects, e.g. when a cancel request arrives before the original one. So either don't fire the original request or make the server robust enough for all request. Marc --- In flexcoders@yahoogroups.com, Dmitri Girski mite...@... wrote: Hi everybody, How can I cancel the http request? Is there a way to close the underlying socket? I've got a situation when first HTTP request is in progress (waiting/receiving the results), and I have to fetch the data again, as I know that the dataset I am expecting to get is already obsolete. I tried to do this: requst.cancel(); request.disconnect(); request = new HTTPService() But looking at the server logs I can see that connection is still there and backend performs everything it has to and closes the connection only when all data is sent. (Apache is at the backend) Any comments or help is appreciated! Thanks! Cheers, Dmitri.
[flexcoders] Re: flex 2 tilelist datachange effects
i would have upgraded to flex 3 but its very expensive for me. currently dont have the money to do that. otherwise i would definitely love to upgrade. so in the meantime am using flex 2. any help on the tilelist datachange effect?
Re: [flexcoders] Re: How to encode query parameters?
Ah, there it is, encode( str:String ) is what I needed. Keep forgetting about those global function :-). Thanks Marc! Greg On Fri, Jan 30, 2009 at 11:32 AM, hu22hugo hu2h...@hotmail.com wrote: You might look for the global ActionScript functions encodeURI() or encodeURIComponent()? http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/package.html#encodeURI() Marc --- In flexcoders@yahoogroups.com, Greg Hess flexeff...@... wrote: Hi All, Every service call to my server requires query params (POST and GET), even some POST requests will send query params. I have found that with HTTPService if I specify the Object with key value pairs in send( queryParams) it does not send the xml I set as the data property. Some of my query params need encoding but I cant seem to find a urlencode(str) in Flex 3 SDK like in JavaScript. Does anyone know how I can encode a string for a query param? Any help much appreciated. Greg
[flexcoders] Conditional compilation for variable declarations
I'm able to use conditional compilation for functions by prefacing them with CONFIG::xxx and other blocks by wrapping them in if(CONFIG::xxx), but I'm not sure how to do conditional declaration of class variables without making the whole class conditional. If, for example, I have a single SQL class variable in a class that's otherwise portable between Flex and AIR, do I need to create separate classes for the two frameworks, or is there a convenient way to conditionally declare the SQL variable? TIA
Re: [flexcoders] dynamic context menu problem
Ah, got it. Thanks, I wish I had taken this approach from the start! From: Gregor Kiddie gkid...@inpses.co.uk To: flexcoders@yahoogroups.com Sent: Friday, January 30, 2009 11:15:54 AM Subject: RE: [flexcoders] dynamic context menu problem I wrote a routine that all my UIComponents can link into which uses the standard Flex Menu in place of throwing up the context menu. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, LondonSW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co. uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ inps.co.uk From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Michael Pelz-Sherman Sent: 30 January 2009 15:44 To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] dynamic context menu problem Thanks Gregor! This is slightly more elegant than the solution I've come up with. I *think* I follow you up to the last sentence. How do you force the UI component to display its context menu? The display() method is AIR-only... right? Is this an actual ContextMenu instance or a UI component masquerading as a ContextMenu? - Michael From:Gregor Kiddie gkid...@inpses. co.uk To: flexcod...@yahoogro ups.com Sent: Friday, January 30, 2009 5:22:20 AM Subject: RE: [flexcoders] dynamic context menu problem The solution I put in place for a similar problem… Add some javascript to eat the right click event (so the default menu isn’t shown), and have it dispatch an event to the application. The application then dispatches a “RIGHT_CLICK” event having it bubble. Any UI component listening for that event captures is and prevents it from bubbling further (You want to let it get to the topmost point in the display list, and catch it on the way back down). That UI component opens up the menu you’ve set up for it. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co. uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ inps.co.uk From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Michael Pelz-Sherman Sent: 29 January 2009 19:53 To: flexcod...@yahoogro ups.com Subject: [flexcoders] dynamic context menu problem I'm struggling to find an elegant solution to this problem: I have a Flex app that has a dynamic context (right-click) menu. The menu contains different items depending on whether various objects are selected. Ideally, I'd like to re-generate the menu options right when the user right-clicks, but I haven't found a reasonable way to do this. So instead I'm re-generating the menus every time the user (left) clicks, which is kind of expensive and is having unwanted side-effects. Unfortunately, MouseEvent.RIGHT_ CLICK is AIR-only. Any suggestions would be most appreciated! - Michael
[flexcoders] Is there a best-practice for knowing when a component is being shown to the user
Hello, imagine an application composed of a nested hierarchy of Components, ViewStacks, View States, Navigators, etc. How can a component on the bottom of the hierarchy run a function every time he is shown to the user? The show event is only dispatched when the component visibility changes to true. If we are changing the component's parent visibility, the component might not be visible on screen, but the event is never dispatched. So, this means that a component never knows if it is being shown to the user or not (really visible!). This is a huge problem, since until now I wasn't able to find a clean an unobtrusive solution. Is there a best-practice for solving this problem? Thanks, João Saleiro
[flexcoders] Re: Common base class for components
--- In flexcoders@yahoogroups.com, Marco Catunda marco.catu...@... wrote: I've just read this article. Very nice... Does anyone could explain me or point me some URL about the correct flow of Flex building components methods calls. I've never seen any documentation about it. As far as I understand, after invalidateProperties method, the further calls will happen commitProperties measure updateDisplayList No, if you call invalidateProperties(), then you're scheduling a call to commitProperties() only. invalidateSize() will schedule a call to measure(), and invalidateDisplayList() will schedule a call to updateDisplayList(). This gives you fine-grained control to only call the functions you really need. See this: http://livedocs.adobe.com/flex/3/html/help.html? content=ascomponents_advanced_2.html For more information. I think it just takes time and experimentation to get your head around it. I found that using the flash component kit's UIMovieClip, which doesn't include the standard invalidation methods, was a real eye opener to show me why the framework works as it does. HTH; Amy
[flexcoders] Re: [flexcoder] RemoteClass + ArrayCollection question
--- In flexcoders@yahoogroups.com, Curtis Barrett curtis.barr...@... wrote: Right now I'm playing around with the RemoteClass feature with a few ActionScript classes. What I've noticed is that if I have a single object I can nest AS classes. So if I have two AS classes foo and bar I can have the following work [RemoteClass(alias=com.ca.foo.Foo)] public class foo { public var ID:int; public something:bar; } this gets converted correctly when I call a function that returns a foo. bar is correctly identified as a bar and is placed as such. Now here's where I've run into trouble. If I try to have an array of bars I can't figure out how to get this to work correctly. Example: [RemoteClass(alias=com.ca.foo.Foo)] public class foo { public var ID:int [ArrayElementType(MenuItemSetting)] public something:ArrayCollection; } This does not work. When I return from the remoteObject call foo is done correctly up to the ArrayCollection. The ArrayCollection has objects in it instead of MenuItemSettings. Here is the result function that has objects for the ArrayCollection Items public function Success(event:ResultEvent):void { var test:foo; if(event.result != null) { test = MenuItemPackage(event.result); } } However, here's where it utterly baffles me. In my result function if I add this one line of code to it, the objects for all items in the collection become type bar. public function Success(event:ResultEvent):void { var test:foo; bar(event.result.something[0]); if(event.result != null) { test = foo(event.result); } } I do realize this will have issues if there are no elements in the ArrayCollection or if the result is null. What the heck is happing here? I can even put the breakpoint in before the bar(event.result.something [0]); and look at result and it is typed to the bar. My other question is, can this be done automatically? Or do I need to leave in the bar(event.result.something[0]);? I'd be inclined to guess that the only hard reference to bar in the class that calls the service is that one line where you call bar(event.result.something[0]); Try doing this: private var dummy:bar; And see if that fixes the problem http://flexdiary.blogspot.com/2008/11/thoughts-on-remoting.html HTH; Amy
[flexcoders] Re: Accessing XML child nodes in a LineChart
--- In flexcoders@yahoogroups.com, Greg Groves greg.gro...@... wrote: Hi all, I'm trying to use an XML document as the dataprovider for a chart and not able to make it work. A test case follows... ... thanks for any help, You may or may not find this useful: http://flexdiary.blogspot.com/2008/08/charting-example.html
RE: [flexcoders] itemRenderer data question (recycling)
As you say, use the right tool for the job. But only the person doing the job is in a position to select his tools. And a couple followups, for the benefit of anyone coming across this thread in the future: 1. Recycling is implemented for performance reasons. If your dataset is small, then recycling can be a negative,as the original poster has discovered. Repeater allows recycling if desired. 2. If you are having difficulty with events from repeated content, it is probably because you are using declarative mxml to build your repeated content. Instead, repeat a custom component. You can declare metadata events, and assign a handler directly in the mxml. Events are actually easier with repeated content than with itemRenderers, particularly if you are uncomfortable with bubbling events, as some are. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Johannes Nel Sent: Friday, January 30, 2009 5:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] itemRenderer data question (recycling) we agree to disagree in that case. why lists based components. 1. automatic recycling 2. easier to tap into events and determine which item was clicked etc 3. itemrenderer factories repeaters are useful and we use them, but its the correct tool for the time, and mostly the correct tool is some list based control, for us anyway. On Fri, Jan 30, 2009 at 6:09 AM, Tracy Spratt tspr...@lariatinc.com mailto:tspr...@lariatinc.com wrote: ...repeater is rarely the sollution... I disagree intensely. It depends entirely on the problem. Repeater should not be used to replace a List-based control for a large number of items. But it should always be considered when you start using addChild() statements driven by some data structure. And it can replace List for a limited number of items, or if you use a paged navigation instead of scroll. Repeater has gotten an undeserved bad rap from folks using it improperly. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Johannes Nel Sent: Wednesday, January 28, 2009 5:05 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] itemRenderer data question (recycling) mmm, repeater is rarely the sollution IMO. remember that they render all the items (when they do not recycle) and not only the visible parts like a list. On Wed, Jan 28, 2009 at 11:23 AM, nwebb neilw...@gmail.com mailto:neilw...@gmail.com wrote: Ah right - wasn't aware that repeaters didn't recycle - thanks. On Fri, Jan 23, 2009 at 6:34 PM, Alex Harui aha...@adobe.com mailto:aha...@adobe.com wrote: If there aren't going to me more than a few dozen funds you can use repeater and avoid recycling. Otherwise, you'll have to live with recycling and add other data like when it changed last so you can determine whether to color it or not. From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of nwebb Sent: Friday, January 23, 2009 12:54 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] itemRenderer data question (recycling) Yes sorry - I was scant with the details because I know people don't read long posts. I'm just using a standard array for the dp rather than an ArrayCollection and I am overwriting the array each time. Eventually I think that each bundle may have completely different items (they are actually funds - this is a financial app) , but in my test data I just have 4 funds. It was a question out of curiosity more than anything else. I was trying to knock something together quickly as this is just a prototype screen. at the moment (in the test data) I have the same 4 funds for each bundle. From the UIDs I get, it looks like the renderers get recycled and always in the same order - ie the renderer that was last used to display item4 is then used to display item1 the next time around. If you knew your List would never scroll, and you had the same four items, I wondered if there was a way to turn off recycling, or at least get the renderer in position1 to be in position1 again after a refresh. n.b. Currently I send in the old percent new percent, the override set data and determine the state using those values, so the uissue is solved, but curious to know if there is a way to get the same renderers being reused in the same order for a scenario like i described. On Thu, Jan 22, 2009 at 6:43 PM, Alex Harui aha...@adobe.com mailto:aha...@adobe.com wrote: That didn't quite make sense. What is the dataprovider for the % list? Why would
[flexcoders] Re: Is there a best-practice for knowing when a component is being shown to the user
Hum... it's seems this is already filled on Adobe bugbase: https://bugs.adobe.com/jira/browse/SDK-14150
RE: [flexcoders] checkbox itemEditor in DataGrid
Have the renderer dispatch a bubbling event on change of the checkbox. In the handler, you can access the item, and get the item index and the checked state. Use that to set the selectedIndex on the DataGrid. Of course the usual itemRenderer recycling caveats apply. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markflex2007 Sent: Friday, January 30, 2009 10:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] checkbox itemEditor in DataGrid Hi, I have add a checkbox itemEditor in DataGrid, I want to make current row selected when I select the checkbox. Please give me a deal how to do that. Thanks you for your help Mark my current code mx:DataGrid x=531 y=273 editable=true dataProvider={inventoryDB} mx:DataGridColumn headerText=Selection dataField=mySelectin labelFunction=selectLabeler itemEditor=mx.controls.CheckBox editorDataField=selected width=80/ /mx:DataGrid private function selectLabeler( item:Object, col:* ) : String { if(item.mySelectin == ){ item.mySelectin = false; } return item.mySelectin ? Yes : Not; }
RE: [flexcoders] Re: Generated html page backgroundcolour
Does that property actually change the background color in the wrapper, or does the Flex app just cover the entire browser? I do not know offhand. In a recent thread, someone noted that the browser background stayed the original color for a brief time before the Flex app loaded, and suggested adding an entry to the Additional Compiler Options in the Flex Builder Properties, to actually compile the background color into the wrapper. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of bhaq1972 Sent: Friday, January 30, 2009 10:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Generated html page backgroundcolour I just realized mx:Application backgroundColor=white etc generates the white background in the generated html wrapper --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , bhaq1972 mbha...@... wrote: I have my Flexbuilder set to the default settings. How can I make sure the generated HTML wrapper has a white backgroundColor. I know its something to do with ${bgcolor}. But how do I set this? Any help would be appreciated.
RE: [flexcoders] Re: Login/Registration Page ?
Thanks for all the help. I will try the suggestions. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Friday, January 30, 2009 8:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Login/Registration Page ? These threads should get you started... http://www.nabble.com/geting-info-of-a-user-who-has-loged-in-td21292230.html #a21352413 http://www.nabble.com/flex-login-popup-help-needed-please-td20772482 ..html#a20833766 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Verdell dasle...@... wrote: I have been searching all over the internet for something like a video on how to create a Flex Login page and Registration page. So I appreciate if someone could point me in the right direction on how to do this type of project. I will be using it with ASP.NET and I will be setting up a database with SQL Server 2008. This is the code/page I have so far: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute color=#060707 mx:Label x=187 y=238 text=UserName:/ mx:Label x=187 y=283 text=Password:/ mx:Label x=187 y=179 text=Enter Your Username And Password fontWeight=bold fontSize=14/ mx:TextInput x=262 y=236 id=username/ mx:TextInput x=262 y=281 id=password/ mx:Button id=submit x=262 y=328 label=submit / mx:Label x=187 y=376 text=You must register first before you enter website./ mx:Image x=187 y=20 width=150 height=113 autoLoad=true scaleContent=true mx:sourceimages/DjRuthless.jpg/mx:source /mx:Image mx:Label x=350 y=65 text=Doc's Old School Jams fontWeight=bold fontSize=26 fontFamily=Georgia color=#00/ /mx:Application
Re: [flexcoders] Re: [flexcoder] RemoteClass + ArrayCollection question
Thank you for the suggestion, it worked perfectly. Curtis Barrett On Fri, Jan 30, 2009 at 10:13 AM, Amy amyblankens...@bellsouth.net wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Curtis Barrett curtis.barr...@... wrote: Right now I'm playing around with the RemoteClass feature with a few ActionScript classes. What I've noticed is that if I have a single object I can nest AS classes. So if I have two AS classes foo and bar I can have the following work [RemoteClass(alias=com.ca.foo.Foo)] public class foo { public var ID:int; public something:bar; } this gets converted correctly when I call a function that returns a foo. bar is correctly identified as a bar and is placed as such. Now here's where I've run into trouble. If I try to have an array of bars I can't figure out how to get this to work correctly. Example: [RemoteClass(alias=com.ca.foo.Foo)] public class foo { public var ID:int [ArrayElementType(MenuItemSetting)] public something:ArrayCollection; } This does not work. When I return from the remoteObject call foo is done correctly up to the ArrayCollection. The ArrayCollection has objects in it instead of MenuItemSettings. Here is the result function that has objects for the ArrayCollection Items public function Success(event:ResultEvent):void { var test:foo; if(event.result != null) { test = MenuItemPackage(event.result); } } However, here's where it utterly baffles me. In my result function if I add this one line of code to it, the objects for all items in the collection become type bar. public function Success(event:ResultEvent):void { var test:foo; bar(event.result.something[0]); if(event.result != null) { test = foo(event.result); } } I do realize this will have issues if there are no elements in the ArrayCollection or if the result is null. What the heck is happing here? I can even put the breakpoint in before the bar(event.result.something [0]); and look at result and it is typed to the bar. My other question is, can this be done automatically? Or do I need to leave in the bar(event.result.something[0]);? I'd be inclined to guess that the only hard reference to bar in the class that calls the service is that one line where you call bar(event.result.something[0]); Try doing this: private var dummy:bar; And see if that fixes the problem http://flexdiary.blogspot.com/2008/11/thoughts-on-remoting.html HTH; Amy
Re: [flexcoders] Is there a best-practice for knowing when a component is being shown to the user
Hi João Just looking it over, try to bindable visible property from parent's container. It could be a feasible work around. Cheers -- Marco Catunda On Fri, Jan 30, 2009 at 3:03 PM, João joao.sale...@webfuel.pt wrote: Hello, imagine an application composed of a nested hierarchy of Components, ViewStacks, View States, Navigators, etc. How can a component on the bottom of the hierarchy run a function every time he is shown to the user? The show event is only dispatched when the component visibility changes to true. If we are changing the component's parent visibility, the component might not be visible on screen, but the event is never dispatched. So, this means that a component never knows if it is being shown to the user or not (really visible!). This is a huge problem, since until now I wasn't able to find a clean an unobtrusive solution. Is there a best-practice for solving this problem? Thanks, João Saleiro
Re: [flexcoders] Reducing white space in charts
Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com Hie Thankx for the response.. I am still pretty new so could you tell me where exactly to write all this? Vik On Fri, Jan 30, 2009 at 7:48 PM, Sam Lai samuel@gmail.com wrote: I had the same problem, and wasn't about to get it completely eliminated. I used the following styles on my AxisRenderer for both the horizontal and vertical axes: showLabels: false; showLine: false; tickPlacement: none; minorTickPlacement: none; axisStroke: ClassReference(Stroke); I did this in code, but it should be possible via CSS too, although my experience with CSS is that it isn't very reliable. Note that I didn't want the axis appearing at all - if you do, you will have to adjust the styles. If you're still stuck, I suggest you look in the Flex source code, at the AxisRenderer.as file to see how it renders the axisrenderer, and then change it. The chart classes might help too. 2009/1/30 Vik S. Kumar vik@gmail.com vik.ceo%40gmail.com: Hie any idea on http://www.adobe.com/cfusion/webforums/forum/messageview.cfm? forumid=60catid=585threadid=1419947enterthread=y i m not able to reduce un-necessary space in right and bottom side of chart components -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
RE: [flexcoders] Re: Login/Registration Page ?
The process of logging in, getting authenticated and then staying authenticated for subsequent data service calls is a common requirement, and there are few examples. I suspect it is because there are many parts to the process and thus very many possible solutions. For example, in the links valdhor posted, one talks to PHB via remoteObject through WebOrb. One uses HTTPService to talk to Cold Fusion. And that is not even considering the options available withing Flex: Singleton data model? XML? ArrayCollection? ViewStack? States? Pop-up? So here is one more approach. Note, I am not a security expert, and cannot vouch for the level of security this provides. Any security folks out there are welcome to suggest alternatives. Note, a discussion of OOP coupling principles will not be helpful in this context. Flex: * Pop-Up prompts for User id and password, calls function on the main app, passing the values. * The main app hashes the password(MD5 library available), and sends credentials to server Via WebService. Dot.net: * WebService login method validates the credentials against a database. * If valid user, generates a session Id string, puts in a HashTable, and returns the sessionId and any other user info needed * If not valid an error node is generated and returned Flex: * A result handler examines the returned XML. If an error node then a message is displayed in the still visible pop-up, permitting retry. * If user is authenticated, a User object in a data model is populated, and the Login popup is closed. * All subsequent calls to the dot.net webservice include the session id. Dot net: * All calls, except for login, authorize the call by checking the session id in the hashtable. * If session id is found, a timestamp is checked for timeout. * If session has timed out, an error node is returned to the Flex client * Otherwise the call continuse to retrun the requested processing/data. * All returned data is wrapped in a known structure XML node, so it can be procesed properly in the Flex result handler. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Friday, January 30, 2009 9:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Login/Registration Page ? These threads should get you started... http://www.nabble.com/geting-info-of-a-user-who-has-loged-in-td21292230. html#a21352413 http://www.nabble.com/geting-info-of-a-user-who-has-loged-in-td21292230 .html#a21352413 http://www.nabble.com/flex-login-popup-help-needed-please-td2077 2482.html#a20833766 http://www.nabble.com/flex-login-popup-help-needed-please-td207 72482.html#a20833766 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Verdell dasle...@... wrote: I have been searching all over the internet for something like a video on how to create a Flex Login page and Registration page. So I appreciate if someone could point me in the right direction on how to do this type of project. I will be using it with ASP.NET and I will be setting up a database with SQL Server 2008. This is the code/page I have so far: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute color=#060707 mx:Label x=187 y=238 text=UserName:/ mx:Label x=187 y=283 text=Password:/ mx:Label x=187 y=179 text=Enter Your Username And Password fontWeight=bold fontSize=14/ mx:TextInput x=262 y=236 id=username/ mx:TextInput x=262 y=281 id=password/ mx:Button id=submit x=262 y=328 label=submit / mx:Label x=187 y=376 text=You must register first before you enter website./ mx:Image x=187 y=20 width=150 height=113 autoLoad=true scaleContent=true mx:sourceimages/DjRuthless.jpg/mx:source /mx:Image mx:Label x=350 y=65 text=Doc's Old School Jams fontWeight=bold fontSize=26 fontFamily=Georgia color=#00/ /mx:Application
Re: [flexcoders] Re: Generated html page backgroundcolour
It does change the bg color in the wrapper. The behavior you talk about can happen if you use 'backgroundGradientColors' because the bg color of the wrapper is set from the 'backgroundColor' property, so even if you use gradient colors for the bg of the flex app, you should still set 'backgroundColor' for the bg color of the wrapper. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Fri, Jan 30, 2009 at 6:50 PM, Tracy Spratt tspr...@lariatinc.com wrote: Does that property actually change the background color in the wrapper, or does the Flex app just cover the entire browser? I do not know offhand. In a recent thread, someone noted that the browser background stayed the original color for a brief time before the Flex app loaded, and suggested adding an entry to the Additional Compiler Options in the Flex Builder Properties, to actually compile the background color into the wrapper. Tracy Spratt Lariat Services Flex development bandwidth available -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *bhaq1972 *Sent:* Friday, January 30, 2009 10:12 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Generated html page backgroundcolour I just realized mx:Application backgroundColor=white etc generates the white background in the generated html wrapper --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, bhaq1972 mbha...@... wrote: I have my Flexbuilder set to the default settings. How can I make sure the generated HTML wrapper has a white backgroundColor. I know its something to do with ${bgcolor}. But how do I set this? Any help would be appreciated.
RE: [flexcoders] Bug in ADG?, possible to bind labelFunction to editor with no dataField?
If you know that var data:Object = event.itemRenderer.data; contains a string, why not just use toString() to put the string value in a string variable?: And I am not quite following you otherwise. What are you truing to do with describeType()? That is usually used with non-dynamic objects, but you have a simple 2d indexed array, correct? You said, array of rows and array of cells. Do you mean array or do you mean you have nested dynamic objects? If you have nested dynamic ovjects, you can examine them with a for-each or for-in loop. Note, describeType is costly. That means slow, so be sure you need it. It seems like a dangerous thing to do in a lableFunction. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of tntomek Sent: Thursday, January 29, 2009 6:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Bug in ADG?, possible to bind labelFunction to editor with no dataField? Hi, Does anyone have any idea how to edit data that does not come from fixed object properties i.e. myObject.Name but myObject.Attributes[2] which might be name? I have a 2D array, array of rows and array of cells for each row, both are arbitrary. I have this successfully displayed my data in AdvancedDataGrid via labelFunction. public function getContentLabel(item:GridRow, column:CustomLabelColumn) : String { if(item != null) { return item.Cells.getGridLabelCellAt(column.columnIndex).Label; } else { return null; } } How do I edit the data in these columns? I looked at http://www.adobe.com/livedocs/flex/3/html/help.html?content=celleditor_8 .html#197235 http://www.adobe.com/livedocs/flex/3/html/help.html?content=celleditor_ 8.html#197235 and tried messing around with itemEditBegin and itemEditEnd. I have itemEditBegin working successfully where I am able to display my label in a text box. The itemEditEnd for ADG seems to crash because I'm using typed objects instead of plan strings or XML. In fact I'm convinced there is a bug in the itemEnd base handler. I tried calling preventDefault from the grids itemEnd function but no luck, I am forced to overwrite the event.reason so that the base class doesnt destroy my itemEditor. My issue is here: In AdvancedDataGridBaseEx.as private function itemEditorItemEditEndHandler(event:AdvancedDataGridEvent):void ... var newData:Object = itemEditorInstance[_columns[event.columnIndex].editorDataField]; var property:String = _columns[event.columnIndex].dataField; var data:Object = event.itemRenderer.data; var typeInfo:String = ; //WHY is this only XML??? my data variable has plan String text and yet I never make it into the typeInfo == String part since typeInfo is because the XML loop never executes on an object; for each(var variable:XML in describeType(data).variable) { if (property == variab...@name.tostring mailto:variable.%40name.toString ()) { typeInfo = variab...@type.tostring mailto:variable.%40type.toString (); break; } } if (typeInfo == String) { //NEVER make it here if (!(newData is String)) newData = newData.toString(); } //.. //CRASH HERE since property is null. // data = Some Text; if (data[property] != newData) { bChanged = true; data[property] = newData; }
[flexcoders] FileReference.upload
Hello, I am using RubyAMF to save information to the database. The FileReference.upload method is causing some issues because logically I would like to pass the File information with other information rather than just using upload(). That being said, is there any way to convert FileReference data to Base64, I am assuming all file types are able to be encoded in base64, is that correct? Any help would be appreciated! If not base64, any other way to do it would be great, just need some way that I dont have to use FileRef.upload! thanks!
[flexcoders] Re: FileReference.upload
Can't give an answer but if you don't already know, there is a rails/flex site you might find useful. http://flexonrails.net/ Good luck! - Todd --- In flexcoders@yahoogroups.com, tchredeemed apth...@... wrote: Hello, I am using RubyAMF to save information to the database. The FileReference.upload method is causing some issues because logically I would like to pass the File information with other information rather than just using upload(). That being said, is there any way to convert FileReference data to Base64, I am assuming all file types are able to be encoded in base64, is that correct? Any help would be appreciated! If not base64, any other way to do it would be great, just need some way that I dont have to use FileRef.upload! thanks!
[flexcoders] Re: FileReference.upload
Hi, One way is to use File instead of FileReference. You can get the ByteArray that way and pass that to your service. the only caveat is that you won't be able to track the upload progress; unless you do something custom with your service. private var fileToUpload:File; private var pptFiles:FileFilter = new FileFilter(PowerPoint Files (*.ppt), *.ppt); private var fileTypes:Array = new Array(pptFiles); public function browseFiles():void { fileToUpload = new File(); fileToUpload.addEventListener( Event.SELECT, uploadFile ); fileToUpload.browseForOpen(Open, fileTypes); } public function uploadFile( event:Event ):void { fileToUpload = event.target as File; var fileData:ByteArray = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(fileToUpload, FileMode.READ); stream.readBytes(fileData, 0, stream.bytesAvailable); stream.close(); // fileData will now contain the ByteArray for the file to upload. // You can use mx.utils.Base64Encoder.encodeBytes();, or send the data as is.} -TH --- In flexcoders@yahoogroups.com, tchredeemed apth...@... wrote: Hello, I am using RubyAMF to save information to the database. The FileReference.upload method is causing some issues because logically I would like to pass the File information with other information rather than just using upload(). That being said, is there any way to convert FileReference data to Base64, I am assuming all file types are able to be encoded in base64, is that correct? Any help would be appreciated! If not base64, any other way to do it would be great, just need some way that I dont have to use FileRef.upload! thanks!
[flexcoders] Re: FileReference.upload
Type was not found: File. Hmm!? --- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote: Hi, One way is to use File instead of FileReference. You can get the ByteArray that way and pass that to your service. the only caveat is that you won't be able to track the upload progress; unless you do something custom with your service. private var fileToUpload:File; private var pptFiles:FileFilter = new FileFilter(PowerPoint Files (*.ppt), *.ppt); private var fileTypes:Array = new Array(pptFiles); public function browseFiles():void { fileToUpload = new File(); fileToUpload.addEventListener( Event.SELECT, uploadFile ); fileToUpload.browseForOpen(Open, fileTypes); } public function uploadFile( event:Event ):void { fileToUpload = event.target as File; var fileData:ByteArray = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(fileToUpload, FileMode.READ); stream.readBytes(fileData, 0, stream.bytesAvailable); stream.close(); // fileData will now contain the ByteArray for the file to upload. // You can use mx.utils.Base64Encoder.encodeBytes();, or send the data as is.} -TH --- In flexcoders@yahoogroups.com, tchredeemed apthorp@ wrote: Hello, I am using RubyAMF to save information to the database. The FileReference.upload method is causing some issues because logically I would like to pass the File information with other information rather than just using upload(). That being said, is there any way to convert FileReference data to Base64, I am assuming all file types are able to be encoded in base64, is that correct? Any help would be appreciated! If not base64, any other way to do it would be great, just need some way that I dont have to use FileRef.upload! thanks!
[flexcoders] Re: checkbox itemEditor in DataGrid
But how to pass checkbox selection status by the change event? Thanks
[flexcoders] Re: Accessing XML child nodes in a LineChart
or this: http://blog.flexexamples.com/2007/11/15/displaying-grid-lines-in-a-flex-linechart-control/ --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, Greg Groves greg.groves@ wrote: Hi all, I'm trying to use an XML document as the dataprovider for a chart and not able to make it work. A test case follows... ... thanks for any help, You may or may not find this useful: http://flexdiary.blogspot.com/2008/08/charting-example.html
[flexcoders] Re: flex 2 tilelist datachange effects
Sorry, no. I moved to Flex 3 over a year ago (Since the first Beta) and have not looked back. If there are any more Flex 2 stalwarts, they may be able to help. --- In flexcoders@yahoogroups.com, johndoematrix johndoemat...@... wrote: i would have upgraded to flex 3 but its very expensive for me. currently dont have the money to do that. otherwise i would definitely love to upgrade. so in the meantime am using flex 2. any help on the tilelist datachange effect?
[flexcoders] How do I html decode a string? ex: Iacute
Is there a function to html decode a string? I want to translate Iacute to the single character i with the accent. thanks,
[flexcoders] Re: FileReference.upload
What, you want everything. :) import flash.filesystem.*; import flash.net.FileFilter; import flash.utils.ByteArray; -TH --- In flexcoders@yahoogroups.com, tchredeemed apth...@... wrote: Type was not found: File. Hmm!? --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote: Hi, One way is to use File instead of FileReference. You can get the ByteArray that way and pass that to your service. the only caveat is that you won't be able to track the upload progress; unless you do something custom with your service. private var fileToUpload:File; private var pptFiles:FileFilter = new FileFilter(PowerPoint Files (*.ppt), *.ppt); private var fileTypes:Array = new Array(pptFiles); public function browseFiles():void { fileToUpload = new File(); fileToUpload.addEventListener( Event.SELECT, uploadFile ); fileToUpload.browseForOpen(Open, fileTypes); } public function uploadFile( event:Event ):void { fileToUpload = event.target as File; var fileData:ByteArray = new ByteArray(); var stream:FileStream = new FileStream(); stream.open(fileToUpload, FileMode.READ); stream.readBytes(fileData, 0, stream.bytesAvailable); stream.close(); // fileData will now contain the ByteArray for the file to upload. // You can use mx.utils.Base64Encoder.encodeBytes();, or send the data as is.} -TH --- In flexcoders@yahoogroups.com, tchredeemed apthorp@ wrote: Hello, I am using RubyAMF to save information to the database. The FileReference.upload method is causing some issues because logically I would like to pass the File information with other information rather than just using upload(). That being said, is there any way to convert FileReference data to Base64, I am assuming all file types are able to be encoded in base64, is that correct? Any help would be appreciated! If not base64, any other way to do it would be great, just need some way that I dont have to use FileRef.upload! thanks!
[flexcoders] Highlighting Label text characters
Hi All, I am displaying search results in a DataGrid and I have a custom ItemRenderer for the Name column and I need to highlight the text in the Label that matched the search query. I have seen support for this in TextArea and TextField.setSelection(..) and also done with HTML text however I need the truncating feature of the Label. I tried extending Label and providing a highlight( text:String ) function that calls down to the Label internal TextField.setSelection(..) but it is not working...not sure why... Does anyone know how I can achieve this? Any help much appreciated, Greg
Re: [flexcoders] How do I html decode a string? ex: Iacute
The global function unescape(str) might be what you are looking for if you need to decode a URL-encoded string. HTH, Greg On Fri, Jan 30, 2009 at 2:32 PM, luvfotography ygro...@all-digital-links.com wrote: Is there a function to html decode a string? I want to translate Iacute to the single character i with the accent. thanks,
[flexcoders] Re: FileReference.upload
I don't have flash.filesystem when I do import flash.fi the only thing is filters.. hmm!! :)
[flexcoders] Re: checkbox itemEditor in DataGrid
I can get dg1.selectedIndex when I select a checkbox, but the selectedIndex change to a new id when I select other checkbox. only one selectedIndex works How to make multiple selection for the datagrid when I select many checkboxs? Thanks Mark
[flexcoders] Re: checkbox itemEditor in DataGrid
The link can make select multiple rows,but how to make the all the selected rows highlighted. Thanks Mark http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf
[flexcoders] Re: Accessing XML child nodes in a LineChart
Thanks, I'll look at that. I was hoping for an MXML solution (mainly so I don't have to explain it as much ;-) ) but if ActionScript is necessary, so be it. thanks, Greg --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, Greg Groves greg.groves@ wrote: Hi all, I'm trying to use an XML document as the dataprovider for a chart and not able to make it work. A test case follows... ... thanks for any help, You may or may not find this useful: http://flexdiary.blogspot.com/2008/08/charting-example.html
[flexcoders] Re: Accessing XML child nodes in a LineChart
I saw that one while googling for an answer. The problem is, it deals with attributes but not child nodes, and that's where I'm having problems. Thanks anyway. --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: or this: http://blog.flexexamples.com/2007/11/15/displaying-grid-lines-in-a-flex-linechart-control/ --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote: --- In flexcoders@yahoogroups.com, Greg Groves greg.groves@ wrote: Hi all, I'm trying to use an XML document as the dataprovider for a chart and not able to make it work. A test case follows... ... thanks for any help, You may or may not find this useful: http://flexdiary.blogspot.com/2008/08/charting-example.html
RE: [flexcoders] Re: checkbox itemEditor in DataGrid
The safest way would be to loop over the dataProvider, checking the value of the property that drives the checkbox state, and build an array of indexes that are checked. Then assign that to the data grids selectedIndices property, If you could be sure to never get off, you could manipulate the selectedIndices array directly. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markflex2007 Sent: Friday, January 30, 2009 3:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: checkbox itemEditor in DataGrid The link can make select multiple rows,but how to make the all the selected rows highlighted. Thanks Mark http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf
RE: [flexcoders] Highlighting Label text characters
What will happen if the matched characters are in the truncated part? Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Hess Sent: Friday, January 30, 2009 2:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Highlighting Label text characters Hi All, I am displaying search results in a DataGrid and I have a custom ItemRenderer for the Name column and I need to highlight the text in the Label that matched the search query. I have seen support for this in TextArea and TextField.setSelection(..) and also done with HTML text however I need the truncating feature of the Label. I tried extending Label and providing a highlight( text:String ) function that calls down to the Label internal TextField.setSelection(..) but it is not working...not sure why... Does anyone know how I can achieve this? Any help much appreciated, Greg
Re: [flexcoders] Highlighting Label text characters
Well, once I can get the text to highlight in the Label, I will need to do the same in the truncated tooltip. On Fri, Jan 30, 2009 at 3:46 PM, Tracy Spratt tspr...@lariatinc.com wrote: What will happen if the matched characters are in the truncated part? Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Hess Sent: Friday, January 30, 2009 2:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Highlighting Label text characters Hi All, I am displaying search results in a DataGrid and I have a custom ItemRenderer for the Name column and I need to highlight the text in the Label that matched the search query. I have seen support for this in TextArea and TextField.setSelection(..) and also done with HTML text however I need the truncating feature of the Label. I tried extending Label and providing a highlight( text:String ) function that calls down to the Label internal TextField.setSelection(..) but it is not working...not sure why... Does anyone know how I can achieve this? Any help much appreciated, Greg
RE: [flexcoders] Re: checkbox itemEditor in DataGrid
In the event handler, you can access the itemRenderer through the target or currentTarget properties. From there you can get at the data item object and thus get the index of the item(see the Collection api for the exact method). But better to loop over the dataProvider and check the selected property every time. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markflex2007 Sent: Friday, January 30, 2009 3:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: checkbox itemEditor in DataGrid The link can make select multiple rows,but how to make the all the selected rows highlighted. Thanks Mark http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf
[flexcoders] Re: Silent Print from Flex on Kiosk
Thanks for the info. It would be nice to be able to add an app as a Trusted application, so that the application would have the option to print silently. --- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote: Yeah, The Flash Player doesnât allow silent printing, as some wag would write an advertising swf which printed out their entire promotional literature of 2000 pages on your printer every time you checked your email⦠Nate is right, if you have JS code that works, call out to that, or use some other means of interacting with the printer (we have a client side DotNet component to handle our printing needs). Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nate Beck Sent: 29 January 2009 17:18 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Silent Print from Flex on Kiosk Just a theory... but you might be able to use ExternalInterface to call the same methods within user.js, and pass the content. Since you're already got it working within Javascript. I wish I knew more about FlexPrintJob. On Thu, Jan 29, 2009 at 8:41 AM, Jeremi Bergman jere...@... mailto:jere...@... wrote: I have a flex app that I need to print an image. I have Firefox Setup running the app. in user.js for FF i have: user_pref(â⬠print.always_print_silentâ⬠,true); user_pref(â⬠print.show_print_progressâ⬠,false); This works perfectly when using firefox's print functionality on any standard site. It prints directly to the default printer without any user interaction. Within my App I have: public static function printCoupon(obj:UIComponent):void { // Create an instance of the FlexPrintJob class. var printJob:FlexPrintJob = new FlexPrintJob(); // Start the print job. if (printJob.start() != true) return; // Add the object to print. Do not scale it. printJob.addObject(obj, FlexPrintJobScaleType.NONE); // Send the job to the printer. printJob.send(); } The UIComponent passed in is an Image. It prints the image, but it prompts me with the print diologe box. Any thoughts? Thanks. -- Cheers, Nate http://blog.natebeck.net http://blog.natebeck.net
RE: [flexcoders] Re: Accessing XML child nodes in a LineChart
I don't do much charting, but generally Flex treats attributes and child nodes both as top-level properties of an item, like with labelField or dataField. Eitehr can access attrabutes or the text() value of child nodes. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Groves Sent: Friday, January 30, 2009 3:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Accessing XML child nodes in a LineChart I saw that one while googling for an answer. The problem is, it deals with attributes but not child nodes, and that's where I'm having problems. Thanks anyway. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , valdhor valdhorli...@... wrote: or this: http://blog.flexexamples.com/2007/11/15/displaying-grid-lines-in-a-flex- linechart-control/ http://blog.flexexamples.com/2007/11/15/displaying-grid-lines-in-a-flex -linechart-control/ --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Amy amyblankenship@ wrote: --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Greg Groves greg.groves@ wrote: Hi all, I'm trying to use an XML document as the dataprovider for a chart and not able to make it work. A test case follows... ... thanks for any help, You may or may not find this useful: http://flexdiary.blogspot.com/2008/08/charting-example.html http://flexdiary.blogspot.com/2008/08/charting-example.html
[flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes)
Hello All. I've run into a problem, need other perspective(s)/solutions: Simply put: I want to implement drag and drop, like iTunes, in an AIR app. Seems easy, but...this particular scenario is puzzling. Right now, just like iTunes, I have two list-based controls (both are populated from collections of data within SQLite), one is a DataGrid and one is a List. Dragging and dropping from the Grid to the List is simple, yes, but I would like to drop on the list item's label/text/name in the List and perform another function (specifically an update to SQLite) and NOT simply drop the item and append to the list. Follow? As in iTunes, you can drag a song into a folder and it adds the song into the folder. (I would make that reference in SQLite in this case). It doesn't make a new folder by appending (wrongly) the dropped song to the folder list. (Which is what I have now: If I drag a item from the grid and drop it on the list, it's appended to the list, but I want it to become a value within the list item (pseudo nested) not a value in the list itself.) Is there a simple solution here I'm not seeing? Now, I can do all that neat stuff by dragging a grid item unto a mx:Button, but with only one button. Maybe I could loop/repeater to make a vertical stack of buttons from an array? But then it gets unclear as to how each button is created with the necessary dragEnter and dragDrop event handlers. any help here? This wheel has been invented before. So how in Flex? David (You can email me off of list if you'd like, I'll gladly post the solution at the end. kramer.da...@consultant.com)
RE: [flexcoders] Highlighting Label text characters
Interesting problem. I think I might add truncate functionality to a text-based itemRenderer rather than add highlighting to Label. I haven't done either, so take that into account. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Hess Sent: Friday, January 30, 2009 3:50 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Highlighting Label text characters Well, once I can get the text to highlight in the Label, I will need to do the same in the truncated tooltip. On Fri, Jan 30, 2009 at 3:46 PM, Tracy Spratt tspr...@lariatinc.com mailto:tspratt%40lariatinc.com wrote: What will happen if the matched characters are in the truncated part? 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 Greg Hess Sent: Friday, January 30, 2009 2:52 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Highlighting Label text characters Hi All, I am displaying search results in a DataGrid and I have a custom ItemRenderer for the Name column and I need to highlight the text in the Label that matched the search query. I have seen support for this in TextArea and TextField.setSelection(..) and also done with HTML text however I need the truncating feature of the Label. I tried extending Label and providing a highlight( text:String ) function that calls down to the Label internal TextField.setSelection(..) but it is not working...not sure why... Does anyone know how I can achieve this? Any help much appreciated, Greg
[flexcoders] Re: How do I html decode a string? ex: Iacute
Hi, thanks, but that doesn't work. I need something to decode the literals, such as 'lt', 'quot', iacute, etc. --- In flexcoders@yahoogroups.com, Greg Hess flexeff...@... wrote: The global function unescape(str) might be what you are looking for if you need to decode a URL-encoded string. HTH, Greg On Fri, Jan 30, 2009 at 2:32 PM, luvfotography ygro...@... wrote: Is there a function to html decode a string? I want to translate Iacute to the single character i with the accent. thanks,
RE: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes)
If you write your own drag/drop handlers and call preventDefault, you can do anything you want, or nothing. There are lots of examples in the docs. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of David Kramer Sent: Friday, January 30, 2009 3:52 PM To: flexcoders@yahoogroups.com Cc: kramer.da...@consultant.com Subject: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes) Hello All. I've run into a problem, need other perspective(s)/solutions: Simply put: I want to implement drag and drop, like iTunes, in an AIR app. Seems easy, but...this particular scenario is puzzling. Right now, just like iTunes, I have two list-based controls (both are populated from collections of data within SQLite), one is a DataGrid and one is a List. Dragging and dropping from the Grid to the List is simple, yes, but I would like to drop on the list item's label/text/name in the List and perform another function (specifically an update to SQLite) and NOT simply drop the item and append to the list. Follow? As in iTunes, you can drag a song into a folder and it adds the song into the folder. (I would make that reference in SQLite in this case). It doesn't make a new folder by appending (wrongly) the dropped song to the folder list. (Which is what I have now: If I drag a item from the grid and drop it on the list, it's appended to the list, but I want it to become a value within the list item (pseudo nested) not a value in the list itself.) Is there a simple solution here I'm not seeing? Now, I can do all that neat stuff by dragging a grid item unto a mx:Button, but with only one button. Maybe I could loop/repeater to make a vertical stack of buttons from an array? But then it gets unclear as to how each button is created with the necessary dragEnter and dragDrop event handlers... any help here? This wheel has been invented before. So how in Flex? David (You can email me off of list if you'd like, I'll gladly post the solution at the end. kramer.da...@consultant.com mailto:kramer.da...@consultant.com )
Re: [flexcoders] Re: How do I html decode a string? ex: Iacute
Ah, I believe those HTML entities. You may find support in some HTML utils... On Fri, Jan 30, 2009 at 3:57 PM, luvfotography ygro...@all-digital-links.com wrote: Hi, thanks, but that doesn't work. I need something to decode the literals, such as 'lt', 'quot', iacute, etc. --- In flexcoders@yahoogroups.com, Greg Hess flexeff...@... wrote: The global function unescape(str) might be what you are looking for if you need to decode a URL-encoded string. HTH, Greg On Fri, Jan 30, 2009 at 2:32 PM, luvfotography ygro...@... wrote: Is there a function to html decode a string? I want to translate Iacute to the single character i with the accent. thanks,
RE: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes)
So I think what you really need to be doing is to have the list item renderer accept the drop, rather than the list itself? I'm sure I did this with the datagrid about a year and a half ago, unfortunately I don't have that project to hand just now or I'd have a look and see how I did it. All I remember was it wasn't all that hard to do once I'd got that concept. -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of David Kramer Sent: 30 January 2009 20:52 To: flexcoders@yahoogroups.com Cc: kramer.da...@consultant.com Subject: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes) Hello All. I've run into a problem, need other perspective(s)/solutions: Simply put: I want to implement drag and drop, like iTunes, in an AIR app. Seems easy, but...this particular scenario is puzzling. Right now, just like iTunes, I have two list-based controls (both are populated from collections of data within SQLite), one is a DataGrid and one is a List. Dragging and dropping from the Grid to the List is simple, yes, but I would like to drop on the list item's label/text/name in the List and perform another function (specifically an update to SQLite) and NOT simply drop the item and append to the list. Follow? As in iTunes, you can drag a song into a folder and it adds the song into the folder. (I would make that reference in SQLite in this case). It doesn't make a new folder by appending (wrongly) the dropped song to the folder list. (Which is what I have now: If I drag a item from the grid and drop it on the list, it's appended to the list, but I want it to become a value within the list item (pseudo nested) not a value in the list itself.) Is there a simple solution here I'm not seeing? Now, I can do all that neat stuff by dragging a grid item unto a mx:Button, but with only one button. Maybe I could loop/repeater to make a vertical stack of buttons from an array? But then it gets unclear as to how each button is created with the necessary dragEnter and dragDrop event handlers... any help here? This wheel has been invented before. So how in Flex? David (You can email me off of list if you'd like, I'll gladly post the solution at the end. kramer.da...@consultant.com mailto:kramer.da...@consultant.com ) __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
RE: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes)
Thanks for the super fast reply, Tracy. I will look of course, but for even more speed, do you have a link to reference? Thanks in advance. _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Friday, January 30, 2009 2:00 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes) If you write your own drag/drop handlers and call preventDefault, you can do anything you want, or nothing. There are lots of examples in the docs. Tracy Spratt Lariat Services Flex development bandwidth available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of David Kramer Sent: Friday, January 30, 2009 3:52 PM To: flexcoders@yahoogroups.com Cc: kramer.da...@consultant.com Subject: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes) Hello All. I've run into a problem, need other perspective(s)/solutions: Simply put: I want to implement drag and drop, like iTunes, in an AIR app. Seems easy, but...this particular scenario is puzzling. Right now, just like iTunes, I have two list-based controls (both are populated from collections of data within SQLite), one is a DataGrid and one is a List. Dragging and dropping from the Grid to the List is simple, yes, but I would like to drop on the list item's label/text/name in the List and perform another function (specifically an update to SQLite) and NOT simply drop the item and append to the list. Follow? As in iTunes, you can drag a song into a folder and it adds the song into the folder. (I would make that reference in SQLite in this case). It doesn't make a new folder by appending (wrongly) the dropped song to the folder list. (Which is what I have now: If I drag a item from the grid and drop it on the list, it's appended to the list, but I want it to become a value within the list item (pseudo nested) not a value in the list itself.) Is there a simple solution here I'm not seeing? Now, I can do all that neat stuff by dragging a grid item unto a mx:Button, but with only one button. Maybe I could loop/repeater to make a vertical stack of buttons from an array? But then it gets unclear as to how each button is created with the necessary dragEnter and dragDrop event handlers. any help here? This wheel has been invented before. So how in Flex? David (You can email me off of list if you'd like, I'll gladly post the solution at the end. kramer.david@ mailto:kramer.da...@consultant.com consultant.com)
RE: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes)
Yes! Last night around 2 AM I thought Oh, the item renderer should accept it and then I went to sleep. But I'm still puzzled as to how to fire the proper SQL statement for each drop; essentially it's an INSERT [URL from drop] INTO table WHERE column = [the drop acceptor's label string]. Example code rocks, of course, but small nudges will help me get through the fog. Thanks to all who keep illuminating... _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jim Hayes Sent: Friday, January 30, 2009 2:06 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes) So I think what you really need to be doing is to have the list item renderer accept the drop, rather than the list itself? I'm sure I did this with the datagrid about a year and a half ago, unfortunately I don't have that project to hand just now or I'd have a look and see how I did it. All I remember was it wasn't all that hard to do once I'd got that concept. -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of David Kramer Sent: 30 January 2009 20:52 To: flexcoders@yahoogroups.com Cc: kramer.da...@consultant.com Subject: [flexcoders] drag and drop ('into' the list items, while not adding to the list itself; Ex: iTunes) Hello All. I've run into a problem, need other perspective(s)/solutions: Simply put: I want to implement drag and drop, like iTunes, in an AIR app. Seems easy, but...this particular scenario is puzzling. Right now, just like iTunes, I have two list-based controls (both are populated from collections of data within SQLite), one is a DataGrid and one is a List. Dragging and dropping from the Grid to the List is simple, yes, but I would like to drop on the list item's label/text/name in the List and perform another function (specifically an update to SQLite) and NOT simply drop the item and append to the list. Follow? As in iTunes, you can drag a song into a folder and it adds the song into the folder. (I would make that reference in SQLite in this case). It doesn't make a new folder by appending (wrongly) the dropped song to the folder list. (Which is what I have now: If I drag a item from the grid and drop it on the list, it's appended to the list, but I want it to become a value within the list item (pseudo nested) not a value in the list itself.) Is there a simple solution here I'm not seeing? Now, I can do all that neat stuff by dragging a grid item unto a mx:Button, but with only one button. Maybe I could loop/repeater to make a vertical stack of buttons from an array? But then it gets unclear as to how each button is created with the necessary dragEnter and dragDrop event handlers. any help here? This wheel has been invented before. So how in Flex? David (You can email me off of list if you'd like, I'll gladly post the solution at the end. kramer.david@ mailto:kramer.da...@consultant.com consultant.com) __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] Re: FileReference.upload
Hmm, not sure what to tell you. Flex3? -TH --- In flexcoders@yahoogroups.com, tchredeemed apth...@... wrote: I don't have flash.filesystem when I do import flash.fi the only thing is filters.. hmm!! :)