While on the subject of: NSOutlineView
While on the subject of: NSOutlineView
- Subject: While on the subject of: NSOutlineView
- From: April Gendill <email@hidden>
- Date: Tue, 29 Jul 2003 22:32:56 -0700
Ok I have the huge purple Cocoa Programing book, as well as the
vermont recipies, the two oreillys books and that other one.... any
way... The coverage of table and outline views is at best, brief.
Not that it makes a difference because I've learned more from this
list and pouring over the example source than I have from all of the
books put together. The problem is... Table and outline views might as
well be molecular biology as far as I'm concerned.
I have absolutely no idea how they work... I have data getting into a
table and I have no idea how because the compiler tells me what I can
see as plain as day, that the functions return nothing, do nothing, are
useless. one of them declares a variable that never gets used, there is
no return at all even though there is suppose to be, and yet if I
comment the declaration of the varaible out, the data will not show up
in the table. so every time i compile it tells me i have unused
varaibles. well duh I'm not using them but some one some where is,
because they are the difference between the data showing and not
showing.
I would sell my first born for a "for dummys" level explanation of
outline and table views. How they work, how to manipulate the data, and
most of all how to drag an item in a table view from one position to
the next without it making a copy.
Why do all the examples do this?? its pointless. The only reason to
move a piece of data in a table is to MOVE it not copy it. I thought
NSDragOperationCopy had something to do with it, but none of the other
options like NSDragOperationMove or what ever, make a difference.
is there some where on this planet with a very basic and clear
explaination of how to create usable table and outline views? All i
need to do is take a dictionary, put it in a view and let a user
manitpulate it (thus altering the dictionary which is a whole new can
of worms i've not gotten to.) Since this takes an outline view and I
have given up any hope of grasping them I thought hmm maybe if I took a
table view for the root of each dictionary, and when a user clicked the
root item, in a second table view object they would see the dictionary
contents(and be able to change them), that would work. It would be
ugly, cheap and not at all what I wanted, but it would work. And maybe
with a few more decades of trying, I'd get the outline to work.
no such luck.
On Tuesday, July 29, 2003, at 09:10 PM, Scott Anguish wrote:
>
That is a bit more confusing than it really needs to be... No reason
>
to subclass here.
>
>
look at NSOutlineView's delegate methods.. specifically.
>
>
outlineViewSelectionDidChange:
>
outlineViewSelectionIsChanging:
>
selectionShouldChangeInOutlineView:
>
>
If you implement -
>
(BOOL)selectionShouldChangeInOutlineView:(NSOutlineView *)outlineView
>
then you can know when the change is going to happen, grab the data in
>
the text view and store it with the selected object, and then approve
>
the change.
>
>
Then implement outlineViewSelectionDidChange: and update the text view
>
with the newly selected data.
>
>
<http://developer.apple.com/documentation/Cocoa/Reference/
>
ApplicationKit/ObjC_classic/Classes/NSOutlineView.html>
>
>
>
On Tuesday, July 29, 2003, at 7:09 PM, Andreas Mayer wrote:
>
>
> Am Mittwoch, 30.07.03 um 00:39 Uhr schrieb Daniel Howard:
>
>
>
>> If this does make any sense to anyone, and you think you can help me
>
>> in one
>
>> way or the other,
>
>
>
> Subclass the text view and let it know it's source. Whenever the text
>
> view is to be updated with a new source object, it can save back the
>
> changes to the last one.
>
_______________________________________________
>
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.
_______________________________________________
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.