Re: Generate back trace programmatically?

2008-08-12 Thread Torsten Curdt
On Aug 13, 2008, at 01:34, Nick Zitzmann wrote: On Aug 12, 2008, at 5:28 PM, Joseph Kelly wrote: is there a known reliable way to generate a back trace from the current point in a given thread's call stack? Yes. (Hint: See the NSException documentation in Leopard, and the

Subclassing NSTextView

2008-08-12 Thread John Joyce
In Xcode 3.1, what is the minimum necessary to create a useable subclass of NSTextView ? (before adding/overriding methods) Additionally, in IB, is there any effective difference from using an NSTextView, selecting the text view within its scroll view and changing its class (in the

Re: Controlling line-breaking in a text view

2008-08-12 Thread Ken Ferry
Hi Andy, I'm still not familiar with the text system, so I don't know if the proxy was a good way to do this. But assuming it was, try implementing forwardingTargetForSelector: instead of forwardInvocation:. It's less flexible, but much faster, and your case doesn't require the flexibility.

Re: Accessing memory of another application?

2008-08-12 Thread mm w
Who liked to spit fire? :D as I said do not use mach primitives, I will not dive into details but it's one of worst advice you got here, spawn + run code into an exception handler do what you want with the result Cheers! On Tue, Aug 12, 2008 at 11:12 AM, Josh [EMAIL PROTECTED] wrote: I've

RE: Subclassing NSTextView

2008-08-12 Thread John Joyce
Ooops, nevermind!! I answered my own question. When adding the class file to the project, start with the NSView subclass template, then change it to subclass NSTextView in the .h and in the .m either call [super drawRect:rect]; or comment out or delete the drawRect method all together. That

Re: Archiving NSColor as NSData

2008-08-12 Thread Shawn Erickson
On Tue, Aug 12, 2008 at 2:26 PM, Rein Hillmann [EMAIL PROTECTED] wrote: Hi, Disclaimer: this is a question from a newbie. Could someone please explain why an NSColor yields so much data when archived to NSData? For example, the following code: NSColor* color = [NSColor yellowColor];

Re: Archiving NSColor as NSData

2008-08-12 Thread Phil
On Wed, Aug 13, 2008 at 9:26 AM, Rein Hillmann [EMAIL PROTECTED] wrote: colorAsData: 040b7374 7265616d 74797065 6481e803 84014084 8484074e 53436f6c 6f720084 84084e53 4f626a65 63740085 84016301 8404 0101 000186 I suspect it's archiving other ivars in the color object. If so, is this

Re: Should I retain a variable returned from this accessor?

2008-08-12 Thread Ken Thomases
On Aug 12, 2008, at 11:51 AM, Brian Stern wrote: On Aug 11, 2008, at 10:51 PM, Peter N Lewis wrote: [newTodo release] is not [newTodo autorelease]. So it may immediately call dealloc and dealloc the uid returned by by [newTodo uid]. To avoid this, you could do: Not really. This line:

Bindings Key Paths question

2008-08-12 Thread Jack Carbaugh
In my program, I download information for a person and stuff the items into an NSDictionary. Several of the keys are of this form: pictures.0.url How can I add this value to the bindings area of IB. I've tried surrounding with quotes and they are rejected. Thanks Jack

Core Data Versioning - more than two versions, how to map upgrades?

2008-08-12 Thread Graham Perks
I have model versions 1, 2, and 3, 3 being the latest. Obviously I need a mapping file to upgrade 2 - 3. But for upgrades of v1, should the mapping file be 1 - 3 direct, or 1 - 2 and Core Data will do a two-step upgrade? The latter would be simplest, having Core Data automatically chain

NSTypesetter layoutParagraphAtPoint:

2008-08-12 Thread chaitanya pandit
Hello, Well i've been struggling with this for quite a while and would appreciate if anyone could point me in the right direction. I am trying to implement a custom NSTypesetter, to start with i just want to lay 2 characters, an A and an inline image, thats it. The character A gets drawn

Core Data Bindings. weird behavior.

2008-08-12 Thread Sandro Noel
Greetings. I'm having a weird behavior with the bindings and core data. i'm sure it's the way the bindings are set that causes my problem but i can not find the answer. so i'll ask you guy's :) I have these entities, with these attributes and relationships. entity: Transactions

Re: Should I retain a variable returned from this accessor?

2008-08-12 Thread Peter N Lewis
Clearly, there is a lot more going on in the code in this question than in typical Cocoa code. That said, if you want to avoid bugs, it would seem that the following is good advice: * Always use autorelease. * Use an Auto Release Pool if necessary (in loops, or with large memory

Re: Non-NSObject object and garbage collection

2008-08-12 Thread Oleg Krupnov
I have added a call to CFMakeCollectable each time after I create a CF object like this CFSomeTypeRef a = CFCreateSomeType(); if (a != nil) { CFMakeCollectable(a); } But I keep getting this runtime message in the console: malloc: reference count underflow for 0x10773c0, break on

Re: Non-NSObject object and garbage collection

2008-08-12 Thread Ken Ferry
What does the stack look like when you break on auto_refcount_underflow_error? After you break, you can do call (void)CFShow(number goes here) with the number printed out in the log message. That should hopefully give you the type of the object, which might help you determine where the issue is.

NSUserDefaultsController with defaults for another app

2008-08-12 Thread Keith Alperin
Greetings Cocoa-devs! My app ships as a System Preferences preference pane that contains a faceless agent app inside it's bundle. The agent app provides all of the functionality for my app. The prefpane stores preferences in the plist file for my app (rather than that for the host System

Re: NSTypesetter layoutParagraphAtPoint:

2008-08-12 Thread Aki Inoue
You need to specify all essential glyph attributes for NSLayoutManager. In this case, you're not specifying the not shown attribute for the attachment. Attachment glyph should not be shown. Aki On 2008/08/12, at 19:54, chaitanya pandit wrote: Hello, Well i've been struggling with this

NSTokenField drag and drop

2008-08-12 Thread Chris Idou
I've got two NSTokenFields. One is read-only as a palette for dragging and dropping to the other. I've implemented a Token class to distinguish between tokens and plain text (NSString). I can pass in arrays of mixed Tokens and NSStrings, and it all displays correctly in both fields. However,

Re: NSUserDefaultsController with defaults for another app

2008-08-12 Thread Ken Thomases
On Aug 12, 2008, at 11:11 PM, Keith Alperin wrote: My app ships as a System Preferences preference pane that contains a faceless agent app inside it's bundle. The agent app provides all of the functionality for my app. The prefpane stores preferences in the plist file for my app (rather

Re: Non-NSObject object and garbage collection

2008-08-12 Thread Quincey Morris
On Aug 12, 2008, at 21:22, Oleg Krupnov wrote: Actually, I don't know how to break on something. Would you please tell me? Open the Breakpoints window (Run | Show | Breakpoints). Double click where it says Double-click for symbol and type the symbol name you want to break on

Re: Accessing memory of another application?

2008-08-12 Thread Michael Watson
So what game are you trying to cheat at? -- m-s On 12 Aug, 2008, at 14:09, Josh wrote: I'm not creating both applications - The application I'm trying to access was written by someone else and has no developer documentation (it's a game) My application should read the memory of the game

Re: Non-NSObject object and garbage collection

2008-08-12 Thread Ken Ferry
Hm. This is not going to be a great introduction to Mac OS X programming. :-) It turns out that CGPDFContentStream, CGPDFOperatorTable, and CGPDFScanner are not CFTypes. You cannot use any function intended for CFTypes with them, including CFRetain, CFRelease and CFMakeCollectable. You cannot

Re: Non-NSObject object and garbage collection

2008-08-12 Thread Ken Ferry
On Tue, Aug 12, 2008 at 10:32 PM, Quincey Morris [EMAIL PROTECTED] wrote: On Aug 12, 2008, at 21:22, Oleg Krupnov wrote: Actually, I don't know how to break on something. Would you please tell me? Open the Breakpoints window (Run | Show | Breakpoints). Double click where it says

<    1   2