NSPredicateEditorRowTemplate

2008-06-24 Thread Chris
I've got a NSPredicateEditor and I'm inheriting from NSPredicateEditorRowTemplate to make a custom template. It implements copyWithZone as the doco seems to imply I should. In Interface builder I have a number of standard row templates, and I've added my custom one at the end by setting the class

Re: unexpected nil outlet

2008-06-24 Thread David Reynolds
On 23 Jun 2008, at 1:32 am, William Squires wrote: Assuming you've followed the RaiseMan example up to that point, and have IB open, select the 1st column of the NSTableView (in MyDocument.nib - or .xib, depending on your Xcode version), and examine its properties with the inspector

Re: CoreData pagination

2008-06-24 Thread Ian
Here are my findings thanks to the great advice to all those that answered. First and foremost - I was testing on an elderly G5 iMac, so fetching ~million objects was taking 4 minutes. I think this is definitely down to paging the VM as someone suggested. Here on my main machine (8 cores,

Allocating outlets from NIB file

2008-06-24 Thread Joseph Ayers
I am quite confounded with regard to how/when to allocate outlets which are classes existing as instances in another class. Consider @interface SpriteController : NSWindowController { IBOutlet SpriteView* spriteView; IBOutlet NSWindow* spriteWindow; } SpriteController*

Re: Allocating outlets from NIB file

2008-06-24 Thread Johan Kool
You do not allocate outlets. Outlets point to instances in your nib. These instances are instantiated(/allocated) when the nib is loaded. You usually set the File's Owner to be a your own subclass of NSWindowController. Next control-drag from the File's Owner icon to the window and the

Re: Allocating outlets from NIB file

2008-06-24 Thread Chris
Hi, You should not be allocating either SpriteView or SpriteController if they are referred to in the NIB. (which is the normal case). Instead you go to the File's Owner object in interface builder, and go to the Identity tab, and set the Class to be whatever class contains your loadNib

Seconds since system startup

2008-06-24 Thread Stefan Hafeneger
Hi, I'm looking for a Cocoa function like GetCurrentEventTime() for Carbon to get the interval since system startup. Any ideas? With best wishes, Stefan smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list

Re: Allocating outlets from NIB file

2008-06-24 Thread Andy Lee
On Jun 24, 2008, at 8:17 AM, Joseph Ayers wrote: SpriteController and SpriteView are defined and connected in the NIB Your nib shouldn't contain a SpriteController instance. Instead, it should set the class of File's Owner to SpriteController and make the outlet connection from File's

Re: Seconds since system startup

2008-06-24 Thread Chris
Do a man 3 sysctl in the terminal and look for KERN_BOOTTIME On 24/06/2008, at 10:51 PM, Stefan Hafeneger wrote: Hi, I'm looking for a Cocoa function like GetCurrentEventTime() for Carbon to get the interval since system startup. Any ideas? With best wishes,

Re: NSPredicateEditorRowTemplate

2008-06-24 Thread Jim Turner
On Tue, Jun 24, 2008 at 2:02 AM, Chris [EMAIL PROTECTED] wrote: When the user clicks ok, then I call objectValue on the NSPredicateEditor and it calls predicateWithSubpredicates not on object C, but on object B, which is always going to be blank, because it is in fact object C which is the one

Re: Seconds since system startup

2008-06-24 Thread Jean-Daniel Dupas
Wow, that one of the more complexe way i see to retreive it. The former equivalent of GetCurrentEventTime() is -[NSEvent timestamp]. But if you need the uptime without using an event, you can use mach_absolute_time() or UpTime() (from the CoreServices framework). Le 24 juin 08 à 15:00,

Re: Seconds since system startup

2008-06-24 Thread Jean-Daniel Dupas
Sorry, it look easy with sysctl too. That just that I had some bad experiences with sysctl to retreive some poorely documented values and structs. Le 24 juin 08 à 15:07, Jean-Daniel Dupas a écrit : Wow, that one of the more complexe way i see to retreive it. The former equivalent of

NSSegmentedControl segment bindings

2008-06-24 Thread Hamish Allan
Hi, As far as I can tell, the enabled state of specific segments of an NSSegmentedControl (which you can set / get through setEnabled:forSegment: / -isEnabledForSegment:) are not accessible through bindings. This surprises me, so I thought I'd ask here in case I'm missing something? Thanks,

Core Data, abstract Entity problem

2008-06-24 Thread Alain Schartz
Dear List. I could need some help with a Core Data related problem I am experiencing, and I am not entirely sure I understand everything Cocoa does behind my back. In more detail : I created a Core Data document based project from scratch. The Core Data model consists of an abstract TreeNode

Re: NSPredicateEditorRowTemplate

2008-06-24 Thread Chris
Hi! This is very interesting information. Wish it was in the doco! I have a custom view which wasn't responding to setObjectValue / objectValue. When I add those methods I find that on startup it does indeed copy the values from object C to object B. This means that when I retrieve the

Re: Learning SQLite by watching Core Data?

2008-06-24 Thread Allen Cronce
Hi David, We're also developing an SQLite3-based database application. Unfortunately we can't use Core Data because we're building a cross platform product. But we wanted to use Xcode's data modeler tool to design a fairly complex database model. To help us implement our application,

Re: PDFKit guidance

2008-06-24 Thread Adam R. Maxwell
On Jun 23, 2008, at 3:01 PM, John Calhoun wrote: On Jun 21, 2008, at 6:34 PM, Adam R. Maxwell wrote: I appreciated Antonio's (and your) reminder :). If I understand correctly, the OP could create a PDF context with kCGPDFXDestinationOutputProfile set to a grayscale profile QuartzFilters

Re: NSPredicateEditorRowTemplate

2008-06-24 Thread Jim Turner
On Tue, Jun 24, 2008 at 8:46 AM, Chris [EMAIL PROTECTED] wrote: Hi! This is very interesting information. Wish it was in the doco! I have a custom view which wasn't responding to setObjectValue / objectValue. When I add those methods I find that on startup it does indeed copy the values

Re: NSSegmentedControl segment bindings

2008-06-24 Thread Ron Lue-Sang
Hey Hamish. Yea, that's correct. There's no segment object to bind. Not in the same way that tableviews have individual column objects or menus have individual menu items. Still, go ahead and file an enhancement request describing, broadly, what you're trying to do.

Re: Cocoa Text System: How to determine the caret position?

2008-06-24 Thread Douglas Davidson
On Jun 23, 2008, at 7:30 PM, Graham Cox wrote: Yes, fair enough the problem is more complicated than I realised - I guess I assumed that insertion points were always in between glyphs but of course with ligatures etc. that isn't the case. Going back to the OP's original reason for this,

Re: question on layer setup in Covertflow sample code

2008-06-24 Thread Scott Anguish
first, please don't crosspost between cocoadev and quartz-dev the reflection is a sublayer of the image so that it will move the same. rotate the layer with the image in it, the reflection also rotates. the reflection layer uses additional Core Animation features to display only parts

Re: How to prevent NSControl from graying out when sent to background?

2008-06-24 Thread j o a r
On Jun 24, 2008, at 9:28 AM, Greg wrote: Hi, I'm making little notification windows that contain some NSControls in them, one particular one is the NSProgressIndicator (as a bar). These windows are similar to the default growl windows, and so appear above all other windows and appear

Re: How to prevent NSControl from graying out when sent to background?

2008-06-24 Thread Greg
Thanks a bunch!! :-) - Greg On Jun 24, 2008, at 12:32 PM, j o a r wrote: On Jun 24, 2008, at 9:28 AM, Greg wrote: Hi, I'm making little notification windows that contain some NSControls in them, one particular one is the NSProgressIndicator (as a bar). These windows are similar to the

