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 > R

How to debug this Tiger release error?

2008-03-19 Thread Steve Cronin
Folks; On Tiger, I have an app that has a popup button which allows a user to make a selection from a supporting array. Once a new selection is made a collection of images are redraw in a view. Has been working reasonably well... Now sometimes, not consistently, when the selection is made t

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 form

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,

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 addin

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 "charact

Re: How to debug this Tiger release error?

2008-03-19 Thread Ken Thomases
On Mar 19, 2008, at 2:13 AM, Steve Cronin wrote: Folks; On Tiger, I have an app that has a popup button which allows a user to make a selection from a supporting array. Once a new selection is made a collection of images are redraw in a view. Has been working reasonably well... Now sometim

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 host:serverA

Re: Adding spaces to an NSString

2008-03-19 Thread Ken Ferry
This is probably not sufficient. The string @"é" can be represented by two characters, an 'e' and a combining accent. It is unlikely to be correct to insert a space between them. This is unrelated to lower level issues, like some unicode code points taking more than one 16 bit unichar to represe

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 large

NSLocale: " " vs. " "

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 out

Re: Correct use of NSViewController

2008-03-19 Thread Cathy Shive
Hi, My strategy is similar to yours, but it doesn't have to result in spaghetti code. I have a view controller class that contains a list of sub-viewcontrollers. What I end up with is a structure that does in fact resemble the actual view hierarchy. The tricky part is breaking down your

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 NSURLDo

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 dire

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 a

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 Sean McBride
On 3/19/08 7:44 PM, Nick Rogers said: >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. Take a look in NSByteOrder.h, it has all you need. -- __

Re: To get machine type (ppc, intel)

2008-03-19 Thread Sam McDonald
We had do this in our most recent app. There definitely could be better ways, were were pretty new to cocoa. 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

Re: To get machine type (ppc, intel)

2008-03-19 Thread Laurent Cerveau
Gestalt API should help you or sysctl family. Note that I am not sure about Rosetta handling in both APIs laurent Sent from my roadPhone On Mar 19, 2008, at 3:14 PM, 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

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 peopl

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 accid

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 gi

Re: What is this invisible character?

2008-03-19 Thread J. Todd Slack
Hi All, I am still working on this after a night of sleep. The original Author used Applescript and it has been a while since I have worked with AS. I think that he is calling this when he writes out the file. set the target_file to the target_file as text set the open_target_file to ope

NSString may not respond....

2008-03-19 Thread J. Todd Slack
Hi All, Continuing my quest to get back into Cocoa/Objective-C, I am getting the following error stating that NSString may not respond to certain calls. Here is a screenshot: http://jasonslack.biz/pic3.png Can anyone explain what I am doing wrong because as far as I can see this should be valid

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

Re: NSString may not respond....

2008-03-19 Thread Nick Zitzmann
On Mar 19, 2008, at 11:10 AM, J. Todd Slack wrote: Can anyone explain what I am doing wrong because as far as I can see this should be valid? What SDK are you using? -cStringUsingEncoding: wasn't present until the 10.4 SDK. Nick Zitzmann ___

Re: NSString may not respond....

2008-03-19 Thread David Duncan
On Mar 19, 2008, at 10:10 AM, J. Todd Slack wrote: Continuing my quest to get back into Cocoa/Objective-C, I am getting the following error stating that NSString may not respond to certain calls. Here is a screenshot: http://jasonslack.biz/pic3.png Can anyone explain what I am doing wrong

Re: NSString may not respond....

2008-03-19 Thread J. Todd Slack
Hi Nick, I am using 10.4U. -Jason On 3/19/08 10:16 AM, "Nick Zitzmann" <[EMAIL PROTECTED]> wrote: > > On Mar 19, 2008, at 11:10 AM, J. Todd Slack wrote: > >> Can anyone explain what I am doing wrong because as far as I can see >> this >> should be valid? > > What SDK are you using? -cString

Re: NSString may not respond....

2008-03-19 Thread J. Todd Slack
Hi Ah, Thanks Nick and Dave, for some reason the project was targeting 10.3.9 and 10.4 U. -Jason On 3/19/08 10:20 AM, "David Duncan" <[EMAIL PROTECTED]> wrote: > On Mar 19, 2008, at 10:10 AM, J. Todd Slack wrote: > >> Continuing my quest to get back into Cocoa/Objective-C, I am getting >> th

Re: NSString may not respond....

