Re: what replaces ICARegisterEventNotificationPB

2008-11-21 Thread Scott Anguish
On 21-Nov-08, at 1:15 AM, Gerriet M. Denkmann wrote: On 21 Nov 2008, at 00:56, Scott Anguish <[EMAIL PROTECTED]> wrote: But almost daily I see some Apple engineer advising people to file bug reports, while they could as easily do it themselves - just by copy & past from Cocoa-Dev. And I

Problem using GCC 4.2

2008-11-21 Thread Påhl Melin
I tried to upgrade a small test project from gcc 4.0 to gcc 4.2 by changin the compiler version in the Project Info window but I get a strange compiler error: error: current namespace 'std' does not enclose strongly used namespace '__gnu_debug_def' ... in the file which is included from . If I c

Re: Problem using GCC 4.2

2008-11-21 Thread Roland King
google says this http://www.cocoabuilder.com/archive/message/xcode/2008/9/11/24570 Påhl Melin wrote: I tried to upgrade a small test project from gcc 4.0 to gcc 4.2 by changin the compiler version in the Project Info window but I get a strange compiler error: error: current namespace 'std' do

Re: Cocoa-dev Digest, Vol 5, Issue 1994

2008-11-21 Thread mark . rock
I'm away till 24th November and may not be near the internet. ___ 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 He

GetApplicationTextEncoding & "carbon free"

2008-11-21 Thread spsaxena
Hi all, I am working on making my application carbon free. I could not find any replacement for the API "GetApplicationTextEncoding" probably because this API has not been marked as deprecated yet. Because of this API I need to link with the carbon framework which I don't want. Can you please sugge

Re: Problem using GCC 4.2

2008-11-21 Thread Påhl Melin
Thanks, that solved the problem. I guess google is my friend... / Påhl 2008/11/21 Roland King <[EMAIL PROTECTED]>: > google says this > > http://www.cocoabuilder.com/archive/message/xcode/2008/9/11/24570 > > Påhl Melin wrote: > >> I tried to upgrade a small test project from gcc 4.0 to gcc 4.2 by

Re: GetApplicationTextEncoding & "carbon free"

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 10:42, spsaxena a écrit : Hi all, I am working on making my application carbon free. I could not find any replacement for the API "GetApplicationTextEncoding" probably because this API has not been marked as deprecated yet. Because of this API I need to link with the carbo

RE: Problem using GCC 4.2

2008-11-21 Thread Luca Ciciriello
I'd a similar problem. I've solved it removing all the pre-define preprocessor macro expecially __gnu_debug_def. Try this way. Luca. www.mitosrl.com> Date: Fri, 21 Nov 2008 10:23:56 +0100> From: [EMAIL PROTECTED]> To: cocoa-dev@lists.apple.com> Subject: Problem using GCC 4.2> > I tried to upg

Re: GetApplicationTextEncoding & "carbon free"

2008-11-21 Thread spsaxena
As per my understanding Carbon framework will be deprecated or completely removed in future versions of OSX. Well that's the only reason I wish to remove the carbon framework from my application now. On Fri, Nov 21, 2008 at 3:21 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]>wrote: > > Le 21 nov. 08 à

[Job] Cocoa developer at RealVNC

2008-11-21 Thread Mike Bellerby
Mac Software Engineer RealVNC, the inventor of VNC, has an opening for a Cocoa developer based in Cambridge (UK) to work on VNC-based technology for the Mac and iPhone. Skills Required •A minimum of 2 years experience of software development for Mac OS X using Cocoa and Objective-C •

Re: NSURLConnection: Change HTTP Basic Auth Credentials

2008-11-21 Thread Johannes Fahrenkrug
Hi again, after much wailing and gnashing of teeth, I think I've figured it out. The solution is adding a # to the end of the URL: http://blog.springenwerk.com/2008/11/i-am-currently-building-iphone.html I'm pretty sure this is a bug, though. - Johannes On Thu, Nov 20, 2008 at 3:38 PM, Johannes

Cocoa "canvas" view ?

2008-11-21 Thread Guillaume Laurent
Hi all, I'm currently looking for a Cocoa NSView-like object which would manage several (read lots of) objects of various shape and kind (lines, polygons, ellipses, sprites, text...) placed on a large view, dealing with redisplay, collision detection (so it can tell me which object a user