[SOLVED] Re: Core Data, abstract Entity problem

2008-06-24 Thread Alain Schartz
Here's where you're mistaken. Only one *instance* is created: A 'TreeGroup' instance (which is a kind of TreeNode). The reason it's only showing up in one place reliably is because the add: message is being sent to *one* controller. Your other controller may not have been informed that it needs

wrapping multiple IBOutlet objects for reuse

2008-06-24 Thread Paul Archibald
Is there a way to use class objects that wrap multiple IBOutlet objects? The app I am working on has groups of interface elements that are repeated on the interface and in the code. Let me see if I can illustrate what I mean: The window looks (slightly) like this: (button_set_src_1) (add)

CFSocket and wifi

2008-06-24 Thread sheen mac
Hi All, I am working on a server-client application for live video broadcast using CFSocket.Its working good in LAN connection.But when I changed it into wifi network .It gets blocked after a few seconds. Kindly help me. Thanks In Advance, Sheen Code === // create socket

Re: CFSocket and wifi

2008-06-24 Thread Jens Alfke
On 24 Jun '08, at 11:27 AM, sheen mac wrote: I am working on a server-client application for live video broadcast using CFSocket.Its working good in LAN connection.But when I changed it into wifi network .It gets blocked after a few seconds. There's nothing fundamentally different.

