Re: Setting Web Proxy programmatically

2008-03-19 Thread parag vibhute
Following is a part of preferences.plist: keyProxies/key dict keyAppleProxyConfigurationSelected/key integer1/integer keyExcludeSimpleHostnames/key integer0/integer keyFTPPassive/key

Re: How to add controller class to NIB file?

2008-03-19 Thread Conrad Taylor
Hi, I'm trying to perform steps 1 - 5 starting on page 45 - 46 of the following: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/ObjCTutorial.pdf However, when I perform Choose File Read Class File from within IB nothing happens and no error message is posted to the

Re: How to add controller class to NIB file?

2008-03-19 Thread Kyle Sluder
On Wed, Mar 19, 2008 at 2:42 AM, Conrad Taylor [EMAIL PROTECTED] wrote: Hi, I'm trying to perform steps 1 - 5 starting on page 45 - 46 of the following: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/ObjCTutorial.pdf However, when I perform Choose File Read Class

outlineview

2008-03-19 Thread norio ota
HI, Long time ago I posted the same problem, but I can't still fix this yet. So I need your help. Phenomenon: Outline view draws gray bezeled box as a background of each cell on Leopard. But the view doesn't draw the box on Tiger. My environment: Xcode 3.0 IB 3.0, but the nib file is

Re: How to add controller class to NIB file?

2008-03-19 Thread Conrad Taylor
Hi, thanks for the assistance. The tutorial isn't all that clear. For example, ...drag an object item It's six different controllers there. Well, thanks again and I'll continue my Cocoa journey. -Conrad On Wed, Mar 19, 2008 at 12:06 AM, Kyle Sluder [EMAIL PROTECTED] wrote: On Wed, Mar

Re: Carbon Menu in Cocoa app

2008-03-19 Thread Peter Maurer
I have tried the MenuRef _NSGetCarbonMenu(NSMenu* aMenu); but my menuRef always gets 0x0. Is this private API still available ? Did you remember to make the NSMenu actually create its underlying Carbon menu before trying to get it via _NSGetCarbonMenu()? You can do so by temporarily

Re: Adding spaces to an NSString

2008-03-19 Thread Gerriet M. Denkmann
On 19 Mar 2008, at 04:55, [EMAIL PROTECTED] wrote: Yes, I have, Are you thinking insertString:atIndex:? So at a basic level, can I get the string length, for loop through each character and after each use insertString to add a space? No. You may remember that if NSString talks of

Network communication with NSFileHandle NSSocketPort

