Re: NSTextFieldCell editing text that is an attribute of the bound object - EVIL HACK

2009-01-31 Thread Luke Evans
The docs that do exist concerning the way to map arbitrary objects (such as ones that contain a 'name' attribute in my case) onto text cells have to do with NSFormatter. The latter is clearly how one converts 'simple' values from an object form to a stringified form and v.v. The problem with

Reverting Address Book changes

2009-01-31 Thread Andy Bettis
Hi, I'm writing an app that provides 'added value' to the Address Book database. I'm having a problem with allowing the user to Revert to the last saved state, if I discard my copies of the person and group records and reload them from the Address Book database all is well except that gro

[SOLVED] Re: NSTextFieldCell editing text that is an attribute of the bound object

2009-01-31 Thread Luke Evans
So, I really think there must be a 'proper' way to get the editor to pick up and return the value (name) I need editing from my cell's model object, but I'm still searching for the white magic, having dabbled in the darker sort. OK, I think I finally (mostly) grokked it. The NSCell sub

Can we render QCRenderer in CAOpenGLLayer..?

2009-01-31 Thread Anshul jain
I am trying to play QCComposition in CAOpenGLLayer According to the documentation of QCRenderer this should work fine. but at final output nothing is displayed. Can anyone tell me where i am going wrong...? but at final output nothing is displayed. Can anyone tell me where i am going wrong.

NSToolbar and constrolling visible items

