NSXMLDocument outputs numbers in exponential format?

2010-03-01 Thread Colin Cornaby
I'm working with NSXMLDocument and serializing it to a file... The issue is the serialized output contains numbers in exponential formal, i.e. installKBytes="1.744E3". Other programs aren't parsing this correctly... Is there any way to modify the output to just format the numbers normally? _

Re: Getting content out of a WebView

2009-09-22 Thread Colin Cornaby
I don't have example code handy, but I'd try parsing the DOM tree, which is abstracted by a series of Obj-C WebView classes. On Sep 22, 2009, at 5:53 PM, Eddie Aguirre wrote: I have a simple application which has a WebView and NSTextView and two buttons. Both views are editable. What I'd l

Creating new managed object on 10.4 problem

2009-08-12 Thread Colin Cornaby
Hey, I have a CoreData project with a schema that I layout by hand in a class (because the schema has to be used in a command line tool.) On 10.5 my code is working perfectly, but on 10.4 whenever my code attempts to create a new object, I get an exception. According to the stack trace it

Adding objects to NSMutableArray out of order?

2009-05-04 Thread Colin Cornaby
I'm dealing with some code that returns results out of order, but the results contain the proper index. In the end, I'd like to put them all into an NSArray, but unlike a C array, NSArray doesn't seem to allow me to simply reserve X number of slots and fill the slots as the results come in.

Re: IsBadCodePtr in Cocoa or Unix?

2009-04-16 Thread Colin Cornaby
I would suggest reading Microsoft's own notes on that function, which might tell you why it's a bad idea to use that function even under Windows, and give you a clue on how to do something similar on other platforms. You should probably look at catching a SIGSEGV, which should be possible,

[ANN] VirtualEarthKit - Microsoft Virtual Earth for Mac and iPhone

2008-11-14 Thread Colin Cornaby
I've been working with Microsoft recently in bringing their Virtual Earth services to the Mac and iPhone. The result is VirtualEarthKit, a BSD licensed Cocoa framework, managed completely independently of Microsoft. VirtualEarthKit provides several services to Mac and iPhone programmers, su

Exceptions vs. pointers to error objects

2008-10-28 Thread Colin Cornaby
I'm writing an API to communicate with a web service, and I was just wondering what the thinking is on exceptions vs. functions returning an NSError in some way. Basically I'm wondering what people's opinions are on a function throwing an exception on failure, vs returning an NSError object

Re: Apple Developer Forums

2008-10-24 Thread Colin Cornaby
I like the developer lists myself. It's nice to do things from an email client. On Oct 24, 2008, at 9:39 AM, René v Amerongen wrote: On 24 okt 2008, at 18:24, Eric Gorr wrote: On Oct 24, 2008, at 12:15 PM, Randall Meadows wrote: It looks like we're legit to discuss now!

NSURLConnection issues

2008-09-26 Thread Colin Cornaby
I'm doing an async NSURLConnection and am having issues. It's an http connection, and at first it seems to work. The server sends an authentication challenge (as it should), I respond with credentials, the servers seems to accept the credentials. Then the server responds with an HTTP header

Re: Did I reinvent the wheel?

