Avoiding Flicker with OpenGL View when Moving Divider of a Split View

2009-03-21 Thread Chris Suter
Hi all, I have a split view arranged horizontally with an OpenGL view in the right pane (surrounded by some other stuff). When I move the divider, there is a flicker on the right hand side of the OpenGL view. You don’t get this glitch if you resize the window. It's not a major issue, just a bit

BOOL takeStupidRoad = NO (search app design question)

2009-03-21 Thread David Yamartino
Hi All, I have a general design question. I'm going through the latest Hillegass and Kochan programming books for the purpose of writing a simple search app. I think I've figured out a way to do this, but having no experience in programming, I have no idea if my approach is good or bad. I'd

Threaded Server using Distributed Objects

2009-03-21 Thread Alan Shouls
Hi, I am implementing a simple client/server using Distributed Objects. I have a single server and a small number of clients. The clients are all on the same machine so I communicate using an NSMachPort, and use 'NSConnection' 'registerName' to register a single connection name on which

Re: NSTableView updating checkboxes

2009-03-21 Thread Jo Phils
Hi again Graham, I have taken some time to work on your suggestions...unfortunately I still can't figure out how to uncheck/recheck the checkboxes by clicking on them. :-( I understand what you're telling me about keeping 2 lists and ultimately I will get to the point where I have to do

Re: Send events to AppleScript

2009-03-21 Thread Тимофей Даньшин
On Mar 21, 2009, at 5:38 AM, has wrote: On Mar 21, 2009, at 1:06 AM, Тимофей Даньшин wrote: On Mar 21, 2009, at 3:34 AM, has wrote: Is it at all possible to have an application send actions to a particular AppleScript script, Yes. See NSAppleScript/OSAKit/Carbon OSA APIs. There's a

Re: NSWorkspace -launchApplication fails to launch, but no error

2009-03-21 Thread Luca C.
Erg, 2009/3/21 Erg Consultant erg_consult...@yahoo.com I try to launch an application by passing a full POSIX path to NSWorkspace -launchApplication: on 10.3.9 but it fails. I have built my app using the 10.4 SDK and tried it targeting both 10.3 10.4 as deployment since I have some newer

Is it a Value or an Object ?

2009-03-21 Thread Jerry Krinock
I've never understood the difference between our use of the words value and object. So, last week I created a little category on NSMutableDictionary which constructs nested dictionaries. See code below for a demo of - setValue:forKeyPath:. Did I name it correctly, or would this method be

Re: Is it a Value or an Object ?

2009-03-21 Thread Luca C.
Essentially they are the same, but the word value fits nicely with KVC. --Luca C. ___ 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

Re: Is it a Value or an Object ?

2009-03-21 Thread Jerry Krinock
On 2009 Mar 21, at 06:46, Luca C. wrote: Essentially they are the same, but the word value fits nicely with KVC. Yes, but setObject is usually used for dictionaries, although there is the variant -setValue:forKey: which handles nil objects, unlike - setObject:forKey: which raises an

Parameters Bindings

2009-03-21 Thread Richard Somers
In Interface Builder and the Cocoa Bindings Reference documentation, each class has its bindings organized by named groups. For example Availability Bindings, Content Bindings, Font Bindings, etc. Many of the classes have a bindings group named Parameters Bindings. My question is what is

Re: Is it a Value or an Object ?

2009-03-21 Thread Keary Suska
On Mar 21, 2009, at 7:57 AM, Jerry Krinock wrote: On 2009 Mar 21, at 06:46, Luca C. wrote: Essentially they are the same, but the word value fits nicely with KVC. Yes, but setObject is usually used for dictionaries, although there is the variant -setValue:forKey: which handles nil

Re: Send events to AppleScript

2009-03-21 Thread has
On Mar 21, 2009, at 12:09 PM, Тимофей Даньшин wrote: Well, I'm writing a translation memory application, which is a program that grabs sentence by sentence from a given text (that needs translating), asks the user to translate that sentence and stores the translation and the original in a

Re: Send events to AppleScript

2009-03-21 Thread Тимофей Даньшин
As far as TextEdit is concerned, i thought of taking its source and modifying it to my needs, and actually create a single application, not a tandem of two or more. I am even beginning to think of taking the OppenOffice as the host for my additional functionality, but OO doesn't look at

NSAppleScript - what is going on here?

2009-03-21 Thread Steve Cronin
Folks; I'm trying to get a string value back from a simple AppleScript in Cocoa: NSDictionary *errorDict= nil; NSAppleScript *appleScriptObject = [[NSAppleScript alloc] initWithSource:theScript]; NSAppleEventDescriptor *eventDescriptor = [appleScriptObject executeAndReturnError:

Re: Threaded Server using Distributed Objects

2009-03-21 Thread Michael Ash
On Sat, Mar 21, 2009 at 6:33 AM, Alan Shouls asho...@humyo.com wrote: Hi, I am implementing a simple client/server using Distributed Objects. I have a single server and a small number of clients. The clients are all on the same machine so I communicate using an NSMachPort, and use

MacRoman - UTF8

