[flexcoders] Moving ROs CFCs from Flex - Flash CS3
So I'm experimenting with moving my RemoteObject development to Flash CS3 instead of Flex. My main reasoning for this is filesize (300KB min with Flex vs 15KB min with Flash). Here's my problem. I currently use CFCs. With Flex, as long as the swfs are on the same server, I can set my CFCs to access=public. Moving the CFCs out of the root is unfortunately not currently an option. In Flash CS3, I'm using an RO wrapper I found from http://www.bytearray.org/?p=122. It returns an error saying that my CFCs are not remote. Setting the CFC to remote fixes the problem, but then leaves open the CFC for anyone to access. Is there a solution to this? I would be happy either with smaller Flex swfs or being able to access non-remote CFCs with Flash.
[flexcoders] DataGridColumn - vertical styling...
How can I set a selction style that runs vertically AND horizontally in a DataGrid? i.e. selecting a cell by default selects the entire row. I want one that selects both the row and the column.
[flexcoders] Re: DataGridColumn - vertical styling...
Yikes...project is due today...nothing for Flex2? --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: AdvancedDataGrid in Moxie. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of qnotemedia Sent: Monday, October 22, 2007 10:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGridColumn - vertical styling... How can I set a selction style that runs vertically AND horizontally in a DataGrid? i.e. selecting a cell by default selects the entire row. I want one that selects both the row and the column.
[flexcoders] Effect on VBox with Repeater...
Stupid question here probably, but I've been struggling with effects and generally doing visual design in Flex. OK - I have Vbox. Within it is a repeater. The component repeated is just a line of text and an image. I have rollOver and rollOut styles applied that will highlight the text by making the backgroundalpha of the component 0-1 and the text changes color. However, I would like to have an effect that fades out the entire Vbox and its children, including the repeater and all of its repeated components, and fade back in. When I apply the sequenced effect (animate alpha property on the VBox) it only fades in/out the single highlighted repeated item. How come?
[flexcoders] Detect text wrap?
I have a collection of vertically placed TextInput and TextArea boxes. I'm using a resize function that manually resizes each of the boxes' heights depending on the amount of text that is in each, so that there's never any extra space, and all of the text is always displayed. Since these are editable, the problem is when a user is typing in new text, and they go past the height of the box. I'd like to stretch the box vertically as they are bringing in new lines. Any way to detect that and re-run the resize function? I suppose I could do it on change, but that seems a bit extreme doesn't it?
[flexcoders] Re: How to have a SWF load a different SWF
In the case of the swf being loaded is a Flex2 app, you can use the SWFLoader control. Check out: Flex 2 Developer's Guide Building User Interfaces for Flex Applications Using Controls SWFLoader control If the swf is Flash 8, I believe you use the loadMovie function to load swfs. - Chris --- In flexcoders@yahoogroups.com, boy_trike [EMAIL PROTECTED] wrote: I would like my main swf, load another SWF and pass some parameters, (UserID, etc.). Can someone help me with the syntax for that? thanks bruce
[flexcoders] Re: Event Dispatching through more than one component
Argh! It worked! So all I had to do actually was set useCapture in the systemManager.addEventListener to true, and it worked right away. Is bubbling then set to true by default? Also, should I be in the habit of removing the listener when popups are removed? I've been noticing that in other code I've looked at online. Thanks Alex! Makes a whole lot more sense now! - Chris --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The top of the display list is the stage. The stage always has one child (the root) which in Flex apps is a SystemManager. The app and all popups are children of the systemManager. Stage - SystemManager - Application PopUp1 PopUp2 The event model in Flash/Flex is based on the DOM event model http://www.w3.org/TR/DOM-Level-3-Events/events.html If you search for bubbling and capture in our docs you'll find easier to read descriptions. But basically, when PopUp2 dispatches an non-bubbling event, the stage first dispatches the event in capture phase, then the SystemManager in capture phase, then PopUp2 as a regular event. If the event was a bubbling event, the same would happen, but then SystemManager would dispatch it again in bubbling phase and finally the Stage in bubbling phase. addEventListener has a parameter as to whether you want to listen in capture phase or not. Events have a constructor parameter as to whether the event bubbles or not. Capture phase basically allows containers to supervise and block events going to their children. Bubble phase serves as notification that the child dispatched an event. In theory this makes the Popups even more loosely coupled from each other than the other suggestions. Each Popup simply dispatches events. Other code can capture all events coming from popups (yes, it has to know what the event name is). Popups can listen to other popups without having to watch for their creation and destruction since you are going to addEventListener on systemManager instead of the actual popups. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of qnotemedia Sent: Wednesday, March 21, 2007 4:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Event Dispatching through more than one component OK, I understood the other responses, but not this one. Agreed that I tried setting bubbles to true in my customEvent, and then each event instance, and the dispatched event did not pass through embedded windows. But I've never used systemManager, nor do I entirely understand bubbling. Can you forward me to an example or doc explaining this? And does this somewhat move away from loosely-coupled components (which I'm trying real hard to achieve!). Thanks, - Chris --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Each popup is parented by the systemManager so it won't bubble from one popup to the next. However, each popup can listen to the systemManager for the event to bubble to it, or listen in capture phase so you don't have to use bubbling.
[flexcoders] Re: Event Dispatching through more than one component
Thanks Alex. This theoretically could fix another problem I was having as well. I'll give it a shot. Thanks a bunch, - Chris --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The top of the display list is the stage. The stage always has one child (the root) which in Flex apps is a SystemManager. The app and all popups are children of the systemManager. Stage - SystemManager - Application PopUp1 PopUp2 The event model in Flash/Flex is based on the DOM event model http://www.w3.org/TR/DOM-Level-3-Events/events.html If you search for bubbling and capture in our docs you'll find easier to read descriptions. But basically, when PopUp2 dispatches an non-bubbling event, the stage first dispatches the event in capture phase, then the SystemManager in capture phase, then PopUp2 as a regular event. If the event was a bubbling event, the same would happen, but then SystemManager would dispatch it again in bubbling phase and finally the Stage in bubbling phase. addEventListener has a parameter as to whether you want to listen in capture phase or not. Events have a constructor parameter as to whether the event bubbles or not. Capture phase basically allows containers to supervise and block events going to their children. Bubble phase serves as notification that the child dispatched an event. In theory this makes the Popups even more loosely coupled from each other than the other suggestions. Each Popup simply dispatches events. Other code can capture all events coming from popups (yes, it has to know what the event name is). Popups can listen to other popups without having to watch for their creation and destruction since you are going to addEventListener on systemManager instead of the actual popups. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of qnotemedia Sent: Wednesday, March 21, 2007 4:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Event Dispatching through more than one component OK, I understood the other responses, but not this one. Agreed that I tried setting bubbles to true in my customEvent, and then each event instance, and the dispatched event did not pass through embedded windows. But I've never used systemManager, nor do I entirely understand bubbling. Can you forward me to an example or doc explaining this? And does this somewhat move away from loosely-coupled components (which I'm trying real hard to achieve!). Thanks, - Chris --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Each popup is parented by the systemManager so it won't bubble from one popup to the next. However, each popup can listen to the systemManager for the event to bubble to it, or listen in capture phase so you don't have to use bubbling.
[flexcoders] Re: Event Dispatching through more than one component
OK, I understood the other responses, but not this one. Agreed that I tried setting bubbles to true in my customEvent, and then each event instance, and the dispatched event did not pass through embedded windows. But I've never used systemManager, nor do I entirely understand bubbling. Can you forward me to an example or doc explaining this? And does this somewhat move away from loosely-coupled components (which I'm trying real hard to achieve!). Thanks, - Chris --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Each popup is parented by the systemManager so it won't bubble from one popup to the next. However, each popup can listen to the systemManager for the event to bubble to it, or listen in capture phase so you don't have to use bubbling.
[flexcoders] Event Dispatching through more than one component
I'm still messing around with custom events. If I have a popup embedded within another popup and want to dispatch an event from the top-most component down to the parent application, do I have to dispatch it to the first popup, and then redispatch the same event to the parent app? Is there any way to dispatch an event, but have it automatically go through all components down to the root? Obviously I've tried, but events seems to stop at the parent component, and they are not automatically delivered to their parent's parent, etc. What I'm thinking of doing instead is having each popup send a message to the root to open other embedded popups, so that they are ALL created from the root application rather than the popup. In essence, a custom popup manager. But I'm still curious if there's a way around the above scenario. Thanks, - Chris
[flexcoders] Simulating clicking the X of a TitleWindow
I have a popup TitleWindow where I've added a listener for clicking the X-close button so that I can do something on-close...i.e.: myPopup.addEventListener(CloseEvent.CLOSE,postPopupFunction); My popup has other methods of closing tho - a cancel button and listening for the ESC key. How do I dispatch the CloseEvent.CLOSE manually? And if I have more than one popup, will it close all of them?
[flexcoders] Re: Simulating clicking the X of a TitleWindow
I had to change it to CloseEvent rather than Event, but yeah, that worked. Thanks.
[flexcoders] Re: Getting selectedItems to properly *select*...
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Are you saying that myAC[0] was modified so that the sub AC was removed? I'd go find out what actually got changed. Actually no - I was simply reading the subAC, and when checking it a second time, the subAC was not actually removed, but all of its valueObjects were. i.e. length = 0 as seen in the gif. All of this said, after banging my head through this last night, I found that I was somehhow incorrectly assigning myGrid.selectedItems to the foundItems() function's returned Array (which loops and builds an array of found items). I definitely don't prefer to it this way, but in the end it was necessary, and its allowed me to move on past this! IMHO, should've been as easy as myGrid.selectedItems = myAC or some simple derivative. I would love to see a more thorough explanation of why this didn't work, and if you look at my gifs you can see my frustration! One of those few times where I feel like the debugger is just lying to me. Problem1: qnotemedia.com/wontwork.gif Problem2: qnotemedia.com/dissapearing.gif Thanks to all for your input. - Chris
[flexcoders] Custom Event Handler from Popup?
So I'm still trying to dig through all of this OO stuff. Its been tough! I've made a couple of custom events from views. The handling I've learned is usually like this: view:CustomComp somethingReturned=handler(event)/ But I have one that is a popup. The popup is invoked like this: private function showPopup():void { var myPopup:customPopup = customPopup(PopUpManager.createetc) myPopup.passedVar = somethingPassed... etc } The popup has a custom event that is dispatched on closing the popup. How can I create a handler for it? myPopup.somethingReturned = handler (event) returns an error in Flex. If I make the popup a view in MXML, the event handler works fine.
[flexcoders] Re: Getting selectedItems to properly *select*...
Got it! It appears that selectedItems is dependent on the data being *absolutely identical* to the dataProvider. And while I thought my data was identical, it really wasn't. In the debugger, if you look at a variable, its always: Array (@123456). What I found was that although the data was definitely the same, that number was not. To fix the problem, I centralized all data to go through one data manager, whereas before I was reinitializing a different data component in each component. So now, I'm basically calling parentApplication.dataManager.someFunction () from all of my components. This isn't good quite frankly, but by doing so, the @123456 is always the same. If anyone else can think of a better way, I'm all ears...
[flexcoders] Re: Getting selectedItems to properly *select*...
--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: If you want to set the selection based on data, you'll have to loop through all the items, inspect whether each item has the data you want, and select it if so. I actually tried something like that. But myGrid.selectedItems += item doesn't work. What's the best practice way to push the item to selectedItems?
[flexcoders] Re: Getting selectedItems to properly *select*...
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Arrays in Flex and Flash are not watched for changes. After you mutate the array you have to set it again. var tmp:Array = myGrid.selectedItems tmp += item; myGrid.selectedItems = tmp; OK - I've retried specificaly what you've shown, and it still doesn't work. I assigned a findItems() function to a temporary array, arTemp. The function returns an Array of items found. The very next line is myGrid.selectedItems = arTemp. As mentioned in earlier posts, the items in this found array have precisely matched data to the dataProvider of the grid, and the selection still doesn't occur, without any errors either. The *only* difference between the two is the @123456 following the Array description in the debugger. At least I have something that works (three posts back), but now I'm running into a similar problem in another area of my app, and I'd like to move forward with this thread... I have another popup with two grids. Grid A has a multi-level ArrayCollection. i.e.: myAC[0].something myAC[0].somethingElse myAC[0].anotherAC[0].anotherSomething myAC[0].anotherAC[1].anotherSomethingElse myAC[1].something ...etc... When the user clicks on Grid A (not multi-select), Grid B's selectedItems is populated with the second-level AC anotherAC, like this: gridB.selectedItems = gridA.selectedItem.anotherAC.source And it works! BUT!!! When I select another item and come back to the first one, the anotherAC level has disappeared without a trace! It disappears from all bound ACs. WTF?! And BTW, I additionally tried the findItems() function as mentioned here. The same problem happens in that nothing is selected. Again, I've put together a gif to express my anxiety: qnotemedia.com/dissapearing.gif ...this is a before and after shot. On the left is before anything has been selected, and on the right, is immediately after a selection has occured. On the right side, notice that the dgAllRoles.selectedItems is correctly populated, but that both the dgSelectedNames dataProvider AND the original AC, selectedDevTeam have had thei second tiered item collectedRoles completely dissapear. Crossing my fingers that someone can understand this... - Chris
[flexcoders] Getting selectedItems to properly *select*...
I have a very odd problem, related to some other unanswered posts here. An application has a popup window called on click that is using data from a custom event. The popup has a datagrid. The get all data for the grid is coming from a simple data management component, called inside the popup - lets say an AC allData. The data manager inside the popup brocasts an event saying done loading and I'm handling that event in the popup to select selectedItems based on the data passed from the main application. The selectedItems data is definitely available to the popup. It is an AC of myValueObject. The get all data is definitely there and showing in the grid. Its also an AC of myValueObject. In the above scenario, it doesn't work when I say DG.selectedItems = selectedData as Array. Instead, I have another function getSelection (selectedData) which basically loops through the selectedData AC and pushes each item to a new Array. I've triple checked this, and it also does not work. As a test, to make sure its not realted to the loading process of the popup, I've even set the getSelection to run via a button click well after everything is in the popup. It selects nothing. BUT! If I say DG.selectedData = getSelection(allData), where allData is the same thing used to populate the grid's dataProvider, it selects all items in the grid. What's totally odd, is the AC from the dataProvider and the AC for selectedData look absolutely *identical* in the debugger, minus a bunch of items for the selectedData, as it should be. The only working alternative I can find is to create another function in the data manager that re gets the selectedData. This is not doable, because other areas of the application might change the selectedData, without calling to the database. I need to keep moving that data around to components freely without calling him. Any thoughts on what's wrong here?
[flexcoders] Re: Getting selectedItems to properly *select*...
To truly express my frustration, I've put together this shot of some code: qnotemedia.com / wontwork.gif ...note that in the above example, only arSecondSelection actually works. The others select nothing.
[flexcoders] Re: ArrayCollection to comma-delimited list?
How I did this for anyone interested... Made a component based on VBox that contains one Text. The Text's text is set to a function that passes a bound ArrayCollection. The function then does all the looping needed and returns a String. Purely luck of the draw for me - I had no idea you could put a function in a text property. --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: Couldn't quite figure this one out. I have a multi-level arraycollection and I need to write it out in flex as two separated lists - i.e. itemA[0]: 1, 2, 3, 4 itemB[1]: 5, 6 itemC[2]: 7, 8 I'm currently using two repeaters with mx:Text to properly view the data, but of course, that just ends up as a bunch of separate text boxes vertically. Since mx:Text doesn't have an itemRenderer, I'm not quite sure how to do this.
[flexcoders] Re: CF/Flex OOP Question - based on Matt Boles' Tutorial
Of course, I'm moving on now. My solution as of now has been to do a bit of both. I'm passing the all of needed objects (four of them) through a custom event, and then building them as necessary in the view. I'm still not quite sure if this is correct or not. My example differs quite a bit from flexGrocer, so its a bit tought to compare. Sorry for the length. - Chris --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: Hi all, I've developed a number of Flex projects in the past few months, but as I started to make bigger ones, I've run into a lot of problems. I went back through a hands-on tutorial I had taken that was hosted by Matt Boles at MAX, and I think its time to move up to the advanced table. But there's something fundamental I'm still missing. Some background first - Matt basically ended the tutorial with showing us how to send a custom event up from a component to the main application, and passed to another component. It wasn't until I put this in my own application that I finally understood the point behind needing to create loosely-coupled components. I just did a google, and strangely enough, the PDF for this hands-on is found here: http://www.ammug.org/drupal/system/files/Building+a+Rich+Internet+Appl ication+with+Flex+2+and+ColdFusion.pdf The example he gave was a rather simple one. Make your CFC using the Flex wizard, and base your custom event off sending the wizard's object - i.e. in reality, only a single table's fields, because in the wizard, that's all you can create! But typically, us developers need much more than that in order to view our data. On to my question... Lets say I have a contact list - this would require names (names tables) and a list of departments (dpts table), likely something like: where names.dptID = departments.dptID. Using Matt's tutorial, I would create my CFCs by running the wizard on the Names table, make a list all names component and a view selected name component. I would create a custom event object that would dispatch the name object, i.e. the selected name and fields from the names table - to the view selected component, which would display the detailed data. But what about the non-name tables that are directly related, like my list of departments (again: where name.dptID = departments.dptID)? My question is, since ALL names will have ONE department, should this SQL join be formed by editing the name object CFCs, and the name object then includes things like Department Name and Department Description every time its used - OR, should I have a completely separate department object that is dispatched additionaly when the selected name object is dispatched, which is in essence, forming the join inside Flex? Considering that at some point the departments will be a separately edited item, with their own add/remove/edit, I'm assuming the latter? And IF that's the case, what would the dispatch function look like on page 76 of the tutorial? A long question - but typing it out helps me understand it, and I need to get over this small bump in order to move on. Thanks for reading ;)
[flexcoders] ArrayCollection to comma-delimited list?
Couldn't quite figure this one out. I have a multi-level arraycollection and I need to write it out in flex as two separated lists - i.e. itemA[0]: 1, 2, 3, 4 itemB[1]: 5, 6 itemC[2]: 7, 8 I'm currently using two repeaters with mx:Text to properly view the data, but of course, that just ends up as a bunch of separate text boxes vertically. Since mx:Text doesn't have an itemRenderer, I'm not quite sure how to do this.
[flexcoders] CF/Flex OOP Question - based on Matt Boles' Tutorial
Hi all, I've developed a number of Flex projects in the past few months, but as I started to make bigger ones, I've run into a lot of problems. I went back through a hands-on tutorial I had taken that was hosted by Matt Boles at MAX, and I think its time to move up to the advanced table. But there's something fundamental I'm still missing. Some background first - Matt basically ended the tutorial with showing us how to send a custom event up from a component to the main application, and passed to another component. It wasn't until I put this in my own application that I finally understood the point behind needing to create loosely-coupled components. I just did a google, and strangely enough, the PDF for this hands-on is found here: http://www.ammug.org/drupal/system/files/Building+a+Rich+Internet+Appl ication+with+Flex+2+and+ColdFusion.pdf The example he gave was a rather simple one. Make your CFC using the Flex wizard, and base your custom event off sending the wizard's object - i.e. in reality, only a single table's fields, because in the wizard, that's all you can create! But typically, us developers need much more than that in order to view our data. On to my question... Lets say I have a contact list - this would require names (names tables) and a list of departments (dpts table), likely something like: where names.dptID = departments.dptID. Using Matt's tutorial, I would create my CFCs by running the wizard on the Names table, make a list all names component and a view selected name component. I would create a custom event object that would dispatch the name object, i.e. the selected name and fields from the names table - to the view selected component, which would display the detailed data. But what about the non-name tables that are directly related, like my list of departments (again: where name.dptID = departments.dptID)? My question is, since ALL names will have ONE department, should this SQL join be formed by editing the name object CFCs, and the name object then includes things like Department Name and Department Description every time its used - OR, should I have a completely separate department object that is dispatched additionaly when the selected name object is dispatched, which is in essence, forming the join inside Flex? Considering that at some point the departments will be a separately edited item, with their own add/remove/edit, I'm assuming the latter? And IF that's the case, what would the dispatch function look like on page 76 of the tutorial? A long question - but typing it out helps me understand it, and I need to get over this small bump in order to move on. Thanks for reading ;)
[flexcoders] java.lang.Runtime complete message?
So I'm developing a simplified Flex2 application that allows a user to upload video, and a serverside conversion is made to flv via ffmpeg. The back-end code is windows-based CFMX7. Basically, after the video is uploaded I'm running a cfc function that takes the filenames and runs it through ffmpeg.exe via: myobject = createObject( java, java.lang.Runtime).getRuntime() myObject.exec(ffmpeg.exe) etc. This is done as an alternative to cfexecute. It WORKS - the file converts and everything, but: 1) it converts very very slowly - the server's performance monitor shows a very low CPU usage, and 2) I don't know when its finished. Is there any way to monitor when the exec is complete and send a flag to Flex2? Or perhaps, when someone tries to view the video, Flex can check to see if the process is done or not? I'd like to stay away from using FDS.
[flexcoders] Re: java.lang.Runtime complete message?
I'm looking at java's waitFor(). When I use it in a CFC though, I think its just looping forever. Here's what I have so far: cfset var myObject = createObject (java, java.lang.Runtime).getRuntime() cfset startProcess = myObject.exec(someSoftware.exe) cfset checkProcess = myObject.waitFor() cfreturn checkProcess When running this cffunction as a WebService from Flex2, it leaves a never ending busy cursor. If I remove checkProcess and return startProcess instead, I have some kind of java string - a thread identifier or something? i.e.: [EMAIL PROTECTED] Its really quite simple - I don't know enough about java to make this happen and the Java reference perplexes me when in-context with Coldfusion. Any help is appreciated.
[flexcoders] hostmysite, mySQL5, CF7, WebService, and Flex2 problems...
I have two Flex apps using all of the above that perform flawlessly on my localhost, but after moving them to hostmysite.com, they have sporadic issues. Its always an error statement that I have created, in a Flex Alert.show fault return, though I'm not entirely sure if where the actual error is taking place - I would assume in CF. What I have is two CFCs, one with all of my DB-changing functions, and the other with my get-data-only functions. At the beginning of my app, I call out maybe seven webservice calls to the read-only CFC to grab data, and again, while it works perfect on my localhost, once on hostmysite, anywhere from 1-3 of these may or may not fail. Its very random. Many times, the app will work just fine. I wanted to use remote object, but unfortunately, hostmysite doesn't support this, so I'm stuck with WebService. Where do you think these random failures are happening, why is it happening, and what can I do about it?
[flexcoders] Re: hostmysite, mySQL5, CF7, WebService, and Flex2 problems...
Wow - ServiceCapture is really cool! I didn't know you could see stuff like that so easily. Unfortunately, its not showing me anything new. i.e. when an error occurs, the results in ServiceCapture look the same as a session where the app doesn't return any errors. What does that mean? There's eight webservice calls when an app is first loaded. One thing I did notice is that the order of these calls appears to differ depending on the session. I didn't think that any one service call requires another, but considering the sporadic nature of the errors, is it possible that the problem here is that simple? Thanks, - Chris --- In flexcoders@yahoogroups.com, Patrick Mineault [EMAIL PROTECTED] wrote: You should try using ServiceCapture or Charles debugging proxy to inspect the data being sent over the wire when an error occurs. Patrick qnotemedia a écrit : I have two Flex apps using all of the above that perform flawlessly on my localhost, but after moving them to hostmysite.com, they have sporadic issues. Its always an error statement that I have created, in a Flex Alert.show fault return, though I'm not entirely sure if where the actual error is taking place - I would assume in CF. What I have is two CFCs, one with all of my DB-changing functions, and the other with my get-data-only functions. At the beginning of my app, I call out maybe seven webservice calls to the read-only CFC to grab data, and again, while it works perfect on my localhost, once on hostmysite, anywhere from 1-3 of these may or may not fail. Its very random. Many times, the app will work just fine. I wanted to use remote object, but unfortunately, hostmysite doesn't support this, so I'm stuck with WebService. Where do you think these random failures are happening, why is it happening, and what can I do about it?
[flexcoders] Re: Filter as you type - two comboboxes?
You know - I think the problem was I just didn't quite understand how filterFunction works, and what exactly happens when return true occurs. Finally got it tho, and here it is!! The trick was just understanding when to end the statement, and when to check something first or last. Its basically: 1) Still not sure what the first line does, but its comparing the text of my search box with one column in the grid. If the text box has nothing OR has something, it passes either way. 2) If the first combobox is NOT Show All, and the second combobox IS Show All, then check the first combobox 3) If the second combobox is NOT Show All, and the first combobox IS Show All, then check the second combobox 4) If BOTH comboboxes are NOT Show All then check BOTH comboboxes 5) If BOTH comboboxes ARE Show All then check nothing. Surely there's an easier way to implement this, but darnit, it works!! Now I will need to stretch out my search box to include more than one column. Wish me luck, ;) - Chris private function processFilter(item:Object):Boolean { var result:Boolean=false; dgObjectList.selectedIndex = -1; if(item.objName.length == 0 || item.objName.toUpperCase().indexOf (searchText.text.toUpperCase()) = 0) { if(cbTypeList.selectedItem.typeName != Show All cbCourseList.selectedItem.courseName == Show All) { if (item.typeName == cbTypeList.selectedItem.typeName) { return true; } } else if (cbTypeList.selectedItem.typeName == Show All cbCourseList.selectedItem.courseName != Show All) { if (item.courseName == cbCourseList.selectedItem.courseName) { return true; } } else if (cbTypeList.selectedItem.typeName != Show All cbCourseList.selectedItem.courseName != Show All) { if (item.typeName == cbTypeList.selectedItem.typeName item.courseName == cbCourseList.selectedItem.courseName) { return true; } } else if(cbTypeList.selectedItem.typeName == Show All cbCourseList.selectedItem.courseName == Show All) { return true; } } return result; } --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: Looks like a few too many return statements in the processFilter() function, causing some of the code to be skipped instead of being processed. Probably ought to be something like result = x instead, so that you can return a single result at the end of the function. --- In flexcoders@yahoogroups.com, qnotemedia qnotemedia@ wrote: Hi all - I have two questions to post today, but will keep them separate. I'm using some filter as you type code from Ben Forta and cflex.net. The following code is basically an InputText search box along with a combobox, and they both are filtering a datagrid's arraycollection. What I want to do is add a second combobox to the process. It never seems to work correctly, but each combobox, along with the text search seems to work on their own. Note that in the code below, the course combobox is commented out. I suppose what I don't understand is how exactly the processFilter function works. dgObjectList = DataGrid with 3 columns: objName, typeName, courseName objectList = DataGrid's dataprovider cbTypeList = Combobox with labelField=typeName. Data includes typeID typeListFilter = cbTypeList's dataprovider cbCourseList = Combobox with labelField = courseName. Data includes courseID courseListFilter = cbCourseList's dataprovider searchText = textInput box for keyword search. Code is as follows. Thanks for reading, - Chris [Bindable] private var objectList:ArrayCollection; [Bindable] private var typeListFilter:ArrayCollection; [Bindable] private var courseListFilter:ArrayCollection; private function resultHandlerGetAllObjects (event:ResultEvent):void { objectList = event.result as ArrayCollection; /* add function for filtering */ objectList.filterFunction=processFilter; } private function resultHandlerGetAllTypesFilter (event:ResultEvent):void { typeListFilter = event.result as ArrayCollection; } private function resultHandlerGetAllCoursesFilter (event:ResultEvent):void { courseListFilter = event.result as ArrayCollection; } /* Code from: http://www.forta.com/blog/index.cfm/2006/7/13/Filtering-Data-In- Flex http://www.cflex.net/showFileDetails.cfm? ObjectID=415Object=FileChannelID=1 */ private function processFilter(item:Object):Boolean { var result:Boolean=false; dgObjectList.selectedIndex = -1; if(item.objName.length == 0 || item.objName.toUpperCase ().indexOf (searchText.text.toUpperCase()) = 0) { if(cbTypeList.selectedItem.typeName != Show All) { return item.typeName == cbTypeList.selectedItem.typeName; } else if(cbTypeList.selectedItem.typeName == Show All) { return true
[flexcoders] Filter as you type - two comboboxes?
Hi all - I have two questions to post today, but will keep them separate. I'm using some filter as you type code from Ben Forta and cflex.net. The following code is basically an InputText search box along with a combobox, and they both are filtering a datagrid's arraycollection. What I want to do is add a second combobox to the process. It never seems to work correctly, but each combobox, along with the text search seems to work on their own. Note that in the code below, the course combobox is commented out. I suppose what I don't understand is how exactly the processFilter function works. dgObjectList = DataGrid with 3 columns: objName, typeName, courseName objectList = DataGrid's dataprovider cbTypeList = Combobox with labelField=typeName. Data includes typeID typeListFilter = cbTypeList's dataprovider cbCourseList = Combobox with labelField = courseName. Data includes courseID courseListFilter = cbCourseList's dataprovider searchText = textInput box for keyword search. Code is as follows. Thanks for reading, - Chris [Bindable] private var objectList:ArrayCollection; [Bindable] private var typeListFilter:ArrayCollection; [Bindable] private var courseListFilter:ArrayCollection; private function resultHandlerGetAllObjects(event:ResultEvent):void { objectList = event.result as ArrayCollection; /* add function for filtering */ objectList.filterFunction=processFilter; } private function resultHandlerGetAllTypesFilter (event:ResultEvent):void { typeListFilter = event.result as ArrayCollection; } private function resultHandlerGetAllCoursesFilter (event:ResultEvent):void { courseListFilter = event.result as ArrayCollection; } /* Code from: http://www.forta.com/blog/index.cfm/2006/7/13/Filtering-Data-In-Flex http://www.cflex.net/showFileDetails.cfm? ObjectID=415Object=FileChannelID=1 */ private function processFilter(item:Object):Boolean { var result:Boolean=false; dgObjectList.selectedIndex = -1; if(item.objName.length == 0 || item.objName.toUpperCase().indexOf (searchText.text.toUpperCase()) = 0) { if(cbTypeList.selectedItem.typeName != Show All) { return item.typeName == cbTypeList.selectedItem.typeName; } else if(cbTypeList.selectedItem.typeName == Show All) { return true; } /* Course ComboBox - works on its own, but not WITH the other combobox! if(cbCourseList.selectedItem.courseName != Show All) { return item.courseName == cbCourseList.selectedItem.courseName; } else if(cbCourseList.selectedItem.courseName == Show All) { return true; } */ } return result; } Code in App: mx:HBox width=100% mx:Label text=Search:/ mx:TextInput id=searchText width=100% change=objectList.refresh();/ /mx:HBox mx:HBox width=100% mx:Label text=Type:/ mx:ComboBox id=cbTypeList width=100% dataProvider={typeListFilter} labelField=typeName change=objectList.refresh();/ /mx:HBox mx:HBox width=100% mx:Label text=Course:/ mx:ComboBox id=cbCourseList width=100% dataProvider={courseListFilter} labelField=courseName change=objectList.refresh();/ /mx:HBox mx:HBox width=100% height=100% mx:DataGrid id=dgObjectList width=100% height=100% dataProvider={objectList} change=displayObject(); mx:columns mx:DataGridColumn headerText=Name wordWrap=true dataField=objName/ mx:DataGridColumn headerText=Type dataField=typeName/ mx:DataGridColumn headerText=Course dataField=courseName /mx:columns /mx:DataGrid /mx:HBox
[flexcoders] Processing Filedata / Filereference with a CFC instead of CFM?
I'm using a component from eFlex, called Uploader. Has anyone else run into this? Its really quite brilliant and was a breeze to implement and customize for my own needs: Go here: http://www.everythingflex.com/ and search for Uploader. But, from what I understand, the cfm processing for this, is the same as any other methodology when using Flex and Coldfusion for uploading data. The CFM I have that works, is a single line: cffile action=upload filefield=Filedata destination=#ExpandPath ('./logos')# nameconflict=OVERWRITE Can someone show me an example of this when used with a CFC instead of a CFM? I want to do some checks and balances in ColdFusion before physically using the cffile, and if those checks don't validate, return an error message to Flex. Is that possible? In fact, one problem with this component is when an upload error occurs, no message is sent to the user. What follows is the getFile() function found in the Uploader mxml. Thanks, - Chris public function getFile():void { if(this.uploadToURL.length 0){ this.uploadURL = new URLRequest(); this.uploadURL.url = this.uploadToURL; /* uploadURL.url is defined per component instance and leads to the CFM for processing */ this.file = new FileReference(); this.configureListeners(file); this.file.browse(new Array(new FileFilter(Images, this.imagesFilter))); } else { Alert.show(uploadToURL is undefined, Syntax Error); } }
[flexcoders] Simple Flex2 Security?
I have an application that has two states (View and Edit), and one button toggles between the two states. There are a few components, but none of them are required for the non-logged-in state. Can someone recommend a methodology for implementing some very simple security in he main app? i.e. typing in a username/password (or maybe just a password only), and on success, enabling the button that toggles the states. It seems that most articles I've read on the topic are at a much higher level, but not all of us are building enterprise level Flex apps. I don't have FDS, I can't use RemoteObject on my server (HostMySite), and I'm using ColdFusion 7.01 on the backend. Thanks - Chris
[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
[flexcoders] Re: TitleWindow Component...help!
Well - what I've done, after finding a titlewindow example on cflex, is create a public variable in the titlewindow component of the same name as one in the application, and I send it to the component from the main app AND back via the title window's instance variable. i.e.: TitleWindow Component: [Bindable] public var aListOfData:ArrayCollection; private function sendData():void { - runs when you click submit in titlewindow var compilation:Obect = new Object; compilation.setting1 = something in component; aListOfData.addItem(compilation); (or setItemAt, etc) } Main Application looks like this: [Bindable] private var aListofData:ArrayCollection; private function openComponent():void { - runs when you click open window in the main app var openingWindowblah blah, opening the TitleWindow; openingWindow.aListOfData = aListOfData; } OK - so those variable names are random thoughts off the top of my head, bu you get the picture. From what I understand, this doesn't follow the idea behind loosely coupled components, but is there anything really wrong with this methodology? It seems to work very well in my case. I can even have a window within a window, all passing variables between windows, all the way down to the main app quite easily, and so far its been a breeze to setup. Thoughts anyone? If I continue down this path, where will I start to run into problems? - Chris --- In flexcoders@yahoogroups.com, Roman Protsiuk [EMAIL PROTECTED] wrote: Hi. Why don't your pop up dispatch some event (e.g. submitData) and you listen to it? R. On 12/5/06, qnotemedia [EMAIL PROTECTED] wrote: OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated in the component) and is added to the combobox's dataprovider. The problem appears to be that there is no handler of the Submit button click on the main application. Obviously, I would add to a datasource and return an ID from that, but I can't even get this to work manually (i.e. for testing purposes, setting a static data and label). Just trying to keep this as simple as possible. Seems to me that if I can pass a string of text, I should also be able to pass an Object that is added to a dataProvider in the main app? Right? Help! - Chris
[flexcoders] Re: TitleWindow Component...help!
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 [EMAIL PROTECTED] 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 coupling. So wrong? No. Best practice? It depends. Think ahead. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of qnotemedia Sent: Tuesday, December 05, 2006 12:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: TitleWindow Component...help! Well - what I've done, after finding a titlewindow example on cflex, is create a public variable in the titlewindow component of the same name as one in the application, and I send it to the component from the main app AND back via the title window's instance variable. i.e.: TitleWindow Component: [Bindable] public var aListOfData:ArrayCollection; private function sendData():void { - runs when you click submit in titlewindow var compilation:Obect = new Object; compilation.setting1 = something in component; aListOfData.addItem(compilation); (or setItemAt, etc) } Main Application looks like this: [Bindable] private var aListofData:ArrayCollection; private function openComponent():void { - runs when you click open window in the main app var openingWindowblah blah, opening the TitleWindow; openingWindow.aListOfData = aListOfData; } OK - so those variable names are random thoughts off the top of my head, bu you get the picture. From what I understand, this doesn't follow the idea behind loosely coupled components, but is there anything really wrong with this methodology? It seems to work very well in my case. I can even have a window within a window, all passing variables between windows, all the way down to the main app quite easily, and so far its been a breeze to setup. Thoughts anyone? If I continue down this path, where will I start to run into problems? - Chris --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Roman Protsiuk roman.protsiuk@ wrote: Hi. Why don't your pop up dispatch some event (e.g. submitData) and you listen to it? R. On 12/5/06, qnotemedia qnotemedia@ wrote: OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated
[flexcoders] Re: TitleWindow Component...help!
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 [EMAIL PROTECTED] 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 coupling. So wrong? No. Best practice? It depends. Think ahead. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of qnotemedia Sent: Tuesday, December 05, 2006 12:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: TitleWindow Component...help! Well - what I've done, after finding a titlewindow example on cflex, is create a public variable in the titlewindow component of the same name as one in the application, and I send it to the component from the main app AND back via the title window's instance variable. i.e.: TitleWindow Component: [Bindable] public var aListOfData:ArrayCollection; private function sendData():void { - runs when you click submit in titlewindow var compilation:Obect = new Object; compilation.setting1 = something in component; aListOfData.addItem(compilation); (or setItemAt, etc) } Main Application looks like this: [Bindable] private var aListofData:ArrayCollection; private function openComponent():void { - runs when you click open window in the main app var openingWindowblah blah, opening the TitleWindow; openingWindow.aListOfData = aListOfData; } OK - so those variable names are random thoughts off the top of my head, bu you get the picture. From what I understand, this doesn't follow the idea behind loosely coupled components, but is there anything really wrong with this methodology? It seems to work very well in my case. I can even have a window within a window, all passing variables between windows, all the way down to the main app quite easily, and so far its been a breeze to setup. Thoughts anyone? If I continue down this path, where will I start to run into problems? - Chris --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Roman Protsiuk roman.protsiuk@ wrote: Hi. Why don't your pop up dispatch some event (e.g. submitData) and you listen to it? R. On 12/5/06, qnotemedia qnotemedia@ wrote: OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component
[flexcoders] TitleWindow Component...help!
OK - so I'm using the generic TileWindow example found on the Component Explorer. It basically shows you how to build something where: 1) User clicks a button, Window pops up. 2) User types into a text box in the window, clicks Submit. 3) Text typed in appears in the main app. http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html But, I'm having a little difficulty understanding the assignment of the returned data. i.e.: login.loginName=returnedName; ...where login is the instance of the TitleWindow, loginName is a public Text variable inside the component, and returnedName is a text box in the main app. My confusion comes up when I try to edit this so that: 1) App has a combobox. Dataprovider for the combobox is an ArrayCollection of data: data and label. User clicks a button, TitleWindow pops up. 2) User types into a text box in the window, clicks Submit. 3) The text is a passed as a label, along with a generated ID (generated in the component) and is added to the combobox's dataprovider. The problem appears to be that there is no handler of the Submit button click on the main application. Obviously, I would add to a datasource and return an ID from that, but I can't even get this to work manually (i.e. for testing purposes, setting a static data and label). Just trying to keep this as simple as possible. Seems to me that if I can pass a string of text, I should also be able to pass an Object that is added to a dataProvider in the main app? Right? Help! - Chris
[flexcoders] Re: Calendar...visually show selection for related data?
Never really found an answer to this. Anyone know where I can find more primers on extending Components? I've gone through a few, but none of them seem to really apply to this particular dilemma. - Chris --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: Sorry - posted this in the wrong thread!! So how about this? If you CTRL-Click on a default Datechooser in MXML, you get the built-in DateChooser.as. I'm particularly interested in the section on the showToday property, which of course has its own style for a specific date. I would think that maybe this could perhaps be edited to accept an array of dates instead of a single date? I just don't quite know enough yet on exactly how to do something that simple... - Chris --- In flexcoders@yahoogroups.com, Andrew D. Goodfellow agoodfellow@ wrote: Yeah, I've been trying to figure this one out in my spare time as well. selectedRanges is definitely not what you want. I haven't dug into sub classing the DateChooser yet, but I am sure that will be required. Can anyone from Adobe shed some more light on this components rendering grid? -Andy On 11/9/06, qnotemedia qnotemedia@ wrote: Nah, not selectedRanges - cause, I'd like to highlight specific dates randomly, not consecutive ones. Though I haven't used selectedRanges...can you specify the same date as the range? Will look into that... Anyone use Outlook's Calendar? i.e. when you look at the whole month, numbers (dates) that have meetings are bolded. That's what I'd like to accomplish. I figured this would clearly require extending the DateChooser class and passing the data to it as a property. However, I'm not sure how to selectively apply a bold style or something to a specific date. What part of the DateChooser is rendering the dates? - Chris --- In flexcoders@yahoogroups.com flexcoders% 40yahoogroups.com, Tom Chiverton tom.chiverton@ wrote: set selectedRanges ? -- Tom Chiverton Helping to administratively harvest internet appliances This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at 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.
Re: [Jõnk E-Mail - LOW] [flexcoders] Flex2 Sensitive Data Security Thoughts?
So how about this? If you CTRL-Click on a default Datechooser in MXML, you get the built-in DateChooser.as. I'm particularly interested in the section on the showToday property, which of course has its own style for a specific date. I would think that maybe this could perhaps be edited to accept an array of dates instead of a single date? I just don't quite know enough yet on exactly how to do something that simple... - Chris
[flexcoders] Calendar...visually show selection for related data?
I have a calendar component and an ArrayCollection of data that is filtered depending on the selected date of the calendar. Selecting a date brings up a list of items in the array. Is there any way that I can visually extend the calendar component to show markers where dates not selected have this associated 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 * 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] Re: Calendar...visually show selection for related data?
Perhaps a more specific example will help with my question... I'm digging through the Flex2 docs and found the textDecoration property of the DateChooser. Seeting this to underline will make ALL dates in the datechooser have lines under them. Given the original scenario, is there any way that I can apply this property to only a specfic collection of dates through something like a for loop? i.e. loop through the ArrayCollection, and for each date found, underline the specific matching date in the component, but leave the others alone. --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: I have a calendar component and an ArrayCollection of data that is filtered depending on the selected date of the calendar. Selecting a date brings up a list of items in the array. Is there any way that I can visually extend the calendar component to show markers where dates not selected have this associated 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 * 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] Re: hostmysite.com...RemoteObject not working
Bummer - here was their reply: Yes, we know that ColdFusion MX 7 Updater 2 provides integration between ColdFusion and Flex 2 applications. HostMySite does not currently support Flex in a shared environment. It would be possible in a dedicated environment provided the you purchased a license. --- In flexcoders@yahoogroups.com, Pat Buchanan [EMAIL PROTECTED] wrote: The last time I spoke with HostMySite, they did not support it, however they had it in a test environment and was planning on deploying it eventually. They would not give me a hard date, sorry. However, I would email them anyway and apply the pressure. :) Thanks -Pat On 11/4/06, qnotemedia [EMAIL PROTECTED] wrote: Hi all - back from MAX, and I'm finally using RemoteObject! I have a simple calendar application. All is working fine with my dev copy of ColdFusion, but when I put it up on hostmysite.com it fails to connect - error follows at the end of this post. The remoteobject looks like this. mx:RemoteObject id=calendarRO destination=ColdFusion source=g3calendar.cfcs.CalendarGateway mx:method name=getAll result=getAllHandler(event)/ /mx:RemoteObject I have tried with and without g3calendar in the source, though I think its finding the CFC, because instead, I would get a CFC not found right? I used the make CFCs wizard in Flex Builder 2. They do have the servers updated to v7.02. I have double-checked that the datasource is working. I have made a CFMapping to the g3calendar folder. Other Flex Apps work fine via WebService and HTTPService. Here is the error - not quite sure how to toubleshoot this! - Chris [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 500] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa ultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at mx.messaging::ChannelSet/::faultPendingSends() at mx.messaging::ChannelSet/channelFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging::Channel/mx.messaging:Channel::connectFailed() at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingCha nnel::connectFailed() at mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::st atusHandler() -- 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] hostmysite.com...RemoteObject not working
Hi all - back from MAX, and I'm finally using RemoteObject! I have a simple calendar application. All is working fine with my dev copy of ColdFusion, but when I put it up on hostmysite.com it fails to connect - error follows at the end of this post. The remoteobject looks like this. mx:RemoteObject id=calendarRO destination=ColdFusion source=g3calendar.cfcs.CalendarGateway mx:method name=getAll result=getAllHandler(event)/ /mx:RemoteObject I have tried with and without g3calendar in the source, though I think its finding the CFC, because instead, I would get a CFC not found right? I used the make CFCs wizard in Flex Builder 2. They do have the servers updated to v7.02. I have double-checked that the datasource is working. I have made a CFMapping to the g3calendar folder. Other Flex Apps work fine via WebService and HTTPService. Here is the error - not quite sure how to toubleshoot this! - Chris [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 500] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa ultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at mx.messaging::ChannelSet/::faultPendingSends() at mx.messaging::ChannelSet/channelFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging::Channel/mx.messaging:Channel::connectFailed() at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingCha nnel::connectFailed() at mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::st atusHandler() -- 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] Re: Time Validating
Thanks Tom - very nice stuff. Just goes to show that there's so many different ways to do the same darn thing. I really need to learn Reg Exp's! - Chris --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: In the same spirit, here's an untested regexp: /(\d){1,2}:(\d){0,2}/ You get hours in result[0] and if result.length 1 you have minutes in result[1]. -- 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] Re: Time Validating
Having the same problem here. IMHO, this is so much easier in CF7 Flash Forms with the mask property (mask=99:99 always forces four numbers with a colon in the middle), and I'm not sure why it has to be as complicated as it is in Flex2. The closest I've gotten is by using a number validator and changing the decimalSeparator property to colon. Unfortunately, this will still allow times like 1:234, 123:4, 1234, etc. I'm assuming though you can probably develop something with RegExp, but I don't quite understand enough about regular expressions. Another interesting thing...I noticed that DateChooser's selectedDate property includes time as part of its data. Any way to format or access that? Agreed though - surely someone has taken care of this. - Chris --- In flexcoders@yahoogroups.com, boy_trike [EMAIL PROTECTED] wrote: Flex has a NUMBERformatter and a DATEFormatter. I have the need for a time formatter and would not like to re-invent what someone else must have already done. Ideally I want to have a textinput field which restricts input to 0-9: APM. I would like to accept the following and convert all to 3PM 3P 3 3:00 03:00 15:00 3:00PM Of course, if the time is invalid (i.e. 2:65PM, 25:2, etc.) I would like to display an error Does something like this exist or must I roll my own? thanks: Bruce -- 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] Re: Time Validating
Well - just spent some time with this. Here's what I came up with. Sloppy, but it works. This allows standard times (1:00, 12:00, 12:59), but not military time (24:00, 13:59, etc.). private function validateTime():void { var setTime:String = new String; setTime = timeToAdd.text; if ((setTime.length == 4 setTime.charAt(1) == : int (setTime.charAt(0)) = 1 int(setTime.charAt(0)) = 9 int (setTime.charAt(2)) = 5 int(setTime.charAt(3)) = 9) || (setTime.length == 5 setTime.charAt(2) == : int (setTime.charAt(0)) == 1 int(setTime.charAt(1)) = 2 int (setTime.charAt(3)) = 5 int(setTime.charAt(4)) = 9)) { Alert.show(Valid Number); } else { Alert.show (Plesae enter a correct time (i.e. 12:00, 9:00, etc.); } } mx:HBox mx:Label text=Type in a Time:/ mx:TextInput id=timeToAdd width=100% text=12:00 / /mx:HBox --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: Having the same problem here. IMHO, this is so much easier in CF7 Flash Forms with the mask property (mask=99:99 always forces four numbers with a colon in the middle), and I'm not sure why it has to be as complicated as it is in Flex2. The closest I've gotten is by using a number validator and changing the decimalSeparator property to colon. Unfortunately, this will still allow times like 1:234, 123:4, 1234, etc. I'm assuming though you can probably develop something with RegExp, but I don't quite understand enough about regular expressions. Another interesting thing...I noticed that DateChooser's selectedDate property includes time as part of its data. Any way to format or access that? Agreed though - surely someone has taken care of this. - Chris --- In flexcoders@yahoogroups.com, boy_trike boy_trike@ wrote: Flex has a NUMBERformatter and a DATEFormatter. I have the need for a time formatter and would not like to re-invent what someone else must have already done. Ideally I want to have a textinput field which restricts input to 0-9: APM. I would like to accept the following and convert all to 3PM 3P 3 3:00 03:00 15:00 3:00PM Of course, if the time is invalid (i.e. 2:65PM, 25:2, etc.) I would like to display an error Does something like this exist or must I roll my own? thanks: Bruce -- 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] Dynamic Button Icon
The icon property of a button appears to require an embedded object. Is there any way to make it dynamic - i.e. using say a URL to a gif? Tried icon=http://URL; but it comes back as not being able to parse the value of type Class. Also tried giving it a URL from a datasource - same issue. -- 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] Re: As you type Grid Filtering with Textinput and Combobox
New question - how do I add a second combobox? -- 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] CF/Flex2 connectivity differences between DataGrid and Tree
I'm working on a new Flex2/CF app. My first had a tree that received XML, and I had it setup to edit each node, and one button would send the entire Tree back to CF. I'm having a little trouble doing something similar with a DataGrid. In the new app, I'm seing a query from a datasource as an array of structs to a DataGrid. How can I send this entire datagrid back to CF? In my first app I sent myTree.value via webservice request and parsed the XML. Sending datagrid.value isn't working however. Changing it to datagrid.selectedItem.columnName works, but then I'm stuck with clicking a button for every single item in the datagrid, rather than sending the entire grid at once. It seems that there's something fundamentally different between grids and trees that I'm not quite understanding. What exactly is the datagrid sending in a webservice request? -- 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] As you type Grid Filtering with Textinput and Combobox
Hi all - I'm trying to mix together two blocks of code: Ben Forta's As you type Grid filtering: http://www.forta.com/blog/index.cfm/2006/7/13/Filtering-Data-In-Flex Filter a Grid with Combobox: http://www.cflex.net/showFileDetails.cfm? ObjectID=415Object=FileChannelID=1 I have successfully implemented either one or the other, but can't quite get both to work at the same time. What I have so far is below. The application has a datagrid's dataProvider bound to objectList - it has an objName field for text search and a typeName field for the combobox. The combobox is cbTypeList and the textinput is searchText.text. Both have change=objectList.refresh() If I use the code below, the combobox still filters, but the textbox typing does not. If I remove either set's function, they each work fine on their own. private function resultHandlerGetAllObjects(event:ResultEvent):void { objectList = event.result as ArrayCollection; objectList.filterFunction=processFilter; objectList.filterFunction=typeFilter; } /* http://www.forta.com/blog/index.cfm/2006/7/13/Filtering-Data-In- Flex */ private function processFilter(item:Object):Boolean { var result:Boolean=false; if (item.objName.length == 0 || item.objName.toUpperCase ().indexOf(searchText.text.toUpperCase()) = 0) { result=true; } return result; } /* http://www.cflex.net/showFileDetails.cfm? ObjectID=415Object=FileChannelID=1 */ private function typeFilter(item:Object):Boolean { var result:Boolean=false; if(item.typeName == cbTypeList.selectedItem.typeName) { result=true; } return result; } -- 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] Re: As you type Grid Filtering with Textinput and Combobox
Crazy - already got this to work. Code follows below. Its ugly, but it works. New question - how do I add a second combobox? private function processFilter(item:Object):Boolean { var result:Boolean=false; if(item.objName.length == 0 || item.objName.toUpperCase ().indexOf(searchText.text.toUpperCase()) = 0 cbTypeList.selectedItem.typeName != Show All) { return item.typeName == cbTypeList.selectedItem.typeName; } else if(item.objName.length == 0 || item.objName.toUpperCase ().indexOf(searchText.text.toUpperCase()) = 0 cbTypeList.selectedItem.typeName == Show All) { return true; } return result; } -- 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] Re: Customizing Default Drag with List Components
Still looking for an answer to this if anyone has one. Also postedo n the Macromedia forums. Seems like it should be doable with DragDrop, but again, I'm a bit confused as to what's talking to what when using the built-in drag-drop implementation. - Chris --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: I have implemented a very simplistic drag/drop with a single Tree component (dragEnabled=true dropEnabled=true) and would like to keep it as simple as possible. But is there any way to limit items within the component that can or can not drag or be dragged to? i.e. in my case, my tree will always consist of three levels (Root Folder:Collection of folders:Collection of files), and files will only exist in the last level. I want to be able to limit: 1) Can not start dragging any item except for a file 2) Can not drop a file to anywhere except another last-level folder (i.e. can't drop to the root). Should be simple, but I'm a bit confused by the drag examples given at the livedocs... - Chris -- 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] Flex2 and Breeze syncSWF
Is there any way to dispatch/receive breeze syncSWF functions in Flex2? Other than loading the extension, is there anything else I need to do to get started in Flex? http://www.adobe.com/devnet/breeze/articles/intro_sync_swf.html - Chris -- 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/ * 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] Customizing Default Drag with List Components
I have implemented a very simplistic drag/drop with a single Tree component (dragEnabled=true dropEnabled=true) and would like to keep it as simple as possible. But is there any way to limit items within the component that can or can not drag or be dragged to? i.e. in my case, my tree will always consist of three levels (Root Folder:Collection of folders:Collection of files), and files will only exist in the last level. I want to be able to limit: 1) Can not start dragging any item except for a file 2) Can not drop a file to anywhere except another last-level folder (i.e. can't drop to the root). Should be simple, but I'm a bit confused by the drag examples given at the livedocs... - Chris -- 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/ * 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] Re: Flex Books? Suggestions...
This is a great topic that needs to stay alive, as books and tutorials are just now showing up now that Flex2 has been officially released. lynda.com has a Flex2 Essential and I sat through most of it. It might be too noob for some, but it covers the bases really well. Looks like the official Macromedia books won't be out until later this year. Also, definitely check out the sites listed in the FAQ. cflex.net has particularly been useful for me. - Chris --- In flexcoders@yahoogroups.com, Marcelo de Moraes Serpa [EMAIL PROTECTED] wrote: There's the RIA book that's currently in it's pre-release stage. I've seen some drafts and I can say it seems promising. I guess that the url is www.ria-book.com, not sure though. Marcelo. On 9/1/06, Micky Hulse [EMAIL PROTECTED] wrote: Hi, Just joined the list... Nice to meet ya'll! :D Background: I can do Flash (been using it on/off for years), PHP, CSS, XHTML... Yadda... I am just now learning about Flex... Looks promising. Anyone have good book recommendations? I would prefer something fast-paced and not super-noob. Found this on Amazon, but not yet released: http://snipurl.com/vrth Any suggestions would be great. :) Cheers, Micky -- Wishlist: http://snipurl.com/vrs9 Switch: http://browsehappy.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/ * 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] Success!!! But I still need help!! (RE: Custom scrolling with TileList)
Well - never received a reply to this thread, but I've figured out how to get the look, feel, and interactivity that I wanted via lots of nested Canvas', HBox's, VBox's, etc...Here's what I've basically done. Again, the goal was to make a vertical TileList with component itemRenderer, that scrolls smoothly, and rather than using the default scrollbar, create my own scrollDown and scrollUp buttons (with no scrollbar actually available - just the buttons). - I have a TileList of course, and its height is dynamically set to the number of items in the itemRenderer * 125 (an item's height). scrollingPolicy is disabled. With 75 items that makes its height. - itemRenderer consists of an image and label. The images can be large - width of 640 - and are scaled down via maxWidth/Height. - The TileList is within a VBox with scrollingPolicy disabled. - An Up/Down button calls a function that sets the verticalScrollPosition of the VBox to += 20 or -= 20 via buttonDown with autorepeat. This creates the effect of a nice smooth scroll! PROBLEM I need help with now: Performance has become an issue. When the TileList contains 75 thumbnails, that makes its height nearly 10,000 (75*125)! The problem is that, to Flex, the entire list is being displayed, whereas when you normally display a smaller sized TileList, items are not loaded until they are physically displayed by the user. When it first loads, it really chokes up cause its calling to load every single thumbnail in the list all at the same time. Is there any way to fix this!? - Chris -- 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/ * 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] Custom scrolling with TileList
I have a vertical scroll-only TileList. Is there anyway to: 1) remove the scrollbar, and 2) Use buttons at the top and bottom of the TileList that scroll the list while mouse over? As a test, so far, I have a skinny and short TileList with a bunch of items in it. When you mouseover a button it runs a function with the following code: while (tileListing.verticalScrollPosition 5) { tileListing.verticalScrollPosition = tileListing.verticalScrollPosition + 1; } Unfortunately, this obviously has the following problems: a) The code runs so fast that the list jumps. Is there any way to make the movement slow? b) How can I get the maximum length of the tileListing's dataProvider (i.e. to replace the 5 in the above example). c) In the end, I'd like the scroll to stop based on both the mouseOver and the tileList's dataProvider length. Is there a button.mouseOver == true type of condition? Thanks! - Chris -- 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/ * 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] Re: Custom scrolling with TileList
Still fudging my way through the Flex2 reference...here's another possibile method to do this? mx:Sequence id=scrollDown mx:AnimateProperty property=verticalScrollPosition fromValue=1 toValue={maxVerticalScrollPosition} duration=1000 / /mx:Sequence ...which I can bind from tileListing's mouseDownEffect but there is no mouseOverEffect, and even then, it would occur anytime a mouse is over the entire list, not just an area of it. This is also still scrolling one complete item at a time, whereas I thought it might be possible to have a smooth scroll...no? I also tried binding the sequence to a button, and then making the propety tileListing.verticalScrollPosition but this throws an error, as it appears that the animation must occur on a property of the object that is bound to the sequence. Closer tho...any thoughts? - Chris -- 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/ * 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] Re: Refresh Tree from HTTPService
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: I'd use a result handler and assign the result to a {Bindable}global variable, then bind to that. That way you can trace ou the data to see what is happening. Didn't have a chance to try that - but it makes sense. In the meantime, I moved to a webservice and just call a CFC to re-read the XML. Not ideal, but it works, and since this isn't a critical app, I'm going to move on. Thanks for the replies. - Chris -- 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/ * 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] Re: Component access to dynamic application variable
So create a variable (rootURL) in main application. When you create dataProvider for TileList, pass this variable to thumbnails via dataProvider. Abdul - could you show me some basic code for this? To be clear, in the main app, I currently have: a) HTTPService, retrieves xml file (layed out as root.folder.file b) ComboBox, dataProvider=HTTPService.lastResult.folder c) TileList, dataProvider=ComboBox.selectedItem.file, itemRenderer=view.Thumbnail d) view.Thumbnail Component, has an Image with [EMAIL PROTECTED] So when we get to step d, the Thumbnail component only has fileName available. The folder/complete path is in the root node ([EMAIL PROTECTED]). I understand that I can call a function via comboBox change (and the ResultHandler on returning the service), but how do I add a variable to the repeating file node before its sent to the TileList? Thanks, - Chris -- 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/ * 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] ArrayCollection...how can I edit the data?
Hi all - I'm still running around in circles trying to get a certain type of functionality from CF/Flex2. I have a Coldfusion CFC sending data to Flex2. I've been fine doing this in a number of ways - HTTPService read from xml built by CF, or a WebService reading an array return from CF, etc. What I'm having trouble with is 1) editing the data returned in the Flex GUI as an ArrayCollection, and 2) Successfully returning the AC to CF for re-processing. Case in point - these first three steps I've gotten to work fine: 1) Flex2 app sends a text string variable of a path to CF via WebService 2) CF writes the data as an xml file, and then returns a *multi-level* result of the path's directories and files as a multi-level array of structs to Flex2. (This is actually an array.struct.array.struct layout - long story, but it works). 3) After the return from CF (as ArrayCollection), the Flex2 GUI has options for displaying a listing of the folders (listed in a combobox) and files (listed in a datagrid). User selectes a folder, and datagrid repopulates correctly. --- What I can't accomplish: 4) Edit any field of selected data in the ArrayCollection via various TextInputs. I've tried many things. The only thing that works is editing the values of the Flex2 objects (the combobox or the datagrid). This is not ideal, since in step5, I will have to rebuild from multiple variables. How can I edit any of the items available form the ArrayCollection? 5) Return the edited (or ANY) ArrayCollection to CF as something it can read (which will later pass through a cfxml tag loop). Help! - Chris -- 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/ * 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] Refresh Tree from HTTPService
I have an HTTPService that imports a multi-level xml file, and a tree with dataprovider={httpservice.lastResult}. How can I refresh the tree when the XML data changes? I've tried just rerunning httpservice.send() via a resulthandler or a refresh button but neither seems to work. The changed data does show correctly when I reload the app. - Chris -- 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/ * 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] Component access to dynamic application variable
I'm currently learning how to utilize components. In a slideshow app, I have a thumbnail component (image) that is rendered by a TileList in the main application. dataProvider in the TileList is being used to supply the path, image name, etc, by sending a repeating node of an xml file. However, I'd like the thumbnail component to also be able to read a property of a selected parent node (via a ComboBox in the main application) of the data its receiving. Can I make a bound variable in the main application dynmaically accessible by the component? The xml is basically laid out as root(i.e. URL to root).album(i.e. folder name).image(i.e. filename), and any time I render an image, I'm recollecting the various nodes to produce an absolute URL to the image. Hope that makes sense...still learning my Flex2 terminology. - Chris -- 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/ * 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] Re: Send Tree data to CF
Answered my own question after browsing through cflex.net - what a great resource! For anyone interested, check out the Beginner Tutorials section of cflex.net, and then the Intro to Flex 2 with Coldfusion Remoting tutorial. This gives a very nice layout of both sending and receiving between Flex2 and CF7.02. Worked great - moving right along... Thanks, - Chris --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: ...could someone write me some basic cfc code (and/or mxml if needed) that can receive this data and place it in a CF array - or at least lead me in the right direction to a tutorial online? -- 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/ * 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] Send Tree data to CF
Hi all - a bit of a newbie here, but I'm coming along with some basics in Flex2 / CF7.02. I went quite far with CF Flash Forms, and am ready to dig deep into flex. I've successfully learned how to load XML data to a tree and make it look right (using httpservice). The original external xml file I'm using was written from cfxml in CF. But I'm a bit stuck with trying to send data FROM Flex2 over to a cfc for manipulation. Most tutorials simply run functions, but don't pass any data to CF. I'm currently loading a cfc via Webservice. A button's click parameter is set to run a function in the cfc (i.e. myService.sendData (myTree.selectedItem)). Based on that could someone write me some basic cfc code (and/or mxml if needed) that can receive this data and place it in a CF array - or at least lead me in the right direction to a tutorial online? Once manipulated, the tree will be written straight back to xml via cfxml, then re-read via the Flex app's httpservice - i.e. kind of like saving your settings. If there's a better way to do this, I'm all ears! Thanks - looking forward to this, - Chris -- 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/ * 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/