Re: garbage collection and NSConnection

2008-07-04 Thread Chris Hanson
collected while interior pointers that they've handed out are still in use, so it's not just hypothetical. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: IB3 and custom controls: problem with actions

2008-07-05 Thread Chris Hanson
are part of whatever you are sending an action to. Thus your controller needs to have those actions declared in a header file in your project (or in a framework referenced by your project) in order for Interface Builder to recognize them. What does the declaration of your con

Re: Loading a different interface

2008-07-05 Thread Chris Hanson
n you want to "switch" interface styles you can use -[NSDocument addWindowController:] and -[NSDocument removeWindowController:] to get rid of the old and add the new. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: Bit maps from raw camera files

2008-07-05 Thread Chris Hanson
On Jul 5, 2008, at 2:00 PM, James Merkel wrote: So the question is how to go about reliably getting a bit map reliably form these camera raw files? Try getting a CGImageRef using ImageIO. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev

Re: Guidelines for Cocoa frameworks supporting garbage collection?

2008-07-05 Thread Chris Hanson
its file descriptor on -dealloc, but generally you'll want to send an instance -closeFile as soon as you're done with it so you don't risk running out of file descriptors if the lifetime of the NSFileHandle instance has been extended. -- Chris

Re: Guidelines for Cocoa frameworks supporting garbage collection?

2008-07-05 Thread Chris Hanson
ould assume that the result of such a method has already had CFMakeCollectable called on it, making doing so unnecessary. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to t

Re: Guidelines for Cocoa frameworks supporting garbage collection?

2008-07-05 Thread Chris Hanson
On Jul 5, 2008, at 11:04 PM, mmalc crawford wrote: On Jul 5, 2008, at 10:07 PM, Chris Hanson wrote: Can you give an example of a framework method that's documented to return an autoreleased CF object? NSBitmapImageRep: - (CGImageRef)CGImage Returns an autoreleased CGImage objec

Re: plist parsing in c

2008-07-06 Thread Chris Parker
ckage receipts as an example though. If the docs don't say this, they should[1]; if you're manipulating preferences domains, the only supported way to do it is use the CFPreferences or NSUserDefaults APIs. .chris [1] I'm pretty sure they do, probably pretty close to the pa

Re: Why aren't my bindings firing?

2008-07-07 Thread Chris Hanson
. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http

Re: Removing folder from /Applications

2008-07-08 Thread Chris Hanson
NOT be invoked via AuthorizationExecuteWithPrivileges. That call should ONLY be used as described in the Authorization Services documentation. Any other use puts the security of the user's system at risk. Yes, it's a bit of a roundabout way to accomplish your goal. But it's necessary to main

Re: Calculating accurate bounds of stroked paths

2008-07-08 Thread Chris Suter
ctly? How can I tell just how far out I need to outset the rect to make sure I'm always just outside the edge of any mitred corner? You should have a look at the PDF specification (you can easily get hold of it). It explains exactly what it is. -- Chris smime.p7s Description: S/MIM

Making a text cell in a table editable

2008-07-08 Thread Chris Idou
How do I programmatically make a text cell in a NSTableView to have focus and be in edit mode? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderat

Re: Calculating accurate bounds of stroked paths [SOLVED]

2008-07-09 Thread Chris Suter
Hi Graham, On 09/07/2008, at 4:37 PM, Graham Cox wrote: On 9 Jul 2008, at 4:02 pm, Chris Suter wrote: so you can get a worst case bounds by ignoring the mitre limit. No you can't. If the stroke width is 'w' then you can outset the bounds by w/2 to enclose the path for str

Re: Does this caution need fixed? (newb)

2008-07-09 Thread Chris Paveglio
will be autoreleased on their own. There are now no compiler cautions and the app seems to work OK. A side issue is that I want to add a 2 second delay before closing the sheet that is displayed, is NSTimer the correct item to use? Chris #import "MyExporter.h" @implementation MyExporte

Setting the color label

2008-07-09 Thread Chris Idou
I came up with the code below to set the color label. Questions: 1) Is it really necessary to do a FSGetCatalogInfo first? I presume it is because otherwise the FSSetCatalogInfo wouldn't know what fields of catalogInfo.finderInfo it is supposed to be updating, or even what bits of catalogInfo.

Re: Best way to handle background i/o and notify main UI thread

