Snow Leopard OpenGL Full Screen

2009-09-15 Thread Jeff LaMarche
The traditional way of doing an OpenGL (gCGLPFAFullScreen, CGLSetFullScreen()) have been deprecated. At WWDC this year, in the Snow Leopard OpenGL session, a new all-Cocoa method was shown where you basically just resize the window containing the NSOpenGLView and layer it above the menu bar

NSOpenGL Full Screen

2009-09-20 Thread Jeff LaMarche
Okay, I'm feeling a little foolish. I've been so focused on iPhone stuff for the last year and a half that I either didn't notice or just plain forgot that NSView now has a method for displaying in full screen mode. It certainly makes the whole process much easier. I've updated the old NSOp

Re: Cocoa System Requirements

2009-07-06 Thread Jeff LaMarche
Every version of OS X and therefore every Mac that can run OS X can run Cocoa apps. Not necessarily any Coco app (certain features like core data or properties only became available with a specific OS release), but some version of Cocoa. I started writing Cocoa on a G3 tower, so anything yo

Re: Subject: Re: Bypassing Interface Builder

2008-05-15 Thread Jeff LaMarche
On May 15, 2008, at 1:23 PM, Erik Buck wrote: Dragging any object from a "palette" (what does IB call palettes these days?) i It's called the "Library"... ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: Guidance for Cocoa's steep learning curve

2008-05-16 Thread Jeff LaMarche
On May 16, 2008, at 9:30 AM, john darnell wrote: I don't mean to be mean, but I agree with Joseph; most Apple documentation is really, really poor. *No, that's not correct.* The documentation is extensive, and comprehensive, but unless you already know what you are reading about, it might as w

Re: Working through a problem...

2008-05-16 Thread Jeff LaMarche
On May 16, 2008, at 4:55 PM, john darnell wrote: I am attempting to follow these instructions, but whenever I do, when the cursor hovers over the table view control on the dialog the label that shows is NSTableColumn, and in the info panel the connected button remains grayed out and the mess

Re: The challenge for Cocoa's on-line documentation

2008-05-17 Thread Jeff LaMarche
On May 17, 2008, at 4:16 PM, Johnny Lundy wrote: I never had any problem with a language's documentation since 1970 with the IBM 360 Reference Manual. That is, until I came across Apple's documentation of Cocoa. I have never been so frustrated in my life. The usual pattern for a User Guide

Re: Cocoa et al as HCI usability problem

2008-05-19 Thread Jeff LaMarche
Boy, I've been really refraining myself from jumping into the fray here. It's an interesting discussion which has been handled respectfully, but it seems to me that we've reached the point of diminishing returns on this. I think the lines have been drawn, and most people have chosen one sid

Re: Cocoa et al as HCI usability problem

2008-05-19 Thread Jeff LaMarche
On May 19, 2008, at 12:42 PM, Alex Kac wrote: Every technology I've been able to get into easily because I could discover the tech in my own time. Cocoa is not like that. You have to grok the whole foundation first before you can do anything. I don't agree with this. You have to grok it al

Re: Cocoa et al as HCI usability problem

2008-05-19 Thread Jeff LaMarche
On May 19, 2008, at 1:33 PM, Peter Duniho wrote: NSColor color { set { undoManager.prepareWithInvocationTarget(this).color = mColor; mColor = value; } } Are you sure about this? I'm just a little surprised to see that C#

Re: Cocoa et al as HCI usability problem

2008-05-19 Thread Jeff LaMarche
On May 19, 2008, at 1:42 PM, Peter Duniho wrote: I agree with this statement. However, the conclusion is flawed. You are welcome to your opinion, even if "flawed" ;) Seriously, though, from some of your comments, I'm not sure that I communicated my "conclusion" very well, because you seem

Re: Delegates

