Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-30 Thread Bill Bumgarner
On Mar 30, 2009, at 10:32 PM, Chris Idou wrote: That's a good trick to know! When I bracket the calls thus, it crashes in a different but similar place: #00x95a82688 in objc_msgSend #10x90894910 in processColor #20x9089395b in CharAttr #30x9088db34 in -[NSRTFReader attributedString] #40x9070bc

Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-30 Thread Chris Idou
That's a good trick to know! When I bracket the calls thus, it crashes in a different but similar place: #00x95a82688 in objc_msgSend #10x90894910 in processColor #20x9089395b in CharAttr #30x9088db34 in -[NSRTFReader attributedString] #40x9070bc03 in _NSReadAttributedStringFromURLOrData #50x90

Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-30 Thread Ali Ozer
Can you try temporarily disabling garbage collection around the unarchiving of RTFD, and see if it helps? [[NSGarbageCollector defaultCollector] disable]; ... unarchive your RTFD ... [[NSGarbageCollector defaultCollector] enable]; Ali On Mar 30, 2009, at 5:25 PM, Chris Idou wrote: I'm gettin

Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-30 Thread Chris Idou
Thanks for the links. If I run with libgmalloc, it dies the same way, but seemingly much quicker: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x0032 0x95a82688 in objc_msgSend () (gdb) where #0 0x95a82688 in objc_msgSend () #

Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-30 Thread Sean McBride
Chris Idou (idou...@yahoo.com) on 2009-03-30 8:25 PM said: >I'm getting NSRTFDPboardType and NSRTFPboardType objects as NSData from >the pasteboard and I'm storing them in a core data XML repository and >getting them out again, and when necessary I'm converting them into >NSAttributedString with i

Re: Why does -[NSURLConnection start] crash?

2009-03-30 Thread Peter N Lewis
On 31/03/2009, at 3:32 , Jeff Johnson wrote: Here's the sample code: http://lapcatsoftware.com/downloads/ConnectionStartCrash.m It crashes when calling this: _connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; [_connection start]; Google for

Re: How can I draw an election map?

2009-03-30 Thread Michael Hall
On Mar 30, 2009, at 5:07 PM, Tobias Zimmerman wrote: I am starting a new project that involves simulating various US election results. I want to plot the results using an election map similar to the ones that were all over the web during last year’s election. However, I would like to do

EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-30 Thread Chris Idou
I'm getting NSRTFDPboardType and NSRTFPboardType objects as NSData from the pasteboard and I'm storing them in a core data XML repository and getting them out again, and when necessary I'm converting them into NSAttributedString with initWithRTF or initWithRTFD. This mostly works but every now a

Re: (un)mounting volumes

2009-03-30 Thread Ken Thomases
On Mar 30, 2009, at 6:08 PM, Torsten Curdt wrote: How do I list all mounted volumes (and their mount points)? Well, since you're poking around in the File Manager, take a look at FSGetVolumeInfo. However, since this is cocoa-dev, I will also direct you to the - mountedLocalVolumePaths and

Re: (un)mounting volumes

2009-03-30 Thread Greg Guerin
Torsten Curdt wrote: How do I list all mounted volumes (and their mount points)? apropos mount man 3 getmntinfo man 2 getfsstat -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

(un)mounting volumes

2009-03-30 Thread Torsten Curdt
Hey folks, I am a little stuck here. Let me know if there is a better place to ask but... So far I've managed to mount a volume with FSMountServerVolumeAsync(). I am still wondering how to set the volume name (and where that is documented). That's one thing. But more importantly: How do I unmoun

[MEET] April CocoaHeads Mac Developer Meetings

2009-03-30 Thread Stephen Zyszkiewicz
Greetings, CocoaHeads is an international Mac programmer's group. Meetings are free and open to the public. We specialize in Cocoa, but everything Mac programming related is welcome. Upcoming meetings: Canada Halifax- Thursday, April 9, 2009 18:00. Toronto- Tuesday, April 14, 2009 18:30. G

Re: Best Strategy to Control iTunes

2009-03-30 Thread Ammar Ibrahim
> > > * Communcation with iTunes > > - What's the best interface to use? > > > > There are many approaches but if you don't tell us what are your purposes > we > can't tell you wich approach is the best for your use. However, i suggest > googling for ScriptingBridge. > My application will be

How can I draw an election map?

2009-03-30 Thread Tobias Zimmerman
I am starting a new project that involves simulating various US election results. I want to plot the results using an election map similar to the ones that were all over the web during last year¹s election. However, I would like to do this in Cocoa/Objective-C rather than having to learn Python o

Re: Processing data maintained with Core Data

