Re: super call in the middle of a block of code ..

2010-02-22 Thread Jeremy Pereira
On 19 Feb 2010, at 18:06, Clark Cox wrote: On Fri, Feb 19, 2010 at 8:15 AM, Roland King r...@rols.org wrote: why would that leak it? Those calls are paired, a table enters editing mode, the variable is set and what it's set to is retained, when the table exits editing mode again the cached

Re: Determine if only single instance is running.

2010-02-22 Thread Mike Abdullah
Hw are you going about launching this app? On 22 Feb 2010, at 05:59, Poonam Virupaxi Shigihalli wrote: Hi list, Is there a way to check an application instance is running. I tried enabling application prohibits multiple instance in info.plist. Still i am able to launch multiple instance

Regular Expressions

2010-02-22 Thread Philip Juel Borges
Hi, Xcode supports the use of regular expressions. With the following search and replace I can find a string, like John 17:17, and turn it into a link: Find ([a-z]+) ([0-9]+):([0-9]+) Replace a href=file:///Library/\1/\2.html#\3\1 \2:\3/a This works fine. But right after Library I want

Re: Removing quit button from dock menu

2010-02-22 Thread Steven Degutis
This is not supported because users should be able to quit any app they choose. However, if your app is a Kiosk app, then there are other measurements you can take to make sure it runs in Kiosk mode. Look in Apple's docs for kiosk mode for more details. -Steven On Mon, Feb 22, 2010 at 1:52 AM,

Re: Regular Expressions

2010-02-22 Thread Dave DeLong
(([a-z]{2})[a-z]*) ([0-9]+):([0-9]+) The name of the book is in \1, the first two letters are in \2, and then the reference is in \3:\4 However, this does require that the name of the book be at least two letters long. Dave On Feb 22, 2010, at 8:08 AM, Philip Juel Borges wrote: Hi,

NSValueTransformer

2010-02-22 Thread Ivan C Myrvold
I have a custom NSValueTransformer which returns the transformedValue as a string in the language set in System preferences - (id)transformedValue:(id)value { return [NSString stringWithFormat:@%@(%@), foundString, value]; } Here foundString will be 'Found' if the language is english,

Re: Removing quit button from dock menu

2010-02-22 Thread Mark Ritchie
On 21/Feb/2010, at 10:52 PM, yogin bhargava wrote: I have an application for which I have to remove quitting option. Anybody has idea how to remove it from the dock menu. What is the goal? Why would you want to do this? M. ___ Cocoa-dev mailing

Re: Regular Expressions

2010-02-22 Thread Jens Alfke
If you need more flexibility, you can write a short script in a language like Ruby, Perl or Python to do it. The advantage is that you can use arbitrarily powerful string and logical operators to transform the match string before replacing it. Perl and Ruby both have a command-line flag that

Re: Removing item from CollectionView by drag it out.

2010-02-22 Thread Sean McBride
On 2/21/10 9:40 PM, Joachim Deelen said: it seems, that NSCollectionViews are not used very frequently, among the Members of this list. I've asked several questions regarding NSCollectionsViews here, but almost never got a reply. NSCollectionView was horribly buggy in 10.5.x, so it may have left

Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-22 Thread Sean McBride
On 2/20/10 9:31 AM, Matt Neuburg said: Thanks for this example. I've used this technique elsewhere and like it too, but alas as soon as you want menu separators in the popup this no longer works. Unless you are aware of some way... Sorry, I wasn't paying attention earlier in this thread. But

Re: call ruby scripts from objective c

2010-02-22 Thread Matt Neuburg
On Sun, 21 Feb 2010 13:56:56 -0800, Rainer Standke li...@standke.com said: Hello, I have a Cocoa app that tries to take advantage of existing ruby code. I basically want to use several scripts from a RubyCocoa application in my app. Is there a way to do that? I use NSTask (along with NSPipe and

Re: Determine if only single instance is running.

2010-02-22 Thread David M. Cotter
kinda carboney but it think it should work boolGetIndProcessType( OSType typeToFind, OSType creatorToFind, ProcessSerialNumber *psnP, short

Re: Determine if only single instance is running.

2010-02-22 Thread Michael Vannorsdel
When I have a process that I really don't want running more than once (some people will run copies or use LaunchServices to launch multiples) I register a named mach port with NSConnection. When when an instance launches it checks for that connection and if it exists the new instance

Re: Document not Saving Text View Attachment

2010-02-22 Thread Gordon Apple
Kyle, thanks for the help. That at least got my test app straightened out. I have filed Bug ID# 7675789 (with the test app) on the fact that the bound text does not update from programmatic insertions. In the test app, I can simply update the bound value myself every time there is a programmatic

Re: Determine if only single instance is running.

2010-02-22 Thread Kyle Sluder
On Sun, Feb 21, 2010 at 9:59 PM, Poonam Virupaxi Shigihalli poonamshigiha...@tataelxsi.co.in wrote: Still i am able to launch multiple instance of the same application. How are you going to deal with Fast User Switching? --Kyle Sluder ___ Cocoa-dev

CGContextEOFillPath not working .. ?

2010-02-22 Thread Gustavo Pizano
Hello all. I want to be able to fill the area between 2 rects that Im building as following: -(void)createPath:(CGContextRef)ctx withInnerRect:(NSRect) rect{ NSRect outterFrame = [self bounds]; CGContextBeginPath(ctx); //Outtter Line CGContextMoveToPoint(ctx,

Re: NSValueTransformer

2010-02-22 Thread Jerry Krinock
On 2010 Feb 22, at 06:01, Ivan C Myrvold wrote: I have bind the value in a tableview header title... This works perfect. The only exception is the table view header title. Probably no one understands the problem. As you have stated it, first you say that it works perfect, then you say that

Core Data: Custom to-many relationship setter not being invoked

2010-02-22 Thread Ken Tabb
Hi folks, I'm clearly doing something daft but unable to see the error of my ways. Distilling my problem down into the Department Employees example, both are custom NSManagedObject subclasses, each with an inverse to-many / to-one relationship as you'd expect. My problem is that Department's

Re: Determine if only single instance is running.

2010-02-22 Thread Sean McBride
On 2/22/10 1:21 PM, Kyle Sluder said: Still i am able to launch multiple instance of the same application. How are you going to deal with Fast User Switching? LSMultipleInstancesProhibited was added to deal with fast user switching. It should be working for the OP, works for me:

Re: CGContextEOFillPath not working .. ?

2010-02-22 Thread David Duncan
On Feb 22, 2010, at 1:53 PM, Gustavo Pizano wrote: Hello all. I want to be able to fill the area between 2 rects that Im building as following: Sot both rounded rects are being display, dont ask me but for some reason the lines didn't want to go to the end on the lines //???#1 and

Re: lastKeyViewTraversingSubviewsBeginningWithView

2010-02-22 Thread Arved von Brasch
Hi Cocoa List, warning: _lastKeyViewTraversingSubviewsBeginningWithView: encountered 5000 views!!! It usually occurs when a NSCollectionView is being refreshed, but not every time. I believe that NSCollectionView creates all of the item views up front, and doesn't lazily create them or

Re: Real-Time Validation in a NSTextField.

2010-02-22 Thread Abhinay Kartik Reddyreddy
Thanks James, I wrote a subclass of NSNumberFormatter. It works like a charm. -Cheers, Abhinay On Feb 19, 2010, at 1:15 PM, James Walker wrote: On 2/18/2010 2:18 PM, Abhinay Kartik Reddyreddy wrote: I was wondering if there is any alternative / better approach for validating text in a

Re: Core Data: Custom to-many relationship setter not being invoked

2010-02-22 Thread Keary Suska
On Feb 22, 2010, at 3:59 PM, Ken Tabb wrote: Hi folks, I'm clearly doing something daft but unable to see the error of my ways. Distilling my problem down into the Department Employees example, both are custom NSManagedObject subclasses, each with an inverse to-many / to-one

Re: Core Data: Custom to-many relationship setter not being invoked

2010-02-22 Thread Jerry Krinock
On 2010 Feb 22, at 14:59, Ken Tabb wrote: My problem is that Department's custom -awakeFromInsert gets called, yet its -addEmployeesObject and -addEmployees methods don't ever get called. If I add employees in the app I believe that Core Data does a wholesale replacement. Try overriding

Re: Core Data: Custom to-many relationship setter not being invoked

2010-02-22 Thread Ken Tabb
Hi Jerry, thanks for the reply. You're right, implementing -setEmployees works like a charm. There's no mention of it in the CoreData.pdf though, that I can find. I will try to use KVO observations, but my purpose is actually to maintain a linked list of employees (OK the Department /

Re: Core Data: Custom to-many relationship setter not being invoked

2010-02-22 Thread Ken Tabb
Hi Keary, thanks for your reply. Yep I implemented all 4, as per the Design - Data Model - Copy to clipboard template, i.e. - (void)addEmployeesObject:(Employee *)value; - (void)removeEmployeesObject:(Employee *)value; - (void)addEmployees:(NSSet *)value; - (void)removeEmployees:(NSSet

Re: lastKeyViewTraversingSubviewsBeginningWithView

2010-02-22 Thread Joe Ranieri
On 2/22/10 6:51 PM, Arved von Brasch wrote: Hi Cocoa List, warning: _lastKeyViewTraversingSubviewsBeginningWithView: encountered 5000 views!!! It usually occurs when a NSCollectionView is being refreshed, but not every time. I believe that NSCollectionView creates all of the item views up

Re: Core Data: Custom to-many relationship setter not being invoked

2010-02-22 Thread Jerry Krinock
On 2010 Feb 22, at 15:53, Ken Tabb wrote: I will try to use KVO observations, but my purpose is actually to maintain a linked list... If I recall correctly, the reason why I use custom setters instead of KVO sometimes is because I need a notification *before* the change actually occurs.

Re: Core Data: Custom to-many relationship setter not being invoked

2010-02-22 Thread Quincey Morris
On Feb 22, 2010, at 15:54, Ken Tabb wrote: Yep I implemented all 4, as per the Design - Data Model - Copy to clipboard template, i.e. - (void)addEmployeesObject:(Employee *)value; - (void)removeEmployeesObject:(Employee *)value; - (void)addEmployees:(NSSet *)value; -

Re: Help with creating CustomViews

2010-02-22 Thread Jean-Henri Duteau
On 2010-02-19, at 6:55 AM, Steven Degutis wrote: It sounds a lot to me (and I could be wrong here) that you're trying to implement something along the lines of an ActiveX control as they were back when I used Visual Basic 5, in the sense that you want a control which is really a

Re: call ruby scripts from objective c

2010-02-22 Thread Gus Mueller
On Feb 22, 2010, at 10:16 AM, Matt Neuburg wrote: And of course RubyCocoa itself is not about Ruby per se, but about Ruby bridging to Objective-C; the only way to get *that* is to write your app in RubyCocoa (or MacRuby). m. You don't have to write your app in RubyCocoa to get this, you can

High Level Toolkit -- is it obsolete or not?

2010-02-22 Thread Joel May
I'm porting an application from Carbon to Cocoa. There are a few things in it that I'm having problems finding the cocoa equivalent. The app is a music education product for kids. They have to tap the rhythm on the spacebar or the mouse button in parts of the program -- i.e. precise timing

Re: Removing quit button from dock menu

2010-02-22 Thread yogin bhargava
I dont want to allow the user to quit my application except from the activity monitor. I have removed the controls for apple+Q button and menu option. Dock item is the only thing left. On Mon, Feb 22, 2010 at 9:15 PM, Mark Ritchie mark.ritc...@mac.com wrote: On 21/Feb/2010, at 10:52 PM, yogin

Re: CGContextEOFillPath not working .. ?

2010-02-22 Thread Gustavo Pizano
Hello David.. Ok I added the CGContextClosePath instead of the CGContextAddLine of the first rect, and the path closes, but the internal doesn't, so I remove the CGContextAddLine of the second rect and place the CGContextClosePath I had at the bottom instead, and both rects close great. I

Re: High Level Toolkit -- is it obsolete or not?

2010-02-22 Thread Eric Schlegel
On Feb 22, 2010, at 11:53 AM, Joel May wrote: I would like to create a thread (NSThread) with a bumped-up priority and poll the mouse and keyboard the same way I did in the carbon version. I'd like to use the cocoa equivalents of GetButton() and GetKeys() but I can't find them.

Re: High Level Toolkit -- is it obsolete or not?

2010-02-22 Thread Seth Willits
On Feb 22, 2010, at 11:53 AM, Joel May wrote: I'm porting an application from Carbon to Cocoa. Good idea. The Carbon64BitGuide.pdf explains how the carbon api's have been updated for 64 bit. But I thought carbon was dead in 64 bit and Snow Leopard. Some of the APIs are deprecated, some

Re: High Level Toolkit -- is it obsolete or not?

2010-02-22 Thread Nick Zitzmann
On Feb 22, 2010, at 12:53 PM, Joel May wrote: I would like to create a thread (NSThread) with a bumped-up priority and poll the mouse and keyboard the same way I did in the carbon version. I'd like to use the cocoa equivalents of GetButton() and GetKeys() but I can't find them. There