• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Master Detail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Master Detail


  • Subject: Re: Master Detail
  • From: Georg Seifert <email@hidden>
  • Date: Thu, 17 Mar 2011 10:12:24 +0100

No, I meant the detail view changes the value according to the switch. And in my case it is actually a array in the person class and the switch determines if it is the first, the second or the third value to display.

in the TableView I can do that with the datasource methods.

Thanks
g

On 16.03.2011, at 18:50, Quincey Morris wrote:

> On Mar 16, 2011, at 09:57, Georg Seifert wrote:
>
>> If I have a master detail interface bound to a array controller.
>>
>> To explain my problem (the actual structure is different but as an explanation):
>> The list shows a some persons. Then I have a switch that selects if the detail view shows the private or the work address. Is there any easy way do that.
>>
>> Now I use another array controller. On every selection change I make an array of addresses and set as the content array.
>>
>> Is there an easier solution?
>>
>> Or can I change the keypath if the address switch changes?
>
> You should be able to rebind the detail view table column according to the property you want it to display:
>
> 	[tableColumn bind: @"value" toObject: arrayController withKeyPath: @"address property name 1 or 2" options: ...];
>
> Or, you could create one table column for each address, and reconfigure the table to show the appropriate column:
>
> 	[table addTableColumn: tableColumn1];
> 	[table removeTableColumn: tableColumn2];
>
> Or, you could just hide/show columns:
>
> 	[tableColumn1 setHidden: NO];
> 	[tableColumn2 setHidden: YES];
>
> Or, you could have two separate tables, and hide/show the appropriate table:
>
> 	[table1 setHidden: NO];
> 	[table2 setHidden: YES];
>
> It's also possible to create a derived data model "address1OrAddress2" property, but this is only useful if the address mode doesn't need to be set in different ways for different views of the data.
>
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Master Detail (From: Georg Seifert <email@hidden>)
 >Re: Master Detail (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: about keystrokes out of the window
  • Next by Date: Re: about keystrokes out of the window
  • Previous by thread: Re: Master Detail
  • Next by thread: Creating an NSExpression with a keypath and variable
  • Index(es):
    • Date
    • Thread