Re: Methods that return autoreleased objects?

2008-06-28 Thread mmalc crawford
On Jun 28, 2008, at 9:59 PM, Charles Srstka wrote: Methods that begin with "alloc" or "new" or contain "copy" will return objects you are responsible for. All other objects returned from methods are taken care of. Well, there is the notable exception of top-level objects loaded from a NI

Re: Garbage Collection woes...

2008-06-28 Thread Stephen J. Butler
On Fri, Jun 27, 2008 at 2:31 PM, John Engelhart <[EMAIL PROTECTED]> wrote: > Lesson #2: Since there is so little documentation about the GC system, this > involves a lot of speculation, but I think it summarizes what's really going > on. This all started with an effort to keep a __weak reference

Re: Building a Setup Assistant

2008-06-28 Thread Andy Lee
On Jun 29, 2008, at 1:35 AM, David Wilson wrote: On Sat, Jun 28, 2008 at 11:00 PM, Andy Lee <[EMAIL PROTECTED]> wrote: And remember that the last tab you had open when you save the nib is the one that will be open when the nib is loaded. I often forget this when I go in to tweak something.

Re: NSExpression

2008-06-28 Thread Chris
If anyone has a clue how to use it, I'd be grateful. This was my unsuccessful attempt: NSExpression * ex = [NSExpression expressionForFunction:[NSExpression expressionForConstantValue:@"BAR"] selectorName:@"length" arguments:nil]; NSPredicate * predicate = [NSCompoundPredicate andPr

Re: Building a Setup Assistant

2008-06-28 Thread David Wilson
On Sat, Jun 28, 2008 at 11:00 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > And remember that the last tab you had open when you save the nib is the one > that will be open when the nib is loaded. I often forget this when I go in > to tweak something. Better yet, remember that there's an option in t

XML-RPC Cocoa Parsing

2008-06-28 Thread Rick Langschultz
Hello everyone, I am trying to use XML-RPC for my data access on a web server (HTTPS). I wanted to know if parsing the XML-RPC data can be handled using NSXMLDocument and parsing the , , , XML- RPC tags. Also, initWithContentsOfURL doesn't seem to fit that well... Should I use initWithXML

Re: Methods that return autoreleased objects?

2008-06-28 Thread Charles Srstka
On Jun 28, 2008, at 7:43 PM, Markus Spoettl wrote: Methods that begin with "alloc" or "new" or contain "copy" will return objects you are responsible for. All other objects returned from methods are taken care of. Well, there is the notable exception of top-level objects loaded from a NIB

Re: Output of NSHTTPCookieStorage to NSTableView

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 9:46 PM, Chris Purcell <[EMAIL PROTECTED]> wrote: > Hello, > Not sure where my problem is I've tried a few things and no success. I am > trying to output NSHTTPCookieStorage *cookies array to a table view. > Whenever I call the objectValueForTableColumn:row method the app

Output of NSHTTPCookieStorage to NSTableView

2008-06-28 Thread Chris Purcell
Hello, Not sure where my problem is I've tried a few things and no success. I am trying to output NSHTTPCookieStorage *cookies array to a table view. Whenever I call the objectValueForTableColumn:row method the app errors out, but if I leave it out the app launches displaying the correct

Re: trackmouse problems in Leopard

2008-06-28 Thread Graham Cox
Not really a very helpful answer, since a) it's not deprecated, and b) every existing NSCell class depends on it. G. On 29 Jun 2008, at 9:57 am, William Squires wrote: it's probably deprecated... :) ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Ask for help when encountering GC issues (was Re: Garbage Collection woes...)

2008-06-28 Thread Chris Hanson
On Jun 27, 2008, at 12:31 PM, John Engelhart wrote: Lesson #1: If you have any interest in performance, you must avoid, at all costs, "writing" to a __strong pointer. If this were the case, all assignments to instance variables would be exceptionally costly under GC. They are not -- appli

Re: mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread Alex Wait
indeed it was. it's not needed. I took it out. On Sat, Jun 28, 2008 at 9:19 PM, mmalc crawford <[EMAIL PROTECTED]> wrote: > > On Jun 28, 2008, at 8:51 PM, Alex Wait wrote: > > i've read most of >> http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_C

