Re: Right place to unobserve notifications in a document

2008-08-20 Thread Joan Lluch (casa)
Am Mo,18.08.2008 um 20:14 schrieb Andy Lee: Since the observed object (maybe notification center) will still hold a reference to the observing object, there is a problem. The *observer* will not be freed, if the observed is still living. Obviously you have a problem using GC, for

Re: Right place to unobserve notifications in a document

2008-08-20 Thread Joan Lluch (casa)
Joan Lluch El 20/08/2008, a las 16:05, Negm-Awad Amin escribió: Am Mi,20.08.2008 um 15:37 schrieb Joan Lluch (casa): I've been reading this thread and I don't understand it in the case of GC. Why don't you still have to remove the observer from the notification center when you

Where's the best place for addObserver and removeObserver

2008-07-17 Thread Joan Lluch (casa)
I am coding a single window, multiview, app, and as what I think is a recommended design pattern I only load the views controllers (and therefore their views) from their nibs as they are required, and then I retain them in the main window controller so they do not have to be loaded again

Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Joan Lluch (casa)
El 17/07/2008, a las 18:13, Jonathan Dann escribió: Hi Joan, As Keary says, removing in -dealloc is probably not the best thing to do as there are a few cases that this can bite you, like if your window controller retains the view controllers, and -dealloc is called on the window

Re: Is there any way to show disclosure button always closed in NSOutlineView

2008-07-14 Thread Joan Lluch (casa)
El 14/07/2008, a las 7:49, Aman Alam escribió: I am working on a project that needs the disclosure button of NSOutlineView always closed whether its row are expanded or not. Does anyone know that how to do that? Does not that violate the Apple Human Interface Guidelines?. I mean,

Re: NSTableView prematurely posts selection changed notification

2008-07-10 Thread Joan Lluch (casa)
El 10/07/2008, a las 5:21, Graham Cox escribió: When my app starts up, it opens a floating window containing a table view. As the table is brought to life from the Nib, it posts a selection changed notification to its delegate. At that time it hasn't had its data initialised from the

Re: Why can't I name a property `tag'?

2008-07-10 Thread Joan Lluch (casa)
Joan Lluch El 10/07/2008, a las 18:29, Graham Cox escribió: Well, that's the weird thing. I wasn't getting that warning. I was including both headers, my own usage explicitly using #import, and all of Cocoa implictly using the precompiled headers. I wonder if that's how the compiler

NSOutlineView hiding a column while editing a row in another column

2008-07-10 Thread Joan Lluch (casa)
I have a NSOutlineView which I want to make several columns hidden in response to a user action. I have set up the outlineColumn to resize with table and the rest have fixed size, so that when one or more columns are hidden, the outlineColumn widens accordingly. In normal conditions

Re: Debugging strategy - exceptions