Problem archiving/unarchiving object graph containing NSMutableArray

2008-11-21 Thread Mikael Wämundson
Hi experienced developers! I'm trying to archive/unarchive an object graph using archivedDataWithRootObject: aRootObject. aRootObject has two instance variables of type NSMutableArray. Each mutable array contains customs objects of different types (subclasses of NSObject). For aRootObject a

Re: Problem archiving/unarchiving object graph containing NSMutableArray

2008-11-21 Thread Mike Abdullah
You're almost certainly going to need to post some code for us to figure it out. On 21 Nov 2008, at 13:12, Mikael Wämundson wrote: Hi experienced developers! I'm trying to archive/unarchive an object graph using archivedDataWithRootObject: aRootObject. aRootObject has two instance variable

Re: Autorelease Question

2008-11-21 Thread Jason Stephenson
Luke Hiesterman wrote: So thinking gets in the way of understanding and not thinking is the path to enlightenment? Yes, Grasshopper. You must stop thinking about the rules. You must stop thinking about the code. You must stop thinking about the computer. You must instead *become* the rules, b

BOOL value in Dictionary

2008-11-21 Thread Richard S. French
How does one get a boolean value from a dictionary object? My XML dictionary contains the value under the given key. Should this be retrieved as NSNumber or some other object? I am trying to set the state of a checkbox button based on the value as below: // return syntax coloring swi

Re: BOOL value in Dictionary

2008-11-21 Thread Ken Thomases
On Nov 21, 2008, at 7:48 AM, Richard S. French wrote: How does one get a boolean value from a dictionary object? My XML dictionary contains the value under the given key. Should this be retrieved as NSNumber or some other object? I am trying to set the state of a checkbox button based on the v

Re: BOOL value in Dictionary

2008-11-21 Thread Graham Cox
On 22 Nov 2008, at 12:48 am, Richard S. French wrote: How does one get a boolean value from a dictionary object? My XML dictionary contains the value under the given key. Should this be retrieved as NSNumber or some other object? Yes, that's right. I am trying to set the state of a checkbo

Re: Cocoa "canvas" view ?

2008-11-21 Thread Graham Cox
On 21 Nov 2008, at 11:36 pm, Guillaume Laurent wrote: Hi all, I'm currently looking for a Cocoa NSView-like object which would manage several (read lots of) objects of various shape and kind (lines, polygons, ellipses, sprites, text...) placed on a large view, dealing with redisplay, col

main thread communicating with background thread and vice-versa

