Re: What's wrong with my NSMutableArray?

2009-06-12 Thread Devon Ferns
You need to retain your array since arrayWithCapacity returns an autoreleased object. And in dealloc, release the array, and set to nil if you want to but not necessary. Devon Allan Greenier wrote: This is so simple I know the answer will embarrass me. This is an iPhone app. I've got an NSM

Re: iPhone cannot compile 2.2 SDK application for 3.0 SDK

2009-07-15 Thread Devon Ferns
It seems to be a bug with GCC 4.0. Set the compiler to GCC 4.2 for SDK 3.0 or higher. Devon On 2009-07-15, at 7:07 AM, Graham Cox wrote: On 15/07/2009, at 7:18 PM, Shraddha Karwan wrote: error: syntax error before 'AT_NAME' token error: syntax error before '}' token fatal error: method d

Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Devon Ferns
I agree. It's not like what's in the SDK is super secret. Anyone can download it. Devon Tom Harrington wrote: Oh, they do allow it, despite what the moderators here say. You just have to use the appropriate Apple forum. Apple's support forums have a "developer" section with no shortage o

Re: Creating AppControllers in InterfaceBuilder 3.1

2008-06-30 Thread Devon Ferns
You shouldn't even have to drag it into IB. IB should pick up any new classes you create in XCode. Devon Tommy Nordgren wrote: On 30 jun 2008, at 16.14, [EMAIL PROTECTED] wrote: Hi I'm writing my first project in Leopard and can't figure out how to accomplish the old "Subclass NSObject/G

Re: string to float

2008-07-04 Thread Devon Ferns
What about replacing the , with a . and using NSString's floatValue function? Devon Robert Cerny wrote: Hi folks, I made a parser, which returns values like 10,45. It means, it has comma as a decimal point delimiter, which is correct in my language. I was trying to find a way to convert to N

Re: SOAP server framework?

2008-07-13 Thread Devon Ferns
Check out nusoap which is a php soap framework/library. It's really easy to set up your own soap functions on the server and it generates the WSDL file for you dynamicall Devon On 13-Jul-08, at 6:34 PM, Stefan wrote: Am 13.07.2008 um 23:08 schrieb Jens Alfke: On 13 Jul '08, at 12:15 PM,

Re: notification when app is moved

2008-07-17 Thread Devon Ferns
Why not just call it every time it starts up? I can't imagine the overhead of the API call is very high. Devon. Mitchell Livingston wrote: How can I call it again if I don't know it moved? Waiting until it fails is a bit too late in the process. Sure, chances are the app won't move, but why

Re: global NSMutableDictionary

2008-07-29 Thread Devon Ferns
I think you probably want to use the singleton design pattern rather than that global variable. Devon. Nathaniel Gottlieb-Graham wrote: I am trying to implement a global variable that's an NSMutableDictionary. Up until now I've achieved this by making globalVariables.h and .m files to hold g

Re: Checking for hackintosh

2008-07-30 Thread Devon Ferns
Someone hacks the OS X kernel to bypass Apple's checks for a legitimate Macintosh and usually posts it to some p2p site where people steal(copyright infringe) it and run it on their home build PCs. Devon Tim McGaughy wrote: On Jul 29, 2008, at 9:22 PM, John Joyce wrote: Does anybody have a

Re: Newbie Error on Loading XML

2008-08-11 Thread Devon Ferns
You're missing some parameters for initWithContentsOfURL The full method signature is - (id)initWithC

Re: Accessing memory of another application?

2008-08-13 Thread Devon Ferns
Jason Coco wrote: The manpage also fails to mention the undocumented PT_DENY_ATTACH flag that applications can pass to force ptrace to fail to attach. Pro Tools, for example, does this because the "programmers" who wrote it spent twice as much time on the copy protection as on the actual ap

Re: @try @catch

2008-08-14 Thread Devon Ferns
On 14-Aug-08, at 7:21 AM, Graham Cox wrote: On 14 Aug 2008, at 8:58 pm, Georg Seifert wrote: is it recommended to use @try .. @catch blocks as flow control like it is used in Python. They say explicitly to use it rather than do a lot of test before just try if it works to look after it on

Re: creating files to write data to?

2008-08-15 Thread Devon Ferns
NSFileHandle writeData takes an NSData pointer not a string and that's actually not how you do a string, you're missing the @ in front of it.

Re: Preferred Wrapper for TCP Sockets Over Local Network?

2008-08-16 Thread Devon Ferns
I've used AsyncSocket before but not too extensively. It seems to work just fine and I don't really have any complaints about it. Devon On 16-Aug-08, at 2:27 PM, Brad Gibbs wrote: Hi, I'm looking for a Cocoa class to establish a TCP socket with another machine on a local network (non-OS

Re: [ANNOUNCE] SQLite Persisted Objects for Cocoa

2008-08-26 Thread Devon Ferns
Col. One question. What happens if you change your object's properties? Is the database automatically updated with the new fields? What about pointers to other custom classes? Would that work if those classes inherit from SQLitePersistentObject? I'll definitely have to check this out

Re: confused about allocating and releasing objects

2008-08-27 Thread Devon Ferns
If you had access to the NSDictionary source code you'd find that the NSDictionary's +dictionaryWithContentsOfFile:(NSString*)fileName would probably look something like this: +(NSDictionary*) dictionaryWithContentsOfFile:(NSString*)fileName { return [[[NSDictionary alloc] initWithConte

Re: Multi DB Library

2008-09-17 Thread Devon Ferns
OS X has libsqlite3 built in. You just have to include the header file and link to the library. It's C based and you can write an Objective-C wrapper functions around it. There are already some good ones like FMDatabase or Quicklite. Devon dreamcat7 wrote: Hi, As a developer I aswell am f

Re: Multi DB Library

2008-09-17 Thread Devon Ferns
He was talking about using a local sqlite cache so at least in my view I don't see the point in using ODBC for that. SQLite really doesn't have too much different from generic SQL that would make it hard to learn especially since there are some nice wrapper classes around it already. Devon T

Re: More - Safari Download Security Alerts

2008-12-15 Thread Devon Ferns
This is OT for the Cocoa list now, but you can set an EULA to be displayed when mounting a dmg. I don't know how since I've never cared to check but many apps do it so it's possible. You could just have the user drag the whole folder to the installation directory with an EULA being displayed

Re: Create UILabel to fit into text size

2008-12-30 Thread Devon Ferns
Here's how I do it for a UIButton which is centered in the view/window and has some padding added around the text. You'll most likely have to set a maximum size for your label width as well and change the font size to suit your needs. #import NSString* buttonText; CGSize fontSize = [button

Re: Security With Show Package Contents?

2009-01-12 Thread Devon Ferns
Have you checked if the new Pages file format is now binary instead of a package? That would be my guess. I don't see how you can stop anyone from listing a directory structure. Devon Chunk 1978 wrote: so i was a little put off after purchasing iWork '09, because i could no longer access "S

Re: Aquatic Prime + PayPal With Multiple Apps?

2009-01-13 Thread Devon Ferns
With Paypal IPN you can put in custom variables or different URLs for different products like /ipn.php?product=1, /ipn.php?product=2 etc. In your php script you could just load the correct key pair depending on the URL parameters or custom variables passed. Devon Chunk 1978 wrote: i've been

Re: Thank you for listening Apple!

2008-10-01 Thread Devon Ferns
Wow, hell froze over Roland King wrote: I would suggest we have to wait for the actual agreement and for the list maintainer to get some kind of guidance from apple. It looks like very positive news but .. currently we're still bound I think. On Oct 1, 2008, at 11:22 PM, Alexander Griekspoor

Re: corrupt coredata DB

2008-10-08 Thread Devon Ferns
DELETE FROM zplayedtrack WHERE z_opt = null I don't know much about CoreData but maybe you can't bind null parameters in SQLite? Devon Marc Monguio wrote: I have a coredata application that uses sqlite3 for persistence. One of my users reported that his application was not responsive and sho

Re: Retain

2008-10-24 Thread Devon Ferns
I've done stuff like this by accident but doesn't it actually crash later on when the auto release pool runs to release memory and not actually at the release? This is a good use of NSZombies if you have strange crashes. Devon Mike Abdullah wrote: BUT NOT: NSString w = [NSString stringWit

Re: Parsing xml files in Cocoa applications

2008-10-31 Thread Devon Ferns
NSXMLParser is also good if you don't know or don't care what the order of the elements are in your XML file. Devon Nicko van Someren wrote: It is worth noting that while the event-driven NSXMLParser class is available on the iPhone, NXSMLDocument and its friends for the XML DOM are NOT avai

Re: NSTimer issue

2008-11-05 Thread Devon Ferns
Does self implement the selector? It sort of sounds like you're passing it a selector implemented by a different class and not by whatever class is self in this instance. The selector should be implemented by the target. Devon Daniel Luis dos Santos wrote: In the target argument I pass self

Re: ActiveRecord on Cocoa

2008-11-11 Thread Devon Ferns
Maybe he wants to use it where there is no Core Data i.e. iPhone. This was announced a few months back for storing in sqlite http://code.google.com/p/sqlitepersistentobjects/ I haven't used it myself since I'm not sure if it's been enhanced to automatically alter the table if you have the table

Re: Autorelease Question

2008-11-21 Thread Devon Ferns
The docs say autoreleased as he already said which may not always be true. Devon Filip van der Meeren wrote: I quote: "For objects that never get released, this method should return UINT_MAX". So where do you see your bug ? Filip van der Meeren http://www.sourceforge.net/projects/xlinterp

Re: NSDictionary mutability test

2008-12-08 Thread Devon Ferns
Instead of using exceptions, wouldn't -(BOOL)respondsToSelector:(SEL)aSelector work if you test for an NSMutableDictionary mutable method? Or does that not work with class clusters either(can't try it since I'm not at home) Devon [EMAIL PROTECTED] wrote: Thanks for the reply. I am aware of