SetControlReference equivalent in NSControl?

2008-06-24 Thread jeffs87
Hi, In Carbon you can tie a 32 bit value to a control with SetControlReference. Is there an equivalent method in NSControl? I looked around in the header files but couldn't find anything (NSControl, NSView, NSResponder, NSObject). thanks Jeff

Re: SetControlReference equivalent in NSControl?

2008-06-24 Thread Kyle Sluder
On Tue, Jun 24, 2008 at 2:53 PM, [EMAIL PROTECTED] wrote: In Carbon you can tie a 32 bit value to a control with SetControlReference. Is there an equivalent method in NSControl? I looked around in the header files but couldn't find anything (NSControl, NSView, NSResponder, NSObject). What

Sourcelist background colors

2008-06-24 Thread Markus Spoettl
Hello List, is there a way to get the background color of an NSOutlineView when in sourcelist mode (for both key and non-ket state)? NSColor doesn't seem to define the color. If not, is there a way to derive the color somehow, by blending or highlighting with another system defined

Re: Sourcelist background colors

2008-06-24 Thread Dave DeLong
Sourcelist active background color: RGB(214, 221, 229) (#d6dde5) Sourcelist inactive background color: RGB(232, 232, 232) (#e8e8e8) I got this by taking two screenshots and using the color palette's magnifying glass. This is what you're looking for, right? HTH, Dave On Tue, Jun 24, 2008 at

Re: Sourcelist background colors

2008-06-24 Thread Markus Spoettl
On Jun 24, 2008, at 1:13 PM, Dave DeLong wrote: Sourcelist active background color: RGB(214, 221, 229) (#d6dde5) Sourcelist inactive background color: RGB(232, 232, 232) (#e8e8e8) I got this by taking two screenshots and using the color palette's magnifying glass. This is what you're

Re: wrapping multiple IBOutlet objects for reuse

2008-06-24 Thread Keary Suska
6/24/08 12:21 PM, also sprach [EMAIL PROTECTED]: Is there a way to use class objects that wrap multiple IBOutlet objects? The app I am working on has groups of interface elements that are repeated on the interface and in the code. Let me see if I can illustrate what I mean: The window

Custom Drag and Drop Cell for NSTableView

2008-06-24 Thread Thomas Bartelmess
Hello everyone! I would like to create an own NSCell for a NSTableView. This cell should be dragable and I would like to draw the content of the Cell by my self (But it's text only). I would like to work with the cell in Interface Builder. Could somebody help me to do that? Thanks a lot

Re: Custom Drag and Drop Cell for NSTableView

2008-06-24 Thread I. Savant
I would like to create an own NSCell for a NSTableView. http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/ControlCell.html This cell should be dragable and I would like to draw the content of the Cell by my self (But it's text only). What do you mean by draggable? You

Re: wrapping multiple IBOutlet objects for reuse

2008-06-24 Thread Markus Spoettl
On Jun 24, 2008, at 1:36 PM, Keary Suska wrote: I would have each row of controls as a vanilla NSView in a separate nib. Your controller class, which would be the nib owner, could manage each set of controls. You'll need to familiarize yourself with nib loading (particularly NSNib's methods)

Re: PDFKit guidance

2008-06-24 Thread John Calhoun
On Jun 24, 2008, at 7:15 AM, Adam R. Maxwell wrote: On Jun 23, 2008, at 3:01 PM, John Calhoun wrote: You can then either apply it to a context (in your PDFPage subclass) with: - (BOOL) applyToContext:(CGContextRef) aContext; Or better still, pass it in the options dictionary to one of

Core Animation: Disabling Implicit Animations

2008-06-24 Thread Wil Gieseler
Hello, a (hopefully) quick question. I have a view which I would like to use some Core Animation transitions on, so I've set it to [theContentView setWantsLayer:YES]. However, this causes all of its subviews to automatically gain fade transitions (which is the expected behavior). However,

Re: SetControlReference equivalent in NSControl?

2008-06-24 Thread Graham Cox
Bear in mind that the typical purpose of a ControlRef in Carbon is to keep track of an associated wrapper object (or other extended data). In Cocoa, NSControl already is that object. The way to extend an object is to subclass it and add whatever ivars you need. So there would appear to be

Leak in NSSavePanel

2008-06-24 Thread Jelle Vandebeeck
When I try to call the NSSavePanel, I always receive some memory leaks on it. I have no idea if they are bad or not so bad... I just can't find a decent tutorial on the Instruments tool. This is the code that generates the memory leak from time to time: NSSavePanel *savePanel = [NSSavePanel

Re: Creating Installer Package from Cocoa

2008-06-24 Thread Thomas Bartelmess
Hi Ryan, i have not unterstand your question completely. Do you what to create a Installer pkg on the fly by code or do you what to create a InstallerPackage with some custom pages and settings. Both is possible. I would like to help you Thomas Am 24.06.2008 um 01:17 schrieb Ryan Harter:

Re: Leak in NSSavePanel

2008-06-24 Thread Kyle Sluder
On Tue, Jun 24, 2008 at 6:55 PM, Jelle Vandebeeck [EMAIL PROTECTED] wrote: It's the [NSSavePanel savePanel that gets the leak... I know the NSSavePanel is a singleton, so it should always use the same instance. Is that the problem when I try to call it multiple times in my application?

Re: Core Animation: Disabling Implicit Animations

2008-06-24 Thread Scott Anguish
at the core animation level... three options 1: disable actions in a explicit transaction and do everything inside that transaction http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Transactions.html#/ /apple_ref/doc/uid/TP40006096-SW9 or

Re: Core Animation: Disabling Implicit Animations

2008-06-24 Thread Shripada Hebbar
All default (implicit) animations are returned in the method: +(id)defaultAnimationForKey:(NSString*)key You can simply override this and just return nil. This would mute out all implicit animations. And if you want specific animations, you can set them into the animations dictionary of

Re: Newbie question: instantiate a class in its header file OR in IB

2008-06-24 Thread Andrew Farmer
On 24 Jun 08, at 20:34, JArod Wen wrote: I am a cocoa newbie from Java. Recently I found an example code in which the instance of a class is defined in its own class's header file, as following: @interface AppController : NSObject { // Instance variables here }

Re: Newbie question: instantiate a class in its header file OR in IB

2008-06-24 Thread Jens Alfke
On 24 Jun '08, at 8:34 PM, JArod Wen wrote: I am a cocoa newbie from Java. Recently I found an example code in which the instance of a class is defined in its own class's header file, as following: @interface AppController : NSObject { // Instance variables here } AppController