/// <summary> Returns a hierarchical list of FormEntryCaption objects for the given /// FormIndex /// /// </summary> /// <param name="index"> /// </param> /// <returns> list of FormEntryCaptions in hierarchical order /// </returns> public virtual FormEntryCaption[] getCaptionHierarchy(FormIndex index) { List <FormEntryCaption> captions = new List <FormEntryCaption>(); FormIndex remaining = index; while (remaining != null) { remaining = remaining.NextLevel; FormIndex localIndex = index.diff(remaining); IFormElement element = form.getChild(localIndex); if (element != null) { FormEntryCaption caption = null; if (element is GroupDef) { caption = new FormEntryCaption(Form, localIndex); } else if (element is QuestionDef) { caption = new FormEntryPrompt(Form, localIndex); } if (caption != null) { captions.addElement(caption); } } } FormEntryCaption[] captionArray = new FormEntryCaption[captions.size()]; captions.copyInto(captionArray); return(captionArray); }
public override object callOn(object obj, List args) { int origSize = m_orig.@params().sz(); object[] temp = new object[origSize]; m_bound.copyInto(temp, 0, m_bound.sz()); temp[m_bound.sz()] = obj; args.copyInto(temp, m_bound.sz() + 1, temp.Length - m_bound.sz() - 1); return(m_orig.callList(new List(Sys.ObjType, temp))); }
public override object callList(List args) { int origReq = m_orig.@params().sz(); int haveSize = m_bound.sz() + args.sz(); Method m = m_orig.method(); if (m != null) { origReq = m.minParams(); if (haveSize > origReq) { origReq = haveSize; } } if (origReq <= m_bound.sz()) { return(m_orig.callList(m_bound)); } object[] temp = new object[haveSize]; m_bound.copyInto(temp, 0, m_bound.sz()); args.copyInto(temp, m_bound.sz(), temp.Length - m_bound.sz()); return(m_orig.callList(new List(Sys.ObjType, temp))); }
public override object callOn(object obj, List args) { int origSize = m_orig.@params().sz(); object[] temp = new object[origSize]; m_bound.copyInto(temp, 0, m_bound.sz()); temp[m_bound.sz()] = obj; args.copyInto(temp, m_bound.sz()+1, temp.Length-m_bound.sz()-1); return m_orig.callList(new List(Sys.ObjType, temp)); }
public override object callList(List args) { int origReq = m_orig.@params().sz(); int haveSize = m_bound.sz() + args.sz(); Method m = m_orig.method(); if (m != null) { origReq = m.minParams(); if (haveSize > origReq) origReq = haveSize; } if (origReq <= m_bound.sz()) return m_orig.callList(m_bound); object[] temp = new object[haveSize]; m_bound.copyInto(temp, 0, m_bound.sz()); args.copyInto(temp, m_bound.sz(), temp.Length-m_bound.sz()); return m_orig.callList(new List(Sys.ObjType, temp)); }