Re: Core Data/IB questions

2008-03-26 Thread Adam Gerson
I think that internally when you create a to-many core-data relationship the group of objects is stored as an NSSet as opposed to an array. http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSSet_Class/Reference/Reference.html http://developer.apple.com/documentation/Co

Re: Writing a preference pane that configures hotkeys?

2008-03-26 Thread Brian Kendall
It doesn't look like NDHotKeyControl implements a setReadyForHotKeyEvent: method. Do I perhaps have an older version of the NDHotKeyControl source code? Surely there is something I'm missing here. I figure I can take your word for it on this, since you wrote the class and all. ;-) - Br

Re: Core Data/IB questions

2008-03-26 Thread Rick Mann
On Mar 26, 2008, at 11:06 PM, Adam Gerson wrote: Each table should have its own ArrayController if the two tables represent the data from two different entities. Since you entities are related I am assuming one entity has a property that is a to-many relationship to the other entity. Set the Con

Re: Core Data/IB questions

2008-03-26 Thread Adam Gerson
On Wed, Mar 26, 2008 at 10:31 PM, Rick Mann <[EMAIL PROTECTED]> wrote: > Question 2: I can see how a text field gets populated when you select > an item in the table. How can I get a one table to populate based on > the selection in another? > Each table should have its own ArrayController if th

Re: Getting a list of all classes, etc...

2008-03-26 Thread Graham Cox
This worked well (after a little tweaking!) thanks - got the whole caboodle running now. I note that NSObject's superclass is NULL, so I had to switch the order of the while() test in order to correctly detect plain NSObjects (admittedly this will probably never be needed in practice). He

Re: Getting a list of all classes, etc...

2008-03-26 Thread Sherm Pendley
On Thu, Mar 27, 2008 at 12:43 AM, Graham Cox <[EMAIL PROTECTED]> wrote: I have a class that can contain different objects which all derive > from a class R. The container can accept instances of any subclass of R. > > Each subclass of R implements a CLASS method for a particular feature, > returni

Re: Core Data & Sheet problem

2008-03-26 Thread mmalc crawford
On Mar 26, 2008, at 9:55 PM, William Turner wrote: You might want to look at the commitEditing method for the NSController subclasses - this pushes any pending changes to the underlying model. In your case, you would probably invoke that on the tree controller that provides your outline vie

Re: Getting a list of all classes, etc...

2008-03-26 Thread Sherm Pendley
On Thu, Mar 27, 2008 at 12:01 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > What's the correct file to include to obtain these functions? I > thought it would come along with , but I'm > getting the following: > > : error: implicit declaration of function 'objc_getClassList' You might not need bot

Re: Core Data & Sheet problem

2008-03-26 Thread William Turner
You might want to look at the commitEditing method for the NSController subclasses - this pushes any pending changes to the underlying model. In your case, you would probably invoke that on the tree controller that provides your outline view content right before ordering the sheet out. Wi

Re: uncaught breakpoint

2008-03-26 Thread Roland Silver
Here's a bit of the code. Ssignal - double t = getTime(); double dt = 1.0/inSampleRate; // mNumberBuffers is the same as the kNumChannels UInt32 frame; StereoSignal ssignal; //a StereoSignal is a struct with two fields (doubles), left and right for (frame = 0

Re: Getting a list of all classes, etc...

2008-03-26 Thread Graham Cox
Thanks, that was it (docs not explicit on this point, saying the file is called "runtime.h" or "/usr/include/objc/runtime.h"). I guess something changed since it was written. --- However, having got it compiling, I think it's a blind alley anyway. Maybe if I can explain WHY I'm trying

Re: Getting a list of all classes, etc...

2008-03-26 Thread Graham Cox
I should also mention I need something that will work on 10.4+ - looking at the latest docs I'm wondering if this function is 10.5 only, though it does not say so. -- S.O.S. On 27 Mar 2008, at 3:01 pm, Graham Cox wrote: What's the correct file to include to obtain these functions? I t

Re: Getting a list of all classes, etc...

2008-03-26 Thread Graham Cox
What's the correct file to include to obtain these functions? I thought it would come along with , but I'm getting the following: : error: implicit declaration of function 'objc_getClassList' Also, I'm trying to heed the warning in the docs that state: "You cannot assume that class objects

Re: Streaming Images between Cocoa Touch and Pure Java

2008-03-26 Thread Andrew Farmer
On 26 Mar 08, at 20:51, Liviu Constantinescu wrote: I'm a bit new to Cocoa Touch programming, and I haven't done any work with Cocoa for a while, so I would like some advice regarding the right API objects, etc. to use, if anyone is able to help: If I want to transmit a JPEG between a Java a

Streaming Images between Cocoa Touch and Pure Java

2008-03-26 Thread Liviu Constantinescu
Good afternoon, everyone. I'm a bit new to Cocoa Touch programming, and I haven't done any work with Cocoa for a while, so I would like some advice regarding the right API objects, etc. to use, if anyone is able to help: If I want to transmit a JPEG between a Java application using a Buff

Re: uncaught breakpoint

2008-03-26 Thread Dave Hersey
Could be a lot of things. Do any of your breakpoints work? Some things that might help are to make sure you're debug format is set to DWARF in the target build prefs and "Load symbols lazily" is off in the Xcode Debugging prefs. And of course that you're running a debug build... - d On M

uncaught breakpoint

2008-03-26 Thread Roland Silver
I have a breakpoint set for the statement after an NSLog statement. When I run the program under debugging, the NLog statement is executed, but the program doesn't stop at the breakpoint. How come? Roland Silver [EMAIL PROTECTED] ___ Cocoa-dev

Core Data/IB questions

2008-03-26 Thread Rick Mann
I'm following the NSPersistentDocument Core Data tutorial, but changing things for my little app along the way. For example, instead of Employees and Departments, I have TrackPoints and Tracks (GPS tracks). After following a portion of the tutorial, I got a nice little master/ detail view,

Re: Getting a list of all classes, etc...

2008-03-26 Thread Sherm Pendley
On Wed, Mar 26, 2008 at 10:01 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > Is there a way to obtain from the runtime a list of all classes that > are subclasses of a given class, or failing that, a list of all > classes that I can iterate and test with isKindOfClass:? Here's the function I use in

CoreAnimation weird problems with NSView animator