2008-05-19 Thread Jeff LaMarche
On May 19, 2008, at 5:00 PM, john darnell wrote: yeah, I know...I'm dating myself with the use of the word "grok" Huh? You're not dating anything. :P I think grok gets used on this list at least a few times a week. Grok is part of the geek lexicon, even among people who have no idea wher

Re: Cocoa et al as HCI usability problem

2008-05-20 Thread Jeff LaMarche
This is really a fascinating discussion and, unfortunately, a time consuming one =) I can't help but feel that we have two identifiable camps forming, and I'm not sure I like that. Though a range of opinions have been stated, it seems that most of us can be readily identified as being on on

Re: Cocoa et al as HCI usability problem

2008-05-21 Thread Jeff LaMarche
On May 21, 2008, at 3:06 AM, Scott Anguish wrote: I'm not sure that how much is being 'paid' for the documentation is a valid metric. I believe (not speaking for the company of course) that both of these areas are viewed as investments. No, you're right, it's not a good metric, and I cer

Re: Cocoa et al as HCI usability problem

2008-05-21 Thread Jeff LaMarche
On May 21, 2008, at 4:31 AM, Torsten Curdt wrote: Well, they are free to open source XCode and have other people help. Look at Eclipse. You can suggest it to them, but I wouldn't hold your breath. :) Probably shouldn't open up that argument in this thread. Paying for documentation is a w

Re: Cocoa et al as HCI usability problem

2008-05-21 Thread Jeff LaMarche
On May 21, 2008, at 9:45 AM, Steve Weller wrote: Don't you see how different the learning experience is for 100,000 iPhone developers in 2008 vs. a few hundred Next developers twenty years ago? And the differences in motivation? And background? And sponsorship? Scott, you *are* doing you

Re: Cocoa et al as HCI usability problem

