Re: text view example

2008-09-07 Thread julius
On 6 Sep 2008, at 14:06, Roland Silver <[EMAIL PROTECTED]> wrote: Can anyone point me to a Cocoa app or tutorial or example whose code I can adapt which has a window with a scrollable text view into which I can post text? Here http://juliuspaintings.co.uk/cgi-bin/paint_css/animatedPaint/005-NST

Re: How to create a GUID?

2008-09-07 Thread Klaus Backert
- (NSString *)uuid { CFUUIDRef uuidRef = CFUUIDCreate(NULL); CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef); CFRelease(uuidRef); return [NSMakeCollectable(uuidStringRef) autorelease]; } the receiver of this -uuid message is a NSString _instance_ – is there

Re: new to Cocoa -- threading question

2008-09-07 Thread Mike Abdullah
Also, if you're just playing an MP3 file, look into using QTKit on the main thread. Should be very much simpler and Objective C. On 7 Sep 2008, at 02:35, John Michael Zorko wrote: Hello, all ... I'm new to Cocoa, and i'm trying to launch a thread. Yet, the app bombs when I try, and the c

Re: How to create a GUID?

2008-09-07 Thread I. Savant
On Sep 7, 2008, at 4:42 AM, Klaus Backert wrote: the receiver of this -uuid message is a NSString _instance_ – is there any reason why this could not be implemented as a class method Somewhere on cocoadev, I remember there is an NSString category with a uuid class method. Probably easy to

Re: Posting Keyboard Events

2008-09-07 Thread Dave DeLong
Not sure if this got through... I was getting "Your message is awaiting moderation messages" even though I'm signed up for the list. Dave On 5 Sep, 2008, at 9:51 PM, Dave DeLong wrote: Yes, thank you for asking. This code is in an IBOutlet for a simple controller object. The controller h

Re: [NEWB] An object, an array item and a string

2008-09-07 Thread Aron Spesard
Thank you, I had overlooked that. I fixed that, however that doesn't fix the app crashing when trying to set the textfield contents as a string, or why I get the path in the sheet function but not in this one... On Sep 6, 2008, at 11:24 PM, Nathan Kinsinger wrote: On Sep 6, 2008, at 7:1

Re: [NEWB] An object, an array item and a string

2008-09-07 Thread Ken Thomases
On Sep 7, 2008, at 12:03 PM, Aron Spesard wrote: Thank you, I had overlooked that. I fixed that, however that doesn't fix the app crashing when trying to set the textfield contents as a string, or why I get the path in the sheet function but not in this one... You're probably failing to r

Re: How to create a GUID?

2008-09-07 Thread Scott Ribe
> is > there any reason why this could not be implemented as a class method It really *should* be a class method. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

mysterious undefineds

2008-09-07 Thread Roland Silver
I'm getting 6 build errors, all symbols referenced from Controller.o, but undefined: Undefined symbols: "_AudioDeviceStop", referenced from: [Controller stopPlaying:] in Controller.o "_AudioDeviceGetProperty", referenced from: "_AudioDeviceDestroyIOProcID", "_AudioDeviceCreateIOPro

Re: mysterious undefineds

2008-09-07 Thread Nick Zitzmann
On Sep 7, 2008, at 1:40 PM, Roland Silver wrote: Undefined symbols: "_AudioDeviceStop", referenced from: [Controller stopPlaying:] in Controller.o "_AudioDeviceGetProperty", referenced from: "_AudioDeviceDestroyIOProcID", "_AudioDeviceCreateIOProcID", "_AudioHardwareGetProperty", "_A

Forcing finalization on the main thread?

2008-09-07 Thread Nick Zitzmann
I've got a C data structure in a GC-enabled app. I'm deallocating the structure when the parent object is finished, in -dealloc and - finalize. I've found out the hard way that the data structure is not thread-safe, and eventually causes a crash if deallocated on a thread other than the main

Re: Forcing finalization on the main thread?

2008-09-07 Thread Jean-Daniel Dupas
Le 8 sept. 08 à 00:25, Nick Zitzmann a écrit : I've got a C data structure in a GC-enabled app. I'm deallocating the structure when the parent object is finished, in -dealloc and - finalize. I've found out the hard way that the data structure is not thread-safe, and eventually causes a cras

Re: Forcing finalization on the main thread?

2008-09-07 Thread Nick Zitzmann
On Sep 7, 2008, at 4:39 PM, Jean-Daniel Dupas wrote: You can use perform on main thread using a class method and pass your structure as argument. That worked; thanks. I wouldn't have guessed it, since that method wasn't documented as a class method, but it worked anyway... Nick Zitzmann

Re: Forcing finalization on the main thread?

2008-09-07 Thread Adam R. Maxwell
On Sep 7, 2008, at 3:53 PM, Nick Zitzmann wrote: On Sep 7, 2008, at 4:39 PM, Jean-Daniel Dupas wrote: You can use perform on main thread using a class method and pass your structure as argument. That worked; thanks. I wouldn't have guessed it, since that method wasn't documented as a c

Interface Builder changing size of controls...

2008-09-07 Thread Randy Widell
I cannot seem to find any documentation on this behavior and I really do not understand what Interface Builder is doing and why. Sometimes, when I add a control to a window, it automatically sets the control size to "mini." For instance, I added a multiline label to a new window to advise the use

NSRunLoop run semantics

2008-09-07 Thread Roman Kishchenko
Hi, I am new to Cocoa and have been experimenting with NSRunLoop. I would appreciate clarification about 'run' method semantics. The documentation states that: "If no input sources or timers are attached to the run loop, this method exits immediately" Yet, in my thread example below, the 'run' in

Re: Forcing finalization on the main thread?