2008-03-26 Thread Milen Dzhumerov
Hi all, I've been playing with CA today and encountered some weird problems. Firstly, I tested setHidden: on an animator on a NSSegmentedView and it worked fine - it gets faded in/out. Now, all the problems I encountered happen in another NIB file. I've got the following piece of code (in

Getting a list of all classes, etc...

2008-03-26 Thread Graham Cox
Is there a way to obtain from the runtime a list of all classes that are subclasses of a given class, or failing that, a list of all classes that I can iterate and test with isKindOfClass:? -- S.O.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.

NSLayoutManager & Non-Contiguous Layout

2008-03-26 Thread Jonathan Dann
Hi Guys, I'm using non-contiguous layout in one of my text views and I keep getting this strange drawing error when I scroll quickly just after the document has loaded: http://flickr.com/photos/jonathandann/2364567591/ I have a method that highlights syntax by getting the visible charact

Re: Leopard on PPC

2008-03-26 Thread Sherm Pendley
On Wed, Mar 26, 2008 at 7:04 PM, Lorenzo <[EMAIL PROTECTED]> wrote: > Hi Laurent, > I am going to debug and let you know. Right now I have found these lines. > Might they cause the trouble on Leopard && PPC? > >number = CFNumberCreate(NULL, kCFNumberFloatType, &destSize.width); >options =

Is it possible to change color of NSBox Title?

2008-03-26 Thread Samvel
Hello, I have created a NSPanel in Interface Builder and added NSBox. It looks nice except NSBox Title written in black color on dark background of NSPanel. Is it possible to change color either in Interface Builder or with code (say in awakeFromNib)? Thanks. _

Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9

2008-03-26 Thread Jerry Krinock
I found a workaround. First, I'll answer Greg's questions On 2008 Mar, 25, at 22:39, Greg Parker wrote: Don't add +initialize in a category. The category's method will replace any present in the original class, which could break that class. Agreed. As I said, I just wanted to "apply

Re: Leopard on PPC

2008-03-26 Thread Lorenzo
Hi Laurent, I am going to debug and let you know. Right now I have found these lines. Might they cause the trouble on Leopard && PPC? number = CFNumberCreate(NULL, kCFNumberFloatType, &destSize.width); options = [NSDictionary dictionaryWithObjectsAndKeys: (id) kCFBooleanTrue,

Re: Changing the line height of an NSTextField?

2008-03-26 Thread Nicholas J Humfrey
On 26 Mar 2008, at 22:17, Douglas Davidson wrote: On Mar 26, 2008, at 3:10 PM, Nicholas J Humfrey wrote: In the end I subclased the NSTextField class and overrid the drawRect function. I then split the string up into its lines and drew them myself using drawRect. This is some of the first

NSPersistentDocument Revert Question

2008-03-26 Thread Mike Burns
Hello list, I'm having trouble tracking down what I would think to be a simple answer for a simple question: In my NSPersistentDocument based application (10.4), selecting 'revert' from the file menu creates new window controllers (I assume it is just re-opening the original document), bu

Re: Changing the line height of an NSTextField?

2008-03-26 Thread Douglas Davidson
On Mar 26, 2008, at 3:10 PM, Nicholas J Humfrey wrote: In the end I subclased the NSTextField class and overrid the drawRect function. I then split the string up into its lines and drew them myself using drawRect. This is some of the first Cocoa code I have written, so please don't hurt me

Re: Changing the line height of an NSTextField?

2008-03-26 Thread Nicholas J Humfrey
Ah, interesting, thanks for this tip. As a note for anyone else who wants to try and do this: In the end I subclased the NSTextField class and overrid the drawRect function. I then split the string up into its lines and drew them myself using drawRect. This is some of the first Cocoa code I

Re: Ephemeral Changes

2008-03-26 Thread Graham Cox
The undo manager will directly change the data in the text view using an invocation or target/action - it doesn't go back through changeFont: normally, which is really a "high level" method. Maybe the solution to this is to subclass NSUndoManager so that you can hook into the undo and redo

How to get current renderer for an NSOpenGLView?

2008-03-26 Thread Duncan Champney
I need to find out the amount of total VRAM and available VRAM in the current renderer before creating a large renderbuffer object, to make sure I don't choke the system in doing it. I know how to find the current renderer for a given display, but I want the current renderer for my NSOpenGL

Re: Windows networking API

2008-03-26 Thread Kyle Sluder
On Tue, Mar 25, 2008 at 11:41 AM, Robert Claeson <[EMAIL PROTECTED]> wrote: > Is there an API/framework to interface with the SMB/Samba/Windows > networking functionality of OS X? Just to clarify for posterity, these are two separate topics. SMB (aka CIFS), of which Samba is an implementation, i

Re: NSMatrix

2008-03-26 Thread Dave Hersey
Hi Erik, NSCollectionView is great if you have it, but if you're still coding for pre-10.5 it doesn't help. What is it that you disagree with specifically? Before adding any rows or columns to your matrix, set it's cell class with setCellClass: or its prototype cell with – setPrototype:

Re: [ANN] RegexKitLite

2008-03-26 Thread Daniel Staal
--As of March 23, 2008 1:16:47 PM -0400, John Engelhart is alleged to have said: I've just released what I'm calling 'RegexKitLite'. It targets a different group of people than the full fledged RegexKit (http://regexkit.sourceforge.net/). --As for the rest, it is mine. Nice. Though I'd rat

Re: NSMatrix

2008-03-26 Thread Erik Buck
Wow! Dave Hersey wrote a very detailed and comprehensive post that must have taken a long time. Sadly, I disagree with almost all of it. NSMatrix is an "older" class that predates the "data source" design pattern that emerged (i think) in NeXTstep 3.0 in about 1994 as I recall. I think NSMat

Re: Leopard on PPC

2008-03-26 Thread Jonathan Hess
Hey Lorenzo - Did you remember to pass the trailing nil argument in the argument list to -[NSDictionary dictionaryWithObjectsAndKeys:]? Jon Hess On Mar 26, 2008, at 1:02 PM, Lorenzo wrote: Thanks, actually I get this crash log on the Console Path:/Applications/MyApp 1.2.3/MyAp

Weird NSFontManager Behavior

2008-03-26 Thread Andre Schnoor
Hi All, hopefully someone can shed a bit light on this strange issue: [[NSFontManager sharedFontManager] fontWithFamily: @"Lucida_Grande" traits: NSUnitalicFontMask | NSBoldFontMask weight: 0.5 size: 14.0] delivers the correct font when the application was launch

Re: Leopard on PPC

2008-03-26 Thread Laurent Cerveau
It seems to be debuggable by yourself. Can you start up in XCode on PPC? If not you can simply launch the app under gdb and put a breakpoint at +[NSDictionary dictionaryWithObjectsAndKeys:] with br. From then it would be interesting to check the passed argument (on PPC the argument of a met

Re: Question regarding NSDictionary and saving a 'tree structure'

2008-03-26 Thread Hamish Allan
Hi Dirk, If you want to use an NSTreeController to show your data in an NSOutlineView, your plist will probably look something like the following: http://www.apple.com/DTDs/PropertyList-1.0.dtd";> name Day1 children

Re: Leopard on PPC

2008-03-26 Thread Nick Zitzmann
On Mar 26, 2008, at 2:02 PM, Lorenzo wrote: actually I get this crash log on the Console [...] 2 com.apple.CoreFoundation 0x91ea0da0 __CFDictionaryHandleOutOfMemory + 56 How much memory does your application use? 32-bit applications have a 4 GB VM limit. Nick Zitzmann

Re: Cocoa Database Connection

2008-03-26 Thread Andrew Satori
Justin, Sorry, I've been buried with other work and didn't get this earlier. There are several ways to solve what you want. You can bridge to the various databases using native toolkits or you can use a generic toolkit like JDBC via the java bridge (not supported anymore under Leopard) or

Re: Leopard on PPC

2008-03-26 Thread Lorenzo
Thanks, actually I get this crash log on the Console Path:/Applications/MyApp 1.2.3/MyApp.app/Contents/MacOS/MyApp Identifier: com.myapp.myapp Version: 1.2.3 (1.2.3) Code Type: PPC (Native) Parent Process: launchd [104] Date/Time: 2008-03-26 20:33:19.245 +020

Re: Source list using bindings?

2008-03-26 Thread Jonathan Dann
On 26 Mar 2008, at 00:45, Hamish Allan wrote: Hi Jon, On Tue, Mar 25, 2008 at 9:49 PM, Jonathan Dann <[EMAIL PROTECTED]> wrote: As of 10.5 it's the Apple-sanctioned way to go! I've used it for ages now, no problems at all. The tree node is a proxy for whatever 'real' item you add to

Re: outlineViewSelectionDidChange not called

2008-03-26 Thread Jonathan Dann
On 26 Mar 2008, at 03:24, Adam Gerson wrote: I take that back. [outlineView selectedRow] does appear to tell the absolute truth. So I should now be able to try what you said and tie the tree controller's @"selectionIndexPaths" to [outlineView selectedRow]. I will report back my results... Ada

Re: NSMatrix

2008-03-26 Thread Dave Hersey
On Mar 26, 2008, at 11:52 AM, Matthew Miller wrote: Could some please explain in simple terms how to create a NSMatrix which distributes cells in rows based on the input of a table and takes away the cells when it is not needed. Thank you very much! P.S. I am new to cocoa so please don't use

Re: Leopard on PPC

2008-03-26 Thread Jean-Daniel Dupas
Le 26 mars 08 à 17:51, Lorenzo a écrit : Hi, I have compiled my Cocoa application against SDK 10.4. While my application runs well on both Leopard and Tiger on Intel machines, It run on PPC machines only with Tiger. On PPC machines with Leopard it won't launch. Any idea about the origin of

Re: Leopard on PPC

2008-03-26 Thread Laurent Cerveau
Is there any message in the console? Laurent Sent from my roadPhone On Mar 26, 2008, at 5:51 PM, Lorenzo <[EMAIL PROTECTED]> wrote: Hi, I have compiled my Cocoa application against SDK 10.4. While my application runs well on both Leopard and Tiger on Intel machines, It run on PPC machines o

Re: Changing the line height of an NSTextField?

2008-03-26 Thread John Stiles
I've found that adjusting the font matrix to include a negative Y transformation has the effect of decreasing the line height. This seemed like a bug to me when I discovered it, since I just wanted the text to be translated upwards in its cell, not shrink the line height. I wasn't sure if it wa

Leopard on PPC

2008-03-26 Thread Lorenzo
Hi, I have compiled my Cocoa application against SDK 10.4. While my application runs well on both Leopard and Tiger on Intel machines, It run on PPC machines only with Tiger. On PPC machines with Leopard it won't launch. Any idea about the origin of the trouble? Some of my settings: ARCHS = pp

NSMatrix

2008-03-26 Thread Matthew Miller
Could some please explain in simple terms how to create a NSMatrix which distributes cells in rows based on the input of a table and takes away the cells when it is not needed. Thank you very much! P.S. I am new to cocoa so please don't use really big and complex cocoa vocab, but then again

RE: Providing synch/asynch API

2008-03-26 Thread Andy Klepack
I was hoping to look at the problem from a more generic perspective where the operation itself was variable but the callback would be either in the same thread as they were created from or in the main thread itself. For a more concrete example I'm working on an ObjC wrapper for a web service th

Re: NSOutlineView "sliding" animation

2008-03-26 Thread Lucas Gladding
Mitchell iChat doesn't use a standard NSTableView or NSOutlineView. The standard views use one NSCell for each column and draw each row's contents with the same NSCell (think of using a stencil when painting). For core animation, the ideal setup is an NSView for each row. NSCollectionV

Re: Writing a preference pane that configures hotkeys?

2008-03-26 Thread Nathan Day
I use those classes myself in a preference pane (Popup Dock) and they work fine. You need to have a NDHotKeyControl to capture the event, you can create an input field in IB and change its class to NDHotKeyControl. You then need to tell the NDHotKeyControl to wait for a HotKey combination e

Basic question about NSComboBox

2008-03-26 Thread ADIL SALEEM
I have a basic question about NSComboBox that i want to clarify. When user selects some item from the combo box and actually click on the item itself in the list then [comboBox indexOfSelectedItem] returns it's index correctly (0,1,2...) . But if the user just clicks on the dropdown button and

Re: Windows networking API

2008-03-26 Thread Ken Thomases
On Mar 25, 2008, at 10:41 AM, Robert Claeson wrote: Is there an API/framework to interface with the SMB/Samba/Windows networking functionality of OS X? More specifically, I need to: * Find the Active Directory domain (or Windows workgroup name if not in an AD network) * Ensure that the OS X

Changing the line height of an NSTextField?

2008-03-26 Thread Nicholas J Humfrey
Hello Cocoa Developers, I am trying to squeeze an extra line of text into a multiline NSTextField, but I can't work out how to adjust the line height? What is the easiest way of adjusting this? The purpose of this is that I'm actually using several NSTextFields on an NSView to lay text o

Re: Ephemeral Changes

2008-03-26 Thread Gerriet M. Denkmann
On 26 Mar 2008, at 04:07, Sherm Pendley wrote: On Tue, Mar 25, 2008 at 10:07 PM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: On 25 Mar 2008, at 23:12, Graham Cox wrote: > There may be a simpler way, but this is what occurred to me when I > read this: > > Subclass NSTextView and override -c

QTMovieLayer with QTMovie leaking memory

2008-03-26 Thread Freddie Tilley
Hi I'm creating a qt movie player that will play movies in a QTMovieLayer from a simple playlist When running the application with Instruments using the Leaks template, it appears the function [QTMovie idleAllMovies] is leaking memory. This is the stacktrace from Instruments 0 CoreFounda