2008-11-21 Thread John Love
From the main Thread, I call: [NSThread detachNewThreadSelector:@selector(bgThread:) toTarget:self withObject:nil]; - (void) bgThread:(NSConnection*)connection { NSAutoreleasePool *pool; pool = [[NSAutoreleasePool alloc] init]; [self doCalculation]; [self performSe

Re: Autorelease Question

2008-11-21 Thread Kyle Sluder
On Thu, Nov 20, 2008 at 11:53 PM, Luke Hiesterman <[EMAIL PROTECTED]> wrote: > So thinking gets in the way of understanding and not thinking is the path to > enlightenment? This is a bogus question. You're thinking incorrectly. There's a reason the memory management rules don't explicitly call f

Re: GetApplicationTextEncoding & "carbon free"

2008-11-21 Thread Kyle Sluder
On Fri, Nov 21, 2008 at 5:14 AM, spsaxena <[EMAIL PROTECTED]> wrote: > As per my understanding Carbon framework will be deprecated or completely > removed in future versions of OSX. Well that's the only reason I wish to > remove the carbon framework from my application now. Not all of Carbon is "d

Tabbing to Placeholders

2008-11-21 Thread Greg Deward
Good morning! This may be more of an XCode question, however the XCode list appears to be for people who are developing for or extending XCode. Sorry if this isn't a good place to post this. While going through Aaron's Cocoa book, I'm using the code assist feature of XCode a lot. Is it

Re: Cocoa "canvas" view ?

2008-11-21 Thread Guillaume Laurent
On Nov 21, 2008, at 15:17 , Graham Cox wrote: There is nothing in Apple's frameworks, but you could look at my DrawKit project: http://apptree.net/drawkitmain.htm Indeed I could :-). This is a very impressive work, thank you for it. Can you tell me more about its scalability ? What I'm

Re: main thread communicating with background thread and vice-versa

2008-11-21 Thread Joseph Kelly
How is your mainThreadParm declared? If it's a file global scope non- pointer value, it could be getting optimized away. Try declaring it static or volatile. Also, if threads are changing mainThreadParm independently in non- atomic ways, you will want to put locks around the critical sections.

Re: Tabbing to Placeholders

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 15:50, Greg Deward a écrit : Good morning! This may be more of an XCode question, however the XCode list appears to be for people who are developing for or extending XCode. Sorry if this isn't a good place to post this. isn't the list name "xcode-users" ? And extending X

Re: Tabbing to Placeholders

2008-11-21 Thread Greg Deward
On Nov 21, 2008, at 10:00 AM, Jean-Daniel Dupas wrote: isn't the list name "xcode-users" ? You are absolutely correct. When I read the description of the list, I saw "components of the Xcode Tools development system" and misinterpreted the rest. Sorry to bother you. __

Re: Tabbing to Placeholders

2008-11-21 Thread DKJ
On 21-Nov-08, at 6:50 , Greg Deward wrote: Is it possible to tab or jump to the next placeholder in the selector? Control-/ does it on my keyboard. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: Tabbing to Placeholders

2008-11-21 Thread Joseph Crawford
Yes you would just have to change your keybindings in preferences On Nov 21, 2008, at 10:12 AM, DKJ wrote: On 21-Nov-08, at 6:50 , Greg Deward wrote: Is it possible to tab or jump to the next placeholder in the selector? Control-/ does it on my keyboard.

Re: Cocoa "canvas" view ?

2008-11-21 Thread Graham Cox
On 22 Nov 2008, at 1:50 am, Guillaume Laurent wrote: On Nov 21, 2008, at 15:17 , Graham Cox wrote: There is nothing in Apple's frameworks, but you could look at my DrawKit project: http://apptree.net/drawkitmain.htm Indeed I could :-). This is a very impressive work, thank you for i

Re: GetApplicationTextEncoding & "carbon free"

2008-11-21 Thread Michael Ash
On Fri, Nov 21, 2008 at 4:42 AM, spsaxena <[EMAIL PROTECTED]> wrote: > Hi all, > I am working on making my application carbon free. I could not find any > replacement for the API "GetApplicationTextEncoding" probably because this > API has not been marked as deprecated yet. Because of this API I ne

Re: Autorelease Question

2008-11-21 Thread Adam Leonard
Ok, so my point with all this is that the documentation should not say that all class factory methods always return autoreleased objects because that is an implementation detail that (a) is not required by the memory management rules, (b) is something that the programmer should not care abo

Re: Autorelease Question

2008-11-21 Thread Filip van der Meeren
Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 21 Nov 2008, at 16:21, Adam Leonard wrote: Ok, so my point with all this is that the documentation should not say that all class factory methods always return autoreleased objects because that is an implementation det

WebServices / SOAP / REST

2008-11-21 Thread Greg Deward
Good morning! Does anyone have any good tutorials on building nTier applicaitons using REST and Cocoa? I'm coming from .NET/C# and Visual Studio takes care of all of the WebServices magic using SOAP. Everything there is just a simple method call. The book I am using now is teaching basic

Re: BOOL value in Dictionary

2008-11-21 Thread Heinrich Giesen
Hi, besides what Ken Thomases and Graham Cox already said, I have a remark concerning programming style: if ( colorSwitch == YES) { [colorBox setState:NSOnState]; } else { [colorBox setState:NSOffState]; } It is

NSIndexSet

2008-11-21 Thread David Blanton
How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two,four); NSRange u2 = NSUnionRange(u1,five);

Re: Autorelease Question

2008-11-21 Thread mmalcolm crawford
On Nov 21, 2008, at 7:33 AM, Filip van der Meeren wrote: Ok, so my point with all this is that the documentation should not say that all class factory methods always return autoreleased objects because that is an implementation detail that (a) is not required by the memory management rules

Re: Autorelease Question

2008-11-21 Thread Adam Leonard
Ok, yeah, it could call autorelease, but that would amount to a noop. My problem with this documentation is that if I created a class that had a method just like the one you mentioned: + (Foo*)foo { static Foo *result = nil; if(!result) { // Go freaky...

Apple-like chat bubbles

2008-11-21 Thread bin chen
Hi all, Recently I'm trying to make a apple-like chat bubble on Iphone. After some search, I got some hints. I displayed the message in a uitableviewcell and a background bubble image using stretchableImageWithLeftCapWidth: leftCapWidth method. It works well but i don't understand well the 2 parame

MVC in Cocoa?

2008-11-21 Thread Michael Hines
Hey guys, This is my first message to the mailing list, so please let me know if I violate any form of etiquette. I apologize ahead of time. This is also my first Obj-C and Cocoa application. My application is basically a client for a text-protocol TCP server. If you are familiar with freechess

Re: Cocoa "canvas" view ?

2008-11-21 Thread Paul Tomlin
On 21 Nov 2008, at 2:36 PM, Guillaume Laurent wrote: I'm currently looking for a Cocoa NSView-like object which would manage several (read lots of) objects of various shape and kind (lines, polygons, ellipses, sprites, text...) placed on a large view, dealing with redisplay, collision detec

in NSTextView :Attributes of pasted Text different from original Text

2008-11-21 Thread rajesh
Hi, I am working on parsing a piece of text, based on Attributes , when I copy a piece of text and paste it , the pasted text seems to lose certain attributes , ( especially and only the Color attributes ) here is the piece of code and lines from log [[[txtView attributedString] attributesAt

NSTextView :Attributes of pasted text different from original Text

2008-11-21 Thread rajesh
Hi, I am working on parsing a piece of text, based on Attributes , when I copy a piece of text and paste it , the pasted text seems to lose certain attributes , ( especially and only the Color attributes ) here is the piece of code and lines from log [[[txtView attributedString] attributesAt

Re: BOOL value in Dictionary

2008-11-21 Thread Michael Ash
On Fri, Nov 21, 2008 at 9:13 AM, Ken Thomases <[EMAIL PROTECTED]> wrote: > Next, even if you did want to construct an NSNumber from it, it's not a > BOOL. So +numberWithBOOL: wouldn't be appropriate. Any non-nil object > pointer would result in a true-valued NSNumber, even if [temp > objectForKey

Re: NSIndexSet

2008-11-21 Thread Nick Zitzmann
First of all, when you want to create a new topic, please do not ever reply to an existing message. This breaks threading, since this thread now has two topics instead of one. Thanks. On Nov 21, 2008, at 8:44 AM, David Blanton wrote: How would one construct an NSIndexSet containing the indi

Re: NSIndexSet

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 16:44, David Blanton a écrit : How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two,four

Re: BOOL value in Dictionary

2008-11-21 Thread David Blanton
Why is : if ( boolVar == YES) or if ( boolVar == NO) bad form? David Blanton David Blanton ___ 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 coc

Re: NSIndexSet

2008-11-21 Thread Michael Ash
On Fri, Nov 21, 2008 at 10:44 AM, David Blanton <[EMAIL PROTECTED]> wrote: > > How would one construct an NSIndexSet containing the indices 2,4,5 ? > > I did: > >NSRange two = NSMakeRange(2, 1); >NSRange four = NSMakeRange(4, 1); >NSRange five = NSMakeRange(5, 1); >N

Re: Autorelease Question

2008-11-21 Thread Filip van der Meeren
Sorry to be this crude, but the documentation isn't created for beginners. If I would have documentation for beginners, then I would never take look at it! There are excellent books for beginners from Wrox and O'reilly... Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter

Re: NSIndexSet

2008-11-21 Thread Greg Titus
On Nov 21, 2008, at 7:44 AM, David Blanton wrote: How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two,four)

Re: NSIndexSet

2008-11-21 Thread Randall Meadows
On Nov 21, 2008, at 8:44 AM, David Blanton wrote: How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two,four)

Re: WebServices / SOAP / REST

2008-11-21 Thread Nick Zitzmann
On Nov 21, 2008, at 8:34 AM, Greg Deward wrote: Does anyone have any good tutorials on building nTier applicaitons using REST and Cocoa? I'm coming from .NET/C# and Visual Studio takes care of all of the WebServices magic using SOAP. This might be a good place to start:

Re: Cocoa "canvas" view ?

2008-11-21 Thread Guillaume Laurent
On Nov 21, 2008, at 14:15 , Paul Tomlin wrote: On 21 Nov 2008, at 2:36 PM, Guillaume Laurent wrote: I'm currently looking for a Cocoa NSView-like object which would manage several (read lots of) objects of various shape and kind (lines, polygons, ellipses, sprites, text...) placed on a lar

Re: NSTextView :Attributes of pasted text different from original Text

2008-11-21 Thread rajesh
Sorry for spam, I canceled the previous request but it appeared back in the list. Though question is still open :) On Nov 21, 2008, at 4:34 PM, rajesh wrote: Hi, I am working on parsing a piece of text, based on Attributes , when I copy a piece of text and paste it , the pasted text seems

Re: Autorelease Question

2008-11-21 Thread mmalcolm crawford
On Nov 21, 2008, at 7:56 AM, Filip van der Meeren wrote: I quote: "For objects that never get released, this method should return UINT_MAX". So where do you see your bug ? The bug is in the description, and the expectations it gives rise to. There should be no need for any of this discussi

Re: Autorelease Question

2008-11-21 Thread Devon Ferns
The docs say autoreleased as he already said which may not always be true. Devon Filip van der Meeren wrote: I quote: "For objects that never get released, this method should return UINT_MAX". So where do you see your bug ? Filip van der Meeren http://www.sourceforge.net/projects/xlinterp

Re: Autorelease Question

2008-11-21 Thread Filip van der Meeren
I agree, but what would you have the documentation say ? Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 21 Nov 2008, at 17:08, mmalcolm crawford wrote: On Nov 21, 2008, at 7:56 AM, Filip van der Meeren wrote: I quote: "For objects that never get released, this meth

Re: Autorelease Question

2008-11-21 Thread Filip van der Meeren
Ok, lets say that [NSString string] creates a new object each and every time a framework/Application needs an empty string (like about a billion times). Then the RAM would be stuffed with empty string objects that are useless for everyone. Now they have created a fix for this, one size fits a

Re: Autorelease Question

2008-11-21 Thread Filip van der Meeren
But the docs also say "Another purpose for a class factory method is to ensure that a certain class (NSWorkspace, for example) vends a singleton instance". Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 21 Nov 2008, at 17:12, Devon Ferns wrote: The docs say autore

Re: BOOL value in Dictionary

2008-11-21 Thread Nick Zitzmann
On Nov 21, 2008, at 8:54 AM, David Blanton wrote: Why is : if ( boolVar == YES) or if ( boolVar == NO) bad form? It's not bad form per se, but the former is unnecessarily redundant & the "== YES" can be eliminated, and the latter can be shortened using a !. Nick Zitzmann

Re: Autorelease Question

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 16:56, Filip van der Meeren a écrit : Ok, lets say that [NSString string] creates a new object each and every time a framework/Application needs an empty string (like about a billion times). Then the RAM would be stuffed with empty string objects that are useless for everyo

Re: BOOL value in Dictionary

2008-11-21 Thread Ed Wynne
On Nov 21, 2008, at 10:54 AM, David Blanton wrote: Why is : if ( boolVar == YES) or if ( boolVar == NO) bad form? if (boolVar == YES) is bad form, but if (boolVar == NO) and if (boolVar != NO) is not. In C the concept of false has one and only one value, 0, which is #defined to be NO

Re: Cocoa "canvas" view ?

2008-11-21 Thread Kyle Sluder
On Fri, Nov 21, 2008 at 9:50 AM, Guillaume Laurent <[EMAIL PROTECTED]> wrote: > Indeed I could :-). This is a very impressive work, thank you for it. Can > you tell me more about its scalability ? What I'm planning to write is a > music classical notation editor, so I'll typically need to handle a

Re: Autorelease Question

2008-11-21 Thread Filip van der Meeren
Ok, you got me there... But in my own defense it could still be to make sure that people are still able te retain the object without creating an overflow... ;-) Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 21 Nov 2008, at 17:19, Jean-Daniel Dupas wrote: Le 21 n

Re: BOOL value in Dictionary

2008-11-21 Thread Ken Thomases
On Nov 21, 2008, at 9:54 AM, David Blanton wrote: Why is : if ( boolVar == YES) or if ( boolVar == NO) bad form? Let me ask you this: why wouldn't you use: if ( (boolVar == YES) == YES ) or if ( ( (boolVar == YES) == YES ) == YES ) ? boolVar is already a boolean expres

Re: MVC in Cocoa?

2008-11-21 Thread Sherm Pendley
On Nov 20, 2008, at 7:13 PM, Michael Hines wrote: Any pointers anyone has, or if there are white-papers out there about something like this would be fantastic. Have you read the MVC introduction from Apple?

Re: WebServices / SOAP / REST

2008-11-21 Thread Kyle Sluder
On Fri, Nov 21, 2008 at 10:34 AM, Greg Deward <[EMAIL PROTECTED]> wrote: > Does anyone have any good tutorials on building nTier applicaitons using > REST and Cocoa? I'm coming from .NET/C# and Visual Studio takes care of all > of the WebServices magic using SOAP. Everything there is just a simpl

Re: BOOL value in Dictionary

2008-11-21 Thread Gary L. Wade
Another interesting thing I've seen with some compilers is when a bit flag is defined with a signed type: short someflag : 1; a value of it being set may be -1 rather than 1, so the only way to compare it according to how you want it to work is by comparing it against 0 in some way: if (

Re: Autorelease Question

2008-11-21 Thread mmalcolm crawford
On Nov 21, 2008, at 7:59 AM, Filip van der Meeren wrote: Sorry to be this crude, but the documentation isn't created for beginners. Sorry to be blunt, but some of it is. And Cocoa Fundamentals in particular is intended for newcomers to the platform and comparative newcomers to programmi

Re: Autorelease Question

2008-11-21 Thread Sherm Pendley
On Nov 20, 2008, at 11:53 PM, Luke Hiesterman wrote: So thinking gets in the way of understanding and not thinking is the path to enlightenment? Not thinking about *irrelevancies* is the path to enlightenment. It allows you to focus on the things you actually *do* need to understand. sher

Re: Autorelease Question

2008-11-21 Thread Sherm Pendley
On Nov 21, 2008, at 10:33 AM, Filip van der Meeren wrote: On 21 Nov 2008, at 16:21, Adam Leonard wrote: Ok, so my point with all this is that the documentation should not say that all class factory methods always return autoreleased objects because that is an implementation detail that (a)

Re: NSIndexSet

2008-11-21 Thread David Blanton
The easiest way is to make a mutable index set: NSMutableIndexSet *indices = [NSMutableIndexSet indexSet]; [indices addIndex:2]; [indices addIndex:4]; [indices addIndex:5]; Looks like the way ... thanks all! David Blanton ___ Cocoa-dev mailing l

Programmatic control of NSTableView selection?

2008-11-21 Thread Brent Burton
(Moderator, I never heard why the first attempt didn't get to the list. Too verbose?) All, I have a question about programmatically controlling the currently selected object displayed in a table view. In short, the table displays lines of text to be spoken by the speech synthesizer. As each line

Re: Difference between "Target" and "Executable" ?

2008-11-21 Thread Stuart Malin
On Nov 20, 2008, at 5:06 PM, [EMAIL PROTECTED] wrote: Also, what exactly is the difference between "Targets" and "executables" ?? Seems like I am always editing/configuring the Target but never the executable...? What is the purpose of the executable anyway? I know there were several meaningf

NSCollectionView woes

2008-11-21 Thread Cem
I'm slowly working my way through Aaron Hillegass' Cocoa Programming for Mac OS X and just completed the CarLot program (Chapter 11 in the 3rd edition). I decided to challenge myself and try to change the interface to use NSCollectionView instead of the interface in the book. In order to

Re: NSCollectionView woes

2008-11-21 Thread Volker in Lists
Hi Cem, the CollectionView needs only to be pointed to the cars ArrayController and uses a rather obfuscated way of binding each of its subviews fields to the appropriate car entries. you will have to bind your prototype view controls to CollectionView.representedObjects."key". The Collec

Re: BOOL value in Dictionary

2008-11-21 Thread Clark Cox
On Fri, Nov 21, 2008 at 7:54 AM, David Blanton <[EMAIL PROTECTED]> wrote: > Why is : > > if ( boolVar == YES) or if ( boolVar == NO) > > bad form? (boolVar == NO) is fine. (boolVar == YES) is bad form (and could lead to incorrect results) In C, any non-zero value evaluates to true in a boolean c

Re: release and reference counting query

2008-11-21 Thread Marc Stibane
Am 19.11.2008 um 10:05 schrieb mmalcolm crawford: On Nov 18, 2008, at 10:33 AM, Marc Stibane wrote: Lets forget for a moment that the dealloc never get's called at all on the iPhone This is simply untrue. Nope. Try to set a breakpoint inside the dealloc in the same file as applicationDidF

Re: release and reference counting query

2008-11-21 Thread mmalcolm crawford
On Nov 21, 2008, at 11:15 AM, Marc Stibane wrote: Am 19.11.2008 um 10:05 schrieb mmalcolm crawford: On Nov 18, 2008, at 10:33 AM, Marc Stibane wrote: Lets forget for a moment that the dealloc never get's called at all on the iPhone This is simply untrue. Nope. Try to set a breakpoint insi

Re: GetApplicationTextEncoding & "carbon free"

2008-11-21 Thread Aki Inoue
Hi, Mike's comment is right on. The sole purpose of GetApplicationTextEncoding() is to provide functional compatibility with OS 9-era localization resources such as STR#. There really shouldn't be any need to make your app rely on the single script approach even for a modern CFString-based

Re: Blue default button style hangs. (THREADED DRAWS!)

2008-11-21 Thread Russ
I've been investigating further on my problem where the app hangs if I configure any button to be a blue default button. I had a breakpoint set in some of my stuff and noticed the nasty cause --- The blue default button is being drawn from a separate thread, under the auspices of NSUIHeartbeat

CGPoint and CGRect

2008-11-21 Thread DKJ
I want to determine whether a line between two CGPoints in a view intersects with a given CGRect. There's nothing in the CGGeometry reference that does this specifically, and I don't yet see how to use the functions that are there to figure this out. Before I dust off my Euclid (a rare firs

Re: CGPoint and CGRect

2008-11-21 Thread Greg Titus
On Nov 21, 2008, at 3:19 PM, DKJ wrote: I want to determine whether a line between two CGPoints in a view intersects with a given CGRect. There's nothing in the CGGeometry reference that does this specifically, and I don't yet see how to use the functions that are there to figure this out.

Objective-C variadic methods vs. NSArray et al.

2008-11-21 Thread Scott Thompson
Technical QA 1405 concerns the creation of Objective-C methods that take variable number of arguments... so called variadic methods. Happily the mechanisms just use the standard C mechanisms (va_start and friends). That being the case, why is it that methods like arrayWithObjects: requir

Re: Objective-C variadic methods vs. NSArray et al.

2008-11-21 Thread Bill Bumgarner
On Nov 21, 2008, at 5:40 PM, Scott Thompson wrote: Technical QA 1405 concerns the creation of Objective-C methods that take variable number of arguments... so called variadic methods. Happily the mechanisms just use the standard C mechanisms (va_start and friends). That being the case, wh

Re: Objective-C variadic methods vs. NSArray et al.

2008-11-21 Thread Clark Cox
On Fri, Nov 21, 2008 at 3:40 PM, Scott Thompson <[EMAIL PROTECTED]> wrote: > Technical QA 1405 concerns the creation of Objective-C methods that take > variable number of arguments... so called variadic methods. Happily the > mechanisms just use the standard C mechanisms (va_start and friends). >

Re: Objective-C variadic methods vs. NSArray et al.

2008-11-21 Thread Scott Thompson
On Nov 21, 2008, at 5:52 PM, Clark Cox wrote: On Fri, Nov 21, 2008 at 3:40 PM, Scott Thompson <[EMAIL PROTECTED]> wrote: Technical QA 1405 concerns the creation of Objective-C methods that take variable number of arguments... so called variadic methods. Happily the mechanisms just use the

Re: Objective-C variadic methods vs. NSArray et al.

2008-11-21 Thread Bill Bumgarner
On Nov 21, 2008, at 3:52 PM, Clark Cox wrote: two ways to do this: 1) Have the information encoded in the first parameter (like a printf format string) 2) Have some sentinel value marking the end of the list (like the nil passed to arrayWithObjects:) 3) Have a second parameter that provides th

Interface Builder simulator

2008-11-21 Thread Boyd Collier
When I run Interface Simulator with one of my nibs, it is displayed in a semi-transparent form, though all the parts can be seen and work as expected. This (i.e. the transparency) is not the case for other nibs in the same project. But when I run the project that these nibs are a part of,

Re: Interface Builder simulator

2008-11-21 Thread Kyle Sluder
On Fri, Nov 21, 2008 at 7:22 PM, Boyd Collier <[EMAIL PROTECTED]> wrote: > When I run Interface Simulator with one of my nibs, it is displayed in a > semi-transparent form, though all the parts can be seen and work as > expected. This (i.e. the transparency) is not the case for other nibs in > the

Re: Objective-C variadic methods vs. NSArray et al.

2008-11-21 Thread Clark Cox
On Fri, Nov 21, 2008 at 4:02 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > On Nov 21, 2008, at 3:52 PM, Clark Cox wrote: >> >> two ways to do this: >> >> 1) Have the information encoded in the first parameter (like a printf >> format string) >> 2) Have some sentinel value marking the end of the l