2009-01-31 Thread Ferhat Ayaz
Hello, I have added - (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem to my code, which will control whether a toolbar item is enabled or not. However, I need a something similar to control whether a toolbar item is visible or not. How can I do this? Thank you, Ferhat __

-stringByEvaluatingJavaScriptFromString: return value iphone

2009-01-31 Thread Marco Cassinerio
Hi, i'm trying to execute a javascript function on the iPhone and get the return value. The function is simple: return "hello"; I'm using a UIWebView and the -stringByEvaluatingJavaScriptFromString: method but, while it works on os x, it doesn't on the iPhone. How can i solve? Thanks Ma

Re: Newbie Object Sharing Question

2009-01-31 Thread Brian Slick
On Jan 30, 2009, at 9:47 PM, Ken Thomases wrote: On Jan 30, 2009, at 2:46 PM, Brian Slick wrote: It starts to occur to me that I don't actually want an instance, I want the real deal. That statement is nonsensical. There is no "real deal". An instance is real. It's not some pale refl

Core Data relationship disappears

2009-01-31 Thread Ivan C Myrvold
I have an Entity named ServiceItem which have a relationship to another Entity named Transponder. I am creating the ServiceItem by looping through a text file, scanning for a service item pattern, and create the object with a newObject message to an NSArrayController. ServiceItem *serviceI

Re: Can we render QCRenderer in CAOpenGLLayer..?

2009-01-31 Thread Gordon Apple
Just curious - are you using garbage collection? We recently determined there is a bug in QCCompositionLayer with garbage collection that prevents the composition from playing. QCCompositionLayer is a subclass of CAOpenGLLayer. Maybe you hit the same bug? On 1/31/09 10:09 AM, "cocoa-dev-req

Re: Core Data, Garbage Collection and SQL Store

2009-01-31 Thread Kevin Ross
I've been trying in vain to reproduce this bug on my computer (c2duo) and my wife's computer (G4) to no avail. Also the output from - com.apple.CoreData.SQLDebug 1 doesn't seem unusual at all. Maybe I'll try some tests with using large photos and see it there's a significant slowdown when

Re: Disabling sorting in a programatically generated table

2009-01-31 Thread Keary Suska
On Jan 30, 2009, at 10:39 AM, Ken Tozier wrote: On Jan 30, 2009, at 10:52 AM, Keary Suska wrote: When you call -bind: do you pass NSCreatesSortDescriptorBindingOption NO? I'm not calling bind, because the array controller and array are created inside the same function, so it just seemed

Re: Newbie Object Sharing Question

2009-01-31 Thread Ken Thomases
On Jan 31, 2009, at 10:31 AM, Brian Slick wrote: And I believe that I do understand the difference between objects and pointers (I could be mistaken). The part I'm missing is what this needs to look like in code. I'm afraid I need some handholding here. If I knew what I needed to do in o

NSTextField when emptied sets bound ivar to nil?

2009-01-31 Thread Fritz Anderson
This may be something I should have noticed years ago, but I'm surprised. I'm checking it with the list to see if it's normal or something to worry about. I wasn't able to Google anything on-point. SDK is 10.4u, target 10.3, operating environment is 10.5.6. I have an NSTextField bound throug

Re: Newbie Object Sharing Question

2009-01-31 Thread Richard Somers
On Jan 30, 2009, at 12:46PM, Brian Slick wrote: It starts to occur to me that I don't actually want an instance, I want the real deal. On Jan 31, 2009, at 9:31AM, Brian Slick wrote: It may be a nonsensical statement here (good to know), but in the 3D CAD world that I'm used to, which I hav

How many processors?

2009-01-31 Thread jurincie
On Jan 30, 2009, at 8:31 PM, jurin...@eecs.utk.edu wrote: > I am developing a computationally intense application which I need to > multi-process to take advantage of the 8 cpu's on my new MacPro with > dual > quads. I am using Leopard 10.5 OS. >> Your machine has two CPU's, not eight. Really??

Re: How many processors?

2009-01-31 Thread Dave DeLong
Core != CPU. Your machine has 8 cores, but 2 CPUs (since it has 4 cores per CPU) Dave On Jan 31, 2009, at 1:19 PM, jurin...@eecs.utk.edu wrote: On Jan 30, 2009, at 8:31 PM, jurin...@eecs.utk.edu wrote: I am developing a computationally intense application which I need to multi-process to ta

Re: Disabling sorting in a programatically generated table [SOLVED]

2009-01-31 Thread Ken Tozier
On Jan 31, 2009, at 1:19 PM, Keary Suska wrote: You don't have a binding between the table view and the array controller? Yes, sorry, misread your post. I had been binding with "options: nil" but when I passed in an options dict with NSCreatesSortDescriptorBindingOption , it worked perfe

What alternatives exist for objc_setClassHandler?

2009-01-31 Thread Andrew Thompson
Hi all, I was looking for a way to define Objective-C classes at runtime... specifically to be able to supply class definitions when a Nib file is loaded. This search soon led me to objc_setClassHandler, but that's listed as deprecated without replacement here: http://developer.apple.com/d

New question about borken NSOperationQueue

2009-01-31 Thread jurincie
I have a computationally intensive modeling application which I NEED to multi-process, I am trying to avoid low level calls to pthread and tcb block. In order to get my GUI running I had to create a NSOperationQueue and run my big method via a NSInvocationOperation. Previous post indicates that

New NSZombie warning on CFRunLoopTimer

2009-01-31 Thread Fritz Anderson
SDK 10.4, target 10.3, environment 10.5.6 In the course of startup, my application creates one NSTimer and conducts one transaction through the Web Services Core framework (culminating in WSMethodInvocationScheduleWithRunLoop). NSZombieEnabled is YES. When the scheduled invocation returns

Re: -stringByEvaluatingJavaScriptFromString: return value iphone

2009-01-31 Thread Peter Blazejewicz
hi Marco, are you waiting for WebView to report load finished before calling javascript? e.g. see example snippet (loads Google api and calls it): #import @class UIWebView; @interface WebViewController : UIViewController {} @property (nonatomic, readonly) UIWebView *webView; @end #import "W

Flowing text between text fields

2009-01-31 Thread John Murphy
On many applications, when you enter in a serial number, there are several text fields in a row, and as the user enters in the serial number the cursor automatically jumps to the next text field at the appropriate time. I am assuming that this is a long string being displayed across several text

maximum theoretical speedup with dual quad processors

2009-01-31 Thread jurincie
I have a bullet-proof scientific app I developed using cocoa. I just purchased a new MacPro with the dual quad processors. Earlier posts attempting to determine MAXIMUM theoretical speedup have gotten bogged down with semantic differencea between a corea and a CPUa. Having done EXTENSIVE multi-p

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Josh Abernathy
At the risk of stating the obvious: it seems like your limiting factor in speedup will depend a lot more on your algorithm design than NSInvocationQueue, the number of cores/processors, etc. In other words, this isn't really an Apple-specific question. It's a matter of parallel algorithm de

Re: How many processors?

2009-01-31 Thread Michael Ash
On Sat, Jan 31, 2009 at 3:21 PM, Dave DeLong wrote: > Core != CPU. > > Your machine has 8 cores, but 2 CPUs (since it has 4 cores per CPU) This is one of those things that's true but mostly pointless. The question for which the answer is "2" here is really not a useful question. For nearly all pu

Re: -stringByEvaluatingJavaScriptFromString: return value iphone

2009-01-31 Thread Peter Blazejewicz
hi Marco, I'm not John Resig (http://ejohn.org/) but I would not assume that "return o" will actually evaluate to javascript object/function call, I would rather script: NSString *scriptCode = @"\"Hello\""; or: NSString *scriptCode = @"(function(){return \"hello\";})();"; but I would also fir

maximum speedup bound on multi-core processors

2009-01-31 Thread jurincie
Can anyone tell me if the maximum speedup using parallel programming on multicore processors is BOUNDED by: (A) number of processers (as on a single core processor). (B) number of processors X number cores / processor. If each processor runs numCore threads SIMULTANEOUSLY the answer would be (B)

Re: What alternatives exist for objc_setClassHandler?

2009-01-31 Thread Michael Ash
On Sat, Jan 31, 2009 at 3:36 PM, Andrew Thompson wrote: > Hi all, > > I was looking for a way to define Objective-C classes at runtime... > specifically to be able to supply class definitions when a Nib file is > loaded. This search soon led me to objc_setClassHandler, but that's listed > as depr

Re: New NSZombie warning on CFRunLoopTimer

2009-01-31 Thread Michael Ash
On Sat, Jan 31, 2009 at 3:45 PM, Fritz Anderson wrote: > SDK 10.4, target 10.3, environment 10.5.6 > > In the course of startup, my application creates one NSTimer and conducts > one transaction through the Web Services Core framework (culminating in > WSMethodInvocationScheduleWithRunLoop). > > N

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Michael Ash
On Sat, Jan 31, 2009 at 5:04 PM, wrote: > I have a bullet-proof scientific app I developed using cocoa. I just > purchased a new MacPro with the dual quad processors. > > Earlier posts attempting to determine MAXIMUM theoretical speedup have > gotten bogged down with semantic differencea between

Re: Flowing text between text fields

2009-01-31 Thread Fritz Anderson
On 31 Jan 2009, at 3:19 PM, John Murphy wrote: On many applications, when you enter in a serial number, there are several text fields in a row, and as the user enters in the serial number the cursor automatically jumps to the next text field at the appropriate time. I am assuming that this

Re: maximum speedup bound on multi-core processors

2009-01-31 Thread Bill Bumgarner
On Jan 31, 2009, at 2:48 PM, jurin...@eecs.utk.edu wrote: Can anyone tell me if the maximum speedup using parallel programming on multicore processors is BOUNDED by: (A) number of processers (as on a single core processor). (B) number of processors X number cores / processor. If each process

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Chris Hanson
On Jan 31, 2009, at 2:04 PM, jurin...@eecs.utk.edu wrote: There IS a know bug with the NSInvocationQueue method on intels using 10.5.6 which I have read will be fixed on 10.6. Please do not say things like this without citing a specific source. Otherwise you are spreading rumors. In gener

elementary CAAnimationGroup question

2009-01-31 Thread Matt Neuburg
Just as an experiment, learning about Core Animation, I tried using the implicit animator proxy to make a picture (an image well, "iw") drop and tumble to the bottom of the window. So I want it to move ("frameOrigin") and turn over ("frameRotation") simultaneously. To do that, I tried making an ani

Re: What alternatives exist for objc_setClassHandler?

2009-01-31 Thread Andrew Thompson
Thanks... I think I'm with you... kinda of. So, let's say for the sake of argument I have some NSView subclass implemented in Java: MyView. In interface builder I drag in a custom view and I set its type to MyView by typing in the name of this class, which doesn't exist as an Objective C cl

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Andrew Farmer
On 31 Jan 09, at 15:11, Chris Hanson wrote: On Jan 31, 2009, at 2:04 PM, jurin...@eecs.utk.edu wrote: There IS a know bug with the NSInvocationQueue method on intels using 10.5.6 which I have read will be fixed on 10.6. Please do not say things like this without citing a specific source. Ot

Re: Cocoa-dev Digest, Vol 6, Issue 183

2009-01-31 Thread Frederick Bartram
On Jan 31, 2009, at 5:57 PM, cocoa-dev-requ...@lists.apple.com wrote: Can anyone tell me if the maximum speedup using parallel programming on multicore processors is BOUNDED by: (A) number of processers (as on a single core processor). (B) number of processors X number cores / processor. I

Re: NSToolbar and constrolling visible items

2009-01-31 Thread Jerry Krinock
On 2009 Jan 31, at 8:07, Ferhat Ayaz wrote: I need ... to control whether a toolbar item is visible or not. How can I do this? I don't think you can do that, and it might look kind of weird. Use -[NSToolbar -removeItemAtIndex:] to remove the item. Retain it if desired and then later use

Re: Core Data relationship disappears

2009-01-31 Thread Jerry Krinock
On 2009 Jan 31, at 8:33, Ivan C Myrvold wrote: But later on, the transponder relationship have been set to nil, and I don't know why. There is probably something missing in my core data code. Or, something that should not be in your code that is in your code Do anyone know what I am miss

Anyone actually used OpenMP with cocoa on leopard 10.5?

2009-01-31 Thread jurincie
I am attempting to multi-process an cocoa application I developed last year. I have a MacPro with dual-quads, using xcode 3.1. Trying to use openMP to concurrently run a loop via the "#pragma omp for" command (yes I have taken care of ALL necessary setup to ensure entire loop can be run concurren

Re: How to draw text with fade out effect?

2009-01-31 Thread Ken Ferry
All else aside, yes you can do this in Cocoa and/or Quartz. Here are a couple different ways. For instruction's sake, here's it done with a compositing operation, NSCompositeDestinationIn. Result color = what's already in the context but with additional alpha taken from the new drawing. - (void)

Re: Rating-style LevelIndicator not showing dots

2009-01-31 Thread Jeffrey J . Early
The dots show in the cell's "highlighted" state. If you send, [cell setHighlighted: YES]; then you'll get dots... until it gets clicked on, then it automatically un-highlights itself. The solution is thus to subclass NSLevelIndicatorCell and override isHighlighted to always return YE

Re: Flowing text between text fields

2009-01-31 Thread Sean McBride
John Murphy (johncmurp...@yahoo.com) on 2009-01-31 4:19 PM said: >On many applications, when you enter in a serial number, there are >several text fields in a row, and as the user enters in the serial >number the cursor automatically jumps to the next text field at the >appropriate time. >I am ass

NSTextField with an date formatting

2009-01-31 Thread minapre999
I have an NSTextField that is bound to a date in a Core Data program. The text field has an NSDateFormatter attached to it. All connections are set up using IB. The odd thing is that the user needs to enter the date into the text field twice for the text field to correctly update to t

Using NSAppleScript With AXMakeProcessTrusted -- and/or, How To Indirectly Launch A Secure Agent

2009-01-31 Thread Tobias Zimmerman
I have a somewhat complex problem I am hoping the list can help me with. Ultimately, what I am trying to do is grant my application rights to use the Accessibility API without forcing users to turn on ³Enable access for assistive devices². My application uses AppleScripts (primarily calling System

[Announce] DropKit 1.0 Obj-C library

2009-01-31 Thread Chris Patterson
Hello Cocoa developers! This is my formal announcement of the release of version 1.0 of my Objective-C library wrapper around the Drop.io API, which I have dubbed "DropKit". Drop.io is an easy to use, online file sharing service that provides users with a simple and private way to share i

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Robert Marini
Easily reproduced doesn't always translate into guaranteed to occur. In my experience, using a single queue in your application is a sufficient safeguard as no system framework I've encountered causes an issue. That isn't to say that the API is without quirks but they can usually be adjus

Re: Anyone actually used OpenMP with cocoa on leopard 10.5?

2009-01-31 Thread Robert Marini
Are you compiling with the -fopenmp flag? -rob. On Jan 31, 2009, at 8:30 PM, jurin...@eecs.utk.edu wrote: I am attempting to multi-process an cocoa application I developed last year. I have a MacPro with dual-quads, using xcode 3.1. Trying to use openMP to concurrently run a loop via the "#p

[MEET] CocoaHeads Mac Developer Meetings

2009-01-31 Thread Stephen Zyszkiewicz
Greetings, CocoaHeads is an international Mac programmer's group. Meetings are free and open to the public. We specialize in Cocoa, but everything Mac programming related is welcome. Upcoming meetings: Canada Ottawa/Gatineau- Thursday, December 11, 2008 19:00. Germany Aachen- Thursday, Feb

Re: What alternatives exist for objc_setClassHandler?

2009-01-31 Thread Michael Ash
On Sat, Jan 31, 2009 at 6:33 PM, Andrew Thompson wrote: > Thanks... I think I'm with you... kinda of. > > So, let's say for the sake of argument I have some NSView subclass > implemented in Java: MyView. > In interface builder I drag in a custom view and I set its type to MyView by > typing in the

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Michael Ash
On Sat, Jan 31, 2009 at 10:15 PM, Robert Marini wrote: > Easily reproduced doesn't always translate into guaranteed to occur. In my > experience, using a single queue in your application is a sufficient > safeguard as no system framework I've encountered causes an issue. That > isn't to say that

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Andrew Farmer
On 31 Jan 09, at 19:15, Robert Marini wrote: Easily reproduced doesn't always translate into guaranteed to occur. In my experience, using a single queue in your application is a sufficient safeguard as no system framework I've encountered causes an issue. That isn't to say that the API is

Drawing Invalidation Question

2009-01-31 Thread Seth Willits
When inside of -[NSView drawRect:], what's the difference between - (void)drawRect:(NSRect)rect; { if ([self needsToDrawRect:someRect]) } ... and ... - (void)drawRect:(NSRect)rect; { if (NSIntersectsRect(rect, someRect)) } ... ? AFAICT from the

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Michael Vannorsdel
If your original algorithm is scalar, you can get upto 4x increase by moving to SIMD (SSE2/3) if your algorithms can be paralleled. Add that to the 7 extra cores and you can get upto 32x speed up. In the real world you're very (very) unlikely to reach max throughput because of data depend

+[NSColor highlightColor] returns white instead of actual color

2009-01-31 Thread Jerry Krinock
I'm overriding -[NSTableView highlightSelectionInClipRect:] because I don't want all the columns of the selected row to be highlighted. Works fine except +[NSColor highlightColor] returns white instead of actual highlight color I have set in System Preferences > Appearance, which is green.

Re: +[NSColor highlightColor] returns white instead of actual color

2009-01-31 Thread Stephen J. Butler
On Sun, Feb 1, 2009 at 1:11 AM, Jerry Krinock wrote: > I'm overriding -[NSTableView highlightSelectionInClipRect:] because I don't > want all the columns of the selected row to be highlighted. Works fine > except +[NSColor highlightColor] returns white instead of actual highlight > color I have s