2008-05-21 Thread Jeff LaMarche
On May 21, 2008, at 1:30 PM, Peter Duniho wrote: My _main_ objection is how newcomers to Mac development are treated. Please, when someone new to the current Mac development environment brings up one or more of these points, don't say "well, you're too inexperienced to see why [Obj-C|Coco

Re: Trying to understand -- please help...

2008-05-21 Thread Jeff LaMarche
On May 21, 2008, at 3:37 PM, Johnny Lundy wrote: I submit that any experienced programmer looking up and turning to a page entitled "NSArray Class Reference" would "expect" that a behavior of the class that results in one's created object being deallocated out from under him would be docum

Re: Cocoa et al as HCI usability problem

2008-05-21 Thread Jeff LaMarche
On May 21, 2008, at 7:37 PM, Peter Duniho wrote: It's true, the phrase "riff-raff" wasn't actually used. But it's the essence of what was written. I don't know why it is you guys didn't notice those particular statements, and I agree that they aren't representative of the bulk of the com

Re: Cocoa et al as HCI usability problem

2008-05-22 Thread Jeff LaMarche
On May 21, 2008, at 9:58 PM, Andy Lee wrote: There's already an inherent lower bound on the barrier to entry for Cocoa. You have to understand certain fundamentals -- some conceptual, some procedural. If you don't have those fundamentals, you'll never make Cocoa work. There is also a se

Re: Cocoa et al as HCI usability problem

2008-05-22 Thread Jeff LaMarche
On May 22, 2008, at 12:02 PM, Andy Lee wrote: The vast majority of this thread, if not all of it, has been about people struggling to understand the frameworks as they are. Like Sherm, I do not agree with this. This thread has been about much more -- has been much bigger -- than a couple o

[OT] WWDC session schedule on your iPhone

2008-05-23 Thread Jeff LaMarche
I know this isn't strictly on topic, but I'm sure many list members are going to WWDC and many have iPhones, so... I stumbled across this today: http://kosmaczewski.net/wwdc2008/ Adrian Kosmaczewski created a script to convert the XML data for the WWDC sessions to iCal format, which will, o

RESTful Web Services & PUT

2008-06-05 Thread Jeff LaMarche
I noticed that there's been some discussion of RESTful web services. I've been having problem with PUT requests using NSMutableURLRequest, one that has been asked about on the list before, but I never saw an answer or workaround posted. After some digging I found a workaround to my proble

Re: Need help parsing a large text file one line at a time

2008-06-09 Thread Jeff LaMarche
On Jun 9, 2008, at 2:04 PM, Abel J. Almeida wrote: I need help parsing a large text file. I need to examine the file one line at a time. It's a 128MB text file. I used the stringWithContentsOfFile method from the NSString class, but the file is too large and it doesn't seem very optimized to

Accessors Question

2008-06-12 Thread Jeff LaMarche
Lately, I've started to see accessors of the following sort: - (NSString *)foo { return [[foo retain] autorelease]; } rather than just - (NSString *)foo { return foo; } What is the purpose or benefit of doing this? It seems to me that this would add things unnecessarily to th

Re: Accessors Question

2008-06-12 Thread Jeff LaMarche
Out of curiosity, does anyone know what the synthesized accessors look like when you specify retain? Are they The safe or unsafe ones? Sent from my iPhone On Jun 12, 2008, at 12:02 PM, Tito Ciuro <[EMAIL PROTECTED]> wrote: Hello, Although I prefer the safer accessors, there has been one cas

Re: (no subject)

2008-06-16 Thread Jeff LaMarche
On Jun 16, 2008, at 9:27 PM, Angelo Chen wrote: - (IBAction)doCopying:(id)sender { // how to determine which NSButton is clicked? } There are several ways. If this button was called because a button was pushed, sender will contain a pointer to the button. You can compare the tag value

Re: A documentation dumdum

2008-06-22 Thread Jeff LaMarche
On Jun 22, 2008, at 12:02 PM, William Squires wrote: okay, looking up tableView:setObjectValue:forTableColumn:row shows that setObjectValue: takes an (id), but what is it really? An NSString pointer? I want to get an NSString that represents the new value the user typed in for the selected

Did I reinvent the wheel?

2008-07-18 Thread Jeff LaMarche
Hey, folks. I needed an easy way to turn dictionaries into objects and objects into dictionaries based on their properties. I didn't want to have to custom code this for each of the classes i was using, and I couldn't find that functionality in any of the existing objects, but I have this s

sorting two arrays

2008-07-28 Thread Jeff LaMarche
Hey all... I've got two arrays that are related, so that object 0 in one array corresponds to object 0 in the other array. I'd like to implement a sort based on the values in one array, but to reorder both array so that the order of the two arrays stays in sync and that object x in one a

[ANNOUNCE] SQLite Persisted Objects for Cocoa

2008-08-26 Thread Jeff LaMarche
Greetings all. I recently created a project at Google Code that I wanted to bring to your attention. http://code.google.com/p/sqlitepersistentobjects/ The goal of this project is to create Objective-C data model objects that automagically know how to persist themselves to a SQLite database

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Jeff LaMarche
On Mar 10, 2008, at 2:54 PM, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. ImageMagick has some X11 components, but can be compiled as a set of unix command line programs that will perform various operations on im

Re: How to run progress bar in a separate thread

2008-03-10 Thread Jeff LaMarche
On Mar 10, 2008, at 10:08 PM, Nick Rogers wrote: NSThread has one method: + (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument But its hard to understand as to how to implement it, since its a class method. Don't

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-12 Thread Jeff LaMarche
On Mar 12, 2008, at 11:03 PM, Jens Alfke wrote: (Actually, the current docs are quite good, all things considered. Back in the day, the system documentation used to consist of badly- Xeroxed copies of napkins that the programmers had scrawled some instructions on, while suffering from exhau

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Jeff LaMarche
On Mar 13, 2008, at 5:43 AM, Thomas Engelmeier wrote: Maybe it paid off to be a "late adoptor". "Inside Macintosh:AppleTalk" and "New Inside Macintosh:Quicktime" / "New Inside Macintosh:Interapplication Communication" set a very high standard for documentation - far higher than the IBM UI

Re: Mail - check email

2008-03-14 Thread Jeff LaMarche
You may be confusing two separate things. Mail plug-ins are not applications, and they have to use a private, undocumented API. It is not something encouraged by Apple, nor is it a great choice for a Cocoa program. If you're serious, there are several plug-ins with the source code available

Re: Mail - check email

2008-03-14 Thread Jeff LaMarche
On Mar 14, 2008, at 10:25 AM, Jeff LaMarche wrote: nor is it a great choice for a Cocoa program Whoops, what I meant to say here, of course, was it's not a great idea for a FIRST Cocoa program... ___ Cocoa-dev mailing list (Coco

Re: Creating Custom Views in Interface Builder

2008-03-14 Thread Jeff LaMarche
I wrote an article for MacTech a while back on doing this... it may be a little outdated by now since it was written when Tiger was new, but may still contain some useful info: http://www.mactech.com/articles/mactech/Vol.21/21.10/Palettes/index.html On Mar 14, 2008, at 2:46 PM, [EMAIL PROTEC

[OT?] WWDC

2008-03-15 Thread Jeff LaMarche
Hey, folks. I'm just diving back into Cocoa after about eighteen months of doing mostly non-Mac programming (I know, I know). To help me jump-start back into Cocoa, I've signed up for WWDC this year. In the past, there used to be unofficial gatherings at WWDC - I think Stepwise used to run

interface builder 3 question

2008-03-17 Thread Jeff LaMarche
So, as I said in an earlier post, I'm getting back into Cocoa development after a little hiatus. I was working in IB today. Boy, it's changed, and for the better, but I can't figure out how to do something I used to do in Interface Builder. I want to create an instance of a custom NSObject

Re: interface builder 3 question

2008-03-17 Thread Jeff LaMarche
On Mar 17, 2008, at 10:55 PM, Kyle Sluder wrote: I assume you mean you want to specify the class of the instance, because "specifying the NSObject's superclass" is a nonsensical statement. The field you're looking for is on the Identity pane of the Inspector LOL. Sorry, I shouldn't try and d

Re: NSTableView solution feedback and questions

2008-03-18 Thread Jeff LaMarche
Jay: Well, I've never had this particular situation, but you could try registering for textDidBeginEditing) notification from the table view, then your code will have a way of knowing when the user is editing a table. If it's currently being edited when your timer method starts to do an u

NSTextField value binding (feeling like a newbie)

2008-03-18 Thread Jeff LaMarche
Working with IB3 to try and get my bearings again, and I know I'm doing something stupid here. I have an NSTextField inside an NSScrollView created in IB3. I have bound the value binding of the NSTextField to an NSString called feedback, exposed as an Objective-C 2.0 property,declared like

Re: NSTextField value binding (feeling like a newbie)

2008-03-18 Thread Jeff LaMarche
On Mar 18, 2008, at 5:33 PM, Jeff LaMarche wrote: . If I run my program, and make changes to the string (feedback), those are not reflected in the text field even though I can tell through the debugger that the string is changing. Just a clarification, if I populate the string with a

Re: NSTextField value binding (feeling like a newbie)

2008-03-18 Thread Jeff LaMarche
Quincey - Thanks much. You pointed me in the right direction - I was doing this: [self.feedback appendString:string]; Thanks much for the help! On Mar 18, 2008, at 6:10 PM, Quincey Morris wrote: On Mar 18, 2008, at 14:33, Jeff LaMarche wrote: I have bound the value binding of the

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 5:58 AM, Valentin Dan wrote: I need to send and receive message over the network but I got stuck … Surprisingly, there is no general-purpose Cocoa wrapper for the CFNetwork foundation functions. There are several specific wrappers - such as NSURLConnection and NSURLDo

Re: Downloading via FTP and loading images in a NSTableView

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 9:50 AM, Valentin Dan wrote: I'd like to know how can I get a file from a server that requires user & password ? What classes should I look at ? I believe NSURLDownload can handle FTP URLs. You could also use the CFFTP functions from CFNetwork.

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 1:26 PM, Sherm Pendley wrote: IMHO, a single socket() call, although admittedly a bit old school :-), is a little cleaner than reflecting a CF callback to an Objective-C method. Cleaner? You'll get no argument from me on that. It took me a lot of playing around to wrap

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 1:57 PM, Sherm Pendley wrote: Hmmm... Actually, now that I'm looking a second time, it looks like you need to call both socket() to create the socket, then connect() to connect to a remote host as a client. Then you can use NSFileHandle to do the reading and writing.

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 4:31 PM, Sherm Pendley wrote: Looks reasonable. Now if I could only figure out why I forgot about NSSocketPort... I think maybe I need to write a network app to jog my memory. Obviously I haven't looked at these classes recently enough. :-) I couldn't get it to work.

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Jeff LaMarche
On Mar 19, 2008, at 5:01 PM, Hamish Allan wrote: There's an article here describing its more general use, at least for the server side: http://macdevcenter.com/pub/a/mac/2006/11/14/how-to-write-a-cocoa-web-server.html Hamish True, but he only uses NSSocketPort for the server, not for the

Re: Custom Shaped Buttons

2008-03-20 Thread Jeff LaMarche
For custom drawing like you want, you will have to override both NSButton and NSButtonCell, and you have to specify the new NSButtonCell class by overriding the cellClass method inyour NSButton's subclass. You'll actually do your drawing in the drawWithFrame: method. It is not a simple pro

NSFileHandle and sockets

2008-03-20 Thread Jeff LaMarche
Thanks to help from several people on the list, I got NSFileHandle working with remote sockets, and wrote a category on NSFileHandle to make it easier to use it that way. Since it would not have been possible to write this without the help of several people on this list, I thought I'd make

Re: Using C++ classes from Objective C

2008-03-20 Thread Jeff LaMarche
What about the UTF8String method? It replaces the old lossyCString method and should give you a pointer to a c string Sent from my iPhone On Mar 20, 2008, at 3:34 PM, Jeremy <[EMAIL PROTECTED]> wrote: Thanks everyone! Using a void* for the member variable of my wrapper class did the trick

Re: Beginner with Cocoa

2008-03-21 Thread Jeff LaMarche
On Mar 21, 2008, at 3:00 PM, Alex Handley wrote: Hi, I have previously programmed in java and a few scripting languages and was wondering if anyone had any suggestion for learning cocoa, most of the tutorials I find are for pervious version Apple has this: http://developer.apple.com/docu

Re: Cocoa Database Connection

2008-03-21 Thread Jeff LaMarche
On Mar 21, 2008, at 7:50 PM, Justin Giboney wrote: So, libpq sounds like a well supported way to go, but when I import "libpq-fe.h" into my project I get an error that says "postgres_ext.h: No such file or directory", along with 30 more errors which I assume are related to the lack of this

Re: base64 NSData to NSString

2008-03-22 Thread Jeff LaMarche
I really wouldn't do it this way. There are many ways of doing this within your app without spawning a task. LibCrypto offers functions for encoding and decoding Base64 as does LibSSL (which is going to be the same code as you're currently trying to use, but without spawning a task). Ther

Re: Height of UIToolbar

2008-03-23 Thread Jeff LaMarche
I think you missed the memo. We're not to discuss the iPhone SDK on this list because its under NDA and this is a public list. Sent from my iPhone On Mar 23, 2008, at 2:27 PM, Kevin Albrecht <[EMAIL PROTECTED]> wrote: How do you get the height of a UIToolbar? I am using the UIToolbar simila

Re: Height of UIToolbar

2008-03-23 Thread Jeff LaMarche
Unfortunately, not yet :( We've been getting mixed messages from people @Apple on all things iPhone... think they were a little overwhelmed by the response to the SDK. Sent from my iPhone On Mar 23, 2008, at 3:56 PM, Kevin Albrecht <[EMAIL PROTECTED]> wrote: Ah, sorry. Where can this be d

Re: Beginner with Cocoa

2008-03-24 Thread Jeff LaMarche
On Mar 24, 2008, at 12:44 AM, Sherm Pendley wrote: The main thing you'll have to watch for: Objective-C 2.0 has garbage collection available, like Java and scripting languages you're familiar with, but it's off by default, and earlier Macs don't have it. You'll probably have to learn the old wa

Re: Quickly remove contents from NSArrayController

2008-03-24 Thread Jeff LaMarche
I would think that [itemBrowserArrayCTRL removeAllObjects]; would be your best. By calling arrangedObjects and feeding it to removeObjects:, you're causing your array to sort all 15000 entries before it removes them individually. HTH Jeff On Mar 24, 2008, at 10:16 AM, Martin Linklater wrot

Re: Quickly remove contents from NSArrayController

2008-03-24 Thread Jeff LaMarche
Doh! You're right if course. How about using removeSelectedIndexes:? Should be faster than sorting the contents before removing them, Sent from my iPhone On Mar 24, 2008, at 10:26 AM, Martin Linklater <[EMAIL PROTECTED]> wrote: I would think that [itemBrowserArrayCTRL removeAllObjects];

Core Data & Passwords

2008-03-24 Thread Jeff LaMarche
When writing a Core Data application that utilizes Core Data, what is the best way to store sensitive information like a password? My assumption would be that you would make a password attribute, but make it transient, then override the accessor and mutator to utilize Keychain Services so t

Re: Beginner with Cocoa

2008-03-24 Thread Jeff LaMarche
On Mar 24, 2008, at 1:43 PM, colo wrote: Well I have to say. None of that sounds like any fun what so ever. In fact it sounds a little anti-constructive with the amount of time it would take to get anything out the door let alone prototyped to a beta. Then don't judge a book b

Re: Cocoa Database Connection

2008-03-24 Thread Jeff LaMarche
Did you include libpq.a from the /lib folder of our PostgreSQL implementation? On Mar 24, 2008, at 3:21 PM, Western Botanicals wrote: Thank you to everyone who has responded so far. I ended up fixing the problem by importing the "postgres_ext.h" file into my project (I wish I could have j

Core Data & Sheet problem

2008-03-25 Thread Jeff LaMarche
Okay, I know I've had this problem before a couple of years ago when Core Data was fairly new, but searching the archives didn't turn anything up and I think I've just been looking at it too long - it's probably something really obvious, but... I have a custom sheet with several text field

Re: Core Data & Sheet problem

2008-03-25 Thread Jeff LaMarche
Never mind. I got it working. When you reach a certain point, you should just walk away from a problem I guess Setting the sheet's first responder to nil is now working, but I do it when the button is pressed, not in my sheet callback method. On Mar 25, 2008, at 7:59 AM, Jeff LaM

Re: NSDictionary with bool and float

2008-03-28 Thread Jeff LaMarche
Take a look at NSValue and NSNumber http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSValue_Class/Reference/Reference.html http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html They can be used to store raw

Getting view to update from changes made in thread using Core Data

2008-03-28 Thread Jeff LaMarche
I'm detaching a thread to handle some processing. In that thread, I create a new NSManagedObjectContext using the same NSPersistentStoreCoordinator from the main thread. I pass into the thread the NSManagedObjectID of an entity and my thread creates new entities and adds them as children o

Re: Threads and Core Data, bindings results in view corruption

2008-03-29 Thread Jeff LaMarche
Dave: Are you using separate managed object contexts for each thread? According to the documentation here: http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdMultiThreading.html That's the way to do it - pass managed object IDs between threads, not managed object

NSFileHandle / NSConcreteFileHandle problem

2008-03-30 Thread Jeff LaMarche
I'm having an unusual problem with an NSFileHandle. I'm creating an NSFileHandle and initializing it with a file descriptor that's actually a network socket. I'm able to send and receive data using it and it works fine. Then, I pass the NSFileHandle instance as the first argument of an NSIn

Re: NSFileHandle / NSConcreteFileHandle problem

2008-03-30 Thread Jeff LaMarche
On Mar 30, 2008, at 3:30 PM, Jeff LaMarche wrote: [invocation target] performSelector:[invocation selector] withObject:fh]; Actually, that would be: [[invocation target] performSelector:[invocation selector] withObject:con]; missed a bracket when I copied and pasted

Re: core data and sqlite db store problem

2008-03-31 Thread Jeff LaMarche
Core data stores metadata as well as data in the sqlite3 file and follows a very specific naming convention for the regular data tables and columns. You'd probably be better off writing a small migration utility to import the data you need than to try create a sqlite3 database in the right

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread Jeff LaMarche
David: I can't speak for Apple (I'll leave that to Ben), but there are a few things to keep in mind here: 1) Core Data is still a relatively new technology. Sure, it came out with Tiger, but since using it keeps your app from running on earlier versions of OS X, a lot of software projects

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread Jeff LaMarche
On Mar 31, 2008, at 2:36 PM, David wrote: On Mon, Mar 31, 2008 at 2:26 PM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: 4) You can, as Ben mentioned, use performSelector:onMainThread: to actually have the object inserted on the main thread's context. It's a bit of a pain,