2008-07-09 Thread Joan Lluch (casa)
El 09/07/2008, a las 12:13, Ruotger Skupin escribió: So an exception got thrown for a pretty obvious reason, but where? Could be anywhere, even in WebKit (which we use). Is there any chance to get near the culprit without a stack trace (which I don't have)? This question is more

Re: garbage collection and NSConnection

2008-07-07 Thread Joan Lluch (casa)
El 07/07/2008, a las 0:18, Hamish Allan escribió: On 7/4/08, Chris Hanson [EMAIL PROTECTED] wrote: Under non-GC, an object's memory may not be reclaimed until the current autorelease pool is drained. However, under GC, an object's memory can be reclaimed as soon as the collector can tell

Re: archive only what changed?

2008-07-07 Thread Joan Lluch (casa)
Core Data does a really good job at what you are describing, when using SQLite as a persistent store, although this may not be what are you looking for. The only other approach to this that I think of is to cache the objects that change in your model and then only store these objects

Re: garbage collection and NSConnection

2008-07-06 Thread Joan Lluch (casa)
El 06/07/2008, a las 2:05, mmalc crawford escribió: On Jul 5, 2008, at 3:00 PM, Joan Lluch (casa) wrote: However, let me copy an excerpt of the Cocoa documentation on the GC algorithm that Cocoa uses. You haven't updated your documentation since the beginning of November last year

Re: garbage collection and NSConnection

2008-07-02 Thread Joan Lluch (casa)
El 30/06/2008, a las 19:33, [EMAIL PROTECTED] escribió: hey, I have a project that uses Bonjour for some of its communication, theres a server and a client, and I was having tremendous difficulty getting it to work, pouring and pouring over my code, only to discover some weeks later that

Re: How to deal with a MenuItem with both a binded state property and an action method

2008-06-29 Thread Joan Lluch (casa)
El 28/06/2008, a las 18:44, Keary Suska escribió: 6/28/08 8:54 AM, also sprach [EMAIL PROTECTED]: To sumarize, the problem is that I am not able to change the menuItem state programatically (ie. in myAction) without avoiding the second call to setMenuState. However if the call to myAction

Re: How to deal with a MenuItem with both a binded state property and an action method

2008-06-28 Thread Joan Lluch (casa)
El 28/06/2008, a las 0:23, Keary Suska escribió: 6/27/08 4:06 PM, also sprach [EMAIL PROTECTED]: I am struck in what should be a simple task so I would appreciate any help. I have a menu item which I want to show a default on or off state, so I set up a binding in IB to a BOOL monitor

Re: How to deal with a MenuItem with both a binded state property and an action method

2008-06-28 Thread Joan Lluch (casa)
El 28/06/2008, a las 9:59, Ken Thomases escribió: On Jun 28, 2008, at 2:41 AM, Joan Lluch (casa) wrote: The problem remains because when the user selects the menuItem the following happens: FIRST- myAction is executed (possibly setting menuState to an appropiate value) SECOND

Class Browser and Code Sense not fully working

2008-06-19 Thread Joan Lluch (casa)
Since I upgraded to XCode 3.0 the Class Browser is not longer showing frameworks methods, and also code sense is only showing methods from my own project. I am not able to figure out what setting I should change to remedy this. I have XCode 2.5 installed alongside 3.0 and it does not have

Re: NSTreeControllerTreeNode not documented? [solved]

2008-06-08 Thread Joan Lluch (casa)
El 08/06/2008, a las 13:31, Norbert Heger escribió: On Jun 8, 2008, at 11:28 , Joan Lluch (casa) wrote: An NSOutlineView which is binded to a NSTreeController gives instances of NSTreeControllerTreeNode in the item (or items) parameter of their datasource or delegate methods

crash in outlineView:isGroupItem:

2008-06-08 Thread Joan Lluch (casa)
I am using outlineView:isGroupItem delegate method to create an NSOutlineView that mimics the look of Mail.app or iTunes - (BOOL)outlineView:(NSOutlineView *)sender isGroupItem:(id)item { return ( item [[item representedObject] isKindOfClass: [GroupNode class]] ) ; } My

Re: Is there a way to efficiently access NSArray element contents?

2008-06-08 Thread Joan Lluch (casa)
El 08/06/2008, a las 20:13, Brent Fulgham escribió: I've been enjoying the NSArray/NSMutableArray classes as I work with various user interface features for a program I'm working on that interacts with a legacy C++ library. I've recently begun considering how to efficiently display the

Re: crash in outlineView:isGroupItem:

2008-06-08 Thread Joan Lluch (casa)
El 08/06/2008, a las 22:11, Kyle Sluder escribió: On Sun, Jun 8, 2008 at 1:37 PM, Joan Lluch (casa) [EMAIL PROTECTED] wrote: return ( item [[item representedObject] isKindOfClass:[GroupNode class]] ) ; Style note: you don't need to do this. [[item representedObject] isKindOfClass

How to catch all mouse clicking (or avoid multiple click filtering in startTrackingAt)

2008-04-25 Thread Joan Lluch (casa)
I have implemented a NSButtonCell subclass in the usual way to catch mouse tracking. I get the startTrackingAt and stopTracking messages called correctly on the first click of the mouse. However the startTrackingAt is not quickly called again if I quickly click again the mouse, such as if

Re: [solved] How to catch all mouse clicking (or avoid multiple click filtering in startTrackingAt)

2008-04-25 Thread Joan Lluch (casa)
: On Apr 25, 2008, at 1:29 AM, Joan Lluch (casa) wrote: I have implemented a NSButtonCell subclass in the usual way to catch mouse tracking. I get the startTrackingAt and stopTracking messages called correctly on the first click of the mouse. However the startTrackingAt is not quickly called again