Re: Blue default button style hangs. (THREADED DRAWS!)

2008-11-21 Thread Corbin Dunn
Can you provide your sample of the hang? .corbin Le Nov 21, 2008 à 2:36 PM, Russ a écrit : I've been investigating further on my problem where the app hangs if I configure any button to be a blue default button. I had a breakpoint set in some of my stuff and noticed the nasty cause ---

Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-21 Thread mmalcolm crawford
Context: UIViewController provides a method, didReceiveMemoryWarning, which is invoked on view controllers when the amount of memory available to the application is severely constrained. The goal of the method is to allow view controllers to dispose of resources that are currently not ne

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-21 Thread Ricky Sharp
On Nov 21, 2008, at 6:53 PM, mmalcolm crawford wrote: This leaves us for now with two solutions: (a) Greg's (override setView:) which is more future-proof but is in many respects academically unsatisfying. - (void)setView:(UIView *)aView; { if (!aView) { // set outlets to nil, e

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-21 Thread mmalcolm crawford
On Nov 21, 2008, at 5:21 PM, Ricky Sharp wrote: But, that's only if dealloc releases objects directly and doesn't use accessors or use the workaround shown below. Yes, although following "best practice" is assumed... :-) I'm now really curious as to why UIViewController uses an accessor

Re: GetApplicationTextEncoding & "carbon free"

