CAShapeLayer for Drawing Lines; Animations Skewed

2009-09-10 Thread Christopher J Kemsley
Hi all, In my current development project, I have numerous dots that will be moved around periodically, each connected by a line. The dots are represented as CALayers, with the "contents" set to a simple 20x20 dot, and they are moved around by animating the "position" property. The conn

CALayer renderInContext not rendering all sublayers

2009-09-13 Thread Christopher J Kemsley
Hi all, I've been unable to find anything on this through Google searches... I'm building for x86_64 on Snow Leopard. I have a window containing a view whose layer has two sublayers, set up like this: - (void)awakeFromNib { [self setWantsLayer:YES] ; points

Re: singleton pattern in cocoa

2009-09-14 Thread Christopher J Kemsley
About the only thing that I'd recommend is that the "static" be inside the +sharedSingleton method so that you aren't able to take the cheap- way-out and call that variable directly in other class methods before it's created. For the rest of it: it seems to follow Apple's patterns - for in

CARenderer Example

2009-09-21 Thread Christopher J Kemsley
Hi all, I've been trying to make a class to record CALayers and their animations to QuickTime movies. I've only found two ways to do this: Poll and renderInContext I can have a timer running at some rate, and I use that to tell the layer's presentationLayer renderInContext:(someBitmapCon

CAKeyframeAnimation for 'position' not working

2009-10-01 Thread Christopher J Kemsley
(Note: I apologize for not having this nicely formatted. My previous message - 8kB over the size limit - was rejected because it was too large, so I had to remove the extra HTML) I have a CAKeyframeAnimation that simply will not work. I have a layer. When I apply a CABasicAnimation to it, i

Re: CAKeyframeAnimation for 'position' not working

2009-10-01 Thread Christopher J Kemsley
last object being set as exactly 0 and 1, but still nothing happens... On 1 Oct 2009, at 3:05 PM, David Duncan wrote: On Oct 1, 2009, at 2:45 PM, Christopher J Kemsley wrote: The output, from the print statements, to show that it has VALID values, is: 2009-10-01 13:11:00.887 Whose

Re: View shifted up on iPhone simulator

2009-10-02 Thread Christopher J Kemsley
Hmm I have a few comments: It look like you're seeing the superposition of two problems that look like one: 1) The status bar is covering up the very top of your view in the sim 2) The bottom button is 20px further from the bottom in the sim The interface builder likes to make views defaul

Networking

2009-07-13 Thread Christopher J Kemsley
I'm not sure how to begin this, so I'll start off with what I have. What I have: Device A and Device B. Device A is connected to the internet (at address The Address, and has port The Port routed to it for instance) Device B is also connected to the internet, but is not on the same loca

NSSocketPort initRemoteWithTCPPort is never valid

2009-07-13 Thread Christopher J Kemsley
This is just a quick question for anyone who may know (or, at least I hope it's quick) If I declare a port: port = [ [NSSocketPort alloc] initRemoteWithTCPPort:portNumber host:hostName ] ; And use it with an NSConnection, it works. If I use that same port in any other way (such as NSFile

Looking for a method to Lock and Unlock the computer

2009-07-29 Thread Christopher J Kemsley
Hi all, I'm looking to write a program to run in the background and do the following: • Listen for Event A • If Event A occurs, either Sleep Display or Display Login Screen • Listen for Event B • If Event B occurs, log-in to a specific account Listening for the event is not a problem. How

Design Paterns: +/- Initializers and Subclassing

2009-08-02 Thread Christopher J Kemsley
Ok, so here's the deal: I have a class (CYMethod) that provides a standard interface for multiple implementations of the same type (multiple ways in which to read a file, for instance). Here are its constructors: + (CYMethod*) method { return [ [ [CYMethod alloc] init ] a

Re: Design Paterns: +/- Initializers and Subclassing (Solved)

2009-08-03 Thread Christopher J Kemsley
Oh yeah - I thought I did that once and it didn't work... Though, now that I think about it, I think I did it the other way in the past (used self in a +method to refer to a newly created object) So, in all reality, the +method could be boiled down to: [self.new autorelease] ; since self.

QuickTime Animation Rendering

2009-08-25 Thread Christopher J Kemsley
Hi all, I have a project where I will be drawing nothing more than simple circles with lines connecting them. At some point, I will be animating these lines and circles to move them to another position. I would like to: (1) Display these, animated, on the screen; and (2) Render the animat

NSTextField "setStringValue" method - deallocates?

2008-06-14 Thread Christopher J Kemsley
I'm new to Obj-C, and I'm trying to make sure I start off writing good code so I don't have to come back and learn how to avoid dirty code and/or memory leaks. That being said, if I do the following: NSString *someString = [ NSString stringWithString:@"Hello World!" ] ; [ someNSTextField se

NSTableView problems when 0 items

2008-06-15 Thread Christopher J Kemsley
I have an NSTableView object and an NSPopUpButton that I use to select a category of information to display in the table... The problem is this: If I select a category with 0 items in it, the table view will update as expected... but, if I select one with more than one item right afterward

NSString's "mutableCopy" creating a leak?

2008-10-01 Thread Christopher J Kemsley
I'm writing a program that, in one table view, has the following code: id receivedName = [theDatabase itemAtIndex:editedRow] ; editedRowName = [receivedName mutableCopy] ; [receivedName release]; where "editedRowName" is defined as an NSMutableString. [theDatabase itemAtIndex:editedRow]

Re: NSString's "mutableCopy" creating a leak?

2008-10-01 Thread Christopher J Kemsley
Instead of replying to everybody individually, let me say this: I neglected to mention in my original post that, when this object is deallocated, it explicitly deallocated the editedRowName before calling a [super dealloc], so the thing should be deallocated.

Re: NSString's "mutableCopy" creating a leak?

2008-10-01 Thread Christopher J Kemsley
A bit more information about what's going on: The object is a subclass of UIViewController. When I click on something in a UITableView, it allocates this object and initializes it to use as an editor. Example: You're looking at a list of stuff, and you click on one of the object to bring