Re: binding relationship to checkbox

2011-03-08 Thread Amy Gibbs

Sorry, I'm obviously being a bit dim here,

I have got array controllers for both the categories tableview and the  
products tableview,


As I want to list ALL the categories in the tableview I have bound the  
name column to the categories. array controller, arrangedObjects,  
categoryName


Then the checkbox column needs to bind to?

Thanks
On 7 Mar 2011, at 5:28PM, Jerry Krinock wrote:



On 2011 Mar 07, at 08:55, Amy Gibbs wrote:


I still can't work out how I could bind the checkboxes


As I said earlier, think: "array controller".

___

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


Re: binding relationship to checkbox

2011-03-07 Thread Jerry Krinock

On 2011 Mar 07, at 08:55, Amy Gibbs wrote:

> I still can't work out how I could bind the checkboxes

As I said earlier, think: "array controller".

___

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


Re: binding relationship to checkbox

2011-03-07 Thread Amy Gibbs
Sorry, that's what I meant, I would check and uncheck the checkboxes  
to create/break the relationships,


sorry, my fault for describing it incorrectly.

I still can't work out how I could bind the checkboxes to create this  
action?


Thanks

On 7 Mar 2011, at 4:49PM, Jerry Krinock wrote:



On 2011 Mar 07, at 00:58, Amy Gibbs wrote:

I have got a … tableview that currently has a … checkbox column. I  
want to list all the categories that exist in this tableview, and  
select and deselect the checkboxes to create/break the  
relationship(s) between the selected product and the categories.


Am I along the right lines?


That seems pretty weird.  I would think that one would check or  
uncheck the box, not select or deselect the checkbox, which is in  
fact an NSButtonCell.  Checking or unchecking the box could create/ 
break the categories; that would be "along the right lines".


___

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/home%40willowtreecrafts.co.uk

This email sent to h...@willowtreecrafts.co.uk


___

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


Re: binding relationship to checkbox

2011-03-07 Thread Jerry Krinock

On 2011 Mar 07, at 00:58, Amy Gibbs wrote:

> I have got a … tableview that currently has a … checkbox column. I want to 
> list all the categories that exist in this tableview, and select and deselect 
> the checkboxes to create/break the relationship(s) between the selected 
> product and the categories.
> 
> Am I along the right lines?

That seems pretty weird.  I would think that one would check or uncheck the 
box, not select or deselect the checkbox, which is in fact an NSButtonCell.  
Checking or unchecking the box could create/break the categories; that would be 
"along the right lines".

___

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


Re: binding relationship to checkbox

2011-03-07 Thread Amy Gibbs

Hi,

My application has a tab view as the main view (it might look dated  
but I can take it straight from the library and it works)


In one tab I have a table view that holds the 'master' category list.  
Here I can add/remove categories.


In another tab I have my products list. There is a tableview that  
lists the products, and then various other items displaying other  
related data, an image etc. In this tab I have got another  tableview  
that currently has a column for the category name and a checkbox  
column. I want to list all the categories that exist in this  
tableview, and select and deselect the checkboxes to create/break the  
relationship(s) between the selected product and the categories.


Am I along the right lines?

Thanks

Amy

On 6 Mar 2011, at 7:49PM, Jerry Krinock wrote:



On 2011 Mar 05, at 08:20, Amy Heavey wrote:

This sounds to me like something that should be doable with the  
'magic' of bindings


Well, bindings should certainly be involved, but there is more to it  
than that.  The most important is the view that will display your  
"checkbox column".  Assuming that the user can add and delete  
'categories', this view will need to grow or shrink and/or scroll  
with the number of objects it contains, and it would be nice to  
avoid writing that code.  I would study these options:


(a) an NSTableView in source list style.
(b) an NSCollectionView
(c) Last resort, a custom view that you code yourself, containing an  
array of checkboxes


Then, the 'categories' in your data model should interface to this  
view via an array controller, and that's where you'll use bindings.


___

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/home%40willowtreecrafts.co.uk

This email sent to h...@willowtreecrafts.co.uk


___

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


Re: binding relationship to checkbox

2011-03-06 Thread Jerry Krinock

On 2011 Mar 05, at 08:20, Amy Heavey wrote:

> This sounds to me like something that should be doable with the 'magic' of 
> bindings

Well, bindings should certainly be involved, but there is more to it than that. 
 The most important is the view that will display your "checkbox column".  
Assuming that the user can add and delete 'categories', this view will need to 
grow or shrink and/or scroll with the number of objects it contains, and it 
would be nice to avoid writing that code.  I would study these options:

(a) an NSTableView in source list style.
(b) an NSCollectionView
(c) Last resort, a custom view that you code yourself, containing an array of 
checkboxes

Then, the 'categories' in your data model should interface to this view via an 
array controller, and that's where you'll use bindings.

___

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


binding relationship to checkbox

2011-03-05 Thread Amy Heavey

Hi Everyone,

I was wondering if anyone could point me in the right direction for my  
problem?


I'm working on a core data application, and in this issue I have 2  
entities, product and category. They have a many to many relationship.


In my interface I want to have a list of all the categories with a  
checkbox column, so the checkboxes indicate if there is a relationship  
between the selected product and the category. It's along the lines of  
keywords in iPhoto, so I can set/unset the relationships using the  
checkboxes?


This sounds to me like something that should be doable with the  
'magic' of bindings, but I can't see how to do this?


I do appreciate any help anyone can offer me,

Many Thanks

Amy

___

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