Binding Tableviews (newbie) problems/questions
Binding Tableviews (newbie) problems/questions
- Subject: Binding Tableviews (newbie) problems/questions
- From: Vince Ackerman <email@hidden>
- Date: Mon, 3 Jan 2005 17:08:25 -0800
I inadvertently posted this to mmalcom's list so forgive me
I've successfully used the tableview example at:
http://cocoadevcentral.com/articles/000080.php to configure the
bindings in mmalcolm's mailbox/email sample code, but would like to do
a couple of different things in a modified but similar project I'm
trying to get working.
1. If I want to have the first column (of the email tableview) display
the index number of the email array, is there a way to do this with
binding's? If I insert a new row in the tableview, I want the first
column of every row to recalculate it's number to reflect the new
order. He uses the "@count" operator to get the total number of objects
in the array, but I want the cell to display it's row number. (I don't
want the tableview to be sortable, which I think I've fixed by binding
the tableview itself to my data, thanks to another post on this list.)
2. I want to get values for each key/value pair in the email array from
somewhere else in my project and use them in the "add" and "insert"
methods. I've kept those (add email) methods from the glue code and
made the connections to the add and insert email buttons as per the
original example, but find a strange behavior. Creating a new mailbox,
then creating a new email for that mailbox, does call the addEmail
method but it doesn't show up in the email tableview.... until I create
a second mailbox, select that, and then select first mailbox. Then the
emails in the first mailbox will show up. I'm not savvy enough to know
what I'm missing here. I assume it's something in the glue code I
didn't include since I cut all of it out, or perhaps something to do
with delegation.
Any help anyone could give me would be great. I am total novice at this
and value the expertise in this list greatly!
Thanks in advance
Vince
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden