Re: Question about the Foundation Framework

2009-02-19 Thread Andreas Monitzer
On Feb 19, 2009, at 16:36, Michael Ash wrote: Nothing to do with OOP, it's just good practice on the system. Temporary files go in the temporary directory. There are several reasons why this is a good idea: - The temporary directory gets cleaned out regularly by the system. If you forget to

Re: CSV parsing (large files)

2008-07-30 Thread Andreas Monitzer
On Jul 30, 2008, at 08:14, Simone Tellini wrote: Keep a prepared SQLite insert statement and reuse it for all the lines, binding the parameters for each line. Don't load the whole file in memory: it's just a waste of memory and time to allocate it. Instead parse a line at a time. mmap()

Re: NSData text representation

2008-06-19 Thread Andreas Monitzer
On Jun 19, 2008, at 20:50, Trygve Inda wrote: In my plist (xml1 format) I see something like: data +/YgByAMQo78MBADoA /data However when I send a [myNSData description] I get something like: 4705 78da8d53 cb4ac340 146d1ea0 a0b8f133 5c09 How can I get something more like the first

Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Andreas Monitzer
On Jun 18, 2008, at 01:22, Louis Gerbarg wrote: It sounds like what you want to do is here is subclass NSApplication, with a replacement implementation of sendEvent that decodes the incoming events, marshals the NSEvent's parameters, then sends them to your C++ code for processing. If your C++

Re: Cocoa, C++, Keyboard input and Timers

2008-06-16 Thread Andreas Monitzer
On Jun 16, 2008, at 23:47, Josh de Lioncourt wrote: To that end, we're redeveloping many old titles, primarily in C++ for the bulk of the coding to make porting between Mac and Windows simpler. The games have no graphical interface to speak of, only an audio one. First off, Cocoa

Re: How can an object know when another object has gone away?

2008-06-15 Thread Andreas Monitzer
On Jun 16, 2008, at 00:20, James W. Walker wrote: Is there a standard Cocoa design pattern or idiom to have an object find out when another object has been destroyed? In PowerPlant, I'd use LBroadcaster and LListener, with the listener listening for msg_BroadcasterDied. What about using

Re: TDD/BDD testing methodologies?

2008-06-09 Thread Andreas Monitzer
On Jun 09, 2008, at 15:34, David Troy wrote: Part of the kool-aid in Ruby land is test-driven and behavior driven development practices (TDD/BDD). To go from that approach, where you generally start writing tests and specs before you start writing code, to Cocoa, where I get a lot of OO