Updating a total when rows are added
Updating a total when rows are added
- Subject: Updating a total when rows are added
- From: Wayne Pascoe <email@hidden>
- Date: Sat, 13 May 2006 21:12:58 +0100
Hi all,
I think I _finally_ have a Core Data question where Core Data is
relevant :D
I have an NSTableView that I drag files to. In my acceptDrop method,
I get more information about the path that is dragged, including the
size of the file.
I want to update a total 'size' field in a different Entity every
time more files are dragged into the archive or whenever files are
deleted from the archive.
Please can someone tell me if I am on the right track for additions
with this solution:
1. Set the Files entity (the entity that contains the list of files)
to have a custom class
2. In the custom class, override the awakeFromInsert method so that
it updates the totalSize attribute in the Capacity entity
If this is correct, then my question is what method should I override
to update the totalSize attribute when files are deleted ?
Thanks in advance,
--
Wayne Pascoe (gpg --keyserver www.co.uk.pgp.net --recv-keys 79A7C870)
It could be dangerous... A lot of killing...
and violence. You wanna come?
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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