2008-07-21 Thread Colin Cornaby
I've written a very similar framework for MySQL, and am gearing up to write one for Postgresql, so here's my opinion... (Apologies if one of these has already been addressed, or you've already looked at adding the feature...) • Write a table controller class. You can instantiate them in IB

Re: Read/Write to info.plist's LSEnvironment

2008-07-21 Thread Colin Cornaby
iPhone apps are signed (so are some Mac OS X apps). Modifying a signed app's Info.plist can cause things to go haywire. On the iPhone, it can cause the app to not work at all. Don't modify your own info.plist. It's the Apple recommended way. On Jul 21, 2008, at 10:32 AM, Lee, Frederick wrote

Re: Questions about Core Data and SQLite

2008-07-14 Thread Colin Cornaby
You might want to look into Postgresql instead. It's much nicer than MySQL at doing desktop applications stuff, and you can even "subscribe" to rows and have the server notify you when changes occur. This makes it much easier to keep clients in sync. MySQL is not great for doing desktop app

NSSearchField and NSTokenFieldCell?

2008-07-14 Thread Colin Cornaby
I have a program where I'd like the user to be able to drag in a NSTokenFieldCell into an NSSearchField. What would be the best strategy in implementing this? I'm assuming that I'm probably going to have to subclass the search field. In addition, I'm binding to the search field's predicate,

Re: How to implement Quartz GL ?

2008-07-04 Thread Colin Cornaby
QuartzGL is not currently available by default in OS X. You can turn it on with the Quartz Debug application. In addition, this message would probably be suited better for the Quartz discussion list. On Jul 4, 2008, at 10:42 AM, Mario Gajardo Tassara wrote: Hi to all, I am programming a

NSKeyPathExpression and message was received but not handled?

2008-06-05 Thread Colin Cornaby
I'm getting exceptions thrown like the following: id: An -observeValueForKeyPath:ofObject:change:context: message was received but not handled. Key path: firstName Observed object: Change: { kind = 1; } When I debug, "id" seems to be the description for a NSKeyPathExpression. I'm not a

Re: NSURLConnection sendSynchronousRequest crash

2008-05-30 Thread Colin Cornaby
_ #18 0x90e996f5 in _pthread_start #19 0x90e995b2 in thread_start I'll dink around with memory management, but my request looks valid... On May 30, 2008, at 8:42 AM, Shawn Erickson wrote: On Fri, May 30, 2008 at 8:35 AM, Colin Cornaby <[EMAIL PROTECTED]> wrote: Strangely enough

Re: NSURLConnection sendSynchronousRequest crash

2008-05-30 Thread Colin Cornaby
tion sendSynchronousRequest:request returningResponse:&returnResponse error:&requestError]; On May 30, 2008, at 8:12 AM, Jens Alfke wrote: On 30 May '08, at 12:55 AM, Colin Cornaby wrote: I'm using an NSURLConnection to

NSURLConnection sendSynchronousRequest crash

2008-05-30 Thread Colin Cornaby
I'm using an NSURLConnection to heavily query a server (basically I'm abstracting a MySQL database, and I have a Hessian server (basically SOAP) on the other end handling requests.) However, I keep having sendSyncronousRequest crash on me after periods of heavy load. The stack trace is: #

Re: Problems with object observing own key

2008-05-11 Thread Colin Cornaby
ge. I'll do some poking around, but I don't think this is a memory management issue. Wouldn't be the first time I've had to eat my words though. :p On May 11, 2008, at 2:47 PM, Kyle Sluder wrote: On Sun, May 11, 2008 at 5:19 PM, Colin Cornaby <[EMAIL PROTECTE

Re: Problems with object observing own key

2008-05-11 Thread Colin Cornaby
: On Sun, May 11, 2008 at 9:36 PM, Colin Cornaby <[EMAIL PROTECTED]> wrote: Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. What's does the stack trace look like from this breakpoint? Hamish ___ Cocoa-dev m

Problems with object observing own key

2008-05-11 Thread Colin Cornaby
I have an object that observes a few of it's own keys. This works fine. The problem comes at dealloc time... I get messages logged to the console for each of the it's own keys that the object is observing like: ] An instance 0x1c247f50 of class GSLayerView is being deallocated while key v

KVO Difficulties With Array Controller Selection didChange/willChange