KVO question on Tree Controllers

2008-04-01 Thread Jeff LaMarche
I've registered to receive notifications from an NSTreeController instance loaded from a nib, like so: [treeController addObserver:self forKeyPath:@"selection" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:NULL]; I've also tried using @"s

Re: Need for a creator code?

2008-04-01 Thread Jeff LaMarche
On Apr 1, 2008, at 4:22 PM, Ricky Sharp wrote: Here's a FAQ, but it's kinda vague on the "why": Not only are they vague, they refer you to documents that are marked as "legacy". I was actually surprised to see they left creator codes in Xcod

Question about NSOutlineView and NSTreeController

2008-04-02 Thread Jeff LaMarche
I posted a question yesterday, and some of the responses were very helpful (thanks, by the way), but also showed me I didn't fully understand what I needed to ask. After several more hours of exploration last night, I think I have a grasp on my real question. My problem comes down to this (

Re: what is the proper place to store application settings

2008-04-09 Thread Jeff LaMarche
I'm assuming that these will change, but should not be changed by the user, correct? It seems to me that you'd want to avoid compiling them into your classes using #define, I think a property list included as bundle resource is the way to go. http://developer.apple.com/documentation/Cocoa

*** -[NSConcreteFileHandle availableData]: Invalid argument

2008-04-09 Thread Jeff LaMarche
I'm periodically getting this message *** -[NSConcreteFileHandle availableData]: Invalid argument printed to the console of an application I'm working on. I'm confused about what it means because availableData doesn't take an argument. Here's what I'm doing: I'm using NSFileHandle to handle

