Re: NSTableview - tableView:heightOfRow: not behaving

2009-07-05 Thread Quincey Morris
On Jul 5, 2009, at 17:06, Alex Holland wrote: - (CGFloat)tableView:(NSTableView *)tv heightOfRow:(NSInteger)row { // Get second column (index 1 - status text) // (first column, index 0, is Twitter profile pic) NSTableColumn *column = [[tv tableColumns] objectAtIndex:1];

Re: Switching Contents of NSView

2009-07-05 Thread Eagle Offshore
If I'm doing a lot of swapping of a limited number of views, I stick them in a tabbed view with hidden tabs. On Jul 5, 2009, at 3:18 PM, Pierce Freeman wrote: Hi Everyone: I am making an application that has a choice of what function the user wants to perform. When the user clicks on thei

NSTableview - tableView:heightOfRow: not behaving

2009-07-05 Thread Alex Holland
Hi, I'm running X-Code 3.1.3 on OS X 10.5.7, Intel Macbook. As a means of getting the hang of Cocoa, and having some fun at the same time, I've been building a simple Desktop Twitter Client. I've previously worked through Hillegass' excellent Cocoa book. Building on his example of using A

Solved: Not receiving notifications on NSArrayController selection changes

2009-07-05 Thread Ken Tozier
Never mind. I figured it out. On Jul 5, 2009, at 11:58 PM, Ken Tozier wrote: Hi I have an NSArrayController bound to an NSArray and am not getting notifications either through my "setXXX method or through explicit "addObserver" links. The property in my class is defined like so: @inter

Not receiving notifications on NSArrayController selection changes

2009-07-05 Thread Ken Tozier
Hi I have an NSArrayController bound to an NSArray and am not getting notifications either through my "setXXX method or through explicit "addObserver" links. The property in my class is defined like so: @interface PMXMainPaletteToolbar : NSView { IBOutletNSPopUpButton

Re: Why Applespell.service fail to launch?

2009-07-05 Thread shuang qin
Hi, Dave, Thanks for your response. This sample code normally works well in most cases. Is Applespell.service launched by [[NSSpellChecker sharedSpellChecker] ? or launched automatically by a NSTextView? I guess the problem in our application might be caused by library conflict but I do not know ho

Re: Sorting an editable tableView of managed object

2009-07-05 Thread Matt Neuburg
On Sat, 04 Jul 2009 21:12:13 -0500, Steve Cronin said: >I didn't add the binding because I only want to add bindings when I >understand the value of doing so. I was commenting on your comment ("no binding", you said, so I said "why not?"). Bindings are just a fancy way of assigning a value to som

Re: Movable Document Modal Dialogs

2009-07-05 Thread Matt Neuburg
On Sun, 5 Jul 2009 08:52:12 -0500, Fritz Anderson said: >On 4 Jul 2009, at 5:41 PM, Matt Neuburg wrote: > >> It is a delightful, yet little-known, fact that sheets can emerge >> from *anywhere* on a window - not merely from its top. ... This is >> unusual but only because (IMHO) not enough develop

Re: Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
Joel: Thanks for the link - I'll definitely check it out. On 7/5/09 6:50 PM, "Joel Norvell" wrote: > > Pierce, > > As an adjunct to "document reading skills," I've found that there's no > substitute for a class browser. > > Andy Lee has written Appkido, an excellent class browser for Cocoa!

Re: Switching Contents of NSView

2009-07-05 Thread Joel Norvell
Pierce, As an adjunct to "document reading skills," I've found that there's no substitute for a class browser. Andy Lee has written Appkido, an excellent class browser for Cocoa! http://homepage.mac.com/aglee/downloads/appkido.html There are other ways to browse the Cocoa class hierarchy, but

Re: Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
Once again, I fail when the documentation succeeds. I¹ll have to work on my documentation reading skills over the next week or so. On 7/5/09 4:33 PM, "Andy Lee" wrote: > Make sure you heed this part of the documentation: > >> This method causes oldView to be released; if you plan to reuse it,

Re: Switching Contents of NSView

2009-07-05 Thread Andy Lee
Make sure you heed this part of the documentation: This method causes oldView to be released; if you plan to reuse it, be sure to retain it before sending this message and to release it as appropriate when adding it as a subview of another NSView. --Andy On Jul 5, 2009, at 7:26 PM, Pierc

Re: Possible NSPredicateEditor bug (found workaround)

2009-07-05 Thread Tom
On 03/07/2009, at 12:26 PM, Tom wrote: Hi everyone, I'm either doing something wrong, or I've found a bug in NSPredicateEditor. Whenever I use setObjectValue: on the NSPredicateEditor, it displays the new predicate, but if I change a couple of the operators (is, contains, begins with,

Re: Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
Kiel: Wasn't suggesting Google is always the right place to look, but in this case it just happened to find it right away. And just checked my preferences, and it did in fact have title selected. Will have to change that... On 7/5/09 4:25 PM, "Kiel Gillard" wrote: > If you are suggesting Goo

Re: Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
I am finally reverting to using NSView's replaceSubview:with: command. The only problem is that when I run this command partnered with addSubview, it removes the view from the window where I placed it originally. This is problematic when I try to go back and forth between views as the application

Re: Switching Contents of NSView

2009-07-05 Thread Kiel Gillard
If you are suggesting Google was the right place to look, unfortunately you are mistaken. Directly underneath the toolbar of the documentation window should be a scope bar that attempts to help you find the information you're looking for. Perhaps you're searching the documentation by Title

Re: How to sum numbers using NSTableView?

2009-07-05 Thread Quincey Morris
On Jul 5, 2009, at 07:43, Sebastijan Bauman wrote: I am using NSTableView and Core Data and would like to sum numbers from two columns and show the sum in third column for every row. Like this: http://www.shrani.si/f/3r/5h/4MNSm4Th/1/picture-2.png what is the easiest way to do this? is the

Re: Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
You're right, I was looking in the wrong place. A good Google search (versus the built in documentation) did the trick. For future reference, it's under "NSBundle Additions" versus the plain "NSBundle". On 7/5/09 3:45 PM, "I. Savant" wrote: > On Jul 5, 2009, at 6:42 PM, Pierce Freeman wrote:

Re: Switching Contents of NSView

2009-07-05 Thread I. Savant
On Jul 5, 2009, at 6:42 PM, Pierce Freeman wrote: That makes sense - I'll definitely try that! And just asking, but from the first link you sent, what does this return? [NSBundle loadNibNamed:@"someNibFile" owner:d]; My assumption is that it's not a view. Come on, you're not even try

Re: Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
That makes sense - I'll definitely try that! And just asking, but from the first link you sent, what does this return? [NSBundle loadNibNamed:@"someNibFile" owner:d]; My assumption is that it's not a view. On 7/5/09 3:31 PM, "I. Savant" wrote: > On Jul 5, 2009, at 6:30 PM, Pierce Freeman wro

Re: Switching Contents of NSView

2009-07-05 Thread I. Savant
On Jul 5, 2009, at 6:31 PM, I. Savant wrote: Read the documentation. It replaces the view you specify with the other view you specify. Put each group in their own container views, then only swap the containers ... ... to be specific, you'll tell the *parent* view (in which you're swapp

Re: Switching Contents of NSView

2009-07-05 Thread I. Savant
On Jul 5, 2009, at 6:30 PM, Pierce Freeman wrote: And for the NSView function that you suggested, does this replace all the subviews in that view as I will most likely have more then one? Read the documentation. It replaces the view you specify with the other view you specify. Put each

Re: Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
I. Savant Depending on the method in which you suggest, I may know how to use load the nib - but I'll take a look at the link. And for the NSView function that you suggested, does this replace all the subviews in that view as I will most likely have more then one? On 7/5/09 3:21 PM, "I. Savant"

How to sum numbers using NSTableView?

2009-07-05 Thread Sebastijan Bauman
Hi everyone. I am using NSTableView and Core Data and would like to sum numbers from two columns and show the sum in third column for every row. Like this: http://www.shrani.si/f/3r/5h/4MNSm4Th/1/picture-2.png what is the easiest way to do this? is there a way to do this in Table Column Bi

Re: Switching Contents of NSView

2009-07-05 Thread I. Savant
On Jul 5, 2009, at 6:18 PM, Pierce Freeman wrote: I am making an application that has a choice of what function the user wants to perform. When the user clicks on their choice, I want a NSView to take on the contents of a specific nib file. I assume there must be a way (hopefully) easy tha

Switching Contents of NSView

2009-07-05 Thread Pierce Freeman
Hi Everyone: I am making an application that has a choice of what function the user wants to perform. When the user clicks on their choice, I want a NSView to take on the contents of a specific nib file. I assume there must be a way (hopefully) easy that this is accomplished with, as most applic

Re: Convenience initialisers

2009-07-05 Thread Andy Lee
On Jul 5, 2009, at 1:40 PM, DKJ wrote: I'm trying to write one of those convenient class initialisers for one of my objects. On my still-incomplete understanding of these matters, this is what I need to have: Header: + (MyObject *)myObject; Implementation: + (MyObject *)myObject {

Re: Convenience initialisers

2009-07-05 Thread Dimitri Bouniol
My mistake haha. I guess you learn something new everyday. On Jul 5, 2009, at 10:55 AM, Chris Hanson wrote: You absolutely can (and should!) send +alloc to self in a class method like this. In a class method, "self" represents the class, not an instance of the class. This is one reason it

Re: Convenience initialisers

2009-07-05 Thread Ken Thomases
On Jul 5, 2009, at 12:40 PM, DKJ wrote: I'm trying to write one of those convenient class initialisers for one of my objects. On my still-incomplete understanding of these matters, this is what I need to have: Header: + (MyObject *)myObject; Implementation: + (MyObject *)myObject {

Re: Convenience initialisers

2009-07-05 Thread Chris Hanson
You absolutely can (and should!) send +alloc to self in a class method like this. In a class method, "self" represents the class, not an instance of the class. This is one reason it's important not to refer to class methods as "static methods," as less dynamic languages do. In Objective-C,

Re: Convenience initialisers

2009-07-05 Thread Dimitri Bouniol
You can't tell 'self' to be allocated. Try this instead: + (MyObject *)myObject { return [[[MyObject alloc] init] autorelease]; } On Jul 5, 2009, at 10:40 AM, DKJ wrote: I'm trying to write one of those convenient class initialisers for one of my objects. On my still-incomplete un

Convenience initialisers

2009-07-05 Thread DKJ
I'm trying to write one of those convenient class initialisers for one of my objects. On my still-incomplete understanding of these matters, this is what I need to have: Header: + (MyObject *)myObject; Implementation: + (MyObject *)myObject { return [[[self alloc] init] auto

Re: Yet another memory management question

2009-07-05 Thread mmalc Crawford
On Jul 5, 2009, at 8:23 AM, Michael Ash wrote: It's the same benefit as anywhere else. You have two places, viewDidUnload and dealloc, which perform the exact same action. They do not perform the "exact same action". In dealloc, you obviously relinquish ownership of all objects you own (and

Re: Wrap to Page method

2009-07-05 Thread Michael Ash
On Sun, Jul 5, 2009 at 10:02 AM, vince wrote: > Can someone point me to documentation that refers to methods that control > Wrap to Page and Wrap to Window functions for a standard text editor? I assume you're referring to these options in TextEdit. TextEdit is provided as sample code by Apple (/D

Re: Yet another memory management question

2009-07-05 Thread Michael Ash
On Sun, Jul 5, 2009 at 12:10 AM, mmalc Crawford wrote: >> Both are fine, but I would suggest something like the following, just >> because it avoids code duplication: >> - (void)viewDidUnload >> { >>   [self dispose]; >> } >> > > It is not clear here what is the benefit of "avoiding code duplicatio

Re: Yet another memory management question

2009-07-05 Thread Shawn Erickson
On Sun, Jul 5, 2009 at 7:01 AM, DKJ wrote: > Have I finally got it right? Your dealloc method must include [super dealloc]; at the end of it. -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Wrap to Page method

2009-07-05 Thread vince
Can someone point me to documentation that refers to methods that control Wrap to Page and Wrap to Window functions for a standard text editor? thanks. v. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Yet another memory management question

2009-07-05 Thread DKJ
On 4-Jul-09, at 21:53 , mmalc Crawford wrote: Use of accessor methods is described plainly here: If I understand this example correctly, I could do the same thin

Re: Movable Document Modal Dialogs

2009-07-05 Thread Fritz Anderson
On 4 Jul 2009, at 5:41 PM, Matt Neuburg wrote: It is a delightful, yet little-known, fact that sheets can emerge from *anywhere* on a window - not merely from its top. ... This is unusual but only because (IMHO) not enough developers take advantage of this feature! More would take advanta

Re: Yet another memory management question

2009-07-05 Thread Ricky Sharp
On Jul 5, 2009, at 4:02 AM, Benjamin Dobson wrote: On 5 Jul 2009, at 05:10:12, mmalc Crawford wrote: If you manipulate an instance variable anywhere other than in an initialiser or a dealloc method, you should use a suitable accessor method. Does this apply to instance variables that ar

Re: Yet another memory management question

2009-07-05 Thread Benjamin Dobson
On 5 Jul 2009, at 05:10:12, mmalc Crawford wrote: If you manipulate an instance variable anywhere other than in an initialiser or a dealloc method, you should use a suitable accessor method. Does this apply to instance variables that are not objects too? ___

Re: Display either date part or time part in LOCAL format

2009-07-05 Thread mmalc Crawford
On Jul 5, 2009, at 12:21 AM, Jacob Rhoden wrote: I am probably overlooking something obvious (I hope) but what is the proper way to convert. either the Date or Time part of an NSDate to a localised string? I know I can do the following but its not exactly localised :( NSDate *now = [[NSDa

Display either date part or time part in LOCAL format

2009-07-05 Thread Jacob Rhoden
I am probably overlooking something obvious (I hope) but what is the proper way to convert. either the Date or Time part of an NSDate to a localised string? I know I can do the following but its not exactly localised :( NSDate *now = [[NSDate alloc] init]; NSDateFormatter *localDate = [[NSDat

[moderator] Re: leaking UIColor objects

2009-07-05 Thread Scott Anguish
ANY discussion of pre release software he is off-topic and grounds for moderation. and breaking of the nda is liable to legal action. there are no frivolous bug reports On 2009-07-04, at 1:15 PM, WT wrote: On Jul 4, 2009, at 4:37 PM, Fritz Anderson wrote: On 4 Jul 2009, at 8:27 AM, WT wr