Placing SimpleTreeData for NSOutline on pasteboard
Placing SimpleTreeData for NSOutline on pasteboard
- Subject: Placing SimpleTreeData for NSOutline on pasteboard
- From: Renaud Boisjoly <email@hidden>
- Date: Thu, 10 Apr 2003 21:11:12 -0400
Hello all!
I've been playing around with the TreeData and SimpleTree stuff from
Apple's DragNDropOutlineView example.
Boy, is it confusing! Well ok, I'm not a very high-level programmer,
but I find it confusing. There are four pieces in all this,
SimpleTreeNode which seems to be a subclass of TreeNode
SimpleNoteData which looks like a subclass of TreeNodeData
TreeNode and TreeNodeData
But for some reason, there is information stored in different places
which are unclear to me. I'm not clear on why they are paired in the
same files and why the file SimpleTreeNode.m contains SimplenoteData
first (or does it make a difference?
SimpleNodeData holds some data and TreeNode has others, so you cannot
just refer to some of the values in the child or parent, but also in
the node part.
Then you use these weird calls (SAFENODE(n) or NODE_DATA(n) to access
the values and all that. Not the simplest of naming schemes.
i read on this list that some people prefer to create their data
structures otherwise. Does any one know where I could read some good
stuff on doing this? any approaches which would make more sense?
The issue I have is that I can get all this to work within a single
document, but in order to support the Pasteboard between documents, I
need to archive all this using NSArchiver and NSUnarchiver, but that
too seems to be complicated because of this different structure.
has anyone built a simple tree structure for storing outline data which
is simpler to use and allows Archiving in a simpler manner? Or know of
another example which could help me understand all this?
What I need is to store RTFD data in each node and have the tools to
manage the outline drag and drop it in the same or a different document.
Thanks for any pointers
Renaud
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.