Re: [flexcoders] Image Loading dynamically
Hi Lach/All, Can you please send some sample code for this because I am not able to create slideshow using below approach. It will be really helpful. Thanks Kumar _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: Saturday, December 16, 2006 6:35 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Image Loading dynamically Probably you need to use a bunch of loader objects to pre-load the images. You might approach it something like this: 1. start with your collection of filenames 2. enumerate over them, creating a loader object for each 3. add an event listener to each loader so you know when it is done 4. when you get notification that an image is loaded, increment some tally 5. when the tally equals the length of your original collection, you are good to go Someone else may be able to elucidate the finer points of using loaders and how to then use the loaded content in other controls. Cheers, Lach On 16/12/2006, at 11:30 PM, KP wrote: Thanks Lach for your reply. If you remember once you have replied for slideshow component creating it quickly. Well in that you were putting the urls of images in the array collection.and then you were changing the source of images with the help of timer control. I want to dynamically load all the images directly in the array collection and then directly use get item method to show in the slide show. Can this be done. Kumar
[flexcoders] Re: Load swc instead of swf
Hey Lach, Loading XML files from where? I need to write an help html and im looking at the best way to write it without creating external dependancies. - Saba --- In flexcoders@yahoogroups.com, Lachlan Cotter [EMAIL PROTECTED] wrote: Hi Saba, What's wrong with just loading ordinary XML files? Cheers, Lach On 20/12/2006, at 10:12 PM, ssundke wrote: Ok.. so what do I do for this problem. I need to write some help files for my project and I need my swf to be standalone since it can be used. I didnt want to hardcode the html in one as file or mxml file, so I thought I would make a separate file for it and let it be loaded when it was needed. Since I need my swf to be standalone, I didnt want any dependancy on some other web resource. What are my alternatives? - Saba
[flexcoders] Best Practice when using IViewCursor?
Hi, I'm trying to find the best practice to use with IViewCursor interface and a pair of buttons to walk the collection ( previous and next buttons). I want these buttons to enable/disable through binding but I only found two properties afterLast and beforeFirst that doesn't do what I want since those properties checks if the cursor is outside the bounds of the collection. Anyone could share the best practice for this use case? Thanks in advance. -- ::| Carlos Rovira ::| http://www.carlosrovira.com ::| http://www.madeinflex.com
[flexcoders] Concept of Library.
Hi everyone, Is there any means via which I can have my mxml file act as a template and manipulate data via my class. Similar to the library concept what we have in Flash 8, where we can use the asset in library by attaching it to the main stage and then manipulate data for that asset from a class. Any help in this lines is appreciated. Thnx, Amol.
[flexcoders] How to access components/control properties of custom actionscript components
Hi All, I need to create a dynamic form which has multiple pages each page will be displayed in separate tabs and has individual controls. On submit of a a button i need to trace the data entered in the controls for each Tab. The numer of Tabs and controls will vary depending on criteria (reading from an XML). --- Sample xml data below - Tab tabid=App_Form_01_Tab_02 name=Tab 2 label=Product Information taborder=2 Section sectionid=App_Form_01_Tab_02_Sec_01 name=Contract orderontab=1 Attrtype name=SingleLineofText defval=This is single line text maxchar=35 maxlines=1 inputtype=TextInput attrlabel=Attribute 1/Attrtype Attrtype name=MultipleLinesofText defval=This is multi line text maxchar= maxlines=4 inputtype=TextArea attrlabel=Attribute 2/Attrtype /Section /Tab Tab tabid=App_Form_01_Tab_03 name=Tab 2 label=New Tab taborder=3 Section sectionid=App_Form_01_Tab_02_Sec_01 name=Contract orderontab=1 Attrtype name=SingleLineofText defval=This is single line text maxchar=35 maxlines=1 inputtype=TextInput attrlabel=Attribute 1/Attrtype /Section /Tab I tried developing the above UI by creating custom actionscript components by extending existing UI components such as TabNavigator/VBox and added children at each stage until I reached the actual form control info using which I am creating the controls. So the child creation is following - MyTabnavigator-MySectionTabs(VBox)-MySections(VBox)- MySectionAttributes(HBox)-TextInput I have instantiated the MyTabNavigator comp from the mxml using MyTabNavigator/ tag. This is displaing the dynamic form the way I need but now I have to access the text value entered into the TextInput. I tried to access the TextInput from a method written within a script block in the main application mxml. I am not able to do that. Could anyone please advise me on this. Test Link - http://dev.eforceglobal.com/test/paromita/bin/TestActionscriptComps.ht ml (this also has the sample view source code) Am I doing this the wrong way? Please help. Regards, Paromita.
Re: [flexcoders] Re: Load swc instead of swf
Your original post said you were happy to load an external file, why couldn't it be an xml or html file? Paul - Original Message - From: ssundke [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, December 27, 2006 11:08 AM Subject: [flexcoders] Re: Load swc instead of swf Hey Lach, Loading XML files from where? I need to write an help html and im looking at the best way to write it without creating external dependancies. - Saba --- In flexcoders@yahoogroups.com, Lachlan Cotter [EMAIL PROTECTED] wrote: Hi Saba, What's wrong with just loading ordinary XML files? Cheers, Lach On 20/12/2006, at 10:12 PM, ssundke wrote: Ok.. so what do I do for this problem. I need to write some help files for my project and I need my swf to be standalone since it can be used. I didnt want to hardcode the html in one as file or mxml file, so I thought I would make a separate file for it and let it be loaded when it was needed. Since I need my swf to be standalone, I didnt want any dependancy on some other web resource. What are my alternatives? - Saba -- 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: Ctrl+Enter causes line break in TextInput in IE!
Could you please assist? This problem is very important, I think. :) On 12/22/06, Sergey Kovalyov [EMAIL PROTECTED] wrote: Did anybody face this problem? On 12/19/06, Sergey Kovalyov [EMAIL PROTECTED] wrote: Run this application in Internet Explorer: ?xml version=1.0? mx:Application xmlns:mx= http://www.adobe.com/2006/mxml; width=100% height=100% horizontalAlign=center verticalAlign=middle mx:TextInput / /mx:Application Then set focus on TextInput instance and write something, then click Ctrl+Enter. TextInput acts almost like TextArea. New line is created. Sergey. On 12/18/06, Sergey Kovalyov [EMAIL PROTECTED] wrote: Hi All! Pressing Ctrl+Enter causes line break in TextInput in IE! How to fix this bug without subclassing TextInput? Sergey.
RE: [flexcoders] Tree: Resetting openItems after dataProvider change
Yes, Hank's solutionsis what I would do. Further, when you say ...Flex 2 tree control limits direct access to nodes..., you make me suspect you are making a conceptual mistake. With data-driven controls, you never directly access the controls themselves. Rather, you work with the dataProvider, to which you have full access. So in your case, you would have the unique id on each element(XML object/node) in your XMLListCollection, and you would store the open nodes in some list. I think an associative array(hash table) would be the most efficient. The function to open those nodes would need to be recursive. When your recursive function matches a node in the associative array, you would need to climb back up the tree, parent by parent, opening each node as you go, till you reach an alrady open node. Might be a bit more compilcated than that, since you want to reach the end of a recursion branch before you stop searching. If you post an example of two sample matching xml docs, with the above mentioned ids, I might try to implement this functionality as an example. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hank williams Sent: Sunday, December 24, 2006 7:51 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Tree: Resetting openItems after dataProvider change I think you are on track with the idea of needing an open indices property. But indicices are a bit messy in a tree. what would be best is a set of common unique identifiers. A field in each node that is unique. This will allow you to build a function that creates a list of the ids that are open, and another function that opens those nodes. The nodes will have the same id no matter what language the actual text of the tree item is. gathering the ids from the open items, and opening the items that have a given list of ids should be relatively straight forward. Regards, Hank On 12/23/06, Oliver Merk [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I've been wrestling with this for over a week and haven't found a solution to this problem. Hoping someone can help. I have a tree control that, at runtime, changes its dataProvider. In this case, I'm switching languages and the dataProvider format is XMLListCollection. I'd like to restore the open items of the tree after the dataProvider has changed. I tried using the openItems property, but openItems stores a list of XML objects from the original dataProvider. When the provider changes, the XML objects are of course different, and trying to reset the openItems property fails. What I really need is an openIndices property that is not tied to the XML data in the provider. The example Adobe gives (http://www.adobe.com/devnet/flex/quickstart/working_with_tree/ http://www.adobe.com/devnet/flex/quickstart/working_with_tree/ ) is not helpful since they switch between two dataProviders with the same content and they're using an ArrayCollection (I'm using an XMLListCollection). I've tried walking the tree but since the new Flex 2 tree control limits direct access to nodes, I could not find a way to detect the open indexes of the tree directly. Any ideas? Thanks, Oliver -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links (Yahoo! ID required) mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[flexcoders] Using View States with Form Container
I've created a base state with a Form (we'll call it myForm) containing 3 FormItems each containing a TextInput; I've also created 2 additional view states: State FooA just has a FormItem with a ComboBox and is based on above base state, and is added as the last child of myForm. State FooB has 2 FormItems, one with a ComboBox, and the other with a TextInput and is also based on the above base state, and is also added as the last children of myForm. I change the state depending on the input in the 3rd TextInput in the base state. The states change correctly, and I see the additional form fields, but they do not vertically align with the rest of the fields in the base form. The added fields are always shifted to the right. Thoughts? -riley
Re: [flexcoders] Best Practice when using IViewCursor?
Carlos Rovira wrote: Hi, I'm trying to find the best practice to use with IViewCursor interface and a pair of buttons to walk the collection ( previous and next buttons). I want these buttons to enable/disable through binding but I only found two properties afterLast and beforeFirst that doesn't do what I want since those properties checks if the cursor is outside the bounds of the collection. Anyone could share the best practice for this use case? Thanks in advance. Use this methods to check are you already at the end or at the start of collection to move use moveNext() and movePrevious(). after checking -- Feсi quod potui, faciant meliora potentes
[flexcoders] How to Use the Value of a Checkbox in a Component
Hello, I'm very new to Flex so please excuse my newbie question if it seems a bit dumb...but here is my situation: I have a Flex application - let's call the main application file 'Main.mxml' - I have a component file - let's call it 'MyComp.mxml'. Within the 'MyComp.mxml' file I have an mx:CheckBox id=chkBox1 object. I am calling the MyComp component from the Main.mxml file. The user can check or uncheck this checkbox and then click on a 'Submit' button that is defined in the Main.mxml file, which will then fire off the processing logic. All I want to do in the processing logic is to be able to examine whether the user has checked the chkBox1 checkbox or not, so that I can pass that value from the Main.mxml file to a web service. But when I try to do a simple binding {chkBox1.selected} from within the Main.mxml file, the error I get is '1120: Access of undefined property chkBox1.' Can anyone help?
[flexcoders] Dataprovider for ViewStack and List
Hi all, being pretty knew to Flex, I am currently wondering about the best way to define a single dataprovider for both a list component and a viewstack. On paper, I can see many ways to achieve this, but being a new flex user, I am still pretty unsure about what would be the best/easiest way... If anyone has an idea he/she would like to share about this, I'd be more than happy to hear it :) cheers, J.
[flexcoders] garbage collecting and local variables
Hi everyone, My name is Jorge Maiquez, and this is my first post here. My question relates to the AVM2 garbage collection mechanism. I have asked it elsewhere but have not gotten a response. Here it goes: From the AS3 docs: Objects with registered event listeners are not automatically removed from memory because the garbage collector does not remove objects that still have references. How does this work with local (function) variables to which we attach event listeners? For example, if we have a class with these methods: private function setEvents():void { var _ldr : URLLoader = new URLLoader(); _ldr.addEventListener(Event.COMPLETE, onComplete); } private function onComplete(e:Event):void { // _ldr is referenced by e.target } Is it a bad idea to make _ldr a local variable? Afaik, local variables are marked for garbage collection after the parent method has executed, right? But _ldr is an object with a registered event listener. Does this mean that _ldr will never be garbage collected? So if I call the setEvents method a 1000 times, will I have a 1000 _ldr's kicking around in memory? Thanks in advance! -Jorge
Re: [flexcoders] Tree: Resetting openItems after dataProvider change
Actually, Tracy, I dont think you need to do all of this work. The openItems field of the tree does it for you. So you just need to go through the openItems array of nodes and gather all the item IDs that I described in the prior email. To reopen them later, you just use the an e4x function (I forget the syntax but I can look if necessary) to find all the items in the dataprovider that have the given ID. You then open each one of these nodes. Hank On 12/26/06, Tracy Spratt [EMAIL PROTECTED] wrote: Yes, Hank's solutionsis what I would do. Further, when you say …Flex 2 tree control limits direct access to nodes…, you make me suspect you are making a conceptual mistake. With data-driven controls, you never directly access the controls themselves. Rather, you work with the dataProvider, to which you have full access. So in your case, you would have the unique id on each element(XML object/node) in your XMLListCollection, and you would store the open nodes in some list. I think an associative array(hash table) would be the most efficient. The function to open those nodes would need to be recursive. When your recursive function matches a node in the associative array, you would need to climb back up the tree, parent by parent, opening each node as you go, till you reach an alrady open node. Might be a bit more compilcated than that, since you want to reach the end of a recursion branch before you stop searching. If you post an example of two sample matching xml docs, with the above mentioned ids, I might try to implement this functionality as an example. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *hank williams *Sent:* Sunday, December 24, 2006 7:51 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Tree: Resetting openItems after dataProvider change I think you are on track with the idea of needing an open indices property. But indicices are a bit messy in a tree. what would be best is a set of common unique identifiers. A field in each node that is unique. This will allow you to build a function that creates a list of the ids that are open, and another function that opens those nodes. The nodes will have the same id no matter what language the actual text of the tree item is. gathering the ids from the open items, and opening the items that have a given list of ids should be relatively straight forward. Regards, Hank On 12/23/06, *Oliver Merk* [EMAIL PROTECTED] wrote: I've been wrestling with this for over a week and haven't found a solution to this problem. Hoping someone can help. I have a tree control that, at runtime, changes its dataProvider. In this case, I'm switching languages and the dataProvider format is XMLListCollection. I'd like to restore the open items of the tree after the dataProvider has changed. I tried using the openItems property, but openItems stores a list of XML objects from the original dataProvider. When the provider changes, the XML objects are of course different, and trying to reset the openItems property fails. What I really need is an openIndices property that is not tied to the XML data in the provider. The example Adobe gives (http://www.adobe.com/devnet/flex/quickstart/working_with_tree/) is not helpful since they switch between two dataProviders with the same content and they're using an ArrayCollection (I'm using an XMLListCollection). I've tried walking the tree but since the new Flex 2 tree control limits direct access to nodes, I could not find a way to detect the open indexes of the tree directly. Any ideas? Thanks, Oliver -- 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] Flex 2 vs Laszlo
I know this has been rehashed a few times but I was wondering if anyone has an updated resource showing comparisons? I need to talk someone down from a Laszlo ledge and show the glory of Flex 2. :) Rich
[flexcoders] Where to save Cairngorm.swc?
This may be a simple question, but it there a best place to store the Cairngorm SWC? Currently, I have it residing in my documents folder with all my other Flex projects (the default Flex Builder 2 folder). I simply followed this info for installing Cairngorm: http://www.firemoss.com/blog/index.cfm? mode=entryentry=BB4775B4-3048-55C9-43F43353AEA85A39 go to File - Import. Choose Existing Projects into Workspace. Check the radio button beside Select archive file:, click Browse..., and select the .zip file (probably cairngorm2_1.zip) that you downloaded. Click Finish. However, would it be better to store it in the frameworks/libs folder or something like that? I am still trying to figure out the best practices (if there is one?) to organizing all my flex documents, classes, libraries. If there is any good info on the web about this, please share the URLs.. Thanks, Kevin
Re: [flexcoders] Where to save Cairngorm.swc?
I keep a swcs folder at the same level as my projects so that it can be easily included in multiple project build paths. Rich On 12/27/06, Kevin Merritt [EMAIL PROTECTED] wrote: This may be a simple question, but it there a best place to store the Cairngorm SWC? Currently, I have it residing in my documents folder with all my other Flex projects (the default Flex Builder 2 folder). I simply followed this info for installing Cairngorm: http://www.firemoss.com/blog/index.cfm? mode=entryentry=BB4775B4-3048-55C9-43F43353AEA85A39 go to File - Import. Choose Existing Projects into Workspace. Check the radio button beside Select archive file:, click Browse..., and select the .zip file (probably cairngorm2_1.zip) that you downloaded. Click Finish. However, would it be better to store it in the frameworks/libs folder or something like that? I am still trying to figure out the best practices (if there is one?) to organizing all my flex documents, classes, libraries. If there is any good info on the web about this, please share the URLs.. Thanks, Kevin -- Rich Tretola mx:EverythingFlex/ http://www.EverythingFlex.com
[flexcoders] Cairngorm 'unable to open' Error?
Sounds like other people may have had this problem, but I can't find a solution online... After installing Cairngorm (Flex Builder 2 Mac Pre-release), I am getting this error: unable to open C:\dev\swat\projects\ac_emea\Cairngorm\buildlib Does anyone know what is causing this and how to fix it? thanks, kevin
Re: [flexcoders] Best Practice when using IViewCursor?
Thanks Dmitry, I'm already using those methods. The problem is that I want to use a Button and set a binding in the enabled property something like enabled={myCursor.beforeFirst} But this is useless since I must go outside the collection to make the button enalbed or not. I want the previous button disabled as I reach the first item and the next button disabled as I reach the last item Hope this is more clear. Thanks C. On 12/27/06, Dmitry Kochetov [EMAIL PROTECTED] wrote: Carlos Rovira wrote: Hi, I'm trying to find the best practice to use with IViewCursor interface and a pair of buttons to walk the collection ( previous and next buttons). I want these buttons to enable/disable through binding but I only found two properties afterLast and beforeFirst that doesn't do what I want since those properties checks if the cursor is outside the bounds of the collection. Anyone could share the best practice for this use case? Thanks in advance. Use this methods to check are you already at the end or at the start of collection to move use moveNext() and movePrevious(). after checking -- Feсi quod potui, faciant meliora potentes -- ::| Carlos Rovira ::| http://www.carlosrovira.com ::| http://www.madeinflex.com
Re: [flexcoders] Re: Populating a combobox with XML
The point is the when I use a label sub-node it DOES work. From what I read on the internet I shouldn't have to have a sub-node, hence the point of my email. Oh, and I also do have 'labelField=label' even though that is the Flex default and not required unless you want to change the name of the label field. Collin On 12/26/06, Tim Hoff [EMAIL PROTECTED] wrote: Hi Collin, Your problem may be that you have an attribute and a node both named label. Not sure if this will help, but I don't see the labelField property set for your comboBox. mx:ComboBox id=types width=200 dataProvider={config_xml.types.type} labelField=label/ If that doesn't work, maybe try using a different name for the extra node. -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Collin Peters [EMAIL PROTECTED] wrote: I have a problem populating a combobox from XML using data binding. The XML is as follows: types type event_type_id=1 label=General / type event_type_id=2 label=Tanning / type event_type_id=3 label=Tennis labelbar/label /type /types The third type is different cause it is a point in my problem. My combobox is: mx:ComboBox id=types width=200 dataProvider={config_xml.types.type} / Every sample I have found tell me that this should work with the attributes from XML. However, the entries in the combobox are showing up blank, though there are three entries. If I put in a label child then it does show up. I'm wondering what piece I am missing in order to properly use the attributes from the XML to populate the combobox -- Collin Peters Lead Software Developer -- Collin Peters Lead Software Developer
[flexcoders] Customisation of busy cursor
Hi All, I want to customise busy cursor. is there any way to customise it? how can I put my own animation instead of clock animation? or is there other animations available to change that cursor? Please help me thanks. Sanjay
RE: [flexcoders] How to Use the Value of a Checkbox in a Component
There are several ways to do this. The simplest to code is to directly access your control by dottting down through the component dom. If your component is directly referenced by id in the main app you can do: myCompId.chkBox1.selected. This might not be the best term solution, though, depending on how many such references you will have and how flexible and reusable you want your component to be. The most loosely coupled design would be to have your component dispatch a custom event when a control is interacted with, and listen for that event in the parent. Extending the Event object will let you include any data you want in the event, such as the states and values of the controls. Between those extremes are other options, such as passing references to the main app into the component, which can then update a data structure(like an array or associative array) in the main app. As I said there are lots of options. Its ok to take the simple code path to start with. Just keep in mind longer term best practices. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lisa Lee Sent: Tuesday, December 26, 2006 7:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to Use the Value of a Checkbox in a Component Hello, I'm very new to Flex so please excuse my newbie question if it seems a bit dumb...but here is my situation: I have a Flex application - let's call the main application file 'Main.mxml' - I have a component file - let's call it 'MyComp.mxml'. Within the 'MyComp.mxml' file I have an mx:CheckBox id=chkBox1 object. I am calling the MyComp component from the Main.mxml file. The user can check or uncheck this checkbox and then click on a 'Submit' button that is defined in the Main.mxml file, which will then fire off the processing logic. All I want to do in the processing logic is to be able to examine whether the user has checked the chkBox1 checkbox or not, so that I can pass that value from the Main.mxml file to a web service. But when I try to do a simple binding {chkBox1.selected} from within the Main.mxml file, the error I get is '1120: Access of undefined property chkBox1.' Can anyone help?
[flexcoders] Combo state???
Hi All, Is there anyway to get the current (open/closed) state of a combo box? Senario: in my application, the screen gets refresh automatically after a specific period, lets say 30 seconds. if i open my dropdown list and screen refreshes at that point of time, it closes the dropdown. What is to be done, it should not call resfreshScreen function while dropdown is open. How can i check that particular state of combo box? Pls help me Thanks in advance Sanjay
RE: [flexcoders] Re: Populating a combobox with XML
Try @label, since the values are in attributes. I think using a sub-node makes that sub-node a top-level property so is accessible using label. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Collin Peters Sent: Wednesday, December 27, 2006 12:41 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Populating a combobox with XML The point is the when I use a label sub-node it DOES work. From what I read on the internet I shouldn't have to have a sub-node, hence the point of my email. Oh, and I also do have 'labelField=label' even though that is the Flex default and not required unless you want to change the name of the label field. Collin On 12/26/06, Tim Hoff [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Collin, Your problem may be that you have an attribute and a node both named label. Not sure if this will help, but I don't see the labelField property set for your comboBox. mx:ComboBox id=types width=200 dataProvider={config_xml.types.type} labelField=label/ If that doesn't work, maybe try using a different name for the extra node. -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Collin Peters [EMAIL PROTECTED] wrote: I have a problem populating a combobox from XML using data binding. The XML is as follows: types type event_type_id=1 label=General / type event_type_id=2 label=Tanning / type event_type_id=3 label=Tennis labelbar/label /type /types The third type is different cause it is a point in my problem. My combobox is: mx:ComboBox id=types width=200 dataProvider={config_xml.types.type} / Every sample I have found tell me that this should work with the attributes from XML. However, the entries in the combobox are showing up blank, though there are three entries. If I put in a label child then it does show up. I'm wondering what piece I am missing in order to properly use the attributes from the XML to populate the combobox -- Collin Peters Lead Software Developer -- Collin Peters Lead Software Developer
[flexcoders] Canvas Label?
Hi All, There is an attribute called Label in Canvas tag, can anyone tell me whts the use of this attribute? Is there any way to show this label in the middle of top border of canvas as label is shown in VB n JAva's canvas? If there is a way to make the canvas or anyother component like VB or java's canvas, pls let me know... Thanks Sanjay
Re: [flexcoders] Canvas Label?
This property is inherited from Container. Here's excerpt from documentation: The text displayed by some navigator containers to represent this Container. For example, if this Container is a child of a TabNavigator, this string appears in the corresponding tab. If this Container is a child of an Accordion, this string appears in the corresponding header. And friendly advise: don't hesitate to use documentation or, up to date, LiveDocs: http://livedocs.macromedia.com/flex/2/langref/index.html R. On 12/27/06, sanjaypmg [EMAIL PROTECTED] wrote: Hi All, There is an attribute called Label in Canvas tag, can anyone tell me whts the use of this attribute? Is there any way to show this label in the middle of top border of canvas as label is shown in VB n JAva's canvas? If there is a way to make the canvas or anyother component like VB or java's canvas, pls let me know... Thanks Sanjay
[flexcoders] Re:TileList - forcing the item renderer to refresh
Solved the problem. There is nothing special going on. All I had to do was to use the dataChange method to update the items variables (which were bound to the items in the custom component). Happy Holidays! -bill
Re: [flexcoders] Re: Populating a combobox with XML
That's it!!! Awesome. Thanks Tracy. private var foo:XML = types typex event_type_id=1 label=General value=foo/ typex event_type_id=2 label=Tanning value=foo/ typex event_type_id=3 label=Tennis value=foo/ /types mx:ComboBox id=types width=200 labelField=@label dataProvider={foo.typex} / On 12/27/06, Tracy Spratt [EMAIL PROTECTED] wrote: Try @label, since the values are in attributes. I think using a sub-node makes that sub-node a top-level property so is accessible using label. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Collin Peters *Sent:* Wednesday, December 27, 2006 12:41 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: Populating a combobox with XML The point is the when I use a label sub-node it DOES work. From what I read on the internet I shouldn't have to have a sub-node, hence the point of my email. Oh, and I also do have 'labelField=label' even though that is the Flex default and not required unless you want to change the name of the label field. Collin On 12/26/06, *Tim Hoff* [EMAIL PROTECTED] wrote: Hi Collin, Your problem may be that you have an attribute and a node both named label. Not sure if this will help, but I don't see the labelField property set for your comboBox. mx:ComboBox id=types width=200 dataProvider={config_xml.types.type} labelField=label/ If that doesn't work, maybe try using a different name for the extra node. -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Collin Peters [EMAIL PROTECTED] wrote: I have a problem populating a combobox from XML using data binding. The XML is as follows: types type event_type_id=1 label=General / type event_type_id=2 label=Tanning / type event_type_id=3 label=Tennis labelbar/label /type /types The third type is different cause it is a point in my problem. My combobox is: mx:ComboBox id=types width=200 dataProvider={config_xml.types.type} / Every sample I have found tell me that this should work with the attributes from XML. However, the entries in the combobox are showing up blank, though there are three entries. If I put in a label child then it does show up. I'm wondering what piece I am missing in order to properly use the attributes from the XML to populate the combobox -- Collin Peters Lead Software Developer -- Collin Peters Lead Software Developer -- Collin Peters Lead Software Developer
[flexcoders] Help with custom button?
Hi folks, I am trying to create a custom button in AS3 using the Flex 2 SDK. It is pretty simple; I just want it to be a wedge shape that I can rotate to point in an arbitrary direction. My code is attached below, but I'm stuck on two issues: 1. Making it behave as regular buttons do in terms of mouse-over and mouse-down behavior (i.e. draw it differently in these cases). 2. Currently, when I rotate it, e.g.: Arrow_Button height=12 width=12 rotation=45 click=Alert.show('hello');/ it rotates around its 0,0 point (which is the upper left corner), causing it to swing out of the area where Flash thinks it is, messing up the layout. I've been wandering through the docs and Google all afternoon, but I haven't figured these things out. Any help or pointers to appropriate documentation would be very much appreciated. TIA, Reid // This class defines a button which looks like an arrow. It points up // and relies on the rotation property to be pointed in the right // direction. package { import flash.display.Graphics; import mx.core.UIComponent; public class Arrow_Button extends UIComponent { override protected function updateDisplayList(wd:Number, ht:Number) :void { var gr:Graphics = this.graphics; gr.clear(); gr.lineStyle(1); gr.beginFill(0xff8800); gr.moveTo(0, ht); gr.lineTo(wd, ht); gr.lineTo(wd/2, 0); gr.lineTo(0, ht); } } }
[flexcoders] Determining VDividedBox heights
I'm trying to remember the height at which someone sets a vertically divided section. I am using a VDividedBox and have set a listener to the dividerRelease event. When I get in there I can trace out the height of the top component within the VDividedBox but it gives me the pre-resized value. I am assuming that the drop event happens before the redraw. Okay, not a shock. But what is confusing is that the VDividedBox object itself doesn't seem to have any getters nor properties for the size of the two boxes it is in control of. Am I missing something? I believe I can use the delta property on the event that is thrown and add that to the pre-resized value of the top box. I'm thinking that is a workaround, but am I missing something? Thanks
[flexcoders] Flex Accessing HTTP Session
I was curious if there was any way that flex could access a HTTP Session. I have not seen any type of tutorial/doc posted that might work other than a very small note in the help section of flex's installed doc's. At this point my only solution is to use flash vars to capture the session ID, then I'm going to write a Web Service that will take that Session ID and return all the variables I need. I was hoping that there might be an ez'er way cutting out the Web Service. Thanks, Ryan
[flexcoders] Vertical label on a Button
Hi, I am trying to add a button to my application with vertical label. Does anyone know how can it be done ? I've tried adding rotate='90' to the button but then the whole button is being rotated and the label disappears. Adding Label or Text element also does not produce what I need, the value of those is not being shown at all. Thanks in advance. Regards, Dima Gutzeit.
[flexcoders] problem importing projects into workspace
I am trying to import some sample projects from the web to understand Flex application design better and I am running into problems loading them into my workspace. Could someone provide me with a step-by-step example of to how to import these into my flex builder workspace. Here is one of the projects I would like to import: http://dev.jessewarden.com/flex/webserviceexample/srcview/ WebService_Cairngorm2_Example.zip Here are the steps I am taking... 1) download file from web 2) unzip file in my documents folder 3) open Flex - File - Import - General (Folder) - Existing Projects Into Workspace 4) Select Root Directory - Browse - (I select the unzipped folder) ...NOTHING Normally when I do this (with my own projects), a list of available projects appears, however with numerous sample projects that I download, no project appears in the window. I don't think it is the projects themselves that are bad as they are projects that are well referred to online. (Including the Cairngorm Store). Where and I going wrong? Thanks, Kevin
[flexcoders] XML oddities
Can someone please explain the following: var foo:XML = root node attrib1=one / node attrib1=two subnodefoo/subnode /node node attrib1=threevalue/node /root; for each(var x:XML in foo.node) trace(- + x); Which outputs: - - node attrib1=two subnodefoo/subnode /node - value So for a node that is only attributes with no child nodes it outputs nothing. For a node with a child node it outputs the entire XML. And for a node with a straight value it only outputs the value. I would have expected it to print out the full node XML including attributes and everything. The way I see it right now there is loss of data. How can I do the above and print out the full XML of each node? If I do a trace(- + [EMAIL PROTECTED]) it actually does print out the value of attrib1 for each node. I am just confused why printing out the entire xml value does not show it. -- Collin Peters Lead Software Developer
Re: [flexcoders] Flex Accessing HTTP Session
No, HTTP sessions are stored on the server-side, so you can't access them from just the client side. The only thing you CAN access on the client side is cookies, which may contain the session id, but the actual data is stored on the server-side, indexed by that key. Patrick 2006/12/27, Ryan [EMAIL PROTECTED]: I was curious if there was any way that flex could access a HTTP Session. I have not seen any type of tutorial/doc posted that might work other than a very small note in the help section of flex's installed doc's. At this point my only solution is to use flash vars to capture the session ID, then I'm going to write a Web Service that will take that Session ID and return all the variables I need. I was hoping that there might be an ez'er way cutting out the Web Service. Thanks, Ryan
[flexcoders] Loading Flash 8 swfs into Flex 2 -- Running into _root issues
Hello all, I am creating a portfolio application using Flex 2. In the app, I am loading a number of swfs into the portfolio using a SWFLoader. These swfs were created using Flash 4 through Flash 8 over a number of years. In a few of the swfs, the author has, clearly, made reference to the _root variable from within Flash. When I load the swf files and run them, these calls to _root are causing some serious issues at the Flex Root level. When _root.play() is called from the loaded swf, for example, it causes the entire flex app to choke (and, subsequently, does not trigger the play at the Flash level). Can anyone help me understand how I can force the swf-loader to lock the root of the contained swf? I've been all over the docs and nothing is jumping out at me -- all of the roots on the swf-loader, stage and application are read-only. All of the loader and loader-info variables are read-only as well. I *DO NOT* have access to the Flash source files, so simply adding _lockroot=true to the swf source files is not an option. Any help would be greatly appreciated!
RE: [flexcoders] XML oddities
trace uses toString() to print the XML node. toString() gives unexpected results like you see, with non-complex elements. The best solution is to always us toXMLString() to print out xml. trace(- + x.toXMLString()); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Collin Peters Sent: Wednesday, December 27, 2006 2:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] XML oddities Can someone please explain the following: var foo:XML = root node attrib1=one / node attrib1=two subnodefoo/subnode /node node attrib1=threevalue/node /root; for each(var x:XML in foo.node) trace(- + x); Which outputs: - - node attrib1=two subnodefoo/subnode /node - value So for a node that is only attributes with no child nodes it outputs nothing. For a node with a child node it outputs the entire XML. And for a node with a straight value it only outputs the value. I would have expected it to print out the full node XML including attributes and everything. The way I see it right now there is loss of data. How can I do the above and print out the full XML of each node? If I do a trace(- + [EMAIL PROTECTED]) it actually does print out the value of attrib1 for each node. I am just confused why printing out the entire xml value does not show it. -- Collin Peters Lead Software Developer
RE: [flexcoders] Flex Accessing HTTP Session
Why not pass everything you need into Flex when you deliver the swf? If you do decide to make a call to the server, consider HTTPService over WebService. Returning xml over HTTP is much simple than using SOAP. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Mineault Sent: Wednesday, December 27, 2006 2:46 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex Accessing HTTP Session No, HTTP sessions are stored on the server-side, so you can't access them from just the client side. The only thing you CAN access on the client side is cookies, which may contain the session id, but the actual data is stored on the server-side, indexed by that key. Patrick 2006/12/27, Ryan [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : I was curious if there was any way that flex could access a HTTP Session. I have not seen any type of tutorial/doc posted that might work other than a very small note in the help section of flex's installed doc's. At this point my only solution is to use flash vars to capture the session ID, then I'm going to write a Web Service that will take that Session ID and return all the variables I need. I was hoping that there might be an ez'er way cutting out the Web Service. Thanks, Ryan
[flexcoders] headerRenderer with combobox - problem with events
Hello, I have a custom headerRenderer with a combo box, the combo box loads data by week, day or month into my datagrid. Unfortunately, clicking on an item in the box automatically loads items into the dataGrid which was last selected, how do I prevent this from happening? Why does clicking on a combobox in my header renderer dispatch events to the datagrid? Any ideas on how to help me? Thanks, Patrick
[flexcoders] What's the best approach here (Associative arrays, dynamic classes, etc...)?
Hi all, Here's what I am trying to do. I have an object that I get from the server (currently via XmlRpc but that doesn't really matter). It's an Object. I want to convert it into a data structure on the client side for easier manipulation. If I do something liek class Foo { var prop1:String; ... } then I could use code completion to refer to properties of an instance of Foo. (I am lazy, and sometimes it's hard to remember what properties are called). But on the downside, in order to marshal/unmarshal this object into the raw object, I need to know these properties. On the other hand if I make Foo dynamic, and make the property names into constants, I could use code completion in a bit more unwieldy way: foo[Foo.prop1] = 'xxx' and can also iterate through all these properties which is very convenient for this marshaling/unmarshaling business. Is there something that would let me combine the best of both worlds?
Re: [flexcoders] Determining VDividedBox heights
If you want to get the height of children of any container including boxes, you are going to need to look at the size of the children themselves. So if you want the top box in your example, it would be vbox.getChildAt(0).height. However, I do believe that on dividerRelease the child would not have been resized yet (i think it will be resized during vbox.updateDisplayList()). You could try looking for other events to listen to on either the box or the children, but my guess is that the way you're doing it is the best you are going to find. On 12/27/06, Matt Maher [EMAIL PROTECTED] wrote: I'm trying to remember the height at which someone sets a vertically divided section. I am using a VDividedBox and have set a listener to the dividerRelease event. When I get in there I can trace out the height of the top component within the VDividedBox but it gives me the pre-resized value. I am assuming that the drop event happens before the redraw. Okay, not a shock. But what is confusing is that the VDividedBox object itself doesn't seem to have any getters nor properties for the size of the two boxes it is in control of. Am I missing something? I believe I can use the delta property on the event that is thrown and add that to the pre-resized value of the top box. I'm thinking that is a workaround, but am I missing something? Thanks
[flexcoders] stuck with itemEditBeginning event
I'm trying to use the itemEditBeginning event on a datagrid to only allow a column to be editable if the person clicks on it, if they tab to it I need to kick them out of the column. I can't figure out how I can get access to the keycode since the itemEditBeginning event is a DataGridEvent and the keycode property is attached to a KeyBoardEvent. Anyone have any ideas? My other thought was to disable the column by default and attach a click event to the grid that looks to see if that column was clicked and then change it to editable=true. But I'm struggling to get access to the editable property in my function through the MouseEvent. Thanks, Ben
[flexcoders] Re: Customisation of busy cursor
sanjay- i just put together a site dedicated to skinning flex apps. check it out at http://www.scalenine.com and check out the resources page for answers to your question. so far the site offerings are pretty limited (there's a theme i created called obsidian and 2 others i found online), but i have other themes in the works (graphical and some pure css). hope that helps. juan --- In flexcoders@yahoogroups.com, sanjaypmg [EMAIL PROTECTED] wrote: Hi All, I want to customise busy cursor. is there any way to customise it? how can I put my own animation instead of clock animation? or is there other animations available to change that cursor? Please help me thanks. Sanjay
[flexcoders] MVC Concepts in Flex 2
I am reading the book, Advanced Actionscript 3 with Design Patterns, and must confess that I've never truly followed proper OOD/OOP in writing my Flash 8 web apps. But, now that I'm doing my first Flex 2 web app, I figured I really should do this the right way by implementing a proper MVC design. Separating out the model portion was no problem. I'm properly programming to Interfaces, defining abstract classes to be inherited by the concrete classes, etc. It's completely unaware of the view and controller. So, this part is fine. The question I have, which really isn't addressed in the above- mentioned book, is how to properly design the controller and view when you're not completely creating the view via ActionScript. I mean, it's easy to see how the distinctions when you do as they do in the book and extend the Sprite class and draw the entire view yourself. But, what about when the bulk of your view is defined in an mxml document? If anyone has a good sample flex 2 project they would be willing to share where I could see how you did it, that would be great. Ron
Re: [flexcoders] How to force built-in focus manager to auto scroll containers to the focused component?
Hi to Matt and all flexcoders! I have implemented AutoScrollManager class that do this job: http://skovalyov.blogspot.com/2006/12/probably-one-of-most-annoying-thing.html I consider this solution could be changed a bit and added to the native Container class in future Flex releases or updates. :) Sergey. On 11/13/06, Matt Chotin [EMAIL PROTECTED] wrote: Capture the focusIn event on your components (it might be a bubbling event in which case you could have the listener on your parent container). In the handler check the y position of the component and then check the verticalScrollPosition + height of the container to see if the y is within that range. If not, adjust verticalScrollPosition. Matt .
[flexcoders] Problems when using the FlexSessionListener interface to detect when client drop
I'm working on a client/server app where we implement the FlexSessionListener interface to detect when a user closes the browser window so that we can clean up the data on the server. I have found some shortcomings with this approach, but the biggest one seems to be that the sessionDestroy event occasionally fire even when the client doesn't close the browser. It seems to occur when the client is inactive for a certain amount of time, but there is no consistency in this. Can anyone suggest another way to detect when users close their browser? Or perhaps discuss instances when they have observed similar behavior with the FlexSessionListener? Thanks
[flexcoders] Re: MVC Concepts in Flex 2
Ron, when creating your views, you can use MXML with no problem. Take a look at the Cairngorm framework at Adobe Labs (http://labs.adobe.com/wiki/index.php/Cairngorm). They routinely use mxml to create their views and attach ActionScript view helpers to their mxml files. Common uses of this include doing all of the visual layout in the view while having the real code working in the helper. So, for example, the button click would call the buttonClick method in the viewHelper. Hope that helps. --- In flexcoders@yahoogroups.com, rd_grimes [EMAIL PROTECTED] wrote: I am reading the book, Advanced Actionscript 3 with Design Patterns, and must confess that I've never truly followed proper OOD/OOP in writing my Flash 8 web apps. But, now that I'm doing my first Flex 2 web app, I figured I really should do this the right way by implementing a proper MVC design. Separating out the model portion was no problem. I'm properly programming to Interfaces, defining abstract classes to be inherited by the concrete classes, etc. It's completely unaware of the view and controller. So, this part is fine. The question I have, which really isn't addressed in the above- mentioned book, is how to properly design the controller and view when you're not completely creating the view via ActionScript. I mean, it's easy to see how the distinctions when you do as they do in the book and extend the Sprite class and draw the entire view yourself. But, what about when the bulk of your view is defined in an mxml document? If anyone has a good sample flex 2 project they would be willing to share where I could see how you did it, that would be great. Ron
[flexcoders] Setting UIComponent.errorString creates a black border around the component
I've been using the errorString property of UIComponent to remove errors associated with TextInput fields, but it seems to put a black border around the field instead of just removing the red error border and error string. Thoughts? -riley
RE: [flexcoders] Flex Accessing HTTP Session
If your question is when flex calls a java class and within the java class how do I access the associated session, then the code is below and it is in the documentation. The FlexSession class is located in the flex-messaging.jar. FlexSession session = FlexContext.getFlexSession(); But whats the real question behind your question? what do you want to load? Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Sent: Wednesday, December 27, 2006 2:28 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Accessing HTTP Session I was curious if there was any way that flex could access a HTTP Session. I have not seen any type of tutorial/doc posted that might work other than a very small note in the help section of flex's installed doc's. At this point my only solution is to use flash vars to capture the session ID, then I'm going to write a Web Service that will take that Session ID and return all the variables I need. I was hoping that there might be an ez'er way cutting out the Web Service. Thanks, Ryan -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] setTimeout in flex 2.0
I'm confused on how to use setTimeout i have a function that i need to wait 500 milliseconds to call... var aVars:Array = [lat, lng, zoom]; trace(aVars); //39,-105,6 var my_timedFunction:uint = setTimeout(manipulateMap,500,aVars); public function manipulateMap(lat:Number,lng:Number,zoom:Number):void{ u = new URLRequest(javascript:map.setCenter(new GLatLng( + lat + ',' + lng + '),' + zoom +)); navigateToURL(u,_self); } this makes everything come to a screeching hault, and it tells me i have an invalid number of arguments, it wants 3 arguments but says only one is passed anyone have an example of passing arguments with setTimeout? ps... everything works fine if i'm not using setTimeout IE... manipulateMap(lat,lng,zoom); that works... so i know that my failure is definitely in the way i'm trying to call setTimeout the whole reason for doing this is because i'm calling things so fast, that google maps isn't responding, so this is a workaround i've trying to do it with javascript, but the concatenation gets too crazy, and it takes 45 minutes to add arguments because of the troubleshooting with javascript, so i'm trying to use the setTimeout in flex rather that the javascript one Any help would be great
Re: [flexcoders] MVC Concepts in Flex 2
Ron, Two suggestions on samples of MVC with Flex 2: 1) http://cairngormdocs.org/ This link has several levels of downloadable Example Apps 2) http://www.adobe.com/devnet/flex/articles/blueprint.html In the article at this link Joe Berkovitz gives a fantastically concise walkthrough of MVC in Flex along with downloadable source files for a sample app. It is not Cairngorm, but still well worth the read. For a detailed explanation of how Cairngorm handles the view, you can start with this 3rd of a 6 part series by Steven Webster: http://www.adobe.com/devnet/flex/articles/cairngorm_pt3.html I also recently purchased AAS3DP. After you work through all of these issues, I certainly would appreciate your posting back with commentary on which of these sources you find best explains the why's and how-to's? hth, g On 12/27/06, rd_grimes [EMAIL PROTECTED] wrote: I am reading the book, Advanced Actionscript 3 with Design Patterns, and must confess that I've never truly followed proper OOD/OOP in writing my Flash 8 web apps. But, now that I'm doing my first Flex 2 web app, I figured I really should do this the right way by implementing a proper MVC design. Separating out the model portion was no problem. I'm properly programming to Interfaces, defining abstract classes to be inherited by the concrete classes, etc. It's completely unaware of the view and controller. So, this part is fine. The question I have, which really isn't addressed in the above- mentioned book, is how to properly design the controller and view when you're not completely creating the view via ActionScript. I mean, it's easy to see how the distinctions when you do as they do in the book and extend the Sprite class and draw the entire view yourself. But, what about when the bulk of your view is defined in an mxml document? If anyone has a good sample flex 2 project they would be willing to share where I could see how you did it, that would be great. Ron
RE: [flexcoders] problem importing projects into workspace
I'm no eclipse expert, but the file u download doesn't have the special eclipse project config files within it (like .project, etc...) So create a flex project, specify a source folder and put the files in there, it should work. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Merritt Sent: Wednesday, December 27, 2006 2:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] problem importing projects into workspace I am trying to import some sample projects from the web to understand Flex application design better and I am running into problems loading them into my workspace. Could someone provide me with a step-by-step example of to how to import these into my flex builder workspace. Here is one of the projects I would like to import: http://dev.jessewarden.com/flex/webserviceexample/srcview/ http://dev.jessewarden.com/flex/webserviceexample/srcview/ WebService_Cairngorm2_Example.zip Here are the steps I am taking... 1) download file from web 2) unzip file in my documents folder 3) open Flex - File - Import - General (Folder) - Existing Projects Into Workspace 4) Select Root Directory - Browse - (I select the unzipped folder) ...NOTHING Normally when I do this (with my own projects), a list of available projects appears, however with numerous sample projects that I download, no project appears in the window. I don't think it is the projects themselves that are bad as they are projects that are well referred to online. (Including the Cairngorm Store). Where and I going wrong? Thanks, Kevin -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
Re: [flexcoders] What's the best approach here (Associative arrays, dynamic classes, etc...)?
check out darron shall's object serializer, it should do the trick On 28/12/2006, at 7:52 AM, chuvakgu wrote: Hi all, Here's what I am trying to do. I have an object that I get from the server (currently via XmlRpc but that doesn't really matter). It's an Object. I want to convert it into a data structure on the client side for easier manipulation. If I do something liek class Foo { var prop1:String; ... } then I could use code completion to refer to properties of an instance of Foo. (I am lazy, and sometimes it's hard to remember what properties are called). But on the downside, in order to marshal/unmarshal this object into the raw object, I need to know these properties. On the other hand if I make Foo dynamic, and make the property names into constants, I could use code completion in a bit more unwieldy way: foo[Foo.prop1] = 'xxx' and can also iterate through all these properties which is very convenient for this marshaling/unmarshaling business. Is there something that would let me combine the best of both worlds?
Re: [flexcoders] Where to save Cairngorm.swc?
I've got it in /libs/swc/ On 28/12/2006, at 2:29 AM, Rich Tretola wrote: I keep a swcs folder at the same level as my projects so that it can be easily included in multiple project build paths. Rich On 12/27/06, Kevin Merritt [EMAIL PROTECTED] wrote: This may be a simple question, but it there a best place to store the Cairngorm SWC? Currently, I have it residing in my documents folder with all my other Flex projects (the default Flex Builder 2 folder). I simply followed this info for installing Cairngorm: http://www.firemoss.com/blog/index.cfm? mode=entryentry=BB4775B4-3048-55C9-43F43353AEA85A39 go to File - Import. Choose Existing Projects into Workspace. Check the radio button beside Select archive file:, click Browse..., and select the .zip file (probably cairngorm2_1.zip) that you downloaded. Click Finish. However, would it be better to store it in the frameworks/libs folder or something like that? I am still trying to figure out the best practices (if there is one?) to organizing all my flex documents, classes, libraries. If there is any good info on the web about this, please share the URLs.. Thanks, Kevin -- Rich Tretola mx:EverythingFlex/ http://www.EverythingFlex.com
[flexcoders] Re: MVC Concepts in Flex 2
Thanks to both of you for the references. I'm printing them out to read now. Ron --- In flexcoders@yahoogroups.com, greg h [EMAIL PROTECTED] wrote: Ron, Two suggestions on samples of MVC with Flex 2: 1) http://cairngormdocs.org/ This link has several levels of downloadable Example Apps 2) http://www.adobe.com/devnet/flex/articles/blueprint.html In the article at this link Joe Berkovitz gives a fantastically concise walkthrough of MVC in Flex along with downloadable source files for a sample app. It is not Cairngorm, but still well worth the read. For a detailed explanation of how Cairngorm handles the view, you can start with this 3rd of a 6 part series by Steven Webster: http://www.adobe.com/devnet/flex/articles/cairngorm_pt3.html I also recently purchased AAS3DP. After you work through all of these issues, I certainly would appreciate your posting back with commentary on which of these sources you find best explains the why's and how- to's? hth, g
RE: [flexcoders] setTimeout in flex 2.0
The docs advise using Timer instead. If you are trying to use this to wait for the result of an external data call, you are making a mistake. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jensen.axel Sent: Wednesday, December 27, 2006 5:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] setTimeout in flex 2.0 I'm confused on how to use setTimeout i have a function that i need to wait 500 milliseconds to call... var aVars:Array = [lat, lng, zoom]; trace(aVars); //39,-105,6 var my_timedFunction:uint = setTimeout(manipulateMap,500,aVars); public function manipulateMap(lat:Number,lng:Number,zoom:Number):void{ u = new URLRequest(javascript:map.setCenter(new GLatLng( + lat + ',' + lng + '),' + zoom +)); navigateToURL(u,_self); } this makes everything come to a screeching hault, and it tells me i have an invalid number of arguments, it wants 3 arguments but says only one is passed anyone have an example of passing arguments with setTimeout? ps... everything works fine if i'm not using setTimeout IE... manipulateMap(lat,lng,zoom); that works... so i know that my failure is definitely in the way i'm trying to call setTimeout the whole reason for doing this is because i'm calling things so fast, that google maps isn't responding, so this is a workaround i've trying to do it with javascript, but the concatenation gets too crazy, and it takes 45 minutes to add arguments because of the troubleshooting with javascript, so i'm trying to use the setTimeout in flex rather that the javascript one Any help would be great
[flexcoders] Re: Flex 2 vs Laszlo
Anyone have any links to share? Rich On 12/27/06, Rich Tretola [EMAIL PROTECTED] wrote: I know this has been rehashed a few times but I was wondering if anyone has an updated resource showing comparisons? I need to talk someone down from a Laszlo ledge and show the glory of Flex 2. :) Rich -- Rich Tretola mx:EverythingFlex/ http://www.EverythingFlex.com
[flexcoders] Re: Problems with dynamic column series showDataEffect
The reason you don't see the effects trigger is because you're adding elements to the chart, you're not changing the underlying data for the chart. You might want to try going through first and setting up the columns like you have but pointing yField to a dummy column, say intervalN. This will create the columns and set the effects. Then after that, you would loop through again and change just the yField property to point to the right column. This will cause the showDataEffect to trigger and you should see your animation. Vic http://viconflex.blogspot.com
[flexcoders] Re: Problems with dynamic column series showDataEffect
I played around with this some more. The fix was pretty easy.. just add one line resultchart.hideData(). At least this worked for me. public function appendInterval(column:String):void { resultchart.hideData(); var series:ColumnSeries = new ColumnSeries() ; series.xField = 'label' ; series.yField = column ; series.setStyle(showDataEffect, slideIn); series.setStyle(hideDataEffect, slideOut); var currentSeries:Array = resultchart.series; currentSeries.push(series) ; resultchart.series = currentSeries ; }
Re: [flexcoders] Re: SEO Compatibility
What you have described is basic deep linking, but does not solve the problem I have been attempting to articulate. Regardless of what goes on on the server, if you enter some path info after the .com part of the url, the server thinks it is getting its data from that location (foo.com/bar/ for example). The problem occurs after the initial page is loaded in whatever app you are running on the client. Let's say for example that you want to move the user from foo.com/bar/ to foo.com/foo - there is no way to update the browser without causing the full page to reload. This is why we rely on the hash portion of the url. That part does not cause the page to reload, since it is generally meant to refer to a named anchor with in the html. This fact makes the current method of deep linking and history manipulation a huge hack BTW - which IMO means that the browser vendors aught to figure out some kind of extension to make history management and deep linking more robust for client runtimes (a simple javascript API would work - maybe something plugins could interact with directly also). We could just move them in the app, and update the url client side, but we'd end up with foo.com/bar/#foo which is just terrible (though again, its not the end of the world - I guess). Thanks! Kevin N. dorkie dork from dorktown wrote: First, this structure already works for these content management / blog sites. They have a single index page that shows content based on the url. There is only one file. So we know it works. #1 - yes. i am thinking at its most basic level, on that single catch all index page, we have a function that gets called when the page loads. that function is passed the broken down url information, ie, a object similar to the location object (contains the pathname, protocol, etc - or we define a set of global variables). these are set when the mod rewrite or referrer. i'd have to check how they do it. back to the function - then your function can parse and use logic you set up to deliver the content that you want to make available to the search engines based on the url the user or search bot requested. in your logic you may be going to the database and pulling information based on the page they request. we store that information in a variable that will eventually get written to the page underneath the swf in xml hidden inside of a script tag. #2 - the search engine does not know it is getting redirected to the index.php, index.asp, index.jsp page. all it knows is that when it asks for animals.com/carnivors/bears http://animals.com/carnivors/bears it is getting the page on bears. #3 - yes. thats right. this is described in #1. i really think some variables would be better than an object. #4 - that is not necessary. remember, the user (and their browser) and the search bot only believe in the url. they don't care or know if its a single page or a different page that gets served up. One more thing we would have to do that I did not mention in #1 was to pass a list of links to the page to be written out. These can be in a display none tag or in the no script section. And finally that url path and variables should be passed to the flash swf in the flash vars section. Dang. I think this can be done rather quickly. This would be basic. A front end / front end manager could be created for this later on top of this. On 12/22/06, * Kevin Newman* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: dorkie dork from dorktown wrote: One of the open source solutions I occasionaly use *cough* *cough* *drupal* *cough* has a mod redirect / mod rewrite htaccess file (i'm combining words). Any url that is entered into the site gets rewritten or redirected. It is a dynamic system that allows you to dynamically redirect to the content you want without hard coding paths or directories. So you would create a dynamic page (doesn't really exist - only in the database) and then an alias to reach it. For example, www.test.com/myalias http://www.test.com/myalias http://www.test.com/myalias. Actually a lot of systems use this (wordpress, etc). All urls entered in to the site would be redirected to index.php. At this point you could with the super awesome power of server side code, deliver page links dynamically and content dynamically. I recently did a project with FXT and did exactly that. You pass the data as an xml model into a script tag under the body tag. Search engines pick this up. My Flex app pulled this xml in and then used it as a dataprovider for numerous controls. I've asked in the wish list for Macromedia at the time before it was Adobe to let us specify the type of extension for the published html wrapper. Right now if you click publish or run it creates a HTML
Re: [flexcoders] Re: Flex 2 vs Laszlo
Rich, I have been out of the loop on Laszlo. I am plenty busy with my Flex work :-) If someone can come up with a concise comparison chart on Flex 2 vs Laszlo I would be interested to see it. Last I had left off, after Macromedia announced Flex 2 pricing, Laszlo announced they were going to target the DHTML runtime in addition to Flash Player 6-8 SWF runtime. Seeing your post today I googled the following: Flex 2 laszlo Some interesting stuff comes up. First, Laszlo has a new Legals project in the works that will target additional runtimes, including FP9 and Java ME: http://www.openlaszlo.org/legals http://www.openlaszlo.org/orbit Ryan Stewart inlcudes Flex 2, Apollo and Lazslo in his 10 Predictions for Rich Internet Applications in 2007 http://blogs.zdnet.com/Stewart/?p=204 And then there were these two posts taking shots at Laszlo and then Flex: Oct 17, 2006 -- OpenLaszlo Considered Harmful http://blogs.pathf.com/agileajax/2006/10/openlaszlo_cons.html Oct 18, 2006 -- OpenLaszlo doesn't harm my long-time strategy - but Adobe and Flex do! http://www.openlaszlonaut.de/2006/10/18/openlaszlo-doesnt-harm-my-long-time-strategy-but-adobe-and-flex-do/ Again, if anyone has a comparison chart that they can post, that would be nice. hth, g On 12/27/06, Rich Tretola [EMAIL PROTECTED] wrote: Anyone have any links to share? Rich On 12/27/06, Rich Tretola [EMAIL PROTECTED] wrote: I know this has been rehashed a few times but I was wondering if anyone has an updated resource showing comparisons? I need to talk someone down from a Laszlo ledge and show the glory of Flex 2. :) Rich -- Rich Tretola mx:EverythingFlex/ http://www.EverythingFlex.com