2008-07-10 Thread Chris Irvine
On Jul 1, 2008, at 4:27 PM, Jean-Daniel Dupas wrote: Le 2 juil. 08 à 01:24, Chris Irvine a écrit : On Jul 1, 2008, at 3:17 PM, Douglas Davidson wrote: On Jul 1, 2008, at 3:11 PM, Chris Irvine wrote: I've been doing a lot of reading about this, but I still don't feel lik

Re: KVO: Observing an aggregate property of a collection?

2008-07-10 Thread Chris Suter
ray using addObject, removeObject or any of the other primitives (you have to modify the array in a different way if you want that to work). If you're simply modifying the property of an existing element, I believe it should work. Can you post a test case? --Chris __

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Chris Hanson
mple about doing the above using Core Data? -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Uns

Setting Finder comments and keywords

2008-07-10 Thread Chris Idou
How does one programmatically change Finder comments and keywords? I found this comment about MDItemSetAttribute... http://www.cocoadev.com/index.pl?SpotlightAndTagging which seems to say that if you use MDItemSetAttribute the changes will get blown away on a spotlight rebuild. I could understa

Re: Such a newbie question that I'm embarrassed to ask it :-)

2008-07-10 Thread Chris Suter
7;re trying to access one of the menu items of those menus. In any case, I think you're taking the wrong approach. It's better to declare an outlet somewhere and connect your menu item to it within Interface Builder then you don't need to go searching for it. --Chris __

Re: importing sqlite data into a core data "database"

2008-07-12 Thread Chris Hanson
as you go. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscrip

Re: Setting Up Socket Streams

2008-07-12 Thread Chris Hanson
ndle the HTTP communication on your behalf, as I recommend above. It will probably be a lot easier to get right, and handle lots of the little details for you. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: importing sqlite data into a core data "database"

2008-07-12 Thread Chris Hanson
search paths that you've set up. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/

Re: Questions about Core Data and SQLite

2008-07-14 Thread Chris Hanson
t limits to its scalability. You won't want to have more than a few users sharing the same file. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: Questions about Core Data and SQLite

2008-07-14 Thread Chris Hanson
aker or Access database on a file server and having multiple users open it. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-a

Re: NSDateFormatter -dateFromString Question

2008-07-15 Thread Chris Kane
map approximately to one or more new methods or attributes, but you should use the new methods directly when possible. setDateStyle: and setTimeStyle: are also 10.4-only. The 10.0 - 10.3 formatter basically had about 3 or 4 methods, only. Chris Kane Cocoa Frameworks, Apple On Jul 15

Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?

2008-07-16 Thread Chris Hanson
want to encode or decode their own unique state need to override NSView's implementation of the appropriate NSCoding methods. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: alternative to flash

2008-07-16 Thread Chris Cooley
. Anyway, look into SVG for Flash-less animation. Though it's off-topic (not Cocoa), SVG is not supported on the iPhone's Safari. --chris smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
add sub-views to it to do what you want. There's no reason to worry about trying to use a single-row table with cells and so on -- views will be sufficient for what you want to do. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
oller. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription:

Re: NSThread and UI

2008-07-20 Thread Chris Hanson
owever, you'll still have to use techniques like - performSelectorOnMainThread:withObject:waitUntilDone: to update your detailed progress information in a way that doesn't cause thread- synchronization issues. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

Exception thrown when calling NSConnection connectionWithReceivePort:sendPort:

2008-07-22 Thread Chris Backas
ed on the backtrace, and the NSConnection documentation says that it tries to register with the "Current" run loop. NSRunLoop's documentation says that if you ask for the current run loop and there isn't one, one will be created though... So I can't see

Re: Exception thrown when calling NSConnection connectionWithReceivePort:sendPort:

2008-07-23 Thread Chris Backas
availability is the problem. That'll be phase 2, but I have to prove that this concept works first =) Chris Backas On Jul 22, 2008, at 7:16 PM, Ken Thomases wrote: On Jul 22, 2008, at 10:46 AM, Chris Backas wrote: So... the problem is that when I try to reconnect to DO, meaning, cal

Re: NSLog on releasebuild

2008-07-23 Thread Chris Backas
I agree with this. I like to leave my Console open most of the time, to monitor for potential software problems. I really dislike applications that just spew endless nonsense there under even normal conditions. Chris On Jul 23, 2008, at 11:36 AM, Andrew Merenbach wrote: I'd say

Re: Sent Actions, Delegates, Outlets

2008-07-24 Thread Chris Hanson
ome other user action into a higher-level action that's sent to a controller. It's the controller that does something meaningful to the application with that action. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: Sent Actions, Delegates, Outlets

