Re: [flexcoders] Re: Databinding and modellocator

2007-11-25 Thread Ralf Bokelberg
Your posting has ModelLocator in the subject. If you had an additional level between the user object and the binding (like the ModelLocator of Cairngorm), it would work as well. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical

[flexcoders] Re: Databinding and modellocator

2007-11-24 Thread nxzone
For me too but you dont change the user during runtime. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ [Bindable] private var userBind : User = User.getInstance(); private function changeUser():void{ User.setUser(new

Re: [flexcoders] Re: Databinding and modellocator

2007-11-24 Thread Ralf Bokelberg
You are binding to the concrete instance of the User. If you change the instance, the binding is lost. If you change the content of the bound User object, it should work. Cheers Ralf On Nov 24, 2007 4:55 PM, nxzone [EMAIL PROTECTED] wrote: For me too but you dont change the user during

[flexcoders] Re: Databinding and modellocator

2007-11-24 Thread nxzone
Yes, the binding is lost because it now working. But do you know how to do this? Now i'm doing this with a watcher and is working. Anybody have another suggestion? Thank you --- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: You are binding to the concrete instance of

Re: [flexcoders] Re: Databinding and modellocator

2007-11-23 Thread Ralf Bokelberg
Is fullname declared as bindable as well? Cheers Ralf. On Nov 23, 2007 8:05 PM, nxzone [EMAIL PROTECTED] wrote: Thank you for you answer. But is not working... I tried this: In User.AS public static function setUser(u:User):void{ loggedUser=u; } public static function

[flexcoders] Re: Databinding and modellocator

2007-11-23 Thread nxzone
Thank you for you answer. But is not working... I tried this: In User.AS public static function setUser(u:User):void{ loggedUser=u; } public static function getInstance():User{ if(loggedUser==null){ loggedUser= new User(0,Pas, } return loggedUser; } In Myapp.mxml [Bindable] private

[flexcoders] Re: Databinding and modellocator

2007-11-23 Thread nxzone
Should i user a observer/watcher --- In flexcoders@yahoogroups.com, nxzone [EMAIL PROTECTED] wrote: Why databinding is not working? User class in bindable. When I set the new user, with setUser the fullname in Myapp in not changed. In User.AS public static function

Re: [flexcoders] Re: Databinding and modellocator

2007-11-23 Thread Ralf Bokelberg
Binding is based on the name of a property, it doesn't work if there is a method call involved. Assign the model returned by getInstance to a local bindable property and bind to it instead. Cheers Ralf. On Nov 23, 2007 5:42 PM, nxzone [EMAIL PROTECTED] wrote: Should i user a

[flexcoders] Re: Databinding and modellocator

2007-11-23 Thread nxzone
Yes, all the class --- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: Is fullname declared as bindable as well? Cheers Ralf. On Nov 23, 2007 8:05 PM, nxzone [EMAIL PROTECTED] wrote: Thank you for you answer. But is not working... I tried this:

Re: [flexcoders] Re: Databinding and modellocator

2007-11-23 Thread Ralf Bokelberg
The following code works for me ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ [Bindable] private var userBind : User = User.getInstance(); ]] /mx:Script mx:Button label={

[flexcoders] Re: Databinding of a read only property

2007-03-08 Thread durnelln
But if there is no setter function... protected var _testVar:uint = 10; [Bindable] public function get testVar():uint { return _testVar; } ...then my class can only modify testVar through the protected _testVar property - which isn't bindable and therefore does not cause data

[flexcoders] Re: Databinding of a read only property

2007-03-08 Thread durnelln
But testVar is only read-only to outside users - I still want to modify it within my class and have the changes broadcast to anyone that wants to bind to it! Anyone? Nick. --- In flexcoders@yahoogroups.com, Paul DeCoursey [EMAIL PROTECTED] wrote: For read-only properties yu don't set them

Re: [flexcoders] Re: Databinding of a read only property

2007-03-08 Thread Tom Chiverton
On Thursday 08 Mar 2007, durnelln wrote: ...then my class can only modify testVar through the protected _testVar property - which isn't bindable and therefore does not cause data bindings to update! Have your update code dispatchEvent() and do it that way ? -- Tom Chiverton Helping to

[flexcoders] Re: Databinding of a read only property

2007-03-08 Thread durnelln
Thanks Tom, I've now changed my class to inherit from EventDispatcher and I manually dispatch a named event when testVar changes. The definition of testVar is now: protected var _testVar:uint = 10; [Bindable(properyChange)] public function get testVar():uint { return _testVar;

Re: [flexcoders] Re: Databinding of a read only property

2007-03-08 Thread Tom Chiverton
On Thursday 08 Mar 2007, durnelln wrote: simple combination of [Bindable]/getter/setter methods to get Flex Builder to do all this automatically but ho hum...! FB is very GUI orientated, one reason I don't miss it that much on Linux. Now I see the next rev. will have things like refactoring

Re: [flexcoders] Re: Databinding of a read only property

2007-03-08 Thread Troy Gilbert
simple combination of [Bindable]/getter/setter methods to get Flex Builder to do all this automatically but ho hum...! FB is very GUI orientated, one reason I don't miss it that much on Linux. Now I see the next rev. will have things like refactoring support, so it might become a bit more of a

Re: [flexcoders] Re: Databinding of a read only property

2007-03-08 Thread Tom Chiverton
On Thursday 08 Mar 2007, Troy Gilbert wrote: It's got nothing to do with Flex Builder FB lacks handy code orientated wizards, such as one to create various types of get/set accessors, choosing instead to focus on GUI building wizards. Just to be clear- this is a perfectly fine thing for Adobe

[flexcoders] Re: Databinding of a read only property

2007-03-07 Thread Paul DeCoursey
For read-only properties yu don't set them as Bindable Because the data binding from a read-only property occurs only once at application start up, you omit the [Bindable] metadata tag for the read-only property. Paul --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

[flexcoders] Re: Databinding on an XML node via node index

2006-10-27 Thread ben.clinkinbeard
XMLListCollection is the XML-based equivalent of ArrayCollection and provides a getItemAt() method as well. HTH, Ben --- In flexcoders@yahoogroups.com, iko_knyphausen [EMAIL PROTECTED] wrote: I am binding a text control to an XML (e4x) node via index. Looks something like mx:Text

[flexcoders] Re: Databinding on an XML node via node index

2006-10-27 Thread iko_knyphausen
Thanks Ben. I may be trying the wrong thing here, but this is the only workingway I came up with: mx:XMLListCollection id="xlcReportGrid" source="{XMLList(cbReportInfoName.selectedItem.lineItems.columns.column)}"/ and then the Text control that binds to

[flexcoders] Re: databinding...

2006-06-23 Thread augie3333
Here is a real quick proto I wrote for you where I stuff your textInputs everything into an object. Click the Set Text button to c the data binded to the texfield. If you have any questions shoot a reply. Thanks, -Augie Marcello III !* RecordData.as * import

Re: [flexcoders] Re: databinding...

2006-06-23 Thread Ralf Bokelberg
Hi Doug, binding is a one way connection. You need to bind in the other direction as well. If you instantiate your model with mxml you can use the same syntax as in your textfields. model:RecordData id=record model:firstName{firstName.text}/model:firstName

[flexcoders] Re: databinding back to source?

2006-05-27 Thread Tim Hoff
This is a known binding issue with B3. For now, you can refresh the tree with: tree.invalidateList(); -TH --- In flexcoders@yahoogroups.com, Rick Schmitty [EMAIL PROTECTED] wrote: Thank you for the reply! Sorry, I wasnt sure of the exact question because I wasnt sure what I was

[flexcoders] Re: databinding back to source?

2006-05-26 Thread Michael Montagna
I'm not exactly sure what the question is, but it seems you're asking if changes to data pulled from the Tree will be seen in the original data structure? If that's what you mean, then you don't need binding, the Tree control already uses (and returns) your data by reference. If you get a

Re: [flexcoders] Re: databinding back to source?

2006-05-26 Thread Rick Schmitty
Thank you for the reply! Sorry, I wasnt sure of the exact question because I wasnt sure what I was looking for. So yes the data does update, but the visual component itself does not. For example, if you expand the tree, and edit controls, when you click on controls in the list view, the

RE: [flexcoders] Re: databinding issue for combobox

2006-03-30 Thread Stefan Richter
Sorry to hijack this thread. Thanks for the example Tracy. I have somewhat changed it for Flex2 and run into a small issue. I am using 2 ArrayCollections, one for the combobox and one for the datagrid: [Bindable]public var cbDP:ArrayCollection;[Bindable]public var

[flexcoders] Re: databinding issue for combobox

2006-03-30 Thread rgwilson26
@yahoogroups.com Subject: RE: [flexcoders] Re: databinding issue for combobox Here is a sample app that migh approach what you want. It assumes the item object structures are the same for both controls. Tracy ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http

RE: [flexcoders] Re: databinding issue for combobox

2006-03-30 Thread Tracy Spratt
@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Stefan Richter Sent: Thursday, March 30, 2006 4:30 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: databinding issue for combobox Sorry to hijack this thread. Thanks for the example Tracy. I have somewhat changed

RE: [flexcoders] Re: databinding issue for combobox

2006-03-30 Thread Stefan Richter
a new object. Tracy From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Stefan RichterSent: Thursday, March 30, 2006 4:30 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Re: databinding issue for combobox Sorry

RE: [flexcoders] Re: databinding issue for combobox

2006-03-30 Thread Tracy Spratt
; }//copyObject From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Stefan Richter Sent: Thursday, March 30, 2006 2:57 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: databinding issue for combobox Good point. Any idea how that's best

[flexcoders] Re: databinding issue for combobox

2006-03-29 Thread rgwilson26
Basically I am calling a query that will populate a combobox. Then the user will be able to use a click event that will send that value from the combo box to a datagrid. Right now it sends a value from the combobox to the datagrid, but what is displayed is [object Object] instead of the

Re: [flexcoders] Re: databinding issue for combobox

2006-03-29 Thread Anatole Tartakovsky
And you are looking for cmbDept.selectedItem.data or cmbDept.selectedItem.label? - Original Message - From: rgwilson26 To: flexcoders@yahoogroups.com Sent: Wednesday, March 29, 2006 10:15 AM Subject: [flexcoders] Re: databinding issue for combobox

[flexcoders] Re: databinding issue for combobox

2006-03-29 Thread rgwilson26
are looking for cmbDept.selectedItem.data or cmbDept.selectedItem.label? - Original Message - From: rgwilson26 To: flexcoders@yahoogroups.com Sent: Wednesday, March 29, 2006 10:15 AM Subject: [flexcoders] Re: databinding issue for combobox Basically I am calling

[flexcoders] Re: databinding issue for combobox

2006-03-29 Thread Cristian Pop
? - Original Message - From: rgwilson26 To: flexcoders@yahoogroups.com Sent: Wednesday, March 29, 2006 10:15 AM Subject: [flexcoders] Re: databinding issue for combobox Basically I am calling a query that will populate a combobox. Then the user will be able to use

RE: [flexcoders] Re: databinding issue for combobox

2006-03-29 Thread Tracy Spratt
[mailto:[EMAIL PROTECTED] On Behalf Of rgwilson26 Sent: Wednesday, March 29, 2006 10:16 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: databinding issue for combobox Basically I am calling a query that will populate a combobox. Then the user will be able to use a click event

Re: [flexcoders] Re: databinding issue for combobox

2006-03-29 Thread Jignesh Dodiya
object.Perhaps you just want:dgResources.addItem(cmbDept.selectedItem); Tracy-Original Message-From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] OnBehalf Of rgwilson26 Sent: Wednesday, March 29, 2006 10:16 AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Re: databinding

[flexcoders] Re: databinding issue for combobox

2006-03-29 Thread rgwilson26
To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: databinding issue for combobox Basically I am calling a query that will populate a combobox. Then the user will be able to use a click event that will send that value from the combo box to a datagrid. Right now it sends a value from

RE: [flexcoders] Re: databinding issue for combobox

2006-03-29 Thread Tracy Spratt
Sent: Wednesday, March 29, 2006 8:32 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: databinding issue for combobox Here is a sample app that migh approach what you want. It assumes the item object structures are the same for both controls. Tracy ?xml version=1.0 encoding=utf-8

[flexcoders] Re: databinding issue for combobox

2006-03-28 Thread Jignesh Dodiya
it may be possible that you sending full object to Datagrid. not sure but it may posible that u need to send the specific element from your object from combo-box to datagrid with specific column id...i mean object.columnID An object automatically settle to data grid with column name while