2008-03-19 Thread stephen joseph butler
On Wed, Mar 19, 2008 at 12:10 PM, J. Todd Slack < [EMAIL PROTECTED]> wrote: > Hi All, > > Continuing my quest to get back into Cocoa/Objective-C, I am getting the > following error stating that NSString may not respond to certain calls. > > Here is a screenshot: > > http://jasonslack.biz/pic3.png

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 functi

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
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 get no argument from me on that. It took me a lot of playing around to wrap

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

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 events

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. > > Cleane

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
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 use NSFileHandle to do the reading and writing.

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 cause

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 behavio

Re: Intercepting retain/release of object

2008-03-19 Thread Pierre Molinaro
The retain method should return self object : - (id) retain { unsigned int count = [self retainCount] + 1; NSLog(@"RETAIN: retain count after retain is: %i", count); return [super retain] ; } After calling [super release], the current object may not exist any more; try:

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 K

Re: Unable to access an instance properties and methods

2008-03-19 Thread Jens Alfke
On 19 Mar '08, at 10:00 AM, Davide Benini wrote: 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... He

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: What is this invisible character?

2008-03-19 Thread Jens Alfke
On 19 Mar '08, at 10:04 AM, J. Todd Slack wrote: How do I write an ASCII 254 and ASCII 255 at the beginning of the NSString that I am putting in the file I want to be read back in at a later date? ' Those wouldn't go into the NSString; they're the byte-order-mark that prefixes the UTF-16

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 th

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

2008-03-19 Thread J. Todd Slack
Hi Stephen and all, >> Can anyone explain what I am doing wrong because as far as I can see this should be valid? > There are many serious problems with that code. Ignoring the warning, I see: > 1) That is not the proper way to find the user's documents folder.

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 w

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

2008-03-19 Thread Randall Meadows
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 perfect”? I int

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 >

dataCellForTableColumn method

2008-03-19 Thread Hans Hansen
Anyone know how best to use multiple NSTextCell subclasses, in a table/ outline column? When I use the dataCell... methods in NSTableColumn, NSTableView, or NSOutlineView, it works great until I try to edit the cell, at which point the cells never receive the edit/select actions. I've tried

disabling NSButton?

2008-03-19 Thread Kevin Dixon
Hi, I have two buttons, of the Round Textured Button variety. When I try to disable them, I do [uiButton setEnabled:NO]; [uiButton setNeedsDisplay:YES]; However, the button appears normal (eg enabled) but doesn't click. What am I doing wrong here? -Kevin __

Menu Item is not disabling

2008-03-19 Thread Mr. Gecko
Hello I am trying to disable a Menu Item and it is not disabling for some reason here is the code that i am using. [eject setEnabled:NO]; I have tried to clean and than build to be sure that it was not a build issue and still can't figure it out. This is how I declare it. IBOutlet NSMenuItem

NSToolbar not enabled

2008-03-19 Thread Lincoln Green
I have the following code in an NSObject subclass, called LGObject. static NSString *NewToolbarItemIdentifier = @"New"; static NSString *OpenToolbarItemIdentifier = @"Open"; static NSString *SaveToolbarItemIdentifier = @"Save";; static NSString *PrintToolbarItemIdentifier = @"Print"; static NSStri

Re: Menu Item is not disabling

2008-03-19 Thread Nick Zitzmann
On Mar 19, 2008, at 2:00 PM, Mr. Gecko wrote: Hello I am trying to disable a Menu Item and it is not disabling for some reason here is the code that i am using. [eject setEnabled:NO]; I have tried to clean and than build to be sure that it was not a build issue and still can't figure it out.

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 and

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 new

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Sherm Pendley
On Wed, Mar 19, 2008 at 2:01 PM, Jeff LaMarche <[EMAIL PROTECTED]> 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 hos

Re: Using C++ classes from Objective C