Re: mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread mmalc crawford
On Jun 28, 2008, at 8:51 PM, Alex Wait wrote: i've read most of http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_Class/Reference/Reference.html and I don't see what you mean. is there some "magic" key? No, there is no magic key. why isn't it

RE: Methods that return autoreleased objects?

2008-06-28 Thread Omar Qazi
Oops. Sorry for the double reply. Stupid phone doesn't have a threaded view. -Original Message- From: Shawn Erickson <[EMAIL PROTECTED]> Sent: Saturday, June 28, 2008 5:32 PM To: john muchow <[EMAIL PROTECTED]> Cc: cocoa-dev@lists.apple.com Subject: Re: Methods that return autoreleased ob

RE: Methods that return autoreleased objects?

2008-06-28 Thread Omar Qazi
Well theres no way to know, unless it's specifically mentioned in the documentation, but it really shouldn't matter. If you need the object retain it, if you don't let someone else worry about it. -Original Message- From: john muchow <[EMAIL PROTECTED]> Sent: Saturday, June 28, 2008 5:24

RE: Building a Setup Assistant

2008-06-28 Thread Omar Qazi
NSViewController will hanfle view swapping stylishly. The oreily book is really outdated. Read Hillegas' instead. I'd link you but I am writing this on my phone. -Original Message- From: Christopher Keath <[EMAIL PROTECTED]> Sent: Saturday, June 28, 2008 2:14 PM To: cocoa-dev@lists.appl

Re: mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread Alex Wait
i've read most of http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_Class/Reference/Reference.html and I don't see what you mean. is there some "magic" key? why isn't it Person or array? I tried doing [controller addObject:newObj]; [table reload

Re: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]

2008-06-28 Thread Kyle Sluder
On Sat, Jun 28, 2008 at 9:35 PM, Owen Yamauchi <[EMAIL PROTECTED]> wrote: > On Sat, Jun 28, 2008 at 6:24 PM, Ben Trumbull <[EMAIL PROTECTED]> wrote: >>> Which is, frankly, a bit goofy and, thus, the primary reason why I >>> would avoid using -valueForKey: on a dictionary. >> >> Amen. It's slower,

Re: mutableArrayForKeyValue Question

2008-06-28 Thread Kyle Sluder
Gah! For some reason Gmail sorted this message as newer than your other, properly detailed message. I really apologize for that. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comme

Re: mutableArrayForKeyValue Question

2008-06-28 Thread Kyle Sluder
On Sat, Jun 28, 2008 at 10:39 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > I am trying to modify the array controller programmatically and I'm running > into problems using mutableArrayForKeyValue > > I am using this line > >id proxy = [controller mutableArrayValueForKey:@"Person"]; ... and? Yo

Re: mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread mmalc crawford
On Jun 28, 2008, at 7:42 PM, Alex Wait wrote: I am trying to modify the array controller programmatically and I'm running into problems using mutableArrayForKeyValue I am using this line id proxy = [controller mutableArrayValueForKey:@"Person"]; when I do [proxy addObject:newPerson] I g

Re: Building a Setup Assistant

