Re: [flexcoders] Building workspace - lowering the time
I have 4 projects open. The project I was working on had 4 components in it. I had 3 other projects open. One was a Example project that had about 20 example files in it. I noticed too I had a lot programs up. So I might have been using virtual memory. It only happened once and its ok now. I'm curious, when it's Building the workspace what does that mean technically? On 12/6/06, Gordon Smith [EMAIL PROTECTED] wrote: You could turn off Build Automatically in the Projects menu, or close projects that you aren't working on (right-click on a project in the Navigator pane and choose Close Project). How many projects are you building, and how many components does the average one have? - Gordon -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *dorkie dork from dorktown *Sent:* Tuesday, December 05, 2006 11:19 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Building workspace - lowering the time Is there anything I can do to lower the time it takes for Flex Builder to Build the workspace? Sometimes it takes a few minutes when I first start up. dorkie finger tapping dork from dorktown
Re: [flexcoders] RadioButtons in DataGrid
Hi, everyone. I'm really tired of DataGrid. Why does ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical horizontalAlign=left mx:RadioButton id=one label=one / mx:RadioButton id=two label=two / mx:RadioButton id=three label=three / mx:RadioButton id=four label=four creationComplete={four.selected = true;} / mx:RadioButton id=five label=five / /mx:Application work good and ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical horizontalAlign=left creationComplete={four.selected = true;} mx:RadioButton id=one label=one / mx:RadioButton id=two label=two / mx:RadioButton id=three label=three / mx:RadioButton id=four label=four / mx:RadioButton id=five label=five / /mx:Application work good but if i set selected into an item renderer as described in previous message it doesn't? I've already tried doing it on creation complete. Nothing. Even tried initialize (dunno why). Nothing. Maybe somebody knows good approach to working with List-based controls and custom item renderers (alike RadioButton, CheckBox etc). R.
[flexcoders] Combo box selectedlabel problem.
Hi all I want to set the initial value of a combo box to the first item when the application loads and load another component according to the item selected. The functionality works when I use a change action in the combo box.That is it works when I manually change the item of the combobox. But it is not working when the application is loading. That is the event is not listening when the application loads. Examples I have say 5 items select Code,1,2,3,4. So the default vaue will be select code.A alue for 1 will show an apple image in another a componentand so on. When I manually change to the value 2 the image changes and when I change to 1 the image is changed to apple. I want the application to start with the initial value of the combo box set to 1. So that the initial image will be apple.Though the combo box is set to 1 there is no image shown. Only when I do it manually it shows up. Can any one help on this regard. Thanks in Advance Hara
[flexcoders] Re: TitleWindow Component...help!
I've developed a test mxml file of the current combobox note updating problem at hand. In the following example, click Fill Data. The combobox's data fills up. Choose either the first or second item in the combobox. Now click the associated Rename Data button for the item chosen. Notice that nothing happens? But wait, if you click the combobox to open it, you'll see that the data was in fact updated, but we're just not seeing it. Now change the ComboBox to a DataGrid. Everything works fine. What gives? - Chris PS - you're probably wondering why I used ObjectProxy. This was because I noticed in my debugger that everything else was as well for the particular place where I was testing this. Regardless, it doesn't seem to matter what I used (Array, Object, etc.), as the problem still occurs. -testProblem.mxml- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=vertical mx:Script ![CDATA[ import mx.utils.ObjectProxy; import mx.collections.ArrayCollection; [Bindable] private var ac:ArrayCollection = new ArrayCollection; private function init():void { var buildData1:ObjectProxy = new ObjectProxy; buildData1.field1 = object1-field1; buildData1.field2 = object1-field2; buildData1.field3 = object1-field3; var buildData2:ObjectProxy = new ObjectProxy; buildData2.field1 = object2-field1; buildData2.field2 = object2-field2; buildData2.field3 = object2-field3; ac.addItem(buildData1); ac.addItem(buildData2); } private function setFirstItem():void { var buildData1_renamed:ObjectProxy = new ObjectProxy; buildData1_renamed.field1 = object1_renamed-field1; buildData1_renamed.field2 = object1_renamed-field2; buildData1_renamed.field3 = object1_renamed-field3; ac.setItemAt(buildData1_renamed,cbTestData.selectedIndex); } private function setSecondItem():void { var buildData2_renamed:ObjectProxy = new ObjectProxy; buildData2_renamed.field1 = object2_renamed-field1; buildData2_renamed.field2 = object2_renamed-field2; buildData2_renamed.field3 = object2_renamed-field3; ac.setItemAt(buildData2_renamed,cbTestData.selectedIndex); } ]] /mx:Script mx:ComboBox id=cbTestData dataProvider={ac} labelField=field1 width=50%/ mx:Button label=Fill with Data click=init()/ mx:Button label=Rename Data in Item #1 (select the first item before clicking) click=setFirstItem()/ mx:Button label=Rename Data in Item #2 (select the second item before clicking) click=setSecondItem()/ mx:Text text={cbTestData.selectedItem.field1}/ mx:Text text={cbTestData.selectedItem.field2}/ mx:Text text={cbTestData.selectedItem.field3}/ /mx:Application --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: Concerning this last post - I even changed the combobox to a datagrid, nothing else changed, and it works perfectly fine. What gives? What's so different about the two? - Chris --- In flexcoders@yahoogroups.com, qnotemedia qnotemedia@ wrote: I hear ya Tracy. Been browsing it from my MAX docs, and maybe we'll do it in the next project. ;) Still harping on this particular thing, I've run into a weird unrelated snag. When the object in the main app is a combobox instead of a datagrid, the combobox's display doesn't update (even tho the data is). i.e. running the titlewindow as an editor, I edit some values in text boxes from, and when I click OK from the titlewindow, the AC's are updated with setItemAt and the window closes and the object on the main app updates (because its bound to a public AC variable). If the object is a datagrid, everything updates fine. If its a combobox, it updates the data correctly, but initially it doesn't look like it - the displayed label hasn't changed. Clicking the combobox to open it, you can see that the selected label and data are in fact updated. Closing the combobox without choosing anything updates he label correctly. How come its not immediately updated when the AC is, like the datagrid? Tried refresh() on the AC just before closing the window, but that didn't seem to do anything. Not sure what else to try! Thanks all, - Chris --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: I am slowly becoming comfortable with using event driven functionality, so this opinion is only that. However, the primary benefit of loose coupling is re-usability, and maybe maintainability, in the sense that it will be easier to drop-in replacement parts. (any others, anyone?). But event code is a little harder to write read and debug than straight calls to directly referenced members. If you are reasonably sure what you are building will not need to be re-used, then there may be little benefit in the effort to gain loose
[flexcoders] Re: TitleWindow Component...help!
OK - If I reassign the ArrayCollection (and retell it what the selectedIndex is), it updates correctly. i.e., at the end othe setFirstItem(),setSecondItem(): cbTestData.dataProvider = ac; But seriously, there's got to be a better way than that. Otherwise, what's the point of using an ArrayCollection binding with a combobox? - Chris --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: I've developed a test mxml file of the current combobox note updating problem at hand. In the following example, click Fill Data. The combobox's data fills up. Choose either the first or second item in the combobox. Now click the associated Rename Data button for the item chosen. Notice that nothing happens? But wait, if you click the combobox to open it, you'll see that the data was in fact updated, but we're just not seeing it. Now change the ComboBox to a DataGrid. Everything works fine. What gives? - Chris PS - you're probably wondering why I used ObjectProxy. This was because I noticed in my debugger that everything else was as well for the particular place where I was testing this. Regardless, it doesn't seem to matter what I used (Array, Object, etc.), as the problem still occurs. -testProblem.mxml- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=vertical mx:Script ![CDATA[ import mx.utils.ObjectProxy; import mx.collections.ArrayCollection; [Bindable] private var ac:ArrayCollection = new ArrayCollection; private function init():void { var buildData1:ObjectProxy = new ObjectProxy; buildData1.field1 = object1-field1; buildData1.field2 = object1-field2; buildData1.field3 = object1-field3; var buildData2:ObjectProxy = new ObjectProxy; buildData2.field1 = object2-field1; buildData2.field2 = object2-field2; buildData2.field3 = object2-field3; ac.addItem(buildData1); ac.addItem(buildData2); } private function setFirstItem():void { var buildData1_renamed:ObjectProxy = new ObjectProxy; buildData1_renamed.field1 = object1_renamed-field1; buildData1_renamed.field2 = object1_renamed-field2; buildData1_renamed.field3 = object1_renamed-field3; ac.setItemAt(buildData1_renamed,cbTestData.selectedIndex); } private function setSecondItem():void { var buildData2_renamed:ObjectProxy = new ObjectProxy; buildData2_renamed.field1 = object2_renamed-field1; buildData2_renamed.field2 = object2_renamed-field2; buildData2_renamed.field3 = object2_renamed-field3; ac.setItemAt(buildData2_renamed,cbTestData.selectedIndex); } ]] /mx:Script mx:ComboBox id=cbTestData dataProvider={ac} labelField=field1 width=50%/ mx:Button label=Fill with Data click=init()/ mx:Button label=Rename Data in Item #1 (select the first item before clicking) click=setFirstItem()/ mx:Button label=Rename Data in Item #2 (select the second item before clicking) click=setSecondItem()/ mx:Text text={cbTestData.selectedItem.field1}/ mx:Text text={cbTestData.selectedItem.field2}/ mx:Text text={cbTestData.selectedItem.field3}/ /mx:Application --- In flexcoders@yahoogroups.com, qnotemedia qnotemedia@ wrote: Concerning this last post - I even changed the combobox to a datagrid, nothing else changed, and it works perfectly fine. What gives? What's so different about the two? - Chris --- In flexcoders@yahoogroups.com, qnotemedia qnotemedia@ wrote: I hear ya Tracy. Been browsing it from my MAX docs, and maybe we'll do it in the next project. ;) Still harping on this particular thing, I've run into a weird unrelated snag. When the object in the main app is a combobox instead of a datagrid, the combobox's display doesn't update (even tho the data is). i.e. running the titlewindow as an editor, I edit some values in text boxes from, and when I click OK from the titlewindow, the AC's are updated with setItemAt and the window closes and the object on the main app updates (because its bound to a public AC variable). If the object is a datagrid, everything updates fine. If its a combobox, it updates the data correctly, but initially it doesn't look like it - the displayed label hasn't changed. Clicking the combobox to open it, you can see that the selected label and data are in fact updated. Closing the combobox without choosing anything updates he label correctly. How come its not immediately updated when the AC is, like the datagrid? Tried refresh() on the AC just before closing the window, but that didn't seem to do anything. Not sure what else to try! Thanks all, - Chris --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: I am slowly becoming
Re: [flexcoders] Combo box selectedlabel problem.
Hello, Try to dispatch event from your combo manually, like myCombo.dispatchEvent( new Event( Event.CHANGE ) ); haravallabhan wrote: Hi all I want to set the initial value of a combo box to the first item when the application loads and load another component according to the item selected. The functionality works when I use a change action in the combo box.That is it works when I manually change the item of the combobox. But it is not working when the application is loading. That is the event is not listening when the application loads. Examples I have say 5 items select Code,1,2,3,4. So the default vaue will be select code.A alue for 1 will show an apple image in another a componentand so on. When I manually change to the value 2 the image changes and when I change to 1 the image is changed to apple. I want the application to start with the initial value of the combo box set to 1. So that the initial image will be apple.Though the combo box is set to 1 there is no image shown. Only when I do it manually it shows up. Can any one help on this regard. Thanks in Advance Hara -- Feсi quod potui, faciant meliora potentes
Re: [flexcoders] Re: need strategy for filtering ArrayCollections in a Cairngorm app
Thanks for the reply, I think the root of the problem is the 'drilldown' filtering while still keeping things in sync via binding. That or I am just not thinking about it the right way. retrieve array from database stored in model.master - model.slave1, model.slave2, model.slave3 collections created from master with preliminary filters - the local view variable slaveData is bound to model.slave1 component slaveData={model.slave1}/ - slaveData in the component will get the preliminary filter of the slaveX in the model, or if I update the user changable filter on slaveData then slaveX will also have it's preliminary filter changed . Thats where I'm getting stuck at, creating collections off of 1 retrieval of data from the db, applying a filter to each collection to pre-sort them into their category, then allowing the user to filter each category's view further on their own actions Is your recommendation to keep 3 master arrays in the model (manually setup and not with a filterFunction), and when a command to update an item in 1 is executed, I should have it update the others accordingly via looping or setItemAt? Sorry for the long post and my mental road block! On 12/5/06, Alex Uhlmann [EMAIL PROTECTED] wrote: Hi Rick, I havn't read the complete thread below, but since you're saying you're working in a Cairngorm app, to me this looks like functionality that should live in either one or multiple model object(s), instead of the view. The view could just bind to a property (some collection) of that model and update it via encapuslated API requests aka commands. Would that work for you? Best, Alex *Alex Uhlmann * Consultant (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] http://weblogs.macromedia.com/auhlmann -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rick Schmitty *Sent:* 05 December 2006 17:01 *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: need strategy for filtering ArrayCollections in a Cairngorm app To dig up an old thread... How would you go about this if you had a component that you wanted to reuse for different views of the data that could be filtered additionally by that view? I've run into a similar problem Tom had where the filterFunction is passed along or overwritten. It seems my only choice (good or bad?) is to have all possible filtering functions in the component and pass the component some logic on which to use for its 'base' data in addition to any user filter applied on the already filtered 'base' data set Perhaps I'm going about it the wrong way. I've modified Paul's example below: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=initialise() xmlns:local=* mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.collections.ListCollectionView; import flash.utils.Timer; [Bindable] public var master : ArrayCollection = new ArrayCollection(); [Bindable] public var slave1 : ListCollectionView = new ListCollectionView(master); [Bindable] public var slave2 : ListCollectionView = new ListCollectionView(master); [Bindable] public var slave3 : ListCollectionView = new ListCollectionView(master); public var value : int = 0; public function initialise() : void { slave1.filterFunction = filterOdd; slave1.refresh(); slave2.filterFunction = filterEven; slave2.refresh(); slave3.filterFunction = filterDivBy10; slave3.refresh(); var timer : Timer = new Timer( 10, 50); timer.addEventListener( timer, addValue); timer.start(); } public function addValue( event : Event ) : void { master.addItem( ++value ); } public function filterOdd( item : Object ) : Boolean { var value : int = int(item); return value % 2 == 1 } public function filterEven( item : Object ) : Boolean { var value : int = int(item); return value % 2 == 0 } public function filterDivBy10( item : Object ) : Boolean { var value : int = int(item); return value % 10 == 0 } ]] /mx:Script mx:HBox width=100% mx:VBox mx:Label text=Master List/ mx:List editable=true dataProvider={ master } height=400/ /mx:VBox local:slave slaveData={slave1} label=odd/ local:slave slaveData={slave2} label=even/ local:slave slaveData={slave3} label=divisible by 10/ /mx:HBox /mx:Application ** slave.mxml ** ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:ac=com. adobe.ac.util.* creationComplete=complete() initialize=init() mx:Script ![CDATA[ import mx.collections.ListCollectionView; [Bindable] public var slaveData:ListCollectionView; public function filterDivBy5(item:Object):Boolean { var value : int = int(item); if (filterOn.selected) return value % 5 == 0 else return true; } private function init():void { trace(init); debug(); trace(); } private function complete():void { trace(complete);
Re: [flexcoders] Re: itemrenderer trying to access variables in main application
It depends how you design your renderer. Ben's example is excelent and will show you how to implement an item renderer fully decoupled. In case you have an in-line renderer, you can use outerDocument. Example var myVar : String = Global var declared somewhere in your parent application. and from your renderer you can access it: outerDocument.myVar HTH, Valy - Original Message From: ben.clinkinbeard [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, December 5, 2006 11:30:08 PM Subject: [flexcoders] Re: itemrenderer trying to access variables in main application Hi Bill, This is pretty simple to accomplish if you use ClassFactory to set up your itemRenderers. You'll need to implement IFactory in your itemRenderer class and then do something like this in the file where your DataGrid lives: [Bindable] private var myRenderer:ClassFac tory; myRenderer = new ClassFactory( MyAwesomeRendere rClass); myRenderer.properti es = {externalObject: mainApp, externalPropertyNam e: buttonTwoEnabled }; Then inside your IR class (where you've also declared public vars with the same names as in the properties object) you could bind the button's enabled property to externalObject[ externalProperty Name]. This technique is explained in more detail here: http://www.returnun defined.com/ 2006/11/creating -truly-reusable- renderers- with-classfactor y/ HTH, Ben --- In [EMAIL PROTECTED] ups.com, bghoward3 billhoward@ ... wrote: can someone point me in the right direction of retrieving a binded vriable created in the main application from a itemrenderer located in a datagrid? i have a datagrid that contains an itemrender, the itemrender file contains 2 buttons. based on the user id which is established in the main application, one of these buttons may or may not be enabled i have tried outerdocument and various iterations of parent application and mx.core with no success thanks in advance for any leads Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com
Re: [flexcoders] Array to Alert
You can use the new line \n to build the Alert message. Alert.show( array[0] + \n + array[1] ), something like that. HTH, Valy - Original Message From: jmfillman [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, December 5, 2006 6:57:03 PM Subject: [flexcoders] Array to Alert I have a label field in an ArrayCollection that I need to display on an alert box. I need each label to be on it's own line in the alert box. Say I have 3 records in the Array, with label values of *Name, *Address, and *Phone. I need to get those labels from the ArrayCollection and have them show on the alert like this: *Name *Address *Phone Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.
[flexcoders] Repeated Background -- solution here
Check this solution: http://labs.flexcoders.nl/?p=16
Re: [flexcoders] UITextField - width anti-alias type - FEATURE REQUEST: more examples in documentation
Have you tried using getUITextFormat and then calling measureText on that? Patrick {reduxdj} a écrit : Flexmasters: I've tried this a dozen ways, what's the best way to get the width of a UITextField and I've brought it up a few times. I won't stop asking till somebody can help me then these results then they will be search friendly! I know you have better things to do than help me, so it's appreciated greatly. I made my own graphical bar chart and want the number planted evenly in the middle of my bar and I can't do that without the width of my my UITextField. My application looks terrible without this aligning in the center. Right now, I have a bunch of if statements to try to size my textfields and that's totally dumb...etc. I've tried: validateNow( ); inValidateNow( ) updateDisplayList( ); yourGuessIsBetterTh anMine(); I always get back 100 I just need an example -- please- also measureWidth requires anti-alias not set to null, how does one set that correctly? I wish Adobe would add more examples in the documentation about textfields, i mean look at the posts about textfields, wordwrap etc. a lot of people have questions about these new tools and not everybody migrated from flex 1.5, like me. There's a bunch of stuff that should have simple examples. Actually shouldn't every class have examples, in a perfect application development world? UITextField has no examples. Will there be more actionscript examples in flash because i notice that most examples in flex documentation are reserved for mxml than AS. I really miss the old days of mytextfield. _width... I'm done venting for tonight. ;) Thanks, Patrick
[flexcoders] Re: FLV Duration
I tried the flvtool2 and couldn't really figure it out, didn't spend a whole lot of time with it though. Found another tool that does the same thing and I was able to figure out quickly. FLVMDI, http://www.buraks.com/flvmdi/, has commandline and gui options, can output a new flv with the metadata as well outputing an xml of the data. Thanks for the help everyone, hopefully this will save others a bit of trouble as well. -John --- In flexcoders@yahoogroups.com, Sönke Rohde [EMAIL PROTECTED] wrote: Hi, If it was not encoded with metadata why not inject that metadata with FLVTool2? If there is no metadata you will not be able to get the duration. Another possibility would be to use the print command of FLVTool2 to determine the duration instead of injecting it. Cheers, Sönke -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john_69_11 Sent: Tuesday, December 05, 2006 6:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: FLV Duration again, only works if the flv was encoded correctly with the metadata --- In flexcoders@yahoogroups.com, Matt Horn mhorn@ wrote: If you're using the VideoDisplay component, you can get the length of the FLV file using the totalTime property. hth, matt horn flex docs -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of john_69_11 Sent: Monday, December 04, 2006 4:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLV Duration Is there an easy way to figure out the duration of an FLV thati s being played? I have been looking at the NetStream object and the onMetaData event, but it seems like the FLV does not always have the metadata set. The FLVs I want to play are created my other people, so there is no way to force them to add the metadata. is there any way to easily get around this? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] RE: Tree Background Oddity - GMC2
As an additional note, setting the backgroundColor style of the Tree has no effect. Setting backgroundAlpha to 0 does hide it, but also hides the background colors of the Tree items as stipulated in the depthColors array. -Original Message- From: Battershall, Jeff Sent: Wednesday, December 06, 2006 9:19 AM To: flexcoders@yahoogroups.com Subject: Tree Background Oddity - GMC2 I've got a tree acting as menu for an application inside a panel. The tree dataprovider is an XMLListCollection generated from a db call. I've set the height of the tree to take up all the available vertical space in the panel, so that there's no scrollbars when the user expands a node. When it renders, there's a black area below the top level nodes. I'm thinking these are the default itemRenderers which have no content until tree nodes are expanded. But why are they visible at all? I didn't see this behavior in Flex 2, just the GMCs. Jeff Battershall Application Architect Dow Jones Indexes [EMAIL PROTECTED] (609) 520-5637 (p) (484) 477-9900 (c)
[flexcoders] Problems trying to deploy Flex app on CF server
Hi, I'm trying to deploy my first Flex application on a coldfusion server. The login page of the application runs fine until I submit the form, then I get a: Property message not found on mx.messaging.messages.ErrorMessage and there is no default value. What could be the cause of this error?
Re: [flexcoders] Re: Access TextField within ComboBox
First you have to get to the textinput. You have a few options: 1. The cleanest way is to extend the combobox and access the protected textInput variable. 2. You could cycle through all of the children and check if (child is TextInput). Once you have the textinput, you can call mx_internal::getTextField() on textInput to get the textfield. Setting the selected property to 0,0 may leave the textbox with a caret at 0 index. If you don't want this, you want want to consider setting textfield.selectable = false instead (although I'm not 100% sure that will work either). Alternatively, you might be able to skip all this if you can simply set focus to another object (exactly how to do this depends a lot on your program). Also, you could toggle editable along with enabled which may also achieve the desired effect depending on exactly what you are looking for. - Dan On 12/5/06, Bjorn Schultheiss [EMAIL PROTECTED] wrote: Thanks John, I currently am using a 'prompt' on my combobox as well. I'm making my changes on a handler listening to the close event. Here's perhaps a more detailed explanation of my problem from another previous email. Hopefully this question has a simple answer, though i haven't found one yet. When switching a combobox from editable == true to false, if the text was previously selected while editable == true, the selection is maintained when editable = false. Basically i want to remove the selection. Something like; combobox_instance.editable = false; combobox_instance.'?currentTextField?'.setSelection(0,0); btw, this is not within a subclass of combobox. Regards, Bjorn On 06/12/2006, at 1:55 PM, jlentz2112 wrote: Try setting the combobox.selectedIndex to -1 to make it use the prompt value. I set prompt= , then when I set combobox.selectedIndex to -1, it clears the field. John --- In [EMAIL PROTECTED] flexcoders%40yahoogroups.comups.com, bjorn.schultheiss [EMAIL PROTECTED] wrote: Hey, I need to remove the selection on the TextField within a ComboxBox. This is happening when i'm switching combobox.editable == true to = false. How can i access the textfield? Bjorn
[flexcoders] datagrid itemrenderer
Hi all, I am using itemrenderer on headerclick of a datagrid trying to chane colours based on values. There seems to be a problem in the cells that i am not colouring.They are colorless and it is not the same color as the datagrid as such.. The datragrid has alternating colors for rows.How can i preserve the properties of the datagrid column Hope i am clear thanks
[flexcoders] TileList itemRenderer not changing when dataProvider change (cairngorm)
Hi people, i hope u can help me on this one... i have a ModelLocator that holds an object with ArrayCollection. i also have a TileList that gets the ArrayCollection of that object through DataBinding. Now, when i change the Object in the ModelLocator none of the custom itemRenderer in the TileList do not change. they still show the old data. any idea? some code: ---StoreVO.as [Bindable] public class StoreVO implements IValueObject{ [ArrayElementType(Product)] public var products:ArrayCollection = new ArrayCollection(); } --ModelLocator.as--- [Bindable] public class ModelLocator implements ModelLocator{ public var store:StoreVO; } --Main.mxml- mx:TileList dataProvider={ModelLocator.getInstance().store.products} itemRenderer=ProductView / -ProductView.mxml ... mx:Label text={data.name} / //i get warning - Data binding will not be able to detect assignments to data
[flexcoders] double namespace when adding custom soap header?
We've faced weird issue today, working with Flex : We have a webservice call defined in .mxml - /mx:WebService id=recrutidooCVService wsdl=http://localhost:8080/recrutidoo/services/CVService?wsdl; useProxy=false showBusyCursor=true mx:operation name=getCVById result=handle_getCVByID(event) mx:request id1/id /mx:request /mx:operation /mx:WebService/ We want to add custom headers to the soap message, so we use, let's say ; /recrutidooCVService.addSimpleHeader(AuthenticationToken, http://services.recrutidoo.microplan.pl;, token,1100_a_generated_token_0011);/ and then we launch the operation call, but here's what we are really sending (or at least, what our endpoint receives) : /SOAP-ENV:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; SOAP-ENV:Header ns1:AuthenticationToken xmlns:ns1=http://services.recrutidoo.microplan.pl; ns1:token//1100_a_generated_token_0011///ns1:token /ns1:AuthenticationToken ns0:AuthenticationToken xmlns:ns0=http://services.recrutidoo.microplan.pl; ns0:token//1100_a_generated_token_0011///ns0:token /ns0:AuthenticationToken /SOAP-ENV:Header SOAP-ENV:Body getCVById xmlns=http://services.recrutidoo.microplan.pl; ns0:id xmlns:ns0=http://services.recrutidoo.microplan.pl;1/ns0:id /getCVById /SOAP-ENV:Body /SOAP-ENV:Envelope/ Notice that we have the AuthenticationToken field passed twice in the header, once in ns1 namespace, second ns0 namespace. I believe it shouldn't be that way. Bug in Flex, or we missed something? -- | Sebastian Zarzycki | [EMAIL PROTECTED]
Re: [flexcoders] Re: BindSetter?
Thank You Lachlan!!! I can't believe this isn't documented somewhere. Seems like a pretty basic thing. Anyway, glad to know I'm not going crazy.. On 12/5/06, Lachlan Cotter [EMAIL PROTECTED] wrote: I think you're right Steve. I have asked myself the same question in the past and ended up using bindProperty… When you say *function set ():void*or function *get ():Something *you're really telling the method to masquerade as a property, so it makes sense that you can treat it as such. I have used * BindingUtils.bindProperty* to bind a setter method and it seems to work. Cheers, Lach On 04/12/2006, at 4:31 PM, Steve Hindle wrote: Sorry for reply to myself - but this is driving me _nuts_! I can't find an example of bindSetter with a 'real' accessor function with either yahoo or google. And the example on the 'bindUtils' page at adobe.com (stuck in the comments at the bottom) - doesn't bind to a 'function set blah'... (isn't that the _required_ to consider a funciton/method a 'setter' ??) It just binds to a 'normal' function. Anyway, I'm starting to think that 'bindSetter' is really a poorly named 'bindFunction' and that _all_ properties - var OR accessor based should be using bindProperty. Can someone confirm/refute this and save my sanity please! Thanks
[flexcoders] Re: How to make ViewStack Item Invisible
I did JUST what you suggested, but it is NOT showing up on the menu. Do I need some sort of refresh or ??? Thanks Bruce --- In flexcoders@yahoogroups.com, camlinaeizerous [EMAIL PROTECTED] wrote: It is already a separate component so take advantage of that and don't even add it to the view stack unless the user has access. This will also prevent the button form showing unless they have access. private function CallMeAfterUserValidation():void { if(UserCredentials.AllowedToAccesCustomers) { var temp:CustSearchForm = new CustSearchForm; myViewStack.addChild(temp); } }
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
Hank, Thanks for your reply. I am not sure I am explaining this correctly but let me try adding these details and see if this helps. My backend is ColdFusion and I have created Flex remote objects to several CFCs that each correspond to a separate business object (not necessarily one table). For example, I have an employeeGateway.cfc who's methods all pertain to employees (e.g. readEmployeeById(), readEmployeeByUsername(), addEmployeePermission()). From what I understand I have to set up a remote object connection to each CFC that I want to talk to. Although I could create a single CFC to group together lookup table queries I prefer to keep them in their distinct CFCs to allow for future methods related to those objects. Does this clear things up at all or am I still way off? Thanks again for your help! Steve On 12/5/06, hank williams [EMAIL PROTECTED] wrote: Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] cyberdust%40gmail.com wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do? The Gang Of Four chapter on the Command pattern describes a MacroCommand that executes a number of (Simple)Commands. As described it seems to simply fire them off, one after another. Wouldn't be hard to roll your own, extending ICommand, with an array property, and passing in Command objects. I could even see creating an MacroEvent class that kept track of whether its Commands had finished and that then did something when all were finished. Other Cairngorm programmers, wiser than I, will probably ask you wise questions about why you wish to pull data from six different data sources... :-) Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - stevehousefl wrote: I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
If I understand correctly (newbie speaking) you'd have: - A service specified on ServiceLocator for each of your CFCs - A BusinessDelegate for each method that you'll be calling Steve House wrote: Hank, Thanks for your reply. I am not sure I am explaining this correctly but let me try adding these details and see if this helps. My backend is ColdFusion and I have created Flex remote objects to several CFCs that each correspond to a separate business object (not necessarily one table). For example, I have an employeeGateway.cfc who's methods all pertain to employees (e.g. readEmployeeById(), readEmployeeByUsername(), addEmployeePermission()). From what I understand I have to set up a remote object connection to each CFC that I want to talk to. Although I could create a single CFC to group together lookup table queries I prefer to keep them in their distinct CFCs to allow for future methods related to those objects. Does this clear things up at all or am I still way off? Thanks again for your help! Steve On 12/5/06, *hank williams* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] mailto:cyberdust%40gmail.com wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us http://www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do? The Gang Of Four chapter on the Command pattern describes a MacroCommand that executes a number of (Simple)Commands. As described it seems to simply fire them off, one after another. Wouldn't be hard to roll your own, extending ICommand, with an array property, and passing in Command objects. I could even see creating an MacroEvent class that kept track of whether its Commands had finished and that then did something when all were
Re: [flexcoders] Problems trying to deploy Flex app on CF server
Can you provide more details? On 12/6/06, stephen50232 [EMAIL PROTECTED] wrote: Hi, I'm trying to deploy my first Flex application on a coldfusion server. The login page of the application runs fine until I submit the form, then I get a: Property message not found on mx.messaging.messages.ErrorMessage and there is no default value. What could be the cause of this error?
RE: [flexcoders] TileList itemRenderer not changing when dataProvider change (cairngorm)
You need to override the 'data' member in your itemRenderer. Here are a couple of really good blog posts that cover this: http://www.returnundefined.com/2006/10/item-renderers-in-datagrids-a-pri mer-for-predictable-behavior http://www.returnundefined.com/2006/11/creating-truly-reusable-renderers Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of vigen2000 Sent: Wednesday, December 06, 2006 6:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] TileList itemRenderer not changing when dataProvider change (cairngorm) Hi people, i hope u can help me on this one... i have a ModelLocator that holds an object with ArrayCollection. i also have a TileList that gets the ArrayCollection of that object through DataBinding. Now, when i change the Object in the ModelLocator none of the custom itemRenderer in the TileList do not change. they still show the old data. any idea? some code: ---StoreVO.as [Bindable] public class StoreVO implements IValueObject{ [ArrayElementType(Product)] public var products:ArrayCollection = new ArrayCollection(); } --ModelLocator.as--- [Bindable] public class ModelLocator implements ModelLocator{ public var store:StoreVO; } --Main.mxml- mx:TileList dataProvider={ModelLocator.getInstance().store.products} itemRenderer=ProductView / -ProductView.mxml ... mx:Label text={data.name} / //i get warning - Data binding will not be able to detect assignments to data -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Problem with web services
Hi, I am new to web services. According to the help file, I have constructed my page and I have included the wsdl link in the FDS proxy-config.xml. But I am getting error in the output. I copied the example from the below link. http://livedocs.macromedia.com/flex/2/langref/mx/rpc/soap/mxml/WebService.html [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://ws.invesbot.com/stockquotes.asmx?WSDL) at mx.rpc.soap::WSDLParser/::dispatchFault() at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at mx.messaging::ChannelSet/::faultPendingSends() at mx.messaging::ChannelSet/channelFaultHandler() Am I doing right or any suggestion plz - Access over 1 million songs - Yahoo! Music Unlimited.
Re: [flexcoders] HTTPService POST with request parameters
Jeff Thanks for the reminder about the additional ATG methods to the query parameters (getURLParameter()). However, that didn't help in this case. Turns out I had to append my query parameters to the URL of the HTTPService in ActionScript (i.e. getSponsor.url += ?o=sponsora=put) to get Flex to send them. Todd On 12/5/06, Jeff Vroom [EMAIL PROTECTED] wrote: Possibly the issue is due to the fact that you have both query string parameters and POST data parameters in the same request. I think that ATG used to have a bug where the query parameters are not returned by the getParameter method if the request has method=POST. They expose another method on the DynamoHttpServletRequest called getQueryParameter which will always return the query parameters. I vaguely recall that bug got fixed at some point but it has been a long time since I worked for ATG. One nice thing about ATG is that if you do a toString on the request object, it dumps out all of the state of the request. That might be a way to ensure that the query parameters are at least making it to the server in the URL. Jeff -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Todd Breiholz *Sent:* Tuesday, December 05, 2006 2:57 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] HTTPService POST with request parameters Tracy Correct, the model data is getting there, but not the querystring parameters. I also noticed about the mx:objects in the post. It was an error and I was getting really screwy data on the server. I've since changed the bindings to point to the text property of the objects and the post body is being sent correctly (I also had to add contentType=application/xml to my HTTPService. After making those changes, I am still seeing the same behavior as before (with a valid post body, now). The server platform is ATG (Java servlet based). When I try to extract the 2 request parameters, I get null for both of them. Thanks! Todd On 12/5/06, *Tracy Spratt* [EMAIL PROTECTED] wrote: So the model data is getting into the server, but the url querystring parameters are not? Also, you are passing an mx:Object in the post body to the server. Is that working? What does it look like on the server? What is the server platform? Tracy -- *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] *On Behalf Of *Todd Breiholz *Sent:* Tuesday, December 05, 2006 3:43 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] HTTPService POST with request parameters I am trying to post an XML payload to an HTTPService that has additional request parameters (e.g. http://www.mysite.com/get?o=sponsora=save). I created my HTTPService as such: mx:HTTPService id=getSponsor method=POST resultFormat=e4x result=getResultOK(event) fault=getResultFault(event) url=http://www.mysite.com/get mx:request osponsor/o aput/a /mx:request /mx:HTTPService And call it like this: private function addSponsor():void { getSponsor.send(sponsorModel); } With sponsorModel: mx:Model id=sponsorModel sponsor id{txtId}/id name{tiName}/name imageUrl{tiImageUrl}/imageUrl linkUrl{tiLinkUrl}/linkUrl /sponsor /mx:Model It looks like the request parameters are not being sent (I am not seeing them on the server). Is this supported in Flex 2? Thanks Todd
Re: [flexcoders] Problems trying to deploy Flex app on CF server
Stephen, Are you configured such that you can be in Flex Builder 2, then hit F11 (same as Main Menu -- Run -- Debug)? If you can run it this way the debug player communicates back to Flex Builder 2 and opens and points to the code where the error is being thrown. Seeing where the error is often helps developers in resolving the problem. If you can run it this way and are still unsure what the error is, please post the block of code where the error is so that we can see it in context. Also, had you looked up in the Language Reference the class indicated: mx.messaging.messages.ErrorMessage I have bookmarked the following top level URL for the Flex 2 Language Reference: http://livedocs.macromedia.com/flex/2/langref/ Looking up mx.messaging.messages.ErrorMessage, I see no Property message on the class ErrorMessage. The doc page for the class ErrorMessage is here: http://livedocs.macromedia.com/flex/2/langref/mx/messaging/messages/ErrorMessage.html Returning to your original question: What could be the cause of this error? It looks like there may be a statement in your code that is referencing on an object a non-existent property message. Again if you can post the actual code it may be more clear. Again, please post back more detail. hth, g On 12/6/06, stephen50232 [EMAIL PROTECTED] wrote: Hi, I'm trying to deploy my first Flex application on a coldfusion server. The login page of the application runs fine until I submit the form, then I get a: Property message not found on mx.messaging.messages.ErrorMessage and there is no default value. What could be the cause of this error?
Re: [flexcoders] Enabling Digital Signatures
Not knowing who will be using this or how, one possible solution is if it's being used as like a POS interface, where you could have pen input, would be to create a signature area component that used the drawing API to allow them to, using the pen device, sign their name on the screen and save it as an image file to the server. On 12/6/06, Pramod [EMAIL PROTECTED] wrote: Hey Guys, I am not too sure if this possible at all in the first place. However, I am confident that there might be some work-a-arounds for the same. I have to create a simple Sales Order. The form has been created and connected using a WSDL. The new challenge is that I have a field which says Checked and Signed by. This in the past was using an Adobe form and as you guys know that there is a signature field and was quite a easy solution. We are planning to have flex app for this and the challenge is now at getting this signature input. Any thoughts over this, recommendations will be of great help to us. Thanks a lot and best regards, Pramod
Re: [flexcoders] is there a sample to update/delete records in a database server through webservice?
Steven, As Tracy has posted, Flex w/ .NET w/ SQL Server works. You asked for a sample app. I do not know of one where the back end logic is a web service in .NET, but I will check around. I will post back if I find one. On the other hand, if you can point us to a sample .NET webservice that includes update/delete, maybe we can throw together in Flex the MXML and AS to reference it. hth, g On 12/5/06, Steven Xu [EMAIL PROTECTED] wrote: Hi Greg, Thanks for the quick reply. I think webservice should be cross-platform. My back end at this time is .NET SQL 2005 server. Any sample for update database in MS SQL 2005 server? Thank you again, Steve
Re: [flexcoders] UITextField - width anti-alias type - FEATURE REQUEST: more examples in documentation
On Wednesday 06 December 2006 05:37, {reduxdj} wrote: appreciated greatly. I made my own graphical bar chart and want the number planted evenly in the middle of my bar and I can't do that without the width of my my UITextField. Or http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-examples-on-making-custom-flex-charts-simpler/ -- Tom Chiverton Helping to confidentially e-enable slick metrics This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] how to stop tab from changing
I did this (ironic I had the same problem at the same time), but now I have the undesired effect of the tab switching, then immediately switching back. Suggestions? Shan _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Tuesday, December 05, 2006 11:39 AM To: flexcoders@yahoogroups.com Subject: [Junk E-Mail - LOW] RE: [flexcoders] how to stop tab from changing Hmm, that looks ok. Maybe a timing issue with the rendering? Try setting the selectedIndex using callLater. Tracy _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Yiðit Boyar Sent: Tuesday, December 05, 2006 7:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] how to stop tab from changing i have an accordion, in which when the user clicks sth inside the first tab; the second tab is loaded. the problem is that; i have to prevent user from opening the second tab. i need to show an error and reselect the 1st tab. to make this; i have added an event listener for the change event of the accordion but; i can give the error, but can not reselect tab 0. my code is below, can anyone help me please? thanks.. --- private function tabChangeControl(e:Event):void{ if(accordi.selectedIndex == 1 bilgiler.enabled==false){ e.preventDefault(); Alert.show('Önce görev seçmelisiniz','Hata'); //error message accordi.selectedIndex=0; //THIS DOES NOT WORK!!! } } _ Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1 NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx Answers.
[flexcoders] To Remote Call or Not To Remote Call in Cairngorm
For fairly static data that is bound to many different views, I only want to go to the server when the data's not there. I have an ArrayCollection that I bind to several different visual components. Which visual components get built depends on what permissions the user has. I want to make sure that all the components are independent of each other and dispatch the event to get the data. It's a fairly large amount of data, however it's very static and I don't want to go to the server everytime one of these components is rendered. Also, it's in a fairly large application and I don't want to dispatch the event on application startup because the user may not have permissions for any of the screens. My first inclination on handling this is to look at the ModelLocator to see if the data is null or not and act accordingly and that works great. So I was wondering where and how other people are managing this kind of logic. Thanks, Brian. *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. ***
RE: [flexcoders] Combo box selectedlabel problem.
The valueCommit event fires when the control is changed programmatically. Docs sa also on user interaction, but I'd verify this first. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dmitry Kochetov Sent: Wednesday, December 06, 2006 6:24 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Combo box selectedlabel problem. Hello, Try to dispatch event from your combo manually, like myCombo.dispatchEvent( new Event( Event.CHANGE ) ); haravallabhan wrote: Hi all I want to set the initial value of a combo box to the first item when the application loads and load another component according to the item selected. The functionality works when I use a change action in the combo box.That is it works when I manually change the item of the combobox. But it is not working when the application is loading. That is the event is not listening when the application loads. Examples I have say 5 items select Code,1,2,3,4. So the default vaue will be select code.A alue for 1 will show an apple image in another a componentand so on. When I manually change to the value 2 the image changes and when I change to 1 the image is changed to apple. I want the application to start with the initial value of the combo box set to 1. So that the initial image will be apple.Though the combo box is set to 1 there is no image shown. Only when I do it manually it shows up. Can any one help on this regard. Thanks in Advance Hara -- Feсi quod potui, faciant meliora potentes
[flexcoders] Functions as objects
I've tried using the example from the docs where you assign the value to a property on the function and then use arguments.callee.prop to get the value, but Flex Builder gives me an error saying Access of possibly undefined property prop through a reference with static type Function. when assigning the value to the function. Example: function test() { trace(arguments.callee.prop); } test.prop = testing; // Error Global.as defines Function as dynamic yet FB produces an error. This is supposedly possible in AS3 as per: http://livedocs.macromedia.com/flex/2/docs/1835.html However, if you try the last example you'll get compiler errors. Is there a way to add properties to a function? Or is this not supported in AS3? -- Derek Vadneau
RE: [flexcoders] Error #1010: A term is undefined and has no properties -- RTE with Datagrid
What is the line of code that is producing the error? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmorpher03 Sent: Tuesday, December 05, 2006 7:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Error #1010: A term is undefined and has no properties -- RTE with Datagrid Hi, I have a DataGrid with a custom item renderer (containing a Checkbox and Label). As soon as the data is populated via an XML returned by the server, the following error comes up: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::sc rollVertically() at mx.controls::DataGrid/mx.controls:DataGrid::scrollVertically() at mx.controls.listClasses::ListBase/set verticalScrollPosition() at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::mo useWheelHandler() at mx.controls::DataGrid/mx.controls:DataGrid::mouseWheelHandler() I saw in a couple posts that this is a bug, if yes, is this fixed ? Regards, Asgar.
[flexcoders] Re: TileList itemRenderer not changing when dataProvider change (cairngorm)
I agree with Jeff that those links are pretty good :), but you may also need to make the class whose instances are filling your AC bindable as well. Its hard to tell without seeing your app. HTH, Ben http://www.returnundefined.com/ --- In flexcoders@yahoogroups.com, vigen2000 [EMAIL PROTECTED] wrote: Hi people, i hope u can help me on this one... i have a ModelLocator that holds an object with ArrayCollection. i also have a TileList that gets the ArrayCollection of that object through DataBinding. Now, when i change the Object in the ModelLocator none of the custom itemRenderer in the TileList do not change. they still show the old data. any idea? some code: ---StoreVO.as [Bindable] public class StoreVO implements IValueObject{ [ArrayElementType(Product)] public var products:ArrayCollection = new ArrayCollection(); } --ModelLocator.as--- [Bindable] public class ModelLocator implements ModelLocator{ public var store:StoreVO; } --Main.mxml- mx:TileList dataProvider={ModelLocator.getInstance().store.products} itemRenderer=ProductView / -ProductView.mxml ... mx:Label text={data.name} / //i get warning - Data binding will not be able to detect assignments to data
[flexcoders] Re: How to make ViewStack Item Invisible
It will not be part of the view stack at all unless you want the user to be able to access it. Essentially until you add it it doesn't exist. When you do add the view with addChild() a button will be created automatically and the view will become accessible you shouldn't have to refresh anything. If the user has access to the view when they log on add it and it should appear if not it won't be there at all. If thats not the functionality your looking for then a different approach is needed. Something similar to the following may be more appropriate for your needs. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:views=views.* mx:Script ![CDATA[ [Bindable] private var HasAccess:Boolean = false; ]] /mx:Script mx:ButtonBar id=myBar dataProvider={viewstack1}/ mx:ViewStack x=10 y=30 id=viewstack1 width=200 height=200 views:viewone/ views:viewtwo id=viewtwo show=HasAccess ? viewtwo.visible = true : viewtwo.visible = false/ /mx:ViewStack mx:Button label={this.HasAccess ? 'Access' : 'No Access'} x=10 y=238 click=HasAccess ? HasAccess = false : HasAccess = true;/ /mx:Application
[flexcoders] Base Classes, Bindable, and dispatchEvent
Hi All, I have a base class I use for models (ModelBase, original eh?) that contains a 'set' function. set(source:Model) - it simply copies fields from the source model to 'this'. Works great, except I'm not sure how to let everyone know the model changed. The base class currently uses dispatchEvent(new Event(ModelChanged)) to signal the change. Since I import flash.events.*, I'm guessing this throws a flash.events.Event. Derived classes don't throw any events. Application code has: [Bindable (event=ModelChanged)] private var _model:DerivedClass; and getter/setter for model. The setter also uses dispatchEvent(new Event(ModelChanged)). Problem is, the setter in the application code trips the event listener I added... but set() in the base class doesn't cause it to fire.. Anyone have any ideas what the problem might be?
RE: [flexcoders] AMFPHP / databinding nested arrays
The way you constructed your array might come out like this, but not sure, looks a little crazy myResultObject[0].day.mon.start.100.end.300 Nested Arrays return into Flex as objects. I havent tried nesting an array as complicated as this, I guess its doable but it might be better to reorganize your array structure . I think it will be easier to read than a big old nested array constructor than in php if you use the following example, and this is how I do it. ? $my_array = array(); $my_array[0]['days'] =$some array $my_array[0]['starts'] =$some_other_array Return $my_array; ? //in flex your result arrays work like this... Var someArray:Array = myResultObject[0].days Var someOtherArray:Array = myResultObject[0].starts Then you can get your values and organize your arrays which ever way you like. Hope this Helps Patrick From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of carkraus Sent: Tuesday, December 05, 2006 11:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] AMFPHP / databinding nested arrays Hi there, I guess this is a typical newbie question, maybe someone could kindly direct me to a tutorial or sample: I try to bind e.g. using a charts control to a nested array I receive from an AMFPHP service. On the php side I have as an example: $outputArr[] = array('day' = 'Mon', array('start' = '100', 'end' = '300')); $outputArr[] = array('day' = 'Tue', array('start' = '250', 'end' = '600')); $outputArr[] = array('day' = 'Wed', array('start' = '500', 'end' = '600')); return $outputArr; ..which will deliver the data correctly as I can see from the flex debugger. In flex I have eg.: mx:series mx:ColumnSeries xField=day yField=??? / /mx:series Now, how do I access e.g. the value 'start' to use it for databinding? Well, 'day.start' does not do the trick : ) I had similar probs using XML for binding, where I wouldnt be able to access sub-children? Do I have to somehow wrap the server response into an actionscript object which I'd have to manually add properties to? Any hint greatly appreciated!! carsten
Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model
You may also want to read up on the executeBindings() and executeChildBindings() functions ... You may be able to call that on initialization and get your binding to fire. Lachlan Cotter wrote: The valueCommit event fires when the control is changed programmatically. Docs sa also on user interaction, but I'd verify this first. Tracy *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Dmitry Kochetov *Sent:* Wednesday, December 06, 2006 6:24 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Combo box selectedlabel problem. Hello, Try to dispatch event from your combo manually, like myCombo.dispatchEvent( new Event( Event.CHANGE ) ); haravallabhan wrote: Hi all I want to set the initial value of a combo box to the first item when the application loads and load another component according to the item selected. The functionality works when I use a change action in the combo box.That is it works when I manually change the item of the combobox. But it is not working when the application is loading. That is the event is not listening when the application loads. Examples I have say 5 items select Code,1,2,3,4. So the default vaue will be select code.A alue for 1 will show an apple image in another a componentand so on. When I manually change to the value 2 the image changes and when I change to 1 the image is changed to apple. I want the application to start with the initial value of the combo box set to 1. So that the initial image will be apple.Though the combo box is set to 1 there is no image shown. Only when I do it manually it shows up. Can any one help on this regard. Thanks in Advance Hara -- Feсi quod potui, faciant meliora potentes -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Updating to Flash Player 9.0.28.0
I noticed that adobe.com now states that version 9.0.28.0 of the Windows Flash player is released. Is it possible to update to this new version without uninstalling the my current 9.0.16.0 version? When I attempt to update using Adobe Flash Player Download Center I get message saying the update was completed yet the version stays at .16. Also, where can I get the debug version of the 9.0.28.0 player? I want to take advantage of the new FullScreen features. thanks Mitch
[flexcoders] style property reference
Hello Can anyone tell me where I can find a reference that lists and defines all the possible style properties. I've found little bits and pieces scattered about. Which only seems to confuse the subject more. THX
[flexcoders] Re: Array to Alert
How would I iterate through the array if I don't know how many records are in the array? --- In flexcoders@yahoogroups.com, Valy Sivec [EMAIL PROTECTED] wrote: You can use the new line \n to build the Alert message. Alert.show( array[0] + \n + array[1] ), something like that. HTH, Valy - Original Message From: jmfillman [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, December 5, 2006 6:57:03 PM Subject: [flexcoders] Array to Alert I have a label field in an ArrayCollection that I need to display on an alert box. I need each label to be on it's own line in the alert box. Say I have 3 records in the Array, with label values of *Name, *Address, and *Phone. I need to get those labels from the ArrayCollection and have them show on the alert like this: *Name *Address *Phone __ __ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
Hank, Thanks for your reply. I am not sure I am explaining this correctly but let me try adding these details and see if this helps. My backend is ColdFusion and I have created Flex remote objects to several CFCs that each correspond to a separate business object (not necessarily one table). For example, I have an employeeGateway.cfc who's methods all pertain to employees (e.g. readEmployeeById(), readEmployeeByUsername(), addEmployeePermission()). From what I understand I have to set up a remote object connection to each CFC that I want to talk to. Although I could create a single CFC to group together lookup table queries I prefer to keep them in their distinct CFCs to allow for future methods related to those objects. Does this clear things up at all or am I still way off? Thanks again for your help! Steve On 12/5/06, hank williams [EMAIL PROTECTED] wrote: Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] cyberdust%40gmail.com wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do? The Gang Of Four chapter on the Command pattern describes a MacroCommand that executes a number of (Simple)Commands. As described it seems to simply fire them off, one after another. Wouldn't be hard to roll your own, extending ICommand, with an array property, and passing in Command objects. I could even see creating an MacroEvent class that kept track of whether its Commands had finished and that then did something when all were finished. Other Cairngorm programmers, wiser than I, will probably ask you wise questions about why you wish to pull data from six different data sources... :-) Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - stevehousefl wrote: I have a command that I would like to have pull lookup data from 6 different BusinessDelegates. Should that one command call all 6 delegates or should it fire 6 new events that call 6 new commands? If the one command should call all 6 delegates in its execute function, how do you handle 6 different results
[flexcoders] Dynamic Min/Max for chart axis not updating automatically.
Once a minimum/maximum value is assigned to the DateTimeAxis, how can i get a realtime chart to update the min/max values depending on its dataProvider and keep it updating? Here is some code to illustrate: Note: dataProvider is an ArrayCollection of size 100. if size = 100, the date at index 0 is removed and the next date is added. private var _minimum:Date=null; [Bindable] public function get minimum():Date{ if(this.dataProvider == null){ _minimum = new Date(); _minimum.setHours(9,0,0,0); }else{ _minimum = this.dataProvider.getItemAt(0).date; } return _minimum; } private var _maximum:Date=null; [Bindable] public function get maximum():Date{ if(this.dataProvider == null){ _maximum = new Date(); _maximum.setHours(16,0,0,0); }else{ if(_zoomLevel == seconds){ _maximum.setHours(_minimum.hours, _minimum.minutes +3, _minimum.seconds,_minimum.milliseconds); //I want my maximum to change whenever my minimum changes. } } return _maximum; } MXML code: mx:horizontalAxis mx:DateTimeAxis id=hTimeAxis labelUnits=minutes dataUnits=minutes interval=20 displayLocalTime=true alignLabelsToUnits=true minimum={minimum} maximum={maximum} / /mx:horizontalAxis
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
Steve, I dont know much about cold fusion, but as a general architectural strategy I think you are mistaken in thinking that combining CFCs to group together lookups. Programming is all about creating simple functions, then creating more complex functions that use the simpler functions and then more complex functions that use those, etc. I dont know what the information you are trying to display is, but I would generally recommend (without knowing the actual specifics here) that you should, as I initially suggested, do this grouping on the server side. This is the kind of work that servers are suposed to do. There is no reason the simpler functions cant also be accessible to the client or to other objects on the server, but if you have a complicated function that builds on a variety of queries that is almost always done on the server side. Of course as I said, I dont know anything about cold fusion, so the mechanics of exactly how you do what I am talking about in CF is beyond me. But If you are doing a ton of massaging of data in the client, it is a sign that you server side code is not delivering high level enough information. Regards, Hank On 12/6/06, Steve House [EMAIL PROTECTED] wrote: Hank, Thanks for your reply. I am not sure I am explaining this correctly but let me try adding these details and see if this helps. My backend is ColdFusion and I have created Flex remote objects to several CFCs that each correspond to a separate business object (not necessarily one table). For example, I have an employeeGateway.cfc who's methods all pertain to employees (e.g. readEmployeeById(), readEmployeeByUsername(), addEmployeePermission()). From what I understand I have to set up a remote object connection to each CFC that I want to talk to. Although I could create a single CFC to group together lookup table queries I prefer to keep them in their distinct CFCs to allow for future methods related to those objects. Does this clear things up at all or am I still way off? Thanks again for your help! Steve On 12/5/06, hank williams [EMAIL PROTECTED] wrote: Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] cyberdust%40gmail.com wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other
Re: [flexcoders] Re: Array to Alert
On 12/6/06, jmfillman [EMAIL PROTECTED] wrote: How would I iterate through the array if I don't know how many records are in the array? maybe this; Alert.show(yourArray.join(\n));
[flexcoders] Re: Enabling Digital Signatures
Interesting solution Nick. Say this was not in a POS environment... what options do we have? --- In flexcoders@yahoogroups.com, Nick Collins [EMAIL PROTECTED] wrote: Not knowing who will be using this or how, one possible solution is if it's being used as like a POS interface, where you could have pen input, would be to create a signature area component that used the drawing API to allow them to, using the pen device, sign their name on the screen and save it as an image file to the server. On 12/6/06, Pramod [EMAIL PROTECTED] wrote: Hey Guys, I am not too sure if this possible at all in the first place. However, I am confident that there might be some work-a-arounds for the same. I have to create a simple Sales Order. The form has been created and connected using a WSDL. The new challenge is that I have a field which says Checked and Signed by. This in the past was using an Adobe form and as you guys know that there is a signature field and was quite a easy solution. We are planning to have flex app for this and the challenge is now at getting this signature input. Any thoughts over this, recommendations will be of great help to us. Thanks a lot and best regards, Pramod
[flexcoders] Re: Updating to Flash Player 9.0.28.0
Well, I found the standalone installers at http://www.adobe.com/support/flashplayer/downloads.html but I still needed to uninstall the current version before I could install the new one. How will the .28 version make it out into the wild if the update requires uninstalling of the current Flash 9 version? --- In flexcoders@yahoogroups.com, mitchgrasso [EMAIL PROTECTED] wrote: I noticed that adobe.com now states that version 9.0.28.0 of the Windows Flash player is released. Is it possible to update to this new version without uninstalling the my current 9.0.16.0 version? When I attempt to update using Adobe Flash Player Download Center I get message saying the update was completed yet the version stays at .16. Also, where can I get the debug version of the 9.0.28.0 player? I want to take advantage of the new FullScreen features. thanks Mitch
RE: [flexcoders] Re: Array to Alert
var sTemp:String = ; for (var i:int=0;imyArrayCollection.length;i++) { sTemp += myArrayCollection [i] + \n; } Alert.show(sTemp); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Wednesday, December 06, 2006 11:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Array to Alert How would I iterate through the array if I don't know how many records are in the array? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Valy Sivec [EMAIL PROTECTED] wrote: You can use the new line \n to build the Alert message. Alert.show( array[0] + \n + array[1] ), something like that. HTH, Valy - Original Message From: jmfillman [EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Sent: Tuesday, December 5, 2006 6:57:03 PM Subject: [flexcoders] Array to Alert I have a label field in an ArrayCollection that I need to display on an alert box. I need each label to be on it's own line in the alert box. Say I have 3 records in the Array, with label values of *Name, *Address, and *Phone. I need to get those labels from the ArrayCollection and have them show on the alert like this: *Name *Address *Phone __ __ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.
[flexcoders] Re: Updating to Flash Player 9.0.28.0
Ok, I keep answering my own posts but... I checked out www.brightcove.com which added a fullscreen button to their FLV playback. If you click this button on a PC with Flash 9.0.16.0 installed, it prompts you to update to the latest Flash player and successfully updates it to 9.0.28.0. How is this update prompt accomplished dynamically? My app just throws an error when attempting to set stage.displayState = StageDisplayState.FULL_SCREEN; on a PC with 9.0.16.0. I guess I could set the required version in the wrapper Globals but I like the idea of only forcing the update if they attempt to use the FullScreen feature... thanks mitch --- In flexcoders@yahoogroups.com, mitchgrasso [EMAIL PROTECTED] wrote: Well, I found the standalone installers at http://www.adobe.com/support/flashplayer/downloads.html but I still needed to uninstall the current version before I could install the new one. How will the .28 version make it out into the wild if the update requires uninstalling of the current Flash 9 version? --- In flexcoders@yahoogroups.com, mitchgrasso mgrasso@ wrote: I noticed that adobe.com now states that version 9.0.28.0 of the Windows Flash player is released. Is it possible to update to this new version without uninstalling the my current 9.0.16.0 version? When I attempt to update using Adobe Flash Player Download Center I get message saying the update was completed yet the version stays at .16. Also, where can I get the debug version of the 9.0.28.0 player? I want to take advantage of the new FullScreen features. thanks Mitch
[flexcoders] How i can acces to other component of SWF loaded file?
X-IPI Cienfuegos-MailScanner: Found to be clean X-IPI Cienfuegos-MailScanner-From: [EMAIL PROTECTED] Hello. I'm a novice in Flex world. My first application that I working is an intranet. I'm using RemoteObject tech with php and SabreAMF, it work fine. My implementation are a first page with login window, then if you can login, other SWF file are loaded from server and inside of the file others SWFs, the modules of application load dinamically. I have some doubts about how load SWFs dinamycally, how (best way) create SWFLoader and load other modules, and how interact with components inside of the other SWF file. Best regards. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. MailScanner agradece a IPI Cienfuegos por su apoyo. Nodo de Comunicaciones del IPI Cienfuegos
[flexcoders] Flex II Stand-alone Builder and SVN?
Can anyone tell me if the Flex II stand-alone builder plays nice with SVN? I did take it for a quick test-drive, and it seems that the Flex II standalond IDE does not like some of the svn related folders when you just try to point a new project to a directory that is under SVN. Any advice or assistance is much appreciated. Thanks, -Jeff
RE: [flexcoders] Dynamic Min/Max for chart axis not updating automatically.
I'm a little confused by your question. If you're explicitly assigning a min/max value, you're telling the chart you don't want it to generate automatic min/max values. If you're asking how to remove your previously assigned min/max and ask it to restart automatically generating min/max values, just set the min/max of the axis to undefined. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polonycjunk Sent: Wednesday, December 06, 2006 9:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dynamic Min/Max for chart axis not updating automatically. Once a minimum/maximum value is assigned to the DateTimeAxis, how can i get a realtime chart to update the min/max values depending on its dataProvider and keep it updating? Here is some code to illustrate: Note: dataProvider is an ArrayCollection of size 100. if size = 100, the date at index 0 is removed and the next date is added. private var _minimum:Date=null; [Bindable] public function get minimum():Date{ if(this.dataProvider == null){ _minimum = new Date(); _minimum.setHours(9,0,0,0); }else{ _minimum = this.dataProvider.getItemAt(0).date; } return _minimum; } private var _maximum:Date=null; [Bindable] public function get maximum():Date{ if(this.dataProvider == null){ _maximum = new Date(); _maximum.setHours(16,0,0,0); }else{ if(_zoomLevel == seconds){ _maximum.setHours(_minimum.hours, _minimum.minutes +3, _minimum.seconds,_minimum.milliseconds); //I want my maximum to change whenever my minimum changes. } } return _maximum; } MXML code: mx:horizontalAxis mx:DateTimeAxis id=hTimeAxis labelUnits=minutes dataUnits=minutes interval=20 displayLocalTime=true alignLabelsToUnits=true minimum={minimum} maximum={maximum} / /mx:horizontalAxis
[flexcoders] Re: Flex 2: FDS Freezes Flash player before responders get called
Hi Jeff, Thank you for your response. The size of the message debug output is 221KB. There are ~170 objects in a Heirarchical list with a max depth of ~5 child objects. I also need to clearify my initial posting; the flash player is freezing AFTER the commit() and BEFORE my responder gets called by the AsyncToken. The pause I'm seeing doesn't seem indicative of serialization overhead. I do see an initial pause when I call commit. I put a breakpoint in my java DAO so I know when that gets called. It responds in a reasonable time (1-2 seconds). I can avoid the Freeze, if I call release() on the DataService. However this gives me the following error and of course the responder doesn't get called: Error: Unable to find the committed message batch with id 34A9FA18-58B7-7CDC-E2F5-587149047AD0 in the commit result handler. at mx.data::CommitResponder/result()[C:\dev\enterprise_gmc\frameworks\mx\data\CommitResponder.as:223] at mx.rpc::AsyncRequest/acknowledge()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AsyncRequest.as:82] at NetConnectionChannel.as$37::NetConnectionMessageResponder/NetConnectionChannel.as$37:NetConnectionMessageResponder::resultHandler()[C:\dev\enterprise_gmc\frameworks\mx\messaging\channels\NetConnectionChannel.as:407] at mx.messaging::MessageResponder/result()[C:\dev\enterprise_gmc\frameworks\mx\messaging\MessageResponder.as:202] I essentially don't want fds to worry about updating the managed object on the front end, but I do want it to trigger the responder when the backend createItem is done and most importantly doing it without pegging the client's CPU. thanks, JB --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: I'm not sure how large very large is but it is certainly possible to give the client too much work to cause this type of problem. The createItem call will end up serializing the object which makes a complete copy of it. If you have managed associations, there could be additional work as it has to create the child objects as well. One way to get an idea of what is going on is to enable the debug logging on the client side: mx:TraceTarget/, use the debug player, and look in flashlog.txt in your home directory for the output. That hopefully will make things even slower, but hopefully the trace log will show some evidence of what is taking so long. If that does not show anything, if you can get us a test case I'd be interested to take a look ([EMAIL PROTECTED]). Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of box110a Sent: Tuesday, December 05, 2006 1:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex 2: FDS Freezes Flash player before responders get called I am calling dataService.createItem() a very large Object graph. After I call commit, and my responder is called. the client flash player freezes (browser stops responding, cpu utiliziaiton at 100%) for about 8-10 seconds. I am releasing the itemReference from the createItem() call in the responder. Does anybody have any idea how to debug this problem or figure out what is causing it. thanks, JB
[flexcoders] Date Fields and Data Binding.
I am attempting to do something I thought was pretty simple. Using the cairngorm model, basically I have a data instance object attached to the model, and it has a Data Object attached to it. So think of it this way. I am running an application that tracks a list of canidates. So there is a CanidateVO actionscript object, and it has a member variable attached to it called interview date, and its of type Date. I am running a java backend retrieving these using spring and hybernate, and the conversion works fine. The problem I am having is with data binding in a grid and details panel. The grid has an array collection which is attached to the model, and that array contains a list of all the canidates, some that have dates and some that dont. All have member variables, but since all instances have not interviewed they may not have a value in the date field, thus those member vars are null. So the problem is that when I have a particular grid object selected, I see the details of that canidate in the details panel, which is just a panel that contains text fields and a dateField component. Well all the other bindings are working fine, but not the dateField binding. I have set the dateFields text bound to the attribute of the object, and that does not work, and I have set the dataProvider and that does not work, and I have even set a data attribute on the dateField and that does not work. Whats happening is, when I am looking at a particular canidate without an interview date, and I select the dateField, then put a date in it and DONT save the record but go to a different instance on the grid, all the fields are updated except the dateField. The dateField text remains there regardless of the fact that the selectedItem has changed, and the new selectedItem has no date in it. Conversly if I select a canidate who does have a date, the date is displayed, but once I go to one without a date, the date stays in the field. Why is data binding not working for dates? Please help. Jeremy.
RE: [flexcoders] How i can acces to other component of SWF loaded file?
This won't answer all of your questions, but the doc has an example of using the SWFLoader control to load a SWF and then interact with it: http://livedocs.macromedia.com/flex/2/docs/0543.html SMG From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 8:14 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How i can acces to other component of SWF loaded file? X-IPI Cienfuegos-MailScanner: Found to be clean X-IPI Cienfuegos-MailScanner-From: [EMAIL PROTECTED] mailto:odiel%40ipicfg.rimed.cu Hello. I'm a novice in Flex world. My first application that I working is an intranet. I'm using RemoteObject tech with php and SabreAMF, it work fine. My implementation are a first page with login window, then if you can login, other SWF file are loaded from server and inside of the file others SWFs, the modules of application load dinamically. I have some doubts about how load SWFs dinamycally, how (best way) create SWFLoader and load other modules, and how interact with components inside of the other SWF file. Best regards. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. MailScanner agradece a IPI Cienfuegos por su apoyo. Nodo de Comunicaciones del IPI Cienfuegos
[flexcoders] Converting the output of ObjectUtil.copy() to custom type
Does anyone know how to do this? Neither casting nor the as operator are working. var foo:FooObject = new FooObject(); // this doesn't work var fooCopy:FooObject = FooObject(ObjectUtil.copy(foo)); // neither does this var fooCopy:FooObject = ObjectUtil.copy(foo) as FooObject; Thanks in advance for any pointers, Ben
[flexcoders] Re: AMFPHP / databinding nested arrays
Hi Patrick, thx a bunch already for answering!! Actually my example will already allow me to access the values like: trace( myResultObject[0].day );// prints 'Mon' trace( myResultObject[0].[0].start ); // prints '100' ... But I guess there´s no way to use e.g. that 'start' value directly via MXML binding, hm? I should rather be using a custom renderer for it or flatten the aray on the client pre-binding?! The latter(flatten array on client) just 'feels' a little uncomfortable, as well as it feels not too good to change the data structure in the backend 'only' for flex. thx again regards carsten --- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: The way you constructed your array might come out like this, but not sure, looks a little crazy myResultObject[0].day.mon.start.100.end.300 Nested Arrays return into Flex as objects. I haven't tried nesting an array as complicated as this, I guess it's doable but it might be better to reorganize your array structure . I think it will be easier to read than a big old nested array constructor than in php if you use the following example, and this is how I do it. ? $my_array = array(); $my_array[0]['days'] =$some array $my_array[0]['starts'] =$some_other_array Return $my_array; ? //in flex your result arrays work like this... Var someArray:Array = myResultObject[0].days Var someOtherArray:Array = myResultObject[0].starts Then you can get your values and organize your arrays which ever way you like. Hope this Helps Patrick From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of carkraus Sent: Tuesday, December 05, 2006 11:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] AMFPHP / databinding nested arrays Hi there, I guess this is a typical newbie question, maybe someone could kindly direct me to a tutorial or sample: I try to bind e.g. using a charts control to a nested array I receive from an AMFPHP service. On the php side I have as an example: $outputArr[] = array('day' = 'Mon', array('start' = '100', 'end' = '300')); $outputArr[] = array('day' = 'Tue', array('start' = '250', 'end' = '600')); $outputArr[] = array('day' = 'Wed', array('start' = '500', 'end' = '600')); return $outputArr; ..which will deliver the data correctly as I can see from the flex debugger. In flex I have eg.: mx:series mx:ColumnSeries xField=day yField=??? / /mx:series Now, how do I access e.g. the value 'start' to use it for databinding? Well, 'day.start' does not do the trick : ) I had similar probs using XML for binding, where I wouldnt be able to access sub-children? Do I have to somehow wrap the server response into an actionscript object which I'd have to manually add properties to? Any hint greatly appreciated!! carsten
Re: [flexcoders] Date Fields and Data Binding.
Just a guess here - I just use vanilla Flex Sounds like the field is not being assigned. Since the field starts out as blank in your model, and your selecting another model with a blank field - perhaps Flex is 'short-circuiting' the assignment. I've noticed that for an assignment like foo = bar, Flex always seems to call the getter for foo, _before_ calling the setter. I can only surmise this it to allow it to short circuit the assignment if foo = bar already. So in your case, blank == blank, and no assignment is done, hence no event fires ? On 12/6/06, jsscardinal [EMAIL PROTECTED] wrote: I am attempting to do something I thought was pretty simple. Using the cairngorm model, basically I have a data instance object attached to the model, and it has a Data Object attached to it. So think of it this way. I am running an application that tracks a list of canidates. So there is a CanidateVO actionscript object, and it has a member variable attached to it called interview date, and its of type Date. I am running a java backend retrieving these using spring and hybernate, and the conversion works fine. The problem I am having is with data binding in a grid and details panel. The grid has an array collection which is attached to the model, and that array contains a list of all the canidates, some that have dates and some that dont. All have member variables, but since all instances have not interviewed they may not have a value in the date field, thus those member vars are null. So the problem is that when I have a particular grid object selected, I see the details of that canidate in the details panel, which is just a panel that contains text fields and a dateField component. Well all the other bindings are working fine, but not the dateField binding. I have set the dateFields text bound to the attribute of the object, and that does not work, and I have set the dataProvider and that does not work, and I have even set a data attribute on the dateField and that does not work. Whats happening is, when I am looking at a particular canidate without an interview date, and I select the dateField, then put a date in it and DONT save the record but go to a different instance on the grid, all the fields are updated except the dateField. The dateField text remains there regardless of the fact that the selectedItem has changed, and the new selectedItem has no date in it. Conversly if I select a canidate who does have a date, the date is displayed, but once I go to one without a date, the date stays in the field. Why is data binding not working for dates? Please help. Jeremy.
RE: [flexcoders] Fade from one color to another
Dorkie, What about this example? mx:Sequence id=fadeToBlack mx:AnimateProperty target={this} property=alpha fromValue=1 toValue=0 effectEnd=setStyle('backgroundColor','0') / mx:AnimateProperty target={this} property=alpha fromValue=0 toValue=1 / /mx:Sequence mx:Sequence id=fadeToWhite mx:AnimateProperty target={this} property=alpha fromValue=1 toValue=0 effectEnd=setStyle('backgroundColor','white') / mx:AnimateProperty target={this} property=alpha fromValue=0 toValue=1 / /mx:Sequence mx:Button label=Fade To White click=fadeToWhite.play(); / mx:Button label=Fade To Black click=fadeToBlack.play(); / From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Tuesday, December 05, 2006 11:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Fade from one color to another @dustin - that worked for simple colors that are close by but not for pure white to pure black #FF, #00 @deepa - i could not get that to work after one hour. i decided to try to dissolve from one state to another. one state has a white background. the other state has a black background. the code i wrote makes sense to me but the effects are triggering at the wrong time. shouldn't this work? if there is more the fromState and toState are misleading. ?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 styleName=plain mx:states mx:State name=blackState mx:SetProperty target={button1} name=label value=Fade to White/ mx:SetStyle name=backgroundColor value=0x00/ mx:SetEventHandler target={button1} name=click handler={currentState=''}/ /mx:State /mx:states !-- Fade to black -- !-- When user clicks a button the screen should fade to black-- !-- After application /state fades to black switch states -- !-- After switching states fade up from black -- mx:transitions mx:Transition fromState= toState=blackState mx:Parallel mx:Dissolve duration=4000 alphaTo=1 color=#00 target={this}/ /mx:Parallel /mx:Transition mx:Transition fromState=blackState toState= mx:Parallel mx:Dissolve duration=4000 alphaTo=1 color=#FF target={this}/ /mx:Parallel /mx:Transition /mx:transitions mx:Button x=120 y=139 horizontalCenter=0 verticalCenter=0 label=Fade to Black id=button1 click={currentState='blackState'}/ /mx:Application On 12/4/06, Deepa Subramaniam [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Ah - that is because AnimateProperty is just cycling through all the RGB values between your fromValue color and your endValue color. What you may want to do is add an event handler for the tweenUpdate event on the AnimateProperty effect instance and check to see what the value passed in the TweenEvent object is. That value is what the backgroundColor is at that moment in the lifetime of the effect. You can then add in your own logic that sets the backgroundColor depending on where the effect is in its lifetime (ie: simulate a progression from dark gray to light gray). I'm not 100% sure how that will work out but I'd be interested in finding out what doesn't work about it. Incidentally, you should check out Alex Uhlmann's Animation Package where I think he has an effect that does exactly what you want. That will probably be easier :-) http://www.alex-uhlmann.de/flash/animationpackage/ http://www.alex-uhlmann.de/flash/animationpackage/ -deepa From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of dorkie dork from dorktown Sent: Monday, December 04, 2006 2:31 PM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Fade from one color to another i see. that mostly works. except now it cycles through every color giving a flicker effect like i am on acid. try this to see: ?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 styleName=plain creationCompleteEffect={fadeColor} mx:AnimateProperty id=fadeColor isStyle=true property=backgroundColor fromValue=0xFF toValue=0x00 target={Application.application} duration=2000/ /mx:Application If i change the fromValue and the toValue to a two digit number like so it is a very smooth transition but it does not fade from white. It only fades from blue. Try this: mx:AnimateProperty
[flexcoders] Error #2032 Stream Error IOError
Hi. I m a new flex developer.new to flash and designing too.I have good knowledge of java technologies. Here in my flex application i m trying to use mx:HttpRequest object to communicate to server TestApplication.mxml mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:HTTPService id=feedRequest url=/processingServlet contentType=application/xml useProxy=false fault=callFailure(event) result=callSuccess(event) method=GET /mx:HTTPService in the call success and callFailure functions i m just trying to see whther my httprequest is working or not. mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.controls.Alert; private function callFailure(event:FaultEvent):void { Alert.show(String(event.message)); } private function callSuccess(event:ResultEvent):void { Alert.show(String(event.result)); } ]] /mx:Script mx:Button label=Click click=feedRequest.send() / /mx:Application I could compile this. I pasted the resulting swf file into my application root directory in tomcat 5.0 i.e i pasted in webapps/testapp/TestApplication.swf i pasted the servlet class file into webapps/testapp/WEB-INF/classes i also created a web.xml file in which i could correctly define my servlet url. I could call the swf file http://localhost:8080/testapp/TestApplication.swf but when i click the button my servlet do not recieve the HttpRequest I recieve error my callfailure gets called showing Error #2032 Stream error Http Request Error error caused by IOErrorEvent i m sure My servlet url works perfect with normal browser It does not work even requesting a plain jsp or xml which are in same folder as .swf i did like url=catalog.jsp url=catalog.xml Is it not the way to host a simple webapplication.. I did not use any wrappers Do i need to follow any other folder structure when deploying?? I also tried using crossdomain.xml Does it have anything to do with my windows or flash player version? Does any one have folder structure for deploying flex applications in tomcat? I could see my webserver does not receive request at all. In what way flash players httpservice is different from normal web browsers request? Where did i go wrong. Please help. I m completely stuck not able to move from here.. Appreciate any kind of help. Thank you Roopa.
[flexcoders] Extending/customizing Charts - Where to start?
Hi all, I've read with interest Ely's recent blog posts about extending charts. Is there a way to use this datadrawing canvas to drag a lineseries? I need to be able to zoom into and out of a line series, update the linechart to reflect the changes and also drag the series left or right with the mouse (kind of like google's finance charts). Where do I start? It is relatively difficult to figure out how to extend charts and I'm not finding many tutorials out there that describe how to do this. Thanks, Dana
[flexcoders] Re: FLV Duration
You could pass everything through FLVTool2 on the server to inject metadata...problem solved! This is something we do with flvs made from ffmpeg. IME recent builds of ffmpeg create the metadata correctly Ben
[flexcoders] itemrednerer in griditem?
hello i cant seem to find any examples of a itemrenderer wrapped in a griditem i have succesfully made the connection using datagrids ie mx:DataGridColumn dataField=INTSWAMMTGID headerText=ReportitemRenderer=renderer.ReportButtons/ but not sure how to set up the data to send to an itemrender within a griditem mx:GridItem dataField={wsDashBoard.checkMilestoneDoc.lastResult.getItemAt(0)}/ {wsDashBoard.checkMilestoneDoc.lastResult.getItemAt(1)} headerText=ReportitemRenderer=renderer.ReportButtons/ does not work as there is no datafield proprty in a griditem how would i go about doing this, i am trying to pass my itemrender 2 values. thanks for any examples
[flexcoders] Re: Dynamic Min/Max for chart axis not updating automatically.
Hi Ely, Sorry if I confused you. If I let flex handle the min/max value, I am not getting the time axis I'm looking. Say for example, the current time is 4:01:00. Consider a collection with size = 60. It consists of data for the last 60 seconds. If I let flex handle it, the h-axis will only show 4:00:00 to 4:01:00. But what I really want is for the h-axis to show the time from 4:00:00(min) to 4:03:00 (max) (T+3minutes). As more data arrives each second, I want the min and max to change to reflect the times that are in the collection. Once I assign a min/max to the chart, is there a way to update it according to new values in the dataProvider? The only way I was able to make it change was if I created a button which sets a new Min/Max. I would need to consistently click on the button to create the moving window of (T + 3). --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: I'm a little confused by your question. If you're explicitly assigning a min/max value, you're telling the chart you don't want it to generate automatic min/max values. If you're asking how to remove your previously assigned min/max and ask it to restart automatically generating min/max values, just set the min/max of the axis to undefined. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polonycjunk Sent: Wednesday, December 06, 2006 9:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dynamic Min/Max for chart axis not updating automatically. Once a minimum/maximum value is assigned to the DateTimeAxis, how can i get a realtime chart to update the min/max values depending on its dataProvider and keep it updating? Here is some code to illustrate: Note: dataProvider is an ArrayCollection of size 100. if size = 100, the date at index 0 is removed and the next date is added. private var _minimum:Date=null; [Bindable] public function get minimum():Date{ if(this.dataProvider == null){ _minimum = new Date(); _minimum.setHours(9,0,0,0); }else{ _minimum = this.dataProvider.getItemAt(0).date; } return _minimum; } private var _maximum:Date=null; [Bindable] public function get maximum():Date{ if(this.dataProvider == null){ _maximum = new Date(); _maximum.setHours(16,0,0,0); }else{ if(_zoomLevel == seconds){ _maximum.setHours(_minimum.hours, _minimum.minutes +3, _minimum.seconds,_minimum.milliseconds); //I want my maximum to change whenever my minimum changes. } } return _maximum; } MXML code: mx:horizontalAxis mx:DateTimeAxis id=hTimeAxis labelUnits=minutes dataUnits=minutes interval=20 displayLocalTime=true alignLabelsToUnits=true minimum={minimum} maximum={maximum} / /mx:horizontalAxis
[flexcoders] Re: style property reference
The styles that apply to each class/component are available in the documentation. Such as http://livedocs.macromedia.com/flex/2/langref/mx/controls/DataGrid.html#styleSummary HTH, Ben --- In flexcoders@yahoogroups.com, bitfacepatrick [EMAIL PROTECTED] wrote: Hello Can anyone tell me where I can find a reference that lists and defines all the possible style properties. I've found little bits and pieces scattered about. Which only seems to confuse the subject more. THX
RE: [flexcoders] Fade from one color to another
What about overriding the onTweenUpdate event handlers didn't work? I'll try to whip together an example that works in the next day or two. -deepa From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Tuesday, December 05, 2006 11:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Fade from one color to another @dustin - that worked for simple colors that are close by but not for pure white to pure black #FF, #00 @deepa - i could not get that to work after one hour. i decided to try to dissolve from one state to another. one state has a white background. the other state has a black background. the code i wrote makes sense to me but the effects are triggering at the wrong time. shouldn't this work? if there is more the fromState and toState are misleading. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute styleName=plain mx:states mx:State name=blackState mx:SetProperty target={button1} name=label value=Fade to White/ mx:SetStyle name=backgroundColor value=0x00/ mx:SetEventHandler target={button1} name=click handler={currentState=''}/ /mx:State /mx:states !-- Fade to black -- !-- When user clicks a button the screen should fade to black-- !-- After application /state fades to black switch states -- !-- After switching states fade up from black -- mx:transitions mx:Transition fromState= toState=blackState mx:Parallel mx:Dissolve duration=4000 alphaTo=1 color=#00 target={this}/ /mx:Parallel /mx:Transition mx:Transition fromState=blackState toState= mx:Parallel mx:Dissolve duration=4000 alphaTo=1 color=#FF target={this}/ /mx:Parallel /mx:Transition /mx:transitions mx:Button x=120 y=139 horizontalCenter=0 verticalCenter=0 label=Fade to Black id=button1 click={currentState='blackState'}/ /mx:Application On 12/4/06, Deepa Subramaniam [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Ah - that is because AnimateProperty is just cycling through all the RGB values between your fromValue color and your endValue color. What you may want to do is add an event handler for the tweenUpdate event on the AnimateProperty effect instance and check to see what the value passed in the TweenEvent object is. That value is what the backgroundColor is at that moment in the lifetime of the effect. You can then add in your own logic that sets the backgroundColor depending on where the effect is in its lifetime (ie: simulate a progression from dark gray to light gray). I'm not 100% sure how that will work out but I'd be interested in finding out what doesn't work about it. Incidentally, you should check out Alex Uhlmann's Animation Package where I think he has an effect that does exactly what you want. That will probably be easier :-) http://www.alex-uhlmann.de/flash/animationpackage/ -deepa From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Monday, December 04, 2006 2:31 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Fade from one color to another i see. that mostly works. except now it cycles through every color giving a flicker effect like i am on acid. try this to see: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx= http://www.adobe.com/2006/mxml; layout=absolute styleName=plain creationCompleteEffect={fadeColor} mx:AnimateProperty id=fadeColor isStyle=true property=backgroundColor fromValue=0xFF toValue=0x00 target={Application.application} duration=2000/ /mx:Application If i change the fromValue and the toValue to a two digit number like so it is a very smooth transition but it does not fade from white. It only fades from blue. Try this: mx:AnimateProperty id=fadeColor isStyle=true property=backgroundColor fromValue=0xFF toValue=0x00 target={Application.application} duration=2000/ I am thinking of just transitioning to a blank black state but that feels like a hack. dorkie best practices dork from dorktown On 12/4/06, Deepa Subramaniam [EMAIL PROTECTED] wrote: Set the the isStyle property to true in your AnimateProperty tag. -deepa From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Monday, December 04, 2006 5:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Fade from one color to another I need to fade my application background color from 0xC47D31 to 0x67DEF9 and I have no idea where to start. I've seen AS2 actionscript around that I can try to convert but what I'm looking for is a already built MXML component Effect, similar to
RE: [flexcoders] Fade from one color to another
Dorkie, Here is a better example that fixes the problem with fading the children... mx:Sequence id=fadeToBlack mx:AnimateProperty target={this} property=backgroundAlpha isStyle=true fromValue=1 toValue=0 effectEnd=setStyle('backgroundColor','0') duration=1000 / mx:AnimateProperty target={this} property=backgroundAlpha isStyle=true fromValue=0 toValue=1 duration=1000 / /mx:Sequence mx:Sequence id=fadeToWhite mx:AnimateProperty target={this} property=backgroundAlpha isStyle=true fromValue=1 toValue=0 effectEnd=setStyle('backgroundColor','white') duration=1000 / mx:AnimateProperty target={this} property=backgroundAlpha isStyle=true fromValue=0 toValue=1 duration=1000 / /mx:Sequence mx:Button label=Fade To White click=fadeToWhite.play(); / mx:Button label=Fade To Black click=fadeToBlack.play(); / From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dustin Mercer Sent: Wednesday, December 06, 2006 12:18 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Fade from one color to another Dorkie, What about this example? mx:Sequence id=fadeToBlack mx:AnimateProperty target={this} property=alpha fromValue=1 toValue=0 effectEnd=setStyle('backgroundColor','0') / mx:AnimateProperty target={this} property=alpha fromValue=0 toValue=1 / /mx:Sequence mx:Sequence id=fadeToWhite mx:AnimateProperty target={this} property=alpha fromValue=1 toValue=0 effectEnd=setStyle('backgroundColor','white') / mx:AnimateProperty target={this} property=alpha fromValue=0 toValue=1 / /mx:Sequence mx:Button label=Fade To White click=fadeToWhite.play(); / mx:Button label=Fade To Black click=fadeToBlack.play(); / From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Tuesday, December 05, 2006 11:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Fade from one color to another @dustin - that worked for simple colors that are close by but not for pure white to pure black #FF, #00 @deepa - i could not get that to work after one hour. i decided to try to dissolve from one state to another. one state has a white background. the other state has a black background. the code i wrote makes sense to me but the effects are triggering at the wrong time. shouldn't this work? if there is more the fromState and toState are misleading. ?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 styleName=plain mx:states mx:State name=blackState mx:SetProperty target={button1} name=label value=Fade to White/ mx:SetStyle name=backgroundColor value=0x00/ mx:SetEventHandler target={button1} name=click handler={currentState=''}/ /mx:State /mx:states !-- Fade to black -- !-- When user clicks a button the screen should fade to black-- !-- After application /state fades to black switch states -- !-- After switching states fade up from black -- mx:transitions mx:Transition fromState= toState=blackState mx:Parallel mx:Dissolve duration=4000 alphaTo=1 color=#00 target={this}/ /mx:Parallel /mx:Transition mx:Transition fromState=blackState toState= mx:Parallel mx:Dissolve duration=4000 alphaTo=1 color=#FF target={this}/ /mx:Parallel /mx:Transition /mx:transitions mx:Button x=120 y=139 horizontalCenter=0 verticalCenter=0 label=Fade to Black id=button1 click={currentState='blackState'}/ /mx:Application On 12/4/06, Deepa Subramaniam [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Ah - that is because AnimateProperty is just cycling through all the RGB values between your fromValue color and your endValue color. What you may want to do is add an event handler for the tweenUpdate event on the AnimateProperty effect instance and check to see what the value passed in the TweenEvent object is. That value is what the backgroundColor is at that moment in the lifetime of the effect. You can then add in your own logic that sets the backgroundColor depending on where the effect is in its lifetime (ie: simulate a progression from dark gray to light gray). I'm not 100% sure how that will work out but I'd be interested in finding out what doesn't work about it. Incidentally, you should check out Alex Uhlmann's Animation Package where I think he has an effect that
Re: [flexcoders] Flex II Stand-alone Builder and SVN?
I've been using FlexBuilder standalone with the Eclipse SVN plugin and it works beautifully. You don't want to just import the project as an existing project, but rather do an import from SVN. That way it tracks the version and allows you to sync and diff and such against the SVN server. On 12/6/06, discollective [EMAIL PROTECTED] wrote: Can anyone tell me if the Flex II stand-alone builder plays nice with SVN? I did take it for a quick test-drive, and it seems that the Flex II standalond IDE does not like some of the svn related folders when you just try to point a new project to a directory that is under SVN. Any advice or assistance is much appreciated. Thanks, -Jeff
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
I do have a service for each CFC. I have a BusinessDelegate for each as well with a method for each method on the CFC. Ex: public class EmployeeDelegate { public function EmployeeDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance ().getRemoteObject(employeeService); this.responder = responder; } public function readEmployeeByUsername(sUsername:String) : void { var call : Object = service.readEmployeeByUsername(sUsername); call.resultHandler = responder.onResult; call.faultHandler = responder.onFault; } private var responder : Responder; private var service : Object; } On 12/6/06, Douglas McCarroll [EMAIL PROTECTED] wrote: If I understand correctly (newbie speaking) you'd have: - A service specified on ServiceLocator for each of your CFCs - A BusinessDelegate for each method that you'll be calling Steve House wrote: Hank, Thanks for your reply. I am not sure I am explaining this correctly but let me try adding these details and see if this helps. My backend is ColdFusion and I have created Flex remote objects to several CFCs that each correspond to a separate business object (not necessarily one table). For example, I have an employeeGateway.cfc who's methods all pertain to employees (e.g. readEmployeeById(), readEmployeeByUsername(), addEmployeePermission()). From what I understand I have to set up a remote object connection to each CFC that I want to talk to. Although I could create a single CFC to group together lookup table queries I prefer to keep them in their distinct CFCs to allow for future methods related to those objects. Does this clear things up at all or am I still way off? Thanks again for your help! Steve On 12/5/06, *hank williams* [EMAIL PROTECTED] hank777%40gmail.com mailto:[EMAIL PROTECTED] hank777%40gmail.com wrote: Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] cyberdust%40gmail.com mailto:cyberdust% cyberdust%2540gmail.com wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders% flexcoders%2540yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us http://www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches that event. This will work well enough if you need results from command_1 before you make the service call in command_2, which you need before command_3, etc. On the other hand, if that's not the case, what to do?
Re: [flexcoders] Multi-select not happening! - bug?
I am running firefox 1.5 with player 9.0.16 and I also cannot get multiple selection working in a tree. I was just trying to figure out what was wrong and I did a search to see if there was a bug and found this thread. Hank On 11/2/06, Joan Lafferty [EMAIL PROTECTED] wrote: For that link, multiple selection in the list works for me in Firefox 2 on player 9.0.16. Are you on Mac or Linux. Can you please verify your player number? Joan -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Sreejith Unnikrishnan *Sent:* Thursday, November 02, 2006 8:13 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Multi-select not happening! - bug? Hi Joan, I put a sample that can be accessed at http://indesg.com/flexBugs/ListExample.swf http://indesg.com +++ The code is below: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% creationComplete=initApp(); viewSourceURL=srcview/index.html mx:Script ![CDATA[ import mx.controls.Text; import mx.events.DragEvent; private function initApp():void { srclist.dataProvider = ['Reading', 'Television', 'Movies']; } private function popSelectItems(event:Event):void { var theSelectItems:Array = new Array(srclist.selectedItems); si.text = theSelectItems.toString(); } private function doDragDrop(event:DragEvent):void { trace (Drag Dropped); } ]] /mx:Script mx:XMLList id=treeData node label=Mail Box node label=Inbox node label=Marketing/ node label=Product Management/ node label=Personal/ /node node label=Outbox node label=Professional/ node label=Personal/ /node node label=Spam/ node label=Sent/ /node /mx:XMLList mx:HBox mx:VBox mx:Label text=Available Activities/ mx:List id=srclist width=200 height=200 allowMultipleSelection=true dragEnabled=true change=popSelectItems(event)/ /mx:VBox mx:VBox mx:Label text=Multi-select happens in IE, not in Mozilla, Opera ... / mx:TextArea id=si width=200 height=200 / /mx:VBox /mx:HBox mx:HBox mx:VBox backgroundColor=#ff mx:Label text=Drag items from top - works ! / mx:List width=200 height=200 dropEnabled=true / /mx:VBox mx:VBox width=200 height=200 mx:Label text=Tree does not recognize dragDrop ! :-( / mx:Tree id=myTree width=100% height=100% dropEnabled=true dragDrop=doDragDrop(event) dragEnabled=true labelField=@label showRoot=false dataProvider={treeData}/ /mx:VBox /mx:HBox /mx:Application +++ Thanks Sree - Original Message - *From:* Joan Lafferty [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Thursday, November 02, 2006 4:06 AM *Subject:* RE: [flexcoders] Multi-select not happening! - bug? Sreejith, I ran your bugfile and it seems to run fine for me in Firefox 2.0. Do you want to send the swf and mxml file to me offline? Also, please confirm whether you are using a Mac, Windows or Linux machine. Thanks, Joan -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Sreejith Unnikrishnan *Sent:* Wednesday, November 01, 2006 1:50 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Multi-select not happening! - bug? Well, I just noticed that the multiSelect does not happen in Firefox 2.0. It works in IE though. Is this a bug? - Original Message - *From:* Sreejith Unnikrishnan [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Thursday, November 02, 2006 12:27 AM *Subject:* **SL-JUNK** [flexcoders] Multi-select not happening! The multiSelect does not seem to be working. Any help? Thanks = ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=500 height=200 borderStyle=solid creationComplete=initApp(); mx:Script ![CDATA[ private function initApp():void { srclist.dataProvider = ['Reading', 'Television', 'Movies']; destlist.dataProvider =[]; } ]] /mx:Script mx:HBox mx:VBox mx:Label text=Available Activities/ mx:List id=srclist height=100 allowMultipleSelection=true dragEnabled=true/ /mx:VBox mx:VBox mx:Label text=Activities I Like/ mx:List id=destlist height=100 dropEnabled=true/ /mx:VBox /mx:HBox /mx:Application
[flexcoders] Tree drag drop
with dragEnabled, dropEnabled, dragMoveEnabled all set to true I am able to drag an Item from one place in a tree to another. The only problem is that I dont seem to be able to promote or demote an item. meaning I can drag an item to a sibling position of another item, but not to a child of another item. Is this just a limitation of the tree control code or am I missing something. Hank
[flexcoders] Re: Swapping components but keeping a single ID
Hi Troy, I have deal with some similar thing and I finally found that the best approach is to have a single AS variable referencing the right component at the right moment, that is, change the object pointed by the AS variable when your state changes. In the other hand, I also found that components inside a repeater that are defined with a single ID, become to an array of components: If you have mx:Button id=btn/ inside a repeater, at the end, you will get that btn is an array of Buttons. I do not know how to get that programatically or without using a repeater however it would be cool. Regards --- In flexcoders@yahoogroups.com, Troy Rollins [EMAIL PROTECTED] wrote: I notice that Flex won't allow me to identify multiple components with the same ID, even if those components are in different view states. I had hoped to reference a single ID no matter which component was there (all the components implement a single interface.) So, how can I maintain a single component reference for my AS to work with, no matter which of these components are on stage? Is it possible in MXML, or do I need to come up with an AS-only solution? -- Troy RPSystems, Ltd. www.rpsystems.net
Re: [flexcoders] Multi-select not happening! - bug?
I did a further search and found that Belinda Nambooze from adobe said it was disabled and would be fixed in a later release. So I am wondering joan, are you working with the new flex framework where this is fixed? Hank On 12/6/06, hank williams [EMAIL PROTECTED] wrote: I am running firefox 1.5 with player 9.0.16 and I also cannot get multiple selection working in a tree. I was just trying to figure out what was wrong and I did a search to see if there was a bug and found this thread. Hank On 11/2/06, Joan Lafferty [EMAIL PROTECTED] wrote: For that link, multiple selection in the list works for me in Firefox 2 on player 9.0.16. Are you on Mac or Linux. Can you please verify your player number? Joan -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Sreejith Unnikrishnan *Sent:* Thursday, November 02, 2006 8:13 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Multi-select not happening! - bug? Hi Joan, I put a sample that can be accessed at http://indesg.com/flexBugs/ListExample.swf http://indesg.com +++ The code is below: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% creationComplete=initApp(); viewSourceURL=srcview/index.html mx:Script ![CDATA[ import mx.controls.Text; import mx.events.DragEvent; private function initApp():void { srclist.dataProvider = ['Reading', 'Television', 'Movies']; } private function popSelectItems(event:Event):void { var theSelectItems:Array = new Array(srclist.selectedItems); si.text = theSelectItems.toString(); } private function doDragDrop(event:DragEvent):void { trace (Drag Dropped); } ]] /mx:Script mx:XMLList id=treeData node label=Mail Box node label=Inbox node label=Marketing/ node label=Product Management/ node label=Personal/ /node node label=Outbox node label=Professional/ node label=Personal/ /node node label=Spam/ node label=Sent/ /node /mx:XMLList mx:HBox mx:VBox mx:Label text=Available Activities/ mx:List id=srclist width=200 height=200 allowMultipleSelection=true dragEnabled=true change=popSelectItems(event)/ /mx:VBox mx:VBox mx:Label text=Multi-select happens in IE, not in Mozilla, Opera ... / mx:TextArea id=si width=200 height=200 / /mx:VBox /mx:HBox mx:HBox mx:VBox backgroundColor=#ff mx:Label text=Drag items from top - works ! / mx:List width=200 height=200 dropEnabled=true / /mx:VBox mx:VBox width=200 height=200 mx:Label text=Tree does not recognize dragDrop ! :-( / mx:Tree id=myTree width=100% height=100% dropEnabled=true dragDrop=doDragDrop(event) dragEnabled=true labelField=@label showRoot=false dataProvider={treeData}/ /mx:VBox /mx:HBox /mx:Application +++ Thanks Sree - Original Message - * From:* Joan Lafferty [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Thursday, November 02, 2006 4:06 AM *Subject:* RE: [flexcoders] Multi-select not happening! - bug? Sreejith, I ran your bugfile and it seems to run fine for me in Firefox 2.0. Do you want to send the swf and mxml file to me offline? Also, please confirm whether you are using a Mac, Windows or Linux machine. Thanks, Joan -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Sreejith Unnikrishnan *Sent:* Wednesday, November 01, 2006 1:50 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Multi-select not happening! - bug? Well, I just noticed that the multiSelect does not happen in Firefox 2.0 . It works in IE though. Is this a bug? - Original Message - * From:* Sreejith Unnikrishnan [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Thursday, November 02, 2006 12:27 AM *Subject:* **SL-JUNK** [flexcoders] Multi-select not happening! The multiSelect does not seem to be working. Any help? Thanks = ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=500 height=200 borderStyle=solid creationComplete=initApp(); mx:Script ![CDATA[ private function initApp():void { srclist.dataProvider = ['Reading', 'Television', 'Movies']; destlist.dataProvider =[]; } ]] /mx:Script mx:HBox mx:VBox mx:Label text=Available Activities/ mx:List id=srclist height=100 allowMultipleSelection=true dragEnabled=true/ /mx:VBox mx:VBox mx:Label text=Activities I Like/ mx:List id=destlist height=100 dropEnabled=true/ /mx:VBox /mx:HBox /mx:Application
Re: [flexcoders] Building workspace - lowering the time
I dunno if this holds true with you guys but I noticed having a lot of application mxml in the same project folder burdens flex a lot. So im guessing when flex is 'building workspace' - one of the memory intensive task it does is checking each application in your project directory and looking for dependencies (broken ones, updated ones, erroneous ones etc). Correct me if im wrong - moreover i think it updates the project property file associated with the current project. I have also tried moving to a new workspace for every big project i have to do - probably it's overkill -- or even unrelated.. but i have to convince myself im doing something to make it compile faster :D (im running it on 1.5 GB mem with 3GHz processor at 800mhz FSB.. it's not top of the line but i had not expected it to choke on a Flex compile. Apparently i was wrong. So on top of run-time advantages, having the mx module component in the next flex release will allow us to create separate application and project filers for the parts/modules we need.) --- dorkie dork from dorktown [EMAIL PROTECTED] wrote: I have 4 projects open. The project I was working on had 4 components in it. I had 3 other projects open. One was a Example project that had about 20 example files in it. I noticed too I had a lot programs up. So I might have been using virtual memory. It only happened once and its ok now. I'm curious, when it's Building the workspace what does that mean technically? On 12/6/06, Gordon Smith [EMAIL PROTECTED] wrote: You could turn off Build Automatically in the Projects menu, or close projects that you aren't working on (right-click on a project in the Navigator pane and choose Close Project). How many projects are you building, and how many components does the average one have? - Gordon -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *dorkie dork from dorktown *Sent:* Tuesday, December 05, 2006 11:19 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Building workspace - lowering the time Is there anything I can do to lower the time it takes for Flex Builder to Build the workspace? Sometimes it takes a few minutes when I first start up. dorkie finger tapping dork from dorktown Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.
RE: [flexcoders] Multi-select not happening! - bug?
Hank, you are correct. Multiple selection was disabled in the Tree for the Flex 2 release. We have re-enabled it in the next version of Flex which should be out soon. -deepa From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hank williams Sent: Wednesday, December 06, 2006 1:14 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Multi-select not happening! - bug? I did a further search and found that Belinda Nambooze from adobe said it was disabled and would be fixed in a later release. So I am wondering joan, are you working with the new flex framework where this is fixed? Hank On 12/6/06, hank williams [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I am running firefox 1.5 with player 9.0.16 and I also cannot get multiple selection working in a tree. I was just trying to figure out what was wrong and I did a search to see if there was a bug and found this thread. Hank On 11/2/06, Joan Lafferty [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: For that link, multiple selection in the list works for me in Firefox 2 on player 9.0.16. Are you on Mac or Linux. Can you please verify your player number? Joan From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Sreejith Unnikrishnan Sent: Thursday, November 02, 2006 8:13 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Multi-select not happening! - bug? Hi Joan, I put a sample that can be accessed at http://indesg.com/flexBugs/ListExample.swf http://indesg.com/flexBugs/ListExample.swf http://indesg.com +++ The code is below: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=100% creationComplete=initApp(); viewSourceURL=srcview/index.html mx:Script ![CDATA[ import mx.controls.Text; import mx.events.DragEvent; private function initApp():void { srclist.dataProvider = ['Reading', 'Television', 'Movies']; } private function popSelectItems(event:Event):void { var theSelectItems:Array = new Array(srclist.selectedItems); si.text = theSelectItems.toString(); } private function doDragDrop(event:DragEvent):void { trace (Drag Dropped); } ]] /mx:Script mx:XMLList id=treeData node label=Mail Box node label=Inbox node label=Marketing/ node label=Product Management/ node label=Personal/ /node node label=Outbox node label=Professional/ node label=Personal/ /node node label=Spam/ node label=Sent/ /node /mx:XMLList mx:HBox mx:VBox mx:Label text=Available Activities/ mx:List id=srclist width=200 height=200 allowMultipleSelection=true dragEnabled=true change=popSelectItems(event)/ /mx:VBox mx:VBox mx:Label text=Multi-select happens in IE, not in Mozilla, Opera ... / mx:TextArea id=si width=200 height=200 / /mx:VBox /mx:HBox mx:HBox mx:VBox backgroundColor=#ff mx:Label text=Drag items from top - works ! / mx:List width=200 height=200 dropEnabled=true / /mx:VBox mx:VBox width=200 height=200 mx:Label text=Tree does not recognize dragDrop ! :-( / mx:Tree id=myTree width=100% height=100% dropEnabled=true dragDrop=doDragDrop(event) dragEnabled=true labelField=@label showRoot=false dataProvider={treeData}/ /mx:VBox /mx:HBox /mx:Application +++ Thanks Sree - Original Message - From: Joan Lafferty mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Thursday, November 02, 2006 4:06 AM Subject: RE: [flexcoders] Multi-select not happening! - bug? Sreejith, I ran your bugfile and it seems to run fine for me in Firefox 2.0. Do you want to send the swf and mxml file to me offline? Also, please confirm whether you are using a Mac, Windows or Linux machine. Thanks, Joan From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com http://ups.com ] On Behalf Of Sreejith Unnikrishnan Sent: Wednesday, November 01, 2006 1:50 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Multi-select not happening! - bug? Well, I just noticed that the multiSelect does not happen in Firefox 2.0. It works in IE though. Is this a bug? - Original Message - From: Sreejith Unnikrishnan mailto:[EMAIL PROTECTED]
[flexcoders] (unknown)
X-IPI Cienfuegos-MailScanner: Found to be clean X-IPI Cienfuegos-MailScanner-From: [EMAIL PROTECTED] Subject: Re: {Disarmed} RE: [flexcoders] How i can acces to other component Thanks. That was very helpfully. This won't answer all of your questions, but the doc has an example of using the SWFLoader control to load a SWF and then interact with it: http://livedocs.macromedia.com/flex/2/docs/0543.html SMG From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 8:14 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How i can acces to other component of SWF loaded file? X-IPI Cienfuegos-MailScanner: Found to be clean X-IPI Cienfuegos-MailScanner-From: [EMAIL PROTECTED] mailto:odiel%40ipicfg.rimed.cu Hello. I'm a novice in Flex world. My first application that I working is an intranet. I'm using RemoteObject tech with php and SabreAMF, it work fine. My implementation are a first page with login window, then if you can login, other SWF file are loaded from server and inside of the file others SWFs, the modules of application load dinamically. I have some doubts about how load SWFs dinamycally, how (best way) create SWFLoader and load other modules, and how interact with components inside of the other SWF file. Best regards. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. MailScanner agradece a IPI Cienfuegos por su apoyo. Nodo de Comunicaciones del IPI Cienfuegos -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. MailScanner agradece a IPI Cienfuegos por su apoyo. Nodo de Comunicaciones del IPI Cienfuegos -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. MailScanner agradece a IPI Cienfuegos por su apoyo. Nodo de Comunicaciones del IPI Cienfuegos
[flexcoders] flex 1.5 numericstepper problem
Hi all, I have a problem with a numeric stepper in a cellrenderer of a dataGridColumn. When the cell loses focus, it goes back to the value set initially, so I lose all the changes. Here is the cellrenderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.levels; } function changeVal(){ val = changed.value; } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox I need the numericStepper to keep the value I change it to in each of the rows I change it. Cheers, Iain
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
I have a BusinessDelegate for each as well with a method for each method on the CFC. On second thought that sounds better than what I suggested. :-) Douglas Steve House wrote: I do have a service for each CFC. I have a BusinessDelegate for each as well with a method for each method on the CFC. Ex: public class EmployeeDelegate { public function EmployeeDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance().getRemoteObject(employeeService); this.responder = responder; } public function readEmployeeByUsername(sUsername:String) : void { var call : Object = service.readEmployeeByUsername(sUsername); call.resultHandler = responder.onResult; call.faultHandler = responder.onFault; } private var responder : Responder; private var service : Object; } On 12/6/06, *Douglas McCarroll* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: If I understand correctly (newbie speaking) you'd have: - A service specified on ServiceLocator for each of your CFCs - A BusinessDelegate for each method that you'll be calling Steve House wrote: Hank, Thanks for your reply. I am not sure I am explaining this correctly but let me try adding these details and see if this helps. My backend is ColdFusion and I have created Flex remote objects to several CFCs that each correspond to a separate business object (not necessarily one table). For example, I have an employeeGateway.cfc who's methods all pertain to employees (e.g. readEmployeeById(), readEmployeeByUsername(), addEmployeePermission()). From what I understand I have to set up a remote object connection to each CFC that I want to talk to. Although I could create a single CFC to group together lookup table queries I prefer to keep them in their distinct CFCs to allow for future methods related to those objects. Does this clear things up at all or am I still way off? Thanks again for your help! Steve On 12/5/06, *hank williams* [EMAIL PROTECTED] mailto:hank777%40gmail.com mailto:[EMAIL PROTECTED] mailto:hank777%40gmail.com wrote: Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] mailto:cyberdust%40gmail.com mailto:cyberdust% mailto:cyberdust%25 40gmail.com http://40gmail.com wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% mailto:flexcoders%2540yahoogroups.com http://40yahoogroups.com, Douglas McCarroll
[flexcoders] HTML-supported tooltip..little hack
See here my solution: http://labs.flexcoders.nl/?p=18 (view source under contextmenu) If you don't want to read it... I'm abusing the border-skin.
[flexcoders] Flex eye candy and memory consumption
Hello, I was wondering if anyone has run across memory consumption issues when using some of the eye candy in the Flex framework. Here are a couple of examples of what I am referring to: 1. The translucent overlay on the rest of the app when using Alert.show in modal mode. (vs. using the flag Alert.NONMODAL) 2. Using mx:WipeUp/ and mx:WipeDown/ for the inEffect and outEffect of a component. I've been tracking the effect of using these effects by watching Task Manager|Mem Usage for the firefox.exe process right before and right after these effects run. We're talking 4-10MB of memory consumed each time these effects are run. (I know because I've done the process of tracking with the same code and the effects turned off resulting in 300KB-1.5MB). My concern is that: 1. I can't programmatically (minus the unsupported tip given to us by gskinner http://www.gskinner.com/blog/archives/2006/08/as3_resource_ma_2.html) force the Garbage Collector to run. 2. Since I can't force the Garbage Collector to run, the comments by Ted Patrick on Flash Player memory management and releasing memory back to the OS is highly concerning. (http://tech.groups.yahoo.com/group/flexcoders/message/48219 | http://tech.groups.yahoo.com/group/flexcoders/message/48330) I understand that effects would consume memory to run, but I don't like thinking that once the memory has been allocated I have no control on if it will be given back to the Operating System. I've tried leaving my app open all night to see if the memory allocation would go down and it doesn't. (You would think since the effects were long done it would) Also, the app I'm working on is one that needs to run all day, so closing and reopening the browser is not an option. Has anyone noticed what I've noticed or have any insight on how to use effects without increasing the footprint so? -Jun
[flexcoders] Use an Image as an icon
Hello. Can anybody tell me either how to use an image as an icon, or convert an image to a class for use as an icon (in components, the icon is of type Class)? Or better yet is it possible for me to dynamically embed an image via a variable? Sure the usual embed assertion works: [Embed('image.jpg')] [Bindable] var img:Class; ... mx:Button label=button icon={img} / But what I want to do is embed the image via a variable such as: var image:String = image.jpg; [Embed(image)] var img:Class; What I'm trying to do is a bit more complex, but help with this simple example should get me going. Any help would be appreciated. Thanks. Evan
Re: [flexcoders] Multi-select not happening! - bug?
thanks deepa, on another note related to tree, do you know if it is possible to use drag and drop to promote or demote a tree item? I can drag an item from one place to another but I cant drag an item to the right and make an item a child of its predecessor. Is there a way to do this. hank On 12/6/06, Deepa Subramaniam [EMAIL PROTECTED] wrote: Hank, you are correct. Multiple selection was disabled in the Tree for the Flex 2 release. We have re-enabled it in the next version of Flex which should be out soon. -deepa -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *hank williams *Sent:* Wednesday, December 06, 2006 1:14 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Multi-select not happening! - bug? I did a further search and found that Belinda Nambooze from adobe said it was disabled and would be fixed in a later release. So I am wondering joan, are you working with the new flex framework where this is fixed? Hank On 12/6/06, *hank williams* [EMAIL PROTECTED] wrote: I am running firefox 1.5 with player 9.0.16 and I also cannot get multiple selection working in a tree. I was just trying to figure out what was wrong and I did a search to see if there was a bug and found this thread. Hank On 11/2/06, *Joan Lafferty* [EMAIL PROTECTED] wrote: For that link, multiple selection in the list works for me in Firefox 2 on player 9.0.16. Are you on Mac or Linux. Can you please verify your player number? Joan -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Sreejith Unnikrishnan *Sent:* Thursday, November 02, 2006 8:13 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Multi-select not happening! - bug? Hi Joan, I put a sample that can be accessed at http://indesg.com/flexBugs/ListExample.swf http://indesg.com +++ The code is below: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% creationComplete=initApp(); viewSourceURL=srcview/index.html mx:Script ![CDATA[ import mx.controls.Text; import mx.events.DragEvent; private function initApp():void { srclist.dataProvider = ['Reading', 'Television', 'Movies']; } private function popSelectItems(event:Event):void { var theSelectItems:Array = new Array(srclist.selectedItems); si.text = theSelectItems.toString(); } private function doDragDrop(event:DragEvent):void { trace (Drag Dropped); } ]] /mx:Script mx:XMLList id=treeData node label=Mail Box node label=Inbox node label=Marketing/ node label=Product Management/ node label=Personal/ /node node label=Outbox node label=Professional/ node label=Personal/ /node node label=Spam/ node label=Sent/ /node /mx:XMLList mx:HBox mx:VBox mx:Label text=Available Activities/ mx:List id=srclist width=200 height=200 allowMultipleSelection=true dragEnabled=true change=popSelectItems(event)/ /mx:VBox mx:VBox mx:Label text=Multi-select happens in IE, not in Mozilla, Opera ... / mx:TextArea id=si width=200 height=200 / /mx:VBox /mx:HBox mx:HBox mx:VBox backgroundColor=#ff mx:Label text=Drag items from top - works ! / mx:List width=200 height=200 dropEnabled=true / /mx:VBox mx:VBox width=200 height=200 mx:Label text=Tree does not recognize dragDrop ! :-( / mx:Tree id=myTree width=100% height=100% dropEnabled=true dragDrop=doDragDrop(event) dragEnabled=true labelField=@label showRoot=false dataProvider={treeData}/ /mx:VBox /mx:HBox /mx:Application +++ Thanks Sree - Original Message - *From:* Joan Lafferty [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Thursday, November 02, 2006 4:06 AM *Subject:* RE: [flexcoders] Multi-select not happening! - bug? Sreejith, I ran your bugfile and it seems to run fine for me in Firefox 2.0. Do you want to send the swf and mxml file to me offline? Also, please confirm whether you are using a Mac, Windows or Linux machine. Thanks, Joan -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com] *On Behalf Of *Sreejith Unnikrishnan *Sent:* Wednesday, November 01, 2006 1:50 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Multi-select not happening! - bug? Well, I just noticed that the multiSelect does not happen in Firefox 2.0. It works in IE though. Is this a bug? - Original Message - *From:* Sreejith Unnikrishnan [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Thursday, November 02, 2006 12:27 AM *Subject:* **SL-JUNK** [flexcoders] Multi-select not happening! The multiSelect does not
[flexcoders] Re: flex 1.5 numericstepper problem
Hi Iain, You need to update the grid's data field in your change handler. Try the following: var listOwner : MovieClip; // the reference we receive to the list var getCellIndex : Function; // the function we receive from the list var getDataLabel : Function; // the function we receive from the list function changeVal() { val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel(), val); } Relevant links: http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cfm http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cfm http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrenderers\ .zip http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrenderer\ s.zip (source) --- In flexcoders@yahoogroups.com, digital_eyezed [EMAIL PROTECTED] wrote: Hi all, I have a problem with a numeric stepper in a cellrenderer of a dataGridColumn. When the cell loses focus, it goes back to the value set initially, so I lose all the changes. Here is the cellrenderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.levels; } function changeVal(){ val = changed.value; } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox I need the numericStepper to keep the value I change it to in each of the rows I change it. Cheers, Iain
[flexcoders] ActionsScript 3 Cookbook Companion Classes: Number Utilities Bug
Wow, the description says that this number will be rounded up to the next decimal point: trace (NumberUtilities.round(3.75,.1)); .1, being the flag to round up, so the result should be 3.8. It's not it's: 3.8003! I know I'm using this method correctly, any tips or suggestions. Thanks, Patrick
[flexcoders] FDS: Using Hibernate second-level cache possible?
Hi together, As a newbie I would like to get your advices on how to use the Hibernate caching for Flex Data Management Services. Is this possible at all or a contra-diction to the HibernateAssembler? For my java applications I currently use second-level caching to speed up data access with Hibernate (3.2), which I would also like to use for my Flex app: For this I use in the Hibernate mapping definition (inside the class element): cache usage=read-write/ Unfortunately if I turn EhCache on (via the hibernate configuration) ... property name=cache.provider_classorg.hibernate.cache.EhCacheProvider/property ... the tomcat logs show an ugly stack-trace: CacheException: Attempt to restart an already started EhCacheProvider. See below for the exception in its full-length beauty. The only way to overcome this, to avoid caching at all by setting: property name=cache.provider_classorg.hibernate.cache.NoCacheProvider/property (Also using the recommended SingletonEhCacheProvider does not help) Any help much appreciated. Thanks, Niko 2006-12-05 08:57:08,737 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/useradmin] - Servlet /useradmin threw load() exception java.lang.ExceptionInInitializerError at flex.data.assemblers.HibernateManager.createSessionFactory(HibernateManager.java:66) at flex.data.assemblers.HibernateManager.init(HibernateManager.java:44) at flex.data.assemblers.HibernateAssembler.initialize(HibernateAssembler.java:137) at flex.messaging.factories.JavaFactory$JavaFactoryInstance.createInstance(JavaFactory.java:254) at flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.java:93) at flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination.java:76) at flex.data.adapters.JavaAdapter.server(JavaAdapter.java:158) at flex.data.adapters.JavaAdapter.setSettings(JavaAdapter.java:119) at flex.messaging.Destination.createAdapter(Destination.java:279) at flex.messaging.Destination.initDestination(Destination.java:103) at flex.messaging.FactoryDestination.initDestination(FactoryDestination.java:58) at flex.data.DataService.createDestination(DataService.java:90) at flex.messaging.services.AbstractService.createDestinations(AbstractService.java:82) at flex.messaging.config.MessagingConfiguration.createServices(MessagingConfiguration.java:187) at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java:84) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:105) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Caused by: org.hibernate.cache.CacheException: Attempt to restart an already started EhCacheProvider. Use sessionFactory.close() between repeated calls to buildSessionFactory. Consider using net.sf.ehcache.hibernate.SingletonEhCacheProvider. at
[flexcoders] Re: flex 1.5 numericstepper problem
Thanks, I tried this, but the numericStepper just stops stepping. Any other ideas? CHeers, Iain New Renderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; var listOwner : MovieClip; var getCellIndex : Function; var getDataLabel : Function; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.stepper; } function changeVal(){ val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel(), val); } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: Hi Iain, You need to update the grid's data field in your change handler. Try the following: var listOwner : MovieClip; // the reference we receive to the list var getCellIndex : Function; // the function we receive from the list var getDataLabel : Function; // the function we receive from the list function changeVal() { val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel(), val); } Relevant links: http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cfm http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cfm http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrenderers\ .zip http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrenderer\ s.zip (source) --- In flexcoders@yahoogroups.com, digital_eyezed iain.mclean@ wrote: Hi all, I have a problem with a numeric stepper in a cellrenderer of a dataGridColumn. When the cell loses focus, it goes back to the value set initially, so I lose all the changes. Here is the cellrenderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.levels; } function changeVal(){ val = changed.value; } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox I need the numericStepper to keep the value I change it to in each of the rows I change it. Cheers, Iain
[flexcoders] PNG transparency failing in @Embed?
I've run into a situation where the exact same PNG file will show up as transparent only when it's not embedded. Here is the mxml: mx:Image source=@Embed('assets/user-big.png')/ mx:Image source=assets/user-big.png/ Including both images on the page, the first is missing the transparent background. The second is fine. I have manually checked the images, both in the dev directory and bin directory. In fact, I have manually copied the dev ones over the top of the bin ones to make sure. If I drag the images to Firefox, both appear with no background. The background color is teal, so I would definitely notice. Near as I can tell, the embed is causing the background transparency to not be processed. I can't find anything in the docs saying this is expected behavior. -- Jason
Re: [flexcoders] ActionsScript 3 Cookbook Companion Classes: Number Utilities Bug
This is a floating point bug. See Gordon's response to Is this a bug? About Number type on Aug 30 for full details. I'll quote the important parts: getting 23.703 isn't a bug; you'd get the same answer in other languages like Java and C++. The imprecision is because Number in ActionScript (like float in Java and C++) stores a floating-point value as a binary fraction, not as a decimal fraction. These datatypes use binary fractions because that's how current microprocessors store and manipulate floating-point values...Perhaps you can simply round your results to the precision you need? Take a look at the toFixed() method of the Number class. - Dan On 12/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Wow, the description says that this number will be rounded up to the next decimal point: trace (NumberUtilities.round(3.75,.1)); .1, being the flag to round up, so the result should be 3.8. It's not it's: 3.8003! I know I'm using this method correctly, any tips or suggestions. Thanks, Patrick
Re: [flexcoders] Flex eye candy and memory consumption
From what I understand, what Ted means is that the player asks for such and such amount of memory when it requires some, and may or may not give it back when it doesn't need it anymore. So the worst case scenario is that the memory consumed by the player is the maximum amount of memory since it was loaded (the ceiling). That's the worst case scenario however. In my personal tests in Firefox 2 when the totalMemory goes down the memory consumption in Firefox also goes down a few seconds later. I am talking about an app here which can take a full 100MB of memory in a few seconds then release it in a few more seconds later (lots of BitmapData manipulation and Loaders). I think what Ted means is that you can't expect the garbage collector to collect when you want it to and you can't expect that when the garbage collector is run the memory will go down immediately, although it should eventually based on the player's and the browser's memory allocation heuristics. As for the effects though, I think it's possible that the instance of the effect is still in memory after being used, but I doubt that's the actual cause of the problem, since the effect doesn't really contain all that much stuff in it. It's possible however that once the effect is played it doesn't completely clean up after itself. Things to look out for include filters, cacheAsBitmap set to true, wipe effect masks which linger on, etc. For example, if you use have a tween from a blur filter to set blurX from 4 to 0, you have to make sure after to set filters to an empty array and set cacheAsBitmap to false (filters automatically set cacheAsBitmap to true). You'd really have to look at the source code of the actual effect you're using to see how it works internally and see if it's doing the kind of cleanup you want it to do, and if not, then perhaps you should try to extend the effect to do the garbage collection yourself. Here's my advice however: don't bother doing this unless you're in the final stages of the application development. 10 MBs lingering about is not going to make your app crash. I would expect that at the end your app will have more important memory bottlenecks than this one, like heavy use of Repeaters, too much components initialized, etc. Patrick coderjun a écrit : Hello, I was wondering if anyone has run across memory consumption issues when using some of the eye candy in the Flex framework. Here are a couple of examples of what I am referring to: 1. The translucent overlay on the rest of the app when using Alert.show in modal mode. (vs. using the flag Alert.NONMODAL) 2. Using mx:WipeUp/ and mx:WipeDown/ for the inEffect and outEffect of a component. I've been tracking the effect of using these effects by watching Task Manager|Mem Usage for the firefox.exe process right before and right after these effects run. We're talking 4-10MB of memory consumed each time these effects are run. (I know because I've done the process of tracking with the same code and the effects turned off resulting in 300KB-1.5MB) . My concern is that: 1. I can't programmatically (minus the unsupported tip given to us by gskinner http://www.gskinner .com/blog/ archives/ 2006/08/as3_ resource_ ma_2.html http://www.gskinner.com/blog/archives/2006/08/as3_resource_ma_2.html) force the Garbage Collector to run. 2. Since I can't force the Garbage Collector to run, the comments by Ted Patrick on Flash Player memory management and releasing memory back to the OS is highly concerning. (http://tech. groups.yahoo. com/group/ flexcoders/ message/48219 http://tech.groups.yahoo.com/group/flexcoders/message/48219 | http://tech. groups.yahoo. com/group/ flexcoders/ message/48330 http://tech.groups.yahoo.com/group/flexcoders/message/48330) I understand that effects would consume memory to run, but I don't like thinking that once the memory has been allocated I have no control on if it will be given back to the Operating System. I've tried leaving my app open all night to see if the memory allocation would go down and it doesn't. (You would think since the effects were long done it would) Also, the app I'm working on is one that needs to run all day, so closing and reopening the browser is not an option. Has anyone noticed what I've noticed or have any insight on how to use effects without increasing the footprint so? -Jun
RE: [flexcoders] FDS: Using Hibernate second-level cache possible?
I think the important part of the error is here: ... 41 more Caused by: net.sf.ehcache.CacheException: Cannot parseConfiguration CacheManager. Attempt to create a new instance of CacheManager using the diskStorePath /tmp/cache which is already used by an existing CacheManager. The source of the configuration was classpath. at net.sf.ehcache.CacheManager.configure(CacheManager.java:248) at net.sf.ehcache.CacheManager.init(CacheManager.java:193) at net.sf.ehcache.CacheManager.init(CacheManager.java:180) at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124) It seems like there are two session factories being started up which are configured to use the same cache. This could be because you have two web apps on the same machine each using hibernate. I don't think that flex would be trying to create two SessionFactories unless you were using more than one hibernate configuration file. Flex should share one session factory from all destinations which use the same hibernate configuration file. There must be some way to set the path name of the cache... maybe you just need to specify a different path name for this cache for the FDMS version of hibernate? Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Niko Schmuck Sent: Wednesday, December 06, 2006 8:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS: Using Hibernate second-level cache possible? Hi together, As a newbie I would like to get your advices on how to use the Hibernate caching for Flex Data Management Services. Is this possible at all or a contra-diction to the HibernateAssembler? For my java applications I currently use second-level caching to speed up data access with Hibernate (3.2), which I would also like to use for my Flex app: For this I use in the Hibernate mapping definition (inside the class element): cache usage=read-write/ Unfortunately if I turn EhCache on (via the hibernate configuration) ... property name=cache.provider_classorg.hibernate.cache.EhCacheProvider/propert y ... the tomcat logs show an ugly stack-trace: CacheException: Attempt to restart an already started EhCacheProvider. See below for the exception in its full-length beauty. The only way to overcome this, to avoid caching at all by setting: property name=cache.provider_classorg.hibernate.cache.NoCacheProvider/propert y (Also using the recommended SingletonEhCacheProvider does not help) Any help much appreciated. Thanks, Niko 2006-12-05 08:57:08,737 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/useradmi n] - Servlet /useradmin threw load() exception java.lang.ExceptionInInitializerError at flex.data.assemblers.HibernateManager.createSessionFactory(HibernateMana ger.java:66) at flex.data.assemblers.HibernateManager.init(HibernateManager.java:44) at flex.data.assemblers.HibernateAssembler.initialize(HibernateAssembler.ja va:137) at flex.messaging.factories.JavaFactory$JavaFactoryInstance.createInstance( JavaFactory.java:254) at flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.j ava:93) at flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination. java:76) at flex.data.adapters.JavaAdapter.server(JavaAdapter.java:158) at flex.data.adapters.JavaAdapter.setSettings(JavaAdapter.java:119) at flex.messaging.Destination.createAdapter(Destination.java:279) at flex.messaging.Destination.initDestination(Destination.java:103) at flex.messaging.FactoryDestination.initDestination(FactoryDestination.jav a:58) at flex.data.DataService.createDestination(DataService.java:90) at flex.messaging.services.AbstractService.createDestinations(AbstractServi ce.java:82) at flex.messaging.config.MessagingConfiguration.createServices(MessagingCon figuration.java:187) at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingCo nfiguration.java:84) at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:105) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3951) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java: 608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java :535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31 0) at
[flexcoders] Re: flex 1.5 numericstepper problem
I guess you could go straight to the dataProvider and instead of listOwner.editField() use: listOwner.dataProvider[getCellIndex().itemIndex].stepper = val; --- In flexcoders@yahoogroups.com, digital_eyezed [EMAIL PROTECTED] wrote: Thanks, I tried this, but the numericStepper just stops stepping. Any other ideas? CHeers, Iain New Renderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; var listOwner : MovieClip; var getCellIndex : Function; var getDataLabel : Function; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.stepper; } function changeVal(){ val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel(), val); } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: Hi Iain, You need to update the grid's data field in your change handler. Try the following: var listOwner : MovieClip; // the reference we receive to the list var getCellIndex : Function; // the function we receive from the list var getDataLabel : Function; // the function we receive from the list function changeVal() { val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel (), val); } Relevant links: http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cf m http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.c fm http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrender ers\ .zip http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrende rer\ s.zip (source) --- In flexcoders@yahoogroups.com, digital_eyezed iain.mclean@ wrote: Hi all, I have a problem with a numeric stepper in a cellrenderer of a dataGridColumn. When the cell loses focus, it goes back to the value set initially, so I lose all the changes. Here is the cellrenderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.levels; } function changeVal(){ val = changed.value; } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal () maximum={labelData.fill}/ /mx:HBox I need the numericStepper to keep the value I change it to in each of the rows I change it. Cheers, Iain
[flexcoders] Re: flex 1.5 numericstepper problem
That worked, thanks very much! Iain --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: I guess you could go straight to the dataProvider and instead of listOwner.editField() use: listOwner.dataProvider[getCellIndex().itemIndex].stepper = val; --- In flexcoders@yahoogroups.com, digital_eyezed iain.mclean@ wrote: Thanks, I tried this, but the numericStepper just stops stepping. Any other ideas? CHeers, Iain New Renderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; var listOwner : MovieClip; var getCellIndex : Function; var getDataLabel : Function; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.stepper; } function changeVal(){ val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel(), val); } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: Hi Iain, You need to update the grid's data field in your change handler. Try the following: var listOwner : MovieClip; // the reference we receive to the list var getCellIndex : Function; // the function we receive from the list var getDataLabel : Function; // the function we receive from the list function changeVal() { val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel (), val); } Relevant links: http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cf m http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.c fm http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrender ers\ .zip http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrende rer\ s.zip (source) --- In flexcoders@yahoogroups.com, digital_eyezed iain.mclean@ wrote: Hi all, I have a problem with a numeric stepper in a cellrenderer of a dataGridColumn. When the cell loses focus, it goes back to the value set initially, so I lose all the changes. Here is the cellrenderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.levels; } function changeVal(){ val = changed.value; } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal () maximum={labelData.fill}/ /mx:HBox I need the numericStepper to keep the value I change it to in each of the rows I change it. Cheers, Iain
[flexcoders] Re: flex 1.5 numericstepper problem
Iain, out of curiousity I put your renderer code into a file named NumericStepperRenderer.mxml and it worked fine with the following sample app. There may be some problem in your datagrid declaration; a misnamed column perhaps? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var dataArray: Array = [ {label: a, stepper: 1, fill:10}, {label: b, stepper: 2, fill: 20}, {label: c, stepper: 3, fill: 30} ]; ]] /mx:Script mx:DataGrid dataProvider={dataArray} mx:columns mx:Array mx:DataGridColumn columnName=label headerText=Label/ mx:DataGridColumn columnName=stepper headerText=Stepper cellRenderer=NumericStepperRenderer/ /mx:Array /mx:columns /mx:DataGrid /mx:Application --- In flexcoders@yahoogroups.com, digital_eyezed [EMAIL PROTECTED] wrote: Thanks, I tried this, but the numericStepper just stops stepping. Any other ideas? CHeers, Iain New Renderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; var listOwner : MovieClip; var getCellIndex : Function; var getDataLabel : Function; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.stepper; } function changeVal(){ val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel(), val); } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: Hi Iain, You need to update the grid's data field in your change handler. Try the following: var listOwner : MovieClip; // the reference we receive to the list var getCellIndex : Function; // the function we receive from the list var getDataLabel : Function; // the function we receive from the list function changeVal() { val = changed.value; listOwner.editField(getCellIndex().itemIndex, getDataLabel(), val); } Relevant links: http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cfm http://weblogs.macromedia.com/pent/archives/2004/12/cell_renderers.cfm http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrenderers\ \ .zip http://weblogs.macromedia.com/pent/archives/flex/solutions/cellrenderer\ \ s.zip (source) --- In flexcoders@yahoogroups.com, digital_eyezed iain.mclean@ wrote: Hi all, I have a problem with a numeric stepper in a cellrenderer of a dataGridColumn. When the cell loses focus, it goes back to the value set initially, so I lose all the changes. Here is the cellrenderer code: mx:HBox horizontalAlign=center width=100% xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ var labelData:Object; var val; function setValue(str:String, item:Object) { if (item == undefined){ visible = false; return; } visible = true; var s = item; labelData = s; val = labelData.levels; } function changeVal(){ val = changed.value; } ]] /mx:Script mx:NumericStepper id=changed value={val} change=changeVal() maximum={labelData.fill}/ /mx:HBox I need the numericStepper to keep the value I change it to in each of the rows I change it. Cheers, Iain
[flexcoders] Re: Flex eye candy and memory consumption
Patrick, Thanks for such a quick response, that was some very good feedback which I appreciate! In regard to the GC, I understand the concept, and know that these decisions were made to increase the performance of Flash Player 9. It's just a bummer that I can leave an app open all night with absolutely no automated or user interation and come back in the morning with the same amount of memory allocated to the firefox.exe process. (Much of it that had been allocated during these effects) In regard to the app I am building, it is an Intranet app that was meant as a web-based replacement for a vb app. It's an app that's meant to run 8 hours a day without being closed and has a lot of transitions between the views and need for modal alert windows. So for me, 10 mb a pop without release is a pretty big hit over the course of the day. At this point the application development has completed and it's been through both SIT and UAT. I really do appreciate you suggestion on extending the effect, that is definitely something I'll try if I run into this again on another project. (This one's out of budget ;-) I'm going to be speaking with Adobe support here in the next day or so to see if they have any tips on how to use the mx.controls.Alert.show() in a modal manner without a significant amount of new memory being allocated and not released. If they bring to light any new information on this topic, then I will make sure to post it to this thread. Thanks again for your feedback! -Jun --- In flexcoders@yahoogroups.com, Patrick Mineault [EMAIL PROTECTED] wrote: From what I understand, what Ted means is that the player asks for such and such amount of memory when it requires some, and may or may not give it back when it doesn't need it anymore. So the worst case scenario is that the memory consumed by the player is the maximum amount of memory since it was loaded (the ceiling). That's the worst case scenario however. In my personal tests in Firefox 2 when the totalMemory goes down the memory consumption in Firefox also goes down a few seconds later. I am talking about an app here which can take a full 100MB of memory in a few seconds then release it in a few more seconds later (lots of BitmapData manipulation and Loaders). I think what Ted means is that you can't expect the garbage collector to collect when you want it to and you can't expect that when the garbage collector is run the memory will go down immediately, although it should eventually based on the player's and the browser's memory allocation heuristics. As for the effects though, I think it's possible that the instance of the effect is still in memory after being used, but I doubt that's the actual cause of the problem, since the effect doesn't really contain all that much stuff in it. It's possible however that once the effect is played it doesn't completely clean up after itself. Things to look out for include filters, cacheAsBitmap set to true, wipe effect masks which linger on, etc. For example, if you use have a tween from a blur filter to set blurX from 4 to 0, you have to make sure after to set filters to an empty array and set cacheAsBitmap to false (filters automatically set cacheAsBitmap to true). You'd really have to look at the source code of the actual effect you're using to see how it works internally and see if it's doing the kind of cleanup you want it to do, and if not, then perhaps you should try to extend the effect to do the garbage collection yourself. Here's my advice however: don't bother doing this unless you're in the final stages of the application development. 10 MBs lingering about is not going to make your app crash. I would expect that at the end your app will have more important memory bottlenecks than this one, like heavy use of Repeaters, too much components initialized, etc. Patrick coderjun a écrit : Hello, I was wondering if anyone has run across memory consumption issues when using some of the eye candy in the Flex framework. Here are a couple of examples of what I am referring to: 1. The translucent overlay on the rest of the app when using Alert.show in modal mode. (vs. using the flag Alert.NONMODAL) 2. Using mx:WipeUp/ and mx:WipeDown/ for the inEffect and outEffect of a component. I've been tracking the effect of using these effects by watching Task Manager|Mem Usage for the firefox.exe process right before and right after these effects run. We're talking 4-10MB of memory consumed each time these effects are run. (I know because I've done the process of tracking with the same code and the effects turned off resulting in 300KB-1.5MB) . My concern is that: 1. I can't programmatically (minus the unsupported tip given to us by gskinner http://www.gskinner .com/blog/ archives/ 2006/08/as3_ resource_ ma_2.html http://www.gskinner.com/blog/archives/2006/08/as3_resource_ma_2.html)
[flexcoders] number to big for AS
hi coders; I made an app that does a lot of matematical functions and handlers a lot numbers, but there is an error when the app multiplies some int. It have to return the number -2147408896 but it returns 2147408896. what int is big for AS3 to handle?
[flexcoders] vertically centering text
Is there any way to vertically center text? Specifically, I have a datagrid column that I want to have the text centered vertically in. mx:DataGridColumn headerText=Name mx:itemRenderer mx:Component mx:Label text={data.fullName}/ /mx:Component /mx:itemRenderer /mx:DataGridColumn Since there is also a image field, the height of each row is a lot higher than the text and I don't like how it looks. I can't find any property that seems to apply. I know there is a verticalCenter property, but it takes an int and seems to be completely undocumented in the Flex help. I've also tried working with styles but I couldn't find anything that would apply. -- Jason
Re: [flexcoders] Re: Cairngorm Newbie Question - Please set me straight
OK Thanks for your help. Steve On 12/6/06, hank williams [EMAIL PROTECTED] wrote: Steve, I dont know much about cold fusion, but as a general architectural strategy I think you are mistaken in thinking that combining CFCs to group together lookups. Programming is all about creating simple functions, then creating more complex functions that use the simpler functions and then more complex functions that use those, etc. I dont know what the information you are trying to display is, but I would generally recommend (without knowing the actual specifics here) that you should, as I initially suggested, do this grouping on the server side. This is the kind of work that servers are suposed to do. There is no reason the simpler functions cant also be accessible to the client or to other objects on the server, but if you have a complicated function that builds on a variety of queries that is almost always done on the server side. Of course as I said, I dont know anything about cold fusion, so the mechanics of exactly how you do what I am talking about in CF is beyond me. But If you are doing a ton of massaging of data in the client, it is a sign that you server side code is not delivering high level enough information. Regards, Hank On 12/6/06, Steve House [EMAIL PROTECTED] wrote: Hank, Thanks for your reply. I am not sure I am explaining this correctly but let me try adding these details and see if this helps. My backend is ColdFusion and I have created Flex remote objects to several CFCs that each correspond to a separate business object (not necessarily one table). For example, I have an employeeGateway.cfc who's methods all pertain to employees (e.g. readEmployeeById(), readEmployeeByUsername(), addEmployeePermission()). From what I understand I have to set up a remote object connection to each CFC that I want to talk to. Although I could create a single CFC to group together lookup table queries I prefer to keep them in their distinct CFCs to allow for future methods related to those objects. Does this clear things up at all or am I still way off? Thanks again for your help! Steve On 12/5/06, hank williams [EMAIL PROTECTED] wrote: Steve, You definitely shoud not have a business delegate for every lookup table. I dont really understand the detail of what you explained in your email, but communications between a client and a server should never be as granular as mapping just directly to a table. Think of communications with a server as asking high level questions like, who are my top spending customers this month. This might require access to several tables. This calculation work should be done on the server and the results should then be delivered from the server to the client. The client should generally not be taking the results of several table searches and intersecting, joining, merging or anything of the sort. That is really server side work. Regards, Hank On 12/5/06, stevehousefl [EMAIL PROTECTED] cyberdust%40gmail.com wrote: Douglas (and all), Since they are not dependent on each other, I went with just having a single command fire 6 new events. I will look into the MacroCommand though. As far as the 6 different datasources, it is not. Perhaps this is incorrect, but I have a business delegate for each lookup table and a service (remote object) for each Coldfusion component that I am talking to. For example: My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5 other events) The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand The ReadAllQueuesCommand creates a QueueDelegate and executes QueueDelegate.readAllQueues() The QueueDelegate creates an instance of the ServiceLocator and executes .getRemoteObject(queueService) The queueService is configures in Services.mxml as mx:RemoteObject id=queueService destination=ColdFusion source=CF.queueHandler showBusyCursor=true result=event.token.resultHandler( event ); fault=event.token.faultHandler( event );/ Does this make sense Thanks, Steve --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi Steve, I'm going to take a stab at this as I've been studying the Command pattern (as defined in GoF) and Cairngorm lately. In fact I'll be presenting on the subject here in Boston tomorrow evening, so this is right up my alley. (www.bfpug.us) :-) how do you handle 6 different results since there is only 1 onResult function. I think that the answer here is you don't. :-) Cairngorm has a SequenceCommand which has: public var nextEvent : CairngormEvent; You can then call its executeNextCommand() from your result() method which launches
RE: [flexcoders] ActionsScript 3 Cookbook Companion Classes: Number Utilities Bug
The Number type can't store the value 3.8 exactly, because as a binary fraction it would require an infinite number of bits. You're getting the Number closest to 3.8. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 2:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ActionsScript 3 Cookbook Companion Classes: Number Utilities Bug Wow, the description says that this number will be rounded up to the next decimal point: trace (NumberUtilities.round(3.75,.1)); .1, being the flag to round up, so the result should be 3.8. It's not it's: 3.8003! I know I'm using this method correctly, any tips or suggestions. Thanks, Patrick