2008-05-06 Thread Colin Cornaby
I have an array controller for a bunch of objects that are called "client". Clients have a one to many relationship with "records" (the relationship is accessible with the key "records). I am observing the array controller based on the key "selection.records". I'm running into a problem tho

Re: Core Animation Flickering

2008-04-26 Thread Colin Cornaby
ll get the test case working if I have time and post it to the list. I'm trying to get something prepped for ADA so I'm on a tight schedule here... On Apr 25, 2008, at 8:52 AM, John Harper wrote: On Apr 25, 2008, at 1:20 AM, Colin Cornaby wrote: I have a CALayer subclass, set

Re: Debugger at odds with reality?

2008-04-26 Thread Colin Cornaby
This might be a stupid question, but the person who is building against your framework is using a debug version as opposed to a release version, correct? On Apr 26, 2008, at 6:20 AM, Graham Cox wrote: I have a funny problem which is proving difficult to fix. I have a framework which I've w

Core Animation Flickering

2008-04-25 Thread Colin Cornaby
I have a CALayer subclass, set to redraw on bounds change, with the following draw code (I don't expect it to be meaningful, but I'm pasting it here for the sake of completeness.) - (void)drawInContext:(CGContextRef)ctx { CGRect bounds = CGContextGetClipBoundingBox(ctx); CGContextDra

Re: Core Animation Deadlock

2008-04-25 Thread Colin Cornaby
I still think there is an underlying bug in CoreAnimation. Certainly you shouldn't be able to cause a deadlock. If I can isolate the bug to a specific case I will build a test case and submit. On Apr 24, 2008, at 11:11 PM, Colin Cornaby wrote: Enabled NSZombie and friends didn't s

Re: Core Animation Deadlock

2008-04-24 Thread Colin Cornaby
r 24, 2008, at 7:38 PM, Colin Cornaby wrote: It looks like NSUIHeartBeat could be attempting to lock something. Although I could be wrong, it may not be related. The render thread got stuck while depth sorting: Thread 11 (process 13823 thread 0x8803): #0 0x90a27d9c in CARenderLayerDepthSor

Re: Core Animation Deadlock

2008-04-24 Thread Colin Cornaby
this lock or stuck trying to lock something else. Colin Cornaby wrote: Hi, I'm currently trying to track down a deadlock. After adding a series of layers, CoreAnimation deadlocks here on the main thread: #00x958af4ee in semaphore_wait_signal_trap #10x958b6fc5 in pthrea

Core Animation Deadlock

2008-04-24 Thread Colin Cornaby
Hi, I'm currently trying to track down a deadlock. After adding a series of layers, CoreAnimation deadlocks here on the main thread: #0 0x958af4ee in semaphore_wait_signal_trap #1 0x958b6fc5 in pthread_mutex_lock #2 0x909f8d72 in CAContextCommitTransaction #3 0x909f89bd in

NSKeyedArchiver and Forwards Compatibility Strategies

2008-04-19 Thread Colin Cornaby
I have an array of objects. The objects are all subclasses of one parent class. (For the sake of this email, I will say that the subclasses are all different kinds of graphics that can be displayed, and the superclass defines generalities that all graphics have in common.) My concern here

Getting selection of IKImageView?

2008-04-15 Thread Colin Cornaby
I have an IKImageView that I am using as a preview view for working with a flatbed scanner. I'd like the user to be able to select the area they want to scan with the selection tool, and then hit a scan button to do a high quality scan. The issue I am having is that I can't seem to find a w

Re: NSVector, CGVector Additions

2008-04-06 Thread Colin Cornaby
It doesn't really matter if your code is intended to dovetail Cocoa classes. Mike is right. Using the NSVector class name prevents Apple from using it later. (Although I'm glad someone else has taken note of the lack of vector structures and math.) Sent from my iPhone On Apr 6, 2008, at

CARenderer Memory Issue

2008-03-23 Thread Colin Cornaby
I sent an email to the list earlier asking about CoreAnimation memory use. I think I have that all resolved now, except for one memory usage issue with CARenderer. I am successfully rendering a layer tree that is never shown on the screen with a CARenderer. I set up a pixel buffer, and then

CoreAnimation Memory Use/Eating Memory

2008-03-22 Thread Colin Cornaby
I have a document based app that loads layers of certain sizes in a document based on user input. As I've been optimizing my app, I noticed that loading a 5000x5000 image into a layer causes my application to consume 200 more MB of memory. Seems a little high, but fair enough. But more inte

CATiledLayer too slow to update

2008-03-04 Thread Colin Cornaby
I'm using a CATiledLayer to render a large background in my CoreAnimation composition. A CATiledLayer seems to be best suited for the job due to the size of the composition. However, one problem I am running into is when the tiles become very small, the layer can be very slow to update. Thi

Tracking the movement of a CAScrollLayer

2008-02-27 Thread Colin Cornaby
I would like to track the movement of a CAScrollLayer. On a basic level, it's pretty simple. One could add an observer to the bounds key of the scroll layer and receive notifications of when it moves. However, what I want to do is a bit more complicated. I have another layer who's content i