Re: Cocoa Programming iPing exercise

2008-10-08 Thread Shawn Protsman
On Oct 2, 2008, at 8:37 AM, j o a r wrote: On Oct 2, 2008, at 8:12 AM, Jack Carbaugh wrote: could it be that [hostField stringValue] is not an object ? isn't "stringValue" just a value ? That doesn't seem likely. In all likelihood the "hostField" variable points to a NSTextField, in wh

Re: Cocoa Programming iPing exercise

2008-10-02 Thread Jamie Pinkham
whoops.. should reply to all.. sorry Joe. anyway, i asked, and this may be a silly inquiry, but have you checked the execute permissions of the executable? On Oct 2, 2008, at 10:06 AM, Joe Keenan wrote: On Oct 2, 2008, at 10:01 AM, Sherm Pendley wrote: On Thu, Oct 2, 2008 at 9:20 AM, Joe

Re: Cocoa Programming iPing exercise

2008-10-02 Thread j o a r
On Oct 2, 2008, at 8:12 AM, Jack Carbaugh wrote: could it be that [hostField stringValue] is not an object ? isn't "stringValue" just a value ? That doesn't seem likely. In all likelihood the "hostField" variable points to a NSTextField, in which case "stringValue" returns an instance o

Re: Cocoa Programming iPing exercise

2008-10-02 Thread Jack Carbaugh
could it be that [hostField stringValue] is not an object ? isn't "stringValue" just a value ? On Oct 2, 2008, at Thu-10 /02 /08-10:06 AM, Joe Keenan wrote: On Oct 2, 2008, at 10:01 AM, Sherm Pendley wrote: On Thu, Oct 2, 2008 at 9:20 AM, Joe Keenan <[EMAIL PROTECTED]> wrote: On Oct 1,

Re: Cocoa Programming iPing exercise

2008-10-02 Thread Joe Keenan
On Oct 2, 2008, at 10:01 AM, Sherm Pendley wrote: On Thu, Oct 2, 2008 at 9:20 AM, Joe Keenan <[EMAIL PROTECTED]> wrote: On Oct 1, 2008, at 1:25 PM, Shawn Protsman wrote: NSArray *args = [NSArray arrayWithObject:[hostField stringValue]]; You forgot the nil argument at the end of t

Re: Cocoa Programming iPing exercise

2008-10-02 Thread Sherm Pendley
On Thu, Oct 2, 2008 at 9:20 AM, Joe Keenan <[EMAIL PROTECTED]> wrote: > > On Oct 1, 2008, at 1:25 PM, Shawn Protsman wrote: > > NSArray *args = [NSArray arrayWithObject:[hostField stringValue]]; >> > > You forgot the nil argument at the end of the array. -arrayWithObject: doesn't need on

Re: Cocoa Programming iPing exercise

2008-10-02 Thread Joe Keenan
On Oct 1, 2008, at 1:25 PM, Shawn Protsman wrote: Here is the project code for the startStopPing method (the relevant part that I think I should change) of iPing: task = [[NSTask alloc] init]; [task setLaunchPath:@"/sbin/ping"]; NSArray *args = [NSArray arrayWithObj

Re: Cocoa Programming iPing exercise

2008-10-02 Thread Stephen J. Butler
On Wed, Oct 1, 2008 at 12:25 PM, Shawn Protsman <[EMAIL PROTECTED]> wrote: > 'Build and Go' compiles clean but upon entering a number, like 1 in > hostField, and then clicking 'Start' results in the 'Debugger Console' going > to gdb. With the above modification, I can return setLaunchPath to > /sbi

Re: Cocoa Programming iPing exercise

2008-10-02 Thread Simon Wolf
On 1 Oct 2008, at 18:25, Shawn Protsman wrote: I finally decided to take a dive into Objective-C with Xcode. I'm looking at the iPing example in Hillegass' latest book, Cocoa Programming. iPing works fine as coded in the book. Next, I decided to replace `ping` with a binary I wrote called `

Cocoa Programming iPing exercise

2008-10-01 Thread Shawn Protsman
I finally decided to take a dive into Objective-C with Xcode. I'm looking at the iPing example in Hillegass' latest book, Cocoa Programming. iPing works fine as coded in the book. Next, I decided to replace `ping` with a binary I wrote called `keyreq`. It is simply a C program and resides i