[flexcoders] Re: Dual DataService components causing problems
Thanks for that Seth, its definately a step in the right direction. I have now removed the fds.swc from the module project's build path but i am getting a few compilation errors on VO classes i have defined to be used in the managed collection of objects... 1045: Interface IManaged was not found I think this is why i had to add the fds.swc to the project in the first place. Thanks again for your suggestions and if you can think of anything else i would appreciate it. Barry --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Barry, You need to only link the classes defined in fds.swc into your root application swf, and your modules need to rely on those class definitions rather than each of them individually containing duplicate class defs from fds.swc. I'm not a modules guru, but take a look at the 'Controlling module size' section here: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwh elp.htm?context=LiveDocs_Book_Partsfile=modular_083_4.html Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Barry Evans Sent: Friday, May 02, 2008 10:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dual DataService components causing problems Hi, i have developed a modularised application in Flex 2.0.1 (hotfix 1) and im having some problems with the DataService tag. I have a module in the application's side bar which fills a collection with managed objects, and i also have a module in the main application area which fills a collection with managed objects. Each module uses different assembler classes/destinations configured in the data-management-config.xml file. When i perform a fill on the each collection, and then attempt to perform another fill on the side bar module, i keep getting errora from the flash player log file. The collection in the main application area always refreshes without any problems The error from flex... TypeError: Error #1034: Type Coercion failed: cannot convert mx.data.messages::[EMAIL PROTECTED] to mx.data.messages.SequencedMessage. at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processS equenceResult() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataLi st.as:1760] at DataListRequestResponder/result() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Concre teDataService.as:5857] at mx.rpc::AsyncRequest/acknowledge() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:81] at NetConnectionMessageResponder/resultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\NetConnec tionChannel.as:427] at mx.messaging::MessageResponder/result() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\MessageResponder.a s:202] Any help would be greatly appreciated as i am hitting a brick wall, everything was working before, but i can't figure out what changes i might have made to cause these issues. Barry
[flexcoders] ANN: PyAMF 0.3.1 Released
We're pleased to announce PyAMF 0.3.1, a lightweight library that allows Flash and Python applications to communicate via Adobe's ActionScript Message Format. AMF3 and RemoteObject are supported in all the implemented Remoting gateways, compatible with Django, Twisted, TurboGears2, Google App Engine and any WSGI-compatible application. This release provides improved support for Google App Engine and comes with following changes and fixes: - Google Model/Expando encoding now works out of the box - Django model adapter now imported only when django.db.models is imported (Ticket:261) - Fixed issue with Remote Object destination (Ticket:270) - Added a new gateway for the Google App Engine - see pyamf.remoting.gateway.google.WebAppGateway (Ticket:253) - amf0 Encoder now takes amf3 contexts into account (Ticket:268) - amf*.encode helpers can now accept multiple arguments (Ticket:267) - Removed the dependency of fpconst for Python 2.5 or newer (Ticket: 243) - Solved issue with AMFPHP exceptions in AMF client (Ticket:258) - Fixed issue with url parsing in AMF client (Ticket:256) - Client no longer raises httplib.ResponseNotReady when making multiple requests using the same RemotingService (Ticket:254) Check out the download page [1], installation instructions [2] and examples [3]. Questions? First stop is the mailing list [4], but we also hang out on IRC [5]. Cheers, - the PyAMF team [1] http://pyamf.org/wiki/Download [2] http://pyamf.org/wiki/Install [3] http://pyamf.org/wiki/Examples [4] http://pyamf.org/wiki/MailingList [5] irc://irc.collab.eu/pyamf PGP.sig Description: This is a digitally signed message part
RE: [flexcoders] Dual DataService components causing problems
Definitely a shared code problem. Check Alex's blog for more details. http://blogs.adobe.com/aharui/ 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 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Barry Evans Sent: 02 May 2008 18:35 To: flexcoders@yahoogroups.com Subject: [flexcoders] Dual DataService components causing problems Hi, i have developed a modularised application in Flex 2.0.1 (hotfix 1) and im having some problems with the DataService tag. I have a module in the application's side bar which fills a collection with managed objects, and i also have a module in the main application area which fills a collection with managed objects. Each module uses different assembler classes/destinations configured in the data-management-config.xml file. When i perform a fill on the each collection, and then attempt to perform another fill on the side bar module, i keep getting errora from the flash player log file. The collection in the main application area always refreshes without any problems The error from flex... TypeError: Error #1034: Type Coercion failed: cannot convert mx.data.messages::[EMAIL PROTECTED] to mx.data.messages.SequencedMessage. at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processS http://www.adobe.com/2006/flex/mx/internal::processS equenceResult() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataLi st.as:1760] at DataListRequestResponder/result() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Concre teDataService.as:5857] at mx.rpc::AsyncRequest/acknowledge() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:81] at NetConnectionMessageResponder/resultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\NetConnec tionChannel.as:427] at mx.messaging::MessageResponder/result() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\MessageResponder.a s:202] Any help would be greatly appreciated as i am hitting a brick wall, everything was working before, but i can't figure out what changes i might have made to cause these issues. Barry
[flexcoders] Re: CartesianDataCanvas not drawing where expected
--- In flexcoders@yahoogroups.com, Aaron Miller [EMAIL PROTECTED] wrote: Hello, I've been playing around with the Flex charting components, and I seem to be running into an issue when I try to plot (draw) a line on the graph. I am using the CartesianDataCanvas.moveTo and lineTo functions and it seems to work ok for the Y axis, but not the X. I posted an example with view-source enabled here: http://www.openbaseinteractive.com/testproject/UnitCostLab.html It should be plotting 3.5,6900 - 12,12000 but as you can see, it's not. Any ideas what I'm doing wrong? Am I maybe using the wrong kind of horizontalAxis? Thanks for any help! ~Aaron Try using a NumericAxis instead of CatagoryAxis, you generally use catagoryaxis if the data, is in chunks, like months of the year and such.
[flexcoders] Where can i find flex 2 installable?
Hi, I had some tests need to be done with flex 2 and somehow we manage to damage the original machine that installed with flex 2. My question is: where can i get the installer for flex 2? The Adobe site changed everything to Flex 3 and i could not locate Flex 2 archive. Thank you. B.
[flexcoders] Flash/Flex Component Kit and Dynamic Loading
I'm working with the Flash/Flex component kit and I have created some swc and swf files with a base class of UIMovieClip. All of the tutorials I've seen/read describe using the swc file to instantiate the Flash component in a Flex component. I have an application that requires these components to be loaded dynamically so I'm using a loader object to do this and I use the class name of the symbol that is exported in the SWF to instantiate the symbol. So far so good. My problem arises when I try to add an instance as a child to a Flex container. mxmlc throws a 'type coercion error' that my UIMovieClip does not implement IUIComponent. Reading flashdocs and flex component kit docs, however, it clearly state that UIMovieclip objects can be used just like any native Flex component. My work around at the moment is the create an intermediate UIComponent, add my Flash symbol instance as a child and then add this UIComponent as a child to the panel. This is okay for now but makes several things more complex. Anyone know what this is all about? Also, I've tried to dynamically load a SWF to be used a skin for a button, but this seems not possible. Can anyone verify if this can be done at all? Thanks.
[flexcoders] flash9 and sizes
Hi, I use as3 + sdk + FlashDevelop to do swf:s, currently trying Flexbuilder as I eventually would like to start using mxml. I am not completely sure how coordinates and sizes work. Say that I have a root Sprite 100x100 large; a child Sprite at x:50,y:50 of size 50x50. It seems that flash calculates a viewport of the child sprite and maximizes it to fit into the 50x50. So if the child sprite only contains a 10x10 bitmap, this bitmap will be rendered of size 50x50 in the root sprite. The root sprite did seem to bahave like this too until I got the advice to this.stage.scaleMode = StageScaleMode.NO_SCALE; this.stage.align = StageAlign.TOP_LEFT; In short, I've managed to confuse myself gravely and wonder if any has any reading suggestions? Thanks! Marcus
[flexcoders] addEventListener() for File.createDirectory(). How to use?
Hello, everybody! How to use addEventListener for File.createDirectory() on Adobe AIR? I write code: var dir:File = new File(e:\\).resolvePath(myDir); dir.createDirectory(); dir.addEventListener(Event.COMPLETE, someFunc); // Tooltip show me that this event i can use for my parameter and I want to check if my new Directory created then call someFunc() function someFunc(event:Event):void{ var file:File = File.desktopDirectore.resolvePath(test.jpg); var newFile:File = dir.resolvePath(file.name); file.copyTo(newFile, true); } but this code doesn't work. my someFunc doesn't execute. I see, my folder creating with some pause, I get new folder after 2-3 seconds after execute function and I want to check when my folder is created and after it copy to it some files Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Re: [flexcoders] Re: Use Cairngorm wihtout Dispatch
I'm not saying it's a major problem that we come across often, but when taking on other people's work, or working as a team it's something we have come across. We would expect all vars, methods, class, events to be named well, but we find it more efficient to error the project through changing a method name, than to do a find in files. We want to keep things as simple as possible. The point I was making as that just because events are used on the view instead of it accessing controller methods directly it doesn't necessarily de-couple them, since in most cases the view is relying on its events being picked up and acted upon. If my previous statement is true for you and your team, there's really no need to go down the event road, as it does introduces more complication and with it more time to implement. Just to clarify we don't take this approach on components, but we do for views/screens. On 5 May 2008, at 01:37, Jim Hayes wrote: I've not really had those problems myself Tink. I don't dispatch any standard cairngorm events, instead I have events that extend it and are (usually!) fairly well named to reflect what's happening. Maybe that's because for me they normally carry some data, and I like that data to be as strongly typed as is practicable. The command/delegate will usually follow the same naming, so I may have SaveBitmapEvent + SaveBitmapCommand + SaveBitmapDelegate, for example. So to find any particular event dispatch in my view, it's pretty easy to do a find in files on the project, though in practice I find I rarely need to. Likewise, finding the command it calls is pretty easy for the most part, as is the implementation in the delegate. Good point on the controller not listening, but I guess I've just got used to writing a shell version of my command, breakpointing it's constructor and checking it does get called when I expect it to before proceeding to fill in it's implementation. If not, then the frontController has it's fingers in it's ears shouting na na na I can't hear you :) It would be good if it could catch all cairngorm events and raise a warning if they were not registered, though. I have a feeling it wouldn't be too hard to extend it do that, but I've never felt the need myself. I'm sure we're both thinking don't make me have to think too hard, if at all, and I'm in broad agreement with you, but the 3 classes and controller entry approach does work for me (even if it is very tedious to write at the time). -Original Message- From: flexcoders@yahoogroups.com on behalf of Stephen Downs Sent: Sun 04/05/2008 14:08 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Use Cairngorm wihtout Dispatch I have to agree with MichNiu here. The CairngormEventDispatcher obsfucates the code. i.e. you come back to a project 6 months down the line, its difficult to find in the view where your CairngormEvents are dispatch. What is the difference of the view knowing what event it has to dispatch, to it actually knowing the method on the controller it was to invoke? Very little in my opinion, but the later enables you to very easily pinpoint all the calls from the view to a method on the controller, by just changing the name of the method on the controller, and looking at all the errors that will appear on the view. This makes things much easier to debug and therefore easier to maintain. You talk about making views re-useable, but if your view is dispatching CairngormEvents, you can guarantee it's relying on some action of the FrontController for it to work properly. If you FrontController doesn't listen to these events, your view won't work, therefore it aint re-usable, its relying on the FrontController acting upon the events is dispatches. We still keep a Controller unlike MichNui's implementation, but we cut out the use of CairngormEventDispatcher some time ago. Now when it comes to re-usable components, thats a different matter. Tink On 22 Apr 2008, at 03:53, ben.clinkinbeard wrote: One of the core principles of not just Cairngorm but MVC in general is for your views to be as dumb as possible. The less they know about models, services, etc the better. You've essentially taken the opposite approach. Creating reusable/generic views using your approach wouldn't really be possible. Also, Flex is an event driven architecture and events are another core aspect of creating loosely coupled application components. I think your approach will result in very brittle code that will be hard to maintain. Ben --- In flexcoders@yahoogroups.com, michniu [EMAIL PROTECTED] wrote: Hi Coders, I just want to discuss some issues about the Cairngorm, Because I cant find another mail list or forum to discuss it. I put it here. The most useless part in cairngorm FrontCotroller and command Just on my opinion, I really don't like to write the command for every action and
[flexcoders] datagrid using button or checkbox wHat Code to Trigger
i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ? while i find many demos showing itemrenderer i just cant seem to find any showing examples with interaction on a code level to what im looking for? anyone know a good example
[flexcoders] Error: Nothing was specified to be included in the library
I am getting this error with reference to FlexLib when I try to compile my project. Does anyone know what causes this error and how to get rid of it? Thanks, G-Man
[flexcoders] DataGrid CustomItemRenderer Issue
Hi All, I have a datagrid which has customItemRenderer. In the itemRenderer I have a button which onClick adds a child label to the itemRenderer. Now,in the application, when I click on an item's button a label is added to it. Then I scoll down and (don't know why?) find this label added at random itemRenderers. *Here is the sample application:-* ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:local=* creationComplete=onCreationComplete(event) mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var arr:ArrayCollection = new ArrayCollection(); private function onCreationComplete(e:Event):void { for(var i:int = 0;i100;i++) { arr.addItem({text:i.toString()}); } } ]] /mx:Script mx:DataGrid dataProvider={arr} id=dg width=300 height=100% showHeaders=false mx:itemRenderer mx:Component local:DGItemRenderer/ /mx:Component /mx:itemRenderer /mx:DataGrid /mx:Application *Here is the itemRenderer:-* ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; height=100% width=100% mx:Script ![CDATA[ import mx.controls.Label; private var newText:Label = new Label(); private var added:Boolean = false; private function onClick(e:Event):void { if(!data.added) { newText.text = Child +txt.text+ added; hBox.addChild(newText); } else { hBox.removeChild(newText); } } override public function set data(value:Object):void { super.data = value; if(value) { txt.text = value.text; } } ]] /mx:Script mx:HBox id=hBox mx:Button label=clickMe click=onClick(event) / mx:Text id=txt / /mx:HBox /mx:Canvas Please help finding me the problem. Thanks and Regards, Sunny Ladkani
[flexcoders] Re: Dual DataService components causing problems
Ok i managed to get the problem sorted. All i had to do was create a dummy instance of the mx.data.messages.SequencedMessage class in the main application. Previously, I had to do this will alot of my own AS classes (and a few from the Flex framework), but now i am using an RSL (where most of the classes exist) it was not necessary to create any of the dummy instances of the classes... or so i thought! Well that seems to be the problem solved, thanks for your pointers Seth/Gregor. Barry --- In flexcoders@yahoogroups.com, Barry Evans [EMAIL PROTECTED] wrote: Hi, i have developed a modularised application in Flex 2.0.1 (hotfix 1) and im having some problems with the DataService tag. I have a module in the application's side bar which fills a collection with managed objects, and i also have a module in the main application area which fills a collection with managed objects. Each module uses different assembler classes/destinations configured in the data-management-config.xml file. When i perform a fill on the each collection, and then attempt to perform another fill on the side bar module, i keep getting errora from the flash player log file. The collection in the main application area always refreshes without any problems The error from flex... TypeError: Error #1034: Type Coercion failed: cannot convert mx.data.messages::[EMAIL PROTECTED] to mx.data.messages.SequencedMessage. at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processS equenceResult() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataLi st.as:1760] at DataListRequestResponder/result() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Concre teDataService.as:5857] at mx.rpc::AsyncRequest/acknowledge() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:81] at NetConnectionMessageResponder/resultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\NetConnec tionChannel.as:427] at mx.messaging::MessageResponder/result() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\MessageResponder.a s:202] Any help would be greatly appreciated as i am hitting a brick wall, everything was working before, but i can't figure out what changes i might have made to cause these issues. Barry
Re: [flexcoders] Where can i find flex 2 installable?
Try searching the Adobe site for the Flex 2 SDK with Google (or another search engine). Google can use the term site:http://www.example.com; to limit the search to a single site. I found http://labs.adobe.com/technologies/flex/sdk/flex2sdk.html which seems to be what you want (and also offers nightly builds). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: baztheman [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Where can i find flex 2 installable? Date: Sun, 04 May 2008 21:37:33 - Hi, I had some tests need to be done with flex 2 and somehow we manage to damage the original machine that installed with flex 2. My question is: where can i get the installer for flex 2? The Adobe site changed everything to Flex 3 and i could not locate Flex 2 archive. Thank you. B.
[flexcoders] Child items in custom component
Hello! I am currently a bit clueless regarding using Flex components. I am currently trying to port a .NET component to Flex. Only I have some problems. In a simplified form the problem is that I am trying to add childs to the component. The idea is to use public method to add nodes to the component. The code could be: var node: MyNode = new MyNode(); node.width = node.height = 125; myComponentInstance.addNode( node ); The addNode-method is basically contains: public function addNode( node: MyNode ): void { _nodeContainer.addChild( DisplayObject(node) ); invalidateDisplayList(); } The _nodeContainer is a Sprite class which gets created in the overriden createChildren-method. Now I would be expected that the MyNode-instance (which just draws a simple rectangle 125x125) would be shown. Sadly enough, this is not the case. Does anyone know what should be done to get this working? Yours, Weyert de Boer
RE: [flexcoders] datagrid using button or checkbox wHat Code to Trigger
The best way is to have the change or click of your checkbox or button(toggle?) update the associated dataProvider item. Easy with XML, just set an attribute, like [EMAIL PROTECTED]delete. When you are ready to update the server, get the modified rows (again easy with e4x), and build your update message. That message depends on your back -end. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 10:48 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] datagrid using button or checkbox wHat Code to Trigger i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ? while i find many demos showing itemrenderer i just cant seem to find any showing examples with interaction on a code level to what im looking for? anyone know a good example
RE: [flexcoders] DataGrid CustomItemRenderer Issue
Item renderers are recycled, and must be entirely data-driven. When you add your child, you must update some property of the dataProvider item, say, [EMAIL PROTECTED] = true. Then in your set data() override, use the value of that property to decide whether to either add or remove the text child. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sunny ladkani Sent: Monday, May 05, 2008 9:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid CustomItemRenderer Issue Hi All, I have a datagrid which has customItemRenderer. In the itemRenderer I have a button which onClick adds a child label to the itemRenderer. Now,in the application, when I click on an item's button a label is added to it. Then I scoll down and (don't know why?) find this label added at random itemRenderers. Here is the sample application:- ?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 xmlns:local=* creationComplete=onCreationComplete(event) mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var arr:ArrayCollection = new ArrayCollection(); private function onCreationComplete(e:Event):void { for(var i:int = 0;i100;i++) { arr.addItem({text:i.toString()}); } } ]] /mx:Script mx:DataGrid dataProvider={arr} id=dg width=300 height=100% showHeaders=false mx:itemRenderer mx:Component local:DGItemRenderer/ /mx:Component /mx:itemRenderer /mx:DataGrid /mx:Application Here is the itemRenderer:- ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml height=100% width=100% mx:Script ![CDATA[ import mx.controls.Label; private var newText:Label = new Label(); private var added:Boolean = false; private function onClick(e:Event):void { if(!data.added) { newText.text = Child +txt.text+ added; hBox.addChild(newText); } else { hBox.removeChild(newText); } } override public function set data(value:Object):void { super.data = value; if(value) { txt.text = value.text; } } ]] /mx:Script mx:HBox id=hBox mx:Button label=clickMe click=onClick(event) / mx:Text id=txt / /mx:HBox /mx:Canvas Please help finding me the problem. Thanks and Regards, Sunny Ladkani
[flexcoders] Flex, AMFPHP and ADOdb
I put together a short tutorial on how to use AMFPHP with ADOdb as database abstraction layer. The focus is on beginners with AMFPHP. I hope you find it useful. http://blog.log2e.com/2008/05/05/using-amfphp-with-adodb/
[flexcoders] removing items from a bubble chart
Hello, I have a bubblechart where I use button as itemrenderer. Once the chart is created the same rendered items are shown even though the [Bindable] dataprovider is changed but the number of item that are shown in the chart reflects the change. I guess I need to remove all the existing child and then assign the updated dataprovider. How do I remove the rendered items from the bubble child? Regards...
[flexcoders] Combo Box trying to get a deep data...
Hey all, I've got a combo box with a dataprovider set to an array of value objects. Inside this value object are fields like name, and id. I've got the name as my label field but i'm not sure how to tell Flex that i want the value object with an id of 3 to be my selectedIndex value. thoughts? -- jonese http://www.jonese.us http://twitter.com/jonese
RE: [flexcoders] Combo Box trying to get a deep data...
Oops, maybe misread your question. You are not asking about accessing deeply nested values, but rather how to set the combobox selectedItem to match its current value? Or maybe you are just asking about declaring dataField? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Monday, May 05, 2008 1:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Combo Box trying to get a deep data... labelFunction() Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jonese Sent: Monday, May 05, 2008 12:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Combo Box trying to get a deep data... Hey all, I've got a combo box with a dataprovider set to an array of value objects. Inside this value object are fields like name, and id. I've got the name as my label field but i'm not sure how to tell Flex that i want the value object with an id of 3 to be my selectedIndex value. thoughts? -- jonese http://www.jonese.us http://www.jonese.us http://twitter.com/jonese http://twitter.com/jonese
[flexcoders] itemUpdated() functionality for XML properties?
I have a bindable data model implemented as a singleton, several properties of which are implemented as XML. My app uses binding and ChangeWatchers to respond to changes in this XML data. If I assign an entire xml to one of these properties, the property change is dispatched and my bindings fire and my watchers are called. But if I update an item in the xml, like set and attribute value or text node, it APPEARS that the events are not dispatched. This is unsurprising, as it is analagous to updating an item property in a Collection, for which itemUpdated() method exists. First, is the behavior I am seeing is expected? I know that XML dispatches ordinary events that fire bindings, but those events are not getting out of my model instance. Second, if the behavior is expected, is there some similar itemUpdated() functionality for XML? Tracy
RE: [flexcoders] Combo Box trying to get a deep data...
labelFunction() Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jonese Sent: Monday, May 05, 2008 12:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Combo Box trying to get a deep data... Hey all, I've got a combo box with a dataprovider set to an array of value objects. Inside this value object are fields like name, and id. I've got the name as my label field but i'm not sure how to tell Flex that i want the value object with an id of 3 to be my selectedIndex value. thoughts? -- jonese http://www.jonese.us http://www.jonese.us http://twitter.com/jonese http://twitter.com/jonese
Re: [flexcoders] addEventListener() for File.createDirectory(). How to use?
Nobody know how create eventListener for File.createDirectory() ??? - Original Message From: Carlo Gulliani [EMAIL PROTECTED] To: Flexcoders flexcoders@yahoogroups.com Sent: Monday, May 5, 2008 4:53:11 PM Subject: [flexcoders] addEventListener() for File.createDirectory(). How to use? Hello, everybody! How to use addEventListener for File.createDirector y() on Adobe AIR? I write code: var dir:File = new File(e:\\) .resolvePath( myDir); dir.createDirectory (); dir.addEventListene r(Event.COMPLETE , someFunc); // Tooltip show me that this event i can use for my parameter and I want to check if my new Directory created then call someFunc() function someFunc(event: Event):void{ var file:File = File.desktopDirecto re.resolvePath( test.jpg ); var newFile:File = dir.resolvePath( file.name) ; file.copyTo( newFile, true); } but this code doesn't work. my someFunc doesn't execute. I see, my folder creating with some pause, I get new folder after 2-3 seconds after execute function and I want to check when my folder is created and after it copy to it some files Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
in case you wanted to see my current code mx:DataGrid x=10 y=37 width=697 height=241 editable=false id=staffgrid dataProvider={staff_array} textAlign=center mx:columns mx:DataGridColumn headerText=Inspector ID dataField=col1/ mx:DataGridColumn headerText=Inspector Name dataField=col2/ mx:DataGridColumn headerText=Manager width=90 dataField=col3 textAlign=center rendererIsEditor=true mx:itemRenderer mx:Component mx:CheckBox selected={data.staff_array.col3} / /mx:Component /mx:itemRenderer /mx:DataGridColumn mx:DataGridColumn headerText= width=90 dataField=col4 textAlign=center mx:itemRenderer mx:Component mx:HBox mx:Script ![CDATA[ import mx.managers.PopUpManager; [Embed(source='Images/bulletWarning.gif')] private var confirmIcon:Class; import mx.events.FlexEvent; import mx.effects.Fade; import mx.controls.Alert; import mx.events.CloseEvent; private function launchConfirm():void { var a:Alert = Alert.show(Are you sure you want to \n perform this action?, Confirmation, Alert.YES|Alert.NO, this, confirmHandler, confirmIcon, Alert.NO); } private function confirmHandler(event:CloseEvent):void { if (event.detail == Alert.YES) { // what to do if user selected yes result.text = Yes; } else if (event.detail == Alert.NO) { // what to do if user selected no result.text = No; } } ]] /mx:Script mx:Button label=Delete click=launchConfirm();/ /mx:HBox /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid
[flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
im not sure im following you? cant i just send off the entire grid as it is to PHP and then let my php worry about it? --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: The best way is to have the change or click of your checkbox or button(toggle?) update the associated dataProvider item. Easy with XML, just set an attribute, like [EMAIL PROTECTED]delete. When you are ready to update the server, get the modified rows (again easy with e4x), and build your update message. That message depends on your back -end. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 10:48 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] datagrid using button or checkbox wHat Code to Trigger i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ? while i find many demos showing itemrenderer i just cant seem to find any showing examples with interaction on a code level to what im looking for? anyone know a good example
RE: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
What is your PHP code expecting? How does it know if a row is to be inserved, deleted, or updated? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger im not sure im following you? cant i just send off the entire grid as it is to PHP and then let my php worry about it? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: The best way is to have the change or click of your checkbox or button(toggle?) update the associated dataProvider item. Easy with XML, just set an attribute, like [EMAIL PROTECTED]delete. When you are ready to update the server, get the modified rows (again easy with e4x), and build your update message. That message depends on your back -end. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 10:48 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] datagrid using button or checkbox wHat Code to Trigger i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ? while i find many demos showing itemrenderer i just cant seem to find any showing examples with interaction on a code level to what im looking for? anyone know a good example
[flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
umm? well i wasn't sure as ive not seen any examples of interaction with php with a datagrid yet? im new to handling this datagrid except being able to populate it which works now how can i handle php saving options when the grid changes? I guess i was thinking i could just pass php the old grid info and it could easily compare if data changed? is there a better way please send me a link on a working example --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: What is your PHP code expecting? How does it know if a row is to be inserved, deleted, or updated? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger im not sure im following you? cant i just send off the entire grid as it is to PHP and then let my php worry about it? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: The best way is to have the change or click of your checkbox or button(toggle?) update the associated dataProvider item. Easy with XML, just set an attribute, like [EMAIL PROTECTED]delete. When you are ready to update the server, get the modified rows (again easy with e4x), and build your update message. That message depends on your back -end. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 10:48 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] datagrid using button or checkbox wHat Code to Trigger i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ? while i find many demos showing itemrenderer i just cant seem to find any showing examples with interaction on a code level to what im looking for? anyone know a good example
[flexcoders] Datagrid Cell Edit Event update grid
When typing in a datagrid cell, I am capturing the datagrid's change event and then making calculations on other cells in that row. I've used both invalidateList and invalidateDisplayList after I make my calcs but it doesn't seem to update the text in the grid until I've tabbed out of that cell and tabbed out of a second cell. I would really like to do the calcs and see them update in the grid as I'm typing. Is there a better approach to for this? Thanks, Jeff
RE: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
I do not do PHP, but it sounds like you are going to need to learn it. Perhaps you should find a PHP forum/list, since that work does not involve Flex. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger umm? well i wasn't sure as ive not seen any examples of interaction with php with a datagrid yet? im new to handling this datagrid except being able to populate it which works now how can i handle php saving options when the grid changes? I guess i was thinking i could just pass php the old grid info and it could easily compare if data changed? is there a better way please send me a link on a working example --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: What is your PHP code expecting? How does it know if a row is to be inserved, deleted, or updated? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:41 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger im not sure im following you? cant i just send off the entire grid as it is to PHP and then let my php worry about it? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: The best way is to have the change or click of your checkbox or button(toggle?) update the associated dataProvider item. Easy with XML, just set an attribute, like [EMAIL PROTECTED]delete. When you are ready to update the server, get the modified rows (again easy with e4x), and build your update message. That message depends on your back -end. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 10:48 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] datagrid using button or checkbox wHat Code to Trigger i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ? while i find many demos showing itemrenderer i just cant seem to find any showing examples with interaction on a code level to what im looking for? anyone know a good example
RE: [flexcoders] Datagrid Cell Edit Event update grid
If your dataProvider is a Collection, you can call collection.itemUpdated(...) Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of securenetfreedom Sent: Monday, May 05, 2008 1:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Datagrid Cell Edit Event update grid When typing in a datagrid cell, I am capturing the datagrid's change event and then making calculations on other cells in that row. I've used both invalidateList and invalidateDisplayList after I make my calcs but it doesn't seem to update the text in the grid until I've tabbed out of that cell and tabbed out of a second cell. I would really like to do the calcs and see them update in the grid as I'm typing. Is there a better approach to for this? Thanks, Jeff
[flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
lol your funny. im not asking php questions im asking specifically how does flex handle passing information from the grid to any script ASP, php, coldfusion etc... when i say pass i mean to post the new changes to it? i can handle the rest once i understand flex's interaction with scripts --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: I do not do PHP, but it sounds like you are going to need to learn it. Perhaps you should find a PHP forum/list, since that work does not involve Flex. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger umm? well i wasn't sure as ive not seen any examples of interaction with php with a datagrid yet? im new to handling this datagrid except being able to populate it which works now how can i handle php saving options when the grid changes? I guess i was thinking i could just pass php the old grid info and it could easily compare if data changed? is there a better way please send me a link on a working example --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: What is your PHP code expecting? How does it know if a row is to be inserved, deleted, or updated? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:41 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger im not sure im following you? cant i just send off the entire grid as it is to PHP and then let my php worry about it? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: The best way is to have the change or click of your checkbox or button(toggle?) update the associated dataProvider item. Easy with XML, just set an attribute, like [EMAIL PROTECTED]delete. When you are ready to update the server, get the modified rows (again easy with e4x), and build your update message. That message depends on your back -end. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 10:48 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] datagrid using button or checkbox wHat Code to Trigger i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ? while i find many demos showing itemrenderer i just cant seem to find any showing examples with interaction on a code level to what im looking for? anyone know a good example
[flexcoders] AdvancedDataGrid group feature?
Hi, I did a AdvancedDataGrid without group,it works fine. mx:AdvancedDataGrid x=8 y=72 width=558 height=247 rowCount=4 dataProvider={modelLocator.QModel} mx:columns mx:AdvancedDataGridColumn headerText=Name dataField=Name/ mx:AdvancedDataGridColumn headerText=Current Status dataField=TypeName/ /mx:columns /mx:AdvancedDataGrid But it shows nothing with group feature. I check the syntax but it seems ok. do you know why this happen. Thanks mx:AdvancedDataGrid x=8 y=72 width=558 height=247 rowCount=4 mx:dataProvider mx:GroupingCollection id=gc1 source={modelLocator.QModel} mx:Grouping mx:GroupingField name=TypeName / /mx:Grouping /mx:GroupingCollection /mx:dataProvider mx:columns mx:AdvancedDataGridColumn headerText=Name dataField=Name/ mx:AdvancedDataGridColumn headerText=Current Status dataField=TypeName/ /mx:columns /mx:AdvancedDataGrid Thanks in advance Mark
[flexcoders] TextArea but no scroll bars showing up
Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack
[flexcoders] How do I add a header or additional post parameter to a RemoteObject Request?
Hi there, Is it possible to add a header or an additional post parameter to a remoting request (using RemoteObject)? I need to include a unique token to every remoting request, but have not found a way to do it. I also tried to use the RemoteObject.setRemoteCredentials(), reading that it will set the DSCredentials header, but I don't see it on the servletRequest when one of the web filters on the server processes it. Any feedback is appreciated. Thanks.
[flexcoders] reusing code.. action script etc
http://livedocs.adobe.com/flex/3/html/help.html?content=controls_12.html while flex example shows how to assign a date into a text field what if someone wanted to reuse the date function routine with 20 text box's ...? Could i pass a variable containing the name of the object to now use in like so public function useDate(eventObj:CalendarLayoutChangeEvent, MYVARIABLEPASSEDIN):void { // Make sure selectedDate is not null. if (eventObj.currentTarget.selectedDate == null) { return; } composedatetext.text = (eventObj.currentTarget.selectedDate.getMonth()+1) + / + eventObj.currentTarget.selectedDate.getDate() + / + eventObj.currentTarget.selectedDate.getFullYear(); MYVARIABLEGOES HERE.visible=false; }
RE: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
Ignoring LCDS and Blaze DS (which perhaps you should look into), Flex can pass data to the server via the same protocols that it gets it, namely WebService, HTTPService or RemoteObject. Since you used the word POST, presumably you are using HTTPService. What you pass over that protocol is up to you, but is most often xml. If your dataProvider is XML (or is an XMLListCollection backed by XML), you can send the data to the server by doing: myService.contentType = application/xml myService.send(xmlData); Note: I typically use the default content type and do: myService.send({xmlstring:xmlData.toXMLString()}); //then parse the xml string on the server. But that opnly gets your data to the server. Aside from LCDS or BlazeDs, there is no built-in functionality to determine what needs to happen with that data on the server. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 2:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger lol your funny. im not asking php questions im asking specifically how does flex handle passing information from the grid to any script ASP, php, coldfusion etc... when i say pass i mean to post the new changes to it? i can handle the rest once i understand flex's interaction with scripts --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: I do not do PHP, but it sounds like you are going to need to learn it. Perhaps you should find a PHP forum/list, since that work does not involve Flex. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:53 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger umm? well i wasn't sure as ive not seen any examples of interaction with php with a datagrid yet? im new to handling this datagrid except being able to populate it which works now how can i handle php saving options when the grid changes? I guess i was thinking i could just pass php the old grid info and it could easily compare if data changed? is there a better way please send me a link on a working example --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: What is your PHP code expecting? How does it know if a row is to be inserved, deleted, or updated? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 1:41 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger im not sure im following you? cant i just send off the entire grid as it is to PHP and then let my php worry about it? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: The best way is to have the change or click of your checkbox or button(toggle?) update the associated dataProvider item. Easy with XML, just set an attribute, like [EMAIL PROTECTED]delete. When you are ready to update the server, get the modified rows (again easy with e4x), and build your update message. That message depends on your back -end. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jason B Sent: Monday, May 05, 2008 10:48 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] datagrid using button or checkbox wHat Code to Trigger i want to use rendered items in a datagrid .. now i want to have interaction so that if i have a delete button or checkbox i can really begin to put code behind them. I've got all my code to handle showing my button and checkbox but no code too handle how i can remove an item and pass to a php script ?
[flexcoders] Re: ImageMap and area colours
I was wondering the same ,if it possible to change the color of each individual map polygon. Like for example in the current example of USA , when the mouse hovers over some state it will change the color of the state ? --- In flexcoders@yahoogroups.com, neilernst77 [EMAIL PROTECTED] wrote: I am experimenting with ImageMap to create a clickable image of regions of the human brain (e.g. frontal lobe, thalamus etc). I would like to set the colour of the region of interest based on some external data. So for various values of my variables[1], I would alter the colour of the individual regions. If the user clicks the region, I would display the variable value in a label. 1. Can imagemap area colours be set this way? I notice there is a style associated with each area, but can this be set programmatically? 2. Is ImageMap the best choice? I was thinking button might be better, but the regions are all strange shapes, that fit together like puzzle pieces. thanks for any assistance. [1] gene expression data
[flexcoders] Pay-to-Play Credit Card Processors
Hello All- I am prototyping an online application that will require users pay-to- play. That is, users can purchase chunks of time to gain access to the application's functionality. My application is being developed using Flex3 on the front, ColdFusion8 in the middle and SQL Server 2005 on the back. Ideally I would like to integrate cc payment seamlessly. If the user gets close to running out of time they can quickly purchase with a stored profile and then seamlessly pick up where they left off. Does anyone have experience with vendors who provide plug-in cc processing service or shrink-wrapped components for this kind of pay-to- play functionality? Easy integration with the Flash Player 9 a BIG BIG plus, but not necessary. Thanks And Regards -Naga
[flexcoders] Re: How do I add a header or additional post parameter to a RemoteObject Request
Just send an object as the parameter that you send: var myService:RemoteObject = new RemoteObject(); myService.source = myServices.MyService; myService.destination = amfphp; myService.requestTimeout = 30; myService.addEventListener(ResultEvent.RESULT, myResult); myService.addEventListener(FaultEvent.FAULT, faultHandler); var myParameters:Object = new Object(); myParameters.data1 = data1; myParameters.data2 = data2; myParameters.uniqueToken = myUniqueToken ; myService.getOperation('getMyStuff').send(myParameters); --- In flexcoders@yahoogroups.com, jennie_mai_nguyen [EMAIL PROTECTED] wrote: Hi there, Is it possible to add a header or an additional post parameter to a remoting request (using RemoteObject)? I need to include a unique token to every remoting request, but have not found a way to do it. I also tried to use the RemoteObject.setRemoteCredentials(), reading that it will set the DSCredentials header, but I don't see it on the servletRequest when one of the web filters on the server processes it. Any feedback is appreciated. Thanks.
Re: [flexcoders] Combo Box trying to get a deep data...
Trying to match up selected items. IF i use the labelFunction attribute this runs ALL the time. basically i need to change the selected item when the combo box loads up and whenever the data changes. jonese On Mon, May 5, 2008 at 1:34 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Oops, maybe misread your question. You are not asking about accessing deeply nested values, but rather how to set the combobox selectedItem to match its current value? Or maybe you are just asking about declaring dataField? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Monday, May 05, 2008 1:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Combo Box trying to get a deep data... labelFunction() Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jonese Sent: Monday, May 05, 2008 12:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Combo Box trying to get a deep data... Hey all, I've got a combo box with a dataprovider set to an array of value objects. Inside this value object are fields like name, and id. I've got the name as my label field but i'm not sure how to tell Flex that i want the value object with an id of 3 to be my selectedIndex value. thoughts? -- jonese http://www.jonese.us http://twitter.com/jonese -- jonese http://www.jonese.us http://twitter.com/jonese
[flexcoders] Fast updating of image.source
I've got a sequence of images loaded in Flex - for this example let's say I've populated an array (imageArray) with new Image objects. I've got an Image control (myImage) whose source is set on applicationComplete. During the application run, I'd like to be able to set the source of the image control dynamically (in this case, based on mouse position) to the source of one of the objects in the array. For instance: myImage.source=imageArray[0].source; The problem is, when I change image source there's a brief flash (no pun intended) when the image control updates - it seems to briefly show the background of the parent control (in this case a canvas with a solid color). This makes for a jarring transition between each image as it's loaded. I get the same effect even in the simplest of cases - just setting myImage.source explicitly, forgetting about the array. How can I update the source of an Image control without this strobing effect? Or am I going about it the wrong way? My Flex experience is limited to a few months of frontend UI development - lots of data binding and layout - and this is a new one on me. Thanks for any help, Roger Howard
[flexcoders] Checkbox as a headerRenderer
I am implementing a checkbox as a headerRenderer: public class CheckBoxHeaderRenderer extends CheckBox { public function CheckBoxHeaderRenderer() { super(); addEventListener(click, clickHandler); } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); } } I need to be able to communicate to a column that would have that header. I need to enable/disable it, as well as reset column's data. Any idea? Thanks
RE: [flexcoders] Combo Box trying to get a deep data...
Setting a ComboBox to show a selectedItem is not built-in. You will need to loop over the dataProvider for the CBO droplist, compare the current value to the value in the appropriate dp item property, then use the loop index to set the selectedIndex. This is not difficult. If you need to do it a lot, extend combobox. I have an example of this on www.cflex.net http://www.cflex.net/ . Note that it is a bit complicated, because I wanted to be able to get the comboBox options from either the dataProvider item itself or from an external DP. The issue is further complecated because one must be able to specify which property in the droplist dataProvider to use to compare values. A one-off for a specific use case is much simpler. Probably that is why this is not built-in. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jonese Sent: Monday, May 05, 2008 3:52 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Combo Box trying to get a deep data... Trying to match up selected items. IF i use the labelFunction attribute this runs ALL the time. basically i need to change the selected item when the combo box loads up and whenever the data changes. jonese On Mon, May 5, 2008 at 1:34 PM, Tracy Spratt [EMAIL PROTECTED] mailto:tspratt%40lariatinc.com wrote: Oops, maybe misread your question. You are not asking about accessing deeply nested values, but rather how to set the combobox selectedItem to match its current value? Or maybe you are just asking about declaring dataField? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Tracy Spratt Sent: Monday, May 05, 2008 1:30 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: RE: [flexcoders] Combo Box trying to get a deep data... labelFunction() Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of jonese Sent: Monday, May 05, 2008 12:20 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Combo Box trying to get a deep data... Hey all, I've got a combo box with a dataprovider set to an array of value objects. Inside this value object are fields like name, and id. I've got the name as my label field but i'm not sure how to tell Flex that i want the value object with an id of 3 to be my selectedIndex value. thoughts? -- jonese http://www.jonese.us http://www.jonese.us http://twitter.com/jonese http://twitter.com/jonese -- jonese http://www.jonese.us http://www.jonese.us http://twitter.com/jonese http://twitter.com/jonese
[flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
I want to rephrase this once more How can i remove an item from the data grid using action script?
RE: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
Use the dataProvider API, to remove the item from the dataProvider. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 4:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger I want to rephrase this once more How can i remove an item from the data grid using action script?
RE: [flexcoders] TextArea but no scroll bars showing up
Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: flexcoders@yahoogroups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: flexcoders@yahoogroups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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. __winmail.dat
[flexcoders] Re: Dynamic combobox from JSON request
does anyone have a good example of using JSon, combobox and arraycollection? Thanks, timgerr --- In flexcoders@yahoogroups.com, timgerr [EMAIL PROTECTED] wrote: Can I get an example on how to do that with my code, I am unable to figure it out? Thanks, timgerr --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: Arrays don't notify when you push items onto them, so you have to use ArrayCollection or use a temporary Array and assign it to myList
[flexcoders] Wrap button text?
I know that some time ago there was discussion on how to wrap the text on a button, and the workarounds were rather convoluted . any advances on this one? TIA, Mic.
Re: [flexcoders] Re: CartesianDataCanvas not drawing where expected
Thanks! I actually tried the LinearAxis to begin with, but gave up on it after my first attempt since it didn't seem to work right. Since the CategoryAxis worked right away, I didn't explore the issue any further. After playing around with the LinearAxis some more, I got it working the way it should. CartesianDataCanvas now plots like a charm. Thanks again for the help! ~Aaron On Sun, May 4, 2008 at 8:42 AM, syndicate_ai [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Aaron Miller [EMAIL PROTECTED] wrote: Hello, I've been playing around with the Flex charting components, and I seem to be running into an issue when I try to plot (draw) a line on the graph. I am using the CartesianDataCanvas.moveTo and lineTo functions and it seems to work ok for the Y axis, but not the X. I posted an example with view-source enabled here: http://www.openbaseinteractive.com/testproject/UnitCostLab.html It should be plotting 3.5,6900 - 12,12000 but as you can see, it's not. Any ideas what I'm doing wrong? Am I maybe using the wrong kind of horizontalAxis? Thanks for any help! ~Aaron Try using a NumericAxis instead of CatagoryAxis, you generally use catagoryaxis if the data, is in chunks, like months of the year and such.
Re: [flexcoders] Child items in custom component
Sorry, to bug, but does anyone happen to have any ide? Weyert Hello! I am currently a bit clueless regarding using Flex components. I am currently trying to port a .NET component to Flex. Only I have some problems. In a simplified form the problem is that I am trying to add childs to the component. The idea is to use public method to add nodes to the component. The code could be: var node: MyNode = new MyNode(); node.width = node.height = 125; myComponentInstance.addNode( node ); The addNode-method is basically contains: public function addNode( node: MyNode ): void { _nodeContainer.addChild( DisplayObject(node) ); invalidateDisplayList(); } The _nodeContainer is a Sprite class which gets created in the overriden createChildren-method. Now I would be expected that the MyNode-instance (which just draws a simple rectangle 125x125) would be shown. Sadly enough, this is not the case. Does anyone know what should be done to get this working? Yours, Weyert de Boer
RE: [flexcoders] Child items in custom component
There are rules for what children can be added to what parents. Is it possible you are not following those rules? sprite is a much lowe level class than I have ever used, are you sure it can accept the child you are adding? Alex has posted these rules multiple times. Something like: Container can accept container or UIComponent, UIComponent can accept anything, ... etc I do not know whare sprite fits into that. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Weyert de Boer Sent: Monday, May 05, 2008 5:49 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Child items in custom component Sorry, to bug, but does anyone happen to have any ide? Weyert Hello! I am currently a bit clueless regarding using Flex components. I am currently trying to port a .NET component to Flex. Only I have some problems. In a simplified form the problem is that I am trying to add childs to the component. The idea is to use public method to add nodes to the component. The code could be: var node: MyNode = new MyNode(); node.width = node.height = 125; myComponentInstance.addNode( node ); The addNode-method is basically contains: public function addNode( node: MyNode ): void { _nodeContainer.addChild( DisplayObject(node) ); invalidateDisplayList(); } The _nodeContainer is a Sprite class which gets created in the overriden createChildren-method. Now I would be expected that the MyNode-instance (which just draws a simple rectangle 125x125) would be shown. Sadly enough, this is not the case. Does anyone know what should be done to get this working? Yours, Weyert de Boer
RE: [flexcoders] Child items in custom component
I found one of Alex's posts. Here is the text: Once a month this issue comes up. Because there is no function olverloading in AS3, we can't change the parameter list of addChild, but basically, frameworks have rules and the rules for Flex are: Navigator children must be Containers Container children must be IUIComponents UIComponent children can be anything. I swear I replied to this thread two days ago, but answer is to instantiate a UIComponent and addChild your sprite to it. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Monday, May 05, 2008 6:11 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Child items in custom component There are rules for what children can be added to what parents. Is it possible you are not following those rules? sprite is a much lowe level class than I have ever used, are you sure it can accept the child you are adding? Alex has posted these rules multiple times. Something like: Container can accept container or UIComponent, UIComponent can accept anything, ... etc I do not know whare sprite fits into that. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Weyert de Boer Sent: Monday, May 05, 2008 5:49 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Child items in custom component Sorry, to bug, but does anyone happen to have any ide? Weyert Hello! I am currently a bit clueless regarding using Flex components. I am currently trying to port a .NET component to Flex. Only I have some problems. In a simplified form the problem is that I am trying to add childs to the component. The idea is to use public method to add nodes to the component. The code could be: var node: MyNode = new MyNode(); node.width = node.height = 125; myComponentInstance.addNode( node ); The addNode-method is basically contains: public function addNode( node: MyNode ): void { _nodeContainer.addChild( DisplayObject(node) ); invalidateDisplayList(); } The _nodeContainer is a Sprite class which gets created in the overriden createChildren-method. Now I would be expected that the MyNode-instance (which just draws a simple rectangle 125x125) would be shown. Sadly enough, this is not the case. Does anyone know what should be done to get this working? Yours, Weyert de Boer
[flexcoders] Re: Wrap button text?
Answering myself: just found Alex Harui's MultiLineRadioButton class. --- In flexcoders@yahoogroups.com, chigwell23 [EMAIL PROTECTED] wrote: I know that some time ago there was discussion on how to wrap the text on a button, and the workarounds were rather convoluted . any advances on this one? TIA, Mic.
RE: [flexcoders] TextArea but no scroll bars showing up
Jim: I am not sure what you mean with the TextArea.validateNow(). Are you saying I have to call some function to get the scroll bar to display? I guess the question is why is it not showing up? I only happens when I set the height to a number instead of a percent %. Is this bug? I have found no documentation that says the scroll bar will only appear if is contained within a container and/or the height is set to a percentage. Everything I have read says this should work, but I wonder if it is because I have layout=absolute. I will continue to research. Any guidance will be greatly appreciated. Thanks, Jack -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 3:40 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: flexcoders@yahoogroups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: flexcoders@yahoogroups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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] TextArea but no scroll bars showing up
layout=absolute has no bearing. I tried the following code and the scroll bar does not show up when I type in text beyond the 2nd line. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* creationPolicy=auto width=100% height=100% mx:TextArea width=200 height=35/ /mx:Application Any thoughts? Thanks, Jack -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 3:40 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: flexcoders@yahoogroups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: flexcoders@yahoogroups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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] Child items in custom component
Thanks! I will give it a shot tomorrow. Sounds, logical somehow. I suppose it should work.
[flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Use the dataProvider API, to remove the item from the dataProvider. It might be better to mark the item as removed in the dataProvider, since that will probably make it easier to do the delete operation on the server. After that (correct me if I'm wrong--this is all theoretical to me), you'd need to filter the dataProvider to only show the items that have not been removed. The last step would be either using the dataProvider's source to send to the server or removing the filter. JMO; Amy
RE: [flexcoders] TextArea but no scroll bars showing up
Indeed, the TextArea is not behaving as I would expect. Slap it in a Canvas, and it will work ok. mx:Canvas width=200 height=60 mx:TextArea id=ta width=100% height=100% / /mx:Canvas Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack @ Zingit Sent: Monday, May 05, 2008 6:26 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up layout=absolute has no bearing. I tried the following code and the scroll bar does not show up when I type in text beyond the 2nd line. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns=* creationPolicy=auto width=100% height=100% mx:TextArea width=200 height=35/ /mx:Application Any thoughts? Thanks, Jack -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 3:40 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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] Re: datagrid using button or checkbox wHat Code to Trigger
Yes, this is the way to do it in a real app, and is the way I do it, by building an update message that I send to the server. Jason and I have been through all of that in this thread, but he was not receptive to that level of advice, and his last question was simply: How can i remove an item from the data grid using action script? So that is what I answered. I'd have given more detail, but he has not said what his dataProvider is Hint, Jason. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Monday, May 05, 2008 6:47 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid using button or checkbox wHat Code to Trigger --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: Use the dataProvider API, to remove the item from the dataProvider. It might be better to mark the item as removed in the dataProvider, since that will probably make it easier to do the delete operation on the server. After that (correct me if I'm wrong--this is all theoretical to me), you'd need to filter the dataProvider to only show the items that have not been removed. The last step would be either using the dataProvider's source to send to the server or removing the filter. JMO; Amy
RE: [flexcoders] TextArea but no scroll bars showing up
I thought you were setting the text programatically, rather than typing, apologies for that. I just checked it (in flex 3), if the height of the textArea is greater than 40 pixels then scrollbars do appear when you type, but not if = 40. If you look at the source for textArea it appears that this is hardcoded : override public function get verticalScrollPolicy():String { return height = 40 ? ScrollPolicy.OFF : _verticalScrollPolicy; } I can only presume to allow at least some space for the scrollbar to be rendered. If it *has* to be 35 pixels high then you could try extending textArea I suppose, otherwise try 41 ! -Original Message- From: flexcoders@yahoogroups.com on behalf of Tracy Spratt Sent: Tue 06/05/2008 00:04 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Indeed, the TextArea is not behaving as I would expect. Slap it in a Canvas, and it will work ok. mx:Canvas width=200 height=60 mx:TextArea id=ta width=100% height=100% / /mx:Canvas Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack @ Zingit Sent: Monday, May 05, 2008 6:26 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up layout=absolute has no bearing. I tried the following code and the scroll bar does not show up when I type in text beyond the 2nd line. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns=* creationPolicy=auto width=100% height=100% mx:TextArea width=200 height=35/ /mx:Application Any thoughts? Thanks, Jack -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 3:40 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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. __ __ 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. __winmail.dat
RE: [flexcoders] TextArea but no scroll bars showing up
Tracy: Yes that will work, but I only wanted the height to be 35, which allows for 2 lines. The reason is screen real estate. If I set it the Canvas height to 35, then I get horizontal and vertical scroll bars showing up before I even type anything. The lowest number I can go is 44. Jim's research seems to indicate a hard-coded issue if the TextArea is less than 40(Flex 3). override public function get verticalScrollPolicy():String { return height = 40 ? ScrollPolicy.OFF : _verticalScrollPolicy; } I guess I will need to step back and rethink. I was beginning to think I was going crazy. Anyway, guys . . . . thanks for the help. Jack _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Monday, May 05, 2008 6:05 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Indeed, the TextArea is not behaving as I would expect. Slap it in a Canvas, and it will work ok. mx:Canvas width=200 height=60 mx:TextArea id=ta width=100% height=100% / /mx:Canvas Tracy _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack @ Zingit Sent: Monday, May 05, 2008 6:26 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up layout=absolute has no bearing. I tried the following code and the scroll bar does not show up when I type in text beyond the 2nd line. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml com/2006/mxml xmlns=* creationPolicy=auto width=100% height=100% mx:TextArea width=200 height=35/ /mx:Application Any thoughts? Thanks, Jack -Original Message- From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 3:40 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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: Is there way to use fcsh inside Ant build?
I have created a tool to access fcsh.exe from ant: http://fcshwrapper.blogspot.com/ http://fcshwrapper.blogspot.com/
Fwd: [flexcoders] Re: AdvancedDataGrid preserve openItems after data update
OK here's what i did to keep my nodes open. un my update function i call preventDefault() to stop the expected operations. then i manually build using updated data my object instances then search the original objects till i find my matching object overwrite the orginial object with the new instance then run a refresh() on the dataprovider. This appears to be working for me and it is having the expected results.so far :) -- jonese http://www.jonese.us http://twitter.com/jonese On Wed, Apr 23, 2008 at 9:27 PM, rockstar77877 [EMAIL PROTECTED] wrote: Scott and Jonese: I am currently trying to deal with the same issue. I was actually ALMOST there, but I think I have discovered a bug in Flex. So the problem: Keeping the AdvancedDataGrid nodes that were already expanded, open after a filter and refresh (specifically a 'GroupCollection' refresh). First, I got a nice array of objects containing the 'nodes' for the grid nodes that were opened, adg.dataProvider.openNodes Next, I did the filter and gc.refresh(). The final step was to iterate through all the nodes, find out which ones had the same GroupLabel, and expand them using adg.dataProvider.openNode(node:Object). This is where I ran into problems. When I tried to re-open a node using openNode, the node would expand, but the nodes below it would not be in the right tree level (it seems as if they were stepping down in level one by one, even though they were supposed to be all on the same level below it). Now here is a real kicker! If I go to click on anything in the grid after that, the display automatically corrects itself! So odd. If anyone has seen the same thing, or know what I'm even talking about please let me know. Thanks! rockstar --- In flexcoders@yahoogroups.com, Eric Jones [EMAIL PROTECTED] wrote: Did you ever figure out how to do this? jonese --- In flexcoders@yahoogroups.com, smelbyfastlane smelby@ wrote: Hello - I am using an AdvancedDataGrid to display data that is retrieved periodically from a HTTPService. When handling the result event I parse the lastResult e4x into typed objects and put them into an ArrayCollection which is the source for a GroupingCollection as laid out below. After doing all of this I call groupedData.refresh() to get my new data displayed. All of this works fine, except that after calling groupedData.refresh() my group nodes (in the grid) are all collapsed. I have tried saving workItemsGrid.openItems into a temp variable, then setting it back after calling refresh... but that does not work. I am guessing that this is due to the fact that my data provider has entirely different object instances than it had previously. But, I am open to the idea that I just did it incorrectly somehow. Based on my thought that I have different objects in the DP than I did before I figured I could just save off the value of GroupLabel for each openItem, call refresh(), then iterate over the group objects and call workItemsGrid.expandItem() for each that has a GroupLabel that was previously open. The problem with this approach is that I have not yet been able to figure out how to iterate over the groups. Any help in getting my previously open items to re-open is greatly appreciated. Thanks in advance Scott mx:AdvancedDataGrid id=workItemsGrid width=100% height=100% mx:dataProvider mx:GroupingCollection id=groupedData source={flatWorkItemsAC} mx:Grouping ... /mx:Grouping /mx:GroupingCollection /mx:dataProvider ... /mx:AdvancedDataGrid
RE: [flexcoders] TextArea but no scroll bars showing up
You can override it by extending TextArea if you really want to, it sort of works for me : in ShortArsedTextArea.as package { import mx.controls.TextArea; public class ShortArsedTextArea extends TextArea { public function ShortArsedTextArea() { super(); } override public function get verticalScrollPolicy():String { return auto; } } } -Original Message- From: flexcoders@yahoogroups.com on behalf of Jack @ Zingit Sent: Tue 06/05/2008 00:29 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Tracy: Yes that will work, but I only wanted the height to be 35, which allows for 2 lines. The reason is screen real estate. If I set it the Canvas height to 35, then I get horizontal and vertical scroll bars showing up before I even type anything. The lowest number I can go is 44. Jim's research seems to indicate a hard-coded issue if the TextArea is less than 40(Flex 3). override public function get verticalScrollPolicy():String { return height = 40 ? ScrollPolicy.OFF : _verticalScrollPolicy; } I guess I will need to step back and rethink. I was beginning to think I was going crazy. Anyway, guys . . . . thanks for the help. Jack _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Monday, May 05, 2008 6:05 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Indeed, the TextArea is not behaving as I would expect. Slap it in a Canvas, and it will work ok. mx:Canvas width=200 height=60 mx:TextArea id=ta width=100% height=100% / /mx:Canvas Tracy _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack @ Zingit Sent: Monday, May 05, 2008 6:26 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up layout=absolute has no bearing. I tried the following code and the scroll bar does not show up when I type in text beyond the 2nd line. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml com/2006/mxml xmlns=* creationPolicy=auto width=100% height=100% mx:TextArea width=200 height=35/ /mx:Application Any thoughts? Thanks, Jack -Original Message- From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 3:40 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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. __ __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor,
[flexcoders] MessageBroker won't return control after routeMessageToService()
Well, Here is the report after I've traced the errors down. I've noticed that when my custom java message adapter halts BlazeDS' messaging still runs. Several diagnostic applications indicate the durability of BlazeDS messaging. I have however tracked down the source the halting of my java message adapter thread to be the MessageBroker... My custom message adapter is multithreaded in that it manages two tasks: One thread listens for messages from a server and then starts a fire-and-forget messaging thread that then packages and routes the message into an AsyncMessage for broadcast to BlazeDS before dying. Traces indicate that after about 6 days of reliable message routing the messaging threads generated by my listener thread start halting at the msgBroker.routeMessageToService(msg, null); method call. (Trace statements to console halt after Trying to routeMessageToService). public void sendMessage() { System.out.println(name+ Connecting to MessageBroker); msgBroker = MessageBroker.getMessageBroker(null); System.out.println(MessageBroker.getId() = +msgBroker.getId()); String clientID = UUIDUtils.createUUID(false); msg.setClientId(clientID); msg.setMessageId(UUIDUtils.createUUID(false)); msg.setTimestamp(System.currentTimeMillis()); System.out.println(name+ Trying to routeMessageToService); msgBroker.routeMessageToService(msg, null); System.out.println(name+ Successful message route); } That is to say that msgBroker's routeMessageToService() method call is not returning and the messaging threads are all halting and piling up in the JVM. After about 4000 of these halted messaging threads piling up the JVM runs out of memory and the listener thread can't instantiate any more messaging threads and the whole thing comes to a halt. You can say that my problem is thus: MessageBroker's routeMessageToService() method stops returning control to my message thread after about 6 days halting it until the unsent message threads pile up leading up to an out of memory crash. I'm working on a fix that will kill the halted message thread if it runs longer than a few seconds. This should aleviate the thread traffic jam but I don't know if the MessageBroker will start routing messages again. I don't know why it stops either. Hope you could shed some light on this. Best, Justin --- In flexcoders@yahoogroups.com, Justin Fujita [EMAIL PROTECTED] wrote: Thanks Mete, I really appreciate your help. I've changed up my java message producer a bit to see if that helps as well. I guess I'll let you know how it works out in about 5-6 days Thanks again, -Justin On Tue, Apr 22, 2008 at 11:15 AM, meteatamel [EMAIL PROTECTED] wrote: I've added some info to the bug report. Please take a look. -Mete --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, jfujita1 justin.fujita@ wrote: Hi, I've built a GIS FLEX application that uses blazeDS' messaging capability to push location (latitude/longitude/geocode) info to flex clients. The message producer is a custom Java bootstrapper and adapter that configures the messaging destination endpoints upon server startup. The destination runtime config java bootstrap method for our fleet_demo destination looks like this: public void initializeDestinations() { String destinationId = fleet_demo; String serviceId = message-service; MessageBroker broker = MessageBroker.getMessageBroker(null); MessageService service = (MessageService) broker.getService(serviceId); MessageDestination destination = (MessageDestination) service.createDestination(destinationId); destination.addChannel(my-streaming-amf); destination.addChannel(my-polling-amf); ServerSettings serverSettings = new ServerSettings(); serverSettings.setMaxCacheSize(1000); serverSettings.setMessageTTL(0); serverSettings.setDurable(false); destination.setServerSettings(serverSettings); if (service.isStarted()) { //initialize and run the destination destination.start(); } } The bootstrapper also spawns a separate thread that continuously receives location data from our server and packages it into an AsyncMessage and routes it to the appropriate destination using a method similar to this: private void sendMessage(latitudeFromServer:double, longitudeFromServer:double) { MessageBroker msgBroker = MessageBroker.getMessageBroker(null); String clientID = UUIDUtils.createUUID(false); AsyncMessage msg = new AsyncMessage(); msg.setDestination(fleet_demo); msg.setHeader(latitude, latitudeFromServer); msg.setHeader(longitude, longitudeFromServer); msg.setClientId(clientID); msg.setMessageId(UUIDUtils.createUUID(false)); msg.setTimestamp(System.currentTimeMillis()); msgBroker.routeMessageToService(msg, null); } Now I start up the server and the bootstrapper initializes the fleet_demo endpoint and
[flexcoders] Re: Use Cairngorm wihtout Dispatch
The point I was making as that just because events are used on the view instead of it accessing controller methods directly it doesn't necessarily de-couple them Agreed. Also, I don't like being restricted to only being able to register events types to command classes to a Front Controller that is created in the view. Registering the controller in the view means to reference it at runtime i have to go through the view. Common sense tells me in MVC it would be better if the controller was created by the model, not the view. --- In flexcoders@yahoogroups.com, Stephen Downs [EMAIL PROTECTED] wrote: I'm not saying it's a major problem that we come across often, but when taking on other people's work, or working as a team it's something we have come across. We would expect all vars, methods, class, events to be named well, but we find it more efficient to error the project through changing a method name, than to do a find in files. We want to keep things as simple as possible. The point I was making as that just because events are used on the view instead of it accessing controller methods directly it doesn't necessarily de-couple them, since in most cases the view is relying on its events being picked up and acted upon. If my previous statement is true for you and your team, there's really no need to go down the event road, as it does introduces more complication and with it more time to implement. Just to clarify we don't take this approach on components, but we do for views/screens. On 5 May 2008, at 01:37, Jim Hayes wrote: I've not really had those problems myself Tink. I don't dispatch any standard cairngorm events, instead I have events that extend it and are (usually!) fairly well named to reflect what's happening. Maybe that's because for me they normally carry some data, and I like that data to be as strongly typed as is practicable. The command/delegate will usually follow the same naming, so I may have SaveBitmapEvent + SaveBitmapCommand + SaveBitmapDelegate, for example. So to find any particular event dispatch in my view, it's pretty easy to do a find in files on the project, though in practice I find I rarely need to. Likewise, finding the command it calls is pretty easy for the most part, as is the implementation in the delegate. Good point on the controller not listening, but I guess I've just got used to writing a shell version of my command, breakpointing it's constructor and checking it does get called when I expect it to before proceeding to fill in it's implementation. If not, then the frontController has it's fingers in it's ears shouting na na na I can't hear you :) It would be good if it could catch all cairngorm events and raise a warning if they were not registered, though. I have a feeling it wouldn't be too hard to extend it do that, but I've never felt the need myself. I'm sure we're both thinking don't make me have to think too hard, if at all, and I'm in broad agreement with you, but the 3 classes and controller entry approach does work for me (even if it is very tedious to write at the time). -Original Message- From: flexcoders@yahoogroups.com on behalf of Stephen Downs Sent: Sun 04/05/2008 14:08 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Use Cairngorm wihtout Dispatch I have to agree with MichNiu here. The CairngormEventDispatcher obsfucates the code. i.e. you come back to a project 6 months down the line, its difficult to find in the view where your CairngormEvents are dispatch. What is the difference of the view knowing what event it has to dispatch, to it actually knowing the method on the controller it was to invoke? Very little in my opinion, but the later enables you to very easily pinpoint all the calls from the view to a method on the controller, by just changing the name of the method on the controller, and looking at all the errors that will appear on the view. This makes things much easier to debug and therefore easier to maintain. You talk about making views re-useable, but if your view is dispatching CairngormEvents, you can guarantee it's relying on some action of the FrontController for it to work properly. If you FrontController doesn't listen to these events, your view won't work, therefore it aint re-usable, its relying on the FrontController acting upon the events is dispatches. We still keep a Controller unlike MichNui's implementation, but we cut out the use of CairngormEventDispatcher some time ago. Now when it comes to re-usable components, thats a different matter. Tink On 22 Apr 2008, at 03:53, ben.clinkinbeard wrote: One of the core principles of not just Cairngorm but MVC in general is for your views to be as dumb as possible. The less they know about models, services,
RE: [flexcoders] TextArea but no scroll bars showing up
Jim: I'll check it out. Thanks, Jack -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 6:45 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up You can override it by extending TextArea if you really want to, it sort of works for me : in ShortArsedTextArea.as package { import mx.controls.TextArea; public class ShortArsedTextArea extends TextArea { public function ShortArsedTextArea() { super(); } override public function get verticalScrollPolicy():String { return auto; } } } -Original Message- From: flexcoders@yahoogroups.com on behalf of Jack @ Zingit Sent: Tue 06/05/2008 00:29 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Tracy: Yes that will work, but I only wanted the height to be 35, which allows for 2 lines. The reason is screen real estate. If I set it the Canvas height to 35, then I get horizontal and vertical scroll bars showing up before I even type anything. The lowest number I can go is 44. Jim's research seems to indicate a hard-coded issue if the TextArea is less than 40(Flex 3). override public function get verticalScrollPolicy():String { return height = 40 ? ScrollPolicy.OFF : _verticalScrollPolicy; } I guess I will need to step back and rethink. I was beginning to think I was going crazy. Anyway, guys . . . . thanks for the help. Jack _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Monday, May 05, 2008 6:05 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Indeed, the TextArea is not behaving as I would expect. Slap it in a Canvas, and it will work ok. mx:Canvas width=200 height=60 mx:TextArea id=ta width=100% height=100% / /mx:Canvas Tracy _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack @ Zingit Sent: Monday, May 05, 2008 6:26 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up layout=absolute has no bearing. I tried the following code and the scroll bar does not show up when I type in text beyond the 2nd line. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml com/2006/mxml xmlns=* creationPolicy=auto width=100% height=100% mx:TextArea width=200 height=35/ /mx:Application Any thoughts? Thanks, Jack -Original Message- From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Jim Hayes Sent: Monday, May 05, 2008 3:40 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: RE: [flexcoders] TextArea but no scroll bars showing up Try yourTextArea.validateNow() after adding the extra text. I seem to remember that works, though I can't swear to it I'm afraid (and can't check just now). -Original Message- From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com on behalf of Jack @ Zingit Sent: Mon 05/05/2008 19:29 To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] TextArea but no scroll bars showing up Flex 2.01 This seems so dumb, but I can not figure this out. I am using Modules with layout=absolute. In a MXML file I have a TextArea where I have set the width=300 and height=35. mx:TextArea top=10 left=30 width=300 height=35/ I can add text beyond 2 lines, but no scroll bar is displayed. If I set the height=100% then the scroll bar shows up when I type text beyond 2 lines. I can also place it inside a VBox and set height=100%, but that just adds unnecessary code. That also causes other positioning problems. However, I want/need to set the TextArea's height. What am I missing? Is there a simple way? Thanks, Jack __ 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] Fast updating of image.source
Hi Roger, Roger Howard wrote: I've got a sequence of images loaded in Flex - for this example let's say I've populated an array (imageArray) with new Image objects. I've got an Image control (myImage) whose source is set on applicationComplete. During the application run, I'd like to be able to set the source of the image control dynamically (in this case, based on mouse position) to the source of one of the objects in the array. For instance: myImage.source=imageArray[0].source; The problem is, when I change image source there's a brief flash (no pun intended) when the image control updates - it seems to briefly show the background of the parent control (in this case a canvas with a solid color). This makes for a jarring transition between each image as it's loaded. I get the same effect even in the simplest of cases - just setting myImage.source explicitly, forgetting about the array. How can I update the source of an Image control without this strobing effect? Or am I going about it the wrong way? My Flex experience is limited to a few months of frontend UI development - lots of data binding and layout - and this is a new one on me. What about storing an array of Image components in the array rather than the urls... put them all on the canvas and the just set visible for the one you want to display. I had to do a similar thing once when i wrote a flex lake applet. YMMV. http://users.on.net/~shaun/FlickrLake/FlickrLake.html http://users.on.net/~shaun/FlickrLake/FlexLake.as cheers,
[flexcoders] Modules the way to go?
Hey guys, Im actually working on an application that controls several Flex made apps. It's like a desktop manager application that manages several widgets. The applications running in the desktop manager are modules set on the server, that are loaded and unloaded per user request, but when a user have 6 or more Modules opened at the time the desktop manager becomes really slow, and the explorer can even crash! Am I working the modules the wrong way, or this component really adds that kind of weight to the computer? Is there another way to go? Thanx a lot guys...
[flexcoders] Query on SWC
Hi, I have created a SWC file of various components. Adding the SWC to Flex Builder project makes the components visible in the Components Window (in Flex Builder) under the folder named Custom. Instead I would like to display it under a different category in the Components Window. Also some of these components have certain properties that would appear in the Properties view. As of Flex Builder 2, this Meta data had to be stored in xml files within Flex Builder plug-ins. However, I believe that there are easier ways to do the same using Flex builder 3. I think some of this meta data can be added to the swc file itself. Could anyone throw some light on how this can be achieved? If not in Flex Builder, are there any other tools or procedures that can lead to an easier solution? Thanks Regards, Sudha. Check out the all-new face of Yahoo! India. Go to http://in.yahoo.com/
RE: [flexcoders] Modules the way to go?
A module is as big as you make it. I'd be checking to make sure it is small and releases unused resources. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Monday, May 05, 2008 8:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Modules the way to go? Hey guys, Im actually working on an application that controls several Flex made apps. It's like a desktop manager application that manages several widgets. The applications running in the desktop manager are modules set on the server, that are loaded and unloaded per user request, but when a user have 6 or more Modules opened at the time the desktop manager becomes really slow, and the explorer can even crash! Am I working the modules the wrong way, or this component really adds that kind of weight to the computer? Is there another way to go? Thanx a lot guys...
RE: [flexcoders] reusing code.. action script etc
I would subclass. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason B Sent: Monday, May 05, 2008 11:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] reusing code.. action script etc http://livedocs.adobe.com/flex/3/html/help.html?content=controls_12.html http://livedocs.adobe.com/flex/3/html/help.html?content=controls_12.htm l while flex example shows how to assign a date into a text field what if someone wanted to reuse the date function routine with 20 text box's ...? Could i pass a variable containing the name of the object to now use in like so public function useDate(eventObj:CalendarLayoutChangeEvent, MYVARIABLEPASSEDIN):void { // Make sure selectedDate is not null. if (eventObj.currentTarget.selectedDate == null) { return; } composedatetext.text = (eventObj.currentTarget.selectedDate.getMonth()+1) + / + eventObj.currentTarget.selectedDate.getDate() + / + eventObj.currentTarget.selectedDate.getFullYear(); MYVARIABLEGOES HERE.visible=false; }
RE: [flexcoders] Checkbox as a headerRenderer
Have your classfactory only return one instance. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Monday, May 05, 2008 1:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Checkbox as a headerRenderer I am implementing a checkbox as a headerRenderer: public class CheckBoxHeaderRenderer extends CheckBox { public function CheckBoxHeaderRenderer() { super(); addEventListener(click, clickHandler); } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); } } I need to be able to communicate to a column that would have that header. I need to enable/disable it, as well as reset column's data. Any idea? Thanks