Re: [Flashcoders] xml: counting parents

2010-03-23 Thread Karl DeSaulniers
Actually you can have a field in the employees dataset that lists the manager overseeing and when you query your employee you can pull that field and you can also use a wild card to find all employees under that manager. Best, Karl On Mar 23, 2010, at 9:17 AM, kennethkawam...@gmail.com w

Re: [Flashcoders] xml: counting parents

2010-03-23 Thread kennethkawam...@gmail.com
I am not a database person but I think in this case you would have 2 tables in the database: one for roles/report lines and one for employees - they are two completely different data sets. (And the 3rd table for the relationships between the two.) -- Kenneth Kawamoto http://www.materiaprima.co.uk/

RE: [Flashcoders] xml: counting parents

2010-03-23 Thread Gregory Boudreaux
oders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Dave Watts Sent: Tuesday, March 23, 2010 9:05 AM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents > The thing that's missing, so far, is the structure--who reports to > whom,

Re: [Flashcoders] xml: counting parents

2010-03-23 Thread Dave Watts
> The thing that's missing, so far, is the structure--who reports to > whom, whether it's a direct report or dotted-line, what the hierarchy > is. You have to have that information to have a usable org chart. The hierarchy of the XML document itself can provide that information. The only issue I c

Re: [Flashcoders] xml: counting parents

2010-03-23 Thread Kerry Thompson
Dave Watts wrote: > So if there's an organizational shuffle of roles, I'd have to rewrite > my XML schema? Because that sort of thing happens all the time, and a > rigid hierarchy simply won't be able to match that without frequent > changes. I thought of that, which is why I suggested using some

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
> So if there's an organizational shuffle of roles, I'd have to rewrite > my XML schema? Because that sort of thing happens all the time, and a > rigid hierarchy simply won't be able to match that without frequent > changes. Precisely. My solution uses design patterns, encapsulation and DRY. It

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Dave Watts
> But here I do disagree. An org chart shows the organization of a unit, > and the people are secondary. When Steve Ballmer resigns or gets hired > by Google, Microsoft will still have a president. So if there's an organizational shuffle of roles, I'd have to rewrite my XML schema? Because that so

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Kerry Thompson
Steven Sacks wrote: > I disagree with using explicit node names.  He's building an org chart of > people, so the nodes should be person and the title should be an attribute. > > >     >         >         >             >         >     > It's unusual to find myself disagreeing with Steven Sacks--

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
_ From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [flash...@stevensacks.net] Sent: Monday, March 22, 2010 3:19 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents I disagree with using explicit node na

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Merrill, Jason
h 22, 2010 3:40 PM To: Flash Coders List Subject: RE: [Flashcoders] xml: counting parents nice... is vector do-able in cs3 - because I am egtting an error on that... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com]

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents I disagree with using explicit node names. He's building an org chart of people, so the nodes should be person and the title should be an attribute. You cre

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
I disagree with using explicit node names. He's building an org chart of people, so the nodes should be person and the title should be an attribute. You create a Person VO that you pass the node for deserialization: public class Person {

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Henrik Andersson
Steven Sacks wrote: A few optimizations for general coding practice: uint is slower than int for math and should only be used if you're not doing math on it. Number is faster than uint for numbers higher than int's positive limit. Generally speaking, always use int in for/while loops. I believ

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Kerry Thompson
ng muddled >> >> >> From: flashcoders-boun...@chattyfig.figleaf.com [ >> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [ >> flash...@stevensacks.net] >> Sent: Monday, March 22, 2010 1:15 PM >

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of kennethkawam...@gmail.com [kennethkawam...@gmail.com] Sent: Monday, March 22, 2010 2:06 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents I don't

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
: [Flashcoders] xml: counting parents Why not go from the top down instead of the bottom up? On 3/22/2010 10:33 AM, Lehr, Theodore wrote: > Perhaps I do have a bigger issue (actually, I have LOTS of issues ;-), but > the reason I need to know the depth is my thought was to use that as a means

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread kennethkawam...@gmail.com
[flash...@stevensacks.net] > Sent: Monday, March 22, 2010 1:15 PM > To: Flash Coders List > Subject: Re: [Flashcoders] xml: counting parents > > I think you mean ancestors. A node can only have one parent. Parents can have > many children. > > I think you have a bigger i

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
Why not go from the top down instead of the bottom up? On 3/22/2010 10:33 AM, Lehr, Theodore wrote: Perhaps I do have a bigger issue (actually, I have LOTS of issues ;-), but the reason I need to know the depth is my thought was to use that as a means of assisting in layout for example, s

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Eric E. Dolecki
boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [ > flash...@stevensacks.net] > Sent: Monday, March 22, 2010 1:15 PM > To: Flash Coders List > Subject: Re: [Flashcoders] xml: counting parents > > I think you mean ancestors. A node can only have one parent. Parents can > have > man

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [flash...@stevensacks.net] Sent: Monday, March 22, 2010 1:15 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents I think you mean ancestors. A node can only have one

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
Original Message - From: "Theodore Lehr" To: "Flash Coders List" Sent: Monday, March 22, 2010 12:27:50 PM GMT -05:00 US/Canada Eastern Subject: [Flashcoders] xml: counting parents I am still trying to find a way to see where a child is within the xml - on what level... i

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread kennethkawam...@gmail.com
It's very hackish, but here we go :) Say you have this recursive function: private function transformXMLWithParentCount(original:XML, xml:XML, n:uint):void { for(var i:uint = 0, len:uint = xml.children().length(); i < len; i++){ original..*.(@att == xml.children()[...@att)@parent = n

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread mark . jonkman
quot; To: "Flash Coders List" Sent: Monday, March 22, 2010 12:27:50 PM GMT -05:00 US/Canada Eastern Subject: [Flashcoders] xml: counting parents I am still trying to find a way to see where a child is within the xml - on what level... is it possible to count a nodes parents? So if I

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
I think you mean ancestors. A node can only have one parent. Parents can have many children. I think you have a bigger issue, though. Why do you need to know the depth of an xml node? I can't think of a single example that I would need that information. On 3/22/2010 9:27 AM, Lehr, Theodore w

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Henrik Andersson
Glen Pike wrote: You can access the parent of any XMLNode with it's parentNode property But that is the old xml parser. Most people uses the new one. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/l

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Glen Pike
You can access the parent of any XMLNode with it's parentNode property Lehr, Theodore wrote: I am still trying to find a way to see where a child is within the xml - on what level... is it possible to count a nodes parents? So if I had: 1 would return

[Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
I am still trying to find a way to see where a child is within the xml - on what level... is it possible to count a nodes parents? So if I had: 1 would return that it has 0 parents, 2 would say it has 1 parent, 3 & 4 would say they have 2 parents ho