2008-09-07 Thread Mudi Dandan
What if you wrapped it in an object where you can use performSelectorOnMainThread: for deallocation ? On Sep 8, 2008, at 12:25 AM, Nick Zitzmann wrote: I've got a C data structure in a GC-enabled app. I'm deallocating the structure when the parent object is finished, in -dealloc and - final

Re: Forcing finalization on the main thread?

2008-09-07 Thread Bill Bumgarner
On Sep 7, 2008, at 3:53 PM, Nick Zitzmann wrote: On Sep 7, 2008, at 4:39 PM, Jean-Daniel Dupas wrote: You can use perform on main thread using a class method and pass your structure as argument. That worked; thanks. I wouldn't have guessed it, since that method wasn't documented as a clas

Re: Interface Builder changing size of controls...

2008-09-07 Thread Seth Willits
On Sep 7, 2008, at 7:52 AM, Randy Widell wrote: I cannot seem to find any documentation on this behavior and I really do not understand what Interface Builder is doing and why. Sometimes, when I add a control to a window, it automatically sets the control size to "mini." For instance, I a

Re: How to create a GUID?

2008-09-07 Thread Kirk Kerekes
@implementation NSString (KKUUIDString) + (NSString *) UUIDString { CFUUIDRef UIDRef; NSString *uidString; UIDRef = CFUUIDCreate(NULL); uidString = (NSString *)CFUUIDCreateString(NULL, UIDRef); CFRelease(UIDRef); return [uidString autorelease]; } @e

Using control:didFailToFormatString:errorDescription:

2008-09-07 Thread Rohan Lloyd
I have a sheet with some text fields. The values of the textFields are bound to an NSObjectController. One of the text fields has an NSNumberFormatter, restricting it to numeric input. If I type a random string (not a number) in, and tab out of the field, I get the standard "Format error

How did I miss this?

2008-09-07 Thread John Murphy
I just released the the view on NSViewController objects can be accessed with dot syntax, i.e., self.view instead of [self view]. Has this always been the case? I don't see any listing of "Properties" in documentation. I'm hitting myself for not discovering it sooner. _

Re: How did I miss this?

2008-09-07 Thread Kyle Sluder
On Sun, Sep 7, 2008 at 9:25 PM, John Murphy <[EMAIL PROTECTED]> wrote: > Has this always been the case? I don't see any listing of "Properties" in > documentation. It's a new feature in ObjC 2.0, known as "dot syntax". It's syntactic sugar for accessors and mutators, and is orthogonal to propert

Re: How did I miss this?

2008-09-07 Thread Phil
On Mon, Sep 8, 2008 at 1:25 PM, John Murphy <[EMAIL PROTECTED]> wrote: > I just released the the view on NSViewController objects can be accessed with > dot syntax, i.e., self.view instead of [self view]. > Has this always been the case? I don't see any listing of "Properties" in > documentation.

Re: NSRunLoop run semantics

2008-09-07 Thread Bill Bumgarner
On Sep 7, 2008, at 9:33 AM, Roman Kishchenko wrote: Yet, in my thread example below, the 'run' invocation blocks and does not exit. MyThread is a simple NSThread subclass. No custom input sources or timers are registered with the run loop. Unless I misunderstand the documentation or there are

Re: How to create a GUID?

2008-09-07 Thread Adam R. Maxwell
On Sep 6, 2008, at 2:39 PM, Meik Schuetz wrote: Dear everyone, I feel kind of embarrassed to ask, but could someone lead me the way on how to create an globally unique ID (such as for example d73e066c-cc88-4d66-be42-94dc091bb571) ? In addition to all the CFUUID solutions, there's also [[

Re: How did I miss this?

2008-09-07 Thread mmalc crawford
On Sep 7, 2008, at 7:01 PM, Phil wrote: The sub-section on "Incorrect Use", also explains that you shouldn't use this syntax if it's not on a declared property (and NSViewController doesn't have any). I'm not sure where you got this from? It is certainly not incorrect to use the dot syntax if

ABMetadataValidateOperation crash

2008-09-07 Thread Chris Meyer
Hi all, My customers frequently get crashes in my software that look like this (see below). Anyone have any idea what I'm doing to trigger this? It looks like an NSOperation is being launched to do 'ABMetadataValidateOperation main'. Any idea what triggering this operation to begin, so that I have

User input while reading document

2008-09-07 Thread Randy Widell
I am writing an application that supports a couple of different document types. One of the document types is a subset of another, so I am using the same document class for both. When opening the subset type, however, I need the user to specify a few things about how to import the data. As for th

Re: How did I miss this?

2008-09-07 Thread Phil
On Mon, Sep 8, 2008 at 3:23 PM, mmalc crawford <[EMAIL PROTECTED]> wrote: > > On Sep 7, 2008, at 7:01 PM, Phil wrote: > >> The sub-section on "Incorrect Use", also explains that you shouldn't >> use this syntax if it's not on a declared property (and >> NSViewController doesn't have any). >> > I'm

Re: User input while reading document

2008-09-07 Thread Kyle Sluder
On Sun, Sep 7, 2008 at 11:28 PM, Randy Widell <[EMAIL PROTECTED]> wrote: > Is this a fundamentally sound design? Is there a better way to do this? Something like the following (WARNING, untested code written in Compose window): -- BEGIN CODE -- / // MyDocument.h @interface MyDocument : NSD

Re: How to create a GUID?

2008-09-07 Thread Dave Howell
On Sat, 6 Sep 2008, Meik Schuetz said: Dear everyone, I feel kind of embarrassed to ask, but could someone lead me the way on how to create an globally unique ID (such as for example d73e066c-cc88-4d66-be42-94dc091bb571) ? Best regards and thanks to everyone. Meik Since you don't say whether