2009-03-21 Thread Ben Lachman
My software uses UTF8 almost exclusively. However, for some odd reason, arguments passed from a perl cgi script to one of my command line helper apps are encoded as MacRoman. That's not a problem since I can just use [NSString stringWithCString:argv[i]

Re: MacRoman - UTF8

2009-03-21 Thread Clark Cox
On Sat, Mar 21, 2009 at 2:31 PM, Ben Lachman blach...@mac.com wrote: My software uses UTF8 almost exclusively.  However, for some odd reason, arguments passed from a perl cgi script to one of my command line helper apps are encoded as MacRoman. Where is the CGI script getting the text, and

NSLevelIndicator Bindings Crash

2009-03-21 Thread Walker Argendeli
I'm using Core Data, and I have an entity; we'll call it Item. It has an attribute called priority. In the xib, I have an NSLevelIndicator and NSStepper. I have a NSTableView full of Items. Depending on which item is selected in the table view, I want the level indicator and stepper to

What is -launchApplication:'s name of the application

2009-03-21 Thread Jerry Krinock
From NSWorkspace documentation, - (BOOL)launchApplication:(NSString *)appName Parameters appName The name of the application to open. Well, applications can have several names, so I believe this is ambiguous. My guess is that, in this context, name means the CFBundleIdentifier

Re: What is -launchApplication:'s name of the application

2009-03-21 Thread Jerry Krinock
I was just thinking about the Discussion in the documentation some more, and it implies that the name would be the name of the .app package in the filesystem. So, that might be the answer, but then, this is going to break if the user changes the name of the package. Seems odd.

Why isn't NSString's caseInsensitiveCompare working correctly?

2009-03-21 Thread Wesley Spikes
Odds are, it's a bug that is based entirely in my code, but it's bugging me now, and I've hit a road block mentally. Any help provided would be greatly appreciated. Please excuse the crypticness of this message, but I'm only able to disclose the parts of the code in question. The basic overview

nstableview **very** basic question

2009-03-21 Thread Michael
I've been struggling with this for a few days...so time to ask, if I may. I am trying to emulate Scott Anguish's multiplication table in his book. I cannot get tableview to show columns of constant width. I have looked at the guides of Apple, tried to understand all the nuances of

Re: Why isn't NSString's caseInsensitiveCompare working correctly?

2009-03-21 Thread Julien Jalon
if( [fn caseInsensitiveCompare:s] ) break; NSLog(@%@ != %@, fn, s); compare methods return NSOrderedSame (==0) if the strings are the same so your test here seems incorrect. On Sat, Mar 21, 2009 at 7:26 PM, Wesley Spikes wesley.spi...@gmail.comwrote: Odds are, it's a bug that is based

Re: MacRoman - UTF8

2009-03-21 Thread Ben Lachman
On Mar 21, 2009, at 5:38 PM, Clark Cox wrote: On Sat, Mar 21, 2009 at 2:31 PM, Ben Lachman blach...@mac.com wrote: My software uses UTF8 almost exclusively. However, for some odd reason, arguments passed from a perl cgi script to one of my command line helper apps are encoded as MacRoman.

Re: MacRoman - UTF8

2009-03-21 Thread Stephen J. Butler
On Sat, Mar 21, 2009 at 5:50 PM, Ben Lachman blach...@mac.com wrote: Thats what I thought. However, say I start by reading bén as I noted above, then I call printf(%s, [myStringReadFromMacRoman UTF8String]) and it prints bÈn. However if I call printf(%s, [myStringReadFromMacRoman

NSString and Leaks Instrument, False Positives?

2009-03-21 Thread Kevin Ross
Hi everyone, I'm auditing my app and the both the leaks command line tool and the Instruments tool are both reporting that I have NSString leaks. All of the leaks are coming from code similar to the following: NSFont *ageStarTextFont = [NSFont fontWithName:@Arial Bold

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread Kevin Ross
Whoops, I thought that I'd also mention that I've run the code though the clang static analyzer and it doesn't report that there are any bugs. I'm also happy to post more code if it will help. Thanks again! Kevin On Mar 21, 2009, at 4:36 PM, Kevin Ross wrote: Hi everyone, I'm auditing

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread mm w
be careful with clang, sometimes is missing point, your problem is coming not from this @Arial Bold, give the complete stack and explain what is the condition of the leak False/positive: I have an extensive use of perf tools since years and I didn't see that since a while the leak can be deeper

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread Kevin Ross
Ummm Here is some truncated output from the command line leaks: Leak: 0x15fd4970 size=32 instance of 'NSCFString', type ObjC, implemented in CoreFoundation 0xa00664a0 0x0100078c 0x5354410e 0x65755120 .d...ATS Que 0x50207972 0x0074726f 0x 0x

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread Kevin Ross
Here's the block of surrounding code: NSFont *ageStarTextFont = [NSFont fontWithName:@Arial Bold size:KRLesserDimensionOfRect(transientDrawingRect)/3];

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread Bill Bumgarner
On Mar 21, 2009, at 4:56 PM, Kevin Ross wrote: Leak: 0x15fd4ac0 size=32 instance of 'NSCFString', type ObjC, implemented in CoreFoundation 0xa00664a0 0x0100078c 0x5354410e 0x65755120 .d...ATS Que 0x50207972 0x0074726f 0x 0x ry Port. Is

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread Kevin Ross
Thanks Bill, here's the tail of the same output: Call stack: [thread 0xa00e5720]: | start | main | NSApplicationMain | -[NSApplication run] | -[NSApplication sendEvent:] | -[NSApplication _handleKeyEquivalent:] | -[NSMenu performKeyEquivalent:] | - [NSCarbonMenuImpl

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread Bill Bumgarner
On Mar 21, 2009, at 5:09 PM, Kevin Ross wrote: KRStarChartMO drawPortentsInRect:circleStyle:] | +[NSFont fontWithName:size:] | __NSFontFactoryWithName | + [__NSFontTypefaceInfo typefaceInfoForPostscriptName:] | TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*) const |