Re: what is the proper place to store application settings

2008-04-09 Thread Jeff LaMarche
Actually, I agree... if this is a configuration parameter that he wants the user to be able to set. Since he was talking about using preprocessor directives, I made the assumption that this was not supposed to be user-configurable for some reason. In hindsight, that was probably a stupid as

Re: Core Data, Threads and Document based app

2008-04-11 Thread Jeff LaMarche
On Apr 11, 2008, at 2:37 AM, Thomas T wrote: - How can I create objects in my nsoperation when I don't have a persistent store yet. I really couldn't ask the user to save the document before beginning the download. - In document based apps - how should I create my second NSManagedObject context

Re: is this badly written code?

2008-04-15 Thread Jeff LaMarche
On Apr 14, 2008, at 10:53 PM, Adam Gerson wrote: In cocoa its very tempting to write a single line of code like: NSManagedObject *selectedTreeObject = [self delegate] mainWindowController] treeController] selectedObjects] objectAtIndex:0]; or to flush it out in to individual lines: NSWind

Re: is this badly written code?

2008-04-15 Thread Jeff LaMarche
On Apr 15, 2008, at 10:25 AM, john darnell wrote: 4.) Comment verbosely and often. You may understand now what you are doing and why, but six months from now, you won't. Don't fool yourself by saying "I'll add comments later," because, trust me, later never comes. I'm not going to argue

