Hello all.

I have a situation. :S.
I have the follow entities and relations: Invoice< >> ItemXInvoice<< > Item..  
The Entity ItemXInvoice has attributes quantity and totalItemPrice, and the 
Item has, descr (description) and unitPrice.

An Instance of NSArrayController for the entity ItemXInvoice

Now I have an NSTable, with 4 columns, Description, Quanity, Unit Price, and 
TotalPrice.  and its model key path biding to:
Description Column : toItem.descr , 
Quantity : quantity.
UnitPrice: toItem.unitPrice
totalItemPrice: totalItemPrice.

so when I click add, it creates a ManageObject ItemXInvoice and insert it into 
the NSArrayController, but of course when I try to put something in the 
columns, Description and UnitPrice,  when I exit the field it disappear because 
the Item for that ItemXInvoice doesn't exist... (thats what I am thinking, am I 
right?).

So I guessI have to implement a custom class of NSArrayController, and be this 
one the class for the Instance of the controller for ItemXItem, then override 
the method add, and there ... what shall I do?

create the NSEntityDescription for Item and set the relation to what?

I dunno what to do here.. any ideas?

Thanks

Gustavo

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to