2008-07-24 Thread Chris Hanson
ties that it used to locate the array of objects to display. So it was (1) generic to any table view, and (2) provided a much-simplified API for most of my applications using it over the NSTableView API. -- Chris ___ Cocoa-dev mailing list

Re: Daemon Advice?

2008-07-24 Thread Chris Hanson
onstructs like NSOperation can help the system better balance its overall load because it can take a holistic view that an app-implemented work queue can't. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: XML serialization and deserialization

2008-07-25 Thread Chris Hanson
yourself. However, you may be able to leverage NSCoding in your implementation, by making your XML archiver & unarchiver subclasses of NSCoder. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: Getting process table info from within a Cocoa app

2008-07-25 Thread Chris Hanson
environment variable, and that socket can be used to communicate with the daemon -- or even launch it on demand. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: NSArray problems

2008-07-27 Thread Chris Suter
getting confused and printing something else. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Uns

Re: NSArray problems

2008-07-27 Thread Chris Suter
sages to nil do nothing. What probably happened is that the memory was deallocated and an NSRectSet was allocated at the exact same location. You won't see this problem with Garbage Collection so use that if you can. Otherwise you can debug these kinds of

Re: NSDocument and window ivar

2008-07-27 Thread Chris Suter
dowController's windowTitleForDocumentDisplayName:. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Uns

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Chris Suter
have a look at the disassembly for -[NSConcreteAttributedString initWithString:]. The test for a nil parameter is obviously going to be early on and the call to a function called _nilArgumentWarning suggests a likely place for a breakpoint. -- Chris ___

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-28 Thread Chris Suter
he delay that you're adding is merely hiding the true cause of the problem. Are you able to post a simple test case that displays the problem or post the code that you're using when you set things up? Regards, Chris ___ Cocoa-dev mailing l

Re: Checking for hackintosh

2008-07-30 Thread Chris Suter
t when we're running from a Hackintosh. Unfortunately, as others have pointed out, there is no future proof way of doing that at the moment (that I know of). -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: Checking for hackintosh

2008-07-30 Thread Chris Suter
concerned). I was just making the point that it would be useful to be able to detect whether you're running on a Hackintosh *if* there was a reliable way of doing it. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Document based initial window.

2008-07-30 Thread Chris Idou
In a Cocoa document based application, how do you stop it from initially opening an "empty" document on start up? (I'm using a core data application if it matters). ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-31 Thread Chris Suter
Hi Hamish, On Thu, Jul 31, 2008 at 10:16 PM, Hamish Allan <[EMAIL PROTECTED]> wrote: > On Tue, Jul 29, 2008 at 3:33 AM, Chris Suter <[EMAIL PROTECTED]> wrote: > > > It sounds to me like you've got some kind of timing issue and that the > delay > > that y

Doc based app - creating a document

2008-07-31 Thread Chris Idou
I've got a core-data document based app. I need to programmatically create or open a document at a programmatically chosen location and display it in a window. This is what I tried: [[NSDocumentController sharedDocumentController] makeDocumentWithContentsOfURL:url ofType:mytype error:&error]; [

interrupting a thread/run loop

2008-08-01 Thread Chris Idou
In the Java thread API (which I am most familiar with) you put the thread in a wait() and then another thread can send the thread an interrupt() which makes it wake up and do stuff. I have a Cocoa thread waiting on events in a run loop. But I want to be able to give the waiting thread a "kick"

Re: how to release my window controller

2008-08-02 Thread Chris Hanson
roller a delegate of the window and reset its state when the window will close. This way, you can work with the window controller as you would any other in Cocoa, and it will handle the special behavior it needs itself. -- Chris ___ Coco

Re: Some crash.

2008-08-02 Thread Chris Hanson
he instance variable that you have backing the property. If you need to intercept the modifications to your property, you can override the mutable-array KVC methods described in NSKeyValueCoding.h> or in the Key-Value Coding Guide. -- Chris ___

Re: CoreFoundation Command Line Tool - an easy beginner question

2008-08-04 Thread Chris Parker
get you a lot farther. :) As far as parsing arguments go, you may wish to look at using [[NSProcessInfo processInfo] arguments], which gives you an NSArray of NSStrings of the arguments. .chris -- Chris Parker Cocoa Frameworks Apple, Inc. ___ C

File's Owner problems

2008-08-04 Thread Chris Idou
I've got a class, let's call it Foo, that loads a NIB called "Bar". In IB, the File's owner of Bar is set to class Foo. When Foo loads Bar, passing self as the file's owner, Foo.awakeFromNib gets called during the nib loading process. Is that meant to happen? It doesn't make sense to me.