2008-06-28 Thread Andy Lee
On Jun 28, 2008, at 7:34 PM, Jens Alfke wrote: (Once you hide the tabs in IB, you may wonder how you get to the different views to edit their contents. If you select the tab view itself, its attributes inspector pane has a stepper control to select the different items. Or you can use the out

mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread Alex Wait
Gmail sent an email on me while I was typing. No idea what happened! :) So please ignore the incomplete message. I have successfully done some more bindings (they're so much fun ^_^ ) I am trying to modify the array controller programmatically and I'm running into problems using mutableArrayForKe

mutableArrayForKeyValue Question

2008-06-28 Thread Alex Wait
I have successfully done some more bindings (they're so much fun ^_^ ) I am trying to modify the array controller programmatically and I'm running into problems using mutableArrayForKeyValue I am using this line id proxy = [controller mutableArrayValueForKey:@"Person"]; -- If you can't b

Re: NSTextView to replace NSTextList confused

2008-06-28 Thread Kyle Sluder
On Sat, Jun 28, 2008 at 8:28 PM, Papa-Raboon <[EMAIL PROTECTED]> wrote: > So I did this and changed the header file for my mainController to > take the NSTextView into consideration by changing: > > IBOutlet NSTextField* theNotes; > > to: > > IBOutlet NSTextView *theNotes; > > I then built

Re: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]

2008-06-28 Thread Owen Yamauchi
On Sat, Jun 28, 2008 at 6:24 PM, Ben Trumbull <[EMAIL PROTECTED]> wrote: >> Which is, frankly, a bit goofy and, thus, the primary reason why I >> would avoid using -valueForKey: on a dictionary. > > Amen. It's slower, and people reading your code can get very confused. Then is there a recommended

Re: Methods that return autoreleased objects?

2008-06-28 Thread Owen Yamauchi
Don't think about it. If memory management confuses you in any way, don't try to think about the status of objects returned from framework methods. Only worry about it from the perspective of your code. Do you need the object to stay around after your method returns? Then retain it, and remember t

valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]

2008-06-28 Thread Ben Trumbull
On Jun 28, 2008, at 1:08 PM, Kyle Sluder wrote: On Sat, Jun 28, 2008 at 2:14 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: You want -objectForKey: -valueForKey: is for key value coding, -objectForKey: is for extracting objects from a dictionary. Shouldn't cause a problem. I thought the colle

NSURLConnection vs CF and other ideas

2008-06-28 Thread Alex Kac
I've got a working HTTP Post with file upload using NSURLConnection, but I don't seem to see any ways to get progress on the upload beyond the connectionDidFinishLoading: delegate. Is there a better way to be able to get progress info so we can display that to the user? I checked the archiv

Garbage Collection woes...

2008-06-28 Thread John Engelhart
A few days ago, I decided to give leopards GC system another crack. The experience was pretty much the same as all my other experiences have been with Leopards GC system (several days wasted). I learned two important things that I thought I would share: Lesson #1: If you have any interes

Re: Methods that return autoreleased objects?

2008-06-28 Thread Markus Spoettl
On Jun 28, 2008, at 5:25 PM, john muchow wrote: The last thread that I saw on this topic was dated sometime in 2004if there is something more recent that I didn't find, I apologize up front... I realize nothing has probably changed as far as the API and the documentation to indicate autorele

Re: List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Markus Spoettl
On Jun 28, 2008, at 5:07 PM, Quincey Morris wrote: The last-modified date on that page is Feb, 2007. Seems like a long time for such a fundamental document to be incomplete. That may be a good thing to mention when you file a bug report against the documentation. ;) Done, 6042235. Regard

Re: Methods that return autoreleased objects?

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 5:25 PM, john muchow <[EMAIL PROTECTED]> wrote: > The last thread that I saw on this topic was dated sometime in > 2004if there is something more recent that I didn't find, I > apologize up front... > > I realize nothing has probably changed as far as the API and the > d

NSTextView to replace NSTextList confused

2008-06-28 Thread Papa-Raboon
Hi there guys. I am a newbie to OOP and cocoa and as a personal project I have been building a simple little app to allow me to quickly add people to the Apple address book and at the moment it works well using NSTextFields for every field, however I want to use an NSTextView to enter the text for

Methods that return autoreleased objects?

2008-06-28 Thread john muchow
The last thread that I saw on this topic was dated sometime in 2004if there is something more recent that I didn't find, I apologize up front... I realize nothing has probably changed as far as the API and the documentation to indicate autoreleased methods, however, can someone provide any ins

