public void Setup(XML xml) { XMLList.Enumerator et = xml.GetEnumerator("relation"); string targetId; GObject target; while (et.MoveNext()) { XML cxml = et.Current; targetId = cxml.GetAttribute("target"); if (_owner.parent != null) { if (targetId != null && targetId != "") target = _owner.parent.GetChildById(targetId); else target = _owner.parent; } else { //call from component construction target = ((GComponent)_owner).GetChildById(targetId); } if (target != null) AddItems(target, cxml.GetAttribute("sidePair")); } }
static public int Setup(IntPtr l) { try { FairyGUI.Relations self = (FairyGUI.Relations)checkSelf(l); FairyGUI.Utils.XML a1; checkType(l, 2, out a1); self.Setup(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }