NSPredicateEditorRowTemplate

2008-07-04 Thread Chris
I have a custom view in a NSPredicateEditorRowTemplate. It seems like the NSPredicateEditor isn't aware when I change the state of the custom view, because when I ask it for the predicate it just returns the old one without even calling predicateWithSubPredicates on my template. I'm guess

Crash after saving document

2008-07-04 Thread Antonio Nunes
Hi, In my garbage collected app I'm seeing a crash after saving a document to disk (or any of the other export metods that bring up the save panel). The crash doesn't happen always, but still with some frequency (I can usually get it to reproduce between every 10-20 saves/exports). I _thi

Re: IB3 and custom controls: problem with actions

2008-07-04 Thread Chris
I think I've seen this a few times in IB3. But I fiddled a bit, saved, restarted and then it was working as I expected. I wrote it off to a bug at the time. On 04/07/2008, at 4:19 PM, Vitaly Ovchinnikov wrote: Hello all, I'm porting my project from XCode 2.5 to 3.0 and have a big troubl

Re: Crashes with no backtrace when printing

2008-07-04 Thread Ben
Thanks for the tips Brian & Jen, using them I've now found that when the app crashes, there is a reference count underflow somewhere: MyApp(15221,0xb0103000) malloc: reference count underflow for 0x14d6220, break on auto_refcount_underflow_error to debug. Using the breakpoint above in the

NSURLConnection and buffering

2008-07-04 Thread Arvind Jain
I'm using NSURLConnection to download a web page which is served from a server that uses HTTP 1.1 and chunked encoding. The web page consists of 2 sections; the server sends the first section which is about 300 bytes immediately, and has to do some processing for 30 seconds before it sends the next

Re: IB3 and custom controls: problem with actions

2008-07-04 Thread Vitaly Ovchinnikov
I restarted it few times with no result. The only thing I didn't try is to create a new NIB-file (really bad way since I have about 20 forms there...) Still hope that some solution exists. On Fri, Jul 4, 2008 at 11:33 AM, Chris <[EMAIL PROTECTED]> wrote: > > I think I've seen this a few times in I

Re: Binding an NSTextField

2008-07-04 Thread Mike Abdullah
On 4 Jul 2008, at 06:15, Alex Wait wrote: I have two methods setTheString and theString. They return the value of another NSTextField on my window. In IB I binded the value of the textField to App Controller and the Model Key Path to "theString". theString() is only called when the app fir

Re: Outline View and Bindings

2008-07-04 Thread Ron Lue-Sang
On Jun 26, 2008, at 12:46 PM, Quincey Morris wrote: On Jun 26, 2008, at 12:03, Gabriel Shahbazian wrote: I have some bindings set up that work perfect well with a Table View (3 column) but when I try and use the Outline View it fails to display the data. Is there something different you n

Re: garbage collection and NSConnection

2008-07-04 Thread casa
El 03/07/2008, a las 3:33, Michael Ash escribió: On Wed, Jul 2, 2008 at 6:09 PM, Joan Lluch (casa) <[EMAIL PROTECTED]> wrote: Basically, all you have to do is to always return autoreleased objects from your methods, and always send release to objects that you created with alloc or were ret

Re: garbage collection and NSConnection

2008-07-04 Thread Jean-Daniel Dupas
Le 4 juil. 08 à 11:25, Joan Lluch (casa) a écrit : There is a couple of points I think you are missing here. First, GC makes programs go slower not because of the overhead of the garbage collection itself, which I concede that may be comparable to the retain/release calls in a non-manag

Re: [MEET] CocoaHeads Mac Developer Meetings

2008-07-04 Thread Michael Fey
On Jun 30, 2008, at 2:21 AM, Stephen Zyszkiewicz wrote: CocoaHeads is an international Mac programmer's group. We specialize in Cocoa, but everything Mac programming related is welcome. Upcoming meetings: * Syracuse, NY - Thursday July 10, 2008 07:00 PM EST. Check out http://fruitstandsoftwar