Re: What is -launchApplication:'s name of the application

2009-03-21 Thread Michael Ash
On Sat, Mar 21, 2009 at 6:17 PM, Jerry Krinock je...@ieee.org wrote: From NSWorkspace documentation,   - (BOOL)launchApplication:(NSString *)appName      Parameters appName The name of the application to open. Well, applications can have several names, so I believe this is ambiguous. My

Re: MacRoman - UTF8

2009-03-21 Thread Michael Ash
On Sat, Mar 21, 2009 at 6:50 PM, Ben Lachman blach...@mac.com wrote:  That's not a problem since I can just use [NSString stringWithCString:argv[i] encoding:NSMacOSRomanStringEncoding].  However it seems that one can't convert MacRoman - UTF8 after you get it into a NSString. I don't know

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread mm w
if you want I have a similar one with LibTiff and imageIO (10.5.6) make a simple project with a 2 NSButton with a Tiff Image Cheers! On Sat, Mar 21, 2009 at 5:33 PM, Bill Bumgarner b...@mac.com wrote: On Mar 21, 2009, at 5:09 PM, Kevin Ross wrote: KRStarChartMO

Re: NSString and Leaks Instrument, False Positives?

2009-03-21 Thread mm w
sorry for the extra characters that you got my iphone auto-provides me words... On Sat, Mar 21, 2009 at 5:51 PM, mm w openspec...@gmail.com wrote: if you want I have a similar one with LibTiff and imageIO (10.5.6) make a simple project with a 2 NSButton with a Tiff Image Cheers! On Sat,

Re: MacRoman - UTF8

2009-03-21 Thread Clark Cox
On Sat, Mar 21, 2009 at 3:50 PM, Ben Lachman blach...@mac.com wrote: On Mar 21, 2009, at 5:38 PM, Clark Cox wrote: On Sat, Mar 21, 2009 at 2:31 PM, Ben Lachman blach...@mac.com wrote: My software uses UTF8 almost exclusively.  However, for some odd reason, arguments passed from a perl cgi

Re: NSAppleScript - what is going on here?

2009-03-21 Thread Jerry Krinock
On 2009 Mar 21, at 10:38, Steve Cronin wrote: What am I overlooking here? #0 0x9543c1ab in CFDataGetBytePtr #1 0x90462218 in XMLDataResolvingXIncludes #2 0x90464fa8 in OSACopyScriptingDefinition #3 0x90861531 in -[NSScriptSuiteRegistry loadSuitesFromBundle:] #4

Re: nstableview **very** basic question

2009-03-21 Thread Jerry Krinock
On 2009 Mar 21, at 14:27, Michael wrote: I cannot get tableview to show columns of constant width. [tv sizeToFit]; What I get when I use the above code is the first couple of columns varying in size, then the next n columns equally space. If I have missed something in the

How can main thread be blocked in mach_msg_trap?

2009-03-21 Thread Jerry Krinock
NSLogs tell me that, when one of my secondary threads executes a performSelectorOnMainThread::: at a certain point, the requested method never begins. So I conclude that the main thread ^is^ blocked. But if I Pause the debugger at this point and examine the call stack for Thread-1, I

Explicit release when using garbage collection with circular references

2009-03-21 Thread David
Is there any issue issuing explicit release when using garbage collection with Leopard and Obj-c 2.0? I've become aware that I have lots of memory not being freed within my application. I presume this is because its a tree structure with parent child pointers between the objects. If I drop the

Re: Explicit release when using garbage collection with circular references

2009-03-21 Thread Bill Bumgarner
On Mar 21, 2009, at 9:11 PM, David wrote: Is there any issue issuing explicit release when using garbage collection with Leopard and Obj-c 2.0? -release is ignored entirely. CFRelease() work as it always does, and balances CFRetain() nicely. But that isn't the issue. I've become aware that

Re: How can main thread be blocked in mach_msg_trap?

2009-03-21 Thread Eric Schlegel
On Mar 21, 2009, at 8:54 PM, Jerry Krinock wrote: NSLogs tell me that, when one of my secondary threads executes a performSelectorOnMainThread::: at a certain point, the requested method never begins. So I conclude that the main thread ^is^ blocked. But if I Pause the debugger at this