Re: Window not displaying

2009-07-01 Thread Andrew Farmer
On 30 Jun 2009, at 22:28, rethish wrote: @implementation SendWindowClass -(void)openNew { [ScheduleWindow makeKeyAndOrderFront:self]; } What is ScheduleWindow, and how is it allocated? The code you've provided here never initializes a window - I'm assuming that it's sometimes

Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Debajit Adhikary
I have an area of a Window (in my MainMenu.xib) which I'd like to populate dynamically with unrelated views such as an NSTable, IKImageBrowserView etc. at different points of time depending on some user-selected criteria. - How do I define this area of the window such that it can be replaced

Drawing the background of a single row in NSTableView

2009-07-01 Thread Peter Zegelin
Hi, I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but it seems like a bit of a hack so I'm wondering if there is a better way. I've also checked various examples but most want to

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Thomas Davie
On 1 Jul 2009, at 09:21, Debajit Adhikary wrote: I have an area of a Window (in my MainMenu.xib) which I'd like to populate dynamically with unrelated views such as an NSTable, IKImageBrowserView etc. at different points of time depending on some user-selected criteria. - How do I

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread John C. Randolph
On Jul 1, 2009, at 12:21 AM, Debajit Adhikary wrote: I have an area of a Window (in my MainMenu.xib) which I'd like to populate dynamically with unrelated views such as an NSTable, IKImageBrowserView etc. at different points of time depending on some user-selected criteria. - How do I

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Robert Martin
Perhaps the simplest way is to use a NSTabView - (you can set it to tabless). Then create all of your 'unrelated views' in separate tabs, and switch the tabs in your code. On Jul 1, 2009, at 3:21 AM, Debajit Adhikary wrote: I have an area of a Window (in my MainMenu.xib) which I'd like to

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Quincey Morris
On Jul 1, 2009, at 00:28, Thomas Davie wrote: On 1 Jul 2009, at 09:21, Debajit Adhikary wrote: (Is it enough to place a generic NSView there and add a subview each time? I'm fairly new to Cocoa, so any pointers are welcome) Yes -- at least that's what I do, if I'm doin it rong, hopefully

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Quincey Morris
On Jul 1, 2009, at 00:26, Peter Zegelin wrote: I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but it seems like a bit of a hack so I'm wondering if there is a better way. I've also

Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread André Berg
Hi David, Thanks for replying :) Actually I am coming from a v0.1 version of my program, was trying to implement this with AppleScript Studio. The Finder's dictionary has a select command but it appears that this command does nothing more than to call said NSWorkspace method. The behaviour of

Re: Window not displaying