Re: [MEET] CocoaHeads Mac Developer Meetings

2008-07-04 Thread Vincent E.
On Jun 30, 2008, at 8:21 AM, Stephen Zyszkiewicz wrote: Upcoming meetings: Frankfurt, GER - Monday July 07, 2008 07:00 PM CET - http://cocoaheads.org/de/Frankfurt/index.html - http://upcoming.yahoo.com/event/857251 ___ Cocoa-dev mailing list (Cocoa

NSTextField: is it possible to avoid selecting contents on focus?

2008-07-04 Thread Paul Hoadley
Hello, The default behaviour of an NSTextField is apparently to select its contents on gaining focus. Is there any way to avoid this, and, say, put the cursor at the end of any content instead? -- Paul. w http://logicsquad.net/ h http://paul.hoadley.name/

Re: NSTextField: is it possible to avoid selecting contents on focus?

2008-07-04 Thread Ricky Sharp
On Jul 4, 2008, at 6:01 AM, Paul Hoadley wrote: The default behaviour of an NSTextField is apparently to select its contents on gaining focus. Is there any way to avoid this, and, say, put the cursor at the end of any content instead? You should be able to set a delegate and use contro

NSArrayController & Core Data bindings not loading data

2008-07-04 Thread Aaron Wallis
Hey there, I've got a really frustrating issue with Core Data bindings in a small app I'm working on and i'm hoping someone where can help me out. My app has a basic model in Core Data that has basic details about some staff & colleagues. So far i've just been hooking everything up in IB

Re: NSArrayController & Core Data bindings not loading data