Re: Loading a class with a specific superclass from a bundle

2008-08-05 Thread Chris Hanson
class. (There's no objc_getSubclassList.) -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Updat

NSDocument opening folders

2008-08-05 Thread Chris Idou
I have a document based application that needs to be able to open folders. I'm calling: [[NSDocumentController sharedDocumentController] openDocument:myfolderurl ofType:@"mytype" display:YES error:&error]; but I get the error: Error Domain=NSCocoaErrorDomain Code=256 UserInfo=0x10be490 "“myfol

Editing NSTableView

2008-08-06 Thread Chris Idou
If I have a NSTableView controlled by a NSArrayController, how do I get notification that the user edited a field? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. C

Re: autorelease CGImageRef?

2008-08-07 Thread Chris Hanson
ase of Mac OS X you're targeting is a function of the Mac OS X Deployment Target build setting, not the SDK. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the li

Re: How to tell whether an executable supports GC?

2008-08-07 Thread Chris Suter
C_ONLY 4 Have a look at the linker source code in MachOReaderDylib.hpp. You'll have to check what needs to be swapped. I don't know if there's an easier way of figuring it out. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: simple string to NSData question

2008-08-07 Thread Chris Suter
> > Rather than thinking about how to create an NSData yourself, ask the string > to do it. The easiest way would be [xml dataUsingEncoding: > NSUTF8StringEncoding]. > Looks like -[NSXMLDoucment initWithXMLstring:options:error:] might also do t

Re: Core Data question

2008-08-08 Thread Chris Hanson
quot;delete" should be reserved for actually getting rid of an object, not removing it from a relationship. Often you'll want to do both, but they are separate concepts. Hope this helps! -- Chris ___ Cocoa-dev mailing list (Co

Re: autorelease CGImageRef?

2008-08-08 Thread Chris Hanson
On Aug 7, 2008, at 7:07 PM, Peter N Lewis wrote: At 8:24 AM -0700 7/8/08, Chris Hanson wrote: If you build with the Mac OS X 10.5 SDK, you should be able to use NSMakeCollectable since it's declared as an inline function. The earliest release of Mac OS X you're targeting is a f

Core Data, dynamic accessors and compiler warnings

2008-08-10 Thread Chris Idou
The Core data doco suggests that if you have a 1:M accessor for FooBar that you define in a header: - (void)addFooBarObject:(FooBar *)value; In order to suppress compiler warnings for using this dynamically generated method. However this creates its own "incomplete implementation" compiler war

Re: Core Data question

2008-08-10 Thread Chris Hanson
event"]; If your Event.imageHolder and EventImage.event relationships are inverses of each other, you should not need to do a thing to ensure that the other is set after doing the first. That's what marking relationships as inverses means; Core Data w

Re: Core Data question

2008-08-10 Thread Chris Hanson
On Aug 10, 2008, at 8:37 PM, Graham Perks wrote: On Aug 10, 2008, at 10:30 PM, Chris Hanson wrote: you should not need to do a thing to ensure that the other is set after doing the first. That's what marking relationships as inverses means; Core Data will set them for you automati

NSPopupButton, Null Placeholder, image

2008-08-10 Thread Chris Idou
I've figured out how to have a little cog action menu using NSPopupButton. Now I want to have one where the items of the menu are dynamically changed using a binding. That works, but it destroys the little cog image. So then I notice the Null Placeholder option, which seems good because it trea

NSTokenField with plain text

2008-08-11 Thread Chris Idou
I've seen programs where a NSTokenField allows plain text interspersed with tokens. But when I use NSTokenField it insists on making all text that is entered to be part of a token. How do I restrict the set of allowable tokens and make anything else entered to be just plain text? ___

NSTokenField with plain text

2008-08-11 Thread Chris Idou
I've seen programs where a NSTokenField allows plain text interspersed with tokens. But when I use NSTokenField it insists on making all text that is entered to be part of a token. How do I restrict the set of allowable tokens and make anything else entered to be just plain text? ___

addObserver:

2008-08-11 Thread Chris Idou
I'm making the following call (and defining observeValueForKeyPath on self etc) on an NSArrayController, hoping to get notifications of it changing. But I don't seem to be getting any notifications. Should this work? [arrayController addObserver:self forKeyPath:@"content" o

NSTokenField drag and drop

2008-08-12 Thread Chris Idou
I've got two NSTokenFields. One is read-only as a palette for dragging and dropping to the other. I've implemented a "Token" class to distinguish between tokens and plain text (NSString). I can pass in arrays of mixed Tokens and NSStrings, and it all displays correctly in both fields. However,

Is this how you can use bindings?

2008-08-12 Thread Chris Idou
I want a button to be enabled when myTextField is not empty. Can have an outlet in my controller called myTextField, and then set the "Enabled" binding on the button to point to myTextField.stringValue.length, then can I write a transformer called GreaterThanZero to return boolean if the input

Re: Disc write speed options

2008-08-13 Thread Chris Suter
at looks useful. How can I get and set > the burn rate ? What's wrong with using the system supplied panel? -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Cont

Re: Is this how you can use bindings?

2008-08-13 Thread Chris Idou
u can use bindings? > To: "Chris Idou" <[EMAIL PROTECTED]> > Cc: "cocoa-dev@lists.apple.com" > Date: Tuesday, August 12, 2008, 11:56 PM > The way to think about this is, you bind the value of the > text field > to a controller (or model) object that owns

Re: @property and @synthesize not working

2008-08-16 Thread Chris Hanson
) NSCalendarDate *searchDate; This should really be "copy" rather than "assign" as NSDate and NSCalendarDate conform to NSCopying. At the very least, it should be "retain" unless you're writing GC-only code. -- Chris ___

Re: Window 'close' action fails

2008-08-16 Thread Chris Hanson
t method should really look like Charles Steinman said it should: 1 - (id)init 2 { 3 return [super initWithWindowNibName:@"SPlotWindow.nib"]; 4 } There's no need to assign to "self" here because you're not doing anything with it, but if you w

Re: Window 'close' action fails

2008-08-16 Thread Chris Hanson
due to the way you had written your NSWindowController subclass's -init method. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: Hex representation of NSString

2008-08-18 Thread Chris Blättermann
Hi there! Just subscribed to this list. @Robert: Do you mean by hex representation this: hello -> 0x68 0x61 0x6C 0x6C 0x6F ? Then i suggest you use the C language to do it, just "convert" a string to an array of characters by [yourstring UTF8String] And loop through the result and print

Re: Hex representation of NSString

2008-08-18 Thread Chris Blättermann
lt and printf it. Kind regards, Chris Am 18.08.2008 um 12:45 schrieb Negm-Awad Amin: Am Mo,18.08.2008 um 12:40 schrieb Robert Černý: I don't like it because the string will be converted. I'm interested in exact values Oh, may I ask why? The string class encapsulates its repr

Re: Question about respondsToSelector

2008-08-18 Thread Chris Hanson
er the question that's asked. So the static type of the variable referencing the object it's sent to -- in your case, "id" -- doesn't have anything to do with how the actual message behaves. -- Chris ___ Cocoa-dev mailing

Subclassing NSArrayController?

2008-08-19 Thread Chris Poliquin
e via IB and still make it so it never changes? Best Regards, Chris Poliquin - [EMAIL PROTECTED] www.chrispoliquin.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

This document's file has been changed by another application?

2008-08-19 Thread Chris Idou
I've got a document based app where the document is actually a directory. Every time I save except the first time I get the above error whether or not things have changed, and even if the directory timestamp is unchanged. Under what circumstances does the above message occur and how do I avoid i

Re: This document's file has been changed by another application?

2008-08-19 Thread Chris Idou
>Not sure exactly, but here's a thought: Are you > deleting and re- > creating the directory each time you save? No. > How are you creating the folder? Are you using the NSDocument - > fileWrapperOfType:error: method? The directory is pre-existing in this case. I'm not calling that method

Re: Best Way to Handle Properties?

2008-08-19 Thread Chris Hanson
etter way of doing it? How to write your custom accessors is addressed well in the Cocoa memory management documentation. Your setters will, in general, always follow one of only a small number of patterns and those are covered in the documentation. -- Chris ___

Re: This document's file has been changed by another application?

2008-08-20 Thread Chris Idou
and subsequent save operations, that might give a > hint. > The problem might also occur if you arbitrarily tweak the > fileUrl. I'm not touching the fileUrl. I'm printing it out, and it remains the same as expected. > > -Chaitanya > > On 19-Aug-08, at 9:36 PM,

Model Object Validation

2008-08-20 Thread Chris Idou
I have a validation method on my object, managed by a NSObjectController. If I try and tab out of a field that is invalid I get a warning sheet - great. But if I just hit command-S to save, there is no message. I could of course tediously call every single validation method in my NSDocument's s

Re: Accessing properties of a generic class

2008-08-21 Thread Chris Hanson
ompleted]" because that's what the property actually means, since its declaration says "getter=isCompleted". -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

