Re: controller question

2011-09-29 Thread Ariel Feinerman
2011/9/28 Ariel Feinerman arielfap...@gmail.com 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

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 delete

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

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 *observe*

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 controller copy one

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 quinceymor...@rivergatesoftware.com On Sep 27, 2011, at 07:40 , Keary Suska wrote: On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote:

Re: controller question

2011-09-27 Thread Kyle Sluder
in its entirety is not KVO-compliant. --Kyle Sluder -- Forwarded message -- From: Kyle Sluder kyle.slu...@gmail.com Date: Tue, Sep 27, 2011 at 10:47 AM Subject: Re: controller question To: Quincey Morris quinceymor...@rivergatesoftware.com On Tue, Sep 27, 2011 at 10:29 AM, Quincey

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

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 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]; //

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: 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 addition

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

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, and

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

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 I

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

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 UIActionSheetDelegate { IBOutlet UITableView *tableView; NSMutableArray *tableList;

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 UIActionSheetDelegate { IBOutlet UITableView

[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

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

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 finished