2009-07-01 Thread rethish
ScheduleWindow is an outlet of NSWindow. And it is initialized by nib. How can i manually initialize it? On 7/1/09 12:16 PM, Andrew Farmer andf...@gmail.com wrote: On 30 Jun 2009, at 22:28, rethish wrote: @implementation SendWindowClass -(void)openNew { [ScheduleWindow

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Dado Colussi
On Wed, Jul 1, 2009 at 9:26 AM, Peter Zegelinpe...@fracturedsoftware.com wrote:        I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but it seems like a bit of a hack so I'm wondering if

Re: Window not displaying

2009-07-01 Thread Alexander Spohr
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { SendWindowClass *obj =[[SendWindowClass alloc] init]; Is init loading the nib? [obj openNew]; } Am 01.07.2009 um 10:37 schrieb rethish: ScheduleWindow is an outlet of NSWindow. And it is initialized by nib.

Why Applespell.service fail to launch?

2009-07-01 Thread zhiy xue
Our application use Mac OS X spell checker service to do spell check. here is sample code . [[NSSpellChecker sharedSpellChecker] checkSpellingOfString:@hello startingAt:0]; But the problem is AppleSpell.service can not launch automatically by this code, so there is always an alert: couldn't

NSComparisonResult and equality

2009-07-01 Thread Patrick Mau
Hello everyone Here's a really short question regarding possible future API changes. Since NSComparisonResult is an ordered enum typedef, I'd like to know if it's safe to write the following code to test for 'greater or equal to': // This would cover both NSOrderAscending and NSOrderSame if

Re: NSComparisonResult and equality

2009-07-01 Thread Ken Thomases
On Jul 1, 2009, at 6:32 AM, Patrick Mau wrote: Since NSComparisonResult is an ordered enum typedef, I'd like to know if it's safe to write the following code to test for 'greater or equal to': // This would cover both NSOrderAscending and NSOrderSame if ([obj1 compare:obj2]

Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Michael de Haan
Hi Kevin, thanks for answering. Before I answer your specific enquiriesI was led to ask this by a very similar question to the group: I have previously used the content outlet to establish a connection between NSObjectController and its object. Is contentObject an alternative way to

Re: Help with Help (AHLookupAnchor)

2009-07-01 Thread Matt Neuburg
On Wed, 1 Jul 2009 12:02:16 +1000, Graham Cox graham@bigpond.com said: Hi all, I'm trying to link help buttons in my app to topics in my help book. I have a simple scheme where the (hidden) title of the button contains the anchor and I pass it to AHLookupAnchor. The help window opens as

Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Michael Ash
On Tue, Jun 30, 2009 at 11:49 PM, Chris Tracewellch...@thinkcl.com wrote: On Jun 30, 2009, at 6:43 PM, Kyle Sluder wrote: dylib means dynamic library... Why do you need to link against libcurl statically?  Not saying there aren't valid use cases, but please present yours. I guess I

send 4bytes message and receive answer

2009-07-01 Thread Carlo Gulliani
i need to send 4 bytes message like 0x1001 to server and receive answer from it i use AsyncSocket and wrote the next code: ... [socket connectToHost:[arr objectAtIndex:0] onPort:theInteger error:err]; ... -(void)onSocket:(AsyncSocket *)sock didConnectToHost:(NSString *)host port:(UInt16)port

Re: GC bug in NSFontManager?

2009-07-01 Thread Ross Carter
On Jun 30, 2009, at 7:57 PM, Tommy Nordgren wrote: Is CCMApp an NSApplication subclass. This stack trace seems to indicate that there is an instance of it in your nib/xib file. Nope, it's the application delegate. The principal class is NSApplication.

Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Keary Suska
On Jul 1, 2009, at 8:03 AM, Michael de Haan wrote: I have previously used the content outlet to establish a connection between NSObjectController and its object. Is contentObject an alternative way to do the same thing and the best reply by mmalc: If you set the contentObject of an object

Looking for a Mentor in the SF Bay Area

2009-07-01 Thread Brad Gibbs
Hi, I'm looking for an experienced Objective-C programmer in the SF Bay Area with a little extra time on his / her hands to meet for an hour or two per week and correspond over e-mail. I *think* I have a decent grasp of the basics (I'm currently trying things with Core Data, Core

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Adam R. Maxwell
On Jul 1, 2009, at 12:54 AM, Quincey Morris wrote: On Jul 1, 2009, at 00:28, Thomas Davie wrote: On 1 Jul 2009, at 09:21, Debajit Adhikary wrote: (Is it enough to place a generic NSView there and add a subview each time? I'm fairly new to Cocoa, so any pointers are welcome) Yes -- at

asl issue

2009-07-01 Thread Santosh Sinha
we have create a asl file in /Users/santoshs/Library/Logs/ MyAslFile.asl and write a message ,after that delete the system asl file , and try to read that message from own asl file but can't read that message... aslclient aslClient = asl_open(Error, Self, ASL_OPT_STDERR);

warning:assignment from distinct Objective-C type

2009-07-01 Thread David Blanton
I have searched and find nothing that helps with the subject line warning. in .h file NSMutableArray *m_sources; in .mm file if(m_sources != nil) [m_sources release]; NSFileManager* defaultManager = [NSFileManager defaultManager];

Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread Ken Thomases
On Jul 1, 2009, at 11:26 AM, David Blanton wrote: in .h file NSMutableArray *m_sources; [...] m_sources = [volumes stringsByAppendingPaths:[defaultManager directoryContentsAtPath:volumes]]; -stringsByAppendingPaths: returns an NSArray*. That is not an

Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread David Duncan
On Jul 1, 2009, at 9:26 AM, David Blanton wrote: I have searched and find nothing that helps with the subject line warning. in .h file NSMutableArray *m_sources; in .mm file if(m_sources != nil) [m_sources release]; Unnecessary, sending messages to nil

Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread Andy Lee
On Wednesday, July 01, 2009, at 12:26PM, David Blanton aired...@tularosa.net wrote: m_sources = [volumes stringsByAppendingPaths:[defaultManager directoryContentsAtPath:volumes]]; the warning comes at the above line Look at the Objective-C type for m_sources, and look at the

Re: GC bug in NSFontManager?

2009-07-01 Thread Tommy Nordgren
On Jul 1, 2009, at 5:34 PM, Ross Carter wrote: On Jun 30, 2009, at 7:57 PM, Tommy Nordgren wrote: Is CCMApp an NSApplication subclass. This stack trace seems to indicate that there is an instance of it in your nib/xib file. Nope, it's the application delegate. The principal class is

Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Michael de Haan
On Jul 1, 2009, at 8:45 AM, Keary Suska wrote: It might well be possible that I am thinking about the bindings incorrectly...and in fact all one needs in this case is to bind the view( textfield and slider) to the controller with the correct keypath, and that the relationship of a

Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread David Blanton
Thanks Ken ... got it right now! On Jul 1, 2009, at 10:34 AM, Ken Thomases wrote: On Jul 1, 2009, at 11:26 AM, David Blanton wrote: in .h file NSMutableArray *m_sources; [...] m_sources = [volumes stringsByAppendingPaths:[defaultManager

Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Chris Tracewell
On Jun 30, 2009, at 8:55 PM, Nick Zitzmann wrote: On Jun 30, 2009, at 9:49 PM, Chris Tracewell wrote: Finally, just to be sure to be sure to steer things back to my original question... whether I dynamically link or statically link, is there a manual anywhere that describes how to do this

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Quincey Morris
On Jul 1, 2009, at 08:54, Adam R. Maxwell wrote: I'm curious as to why people recommend a tabless NSTabView for this. I've always found tabview subviews to be a pain to set up in IB; the alignment and sizing seem really fiddly to get right. Maybe I've been doing something wrong. I

NSLog / Console / Console Messages

2009-07-01 Thread David Blanton
I am trying to debug a problem with a customer. I made a build with NSLog messages to trace behavior. I have the customer open Console and choose Console Messages. The last message if from march, my messages do not show ??? What is it that I am not aware of re:NSLog Thanks.

Re: multitouch trackpad on macbook pro

2009-07-01 Thread Dimitri Bouniol
For those of us who don't have access to the session videos yet, could we have a taste as to whether it is officially supported yet (or will be in Snow Leopard)? On Jun 30, 2009, at 8:18 AM, mmalc Crawford wrote: On Jun 30, 2009, at 3:33 AM, Memo Akten wrote: i was wondering if it is at

Re: NSLog / Console / Console Messages

2009-07-01 Thread David Blanton
Yeah. I just found via Google that this is problematic to 10.5.7 system.log does show everything, the issue is with the console log database apparently I have experienced this on two different machines (customers) running 10.5.7 On Jul 1, 2009, at 12:08 PM, Bryan Henry wrote: NSLog

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Keith Duncan
On 1 Jul 2009, at 18:26, Quincey Morris wrote: Either you have to defeat the modularization by binding to File's Owner.windowController.whatever (File's Owner being the view controller subclass, of course, and windowController being a property you added to it) This is how I do it, but I

A More User-Friendly FSResolveAlias/WithMountFlags()

2009-07-01 Thread Jerry Krinock
To resolve a file alias, I use FSResolveAlias(), or FSResolveAliasWithMountFlags(). If the target file is on a server which is not available, when allowing user interaction, these non-cancellable synchronous functions cause my app to beachball for 30 seconds (or longer if the server

Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Kyle Sluder
On Wed, Jul 1, 2009 at 10:13 AM, Chris Tracewellch...@thinkcl.com wrote: Okay thanks, that at least helped me find the library - which was step one. There were several version, I choose libcurl.4.dylib. I am not sure where to go now though. I added -libcurl in Other Linker Flags in my build

[NSImageView setImage:theImage] Thread safe??

2009-07-01 Thread Trygve Inda
The docs at: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Thr eadSafetySummary/ThreadSafetySummary.html State: The NSView class is generally thread-safe, with a few exceptions. You should create, destroy, resize, move, and perform other operations on NSView objects

Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:

2009-07-01 Thread Duncan McGregor
Hi I'm writing PDF's with RubyCocoa, and want to set the current graphics context to a PDF context from CGPDFContextCreateWithURL so that I can draw on it. Essentially my code says (sorry, ObjC folks, Ruby follows) @pdf_context = CGPDFContextCreateWithURL(pdf_url, CGRectMake(0, 0, 100,

Re: NSLog / Console / Console Messages

2009-07-01 Thread Dimitri Bouniol
Another way to get the logs messages would be to open your app using Terminal. To do so, navigate to Application.app/Contents/MacOS/ Application and open that file in a terminal window - all log output should appear there. I hope this works out :) On Jul 1, 2009, at 11:35 AM, David Blanton

Parsing question about NSXMLParser

2009-07-01 Thread Erg Consultant
I am trying to parse an XML file on the web using NSXMLParser. The page is a list of gold prices. I can get the tagged elements with no problem, but the price item doesn't seem to be tagged. Can anyone tell me how to get the price item in this element using NSXMLParser: Price

Basic KVO question

2009-07-01 Thread Tim Schmidt
Hi everyone, first of all, thanks for reading this. I have a basic KVO question. In one of my NIBs I have an NSArrayController and a NSSegmentedControl with add/remove segments for the array of said controller. Now I want to enable the remove-segment according to the controllers canRemove

Rendering a fixed-width text

2009-07-01 Thread Riccardo Canalicchio
Hi all, I'm developing an application for MacOSX, based on Core Animation. I would like to know the best way to render a fixed-width text paragraph inside a CALayer. I already tried with CATextLayer, which indeed gave me a fixed-width text but I wasn't able to make height automatically adjust

Where to post

2009-07-01 Thread J. Ellis
I know this is not the proper forum for posting job listings, so my apologies. I¹ve looked everywhere on the web for somewhere to post a small cleanup job for a Cocoa programmer, and can¹t find one. If anyone could privately email me with any places you know of, I would greatly appreciate it.

add/write Quicktime reverse DNS metadata

2009-07-01 Thread Austin
Apple has now used a pretty new (?) reverse DNS metadata for storing director, actor and content rating tags. Anybody could provide some example code of how to write r-DNS metadata using quicktime framework. No apple example code has covered this. Thanks. -Austin

Re: NSDateFormatter Breaks on non-English OS

2009-07-01 Thread mmalc Crawford
On Jun 30, 2009, at 3:29 PM, Trygve Inda wrote: NSString* myDateFormat = @%a %b %e %H:%M:%S %Z %Y; NSDate*myDate = nil; // myDateString is Tue Jun 30 15:53:24 UTC 2009 myFormatter = [[NSDateFormatter alloc] initWithDateFormat:imageDateFormat allowNaturalLanguage:NO]; myDate =

Re: How Do I Statically Link to libcurl?

2009-07-01 Thread maxwellmac99
Here's a couple of links on this. Both for iPhone I think but it should work for Cocoa projects too http://www.clintharris.net/2009/iphone-app-shared-libraries/ http://t-machine.org/index.php/2009/02/26/using-shared-libraries-for-iphone-with-multiple-projects/ 2009/7/1

Reading and writing rtf(d) files

2009-07-01 Thread Ian Piper
Hi all, I have a question about reading and writing file types. I have been following an old Apple text editor example (http://developer.apple.com/documentation/Cocoa/Conceptual/TextArchitecture/Tasks/TextEditor.html ), and want to extend it to allow me to read and write rtf files. At

Only allowing a file to be opened by one app

2009-07-01 Thread Andy Bettis
Hi, I'd like to set up my app so that if one user has a file open with it another user cannot open the file. This only needs to limit access by copies of my app, no need to block out any other process. In the past I'd just leave a write access path open when the file was opened from

Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Shawn Erickson
On Tue, Jun 30, 2009 at 8:49 PM, Chris Tracewellch...@thinkcl.com wrote: On Jun 30, 2009, at 6:43 PM, Kyle Sluder wrote: dylib means dynamic library... Why do you need to link against libcurl statically?  Not saying there aren't valid use cases, but please present yours. I guess I assumed

User interface validation doesn't work, right?

2009-07-01 Thread Bill Cheeseman
For years, the Implementing Validation section of Apple's User Interface Validation document has said the following: Before it is displayed, a user interface item checks to see if its target implements validateUserInterfaceItem:. If it does, then the enabled status of the item is

Re: GC bug in NSFontManager?

2009-07-01 Thread Ross Carter
On Jul 1, 2009, at 12:48 PM, Tommy Nordgren wrote: You might check if any of the following methods depends on outlets being correctly set: 2 com.cocomot.Pagehand 0x0003a706 -[CCMFontCollectionsController fontNamesFamiliesDictionary] + 312 3 com.cocomot.Pagehand 0x0003a1fc

Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Chris Tracewell
On Jul 1, 2009, at 2:18 PM, Shawn Erickson wrote: Apple's API contract with application developers is at the library level and not below that. If the SDK you compile against has the libraries you need you should not attempt to statically link them into your application. Additionally any

Re: Parsing question about NSXMLParser

2009-07-01 Thread Fritz Anderson
On 1 Jul 2009, at 3:49 PM, Erg Consultant wrote: I am trying to parse an XML file on the web using NSXMLParser. The page is a list of gold prices. I can get the tagged elements with no problem, but the price item doesn't seem to be tagged. Can anyone tell me how to get the price item in

libcurl -- how to write a callback?

2009-07-01 Thread Chris Tracewell
I've gotten libcurl linked and ready to use thanks to many contributors from a previous post here. Does anyone have a snippet code or link of an example of writing a callback function for say CURLOPT_READFUNCTION? Thank you Chris ___

Re: Basic KVO question

2009-07-01 Thread Keary Suska
On Jun 29, 2009, at 6:09 PM, Tim Schmidt wrote: first of all, thanks for reading this. I have a basic KVO question. In one of my NIBs I have an NSArrayController and a NSSegmentedControl with add/remove segments for the array of said controller. Now I want to enable the remove-segment

libSystem.B.dylib

2009-07-01 Thread David Blanton
My app is running on numerous customer machines. With the recent 10.5.7 software update I am getting calls that my app is crashing on iMacs only so far. It is always in libSystem.B.dylib and some string function, e.g strlen +16, strchr+10 etc Is this a known Apple problem?

libSystem.B.dylib Calling Code

2009-07-01 Thread David Blanton
Here is code that crashes. the parms coming in are checked for validity before ReplaceChar is called void ReplaceChar(char *s, char oldChar, char newChar) { if(newChar == oldChar) return; char *n = strchr(s, oldChar); while(n) { *n = newChar; n =

Re: libcurl -- how to write a callback?

2009-07-01 Thread Greg Guerin
Chris Tracewell wrote: I've gotten libcurl linked and ready to use thanks to many contributors from a previous post here. Does anyone have a snippet code or link of an example of writing a callback function for say CURLOPT_READFUNCTION? What have you tried? For example, I found a number

Re: [Rubycocoa-talk] Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:

2009-07-01 Thread Scott Thompson
On Wednesday, July 01, 2009, at 02:51PM, Duncan McGregor dun...@oneeyedmen.com wrote: Hi I'm writing PDF's with RubyCocoa, and want to set the current graphics context to a PDF context from CGPDFContextCreateWithURL so that I can draw on it. Essentially my code says (sorry, ObjC folks,

Re: libSystem.B.dylib

2009-07-01 Thread David Blanton
I agree with your premise but my code is portable and runs on many other machines with 10.5.7 AND there are post all over the internet about apps such as MS Office and Safari crashing inthe same lib. On Jul 1, 2009, at 4:18 PM, David Springer wrote: It is likely you are passing a bad

Re: libcurl -- how to write a callback?

2009-07-01 Thread Geoff Beier
On Wed, Jul 1, 2009 at 5:42 PM, Chris Tracewellch...@thinkcl.com wrote: I've gotten libcurl linked and ready to use thanks to many contributors from a previous post here. Does anyone have a snippet code or link of an example of writing a callback function for say CURLOPT_READFUNCTION? That

Re: libSystem.B.dylib

2009-07-01 Thread Greg Guerin
David Blanton wrote: I agree with your premise but my code is portable and runs on many other machines with 10.5.7 AND there are post all over the internet about apps such as MS Office and Safari crashing in the same lib. List the assembly-language instructions of the function. The crash

Re: [NSImageView setImage:theImage] Thread safe??

2009-07-01 Thread Michael Ash
2009/7/1 Trygve Inda cocoa...@xericdesign.com: So is this legal in a secondary thread? NSImage* theImage = [[NSImage alloc] initWithContentsOfFile:someImagePath]; [imageView setImage:theImage]; [theImage release]; No. There's a very simple rule to follow when examining thread safety. The

Re: Only allowing a file to be opened by one app

2009-07-01 Thread Michael Ash
On Wed, Jul 1, 2009 at 11:47 AM, Andy Bettisa...@andybettis.com wrote: Hi, I'd like to set up my app so that if one user has a file open with it another user cannot open the file. This only needs to limit access by copies of my app, no need to block out any other process. In the past I'd

Re: libSystem.B.dylib

2009-07-01 Thread David Blanton
Ok. I'll tackle with your suggestions. These iMacs Model Name: iMac Model Identifier: iMac7,1 Processor Name: Intel Core 2 Duo Processor Speed: 2.4 GHz Number Of Processors: 1 Total Number Of Cores:2 L2 Cache: 4 MB Memory: 1 GB Bus Speed:

Re: User interface validation doesn't work, right?

2009-07-01 Thread Keary Suska
On Jul 1, 2009, at 3:24 PM, Bill Cheeseman wrote: For years, the Implementing Validation section of Apple's User Interface Validation document has said the following: Before it is displayed, a user interface item checks to see if its target implements validateUserInterfaceItem:. If it

Re: libSystem.B.dylib

2009-07-01 Thread Michael Ash
On Wed, Jul 1, 2009 at 6:14 PM, David Blantonaired...@tularosa.net wrote: My app is running on numerous customer machines.  With the recent 10.5.7 software update I am getting calls that my app is crashing on iMacs only so far. It is always in libSystem.B.dylib and some string function, e.g

Re: libcurl -- how to write a callback?

2009-07-01 Thread Chris Tracewell
Chris Tracewell wrote: I've gotten libcurl linked and ready to use thanks to many contributors from a previous post here. Does anyone have a snippet code or link of an example of writing a callback function for say CURLOPT_READFUNCTION? What have you tried? For example, I found a number of

Re: libSystem.B.dylib Calling Code

2009-07-01 Thread Shawn Erickson
On Wed, Jul 1, 2009 at 3:18 PM, David Blantonaired...@tularosa.net wrote: Here is code that crashes. the parms coming in are checked for validity before ReplaceChar is called void ReplaceChar(char *s, char oldChar, char newChar) {    if(newChar == oldChar)        return;    char *n =

Re: libcurl -- how to write a callback?

2009-07-01 Thread Chris Tracewell
On Jul 1, 2009, at 3:21 PM, Geoff Beier wrote: On Wed, Jul 1, 2009 at 5:42 PM, Chris Tracewellch...@thinkcl.com wrote: I've gotten libcurl linked and ready to use thanks to many contributors from a previous post here. Does anyone have a snippet code or link of an example of writing a

Determining OS at Runtime

2009-07-01 Thread iseecolors
I need to support 10.4 in my application, but it uses some Carbon APIs that are deprecated in 10.5 and I am using some new 10.5 APIs that require the 10.5 SDK. I am sure I have seen this before, but I have been unable to find it in the Archive. How do I determine at runtime which OS

Re: User interface validation doesn't work, right?

2009-07-01 Thread Bill Cheeseman
On Jul 1, 2009, at 5:56 PM, mmalc Crawford wrote: It depends on the sort of user interface element. This does work for menu items and tab bar items... Hi, mmalc. It works perfectly well with menu items and toolbar items because they're specially coded to make it work. The docs are clear

Re: Only allowing a file to be opened by one app

2009-07-01 Thread Andy Bettis
On 2 Jul 2009, at 00:02, Michael Ash wrote: On Wed, Jul 1, 2009 at 11:47 AM, Andy Bettisa...@andybettis.com wrote: Hi, I'd like to set up my app so that if one user has a file open with it another user cannot open the file. This only needs to limit access by copies of my app, no need to

Re: [NSImageView setImage:theImage] Thread safe??

2009-07-01 Thread Trygve Inda
2009/7/1 Trygve Inda cocoa...@xericdesign.com: So is this legal in a secondary thread? NSImage* theImage = [[NSImage alloc] initWithContentsOfFile:someImagePath]; [imageView setImage:theImage]; [theImage release]; No. I have no idea how this squares with generally thread-safe, but

Inconsistent double-click to edit in NSTableView

2009-07-01 Thread K . Darcy Otto
I have an NSTableView subclass that has a pair of columns that are acting inconsistently when the user double-clicks to begin editing. In the first column, the user can double-click anywhere in the cell to begin editing that cell. In the second column, which is the last column of the

Table Selection Persists even though Window Closed

2009-07-01 Thread K . Darcy Otto
I have a document-based application that has, as its main UI element, an NSTableView subclass. I want to disable menu items based on whether the table has a row selected. I do this via - validateUserInterfaceItem, and everything works under normal circumstances: I check for a selected row

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Peter Zegelin
On 01/07/2009, at 6:12 PM, Quincey Morris wrote: On Jul 1, 2009, at 00:26, Peter Zegelin wrote: I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but it seems like a bit of a hack so

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Peter Zegelin
On 01/07/2009, at 6:55 PM, Dado Colussi wrote: On Wed, Jul 1, 2009 at 9:26 AM, Peter Zegelinpe...@fracturedsoftware.com wrote: I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but

Re: Determining OS at Runtime

2009-07-01 Thread Sherm Pendley
On Wed, Jul 1, 2009 at 7:24 PM, iseecolorsiseecol...@sbcglobal.net wrote: I need to support 10.4 in my application, but it uses some Carbon APIs that are deprecated in 10.5 and I am using some new 10.5 APIs that require the 10.5 SDK. I am sure I have seen this before, but I have been unable

Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread André Berg
Well, after spending the whole day... I think it is really hard to do. I haven't gotten anywhere yet, but if I find out something I will post it of course :) I cannot imagine that this is an uncommon task... Cheers, André --- Original Nachricht --- Absender: André Berg Datum: 01.07.2009

Re: User interface validation doesn't work, right?

2009-07-01 Thread Gregory Weston
Bill Cheeseman wrote: For years, the Implementing Validation section of Apple's User Interface Validation document has said the following: Before it is displayed, a user interface item checks to see if its target implements validateUserInterfaceItem:. If it does, then the enabled status of

Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread Kyle Sluder
On Wed, Jul 1, 2009 at 5:54 PM, André Bergandre.b...@email.de wrote: I cannot imagine that this is an uncommon task... Really? I can't actually think of a case in which this behavior would be useful. --Kyle Sluder ___ Cocoa-dev mailing list

Re: User interface validation doesn't work, right?

2009-07-01 Thread Keary Suska
On Jul 1, 2009, at 5:27 PM, Bill Cheeseman wrote: My controller is the target, which according to Apple's documentation, and according to my understanding for many years, means simply that it implements the button's action method. My controller does in fact implement the action method. In

Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread Graham Cox
On 02/07/2009, at 10:54 AM, André Berg wrote: Well, after spending the whole day... I think it is really hard to do. I haven't gotten anywhere yet, but if I find out something I will post it of course :) I would say that unless the Finder explicitly exposes some API (maybe via

Re: Rendering a fixed-width text

2009-07-01 Thread Scott Thompson
On Jun 30, 2009, at 9:52 AM, Riccardo Canalicchio wrote: I'm developing an application for MacOSX, based on Core Animation. I would like to know the best way to render a fixed-width text paragraph inside a CALayer. I already tried with CATextLayer, which indeed gave me a fixed-width text

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Graham Cox
On 02/07/2009, at 10:09 AM, Peter Zegelin wrote: Problem with this is there is no obvious concordance ( that I can see) between a row and its rectangle. Wouldn't scrolling affect all this? I wonder if the delegate method: - (void)tableView:(NSTableView *)aTableView

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Adam R. Maxwell
On Jul 1, 2009, at 6:40 PM, Graham Cox wrote: On 02/07/2009, at 10:09 AM, Peter Zegelin wrote: Problem with this is there is no obvious concordance ( that I can see) between a row and its rectangle. Wouldn't scrolling affect all this? I wonder if the delegate method: -

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Adam R. Maxwell
On Jul 1, 2009, at 10:26 AM, Quincey Morris wrote: On Jul 1, 2009, at 08:54, Adam R. Maxwell wrote: I'm curious as to why people recommend a tabless NSTabView for this. I've always found tabview subviews to be a pain to set up in IB; the alignment and sizing seem really fiddly to get

Re: Rendering a fixed-width text

2009-07-01 Thread Kyle Sluder
On Tue, Jun 30, 2009 at 7:52 AM, Riccardo Canalicchioriccardo.canalicc...@gmail.com wrote: I'm developing an application for MacOSX, based on Core Animation. I would like to know the best way to render a fixed-width text paragraph inside a CALayer. I already tried with CATextLayer, which indeed

Re: Basic KVO question

2009-07-01 Thread Kyle Sluder
On Mon, Jun 29, 2009 at 5:09 PM, Tim Schmidtschmidt@gmx.net wrote: and receive the obligatory change notifications alright, but the change dictionary always contains an NSNull instance for the NSKeyValueChangeNewKey instead of the NSNumber bool subclass I would expect. Am I doing something

How can I get rid of this message?

2009-07-01 Thread Agha Khan
I am adding a object (somedata) for (int i = 0; i 7; i++) { SomeData* singleNutData = [[SomeData alloc] init]; [NutArray addObject: SomeData]; } I am getting warning. NSArray may not respond to -addObject. (Message without a matching

Re: How can I get rid of this message?

2009-07-01 Thread Dave Keck
'NutArray' must be declared as an NSMutableArray to respond to -addObject. NSArray is immutable, and thus doesn't respond to -addObject:. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: How can I get rid of this message?

2009-07-01 Thread Nick Zitzmann
On Jul 1, 2009, at 8:41 PM, Agha Khan wrote: Am I am doing something wrong? Yes. I am new to Apple development and how can I get rid of this message. NSArrays are immutable; NSMutableArrays are. Make your array mutable, and then you can add and remove objects from it. Note that it's

Re: How can I get rid of this message?

2009-07-01 Thread WT
On Jul 2, 2009, at 4:41 AM, Agha Khan wrote: I am adding a object (somedata) for (int i = 0; i 7; i++) { SomeData* singleNutData = [[SomeData alloc] init]; [NutArray addObject: SomeData]; } I am getting warning. NSArray may not respond

Re: How can I get rid of this message?

2009-07-01 Thread Roland King
1) NSArray doesn't respond to addObject, you need NSMutableArray, where is your declaration of NutArray? 2) you're leaking singleNutData each time you make one (unless you are using Garbage collection or there's a release you're not showing 3) NutArray should really start with a lowercase

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Marco S Hyman
On Jul 1, 2009, at 6:50 PM, Adam R. Maxwell wrote: Well, I generally avoid bindings, since I can't comment nib/xib files, and it takes too long to reverse engineer my own (or worse, someone else's) bindings when I'm doing maintenance work. With that perspective, the minor glue code to

is NSTableColumn valueForUndefinedKey:@value?

2009-07-01 Thread norio ota
Hi, I'm stuck with the following code. [column bind:NSValueBinding toObject:[self treeController] withKeyPath:@arrangedObjects.myColorPath options:nil]; NSTableColumn* column is specified. treeController is a NSTreeController and defined in a nib. When debugging on the code above, the next

  1   2   >