Re: Why aren't my bindings firing?

2008-06-28 Thread Ken Thomases
On Jun 27, 2008, at 11:08 PM, Charles Srstka wrote: With that said, aren't bindings *always* creating a two-way connection between properties? Not exactly, no. A binding is a different thing than a property. (By the way, did you read the How Do Bindings Work? chapter I linked to, or the

Re: KVO Question -- Really Simple for Pros

2008-06-28 Thread Owen Yamauchi
On Fri, Jun 27, 2008 at 10:20 PM, Alex Wait [EMAIL PROTECTED] wrote: But I was sure since I have a firstName method and a setFirstName method it would update the textField. I have used IB to bind the value of the textField to the value of the person object and that works when I edit the

Re: Why aren't my bindings firing?

2008-06-28 Thread Charles Srstka
On Jun 28, 2008, at 1:00 AM, Ken Thomases wrote: Actually, NSTextField does not have a binding named stringValue, even though it does have a property with that name. Conversely, it has a binding called value, although it doesn't have a property by that name. See the NSTextField bindings

Re: NSPopupButton Bindings-Related Issue

2008-06-28 Thread Ken Thomases
On Jun 27, 2008, at 11:01 PM, Keary Suska wrote: Generally, my needs are simple. In this case, I need a sheet that displays an nspopupbutton populated with product names, where a user can select an item from the popup and a description of the item would appear in a designated space below

switching content views

2008-06-28 Thread dudley ackerman
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 once. even with a 2nd monitor, the call always works the 1st time for me -- perhaps

Re: KVO Question -- Really Simple for Pros

2008-06-28 Thread Owen Yamauchi
On Fri, Jun 27, 2008 at 11:29 PM, Alex Wait [EMAIL PROTECTED] wrote: I've read what you said but I don't know what to do still. Do I need to implement the method? the -observeValueForKeyPath :ofObject:change:context: method? No. NSTextField implements this already. See below. I am not

Re: Why aren't my bindings firing?

2008-06-28 Thread Ken Thomases
On Jun 28, 2008, at 1:30 AM, Charles Srstka wrote: I guess the only question I still have then is: why did my example worke one-way in the first place? If the bindings are in a different namespace, shouldn't it have failed for lack of an exposed binding named title in the Bar object? Or is

NSExpression

2008-06-28 Thread Chris
NSExpression defines this method: + (NSExpression *)expressionForFunction:(NSString *)name arguments: (NSArray *)parameters and the doco provides this example: [NSExpression expressionForFunction:(@selector(random)) arguments:nil]; Isn't that wrong? Can you really pass a selector to a

Checking availability of host/website

2008-06-28 Thread Michael Kaye
Hi all, Another newbie here so be gentle... I have a small app that needs to send a number of requests to a remote server. 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

Re: Help getting custom cell layout in NSOutlineView column

2008-06-28 Thread Sebastian Nowicki
On 28/06/2008, at 1:39 PM, Sebastian Nowicki wrote: On 28/06/2008, at 2:57 AM, Sebastian Nowicki wrote: On 28/06/2008, at 12:05 AM, j o a r wrote: This is a good piece of sample code to show how to create a complex custom cell subclass:

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

[Job] Develop at Skype

2008-06-28 Thread Janno Teelem
Hello, Looking for a skilled Cocoa developer with a positive attitude toward working in an environment of frequently changing requirements. As an engineer in the Skype for Mac OS X desktop team, you will help design and develop new features for the Skype for Mac product. Ideal candidate should be

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

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

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

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 {

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

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

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

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

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

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

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

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

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 -

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 say

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 your timer

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 at

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

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

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. The

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

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

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

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

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]

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

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

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 operation

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

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 question

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: 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 RD): @interface root : NSManagedObject @interface song : root @interface artist : root @interface modification : NSManagedObject -(void)dataBaseHaveChange:(NSNotification*)notification//I receive here the notification of a CoreData

[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 cocoa-dev@lists.apple.com Subject: noob question regarding proxy object returned by -selection method of

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

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

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

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

[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

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

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 RD): @interface root : NSManagedObject @interface song : root @interface artist : root @interface

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

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

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)countOfkey - (id)objectInkeyAtIndex:(unsigned)theIndex - (void)getkey:(id *)objsPtr range:(NSRange)range - (void)insertObject:(id)obj

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)removekeyAtIndexes:(NSIndexSet *)indexes { NSMutableArray *kva = [self mutableArrayValueForKey:@key]; [kva removeObjectsAtIndexes:indexes]; } And you're surprised that this caused

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

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

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 extensions

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

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

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, isTextFile etc. I'm

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,

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

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 no

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

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

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

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

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

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.

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

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

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

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

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

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 way of

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 and ran the

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 be

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

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

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

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? You need to

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

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

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

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:

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 cocoa-dev@lists.apple.com Subject: Re: Methods that

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

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

  1   2   >