2008-03-19 Thread Jeremy
Yes, I am. I have tried using both #include and #import, but neither seems to work. On Mar 19, 2008, at 4:22 PM, John Stiles wrote: 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

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 4:31 PM, Sherm Pendley wrote: Looks reasonable. Now if I could only figure out why I forgot about NSSocketPort... I think maybe I need to write a network app to jog my memory. Obviously I haven't looked at these classes recently enough. :-) I couldn't get it to work.

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], [newText

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Gary L. Wade
Well, this code works for me whether I have an IP address or domain name in the string: addr.sin_addr.s_addr = inet_addr (theCStringInternetAddress); if (INADDR_NONE == addr.sin_addr.s_addr) { struct hostent*theHostInfo; theHostInfo = gethostbyname (theCStringInte

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Hamish Allan
On Wed, Mar 19, 2008 at 8:38 PM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: > On Mar 19, 2008, at 4:31 PM, Sherm Pendley wrote: > >> Looks reasonable. Now if I could only figure out why I forgot about >> NSSocketPort... > > I couldn't get it to work. Apple's documentation makes it sound like > NS

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 5:01 PM, Hamish Allan wrote: There's an article here describing its more general use, at least for the server side: http://macdevcenter.com/pub/a/mac/2006/11/14/how-to-write-a-cocoa-web-server.html Hamish True, but he only uses NSSocketPort for the server, not for the

Re: disabling NSButton?

2008-03-19 Thread Ken Ferry
That style of button does not have disabled art for its bezel. Disabled should be shown in the content, text or images. Check iCal. When the current day is selected, the Today button at the top left is disabled, but this is only shown by dimming the word 'Today'. -Ken On Wed, Mar 19, 2008 at 12

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 NSTextVi

Re: Using C++ classes from Objective C

2008-03-19 Thread Jens Alfke
On 19 Mar '08, at 1:12 PM, Jeremy wrote: I then changed my .m file to a .mm file and all of the errors went away except for one: "cannot find interface declaration for 'MyClass'" The code in my .mm file is as such: m_pMemberVariable = new MyClass(); const unsigned int nRes = m_pMemberVariab

populate a custom sub-class with data from bindings

2008-03-19 Thread Adam Gerson
I want to use the custom Apple subclass ImageAndTextCell.h in my NSOutlineView. How would I hook up the Text and Images used by this custom sub-class to a TreeController's data? The "value" binding already populates the text of the cell. Is there away for me to add a second binding to the sub-class

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. Bu

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Andrew Farmer
On 19 Mar 08, at 14:05, Jeff LaMarche wrote: On Mar 19, 2008, at 5:01 PM, Hamish Allan wrote: There's an article here describing its more general use, at least for the server side: http://macdevcenter.com/pub/a/mac/2006/11/14/how-to-write-a-cocoa-web-server.html True, but he only uses NSSoc

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 (Cocoa-

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 - lengt

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 m

Re: Where's the buffer overrun?

2008-03-19 Thread Nick Zitzmann
On Mar 19, 2008, at 6:00 PM, Andrew Farmer wrote: What's bothering me a lot more is the use of an appendByte: method. NSMutableData doesn't document the existence of such a method. I'm not sure why this would cause guard_malloc to choke *later on*, but it's certainly something to look at.

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 t

__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 sever

Perform Selector After Delay Secondary Window

2008-03-19 Thread Matt Long
This may be a best practice type issue, so if you think I'm missing something fundamental, don't assume I know it just because I probably should. I have a class called AppDelegate that handles all of my UI code. I am handling actions in it not only from my main window, but also from secon

Re: Perform Selector After Delay Secondary Window

2008-03-19 Thread Wim Lewis
On Mar 19, 2008, at 6:00 PM, Matt Long wrote: [self performSelector:@selector(checkPlayback:) withObject:currentTimeValue afterDelay:0.15] While the secondary window is open, checkPlayback never gets called. As soon as the window gets closed, though, all of these events pile up at my brea

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 manage

[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

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 everyon

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 "-L/U

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 w

Re: Where's the buffer overrun?

2008-03-19 Thread Hamish Allan
On Thu, Mar 20, 2008 at 1:42 AM, Chris Suter <[EMAIL PROTECTED]> wrote: > I suspect that it will just end up getting documented as behaving this > way and that's fair enough, I think—it is NSMutableData after all. Turns out it's already documented (http://developer.apple.com/documentation/Cocoa

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. HTH, ->Ben -- Ben Lachman Acacia Tr

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 perf

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 at

How to remove a fetched predicate from an ArrayController?

2008-03-19 Thread WiFiFun
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 have the buttons linking to an action that creates a predicate and sets the fetched predicate to the array controller. This all works great

Re: Synchronous Ruby calls from Safari?

2008-03-19 Thread Jens Alfke
On 19 Mar '08, at 5:33 PM, David Springer wrote: The attached html/Javascript and Ruby scripts run differently on a PC with IE than they do no a Mac with Safari. I'm not sure what framework you're using for this. (And the HTML file you attached is blank.) I've done a fair bit of Ruby, but n

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

Re: Where's the buffer overrun?

2008-03-19 Thread Jens Alfke
On 19 Mar '08, at 5: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. The ...noCopy family o

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 Co

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

Re: Where's the buffer overrun?

2008-03-19 Thread Jean-Daniel Dupas
Le 20 mars 08 à 06:26, Michael Ash a écrit : 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. Thi

  1   2   >