Re: Subclassing NSArrayController

2008-04-15 Thread Jeff LaMarche
On Apr 14, 2008, at 11:53 PM, antikraft clover wrote: If I am subclassing NSArrayController to provide and update an array of objects, which methods do I need to implement ? What are you trying to accomplish. The only time that I regularly subclass NSArrayController is to implement drag and

Re: to write to file except NSData*

2008-04-15 Thread Jeff LaMarche
On Apr 15, 2008, at 10:38 AM, Nick Rogers wrote: Hi, I am creating a file with: NSFileManager *fileManager = [NSFileManager defaultManager]; [fileManager createFileAtPath:path contents:nil attributes:nil]; === then I got a fileHandle as: NSFileHandle *fileHandle = [NSFileHandle fileHan

Re: Complex data for webservices

2008-04-21 Thread Jeff LaMarche
Niklas: I'm no expert on Web Services on Objective-C, but I've been playing around with them a bit. One thing that I have discovered is that CFTypeRef is not _always_ a dictionary. In some cases, it wants a string. For example, if you run WSMakeStubs on the National Weather Service's WSD

Re: Complex data for webservices

2008-04-23 Thread Jeff LaMarche
w.ethereal.com/ ), which lets you filter by application. It should become pretty obvious from the communication what your stubs are doing with the argument you give it, and what the response is. HTH Jeff On Apr 23, 2008, at 8:41 AM, Niklas Saers wrote: Hi Jeff, and thanks for answering :-