2008-03-19 Thread Valentin Dan
Hi, I need to send and receive message over the network but I got stuck … I have the following code … unsigned short serverPort = 9000; NSString * serverAddress = @“192.1.2.1”; NSSocketPort * socketPort = [[NSSocketPort alloc] initRemoteWithTCPPort:serverPort

Re [Moderator] No iPhone SDK discussion here please

2008-03-19 Thread Andreas Gotfredsen
Hi Scott Big Questions here and I´m guesing I´m not the only one ... I´m using the iPhone SDK like 100.000 people do and what are the limitations ? In English I mean shorly I can talk about Cocoa in general when I have questions ? I have not talked about any iPhone API stuff but only Cocoa stuff

Re: Network communication with NSFileHandle NSSocketPort

2008-03-19 Thread Andrew Farmer
On 19 Mar 08, at 02:58, Valentin Dan wrote: unsigned short serverPort = 9000; NSString * serverAddress = @“192.1.2.1”; NSSocketPort * socketPort = [[NSSocketPort alloc] initRemoteWithTCPPort:serverPort host:serverAddress]; NSSocketPort is part of the Distributed Objects API - despite the

Correct use of NSViewController

2008-03-19 Thread Jonathan Dann
Hi guys, I've ended up with a bloated window controller in my document based app and want to refactor my code using done view controllers. My question is really about design. If I have a split view with which contains a split view (like mail) then should I have a controller for the

NSLocale: city name zip code vs. zip code city name

2008-03-19 Thread Ruotger Skupin
Hi, Is there a way to determine if a user (or an address depending on the country) prefers the zip code first or the city name first, e.g.: Apple 1 Infinite Loop Cupertino, CA 95014 vs Apple Computer GmbH Dornacher Straße 3 D 85622 Feldkirchen Germany Probably one might want to figure

Re: Network communication with NSFileHandle NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 5:58 AM, Valentin Dan wrote: I need to send and receive message over the network but I got stuck … Surprisingly, there is no general-purpose Cocoa wrapper for the CFNetwork foundation functions. There are several specific wrappers - such as NSURLConnection and

Downloading via FTP and loading images in a NSTableView

2008-03-19 Thread Valentin Dan
Hi, I'd like to know how can I get a file from a server that requires user password ? What classes should I look at ? Also, is it possible to load an image in a NSTableView cell ? And to sum up both questions, can an image be loaded from a server

Re: Downloading via FTP and loading images in a NSTableView

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 9:50 AM, Valentin Dan wrote: I'd like to know how can I get a file from a server that requires user password ? What classes should I look at ? I believe NSURLDownload can handle FTP URLs. You could also use the CFFTP functions from CFNetwork.

Re: Downloading via FTP and loading images in a NSTableView

2008-03-19 Thread Jean-Daniel Dupas
Le 19 mars 08 à 14:50, Valentin Dan a écrit : Hi, I'd like to know how can I get a file from a server that requires user password ? What classes should I look at ? Also, is it possible to load an image in a NSTableView cell ? And to sum up both questions, can

To get machine type (ppc, intel)

2008-03-19 Thread Nick Rogers
Hi, In my app I'm reading raw bytes from the file. So to get a integer's correct value, I'll need to swap bytes according to the machine (big or little-endian type), I guess. Is there a way so that I can know, if its a intel or ppc machine, that my app is running on? Thanks, Nick

Re: To get machine type (ppc, intel)

2008-03-19 Thread Sam McDonald
We had do this in our most recent app. Here is what we did: #if __BIG_ENDIAN__ #define ARGB_IMAGE_TYPE GL_UNSIGNED_INT_8_8_8_8_REV #else #define ARGB_IMAGE_TYPE GL_UNSIGNED_INT_8_8_8_8 #endif Sam McDonald Trimonix On Mar 19, 2008, at 9:14 AM, Nick Rogers wrote: Hi, In my app I'm reading raw

Kentucky Meetup

2008-03-19 Thread Sam McDonald
Hello list, I was wondering if anyone living in (or near) Louisville or Lexington Kentucky would be interested in meeting up and talking about cocoa. I wouldn't be able to get this going until may, but if anyone is interested send me an email (off the list) and we will see how many

Unable to access an instance properties and methods

2008-03-19 Thread Davide Benini
Hello folks. I receive an exception message and my application exits whenever I try to access properties or methods of an instance of DBNNote, a custo made class. Here is the code: DBNNote *firstNote= [[tune body] objectAtIndex:0]; NSLog(@%@, firstNote); NSLog(@%@, [firstNote

Re: Unable to access an instance properties and methods

2008-03-19 Thread Julien Jalon
I'd bet the firstNote object is not a DBNNote instance but an NSString instance. On Wed, Mar 19, 2008 at 5:33 PM, Davide Benini [EMAIL PROTECTED] wrote: Hello folks. I receive an exception message and my application exits whenever I try to access properties or methods of an instance of

Re: Unable to access an instance properties and methods

2008-03-19 Thread Davide Benini
You'd have won the bet. For some reason I had a placed a NSString instead of a DBNNote into the array; probably for debugging purposes... Thanks a million, I had zero chaces of tracing this bug by myself, for I thought the description was the appropriate one... I owe you a pint, Davide Il

Re: What is this invisible character?

2008-03-19 Thread stephen joseph butler
On Wed, Mar 19, 2008 at 12:04 PM, J. Todd Slack [EMAIL PROTECTED] wrote: I think that my problem when I write new files back out is that I don't write an ASCII Characters and I am using UTF versus Unicode. How do I write an ASCII 254 and ASCII 255 at the beginning of the NSString that I am

Re: Network communication with NSFileHandle NSSocketPort

2008-03-19 Thread Sherm Pendley
On Wed, Mar 19, 2008 at 9:44 AM, Jeff LaMarche [EMAIL PROTECTED] wrote: On Mar 19, 2008, at 5:58 AM, Valentin Dan wrote: I need to send and receive message over the network but I got stuck … Surprisingly, there is no general-purpose Cocoa wrapper for the CFNetwork foundation functions.

Re: To get machine type (ppc, intel)

2008-03-19 Thread Sherm Pendley
On Wed, Mar 19, 2008 at 10:14 AM, Nick Rogers [EMAIL PROTECTED] wrote: Hi, In my app I'm reading raw bytes from the file. So to get a integer's correct value, I'll need to swap bytes according to the machine (big or little-endian type), I guess. Is there a way so that I can know, if its a

Intercepting retain/release of object

2008-03-19 Thread Stuart Malin
I am having some trouble in an app with an object and its retain counts, so I added methods to intercept -retain and -release on my affected object so I could set breakpoints to observe the value. But doing so causes some really odd behavior, such as the object receiving extra retain

Re: Network communication with NSFileHandle NSSocketPort

2008-03-19 Thread Sherm Pendley
On Wed, Mar 19, 2008 at 1:38 PM, Jeff LaMarche [EMAIL PROTECTED] wrote: On Mar 19, 2008, at 1:26 PM, Sherm Pendley wrote: IMHO, a single socket() call, although admittedly a bit old school :-), is a little cleaner than reflecting a CF callback to an Objective-C method. Cleaner? You'll

Re: Intercepting retain/release of object

2008-03-19 Thread Jonathan del Strother
On Wed, Mar 19, 2008 at 5:54 PM, Stuart Malin [EMAIL PROTECTED] wrote: I am having some trouble in an app with an object and its retain counts, so I added methods to intercept -retain and -release on my affected object so I could set breakpoints to observe the value. But doing so causes

Re: Intercepting retain/release of object

2008-03-19 Thread Nick Zitzmann
On Mar 19, 2008, at 11:54 AM, Stuart Malin wrote: I am having some trouble in an app with an object and its retain counts, so I added methods to intercept -retain and -release on my affected object so I could set breakpoints to observe the value. But doing so causes some really odd

Re: Intercepting retain/release of object

2008-03-19 Thread Rob Napier
When you say really odd behavior can you confirm that you mean actually different from normal behavior versus not the behavior your were expecting? It does not surprise me that there may be a retain involved during the removal of an object from an array. I would expect it in order to manage KVO

Re: Network communication with NSFileHandle NSSocketPort

2008-03-19 Thread Chris Parker
On 19 Mar 2008, at 11:01 AM, Jeff LaMarche wrote: On Mar 19, 2008, at 1:57 PM, Sherm Pendley wrote: Hmmm... Actually, now that I'm looking a second time, it looks like you need to call both socket() to create the socket, then connect() to connect to a remote host as a client. Then you can

Re: Unable to access an instance properties and methods

2008-03-19 Thread Randall Meadows
On Mar 19, 2008, at 12:23 PM, Jens Alfke wrote: Here's some advice on how to debug stuff like this in the future... The exception message is a good clue: 2008-03-19 17:19:30.957 cocoabc[10832:10b] *** -[NSCFString accident]: unrecognized selector sent to instance 0x33b040 This shows that

Re: Intercepting retain/release of object

2008-03-19 Thread Stuart Malin
Thanks all! On Mar 19, 2008, at 8:04 AM, Jonathan del Strother wrote: -(id)retain needs to return itself, not void. On Mar 19, 2008, at 8:09 AM, Pierre Molinaro wrote: The retain method should return self object : So it should. Changing that fixed the problem. Hmmm... the compiler never

Re: [SOLVED] - Re: NSString may not respond.... -and What is this invisible character?

2008-03-19 Thread J. Todd Slack
Hi Randall, On Mar 19, 2008, at 12:37 PM, J. Todd Slack wrote: But one note, you mentioned stopping coding...if I did that, I would not have dug to solve the problem...Is there not something to be said for those that ³try and try again² until they get it right or maybe ³Practice makes

Using C++ classes from Objective C

2008-03-19 Thread Jeremy
Hi. I am just starting to learn Cocoa and would like to use standard C++ classes from my Objective C/C++ classes. Is there any known documentation on how to do this, or does anyone have any pointers? I tried creating a new object of my C++ class and calling a method on it in a .m file

Re: Using C++ classes from Objective C

2008-03-19 Thread John Stiles
Are you #including the header which declares MyClass? Jeremy wrote: Hi. I am just starting to learn Cocoa and would like to use standard C++ classes from my Objective C/C++ classes. Is there any known documentation on how to do this, or does anyone have any pointers? I tried creating a

Correct procedure for safely swapping a text storage?

2008-03-19 Thread Keith Blount
Hi, My program allows the user to switch between different text documents by choosing them from a source list; the documents are displayed on the right. Each document has its own text storage. I switch between text storages using [textStorage removeLayoutManager:textViewLayoutManager],

Re: Correct procedure for safely swapping a text storage?

2008-03-19 Thread Hamish Allan
On Wed, Mar 19, 2008 at 8:54 PM, Keith Blount [EMAIL PROTECTED] wrote: If anyone has any suggestions, solutions, or just reasons for why I might be encountering these problems, I would be very grateful. Sounds like a bug to me, but in the meantime, have you considered putting your NSTextViews

Where's the buffer overrun?

2008-03-19 Thread Nick Zitzmann
I'm probably missing something that's obvious but not so much to me right now... I have an NSArray category method that takes an NSArray of NSString objects, and returns a C array of C strings (char * const *). This is so I can build a C array for some functions that require a C array.

Re: Where's the buffer overrun?

2008-03-19 Thread Chris Suter
On 20/03/2008, at 10:38 AM, Nick Zitzmann wrote: char **returnArray = NSZoneMalloc([self zone], length); should be: char **returnArray = NSZoneMalloc([self zone], length * sizeof (char *)); - Chris ___ Cocoa-dev mailing list

Re: Where's the buffer overrun?

2008-03-19 Thread Andrew Farmer
On 19 Mar 08, at 16:50, Chris Suter wrote: On 20/03/2008, at 10:38 AM, Nick Zitzmann wrote: char **returnArray = NSZoneMalloc([self zone], length); should be: char **returnArray = NSZoneMalloc([self zone], length * sizeof (char *)); Actually, that's correct. Read up a bit -

Re: Where's the buffer overrun?

2008-03-19 Thread Hamish Allan
On Thu, Mar 20, 2008 at 12:00 AM, Andrew Farmer [EMAIL PROTECTED] wrote: What's bothering me a lot more is the use of an appendByte: method. Also bothering me is that a single-byte nul is only correct for certain encodings. Hamish ___ Cocoa-dev

Re: Where's the buffer overrun?

2008-03-19 Thread Chris Suter
On 20/03/2008, at 11:00 AM, Andrew Farmer wrote: On 19 Mar 08, at 16:50, Chris Suter wrote: On 20/03/2008, at 10:38 AM, Nick Zitzmann wrote: char **returnArray = NSZoneMalloc([self zone], length); should be: char **returnArray = NSZoneMalloc([self zone], length * sizeof (char

Synchronous Ruby calls from Safari?

2008-03-19 Thread David Springer
All, The attached html/Javascript and Ruby scripts run differently on a PC with IE than they do no a Mac with Safari. On IE, the alert panels pop up in sequence; as if the Ruby call is synchronous. On the Mac, the last alert pops up before the third alert, or simultaneously with it. I did some

Re: Where's the buffer overrun?

2008-03-19 Thread Hamish Allan
On Thu, Mar 20, 2008 at 12:18 AM, Chris Suter [EMAIL PROTECTED] wrote: I think it's because [NSMutableData dataWithBytesNoCopy:returnArray length:length] is releasing returnArray and allocating a new buffer for it. I, for one, am surprised that NSMutableData works this way, given that a)

__setjmp linking error in Leopard

2008-03-19 Thread Steve Cronin
Folks; I'm trying to build a test case for a DTS support incident regarding an issue I posted earlier concerning CoreData in Leopard. I have an existing app which compiles without inicident on both Tiger Leopard. To build the DTS test project, in Leopard I added the data model and

Re: Correct use of NSViewController

2008-03-19 Thread Jonathan Dann
Hi Cathy, Thanks for the comprehensive answer to my question, I wanted to make sure that I wasn't committing heresy by going down the 'tree of view controllers' road before jumping in and refactoring all my code. I was hoping to set it up so I could forget about most of the memory

[SOLVED] Re: Where's the buffer overrun?

2008-03-19 Thread Nick Zitzmann
On Mar 19, 2008, at 6:18 PM, Chris Suter wrote: I think it's because [NSMutableData dataWithBytesNoCopy:returnArray length:length] is releasing returnArray and allocating a new buffer for it. I'm guessing that's because it's NSMutableData. To fix it, use NSData instead. Ding ding ding!

Re: Where's the buffer overrun?

2008-03-19 Thread stephen joseph butler
On Wed, Mar 19, 2008 at 7:49 PM, Hamish Allan [EMAIL PROTECTED] wrote: On Thu, Mar 20, 2008 at 12:18 AM, Chris Suter [EMAIL PROTECTED] wrote: I think it's because [NSMutableData dataWithBytesNoCopy:returnArray length:length] is releasing returnArray and allocating a new buffer for

Re: Where's the buffer overrun?

2008-03-19 Thread Nick Zitzmann
On Mar 19, 2008, at 6:49 PM, Hamish Allan wrote: I, for one, am surprised that NSMutableData works this way, given that a) the method name specifically requests that no copy is made, and b) there's no particular reason for it to behave that way unless the data is resized. Thanks again

Trouble with CurrencyConverter tutorial

2008-03-19 Thread Bryan Hughes
I'm *this* close to getting things working, but I'm encountering the following error when I build. What file should I be investigating based upon this error? cd /Users/Withheld/xCode/Currency Converter /Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk

Re: Where's the buffer overrun?

2008-03-19 Thread Chris Suter
On 20/03/2008, at 12:31 PM, Nick Zitzmann wrote: On Mar 19, 2008, at 6:49 PM, Hamish Allan wrote: I, for one, am surprised that NSMutableData works this way, given that a) the method name specifically requests that no copy is made, and b) there's no particular reason for it to behave that