Re: List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Quincey Morris
On Jun 28, 2008, at 16:38, Markus Spoettl wrote: On Jun 28, 2008, at 4:06 PM, Clark Cox wrote: They're listed in the NSKeyValueCoding.h header, but it seems that they aren't included in the equivalent documentation (

Re: trackmouse problems in Leopard

2008-06-28 Thread William Squires
it's probably deprecated... :) On Jun 28, 2008, at 8:24 AM, Moray Taylor wrote: Hi, hope someone can help... I have an app that uses a custom NSCell that implements the - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouse

Re: List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Markus Spoettl
On Jun 28, 2008, at 4:06 PM, Clark Cox wrote: They're listed in the NSKeyValueCoding.h header, but it seems that they aren't included in the equivalent documentation (

Re: Building a Setup Assistant

2008-06-28 Thread Jens Alfke
On 28 Jun '08, at 2:15 PM, Christopher Keath wrote: Do I want to try and do this with only 1 window object, and have each stage simply load a new view? Or do I want a new nib for each step? The best way to do an assistant UI is with an NSTabView. Put each step inside a separate tab, and

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Bill Bumgarner
On Jun 28, 2008, at 1:08 PM, Kyle Sluder wrote: On Sat, Jun 28, 2008 at 2:14 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: You want -objectForKey: -valueForKey: is for key value coding, -objectForKey: is for extracting objects from a dictionary. Shouldn't cause a problem. I thought the colle

Re: List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Clark Cox
On Sat, Jun 28, 2008 at 3:53 PM, Markus Spoettl <[EMAIL PROTECTED]> wrote: > On Jun 28, 2008, at 1:03 PM, Kyle Sluder wrote: >> >> And you're surprised that this caused an infinite loop? > > As a matter of fact, yes I was until I realized what was happening. I read > the documentation and there was

Re: List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Keary Suska
6/28/08 4:53 PM, also sprach [EMAIL PROTECTED]: > The real question is if there is a list of accessor methods that can > be implemented optionally so you don't run into this accidentially as > I did. http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Con cepts/AccessorConven

Re: List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Markus Spoettl
On Jun 28, 2008, at 1:03 PM, Kyle Sluder wrote: And you're surprised that this caused an infinite loop? As a matter of fact, yes I was until I realized what was happening. I read the documentation and there was no mention about this specific accessor. That was not the question, though, only

Re: Determining general type of a file (image, text, sound, etc...)

2008-06-28 Thread Owen Yamauchi
On Sat, Jun 28, 2008 at 2:37 PM, <[EMAIL PROTECTED]> wrote: > Hi > > I'm writing a "KFile" class that encapsulates a bunch of file operations that > are spread out over several Cocoa and Carbon classes and want to have a > couple of testing methods such as "isImageFile", "isMusicFile", "isTextFi

Re: Building a Setup Assistant

2008-06-28 Thread Richard Adams
I'm a relative newbie to cocoa but I found this interesting tidbit when looking at core animation - how to build a wizard dialog using core animation http://www.cimgf.com/2008/03/03/core-animation-tutorial-wizard-dialog-with-transitions/ I hope this helps Richard On Jun 28, 2008, at 10:15

Re: Determining general type of a file (image, text, sound, etc...)

2008-06-28 Thread Oleg Svirgstin
Hi Ken and all, I would use the Uniform Type Identifiers (UTI), look at the ADC: "ADC Home > Reference Library > Guides > Carbon > Data Management > Uniform Type Identifiers Overview >". I have used the UTI several times to identify image files and it worked well. HTH, Oleg On Jun 29,

Determining general type of a file (image, text, sound, etc...)

2008-06-28 Thread kentozier
Hi I'm writing a "KFile" class that encapsulates a bunch of file operations that are spread out over several Cocoa and Carbon classes and want to have a couple of testing methods such as "isImageFile", "isMusicFile", "isTextFile" etc. I'm trying to avoid hard coding HFS types and/or file extens

Building a Setup Assistant

2008-06-28 Thread Christopher Keath
For the life of me, I just don't know where to begin on this seemingly simple project, which is basically my first Xcode project. Quite specifically, I can't seem to figure out how to setup the 'Next' button that would step you thru each stage of the process. All I want to do is collect s

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Kyle Sluder
On Sat, Jun 28, 2008 at 2:14 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > You want -objectForKey: -valueForKey: is for key value coding, > -objectForKey: is for extracting objects from a dictionary. > > Shouldn't cause a problem. I thought the collection classes were smart and treated -valueFo

Re: List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Kyle Sluder
On Sat, Jun 28, 2008 at 3:56 PM, Markus Spoettl <[EMAIL PROTECTED]> wrote: > I had this in my code > > - (void)removeAtIndexes:(NSIndexSet *)indexes > { >NSMutableArray *kva = [self mutableArrayValueForKey:@""]; >[kva removeObjectsAtIndexes:indexes]; > } And you're surprised that this caus

List of Indexed Accessor Names for NSMutableArray

2008-06-28 Thread Markus Spoettl
Hello List, is there a complete list of indexed accessor names that can be implemented? The KVC guides just mentions the basic ones - (NSUInteger)countOf - (id)objectInAtIndex:(unsigned)theIndex - (void)get:(id *)objsPtr range:(NSRange)range - (void)insertObject:(id)obj inAtIndex:(NSUIntege

setAccessoryView question

2008-06-28 Thread Frank Fenn
Hello, so far I could not find a solution to this problem. I'm using an accessoryView in a 10.4 applications page layout dialog. Everything works, but how do I change the name that shows up in the settings popup button? I looks like it always defaults to the application name. Sincerely Fran

Re: trackmouse problems in Leopard

2008-06-28 Thread Andy Kim
For a quick test, see if putting in the following in your cell subclass makes it work again: - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect: (NSRect)cellFrame ofView:(NSView*)controlView { return NSCellHitContentArea | NSCellHitEditableTextArea | NSCellHitTrackableArea; } It might

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Yoann GINI
Nota : userInfo pointer of kind NSNotification is a mistake, it's a NSDictionary of course. Le 28 juin 08 à 19:58, Yoann GINI a écrit : A part of code (this is a simply try code for a R&D): @interface root : NSManagedObject @interface song : root @interface artist : root @interface modifi

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Yoann GINI
Answer for the other mail (from Bill) : Yes, my objectsSet contain my object, and when I display the class type of this object in a NSLog I obtain the good thing (artist, song, modification). Sorry for the conventions, this is just a "test code"... root is the name of the class used for the

[SOLVED] NSPopupButton Bindings-Related Issue

2008-06-28 Thread Keary Suska
For perpetuity, to do what I wanted I needed to bind selectedIndex to the controller's "selectionIndex". I was avoiding this because it requires me to have an outlet to the controller for conditionally enabling/disabling popup items. Oh well. Best, Keary Suska Esoteritech, Inc. "Demystifying tech

Re: trackmouse problems in Leopard

2008-06-28 Thread Moray Taylor
Hi, thanks for the reply It's an NSTextFieldCell subclass, and it's setup as the data cell for the column in Interface Builder. I've tried making in just a plain NSCell subclass, but it doesn't make any difference. Thanks a lot Moray --- On Sat, 28/6/08, Andreas Mayer <[EMAIL PROTECTED]> wr

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread mmalc crawford
On Jun 28, 2008, at 11:07 AM, Yoann GINI wrote: @interface root : NSManagedObject @interface song : root @interface artist : root @interface modification : NSManagedObject This doesn't work with isKindOfEntity, used like that : NSEntityDescription* rootDescription = [[NSEntityDescription

Re: [SOLVED] noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Owen Yamauchi
How about [[controller selection] valueForKey:@"self"]? NSObject has a -self method which just returns the receiver, and since the proxy object must respond to the KVC query as if it were the underlying object, you get the underlying object back. Owen __

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Bill Bumgarner
On Jun 28, 2008, at 10:58 AM, Yoann GINI wrote: @interface root : NSManagedObject @interface song : root @interface artist : root @interface modification : NSManagedObject Obj-C classes start with a capital letter, by convention. So -- Root, Song, Artist, and Modification would be standa

Re: Style Question (Robert Claeson)

2008-06-28 Thread Roni Music
the bottom of the page below has one opinion why one style is superior to the other, (at least when it comes to C++ and the way C++ objects behave when going out of scope) http://www.relisoft.com/book/lang/scopes/2local.html On 28 Jun 2008, at 06:30, Alex Wait wrote: I have noticed, co

Re: NSSpeechSynthesizer and empty strings

2008-06-28 Thread Jim Correia
On Jun 26, 2008, at 8:32 PM, Nick Zitzmann wrote: On Jun 26, 2008, at 6:16 PM, William Squires wrote: Actually, "if ([myString length] == 0)" is probably better, but just IMHO... :) No; don't ever do that. It is possible for an NSString to have zero length but not be empty. See

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Yoann GINI
This doesn't work with isKindOfEntity, used like that : NSEntityDescription* rootDescription = [[NSEntityDescription entityForName:@"root" inManagedObjectContext:[self managedObjectContext]] retain]; ... [rootDescription isKindOfEntity:[modEntry entity]] It's always return NO...

[SOLVED] noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Stuart Malin
Sorry for the post how did I miss -selectedObjects Begin forwarded message: From: Stuart Malin <[EMAIL PROTECTED]> Date: June 28, 2008 10:43:36 AM PDT To: Cocoa Developer List Subject: noob question regarding proxy object returned by -selection method of NSArrayController Still pursuing

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Yoann GINI
A part of code (this is a simply try code for a R&D): @interface root : NSManagedObject @interface song : root @interface artist : root @interface modification : NSManagedObject -(void)dataBaseHaveChange:(NSNotification*)notification//I receive here the notification of a CoreData mod

Re: switching content views

2008-06-28 Thread dudley ackerman
On Jun 28, 2008, at 7:35 AM, Shawn Erickson wrote: On Jun 27, 2008, at 11:33 PM, dudley ackerman <[EMAIL PROTECTED]> wrote: i can call setContentView on my app's window only if i don't plug in a 2nd monitor. posts on this topic in the archives say you can't simple call setContentView on

Re: noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Keary Suska
6/28/08 11:43 AM, also sprach [EMAIL PROTECTED]: > If I do this (have the update logic in the Person class), then I > can't use the proxy object returned by the -selection method of the > NSController (because the proxy object doesn't respond to the methods > of the backing class). > > My questi

noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Stuart Malin
Still pursuing my understanding of bindings: I have a table view whose columns are bound to an NSArrayController, which in turn has its contentObject that is a mutable array of Person objects. Person objects have KVC-conforming properties, which provide the values for the data in the column

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread mmalc crawford
On Jun 28, 2008, at 10:15 AM, Owen Yamauchi wrote: On Jun 28, 2008, at 9:58 AM, Yoann GINI wrote: I've a CoreData base with some kind of object what are a subclass of an abstract class called "root" (root is a subclass of NSManagedObject). In a part of my code I need to catch all operatio

Re: Why aren't my bindings firing?

2008-06-28 Thread Charles Srstka
On Jun 28, 2008, at 4:55 AM, Ken Thomases wrote: Yeah, it surprises me, too, that NSObject has an implementation of bind:toObject:withKeyPath:options:. I had thought that it was just part of an informal protocol -- that is, that it was declared in a category on NSObject, but never implemen

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Mike Abdullah
Post some code. Mike. On 28 Jun 2008, at 18:25, Yoann GINI wrote: Ho sorry, of cours it's isKindOfClass, I've this problem since 2 days and I've try all similar method by despair ! With isKindOfClass I've always a NO in return... Le 28 juin 08 à 19:15, Owen Yamauchi a écrit : On Sat, Jun

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Yoann GINI
Ho sorry, of cours it's isKindOfClass, I've this problem since 2 days and I've try all similar method by despair ! With isKindOfClass I've always a NO in return... Le 28 juin 08 à 19:15, Owen Yamauchi a écrit : On Sat, Jun 28, 2008 at 9:58 AM, Yoann GINI <[EMAIL PROTECTED]> wrote: Do

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Owen Yamauchi
On Sat, Jun 28, 2008 at 9:58 AM, Yoann GINI <[EMAIL PROTECTED]> wrote: >Do you have an idea ? > Use -isKindOfClass: instead. -isMemberOfClass: only tells you if an object is an instance of that specific class. -isKindOfClass: includes all superclasses as well. Owen [forgot to reply-all] _

Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Yoann GINI
Hi all, I've a CoreData base with some kind of object what are a subclass of an abstract class called "root" (root is a subclass of NSManagedObject). In a part of my code I need to catch all operation on object what are a child of root. For do that I use the notification NSManagedObjectC

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

2008-06-28 Thread Keary Suska
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 comes from a > button set up in IB (instead the menu

Re: trackmouse problems in Leopard

2008-06-28 Thread Andreas Mayer
Am 28.06.2008 um 15:24 Uhr schrieb Moray Taylor: I have an app that uses a custom NSCell that implements the - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouseUp method. In Tiger, this works just fine, if I build targ

Re: while loop with sleep(): logging works, but not UI events

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 8:29 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > On Sat, Jun 28, 2008 at 8:13 AM, Daniel Richman > <[EMAIL PROTECTED]> wrote: >> Thanks very much for this detailed explanation. I realize my mistake now; I >> was thinking about this in the wrong way. I eventually coded it

Re: KVO Question -- Really Simple for Pros

2008-06-28 Thread mmalc Crawford
On Jun 27, 2008, at 11:29 PM, Alex Wait wrote: What I need to know is what I need to add to get the text field to update whenever firstName is changed. I want it to set the value of its string value to the string. That's explained in the document for which I provided the link... mmalc ___

Re: Why aren't my bindings firing?

2008-06-28 Thread Charles Srstka
On Jun 28, 2008, at 4:55 AM, Ken Thomases wrote: Yeah, and the description of the "binding" parameter of that method also says it's a "key path for a property of the receiver", which contradicts my understanding (as we've been discussing). So, my curiosity piqued, I did some more reading.

Re: while loop with sleep(): logging works, but not UI events

2008-06-28 Thread Daniel Richman
One second seems to be accurate enough for my purposes, but I'll investigate using 0.5 seconds. Daniel Shawn Erickson wrote: On Sat, Jun 28, 2008 at 7:58 AM, Michael Ash <[EMAIL PROTECTED]> wrote: On Sat, Jun 28, 2008 at 12:10 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: Also you s

Re: while loop with sleep(): logging works, but not UI events

2008-06-28 Thread Daniel Richman
Thanks very much for this detailed explanation. I realize my mistake now; I was thinking about this in the wrong way. I eventually coded it as follows: - (IBAction)startTimer:(id)sender { timeInSeconds = [((NSNumber *)[inTextField objectValue]) intValue]; [NSTimer scheduledTimerWithTi

Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-28 Thread John Love
> (1) warning: no doSheetSelection:contextInfo method found which, I think, >> is >> due to the fact that the external class of mFileSheetDelegate = >> FileController, yet when referenced in SaveSheetController, it's = id, a >> general pointer. But, I thought all anonymous pointers were resolved a

Re: while loop with sleep(): logging works, but not UI events

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 7:58 AM, Michael Ash <[EMAIL PROTECTED]> wrote: > On Sat, Jun 28, 2008 at 12:10 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: >> Also you should fire your timer every >> 0.75 of seconds (or so) to ensure your UI update is consistent/smooth. >> Firing every second may cause y

Re: while loop with sleep(): logging works, but not UI events

2008-06-28 Thread Michael Ash
On Sat, Jun 28, 2008 at 12:10 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > Also you should fire your timer every > 0.75 of seconds (or so) to ensure your UI update is consistent/smooth. > Firing every second may cause your timer to fire a little after 1 > second later so your UI could skip from

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 - setMenuS

Re: NSExpression

2008-06-28 Thread Shawn Erickson
On Jun 28, 2008, at 12:13 AM, Chris <[EMAIL PROTECTED]> wrote: NSExpression defines this method: + (NSExpression *)expressionForFunction:(NSString *)name arguments: (NSArray *)parameters and the doco provides this example: [NSExpression expressionForFunction:(@selector(random)) arguments

Re: switching content views

2008-06-28 Thread Shawn Erickson
On Jun 27, 2008, at 11:33 PM, dudley ackerman <[EMAIL PROTECTED]> wrote: i can call setContentView on my app's window only if i don't plug in a 2nd monitor. posts on this topic in the archives say you can't simple call setContentView on a window - i'm not clear if that means even onc

Re: Style Question

2008-06-28 Thread Rob Ross
On Jun 28, 2008, at 6:39 AM, Sam Mo wrote: On Jun 28, 2008, at 4:54 AM, Robert Claeson wrote: On 28 Jun 2008, at 06:30, Alex Wait wrote: I have noticed, coming from C++ and Visual Studio (at school), a couple style differences if (value) { //do something } insteasd of if (value) {

Re: Why aren't my bindings firing?

2008-06-28 Thread Steve Weller
On Jun 28, 2008, at 2:55 AM, Ken Thomases wrote: Also interestingly, the only reference to the bind:toObject:withKeyPath:options: method that comes up in an API search of the documentation is from the NSKeyValueBindingCreation protocol, which states this: "Establishes a binding between

Re: Style Question

2008-06-28 Thread Sam Mo
On Jun 28, 2008, at 4:54 AM, Robert Claeson wrote: On 28 Jun 2008, at 06:30, Alex Wait wrote: I have noticed, coming from C++ and Visual Studio (at school), a couple style differences if (value) { //do something } insteasd of if (value) { //do something } Also since I am using this

trackmouse problems in Leopard

2008-06-28 Thread Moray Taylor
Hi, hope someone can help... I have an app that uses a custom NSCell that implements the - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouseUp method. In Tiger, this works just fine, if I build targeting the 10.5 API, it

Newbie Confused by ABMutableMultiValue and how to store emails and phone numbers using them.

2008-06-28 Thread Papa-Raboon
Hi again Cocoa geniuses,I am trying to get my head around the basics of the AddressBook framework. It seems there are not many examples of how to set/store email addresses and phone numbers in the addressbook. I understand I need to use ABMutableMultiValue to set my phone numbers and email addresse

Re: [NSMutableAttributedString] How is NSBaseURLDocumentOption supposed to work?

2008-06-28 Thread Stéphane Sudre
On Jun 26, 2008, at 12:38 AM, Stéphane Sudre wrote: When reading a html document into a NSMutableAttributedString (or NSTextStorage) using - (BOOL)readFromURL:(NSURL *)url options:(NSDictionary *)options documentAttributes:(NSDictionary **)dict, what value are you supposed to set for NSBa

Re: Why aren't my bindings firing?

2008-06-28 Thread Ken Thomases
On Jun 28, 2008, at 3:10 AM, Charles Srstka wrote: On Jun 28, 2008, at 1:57 AM, Ken Thomases wrote: That depends on how the bar class from your OP (or one of its superclasses) implemented bind:toObject:withKeyPath:options:. That code may not have checked the passed-in binding name, and may

DnD for NSBrowser in 10.4

2008-06-28 Thread Micha Fuhrmann
Dear all, does anyone know some ready to use NSMatrix subclass code that incorporates DnD? Michael ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators a

Re: Style Question

2008-06-28 Thread Robert Claeson
On 28 Jun 2008, at 06:30, Alex Wait wrote: I have noticed, coming from C++ and Visual Studio (at school), a couple style differences if (value) { //do something } insteasd of if (value) { //do something } Also since I am using this style, XCode doesn't tab in for me when I type {

Re: Core data question in multiwindow doc app

2008-06-28 Thread Steven Hamilton
On 28/06/2008, at 2:41 PM, Chris Hanson wrote: On Jun 27, 2008, at 7:25 PM, Steven Hamilton wrote: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildSourceList) name:@"NSManagedObjectContextObjectsDidChangeNotification" object: [self.document managedObjectCo

Re: Why aren't my bindings firing?

2008-06-28 Thread Charles Srstka
On Jun 28, 2008, at 1:57 AM, Ken Thomases wrote: That depends on how the bar class from your OP (or one of its superclasses) implemented bind:toObject:withKeyPath:options:. That code may not have checked the passed-in binding name, and may have unconditionally added itself as an observer o

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

2008-06-28 Thread Ken Thomases
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 - setMenuState is executed with a value contrary to the last

Re: Checking availability of host/website

2008-06-28 Thread Omar Qazi
On Jun 28, 2008, at 12:36 AM, Michael Kaye wrote: I have implemented an SCNetworkReachAbility based method to test firstly whether a network is available, but I was wondering in your opinion what is the best way to check that the remote host/website is responding to requests? It depend

  1   2   >