RE: [SPAM] Re: [flexcoders] Passing values from popup window to MXML component
What reference is null? Yes, that architecture is common. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Funand Learning Sent: Wednesday, November 11, 2009 12:07 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] Passing values from popup window to MXML component Hi, I have written a function and after checking the username and password, to toggle the buttons, but I get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. Here is the function I wrote public function checkCredentials():void { if(loginWin1.userInput.text == 'funandlearning' && loginWin1.passwordInput.text == 'funandlearning') { Alert.show("Login Successful"); PopUpManager.removePopUp(loginWin1); //var main:Main = new Main(); main.logout.visible = false; } else { Alert.show('Try again'); PopUpManager.removePopUp(loginWin1); } } LoginPopUp contains the code for displaying on the popupwindow, and Main is another component which contains code for calling popup window and it contain other UI code for header. Is this the right way to do? Thanks _ From: Omotola Anjorin To: flexcoders@yahoogroups.com Sent: Mon, November 9, 2009 6:33:48 AM Subject: Re: [flexcoders] Passing values from popup window to MXML component Yeah you can do what rohit said by adding a logout button at the same place and toggling the visiblity. This way, >From you main application you can do something like this. if(loginWin. userInput. text=='funandlearni ng' && loginWin.passwordIn put.text= ='funandlearning' ) { Alert.show(" Login Successful") ; loginWin.loginButto n.visible = false loginWin.logoutButt on.visible = true } You can also use the same button but play around the text property. Cheers _ From: Rohit Sharma To: flexcod...@yahoogro ups.com Sent: Mon, November 9, 2009 12:21:02 PM Subject: Re: [flexcoders] Passing values from popup window to MXML component You can add a logout button at the same place as login button and toggle the visibilities of these buttons depending upon the state of your component. On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning mailto:funandlearni...@yahoo.com> > wrote: Hello All, I was trying to create a login Page. The page has one main MXML application file with couple of MXML components. The First component contains the following: Component1.mxml: width="60%" height="261"> component2.mxml has the following code for the popup xmlns:main=" components. *" layout="vertical" title="Please login" showCloseButton= "true"> I need help in knowing how to change the login button in component1.mxml to logout button when the login functionaility from the popuup window is successful Thanks.
Re: [flexcoders] Passing values from popup window to MXML component
Hi, I have written a function and after checking the username and password, to toggle the buttons, but I get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. Here is the function I wrote public function checkCredentials():void { if(loginWin1.userInput.text == 'funandlearning' && loginWin1.passwordInput.text == 'funandlearning') { Alert.show("Login Successful"); PopUpManager.removePopUp(loginWin1); //var main:Main = new Main(); main.logout.visible = false; } else { Alert.show('Try again'); PopUpManager.removePopUp(loginWin1); } } LoginPopUp contains the code for displaying on the popupwindow, and Main is another component which contains code for calling popup window and it contain other UI code for header. Is this the right way to do? Thanks From: Omotola Anjorin To: flexcoders@yahoogroups.com Sent: Mon, November 9, 2009 6:33:48 AM Subject: Re: [flexcoders] Passing values from popup window to MXML component Yeah you can do what rohit said by adding a logout button at the same place and toggling the visiblity. This way, >From you main application you can do something like this. if(loginWin. userInput. text=='funandlearni ng' && loginWin.passwordIn put.text= ='funandlearning' ) { Alert.show(" Login Successful") ; loginWin.loginButto n.visible = false loginWin.logoutButt on.visible = true } You can also use the same button but play around the text property. Cheers From: Rohit Sharma To: flexcod...@yahoogro ups.com Sent: Mon, November 9, 2009 12:21:02 PM Subject: Re: [flexcoders] Passing values from popup window to MXML component You can add a logout button at the same place as login button and toggle the visibilities of these buttons depending upon the state of your component. On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning wrote: > > > > > > > > > > > > > > > > >> > >> > >Hello All, > >I was trying to create a login Page. The page has one main MXML application >file with couple of MXML components. The First component contains the >following: > >Component1.mxml: > > > >width="60%" height="261"> > > > > > > > >borderStyle= "outset" horizontalAlign= "left" verticalAlign= "middle" >>backgroundColor= "#938480"> > > > >> > > > height="82%" borderStyle= "outset" borderColor= "#F85023"> > > "outset"> >> > > > >component2.mxml has the following code for the popup > > > >>xmlns:main=" components. *" layout="vertical" > title="Please login" showCloseButton= "true"> > > > > > position="lastChild " creationPolicy= "all"> >> > > > > >> target="{loginButto n}" name="label" value="Register" /> > > > >> > > >> > > > > >> > > > > >> > > > > > label="Need to Register?" id="registerLink" >click="currentState ='Register' ;this.title= 'Register' " >>/> > > > >> > > > >I need help in knowing how to change the login button in > component1.mxml to logout button when the login functionaility from the > popuup window is successful > >Thanks. > >
RE: [SPAM] Re: [flexcoders] Passing values from popup window to MXML component
Or use states. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Omotola Anjorin Sent: Monday, November 09, 2009 7:34 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] Passing values from popup window to MXML component Yeah you can do what rohit said by adding a logout button at the same place and toggling the visiblity. This way, >From you main application you can do something like this. if(loginWin. userInput. text=='funandlearning' && loginWin.passwordIn put.text= ='funandlearning') { Alert.show("Login Successful"); loginWin.loginButton.visible = false loginWin.logoutButton.visible = true } You can also use the same button but play around the text property. Cheers _ From: Rohit Sharma To: flexcoders@yahoogroups.com Sent: Mon, November 9, 2009 12:21:02 PM Subject: Re: [flexcoders] Passing values from popup window to MXML component You can add a logout button at the same place as login button and toggle the visibilities of these buttons depending upon the state of your component. On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning mailto:funandlearni...@yahoo.com> > wrote: Hello All, I was trying to create a login Page. The page has one main MXML application file with couple of MXML components. The First component contains the following: Component1.mxml: width="60%" height="261"> component2.mxml has the following code for the popup xmlns:main="components.*" layout="vertical" title="Please login" showCloseButton="true"> I need help in knowing how to change the login button in component1.mxml to logout button when the login functionaility from the popuup window is successful Thanks.
Re: [flexcoders] Passing values from popup window to MXML component
Yeah you can do what rohit said by adding a logout button at the same place and toggling the visiblity. This way, >From you main application you can do something like this. if(loginWin. userInput. text=='funandlearning' && loginWin.passwordIn put.text= ='funandlearning') { Alert.show("Login Successful"); loginWin.loginButton.visible = false loginWin.logoutButton.visible = true } You can also use the same button but play around the text property. Cheers From: Rohit Sharma To: flexcoders@yahoogroups.com Sent: Mon, November 9, 2009 12:21:02 PM Subject: Re: [flexcoders] Passing values from popup window to MXML component You can add a logout button at the same place as login button and toggle the visibilities of these buttons depending upon the state of your component. On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning wrote: > > > > > > > > > > > > > > > > >> > >> > >Hello All, > >I was trying to create a login Page. The page has one main MXML application >file with couple of MXML components. The First component contains the >following: > >Component1.mxml: > > > >width="60%" height="261"> > > > > > > > >borderStyle="outset" horizontalAlign="left" verticalAlign="middle" >>backgroundColor="#938480"> > > > >> > > > height="82%" borderStyle="outset" borderColor="#F85023"> > > borderStyle="outset"> >> > > > >component2.mxml has the following code for the popup > > > >>xmlns:main="components.*" layout="vertical" > title="Please login" showCloseButton="true"> > > > > > position="lastChild" creationPolicy="all"> >> > > > > >> target="{loginButton}" name="label" value="Register"/> > > > >>> click="currentState='';this.title='Please Login'"/> > > >> > > > > >> > > > > >> > > > > > label="Need to Register?" id="registerLink" >click="currentState='Register';this.title='Register'" >>/> > > > >> > > > >I need help in knowing how to change the login button in > component1.mxml to logout button when the login functionaility from the > popuup window is successful > >Thanks. > >
Re: [flexcoders] Passing values from popup window to MXML component
You can add a logout button at the same place as login button and toggle the visibilities of these buttons depending upon the state of your component. On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning wrote: > > > Hello All, > > I was trying to create a login Page. The page has one main MXML application > file with couple of MXML components. The First component contains the > following: > > Component1.mxml: > > > > width="60%" height="261"> > > > > > > > > id="headerButtons" > borderStyle="outset" horizontalAlign="left" verticalAlign="middle" > backgroundColor="#938480"> > > > > > > > borderColor="#F85023"> > > borderStyle="outset"> > > > > > component2.mxml has the following code for the popup > > > > xmlns:main="components.*" layout="vertical" > title="Please login" showCloseButton="true"> > > > > > position="lastChild" creationPolicy="all"> > > > > > > value="Register"/> > > > > click="currentState='';this.title='Please Login'"/> > > > > > > > > > > > > > > > > > label="Need to Register?" id="registerLink" > click="currentState='Register';this.title='Register'" > /> > > click="checkCredentials()"/> > > > > > > I need help in knowing how to change the login button in component1.mxml to > logout button when the login functionaility from the popuup window is > successful > > Thanks. > > >
[flexcoders] Passing values from popup window to MXML component
Hello All, I was trying to create a login Page. The page has one main MXML application file with couple of MXML components. The First component contains the following: Component1.mxml: width="60%" height="261"> component2.mxml has the following code for the popup xmlns:main="components.*" layout="vertical" title="Please login" showCloseButton="true"> I need help in knowing how to change the login button in component1.mxml to logout button when the login functionaility from the popuup window is successful Thanks.
RE: [flexcoders] Passing values using mx:WebService
I like mxml for a lot of things, but invoking data service calls is not one of them. One big problem I have is that declarative binding is hard to debug. My pattern is this: var wsOperation:Operation = ws.getList; wsOperation.resultFormat = "e4x"; var atCall:AsyncToken; var sQ2:String = dept.selectedItem.data; // trace this value to be sure it is good var sQ5:String = dept2.selectedItem.data; // trace this value to be sure it is good var oRequest:Object = {q2 sQ2, q5: sQ5 }; atCall = wsOperation.send(oRequest); atCall.callId = sCallId; ... Are you trying to format the SOAP request yourself? Just pass the correctly typed vars in the operation arguments. Also, the component namespace, xmlns in the mxml tags should not have anything to do with a WebService call. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of m_ollman Sent: Tuesday, February 03, 2009 10:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing values using mx:WebService Hiya flexcoders Trying to pass values to a SOAP request. Having some fun :-) Working with - got it working by placing the SOAP request inside of the tag and adding the namespace in mx:application- xmlns:typ="http://ruleburst.com/ruleserver/9.1/rulebase/types <http://ruleburst.com/ruleserver/9.1/rulebase/types> " (code @ EOM ) However when I try to dynamically pass selectedItem to the they don not come through. I'm aware of adding values to the ie. {dept.selectedItem.data} {dept2.selectedItem.data} but keep getting an end of file error. Question is how do I turn the SOAP request into and request? Thanks in advance rgds martin "GERM" "GERM" true
[flexcoders] Passing values using mx:WebService
Hiya flexcoders Trying to pass values to a SOAP request. Having some fun :-) Working with - got it working by placing the SOAP request inside of the tag and adding the namespace in mx:application- xmlns:typ="http://ruleburst.com/ruleserver/9.1/rulebase/types"; (code @ EOM ) However when I try to dynamically pass selectedItem to the they don not come through. I'm aware of adding values to the ie. {dept.selectedItem.data} {dept2.selectedItem.data} but keep getting an end of file error. Question is how do I turn the SOAP request into and request? Thanks in advance rgds martin "GERM" "GERM" true
[flexcoders] Passing Values between windows
In the application I'm currently developing, end users need to log in to utilize it. Also I need to keep track of who is logged in so that I can input that into a local database after certain actions. I've tried using a public variable in a commonly used class, however since an instance of that class is newly declared when a new window opens up the value is set back to null, making it unusable. I've heard of using an actionscript file inside a package used by the App containing the variables but since the examples I've seen have them as static and const variables and thus can't be changed from their default values. So my question is this, is it possible in AIR to pass the value of a variable from the native application window to another window component? To help clear things up, essentially the user logs in and the username is set as the value of a variable declared someplace, then in another window, an action takes place, info is recorded in the database and the app looks up the username in the variable, and records it along with the other stuff in the db.
RE: [flexcoders] Passing Values to popup components and then passing back
Here is an example: http://www.cflex.net/showFileDetails.cfm?ObjectID=558 Note, it does not use events. If you plan to reuse the popup component, look into using events for communication. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ming4u2 Sent: Wednesday, September 26, 2007 1:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing Values to popup components and then passing back Hi, I am working on an exisiting application and trying to pass value to opup components. I don't know if I am not doing it right but the values are not being passed and then calling the correct HHTP call for the data. Can anyone point me to the right direction besides the Adobe live docs, which really doenst help much. The page that calls the popup public function changeHandler():void { var adminPopUp:componentDetail = componentDetail(PopUpManager.createPopUp (this,Pages.Components.componentDetail,true)); if(viewcomponentlisting.selectedItem){ componentDetail(adminPopUp).AssetID = viewcomponentlisting.selectedItem.AssetID; componentDetail (adminPopUp).LifeCycleID = viewcomponentlisting.selectedItem.LifeCycleID; componentDetail(adminPopUp).title = viewcomponentlisting.selectedItem.Description; PopUpManager.centerPopUp(adminPopUp); } else { var alert:Alert = Alert.show ([EMAIL PROTECTED],"AssetID",Alert.OK | Alert.CANCEL,this); return; } } And then the component that is supposed to recieve the values, I set them to Bindable variables [Bindable] public var AssetID:String; [Bindable] public var LifeCycleID:String; And then I am trying to pass those variables to the HTTP request. AssetID LifeCycleID
[flexcoders] Passing Values to popup components and then passing back
Hi, I am working on an exisiting application and trying to pass value to opup components. I don't know if I am not doing it right but the values are not being passed and then calling the correct HHTP call for the data. Can anyone point me to the right direction besides the Adobe live docs, which really doenst help much. The page that calls the popup public function changeHandler():void { var adminPopUp:componentDetail = componentDetail(PopUpManager.createPopUp (this,Pages.Components.componentDetail,true)); if(viewcomponentlisting.selectedItem){ componentDetail(adminPopUp).AssetID = viewcomponentlisting.selectedItem.AssetID; componentDetail (adminPopUp).LifeCycleID = viewcomponentlisting.selectedItem.LifeCycleID; componentDetail(adminPopUp).title = viewcomponentlisting.selectedItem.Description; PopUpManager.centerPopUp(adminPopUp); } else { var alert:Alert = Alert.show ([EMAIL PROTECTED],"AssetID",Alert.OK | Alert.CANCEL,this); return; } } And then the component that is supposed to recieve the values, I set them to Bindable variables [Bindable] public var AssetID:String; [Bindable] public var LifeCycleID:String; And then I am trying to pass those variables to the HTTP request. AssetID LifeCycleID
Re: [flexcoders] passing values to FilterFunctions?
Hi, I find sometimes just subclassing ArrayCollection works. This way your are defining certain types of collections that do different things. You can then add functionality to the class with methods or whatever. This works well for me. Then I define the different filter functions based on that collection' current state in the class. Using an interface in the collection then decouples the collection form any implementations. This is one simple class I use to filter included as3 files in a file collection. The source is from a collection defined in the model which is bound to a list with check boxes. package com.teotiGraphix.documentfx.model { import com.teotiGraphix.documentfx.files.IAS3File; import mx.collections.ArrayCollection; public class SourceFileQueue extends ArrayCollection { public static const FILE_INCLUSION_STATE:String = "fileInclusionState"; protected var stateChanged:Boolean = false; //-- // // Public Get-Set :: Properties // //-- //-- // state //-- private var _state:String; /** * Set the collection state. */ public function get state():String { return _state; } /** * @private */ public function set state(value:String):void { _state = value; stateChanged = true; refresh(); } //-- // // Constructor // //-- /** * Constructor. */ public function SourceFileQueue(source:Array=null) { super(source); state = FILE_INCLUSION_STATE; } /** * @private */ override public function refresh():Boolean { if (stateChanged) { if (_state == FILE_INCLUSION_STATE) { filterFunction = isFileIncluded; } stateChanged = false; } return super.refresh(); } /** * @private */ private function isFileIncluded(item:Object):Boolean { var file:IAS3File; if (item is IAS3File) { file = IAS3File(item); if (file.included) // todo { return true; } } return false; } } } Peace, Mike On 5/24/07, Ralf Bokelberg <[EMAIL PROTECTED]> wrote: I simply assign the input values to some properties of the filter whenever they change. Cheers, Ralf. On 5/24/07, Kevin < [EMAIL PROTECTED]> wrote: > > using this approach the filter functions still need to reference the > view to get optional filter parameters correct. For example, if you want to > filter based on a user inputed text field you can just do this: > > collection.filterFunction = filter.filterFuncti on (textFld.text); > > > since the filter functions can not accept parameters. > > In thinking about this I am wondering if this would work instead: > > FilterClass.filterByName(collection, textFld.text); > > Then within the class, the static method "filterByName" will > handle assigning a filter function to the collection and using the " > textFld.text" to filter. > > Is there something that I am missing with this approach. > > - Kevin > > > On May 24, 2007, at 2:02 PM, Ralf Bokelberg wrote: > > I'm using a FilterClass, which holds just the filterFunction and some > optional ways to configure the filtering. > Every collection, which needs filtering, gets an instance of this > FilterClass by assigning collection.filterFu nction = > filter.filterFunction; > > Cheers, > Ralf. > > > On 5/24/07, Kevin < [EMAIL PROTECTED] > wrote: > > > > I would like to attempt to separate my filter functions from my view > > so that I am not duplicating code when two views share similar filter > > functions. My idea was to create a class that contains a > > ListCollection and all the appropriate FilterFunctions for that > > collection. The FilterFunctions would then be applied by methods in > > that class. > > > > The problem I am having is that I can't pass any parameters to the > > FilterFunction when I assign it to the specific ListCollection. The > > FilterFunction seems like it needs to be tightly coupled with the > > view in order to work. > > > > To work around this, for application wide filters, I am saving a > > filter value on my model and then referencing the model from my > > FilterFunction (which still isn't ideal). However in some cases this > > isn't appropriate since the filter value doesn't really need to be > > persisted over the entire application. > > > > Does anyone have any thoughts on how to accomplish this? > > > > Thanks for the help, > > > > Kevin > > > > > > -- > Ralf Bokelberg gmail.com > > Flex & Flash Consultant based in Cologne/Germany > Phone +49 (
Re: [flexcoders] passing values to FilterFunctions?
I simply assign the input values to some properties of the filter whenever they change. Cheers, Ralf. On 5/24/07, Kevin <[EMAIL PROTECTED]> wrote: using this approach the filter functions still need to reference the view to get optional filter parameters correct. For example, if you want to filter based on a user inputed text field you can just do this: collection.filterFunction = filter.filterFunction (textFld.text); since the filter functions can not accept parameters. In thinking about this I am wondering if this would work instead: FilterClass.filterByName(collection,textFld.text); Then within the class, the static method "filterByName" will handle assigning a filter function to the collection and using the " textFld.text" to filter. Is there something that I am missing with this approach. - Kevin On May 24, 2007, at 2:02 PM, Ralf Bokelberg wrote: I'm using a FilterClass, which holds just the filterFunction and some optional ways to configure the filtering. Every collection, which needs filtering, gets an instance of this FilterClass by assigning collection.filterFunction = filter.filterFuncti on; Cheers, Ralf. On 5/24/07, Kevin <[EMAIL PROTECTED]> wrote: > > I would like to attempt to separate my filter functions from my view > so that I am not duplicating code when two views share similar filter > functions. My idea was to create a class that contains a > ListCollection and all the appropriate FilterFunctions for that > collection. The FilterFunctions would then be applied by methods in > that class. > > The problem I am having is that I can't pass any parameters to the > FilterFunction when I assign it to the specific ListCollection. The > FilterFunction seems like it needs to be tightly coupled with the > view in order to work. > > To work around this, for application wide filters, I am saving a > filter value on my model and then referencing the model from my > FilterFunction (which still isn't ideal). However in some cases this > isn't appropriate since the filter value doesn't really need to be > persisted over the entire application. > > Does anyone have any thoughts on how to accomplish this? > > Thanks for the help, > > Kevin > -- Ralf Bokelberg gmail.com> Flex & Flash Consultant based in Cologne/Germany Phone +49 (0) 221 530 15 35 -- Ralf Bokelberg <[EMAIL PROTECTED]> Flex & Flash Consultant based in Cologne/Germany Phone +49 (0) 221 530 15 35
Re: [flexcoders] passing values to FilterFunctions?
using this approach the filter functions still need to reference the view to get optional filter parameters correct. For example, if you want to filter based on a user inputed text field you can just do this: collection.filterFunction = filter.filterFunction (textFld.text); since the filter functions can not accept parameters. In thinking about this I am wondering if this would work instead: FilterClass.filterByName(collection,textFld.text); Then within the class, the static method "filterByName" will handle assigning a filter function to the collection and using the "textFld.text" to filter. Is there something that I am missing with this approach. - Kevin On May 24, 2007, at 2:02 PM, Ralf Bokelberg wrote: I'm using a FilterClass, which holds just the filterFunction and some optional ways to configure the filtering. Every collection, which needs filtering, gets an instance of this FilterClass by assigning collection.filterFunction = filter.filterFunction; Cheers, Ralf. On 5/24/07, Kevin <[EMAIL PROTECTED]> wrote: I would like to attempt to separate my filter functions from my view so that I am not duplicating code when two views share similar filter functions. My idea was to create a class that contains a ListCollection and all the appropriate FilterFunctions for that collection. The FilterFunctions would then be applied by methods in that class. The problem I am having is that I can't pass any parameters to the FilterFunction when I assign it to the specific ListCollection. The FilterFunction seems like it needs to be tightly coupled with the view in order to work. To work around this, for application wide filters, I am saving a filter value on my model and then referencing the model from my FilterFunction (which still isn't ideal). However in some cases this isn't appropriate since the filter value doesn't really need to be persisted over the entire application. Does anyone have any thoughts on how to accomplish this? Thanks for the help, Kevin -- Ralf Bokelberg <[EMAIL PROTECTED]> Flex & Flash Consultant based in Cologne/Germany Phone +49 (0) 221 530 15 35
Re: [flexcoders] passing values to FilterFunctions?
I'm using a FilterClass, which holds just the filterFunction and some optional ways to configure the filtering. Every collection, which needs filtering, gets an instance of this FilterClass by assigning collection.filterFunction = filter.filterFunction; Cheers, Ralf. On 5/24/07, Kevin <[EMAIL PROTECTED]> wrote: I would like to attempt to separate my filter functions from my view so that I am not duplicating code when two views share similar filter functions. My idea was to create a class that contains a ListCollection and all the appropriate FilterFunctions for that collection. The FilterFunctions would then be applied by methods in that class. The problem I am having is that I can't pass any parameters to the FilterFunction when I assign it to the specific ListCollection. The FilterFunction seems like it needs to be tightly coupled with the view in order to work. To work around this, for application wide filters, I am saving a filter value on my model and then referencing the model from my FilterFunction (which still isn't ideal). However in some cases this isn't appropriate since the filter value doesn't really need to be persisted over the entire application. Does anyone have any thoughts on how to accomplish this? Thanks for the help, Kevin -- Ralf Bokelberg <[EMAIL PROTECTED]> Flex & Flash Consultant based in Cologne/Germany Phone +49 (0) 221 530 15 35
[flexcoders] passing values to FilterFunctions?
I would like to attempt to separate my filter functions from my view so that I am not duplicating code when two views share similar filter functions. My idea was to create a class that contains a ListCollection and all the appropriate FilterFunctions for that collection. The FilterFunctions would then be applied by methods in that class. The problem I am having is that I can't pass any parameters to the FilterFunction when I assign it to the specific ListCollection. The FilterFunction seems like it needs to be tightly coupled with the view in order to work. To work around this, for application wide filters, I am saving a filter value on my model and then referencing the model from my FilterFunction (which still isn't ideal). However in some cases this isn't appropriate since the filter value doesn't really need to be persisted over the entire application. Does anyone have any thoughts on how to accomplish this? Thanks for the help, Kevin
[flexcoders] Passing values
I'm trying to pass the dimensions of the main window to a component for positioning of a popup. I keep getting the following error: "Error /Main.mxml:18 The property being referenced does not have the static attribute." Here are some code snippets: -- Main.mxml -- ... -- teamList.mxml -- ... I've looked around and I can't find a solution that helps me. I'm new to Flex, so I would appreciate a detailed explaination since I'm obviously not getting it. Thanks, GTB -- 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/