Re: dataCellForTableColumn method

2008-03-19 Thread Ben Lachman
Make sure the field editor isn't getting in the way. The field editors inserts itself into the first responder chain and grabs textual input during editing. http://developer.apple.com/documentation/Cocoa/Conceptual/ TextEditing/Tasks/FieldEditor.html HTH, -Ben -- Ben Lachman Acacia Tree

Re: Perform Selector After Delay Secondary Window

2008-03-19 Thread Matt Long
Man! That sure simplified things. Thanks for the tip. Works perfectly. I ended up using NSRunLoopCommonModes which is apparently Leopard only. But that's fine for my app. Thanks. -Matt On Mar 19, 2008, at 7:16 PM, Wim Lewis wrote: On Mar 19, 2008, at 6:00 PM, Matt Long wrote: [self

North Carolina Developers

2008-03-19 Thread Jamie Daniel
Any developers in North Carolina? Would like to arrange a cocoa dev group that meets. Thanks, Jamie ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: How to remove a fetched predicate from an ArrayController?

2008-03-19 Thread Dave Hersey
Set the filter predicate to nil to remove any predicates from the array controller. - d On Mar 20, 2008, at 12:36 AM, WiFiFun wrote: I have added filtering buttons (Like those at the top XCode's documentation window) to my bindings and core data learning application I have been working on. I

Seeking a proficient Cocoa developer for a short-term contract in Cambridge, MA

2008-03-19 Thread Doug Knowles
Hi, all, I am the principal Mac developer for a company preparing an unannounced port of a Windows application to OS X, and we need help to meet an aggressive schedule. We are seeking to build a Tiger-compatible application with some Leopard features (e.g., Quick Look, flow views) by wrapping a

Re: Where's the buffer overrun?

2008-03-19 Thread Michael Ash
On Thu, Mar 20, 2008 at 12:56 AM, Jens Alfke [EMAIL PROTECTED] wrote: It's never a good idea to make assumptions about where a Foundation object is putting its data; if you need to access the current bytes of an NSData, call -bytes on it. This was a little confusing to me until I thought