2008-07-04 Thread Aaron Wallis
Ignore me... the "prepares content" flag was set to off :( On 04/07/2008, at 10:27 PM, Aaron Wallis wrote: Hey there, I've got a really frustrating issue with Core Data bindings in a small app I'm working on and i'm hoping someone where can help me out. My app has a basic model in Core Da

Re: [MEET] CocoaHeads Mac Developer Meetings

2008-07-04 Thread Dave DeLong
Due to a scheduling conflict, we've had to move the meeting to Tues, July 8 at 7 PM MST. See http://cocoaheads.byu.edu/meetings/objective-c-and-dev-tools for details concerning the meeting and a map to the location. Dave DeLong President, BYU CocoaHeads On Mon, Jun 30, 2008 at 12:21 AM, Stephen

Re: Crashes with no backtrace when printing

2008-07-04 Thread Ben
Thanks for the tips Brian & Jen, using them I've now found that when the app crashes, there is a reference count underflow somewhere: MyApp(15221,0xb0103000) malloc: reference count underflow for 0x14d6220, break on auto_refcount_underflow_error to debug. Using the breakpoint above in the

Re: Getting mouse moved events on overlay windows

2008-07-04 Thread James Bucanek
Markus Spoettl wrote (Monday, June 30, 2008 11:52 PM -0700): However, I can't figure out a way to get -mouseMoved: messages on the overlay window's view. Tracking areas as well as -mouseMoved: messages (with setting acceptsMouseMovedEvents:YES on the overlay window) d

string to float

2008-07-04 Thread Robert Cerny
Hi folks, I made a parser, which returns values like 10,45. It means, it has comma as a decimal point delimiter, which is correct in my language. I was trying to find a way to convert to NSNumber. Is it correct the the right way is to use NSScanner? Robert _

Re: string to float

2008-07-04 Thread Jean-Daniel Dupas
Le 4 juil. 08 à 17:15, Robert Cerny a écrit : Hi folks, I made a parser, which returns values like 10,45. It means, it has comma as a decimal point delimiter, which is correct in my language. I was trying to find a way to convert to NSNumber. Is it correct the the right way is to use NSSca

Re: string to float

2008-07-04 Thread Devon Ferns
What about replacing the , with a . and using NSString's floatValue function? Devon Robert Cerny wrote: Hi folks, I made a parser, which returns values like 10,45. It means, it has comma as a decimal point delimiter, which is correct in my language. I was trying to find a way to convert to N

Re: Style Question (Robert Claeson)

2008-07-04 Thread Scott Ribe
> Actually, I couldn't agree more with the documentation! Funny thing is, although I've used the style he advocates for a very long time (15 years???), I don't agree with his reasoning. Indentation of *code* should be consistent, an object comes into scope where it's declared, not at an opening b

Re: string to float

2008-07-04 Thread Gary L. Wade
If you've already parsed the text, just use NSNumber's class method +numberWithDouble (or whichever other method is appropriate for your needs). If you don't want to use your own parser, you can use NSScanner on your text, but make sure you've set the locale to correctly interpret the comma.

Re: Style Question (Robert Claeson)

2008-07-04 Thread Gary L. Wade
Scott Ribe wrote: Anyways, it really is a personal preference. All arguments I've ever seen that try to claim one style or the other is more correct or safer, are B.S. (Including the one referenced--the bounds of a block were *ALWAYS* absolutely vitally important, well before objects & destructor

Re: garbage collection and NSConnection

2008-07-04 Thread casa
El 04/07/2008, a las 11:38, Jean-Daniel Dupas escribió: I don't see your point. Using standard memory management, you can create you own pool, and using GC, you can manually trigger the GC. What prevent you to avoid memory peak ? Bonjour, Jean. Try it yourself. With the correct use of a

Re: Style Question (Robert Claeson)

2008-07-04 Thread Scott Ribe
> Of course, if you're only talking about a few hundred > lines, Oh yes, at most. *NEVER* the size code base you're talking about! -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev

How to implement Quartz GL ?

2008-07-04 Thread Mario Gajardo Tassara
Hi to all, I am programming a sort of game purely in Quartz 2D API, but i want to accelerate the blitting process with Quartz GL, but i can´t find any information in the developer docs. Anyone with experience in Quartz GL can help me how to implement this in my code. Thanks in advance. M

How to keep a window always in foreground?

2008-07-04 Thread Greg
I've searched the list but haven't been able to find out how to *always* keep a window in the foreground. If you set the layer on it and display it, it will appear above all windows, but you can still obscure it by switching to another application. How do I keep it floating in front regar

Re: How to keep a window always in foreground?

2008-07-04 Thread Markus Spoettl
On Jul 4, 2008, at 10:51 AM, Greg wrote: I've searched the list but haven't been able to find out how to *always* keep a window in the foreground. If you set the layer on it and display it, it will appear above all windows, but you can still obscure it by switching to another application.

CoreAnimation synchronous animations

2008-07-04 Thread Jesus De Meyer
Hi, I'm using CoreAnimation for a kind of puzzle game where you move one piece to anothe position. I read that when I you do implicit animations, like changing the position of a layer, this happens asynchronously. Is there a way to do this synchronously? I've tried using a CAAnimationGrou

Re: How to keep a window always in foreground?

2008-07-04 Thread Greg
On Jul 4, 2008, at 2:17 PM, Markus Spoettl wrote: I think what you are looking for is the window level: http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#/ /apple_ref/doc/uid/2013-BCICJDAF Hi, sorry, I meant to say le

c++ exceptions in objective c call stack

2008-07-04 Thread Jim Crafton
I have found stuff on the internet about issues with throwing C++ exceptions, and I've run into something which I think is what these articles are talking about but I'm not 100% sure so I thought I'd ask. I have some C+ code that is being called as a result of the AppKit framework updating a view w

Re: c++ exceptions in objective c call stack

2008-07-04 Thread Bill Bumgarner
In the 32 bit [legacy] Mac OS X runtime, C++ and Objective-C exceptions Do Not Mix. Oil & water. C++ exceptions are ignored by @try/@catch and vice-versa. In the modern runtime (64 bit Mac OS X & elsewhere), the exception model has been unified. Not only are C++ and Objective-C excepti

Re: NSStatusItem custom view with menu

2008-07-04 Thread Andy Kim
Another way to do this is to implement the NSMenu delegate methods: - menuWillOpen: - menuDidClose: You would then set the highlighted variable there. I think it'll make the code easier to read. You need to set the menu's delegate for this to work (obviously). - Andy Kim On Jul 3, 2008, a

Re: c++ exceptions in objective c call stack

2008-07-04 Thread Jim Crafton
I'm developing this on 10.5, Xcode 3.0. Is that considered the newer version, or is there an Xcode setting that I need to explicitly adjust for this? On Fri, Jul 4, 2008 at 3:45 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > In the 32 bit [legacy] Mac OS X runtime, C++ and Objective-C exceptions

Re: c++ exceptions in objective c call stack

2008-07-04 Thread Uli Kusterer
On 04.07.2008, at 22:03, Jim Crafton wrote: I'm developing this on 10.5, Xcode 3.0. Is that considered the newer version, or is there an Xcode setting that I need to explicitly adjust for this? 64-bit is the sticking point. If you build for 64-bit, they're unified, but Apple can't change

Re: c++ exceptions in objective c call stack

2008-07-04 Thread Jim Crafton
> 64-bit is the sticking point. If you build for 64-bit, they're unified, but > Apple can't change the 32-bit runtime on the Mac for compatibility reasons. > So the switch would be setting the architecture to 64-bit and removing the > 32-bit architecture. But of course then your app won't run on M

Re: garbage collection and NSConnection

2008-07-04 Thread Chris Hanson
On Jul 4, 2008, at 2:25 AM, Joan Lluch (casa) wrote: First, GC makes programs go slower not because of the overhead of the garbage collection itself, which I concede that may be comparable to the retain/release calls in a non-managed environment, but for the extra memory overhead that it is

Re: c++ exceptions in objective c call stack

2008-07-04 Thread Scott Ribe
> In the C++ code I throw an exception. Outside of this, several steps > down the stack frame, I have a C++ function that has a try catch You cannot throw C++ exceptions across Objective-C functions. If you want to catch this exception, you will have to catch it in drawRect, and decide there what

Re: Style Question (Robert Claeson)

2008-07-04 Thread Andreas Mayer
Am 04.07.2008 um 18:16 Uhr schrieb Gary L. Wade: For example, this kind of code just bugs me when I'm balancing braces back-and-forth: Well, I find *this* one preferable: #if WE_WANT_TO_ADD_THIS_FEATURE_IN_FINAL_BUILDS if (thisTestIsTrue && newFunctionalityIsAvailable) { #else if (thi

Re: garbage collection and NSConnection

2008-07-04 Thread Chris Hanson
On Jul 4, 2008, at 9:32 AM, Joan Lluch (casa) wrote: However, this is hardly possible with GC even if you trigger the GC manually in the middle of the loop. It simply will not release the memory at the rate you expect because it follows its own rules and as far as free memory is available i

NSTextFields & other input controls in CALayer

2008-07-04 Thread Aaron Wallis
I've been working in a little app which is laced with CA effects bit essentially is a simple list manager. There's a few NSTextField controls and other input controls in a view which flips, fades etc and it seems that there's a fundamental issue in my text fields are accepting mouse events (l

Re: How to keep a window always in foreground?

2008-07-04 Thread Greg
Sorry, suddenly it works, I think that during my attempts at "fixing" it I had some code running that would cause the setLevel code to be ineffective. It works now, simply setting the level does the trick. Just a note to anyone else experiencing problems with this, make sure that you don'

Re: How to keep a window always in foreground?

2008-07-04 Thread Greg
Oh! Actually, it was because the window was being run as modal. Make sure the window is not being run in a modal loop and it should work. - Greg On Jul 4, 2008, at 5:19 PM, Greg wrote: Sorry, suddenly it works, I think that during my attempts at "fixing" it I had some code running that wo

Re: How to implement Quartz GL ?

2008-07-04 Thread Colin Cornaby
QuartzGL is not currently available by default in OS X. You can turn it on with the Quartz Debug application. In addition, this message would probably be suited better for the Quartz discussion list. On Jul 4, 2008, at 10:42 AM, Mario Gajardo Tassara wrote: Hi to all, I am programming a

Re: How to keep a window always in foreground?

2008-07-04 Thread Gregory Weston
Greg wrote: On Jul 4, 2008, at 2:17 PM, Markus Spoettl wrote: I think what you are looking for is the window level: http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#/ /apple_ref/doc/uid/2013-BCICJDAF Hi, sorry, I

Re: NSStatusItem custom view with menu

2008-07-04 Thread Michael Ash
On Thu, Jul 3, 2008 at 8:46 PM, Jacob Bandes-Storch <[EMAIL PROTECTED]> wrote: > I'm making an NSStatusItem with a custom view. In drawRect:, it draws things > based on the value of the "highlighted" instance variable. When mouseDown: > is called, it pops up a menu using the status item's popUpStat

Re: NSURLConnection and buffering

2008-07-04 Thread Michael Ash
On Fri, Jul 4, 2008 at 4:34 AM, Arvind Jain <[EMAIL PROTECTED]> wrote: > I'm using NSURLConnection to download a web page which is served from a > server that uses HTTP 1.1 and chunked encoding. The web page consists of 2 > sections; the server sends the first section which is about 300 bytes > imm

Re: CoreAnimation synchronous animations

2008-07-04 Thread Scott Anguish
no. You'll need to set some sort of flag that prevents any other actions from happening for the period of time the animation takes. you an do this using a timer to 'shut off' the flag, or you can use explicit animations rather than implicit ones and then implement the delegate method that

Re: How to implement Quartz GL ?

2008-07-04 Thread David Duncan
On Jul 4, 2008, at 10:42 AM, Mario Gajardo Tassara wrote: Hi to all, I am programming a sort of game purely in Quartz 2D API, but i want to accelerate the blitting process with Quartz GL, but i can´t find any information in the developer docs. Anyone with experience in Quartz GL can help

Re: How to implement Quartz GL ?

2008-07-04 Thread Mario Gajardo Tassara
Thanks for the info David :) El 04-07-2008, a las 21:28, David Duncan escribió: On Jul 4, 2008, at 10:42 AM, Mario Gajardo Tassara wrote: Hi to all, I am programming a sort of game purely in Quartz 2D API, but i want to accelerate the blitting process with Quartz GL, but i can´t find an

Re: How to implement Quartz GL ?

2008-07-04 Thread David Duncan
On Jul 4, 2008, at 6:28 PM, David Duncan wrote: For all windows app wide (probably your situation) add the "QuartzGLEnable" key to your Info.plist (with boolean value true). For specific windows, call setPreferredBackingLocation: with the value NSWindowBackingLocationVideoMemory. See <> for m

Re: tracking area problems on 10.4.11

2008-07-04 Thread John C. Randolph
On Jul 2, 2008, at 11:21 AM, Wesley Smith wrote: I did that. my window and content view both have those methods defined. I've tried setting both of them to owner to no avail :( From Q&A #1355: Technical Q&A QA1355 Why aren't my tracking rects working? Q: I'm trying to implement tracking r

Re: IB3 and custom controls: problem with actions

2008-07-04 Thread Vitaly Ovchinnikov
Does anybody use custom controls? I just created new project with new NIB, added construction like @interface MyControl : NSControl {} @end Opened NIB, placed Custom View object to the window, changed its type to "MyControl", right clicked there and I didn't see "Sent Action" group. It doesn't look