Amy, I have a request.  Please consider placing your response above the
history?  You have good stuff to say, but always having to scroll
through the history is aggravating, and provides no value.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Friday, June 27, 2008 5:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Getting parent information from
AdvancedDataGrid

 

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Amy" <[EMAIL PROTECTED]> wrote:
>
> Hi, all;
> 
> I have been using AdvancedDataGrid to display information in a 
> HierarchicalCollection. The parent (container) items contain 
> information on how the child items should be viewed. So the same 
child 
> might be in the tree three different types under different parents. 
I 
> left the view information in the container, since it has nothing to 
do 
> with the actual data contained in the child object.
> 
> The problem I am having is that I don't seem to be able to find a way 
> to get at that data from the parent data when a user clicks on a 
child.

OK, I got the bright idea that I would composite the existing class 
with a new class that has a uid. The class looks like this:

package com.magnoliamultimedia.vo
{
import mx.core.IUID;
import mx.utils.UIDUtil;

public class TaskUID implements IUID
{
private var _task:Task;
private var _uid:String;

public function TaskUID(task:Task)
{
_task=task;
_uid:UIDUtil.createUID();
}

public function get uid():String
{
return _uid;
}

public function set uid(value:String):void
{
throw new Error("Can't directly set UID");
}
public function get task():Task{
return _task;
}
}
}

The problem is that as soon as the ADG loads, I get a ton of "Can't 
directly set UID" errors. I thought Flex was _not supposed_ to set 
UID's on classes that implement IUID? Note that this is not a visual 
clas, these are typed objects in an ArrayCollection of typed objects 
that have ArrayCollections in them named children 
(HierarchicalCollection).

If Flex is adding a UID to my objects, is there any way I can tease it 
out to use it to determine the parent?

Thanks;

Amy

 

Reply via email to