Re: Just when I thought I understood bindings.

2008-10-08 Thread Chris Idou
I thought I understood bindings. > To: "Cocoa List" > Date: Wednesday, October 8, 2008, 5:27 PM > On 09/10/2008, at 10:21 AM, Chris Idou wrote: > > > It seems that the bindings are only working in one > direction. > > Editing the fields updates the object, but

Re: Just when I thought I understood bindings.

2008-10-08 Thread Chris Idou
> and > [object2 bind:@"value" toObject:object1 > withKeyPath:@"whateverPathForKeyIs" options:nil]; > > Otherwise, make sure you're content object is KVC/KVO > compliant etc. > > Tim > > > On 9 Oct 2008, at 01:21, Chris Idou wrote: > > > &g

Re: silly event question 'cuz i'm a n00b

2008-10-08 Thread Chris Idou
If all you actually want is a flag, why not just have a flag? When the other thread gets around to examining the flag, it can do what it wants. If you need to synchronize access to the flag, because say, the number of times they press the button is significant, then put an @synchronized directiv

Re: Just when I thought I understood bindings.

2008-10-08 Thread Chris Idou
ons:nil]; > > Otherwise, make sure you're content object is KVC/KVO > compliant etc. > > Tim > > > On 9 Oct 2008, at 01:21, Chris Idou wrote: > > > > > I've got an NSObjectController controlling an > object. This content > > object&#

NSTableView and drag and drop

2008-10-10 Thread Chris Idou
I want to be able to drag strings out of a table into another field, but I must be missing something major because drags never get initiated. I've added the delegate, registered drag types and added delegate methods, but clicking and dragging within the table simply selects rows in the table, dr

Re: NSNull and @""

2008-10-11 Thread Chris Idou
--- On Fri, 10/10/08, Ian Joyner <[EMAIL PROTECTED]> wrote: > I'll have to think more about this. I'm not sure > that KVO can't be > done in a type-safe manner. I guess KVO can be done in a type safe manner, but not with the interesting way that objective-c does it. i.e. it can synthesize all

Re: NSTableView and drag and drop

2008-10-11 Thread Chris Idou
gt; > Subject: Re: NSTableView and drag and drop > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com > Date: Friday, October 10, 2008, 11:50 PM > Have a look at > /Developer/Examples/Appkit/DragaNDropOutlineView > > On 11-Oct-08, at 9:06 AM, Chris Idou wrote: >

Re: NSTableView and drag and drop

2008-10-11 Thread Chris Idou
> return YES. In > your case you can simply write the string contents of the > represented > object in to the pasteboard for the NSStringPasteboardType > and return > YES > > Go through protocol. > HTH, > Chaitanya > > On 11-Oct-08, at 7:31 PM, Chris

custom nstextview

2008-10-12 Thread chris struhar
I'm trying to modify the default behavior of an NSTextView to behave more like that of programming IDEs (xcode or textmate) where if you tab over and then press return, it automatically tabs you to the same indentation level on the new line. Could someone point me in the right direction? My guess

Re: newbie question: tangential compiler errors

2008-10-13 Thread Chris Hanson
as a prefix header doesn't guard against inclusion in plain C or C++ source files, unfortunately. You'll have to switch the target's prefix header to a local prefix that includes an #ifdef __OBJC__/#endif around the #import of Cocoa.h>, one of which

+(NSSet *)keyPathsForValuesAffectingValueForKey:

