Hi Maruan, Thanks for the reply. So I have to re-create the entire tree just because I want to add a new item as the first sibling? Surely, there's got to be a better way...
Gilad On Mon, Jan 16, 2012 at 12:26 PM, Maruan Sahyoun <[email protected]>wrote: > Hi Gilad, > > what about creating a new PDDocumentOutline, add your new entry, append > the existing one and replace the existing with the newly created. > > Maruan Sahyoun > > Am 16.01.2012 um 12:05 schrieb Gilad Denneboom <[email protected] > >: > > > Hi all, > > > > I've been struggling with this issue for a couple of days now... Would > > appreciate any help someone can offer. > > I have a pre-existing PDDocumentOutline object and I want to add to it a > > child as the first sibling, but it doesn't seem possible. > > If I use appendChild() it adds it as the last element in the list, and if > > access one of the children PDOutlineItem-objects, the only thing I can do > > is to use insertSiblingAfter(), which add a sibling *after *it. So it > > doesn't seem possible to insert a new first sibling. > > > > Any ideas? > > > > Thanks in advance, Gilad. >