2009-03-30 Thread Peter Castine
Thanks to all for your suggestions. On 27-Mar-2009, at 18:09, Quincey Morris wrote: the key question seems to be: what is the thread safety model of your existing code? Generating audio from parameters and file lists held by a different thread seems disaster-prone, so presumably your code d

[SOLVED] Re: NSTableColumn's sort key in Interface Builder

2009-03-30 Thread Mike Manzano
Doh! On Mar 30, 2009, at 1:00 PM, Corbin Dunn wrote: On Mar 30, 2009, at 12:16 PM, Mike Manzano wrote: Hello, I have a table view whose delegate's - tableView:objectValueForTableColumn:row: returns an NSDictionary with key value pairs that look like this for each of its columns (the co

Re: Launching a preference pane from inside a Cocoa app

2009-03-30 Thread Nick Zitzmann
On Mar 30, 2009, at 11:17 AM, Mark Suman wrote: Does anyone know the "Apple" way of launching a prefPane from a Cocoa app? Yes. (If you were wondering _how_ to do it, then all you need to do is open the preference pane using NSWorkspace or Launch Services. System Preferences will then d

Adding UTI to document type causes NSDocumentController Misbehavior

2009-03-30 Thread Jerry Krinock
The other day I was writing an AppleScript and noticed that AppleScript's 'choose file' command has a parameter 'of type' which requires a UTI. Since I'd like to be able to use this parameter in AppleScripts that choose my app's documents, I read up on UTI [1]. It all seems very simple, i

Launching a preference pane from inside a Cocoa app

2009-03-30 Thread Mark Suman
I'm looking to map the "Preferences..." menu item to a system preference pane I created rather than the built-in application preferences. I know I can use AppleScript to launch my prefPane, but am wondering if there is a better, Cocoa way of doing it. Does anyone know the "Apple" way of launching

opening a file

2009-03-30 Thread James Gifford
Hello! I am trying to open i file (the license for my app) when the user clicks on a menu item. i gave applescript a try but it did not work. any ideas? the website for the application is below. -James Gifford The Downloadermac Project: http://code.google.com/p/downloadermac Google Group: http:/

Re: Small white border around custom cell in NSTableView ...

2009-03-30 Thread Dave Keck
Have you looked at setIntercellSpacing: ? > Hi, > > Whenever I use a custom cell within an NSTableView, and color the > background different to the tables, there is a small white border (or > whatever I set the background color of the table to be) around the > cell, probably around 4px in height/w

Re: Best Strategy to Control iTunes

2009-03-30 Thread Mark Suman
For issue 1: I use NSWorkspace to handle this. Someone more knowledgeable than me might be able to answer your more detailed questions. When I launch my app, I check the sharedWorkspace to see if "com.apple.iTunes" is already running. If not, I launch it. For issue 2: There is a nifty framework

Referencing a controller from one NIB to another ?

2009-03-30 Thread Guillaume Laurent
Following up on my question about putting several windows in a single NIB, as it seems it's a bad idea, I'm now confronted to binding controllers from one NIB to another. To give a quick example, take the TwoManyControllers sample : http://developer.apple.com/SampleCode/TwoManyControllers/in

Re: NSTableColumn's sort key in Interface Builder

2009-03-30 Thread Corbin Dunn
On Mar 30, 2009, at 12:16 PM, Mike Manzano wrote: Hello, I have a table view whose delegate's - tableView:objectValueForTableColumn:row: returns an NSDictionary with key value pairs that look like this for each of its columns (the columns' cells are responsible for extracting some subset

Why does -[NSURLConnection start] crash?

2009-03-30 Thread Jeff Johnson
Here's the sample code: http://lapcatsoftware.com/downloads/ConnectionStartCrash.m It crashes when calling this: _connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; [_connection start]; but not this: _connection = [[NSURLConnection alloc] init

Re: [BUG?] - [NSLayoutManager usedRectForTextContainer:] returns incorrect value

2009-03-30 Thread Iceberg-Dev
On Mar 30, 2009, at 3:55 PM, Benjamin Stiglitz wrote: I'm running the code below. I have a single NSWindow with a checkbox and a button. In the awakeFromNib method of the main controller, I change the attribute of the checkbox string. In the compute: method, I compute the height requested

NSTableColumn's sort key in Interface Builder

2009-03-30 Thread Mike Manzano
Hello, I have a table view whose delegate's - tableView:objectValueForTableColumn:row: returns an NSDictionary with key value pairs that look like this for each of its columns (the columns' cells are responsible for extracting some subset of this dictionary to display to the user): {

Re: ack no class

2009-03-30 Thread Greg Parker
On Mar 29, 2009, at 3:26 PM, Mark Sibly wrote: I've recently had a few reports that apps generated by the Mac version are producing a mysterious "ack no class" error when they start up - similar to this: 2009-03-24 22:26:14.460 test[10329:717] ack no class This appears to be written to 'stderr

Re: Best Strategy to Control iTunes

2009-03-30 Thread Luca C.
Hi Ammar, 2009/3/30 Ammar Ibrahim > I'm currently developing an App in iTunes, and I'm new to Cocoa and the > entire Mac development world. So far, things are looking great. I have few > questions, about which is the best strategy to follow in order to > accomplish > some tasks. This is a specia

Best Strategy to Control iTunes

2009-03-30 Thread Ammar Ibrahim
I'm currently developing an App in iTunes, and I'm new to Cocoa and the entire Mac development world. So far, things are looking great. I have few questions, about which is the best strategy to follow in order to accomplish some tasks. This is a special purpose app, in a controlled environment. *

Re: Properties and the runtime

2009-03-30 Thread Michael Ash
On Mon, Mar 30, 2009 at 1:06 AM, Luke the Hiesterman wrote: > Up to this point, I've thought of properties as "syntactic sugar" for method > calls. That is myObject.size should compile the same as [myObject size] > unless of course a custom getter is set in the property declaration, then it > woul

Re: Delayed Undo Problem

2009-03-30 Thread Keary Suska
On Mar 30, 2009, at 5:55 AM, Richard Somers wrote: I have a basic core data document based application (Hillegass 3rd Edition, Chapter 11, CarLot). With a single primary window every thing works. Then a second window is added with a generic master detail interface using the core data entit

Re: ack no class

2009-03-30 Thread Steve Christensen
Maybe start up that generated app in gdb with a breakpoint set on NSLog? When it breaks you could look at the backtrace. That may at least tell you where the message is being generated, which may then tell you why. On Mar 29, 2009, at 3:26 PM, Mark Sibly wrote: I'm the author of BlitzMax

Re: [BUG?] - [NSLayoutManager usedRectForTextContainer:] returns incorrect value

2009-03-30 Thread Benjamin Stiglitz
> I'm running the code below. I have a single NSWindow with a checkbox and > a button. In the awakeFromNib method of the main controller, I change the > attribute of the checkbox string. In the compute: method, I compute the > height requested to display a string for a specific font and maximum

Re: NSDates and natural language ...

2009-03-30 Thread Mic Pringle
Hi Laurent, I don't think I can achieve what I'm looking for with NSDateFormatter unless I subclass it and implement my own mehtods, which is what I'm looking to avoid if there's already an existing project out there. Thanks for your response though. -Mic 2009/3/30 Laurent Demaret : > Hello, >

MySQL-Cocoa database access

2009-03-30 Thread spartan g
Hi Friends, I am communicating with the MySQL database through the SMySQL framework. I can open the database connection successfully. I can select the database too. When I send a query to read the max count in the primary key i get the value in return for the first time. Then I insert the new rec

Re: NSDates and natural language ...

2009-03-30 Thread Laurent Demaret
Hello, Mic Pringle wrote: > any frameworks/classes that have been released that > allow you to return natural language from a date ? NSDateFormatter ? My firs answer on this list, l hope it's a good one... ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: Small white border around custom cell in NSTableView ...

2009-03-30 Thread I. Savant
On Mon, Mar 30, 2009 at 8:29 AM, Mic Pringle wrote: > Is there a way to remove this 'padding' so that the bottom of the > previous row cell lines up exactly with the top of the current row > cell ? Have you tried looking at NSTableView's documentation? There's a way to set -intercellSpacing if

Re: Small white border around custom cell in NSTableView ...

2009-03-30 Thread Mic Pringle
Hi Dave, I didn't notice that in the documentation ... but must admit with hindsight that I've spent more time looking in NSCell's documentations when I should have been looking at NSTableViews. Just checked in the online docs and this looks exactly what I'm after, thank you. Cheers, -Mic 2009

Small white border around custom cell in NSTableView ...

2009-03-30 Thread Mic Pringle
Hi, Whenever I use a custom cell within an NSTableView, and color the background different to the tables, there is a small white border (or whatever I set the background color of the table to be) around the cell, probably around 4px in height/width. Is there a way to remove this 'padding' so that

NSDates and natural language ...

2009-03-30 Thread Mic Pringle
Hi, Is anyone aware of any frameworks/classes that have been released that allow you to return natural language from a date ? What I mean by this is if, for example, I pass todays date it would return 'Today', yesterdays date would return 'Yesterday', 25th March 08 would return 'Last week' etc

Delayed Undo Problem

2009-03-30 Thread Richard Somers
I have a basic core data document based application (Hillegass 3rd Edition, Chapter 11, CarLot). With a single primary window every thing works. Then a second window is added with a generic master detail interface using the core data entity from the Interface Builder pallet. When making a c