Re: Xcode debugger quality

2008-05-01 Thread Jeff LaMarche
On May 1, 2008, at 9:47 AM, Simon Wilson wrote: Not sure how you got the impression I'm a C++ or Carbon programmer as I didn't mention anything to this effect. Sorry, it was meant as a general comment, not directed at you, I just quoted part of your e-mail because it seemed to sum up the o

Re: ANN: CDBStore, a lightweight persistent dictionary

2008-05-02 Thread Jeff LaMarche
On May 2, 2008, at 9:07 PM, Jens Alfke wrote: CDBStore is a kind of middle ground between simple property-lists or archived objects, and CoreData. There's a very large empty space there, and I kept getting annoyed by having to cobble together yet another bit of code to read and write a dict

Re: ***Junkmail*** How do I programaticly create a va_list

2009-01-13 Thread Jeff LaMarche
I can reinforce Bill's advice here. I tried to do this same thing once, fairly recently actually, so that I could subclass a Foundation class that had a variadic init method. I lost several hours of my time and a lot of my sanity trying to find a way to make it work before giving up. On

[Announce] Cocoa Barcodes is now open source and available on Google Code

2008-10-23 Thread Jeff LaMarche
I just finished checking in the source code for Barcode Generator, a Cocoa program I wrote a few years ago into Google Code as an open source project (BSD Licensed). It contains a fairly easy-to-use set of classes for generating 2D barcodes. http://code.google.com/p/cocoabarcodes/ Project

Re: ActiveRecord on Cocoa

2008-11-11 Thread Jeff LaMarche
Here's another one to consider: http://code.google.com/p/sqlitepersistentobjects/ It's similar to ActiveRecord, but is designed to be zero- configuration. I tend to think of it as "reverse-ActiveRecord" because instead of populating the object based on the database table, we create the data