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

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

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: 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

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

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

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

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: 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

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)

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: 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: ?xml version=1.0 encoding=UTF-8? !DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd; plist version=1.0

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

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

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

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: 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

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

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

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: 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

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: 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 =

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

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

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

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

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

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

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

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

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

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 to

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.

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 Foundation/Foundation.h, but I'm getting the following: : error: implicit declaration of function 'objc_getClassList' You

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

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, returning an