2008-10-13 Thread Chris Idou
Does anyone know if you can use this mechanism for dotted values, or does it have to be a value local to the object? For example, could you say that field "a" depends on "b.c"? I'm trying to do that but it doesn't seem to work or me. ___

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-14 Thread Chris Suter
urns an id. You can define them as returning something different but the compiler will ignore it. > Best solution is just not to make the methods look the same. That's not always convenient. For example, it's nice to be able to do [NSStrin

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-14 Thread Chris Suter
.e. define the alloc method in such a way so that the compiler knows that -[ alloc] returns an object of type . Something similar could be used for [NSString string] and [NSMutableString string] which have a similar problem (they return an id, rather than an NSString or NSMutableString). -- Chris

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-14 Thread Chris Suter
change the names of your methods (which might make sense given that "context" doesn't tell you much) or cast the return from alloc to the appropriate type. You could use a macro to make it slightly more readable. -- Chris ___ Cocoa-dev

Re: Not so long filenames

2008-10-14 Thread Chris Suter
ileNameChars (rather than the UTF-16 length). You should report 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-admins(at)lists.app

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-15 Thread Chris Suter
On Wed, Oct 15, 2008 at 9:03 PM, John Engelhart <[EMAIL PROTECTED]> wrote: > > On Oct 14, 2008, at 7:11 AM, Chris Suter wrote: >> >> You can't override the type for existing methods. For example, >> initWithString: always returns an id. You can define them as r

tearing my hair out: +(NSSet *)keyPathsForValuesAffectingValueForKey:

2008-10-15 Thread Chris Idou
For one of my attributes I can't seem to get keyPathsForValuesAffecting to do its thing. The following is my code. I'm observing both keys to try and find out what's going on. keyPathsForValuesAffectingCanLink does get called. observeValueForKeyPath gets called for key noteController.linkableSe

Re: Objective-C parameter mutation

2008-10-15 Thread Chris Idou
Works for me. -(void)aMethod:(void *)mem { NSLog(@"mem2: %d", mem); } - (void)awakeFromNib { void *memory = malloc(1); NSLog(@"mem1: %d", memory); [self aMethod:memory]; } 2008-10-16 11:40:36.815 aProg[30378:813] mem1: 2439440 2008-10-16 11:40:36.815 aProg[30378

Re: tearing my hair out: +(NSSet *)keyPathsForValuesAffectingValueForKey:

2008-10-15 Thread Chris Idou
nesday, October 15, 2008, 5:42 PM > On Oct 15, 2008, at 7:16 PM, Chris Idou wrote: > > > For one of my attributes I can't seem to get > > keyPathsForValuesAffecting to do its thing. > The following is my > > code. I'm observing both keys to try and f

Re: tearing my hair out: +(NSSet *)keyPathsForValuesAffectingValueForKey:

2008-10-15 Thread Chris Idou
AIL PROTECTED]> > Subject: Re: tearing my hair out: +(NSSet > *)keyPathsForValuesAffectingValueForKey: > To: [EMAIL PROTECTED] > Cc: "Cocoa Developers" > Date: Wednesday, October 15, 2008, 5:54 PM > On Oct 15, 2008, at 8:46 PM, Chris Idou wrote: > > >

Re: Comparing the Class

2008-10-15 Thread Chris Idou
A category could be a nice OO solution here that avoids having the dreaded if else. --- On Wed, 10/15/08, Ken Ferry <[EMAIL PROTECTED]> wrote: > From: Ken Ferry <[EMAIL PROTECTED]> > Subject: Re: Comparing the Class > To: "Graham Cox" <[EMAIL PROTECTED]> > Cc: "cocoa-dev Dev" > Date: Wednesda

tearing my hair, ok here is a compilable example.

2008-10-15 Thread Chris Idou
I've attached code that shows what I'm talking about with my keyPathsForValuesAffectingValueForKey problem. If anyone wants me to send a zip file (60kb) xcode project, jet let me know. For those who just want to see the code, I've appended it here also. To compile, just put the 2 classes in a p

Re: tearing my hair, ok here is a compilable example.

2008-10-15 Thread Chris Idou
uincey Morris <[EMAIL PROTECTED]> > Subject: Re: tearing my hair, ok here is a compilable example. > To: cocoa-dev@lists.apple.com > Date: Wednesday, October 15, 2008, 10:54 PM > On Oct 15, 2008, at 22:13, Chris Idou wrote: > > > @class Class1; > > @interface Clas

Re: tearing my hair, ok here is a compilable example.

2008-10-16 Thread Chris Idou
if (context == [Class2 class]) > { > if ([keyPath > isEqualToString:@"myMethod"]) > { > NSLog( @"newvalue - myMethod:%d", > [self myMethod] ); > } > } > else > { > [supe

Re: how to use the loginItem in OSX 10.3?

2008-10-16 Thread Chris Idou
Why don't you make it a regular Cocoa app that doesn't open any windows and doesn't have a dock icon? --- On Thu, 10/16/08, XiaoGang Li <[EMAIL PROTECTED]> wrote: > From: XiaoGang Li <[EMAIL PROTECTED]> > Subject: how to use the loginItem in OSX 10.3? > To: cocoa-dev@lists.apple.com > Date: Th

Re: tearing my hair, Do we agree it’s a bu g?

2008-10-16 Thread Chris Idou
Ok, I see it is caused by NSObjectController. Is everyone agreed it is a bug? It's still quite odd that it only occurs if loaded from a NIB, but works ok if manually instantiated. --- On Thu, 10/16/08, Chris Suter <[EMAIL PROTECTED]> wrote: > From: Chris Suter <[EMAIL PROT

Re: tearing my hair, ok here is a compilable example.

2008-10-16 Thread Chris Suter
On Thu, Oct 16, 2008 at 7:54 PM, Chris Idou <[EMAIL PROTECTED]> wrote: > I disagree. I changed both to be NSObjects, and nothing changed. I think it is to do with it being a subclass of NSObjectController. Changing it to an NSObject makes it work for me.

Re: NSManagedObjectModel initWithContentsOfURL: returns nil

2008-10-16 Thread Chris Hanson
ncy. Xcode's model compiler will generate warnings and errors to enforce that consistency during model compilation. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Delete myDriver.kext files from normal user.

2008-10-17 Thread Chris Hanson
appropriate calls to unlink() when it's passed a properly-acquired-and- validated right. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

Toolbar buttons and isEnabled binding

2008-10-21 Thread Chris Idou
I seem to be getting erratic behaviour from toolbar button isEnabled bindings. In some scenarios they don't seem to work correctly. I've tried putting the exact same binding criteria on some regular buttons just to see what happens, and they seem to work correctly when the toolbar buttons don'

Re: Toolbar buttons and isEnabled binding

2008-10-21 Thread Chris Idou
ng > To: [EMAIL PROTECTED] > Date: Tuesday, October 21, 2008, 3:59 PM > You can try to disable Autovalidates. > > > On Oct 21, 2008, at 5:04 PM, Chris Idou wrote: > > > > > I seem to be getting erratic behaviour from toolbar > button isEnabled > > bindings

When does Cocoa fall apart? (Run loops)

2008-10-21 Thread Chris Idou
ely. Have people noticed these situations? What causes them, and when should I look out for it? Re: Toolbar buttons and isEnabled binding > From: Chris Idou <[EMAIL PROTECTED]> > Subject: Toolbar buttons and isEnabled binding > To: cocoa-dev@lists.apple.com > Date: Tuesday, Octobe

Re: When does Cocoa fall apart? (Run loops)

2008-10-22 Thread Chris Idou
t; Subject: Re: When does Cocoa fall apart? (Run loops) > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com > Date: Wednesday, October 22, 2008, 2:42 AM > in the latter, are you in a secondary thread? This could > explain your > problem.Otherwise, I did not experience that lately. &

Re: what do you use to make icons and similar?

2008-10-22 Thread Chris Paveglio
Adobe Illustrator CS3 and up has a feature called "live trace" which is like the old Streamline program, to trace raster images into vector format. There is also an app called Vector Magic that can vectorize images, there is a demo online somewhere. As a professional graphic designer breaking in

commitEditing

2008-10-22 Thread Chris Idou
I'm calling commitEditing on a NSObjectController, and its returning NO, for no apparent or obvious reason. How am I supposed to debug these things? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: When does Cocoa fall apart? (Run loops)

2008-10-22 Thread Chris Idou
e.com > Date: Wednesday, October 22, 2008, 7:18 AM > On Wed, Oct 22, 2008 at 9:56 AM, Chris Idou > <[EMAIL PROTECTED]> wrote: > > > The problem I reported recently where > NSObjectController screws up KVO has been confirmed by Apple > as a real bug as well. I'm

/Library/Logs vs. user/Library/Logs

2008-10-22 Thread Chris Markle
re is some other, more acceptable, best practice with respect to log file location. So... is there a best practice? Is is documented anywhere in Apple doc? Where should I go to read about accepted usage of the /Library and user/Library directories and the files therein? Thanks in adva

Re: /Library/Logs vs. user/Library/Logs

2008-10-23 Thread Chris Markle
be used specifically for this purpose by some number of apps on my system.) Still, it's worth noting the existence of this other directory. Thanks again. Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: /Library/Logs vs. user/Library/Logs

2008-10-23 Thread Chris Markle
uture as we become more and more OS X-aware. Thanks for the tip... 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.appl

Re: commitEditing

2008-10-24 Thread Chris Idou
--- On Wed, 10/22/08, Ron Lue-Sang <[EMAIL PROTECTED]> wrote: > The only reason a controller would return NO for > commitEditing is that > one of *its* editors refused to commitEditing. It's not clear to me what "its editors" are. All I've got is an object with some fields, with an NSObjectCont

Re: No warning on float to int assignment?

2008-10-24 Thread Chris Williams
Surely there should be a way to warn on any conversion where data is lost, even if it is not on by default. The compiler knows when this is happening, the author may not. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

NSPredicateEditor - row size

2008-10-25 Thread Chris Idou
Has anyone found a way to make a row in the NSPredicateEditor to have components taller than the standard height or a more complicated arrangement of components, or are you pretty much limited to one row of buttons, and text fields and similar sized components? Programs like Hazel are able to

Re: Just starting off in obj C

2008-10-26 Thread Chris Idou
Interesting, but that's no longer ansi-C. Plus it still won't support you creating your own kinds of format strings. --- On Sun, 10/26/08, Chris Suter <[EMAIL PROTECTED]> wrote: > From: Chris Suter <[EMAIL PROTECTED]> > Subject: Re: Just starting off in obj C &g

NSPredicateEditor error

2008-10-27 Thread Chris Idou
I'm getting the following error: In , different number of items (3) than predicate template views (4) for template >From experimenting, the only difference between the >NSPredicateEditorRowTemplate that is failing and my other ones that work fine, >is that this one has a NSButton in its list

Re: Finding out that a volume is going away before it does

2008-10-27 Thread Chris Suter
itration; there's no other way for it to work. -- 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 Hel

Re: NSPredicateEditor error

2008-10-28 Thread Chris Idou
oa-dev@lists.apple.com > Date: Tuesday, October 28, 2008, 11:41 AM > On Oct 27, 2008, at 10:07 PM, Chris Idou wrote: > > > > > I'm getting the following error: > > > > In , different > number of items (3) > > than predicate template views (4)

Re: When does Cocoa get "No more!" from malloc?

2008-10-30 Thread Chris Suter
t was trying to allocate when it failed. If you're that interested, you can look at the source code. It's open source. This is straying a bit off-topic for the Cocoa list. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: When does Cocoa get "No more!" from malloc?

2008-10-30 Thread Chris Suter
ks. I think the 2 MB must come from a large allocation or from one of the other data structures. -- 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: -[_NSZombie methodSignatureForSelector:] not working

2008-10-30 Thread Chris Kane
0 zsh: illegal hardware instruction dead % % NSZombieEnabled=YES ./dead 2008-10-30 10:39:35.736 dead[12323:10b] *** -[NSObject self]: message sent to deallocated instance 0xc048b0 zsh: trace trap NSZombieEnabled=YES dead Chris Kane Cocoa Frameworks, Apple On Oct 30, 2008, at 10:03, Michae

Re: Silicon Valley CocoaHeads ... ?

2008-10-30 Thread Chris Driggett
I for one would love for it to start up again. Anything we can do? Thanks, Chris On Thursday, October 30, 2008, at 02:10PM, "Jay Reynolds Freeman" <[EMAIL PROTECTED]> wrote: >Excuse me wasting bandwidth, but I have the impression that the >Silicon Valley CocoaHeads gro

Re: When and how often do you mix C++ with Objective C in your project?

2008-10-30 Thread Chris Hanson
unction to conform to the NSCopying protocol. -- 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/Unsubscr

tokenField:writeRepresentedObjects:toPasteboard:

2008-10-30 Thread Chris Idou
I was puzzled why tokenField:writeRepresentedObjects:toPasteboard: delegate function wasn't called when dragging from an NSTokenField. Then on a hunch I tried setting the delegate of the NSTokenFieldCell, and then it started getting called. Is that what I am supposed to do? Does the documentat

Re: Debugging NSDistributedNotificationCenter

2008-10-30 Thread Chris Kane
As of Leopard, you need to do this: sudo touch /var/log/do_dnserver_log sudo touch /var/log/dnserver.log sudo chown daemon /var/log/dnserver.log as the daemon can't create that file itself in that location any longer. But you can find the logs in the "system.log" in Console.ap

NSTokenField drag and drop

2008-10-31 Thread Chris Idou
I uploaded a mini project here: http://idisk.mac.com/chris.bitmead-Public?view=web Can anyone tell me why writeRepresentedObjects isn't called on the TokenDelegate when you drag a token from one field to the other? ___ Cocoa-dev mailing list

Re: Gradient panel

2008-10-31 Thread Chris Hanson
iew. Or even just put it within your window/panel's content view, covering 100% of its area, with its springs and struts set appropriately. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Localization...

2008-11-02 Thread Chris Idou
I don't seem to be having much luck getting localization to work. I've got a utf16 strings file in my project called MetaData.strings that contains: "kMDItemFSLabel" = "color label"; Then in my code... [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"kMDItemFSLabel" value:@"not

Re: Porting from Windows to Mac

2008-11-02 Thread Chris Idou
> Do you really mean this? As far as I've heard, > Apple's official > stance has never been to classify Carbon as a legacy > technology > (though they've certainly taken all the steps). Can we > finally settle > this issue and start calling things as they are? > > Of course there is the whole i

NSPredicateEditor

2008-11-02 Thread Chris Idou
Has anyone been able to add menu items to the first popup while it is running? Or are you pretty much stuck with whatever the initial values were? I've tried various things and haven't been able to do it. ___ Cocoa-dev mailing list (Cocoa-

Re: Porting SetupComm function in Mac

2008-11-02 Thread Chris Ridd
ggests darwin-dev might be a better place. I'm surprised there doesn't seem to be a porting-from-Windows list. Cheers, Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

Re: properties, threads, and KVO

2008-11-04 Thread Chris Hanson
ing *familyName; @property (readonly) NSString *fullName; @end Atomic properties only guarantee that you won't get back a zombie from any of the above properties. They make no guarantee that fullName won't be "Cem Hanson" or "Chris Karan." Furthermore, if anything is

Use named constants, not literal strings (was Re: Please help. At wit's end binding NSPopupButtonCell selection)

2008-11-04 Thread Chris Hanson
;pages" options:nil]; The same is true for things like NSNotification names, various known NSDictionary keys, and so on -- if there's a named constant, use it, rather than make an assumption about what its value is. -- Chris ___

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Chris Hanson
ying objects the pop-up represents. One other thing to ensure is that you're *only* using the specific Masters controller you set up in Step #2 for populating this pop-up. One common issue is to try to "consolidate" controllers; since bindings are generally two

Re: NSTableView

2008-11-04 Thread Chris Hanson
. Views in Cocoa don't hold data, they just present 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-admi

Re: Making a Window Class Invocable from Any Thread

2008-11-04 Thread Chris Hanson
s on your data distinct from your user interface, you can much more easily scale your logic along with the user's hardware, and keep debugging of both your UI and logic straightforward. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

How to get a list of all known file types?

2008-11-06 Thread Chris Idou
How does one obtain a list of all the UTI file types known to the system? And then for a given UTI, how does one obtain a human readable representation of it? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: How to get a list of all known file types?

2008-11-06 Thread Chris Idou
PROTECTED]> > Subject: Re: How to get a list of all known file types? > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com > Date: Thursday, November 6, 2008, 4:09 PM > On Nov 6, 2008, at 4:00 PM, Chris Idou wrote: > > > How does one obtain a list of all the UTI fil

Re: How to get a list of all known file types?

2008-11-06 Thread Chris Idou
are interested in. --- On Thu, 11/6/08, j o a r <[EMAIL PROTECTED]> wrote: > From: j o a r <[EMAIL PROTECTED]> > Subject: Re: How to get a list of all known file types? > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com > Date: Thursday, November 6, 2008, 4:32 P

kMDItemKind (was: How to get a list of all known file types?)

2008-11-06 Thread Chris Idou
om > Date: Thursday, November 6, 2008, 6:48 PM > On Fri, Nov 7, 2008 at 2:12 PM, Chris Idou > <[EMAIL PROTECTED]> wrote: > > > > I've got an app which is matching on file types, > so I want the user to be able to say "show me all > the... say... MS-Word docu

Re: Xcode's New Data Model reads ivars as attributes ?!?

2008-11-09 Thread Chris Hanson
s, and generate entities that will be backed by those classes. Then you can change your superclasses to NSManagedObject, remove your ivars, adjust or eliminate your accessors, and have converted an existing app to use Core Data for its object graph management. -- Chris On Nov 8, 2008, at

Re: Mysterious warning

2008-11-12 Thread Chris Suter
any light on what's wrong here? Hopefully the above is > enough to go on. The order of evaluation of the arguments to a function is undefined so you have a problem where you're taking the address of wptr and you're pre-decrementing it. -- Chris __

Re: Mysterious warning

2008-11-12 Thread Chris Suter
dn't look at it closely enough. Nevertheless, I believe that's what the compiler was getting at (albeit erroneously). -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: NSArrayController bound to an array of strings

2008-11-16 Thread Chris Suter
need otherwise). If I were you, I'd create a new object. You might find that you want to add more columns to the table in future. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator co

NSExpression and CAST (NSPredicate)

2008-11-16 Thread Chris Idou
NSExpression contains the following mysterious information: "All methods must take 0 or more id arguments and return an id value, although you can use the CAST expression to convert datatypes with lossy string representations (for example, CAST(, "NSDate")). The CAST expression is extended

Re: XML Datasource question on persistence

2008-11-16 Thread Chris Idou
I would say it depends on how big the dataset is. If the data is small and/or you have to slurp it all into memory anyway, then I like the simplicity of just keeping it as XML. But if the data is arbitrarily large and/or you don't want it all in memory at once, then going to sqlite becomes some

Re: newbie NSMutable dictionary subclass question

2008-11-16 Thread Chris Suter
CocoaFundamentals/CocoaObjects/chapter_3_section_9.html#//apple_ref/doc/uid/TP40002974-CH4-DontLinkElementID_105> -- 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: How to implement float min(float x, ...) ?

2008-11-17 Thread Chris Holloway
://nikitadanilov.blogspot.com/2005/07/vaargs-c99-compound-literals-safe.html. -Chris 2008/11/17 Oleg Krupnov <[EMAIL PROTECTED]>: > I apologize, this is plain old C, not Cocoa-specific question, but the > fastest way to get the answer. > > I want to create a function that finds

Re: Autorelease Question

2008-11-20 Thread Chris Kane
omewhere. And if it's an important app, we often can't introduce the pool we wanted to due to binary compatibility, which means everybody loses if it would have improved typical app performance. Chris Kane Cocoa Frameworks, Apple ___ Coco

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Chris Idou
--- On Wed, 26/11/08, Michael Robinson <[EMAIL PROTECTED]> wrote: > I too had a horrible time implementing this. > > Below I've pasted the code that handles dnd re-ordering > in my table. > > Basically it just makes a copy of the dragged row, deletes > it, then rebuilds the array, inserting the

core-data multiple contexts or coordinators?

2008-11-26 Thread Chris Idou
The core-data documentation seems very vague about whether multiple threads should use different NSManagedObjectContexts but one NSPersistentStoreCoordinator, or multiple coordinators. I've got an app where one thread needs to write, and one (or maybe more) threads need to read. One or more co

Re: Code signing and verification

2008-11-26 Thread Chris Hanson
, if this is something you'd like to see API for, please file a feature request at http://bugreport.apple.com/ and describe what you'd like to be able to do and why. Thanks! -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

How to make a RunLoop patiently do nothing?

2008-12-03 Thread Chris Idou
I want to have a separate thread in my app which does time consuming things. I want to assign tasks to this thread using performSelector:onThread. Now you can't have a runloop with no input sources, or it exits immediately. So how do I start a thread with a runloop that does nothing except pati

Re: How to make a RunLoop patiently do nothing?

2008-12-03 Thread Chris Idou
Good question. I had assumed that something like [myThread performSelector:@selector(exit) onThread:myThread ... would do the trick. Would this be a "nice" way to do it? > > Chris Idou wrote: > > >I want to have a separate thread in my app which does > time consum

Re: How to display simple dialog at application startup?

2008-12-03 Thread Chris Idou
Maybe you could launch your own untitled document, if that's what you need? --- On Wed, 3/12/08, Sean McBride <[EMAIL PROTECTED]> wrote: > From: Sean McBride <[EMAIL PROTECTED]> > Subject: How to display simple dialog at application startup? > To: cocoa-dev@lists.apple.com > Received: Wednesday,

core data, refreshObject, multiple threads

2008-12-04 Thread Chris Idou
I've got a main thread that handles a gui, and a worker thread with its own persistentStoreCoordinator and managedObjectContext. The gui notifies the worker thread of a change, passing it an objectID, and the worker thread gets the object, and other objects it is connected to, and calls [manag

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Chris Hanson
NSString *name; You can then write "NSString *n = bird.name;" and the compiler will generate an invocation of -BIRD_NAME. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderato

Re: core data, refreshObject, multiple threads

2008-12-07 Thread Chris Idou
<[EMAIL PROTECTED]> > Subject: Re: core data, refreshObject, multiple threads > To: cocoa-dev@lists.apple.com > Cc: [EMAIL PROTECTED] > Received: Friday, 5 December, 2008, 4:04 PM > Hi Chris, > > On 5/12/08, Chris Idou <[EMAIL PROTECTED]> wrote: > &

Re: core data, refreshObject, multiple threads

2008-12-07 Thread Chris Idou
t; Received: Sunday, 7 December, 2008, 5:45 AM > Chris, > > Can you make use of the - > (void)refreshObject:(NSManagedObject *)object > mergeChanges:(BOOL)flag method on NSManagedObjectContext? See my original posting below. > > Thanks > -- > John Clayton > Skyp

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
I'm a bit confused by your post. NSPredicateEditor doesn't compare any dates, it just creates NSPredicates. Maybe you're saying that if you have a NSDatePicker in your NSPredicateEditor, that it creates a predicate with a date set to 13:41:40. If that's the case, then it probably has more to do

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
is there any > guarantee about the time of an NSDatePicker in an > NSPredicateEditor? > > I created a quick test of an NSDatePicker outside an > NSPredicateEditor and its default time seems to be 8:00:00. > > On Dec 7, 2008, at 5:57 PM, Chris Idou wrote: > > > >

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
ot; time was inserted which then > threw off anything else I did. If I only needed a date > (from a datetime field), I had to format it that way (as > only a date, and in the format I needed) and do some > seemingly-odd comparison (like comparing two strings). It > worked, so I di

PackageMaker installing into /Applications or ~/Applications depending on admin or not?

2008-12-07 Thread Chris Markle
if PackageMaker does the same thing? Or can it be motivated to do so? I plan on trying this myself but I'm a PackageMaker newby and am concerned about the influence of various settings on my experiments... Chris ___ Cocoa-dev mailing list (Cocoa

Re: Unit Testing Frameworks

2008-12-08 Thread Chris Hanson
s interpreted as a single argument. -- 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

Shell tool with GUI

2008-12-08 Thread Chris Hiszpanski
its from NSView? Or is there a more appropriate method? I'd appreciate any pointers in the right direction. Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta

NSTask and environment variables

2008-12-08 Thread Chris Idou
I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and extend it before passing it to NSTask. Is there any Cocoa API which returns the environment as a N

Re: Development workflows for signed code?

2008-12-09 Thread Chris Suter
ing with an invalid signature. It wouldn't surprise me if future releases of OS X make more use of the code signature. By the way, you should post code signing questions to the apple-cdsa list rather than the Cocoa list as you'll get a better response there. -- Chris __

commitEditing and unrecognized selector

2008-12-09 Thread Chris Idou
I've got a modal dialog with a couple of NSTextFields. Changes weren't getting saved, so I thought I'd better call commitEditing on the text field before retrieving its value with stringValue. But when I call commitEditing on the NSTextField it gives the error: -[NSTextField commitEditing]: unr

Get Info via OS X UI on app with changed version data still shows old value, unless copied, then it works

2008-12-09 Thread Chris Markle
/app show the changed value. Anyone know what's going on here? Thanks in advance... 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 coco

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Chris Hanson
the things they wind up able to accomplish with third-party plug-ins to your application, especially if they can do things with plug-ins that get saved in your application's documents. - The Apple Publications Style Guide term is "plug-in" with a hyphen in prose, "Plug-in

Re: How to use NSString with CommonCrypto HMAC correctly?

2008-12-13 Thread Chris Ridd
trdup(), this: char *t = [key UTFString]; char *keychar = (char *)malloc(strlen(t) + 1); strcpy(keychar, t); Dunno about the rest of your code, but that jumped out at me. Cheers, Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

NSStatusItem when clicked shows custom view

2009-03-05 Thread Chris Purcell
a regular NSWindow with a custom view? 2) How can I position the window so that it is directly below the NSStatusItem? Or am I going about this the wrong way. Thanks! --Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

<    4   5   6   7   8   9   10   11   >