filter Predicate - NSArrayController

2008-08-21 Thread Chris Idou
I want a search field aka iTunes to filter my NSTableView. I have a list of objects with a "title" field. The filter predicate of NSArrayController sounds like something that might help. I got as far as writing this predicate: return [NSComparisonPredicate predicateWithLeftExpression:[NSExpres

User Defaults - tables and arrays

2008-08-21 Thread Chris Idou
Is the User Defaults Controller any use if you have a table or array of objects to store? It's not obvious what one would bind to, or how one could control the tableview just using a user defaults controller. Is the User Defaults controller purely for simple stuff? __

Re: filter Predicate - NSArrayController

2008-08-23 Thread Chris Idou
Yeah, but that's not going to update immediately when the field changes, is it? The NSArrayController doco mentions: "When you detect that filtering criteria change (such as when listening to the text sent by an NSSearchField instance), invoke this method on self." What is the correct way to l

CFBoolean

2008-08-24 Thread Chris Idou
How do I create a property in the user defaults of type boolean? Internally it seems to use a NSCFBoolean which is an undocumented type. If I make the assumption it is the same as a CFBoolean, and overlooking the oddness of having to fall back to Carbon for such a fundamental thing, the documen

Re: CFBoolean

2008-08-24 Thread Chris Idou
--- On Sun, 8/24/08, Phil <[EMAIL PROTECTED]> wrote: > > I'm curious as to why you need a boolean, rather than > just what > -setBool:forKey: gives you? Because I have an array containing dict

core data hanging

2008-08-25 Thread Chris Idou
I've got a really simple application of core data. It's a document based application, but its not a NSPersistentDocument, because I have an opaque bundle/directory data format and the core data is only a tiny part of it. Its hanging on the call to: persistentStore = [persistentStoreCoordinator

applicationDockMenu: not called

2008-08-27 Thread Chris Idou
I need to create a dynamic dock menu. I've found that applicationDockMenu: app delegate method doesn't get called if I programmatically open a document on startup either from applicationDidFinishLaunching or awakeFromNib via openDocumentWithContentsOfURL. Is it a bug? Is there a place even lat

Re: applicationDockMenu: not called

2008-08-27 Thread Chris Idou
Nevermind. I realised that I have an App delegate for a subordinate Nib, and if I remove that, it starts working. --- On Wed, 8/27/08, Chris Idou <[EMAIL PROTECTED]> wrote: > From: Chris Idou <[EMAIL PROTECTED]> > Subject: applicationDockMenu: not called > To: cocoa-dev@l

Re: Creating Interface

2008-08-28 Thread Chris Hanson
aces from Objective-C protocols; C# is a Java derivative.) That's why they weren't used for things like delegates and data sources where only a subset of methods need to be implemented to be functional. -- Chris ___ Cocoa-dev maili

Re: Remove an object from a defaults suite?

2008-08-28 Thread Chris Parker
t you want here. Another is to use the "persistent domain" capabilities of NSUserDefaults. Pull in the dictionary for the domain, make a mutable copy, modify it, and then write the whole domain back out. This is overkill; use the CFPreferences API instead. .chris -- Chris Parker C

NSUserDefaultsController and validation

2008-08-28 Thread Chris Idou
How do you validate when using NSUserDefaultsController, seeing as its "values" member is internal, and you can't write validateXYZ methods? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Chris Kane
oPropertyObservingContext; is this: static char ABCFooPropertyObservingContext; and then still using &ABCFooPropertyObservingContext as the context value. If nothing ends up being packed up tight right after that char, due to data alignment, well then you still haven't lost anything

Re: Simple Array of Strings Binding Question

2008-08-30 Thread Chris Hanson
The string probably isn't "just a string." It stands for something -- for example, it could be the name of a computer. While the name of a computer might be the only thing worth displaying in that particular table, it doesn't mean that you're not

Re: CoreData and mutableArrayValueForKey:

2008-08-30 Thread Chris Hanson
operty most of the time (for example, for bindings, or for otherwise manipulating the set of items in a Folder) and just have its accessor methods do the appropriate work to keep its Folder.unorderedItems and Folder.orderedItems relationships in sync. -- Chris

<    1   2   3   4   5   6   7   8   9   10   >