Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 1, 2009, 12:40 PM   #1
dj.mooky
macrumors newbie
 
Join Date: Feb 2008
managedObjectModel relationship question(core data)

So... I am using bindings, that I learned from reading/watching tutorials for an older version of IB. I know I am the one screwing up on this one I just do not know where, or what to do.


I've got two entities basically
Player and Hand

There's a too many to too many relationship going on here, with appropriate restrictions

I have two tables set up, one with names of all Players, and the other is currently just a list of every number associated with a hand

How is it I make my (hand)second table ONLY show data associated via relationship to a player?

EG: I click on me(dj.mooky) I am not interested in viewing a Hand that does is not associated to the selected Player.

I've got it all set up in bindings like I said

This will be just tremendously helpful once I get the real statistical engine of my app going where I'll suddenly have 5-6 entities instead of just the two during the alpha proof of concept phase.

Current setup is table 1 is bound to Player showing value userName

I know table 2 is setup wrong, but it is bound to Hand showing value handNumber

Thanks in advance
dj.mooky is offline   0 Reply With Quote
Old Jul 2, 2009, 04:56 PM   #2
GeeYouEye
macrumors 68000
 
GeeYouEye's Avatar
 
Join Date: Dec 2001
Location: State of Denial
Send a message via AIM to GeeYouEye Send a message via Yahoo to GeeYouEye
Quote:
Originally Posted by dj.mooky View Post
So... I am using bindings, that I learned from reading/watching tutorials for an older version of IB. I know I am the one screwing up on this one I just do not know where, or what to do.


I've got two entities basically
Player and Hand

There's a too many to too many relationship going on here, with appropriate restrictions

I have two tables set up, one with names of all Players, and the other is currently just a list of every number associated with a hand

How is it I make my (hand)second table ONLY show data associated via relationship to a player?

EG: I click on me(dj.mooky) I am not interested in viewing a Hand that does is not associated to the selected Player.

I've got it all set up in bindings like I said

This will be just tremendously helpful once I get the real statistical engine of my app going where I'll suddenly have 5-6 entities instead of just the two during the alpha proof of concept phase.

Current setup is table 1 is bound to Player showing value userName

I know table 2 is setup wrong, but it is bound to Hand showing value handNumber

Thanks in advance
Bind it to Player.selection.hands.handNumber. And by "it", I'm pretty sure (but not 100% sure) that I mean the NSTableColumn, not the table itself.
__________________
I bring order to chaos. You are in chaos Windows, you are the contradiction, a bug wishing to be an OS.
Visit Softyards Software
NEW DEFINITION OF GEEK
Like politics, free speech, computers, entertainment, and more? Join us at Wordforge.net
GeeYouEye is offline   0 Reply With Quote
Old Jul 3, 2009, 10:58 AM   #3
dj.mooky
Thread Starter
macrumors newbie
 
Join Date: Feb 2008
Quote:
Originally Posted by GeeYouEye View Post
Bind it to Player.selection.hands.handNumber. And by "it", I'm pretty sure (but not 100% sure) that I mean the NSTableColumn, not the table itself.
Thanks for the answer, unfortunately your insight has only illuminated my even further screw up in writing the classes associated with my entities

This is good though... learning to spot my mistakes, and finding out what they are is an amazing thing

When I attempt doing it as you suggested, it gives me a KVC error

I'm currently doing a search to figure out exactly what my error is, I've seen it online, I just did not know how vital it was at the time. I'll post a link in here when I find it incase anyone else ever has this problem.
dj.mooky is offline   0 Reply With Quote
Old Jul 4, 2009, 02:44 PM   #4
dj.mooky
Thread Starter
macrumors newbie
 
Join Date: Feb 2008
So, I think I have found my problem... I don't have time to test it out, however I did not take the time to define the properties in my .h file..

a la: http://developer.apple.com/documenta...orMethods.html
Under declarations....

Going to be a long long day tomorrow
dj.mooky is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
try to set parent entity in managedObjectModel programmatically evana iPhone/iPad Programming 0 Apr 19, 2010 07:31 AM
Adding a Relationship With a Button (Core Data) elzorro Mac Programming 1 Feb 14, 2010 06:42 AM
Iphone Tariff price drop! (when you dump bundled data) madofrain iPhone 1 Nov 19, 2007 09:57 AM
Hard-to-Find Hardware (wireless data) -hh Mac Peripherals 2 Mar 9, 2006 01:32 PM
read and be happy (new, hopefully final) g5 vs. p4 benchmark data) MrJamie Games 1 Jun 25, 2003 07:51 PM


All times are GMT -5. The time now is 07:48 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC