Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:47:26 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  Flex and ActionScript 3.0
| |-+  Flex Builder, Flash Builder & Eclipse (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
| | |-+  Getting Data From MySQL
« previous next »
Pages: 1 [2] Print
Author Topic: Getting Data From MySQL (Read 1678 times)
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #20 on: 10 Mar 2010, 12:25:02 UTC »

Excellent, thanks, and if you open up one of those ObjectProxy elements, what is contained inside?
Logged

coder_ok
Newbie FD
*
Posts: 13


PHP Developer


« Reply #21 on: 10 Mar 2010, 13:14:00 UTC »

[3]   mx.utils.ObjectProxy (@44823a1)   
   name   "127.0.0.1"   
   object   Object (@44fb881)   
      name   "127.0.0.1"   
      tar   "2010-03-10 10:37:15"   
      teks   "ss"   
   tar   "2010-03-10 10:37:15"   
   teks   "ss"   
   type   null   
   uid   "A066E74E-C5B3-0EBC-6DB2-483655AE653B"   
Logged
coder_ok
Newbie FD
*
Posts: 13


PHP Developer


« Reply #22 on: 11 Mar 2010, 21:43:06 UTC »

i'm assuming that you couldn solve this problem  Smiley
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #23 on: 12 Mar 2010, 11:54:27 UTC »

I think unable to solve it isn't correct... more too busy yesterday  Wink

1) datalist should be scoped as private
Code:
[Bindable] private var datalist:ArrayCollection = new ArrayCollection;

2) The reason the COLLECTION_CHANGE event is not firing is because you are creating a new ArrayCollection instance every time your service loads, your listener is referencing the ArrayCollection that was created when your app initialized - you now have lost your reference to this AC, but it will carry on persisting in memory through it's listener. If you need to use the COLLECTION_CHANGE listener, you need to maintain your original AC instance.

So you change your db2Result handler to something like this:

Code:
private function db2Result(e:ResultEvent):void
{
datalist.source = ( db2.lastResult.data.node as ArrayCollection ).source;
datalist.refresh();
lst.invalidateList();
}

As I said, I'd only do this if you absolutely need to do something with the COLLECTION_CHANGE event that can't be achieved with bindings.
« Last Edit: 12 Mar 2010, 11:56:03 UTC by flexy » Logged

Pages: 1 [2] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC