Re: controller question

2011-09-29 Thread Quincey Morris
On Sep 29, 2011, at 08:20 , Ariel Feinerman wrote: >> 2011/9/28 Ariel Feinerman: >> >> I try to expline the problem. There is m_array (M) loaded from the file in >> the one nib, then there is other two view controllers' nibs (C) with views >> (V). One of them uses array controller to show and d

Re: controller question

2011-09-29 Thread Ariel Feinerman
2011/9/28 Ariel Feinerman > I try to expline the problem. There is m_array (M) loaded from the file in > the one nib, then there is other two view controllers' nibs (C) with views > (V). One of them uses array controller to show and delete only, when the > other is used for insertion only throw d

Re: controller question

2011-09-28 Thread Ariel Feinerman
I try to expline the problem. There is m_array (M) loaded from the file in the one nib, then there is other two view controllers' nibs (C) with views (V). One of them uses array controller to show and delete only, when the other is used for insertion only throw dragging therefor no need in control

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 17:51 , Ariel Feinerman wrote: > So in the case of insertion to m_array, we just have to reset content > property: > > // somewhere in the code > [self willChangeValueForKey: @"content"]; > [m_array insertObject: url atIndex: 0]; > [self didChangeValueForKey: @"content"]

Re: controller question

2011-09-27 Thread Ariel Feinerman
So in the case of insertion to m_array, we just have to reset content property: // somewhere in the code [self willChangeValueForKey: @"content"]; [m_array insertObject: url atIndex: 0]; [self didChangeValueForKey: @"content"]; // in the -observeValue... [controller setContent: m_array]; well?

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 12:18 , Ariel Feinerman wrote: > So it is good news. Do -insertObject: atIndex:, -removeObject: or > removeObjects: use KVO? I guess they do. If you use these methods, you don't have to write any manual synchronization code. Your original array will contain the modified cont

Re: controller question

2011-09-27 Thread Kyle Sluder
ay in its entirety is not KVO-compliant. --Kyle Sluder -- Forwarded message -- From: Kyle Sluder Date: Tue, Sep 27, 2011 at 10:47 AM Subject: Re: controller question To: Quincey Morris On Tue, Sep 27, 2011 at 10:29 AM, Quincey Morris wrote: > However, since part of

Re: controller question

2011-09-27 Thread Ariel Feinerman
Thank you for your letters. So it is good news. Do -insertObject: atIndex:, -removeObject: or removeObjects: use KVO? I guess they do. 2011/9/27 Quincey Morris > On Sep 27, 2011, at 07:40 , Keary Suska wrote: > > On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote: > > On Sep 26, 2011, at 19:03 ,

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 07:40 , Keary Suska wrote: > On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote: > >> On Sep 26, 2011, at 19:03 , Ariel Feinerman wrote: >> >>> if I use persistence NSMutableArray as content array in NSArrayController so >>> [arrayController setContent: m_array]; will controll

Re: controller question

2011-09-27 Thread Keary Suska
On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote: > On Sep 26, 2011, at 19:03 , Ariel Feinerman wrote: > >> if I use persistence NSMutableArray as content array in NSArrayController so >> [arrayController setContent: m_array]; will controller copy one or retain? > > The array controller will *o

Re: controller question

2011-09-26 Thread Quincey Morris
On Sep 26, 2011, at 19:03 , Ariel Feinerman wrote: > if I use persistence NSMutableArray as content array in NSArrayController so > [arrayController setContent: m_array]; will controller copy one or retain? The array controller will *observe* the array, not copy it. > So every deletion or additi

controller question

2011-09-26 Thread Ariel Feinerman
Hi, if I use persistence NSMutableArray as content array in NSArrayController so [arrayController setContent: m_array]; will controller copy one or retain? So every deletion or addition in the controller will come back to origin. Or we must synchronize one or get from controller to write to url?

Re: window controller question

2010-06-28 Thread Jim McGowan
On 29 Jun 2010, at 3:40, Rainer Standke wrote: > trying to clarify another newbie question. I have an app that has multiple > windows per document. I'd like to be able to open and close those windows > independently from each-other. I understand that I should use > NSWindowControllers. So what

Re: window controller question

2010-06-28 Thread Rainer Standke
Thanks, Jens. I have a follow-up question: When I close and re-open the window, the window is 'empty', no content is shown. It turns out that the Window Controller is removed from the document's windowControllers. Since I hung onto it in an iVar on the document I add it back to the doc's window

Re: window controller question

2010-06-28 Thread Jens Alfke
On Jun 28, 2010, at 12:40 PM, Rainer Standke wrote: > - when new document opens I put its window controller into an iVar so that I > can use it as a reference when the user selects a menu to open the main > window. > - then I instantiate one new window controller for each additional window, >

window controller question

2010-06-28 Thread Rainer Standke
Hello all, trying to clarify another newbie question. I have an app that has multiple windows per document. I'd like to be able to open and close those windows independently from each-other. I understand that I should use NSWindowControllers. So what I think I should be doing is this: - when n

Re: [iphone] Release Navigation View Controller Question

2010-01-19 Thread Philip Vallone
Thanks, You are correct. I needed to retain it @property (nonatomic, retain) NSMutableArray *tableList; @property (nonatomic, retain) NSMutableArray *cfrTitleList; Then dealloc it: - (void)dealloc { [tableList release]; [cfrTitleList release]; [super dealloc]; } I spent

Re: [iphone] Release Navigation View Controller Question

2010-01-18 Thread Alexander Spohr
Am 18.01.2010 um 14:40 schrieb Philip Vallone: > Hi this is a follow up question on memory management. In my class > BrowseViewController, I have a UITableView and 2 NSMutableArrays. > > @interface BrowseViewController : UIViewController { > IBOutlet UITableView *tableView; > NSMut

Re: [iphone] Release Navigation View Controller Question

2010-01-18 Thread Philip Vallone
Hi this is a follow up question on memory management. In my class BrowseViewController, I have a UITableView and 2 NSMutableArrays. @interface BrowseViewController : UIViewController { IBOutlet UITableView *tableView; NSMutableArray *tableList; NSMutableArray *cfrTitleLis

Re: [iphone] Release Navigation View Controller Question

2010-01-17 Thread Philip Vallone
Thanks Tom. Great explanation! On Jan 17, 2010, at 6:05 AM, Tom Davie wrote: > Yes, that code is 100% fine. > > Here's the logic from purely your point of view. > > You allocate browserviewController and in doing so take ownership. > You do some stuff with browserviewController. > You are fini

Re: [iphone] Release Navigation View Controller Question

2010-01-17 Thread Tom Davie
Yes, that code is 100% fine. Here's the logic from purely your point of view. You allocate browserviewController and in doing so take ownership. You do some stuff with browserviewController. You are finished with browserviewController, and don't want to do anything else with it, so you resign own

[iphone] Release Navigation View Controller Question

2010-01-17 Thread Philip Vallone
Hi, I have Navigation based application. When I switch from one view to the next I use the following code. In the below code, is it ok to release "browseviewController"? BrowseViewController *browseviewController = [[BrowseViewController alloc] initWithNibName:@"BrowseViewController" bundle: