Re: Objective-C parameter mutation

2008-10-15 Thread Sherm Pendley
On Wed, Oct 15, 2008 at 10:07 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > > Others have addressed your current problem, but a note about the problem of > passing 0.001: > > A float may not be able to exactly represent 0.001, but a value somewhat > close to it. Spot-on! Goldberg's classic paper

NSComboBox select change

2008-10-15 Thread Joseph Yu
Hi When the combobox change the selection,I want to do something. How to do this? I didn't see any callback function. Or set the NSControl? *** The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent those of Qi

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

2008-10-15 Thread Chris Idou
That thought had occured to me, but making it readwrite doesn't seem to help. Cocoa NIB loading doesn't seem to call accessors, it seems to access them more directly. I even tried this: -(Class1 *)class1 { return class1; } -(void)setClass1:(Class1 *)v { NSLog(@"setClass1: %@",

Re: Dial with Bluetooth

2008-10-15 Thread Nick Zitzmann
On Oct 15, 2008, at 4:20 PM, Thomas Bartelmess wrote: I would like to know if anybody has some expirience with the IOBluetooth Classes. Can you tell me how hard it is to Dial a number on a Phone with Bluetooth. I'm new to Bluetooth (I don't know very much about it) so please don't be too r

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

2008-10-15 Thread Quincey Morris
On Oct 15, 2008, at 22:13, Chris Idou wrote: @class Class1; @interface Class2 : NSObject { IBOutlet Class1 *class1; } @property(readonly) Class1 *class1; -(BOOL)myMethod; @end #import "Class2.h" #import "Class1.h" @implementation Class2 @synthesize class1; ... - (void)awakeFromNib {

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

CoreData: "Unacceptable type of value for to-one relationship"

2008-10-15 Thread Pavel Kapinos
Hi, I am using an abstract entity as a destination for to-one relationship but assign an instance of its concrete subentity and it worked just fine in Tiger and even in early 10.5, but I am getting now this nasty "Unacceptable type of value for to-one relationship" runtime messages in 10.

Re: -[NSGarbageCollection disableCollectorForPointer:] ?

2008-10-15 Thread Michael Link
I actually went with using NSAllocateCollectable(NSScannedOption) and that seems to be working well. Thanks. -- Michael On Oct 15, 2008, at 9:21 PM, Ken Ferry wrote: Or you could malloc the memory for the buffer (free'ing it when you're done) and disable/enable collection on any objects poi

Dial with Bluetooth

2008-10-15 Thread Thomas Bartelmess
Hello everyone! I would like to know if anybody has some expirience with the IOBluetooth Classes. Can you tell me how hard it is to Dial a number on a Phone with Bluetooth. I'm new to Bluetooth (I don't know very much about it) so please don't be too rude. Thanks a lot Thomas _

Re: how to complete c/s app

2008-10-15 Thread Andrew Farmer
On 15 Oct 08, at 19:24, han wrote: I want to complete a vigorous file transfer application.The server is implemented in the max os x,and client in the windows. I think the app is flexible, scalable, reusable. That looks like a sound set of requirements, but what it isn't is a question. W

Re: how to complete c/s app

2008-10-15 Thread Rohan Lloyd
On 16 Oct 2008, at 1:24 PM, han wrote: I want to complete a vigorous file transfer application.The server is implemented in the max os x,and client in the windows. I think the app is flexible, scalable, reusable. What about ftp, sftp or scp?

Re: Comparing the Class

2008-10-15 Thread Ken Ferry
On Wed, Oct 15, 2008 at 7:18 PM, Chris Idou <[EMAIL PROTECTED]> wrote: > > A category could be a nice OO solution here that avoids having the dreaded > if else. ..as long as the method name is not too generic. Early in Leopard, iChat and Mail both had some mysteriously broken behavior with some

Re: how to complete c/s app

2008-10-15 Thread han
I want to complete a vigorous file transfer application.The server is implemented in the max os x,and client in the windows. I think the app is flexible, scalable, reusable. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Comparing the Class

2008-10-15 Thread Michael Ash
On Wed, Oct 15, 2008 at 6:17 PM, Melissa J. Turner <[EMAIL PROTECTED]> wrote: > It's generally unwise to do this kind of thing if you're dealing with class > clusters or bridged classes (which category includes both NSString and > NSNumber). The class you actually get may not be what you're expecti

Re: -[NSGarbageCollection disableCollectorForPointer:] ?

2008-10-15 Thread Ken Ferry
Or you could malloc the memory for the buffer (free'ing it when you're done) and disable/enable collection on any objects pointers you store in it that you also want to keep alive. Maybe that's easier to understand. (Any time you use disableCollectorForPointer is a possible leak, by the way. The

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

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

2008-10-15 Thread Chris Idou
Thanks, that's good to know. But it doesn't solve my particular problem. I'm now calling the super class as described, but it doesn't help. int foo; int *bar = &foo; - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context

Re: Comparing the Class

2008-10-15 Thread Graham Cox
On 16 Oct 2008, at 12:59 pm, Ken Ferry wrote: A category can add a protocol adoption, actually. Cool, I didn't know that :) Obj-C is a great language, isn't it? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Objective-C parameter mutation

2008-10-15 Thread Graham Cox
On 16 Oct 2008, at 11:31 am, James Trankelson wrote: ... and when I would call it ([inst foo:0.001], for example), the value inside the foo method would NOT be 0.001. At the time, I believed there to be an Objective C requirement that parameters to methods need to be pointers to objects, not pr

Re: Comparing the Class

2008-10-15 Thread Ken Ferry
> …because you can't force an existing class to conform to a protocol without subclassing. A category can add a protocol adoption, actually. -Ken On Wed, Oct 15, 2008 at 6:37 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > > On 16 Oct 2008, at 12:20 am, Ruotger Skupin wrote: > > Hi, >> >> when comp

Re: Comparing the Class

2008-10-15 Thread Graham Cox
On 16 Oct 2008, at 12:20 am, Ruotger Skupin wrote: Hi, when comparing the class of two objects I usually do [obj1 isKindOfClass:[obj2 class]]. But if I say have the Class as an input value to a method: - (void) bla:(Class) inClass { if (/* inClass is an NSString */) {

table bindings, value transformer per row?

2008-10-15 Thread [EMAIL PROTECTED]
i've got a bound table view. is it possible to use a different value transformer based on which row of the table is being displayed/edited? and if so, how? thanx, ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: Multiple persistent store coordinators gotchas?

2008-10-15 Thread Melissa J. Turner
On Oct 15, 2008, at 17:41, Dave Dribin wrote: On Oct 15, 2008, at 5:52 PM, Melissa J. Turner wrote: The downside tends to be more memory use, since you'll have two copies of all the data for each object that is loaded into both stacks in addition to the overhead of the stack itself. Stale d

Re: -[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Jerry Krinock
Sorry, a correction: adding duplicates based on -isEqual: ^is^ indeed the behavior that I want ___ 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 c

Re: -[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Jerry Krinock
On 2008 Oct, 15, at 17:03, Nick Zitzmann wrote: Yes, NSSet and its subclasses use -isEqual:. You should override that, as well as -hash. Thanks, Nick. I don't think I need to override anything though, because not adding duplicates based on -isEqual: is indeed the behavior that I want.

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

2008-10-15 Thread Jim Correia
On Oct 15, 2008, at 8:46 PM, Chris Idou wrote: I can't do that because my object inherits from NSObject, and NSObject doesn't contain an implementation of observeValueForKeyPath. So that gives a runtime error. NSObject does have an implementation of - observeValueForKeyPath:ofObject:change

Re: Objective-C parameter mutation

2008-10-15 Thread Charles Steinman
--- On Wed, 10/15/08, James Trankelson <[EMAIL PROTECTED]> wrote: > So, I've got the following method: > > + (void)done:(MyObj*)dObj structure:(void*)pStruct > > ... and when I call it with a "structure" > parameter, say a malloc'ed > char* at address 0x171eb070, as soon as I step into this > me

Re: Objective-C parameter mutation

2008-10-15 Thread Ken Thomases
On Oct 15, 2008, at 7:31 PM, James Trankelson wrote: I have a question about method parameters in Objective C. A long time ago, I had a method like the following: -(void) foo:(float)val { } ... and when I would call it ([inst foo:0.001], for example), the value inside the foo method would NOT

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

2008-10-15 Thread Chris Idou
I can't do that because my object inherits from NSObject, and NSObject doesn't contain an implementation of observeValueForKeyPath. So that gives a runtime error. Besides which, the only reason I added observeValueForKeyPath method is because keyPathsForValuesAffecting wasn't working. --- On

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

2008-10-15 Thread Ken Thomases
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 find out what's going on. keyPathsForValuesAffectingCanLink does get called. observeValueFor

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: Multiple persistent store coordinators gotchas?

2008-10-15 Thread Dave Dribin
On Oct 15, 2008, at 5:52 PM, Melissa J. Turner wrote: If your second thread is doing pure report generation, and whatever transients it sets won't affect anything outside the report generation, this is the solution you're looking for. Great, thanks! The documentation is a little thin about

Objective-C parameter mutation

2008-10-15 Thread James Trankelson
Hi, I have a question about method parameters in Objective C. A long time ago, I had a method like the following: -(void) foo:(float)val { } ... and when I would call it ([inst foo:0.001], for example), the value inside the foo method would NOT be 0.001. At the time, I believed there to be an Ob

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: -[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Nick Zitzmann
On Oct 15, 2008, at 5:45 PM, Jerry Krinock wrote: I am assuming therefore assuming "-isEqual:" in writing my code. Someone please let me know if they see any risk in that. Yes, NSSet and its subclasses use -isEqual:. You should override that, as well as -hash. Nick Zitzmann

Re: NSBezierPath problems, seems to be two bugs

2008-10-15 Thread Jochen Moeller
Hi Aki, thanks a lot for the valuable info which was new to me. With setting NSCompositeCopy of the current context I could exactly reproduce the feature of NSRectFill() with -fillRect:. This means that also the light grey shape still remains during the animation which was the reason for me

-[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Jerry Krinock
Documentation for -[NSMutableSet addObject:] says: "Adds a given object to the receiver, if it is not already a member. ... If anObject is already present in the set, this method has no effect on either the set or anObject." The terms "a member" and "present" are not defined and there are

Re: -[NSGarbageCollection disableCollectorForPointer:] ?

2008-10-15 Thread Ken Ferry
> What I did try was > 'NSPointerFunctionsStrongMemory|NSPointerFunctionsObjectPointerPersonality' > which does work even though some of the pointers aren't objects and this > doesn't seem quite correct but since I'm using GC > NSPointerFunctionsObjectPointerPersonality seems nearly equivalent to >

Re: Multiple persistent store coordinators gotchas?

2008-10-15 Thread Melissa J. Turner
On Oct 15, 2008, at 14:00, Dave Dribin wrote: Hello, I'm working on a Core Data application that does lots of processing of the data in background threads to generate reports. I'd like to investigate using multiple persistent store coordinators to reduce lock contention, i.e. pattern #2

Re: NSView subclass

2008-10-15 Thread DKJ
Now another problem! When I put this in the MyViewSubclass header: @interface NSObject (MyViewSubclassDelegation) - (void)pointClicked:(NSPoint)point; @end I get an XCode internal error: Uncaught Exception: *** -[NSCFString substringWithRange:]: Range or index out of bounds I

Re: Targetting 10.4

2008-10-15 Thread Kevin Bracey
Hi Don't forget that the 10.4 sdk, is named MacOSX10.4u Cheers Kevin ___ 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

Re: Comparing the Class

2008-10-15 Thread Melissa J. Turner
On Oct 15, 2008, at 06:20, Ruotger Skupin wrote: Hi, when comparing the class of two objects I usually do [obj1 isKindOfClass:[obj2 class]]. But if I say have the Class as an input value to a method: - (void) bla:(Class) inClass { if (/* inClass is an NSString */) {

Re: NSView subclass

2008-10-15 Thread Jonathan Hess
On Oct 15, 2008, at 2:30 PM, Scott Andrew wrote: If its a delegate you would want to check if the delegate handles the selector with respondsToSelector and the use performSelector to make the call. For example if ([delegate respondsToSelector:@selector(pointClicked:)]) [delegate perfo

Re: NSView subclass

2008-10-15 Thread Mike Abdullah
You should really name your category. Something like: @interface NSObject (MyViewDelegate) Even better if you're targeting Leopard only is to use a formal protocol, but with optional methods. e.g. @protocol MyViewDelegate @optional - (void)pointClicked:(NSPoint)point; @end On 15 Oct 2008, a

Re: NSView subclass

2008-10-15 Thread Scott Andrew
If its a delegate you would want to check if the delegate handles the selector with respondsToSelector and the use performSelector to make the call. For example if ([delegate respondsToSelector:@selector(pointClicked:)]) [delegate performSelector:@selector(pointClicked:) withObject: [NS

NSView subclass

2008-10-15 Thread DKJ
I've written a subclass of NSView. It calls a method its delegate can implement to detect mouse clicks. I've put something like this in the header file: // delegate method: @interface NSObject () - (void)pointClicked:(NSPoint)point; @end This is enough to prevent a "no -pointClicked: method

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

2008-10-15 Thread John Engelhart
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 returning something different but the compiler will ignore it. Just a clarification on this particular point- it is possi

NSTokenField: Tokenizing on Right Arrow key

2008-10-15 Thread Dirk Musfeldt
Hi, I'm using NSTokenField on 10.5. I want the field to display the token once the user presses the right arrow key to get at the end of the selection. this is the way it works in Mail's address field. Unfortunately this does not work as expected. It works if the user enters one of the tokenizing

Multiple persistent store coordinators gotchas?

2008-10-15 Thread Dave Dribin
Hello, I'm working on a Core Data application that does lots of processing of the data in background threads to generate reports. I'd like to investigate using multiple persistent store coordinators to reduce lock contention, i.e. pattern #2, as described in the multi-threaded chapter of

Re: gdb of va_alist?

2008-10-15 Thread Andrew Farmer
On 15 Oct 08, at 09:23, David Springer wrote: Folks, I am looking into some legacy code that is called from a third-party library. The function being called has this signature: AStringClass PlatformSpecificImplClass::formatMessage(unsigned int code, va_list* argList) The problem is that on

Re: Decoding OSStatus values

2008-10-15 Thread Randall Meadows
On Oct 15, 2008, at 1:22 PM, Peter Ammon wrote: On Oct 15, 2008, at 7:49 AM, Richard Dearlove wrote: Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\37

Re: Decoding OSStatus values

2008-10-15 Thread Peter Ammon
On Oct 15, 2008, at 7:49 AM, Richard Dearlove wrote: Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\

Re: NSBezierPath problems, seems to be two bugs

2008-10-15 Thread Aki Inoue
Jochen, The behavioral differences you're observing is the result of NSCompositingOperation setting. NSRectFill() uses NSCompositeCopy whereas NSBezierPath does not modify the current setting that is accessible via -[NSGraphicsContext compositingOperation]. Aki On 2008/10/15, at 4:56,

Re: Building smart folder list as in iTunes

2008-10-15 Thread Steven Riggs
This should get you in the right direction.. http://developer.apple.com/samplecode/SourceView/index.html -Steve On Oct 15, 2008, at 12:59 PM, Jushin wrote: I would like to add a left pane (I don't know what to call this) as in iTunes or Apple Mail. In this pane, I want make place a library, f

Building smart folder list as in iTunes

2008-10-15 Thread Jushin
I would like to add a left pane (I don't know what to call this) as in iTunes or Apple Mail. In this pane, I want make place a library, folders, and smart folders. Where should I start? I couldn't find any example code or documentation regarding this. Please someone help me how to do this. Thanks,

NSFileBusy

2008-10-15 Thread Timothy Larkin
Is the NSFileBusy attribute returned by the NSFileManager set by the same conditions that cause a "file in use" error in the Finder? To put it another way, can I check whether deleting a file in the Finder will produce an "in use" error by looking at the state of the NSFileBusy flag? -- T

Re: how to complete c/s app

2008-10-15 Thread Scott Ribe
> c/s = client/server. is there the sample codes download link That is such a broad wide-open question as to be meaningless. There are at least dozens of major design variations and hundreds of smaller ones involved in client/server architecture. You're going to have get closer to being able to de

Re: -[NSGarbageCollection disableCollectorForPointer:] ?

2008-10-15 Thread Michael Link
That makes sense, although 'NSPointerFunctionsStrongMemory| NSPointerFunctionsOpaqueMemory' gives the error: *** -[NSPointerArray initWithOptions:] Requested configuration not supported. What I did try was 'NSPointerFunctionsStrongMemory| NSPointerFunctionsObjectPointerPersonality' which do

gdb of va_alist?

2008-10-15 Thread David Springer
Folks, I am looking into some legacy code that is called from a third-party library. The function being called has this signature: AStringClass PlatformSpecificImplClass::formatMessage(unsigned int code, va_list* argList) The problem is that on x86 platforms, |argList| seems to point to a valid

Re: how to complete c/s app

2008-10-15 Thread Jason Coco
On Oct 15, 2008, at 12:05 , han wrote: han wrote: how to complete a c/s app.Is there a sample code? c/s = client/server. is there the sample codes download link That totally depends on the type of Client/Server app you want to make, what technologies you want to use to make it, etc. Yo

Re: how to complete c/s app

2008-10-15 Thread han
han wrote: how to complete a c/s app.Is there a sample code? c/s = client/server. is there the sample codes download link ---han ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: newbie question: tangential compiler errors

2008-10-15 Thread JB
I unchecked "Precompile Prefix Header" in the new target's build settings (per Chris's comments) and it compiles without error now. Thanks! JB On Mon, Oct 13, 2008 at 8:07 PM, Chris Hanson <[EMAIL PROTECTED]> wrote: > On Oct 13, 2008, at 12:42 PM, JB wrote: > > I've added Apple's sample LoginIt

Fwd: how to complete c/s app

2008-10-15 Thread Benjamin Dobson
On 15 Oct 2008, at 16:21:48, Steve Bird wrote: On Oct 15, 2008, at 6:43 AM, han wrote: how to complete a c/s app.Is there a sample code? "c/s" = ... Computer Science? Client / Server? Cycles per Second? C.S. Lewis? Catch and Serve? Cut and Scrape? COBOL/SmallTalk? Copy and Save? From th

panelSelectionDidChange does not get called for items on the sidebar

2008-10-15 Thread Christos Konidaris
Just to save some other folk from wasting his time with this: In my app delegate I've tried to implement the panel:panelSelectionDidChange callback in order to customize our accessory view depending on the current user selection in the browser. Using the stripped down version below for in

Re: how to complete c/s app

2008-10-15 Thread Steve Bird
On Oct 15, 2008, at 6:43 AM, han wrote: how to complete a c/s app.Is there a sample code? "c/s" = ... Computer Science? Client / Server? Cycles per Second? C.S. Lewis? Catch and Serve? Cut and Scrape? COBOL/SmallTalk? Copy and Save? --

Re: Decoding OSStatus values

2008-10-15 Thread Richard D
Thanks! On 15 Oct 2008, at 16:01, Jean-Daniel Dupas wrote: Le 15 oct. 08 à 16:49, Richard Dearlove a écrit : Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Erro

Re: how to complete c/s app

2008-10-15 Thread Andrew Merenbach
On Oct 15, 2008, at 4:00 AM, Graham Cox wrote: On 15 Oct 2008, at 9:43 pm, han wrote: how to complete a c/s app.Is there a sample code? Who knows. Maybe you could start by explaining what a c/s app is? --G Perhaps "c/s" stands for "client/server," but I've no idea. -- Andrew smime.p7

Re: Decoding OSStatus values

2008-10-15 Thread Jean-Daniel Dupas
Le 15 oct. 08 à 16:49, Richard Dearlove a écrit : Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\ pr

Decoding OSStatus values

2008-10-15 Thread Richard Dearlove
Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\ printf("Error: %s -> %s: %d\n", (char *)&err,__FILE__, _

Re: Providing replicable views in IB

2008-10-15 Thread Michael Ash
On Wed, Oct 15, 2008 at 9:05 AM, Matteo Manferdini <[EMAIL PROTECTED]> wrote: > Thank you very much! > I did not think about the crappy way becase it *is* an unnatural way of > doing things. By the way, how do you know NSCollectionView does it that way? > Where do you collect such detailed informat

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

2008-10-15 Thread Michael Ash
On Wed, Oct 15, 2008 at 6:50 AM, Jonathan del Strother <[EMAIL PROTECTED]> wrote: > Presumably you could override +(id)alloc to be +(MyClass)alloc on > classes that you knew implemented ambiguous init methods? You could, but then every subclass of your class which defines its own init methods is t

Re: Comparing the Class

2008-10-15 Thread Mike Abdullah
On 15 Oct 2008, at 14:20, Ruotger Skupin wrote: Hi, when comparing the class of two objects I usually do [obj1 isKindOfClass:[obj2 class]]. But if I say have the Class as an input value to a method: - (void) bla:(Class) inClass { if (/* inClass is an NSString */) {

Re: iPhoto thumbnail view

2008-10-15 Thread I. Savant
On Oct 15, 2008, at 8:02 AM, douglas welton wrote: IKImageBrowserView is your friend. Check out the example code ImageBrowser. To constrain the view so that it only scrolls horizontally, use the -setContentResizingMask: method with the NSViewWidthSizable mask only. Ack! That's what I

Serial port over Bluetooth or not?

2008-10-15 Thread Daniel Kennett
Hey list, I'm writing a framework that'll communicate with the Lego Mindstorms NXT brick [1] over a serial port, which is created either over Bluetooth or a USB connection (using the Bluetooth serial profile and a USB->Serial driver respectively). The protocol dictates that messages sent

Comparing the Class

2008-10-15 Thread Ruotger Skupin
Hi, when comparing the class of two objects I usually do [obj1 isKindOfClass:[obj2 class]]. But if I say have the Class as an input value to a method: - (void) bla:(Class) inClass { if (/* inClass is an NSString */) { // do stuff } else if (/*

Re: Providing replicable views in IB

2008-10-15 Thread Matteo Manferdini
Thank you very much! I did not think about the crappy way becase it *is* an unnatural way of doing things. By the way, how do you know NSCollectionView does it that way? Where do you collect such detailed informations? I did not know the second one. Thank you. Cheers. On Tue, Oct 14, 2008 at 5:56

Re: iPhoto thumbnail view

2008-10-15 Thread douglas welton
Hi Dave, IKImageBrowserView is your friend. Check out the example code ImageBrowser. To constrain the view so that it only scrolls horizontally, use the -setContentResizingMask: method with the NSViewWidthSizable mask only. later, douglas On Oct 15, 2008, at 5:35 AM, David Murphy wrot

NSBezierPath problems, seems to be two bugs

2008-10-15 Thread Jochen Moeller
Hello List, in the sample code Movie_Overlay (here with Xcode 3.1.1) both subviews (AnimationView and ImageView) are filled with - whiteColor in -drawRect:. - (void)drawRect:(NSRect)rect { // original AnimationView.m [[NSColor

Re: how to complete c/s app

2008-10-15 Thread Jean-Daniel Dupas
Use Distributed Object, there is plenty of sample codes. Le 15 oct. 08 à 12:43, han a écrit : how to complete a c/s app.Is there a sample code? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator com

Re: Not so long filenames

2008-10-15 Thread Gerriet M. Denkmann
On 15 Oct 2008, at 03:32, Chris Suter wrote: On Wed, Oct 15, 2008 at 7:00 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: So again my question: why it is too long in this context and where is this documented? This looks like a bug in the kernel code. It looks like it checks the UTF8 st

Re: Not so long filenames

2008-10-15 Thread Gerriet M. Denkmann
On 14 Oct 2008, at 23:43, Sean McBride wrote: On 10/14/08 5:28 PM, Gerriet M. Denkmann said: But in the program below there seems to exist some other limit (at least on 10.4.11 Tiger). Where is this documented? Or what am I doing wong? #import int main (int argc, const char * argv[]) {

Re: how to complete c/s app

2008-10-15 Thread Graham Cox
On 15 Oct 2008, at 9:43 pm, han wrote: how to complete a c/s app.Is there a sample code? Who knows. Maybe you could start by explaining what a c/s app is? --G ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Re: Implementing a KVO/Bindings-Compliant Bridge-Pattern in Cocoa

2008-10-15 Thread Ken Thomases
On Oct 15, 2008, at 4:53 AM, Sebastian Morawietz wrote: A Bridge object acts as a drop in for a Person-Object, with an NSString* property called name and an Address* property address. Binding to the keyPath "name" or "address" of the Bridge works nicely. Trouble starts when binding some object t

Re: iPhoto thumbnail view

2008-10-15 Thread I. Savant
On Oct 15, 2008, at 5:35 AM, David Murphy wrote: I'm looking to build a view, similar to the upper sequential thumbnail view in iPhoto's Edit mode window. Before I go and build my own version, does anyone know if this is already available in an existing framework or library (from Apple or elsewh

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

2008-10-15 Thread Jonathan del Strother
On Wed, Oct 15, 2008 at 11:36 AM, Chris Suter <[EMAIL PROTECTED]> wrote: > 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: al

how to complete c/s app

2008-10-15 Thread han
how to complete a c/s app.Is there a sample code? ___ 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/Unsubscrib

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 returning >> something different but th

Re: executables for OSX 10.4 vs 10.5

2008-10-15 Thread Thomas Engelmeier
Am 15.10.2008 um 02:10 schrieb Michael Williamson: Or is there some way to build a single app that runs on both and if so are there any drawbacks to doing this? The only drawback is you get partially buggy, backward compatible behavior on Leopard when you link against the 10.4 SDK. ___

Implementing a KVO/Bindings-Compliant Bridge-Pattern in Cocoa

2008-10-15 Thread Sebastian Morawietz
Hi folks, I'm trying to implement a simple object bridge in cocoa where the bridge object acts as a kvo/bindings-compliant drop in for some arbitrary other NSObject-instance. Here is my problem (more details in the attached code): A Bridge object acts as a drop in for a Person-Object, with an NS

iPhoto thumbnail view

2008-10-15 Thread David Murphy
hi folks, I'm looking to build a view, similar to the upper sequential thumbnail view in iPhoto's Edit mode window. Before I go and build my own version, does anyone know if this is already available in an existing framework or library (from Apple or elsewhere)? cheers rgds Dave __

Re: NSTask not cleaning up it's threads

2008-10-15 Thread Ken Thomases
On Oct 15, 2008, at 3:25 AM, C. Tearpak wrote: Thanks for your insight, Ken. You're welcome. It's very possible that you are right, though I haven't tried your suggestions, especially since you are mentioning the "wait" parameter. Sorry, I didn't mean to be confusing. The - performSelec

Re: NSTask not cleaning up it's threads

2008-10-15 Thread C. Tearpak
Thanks for your insight, Ken. It's very possible that you are right, though I haven't tried your suggestions, especially since you are mentioning the "wait" parameter. I am normally a C# / .NET programmer by day, with other experience in Java, so the RunLoop and Timer are still somewhat for

-decodeBase64 method for NSString: problems

2008-10-15 Thread Vitaly Ovchinnikov
Hello list, I use base64 encoding to send license information to users. So, when he enters it to the application, I need to decode and analyze it. Since there is no standard solution for this in Cocoa, I found few implementations in the Internet and used one. This one: http://www.cocoadev.com/inde