2008-11-21 Thread Deborah Goldsmith
And if you really, really need to access legacy Mac OS 9 text files, the correct encoding to use is CFStringGetSystemEncoding(), which is in CoreFoundation. GetApplicationTextEncoding(): legacy encoding (if any) corresponding to the language *the app is running in*. As Aki says, it's for

simple question about variable retain/release (NSDate)

2008-11-21 Thread Bob Sabiston
Hi, I have a newbie question about retain/release stuff when using NSDate. I am confused a little about what is necessary in this case. I've got a local variable sTime (NSDate *). I use it to measure the time and then compare it to the current time, so that I can space out an animation

Re: simple question about variable retain/release (NSDate)

2008-11-21 Thread Andrew Farmer
On 21 Nov 08, at 18:17, Bob Sabiston wrote: Hi, I have a newbie question about retain/release stuff when using NSDate. I am confused a little about what is necessary in this case. I've got a local variable sTime (NSDate *). I use it to measure the time and then compare it to the current

Re: CGPoint and CGRect

2008-11-21 Thread Michael Ash
On Fri, Nov 21, 2008 at 6:33 PM, Greg Titus <[EMAIL PROTECTED]> wrote: > > On Nov 21, 2008, at 3:19 PM, DKJ wrote: > >> I want to determine whether a line between two CGPoints in a view >> intersects with a given CGRect. There's nothing in the CGGeometry reference >> that does this specifically, an

More instability in Distributed Objects used between multithreaded processes?

2008-11-21 Thread Dave Cox
nection setRootObject: broker]; // publish name NSMachBootstrapServer* namesrv = [NSMachBootstrapServer sharedInstance]; if ([namesrv registerPort: port name: @BROKER_NAME] == NO) { log("broker: error: port not registered\n"); } // detach new threads to run runloops for the c

  1   2   >