Search Results

Search found 14 results on 1 pages for 'jasonbogd'.

Page 1/1 | 1 

  • Math for core animation?

    - by jasonbogd
    What is a good level of math required for, like, advanced core animation? Take this for example: http://cocoadex.com/2008/01/lemur-math.html And what's a good book/resource to learn it? -Jason

    Read the article

  • What topic in computer science is this?

    - by jasonbogd
    Hi, I am trying to figure out what 'topic' this is called, so I can learn more about it. Basically, I'm talking about designing my applications's architecture. I'm not talking about algorithms. More like -- this class should have these methods and these instance variables, and communicate with this class in this way, this class should have these responsibilities etc. Can anybody tell me what the name of this topic is called and how I can get better at doing this? Thanks.

    Read the article

  • Zooming in an NSView

    - by jasonbogd
    Hi, I have an NSView in which the user can draw circles. These circles are stored as an array of NSBezierPaths, and in drawRect:, I loop through the array and call -stroke on each of the paths. How do I add a button to zoom in and out the NSView? Just change the bounds of the view? Thanks.

    Read the article

  • Aaron Hillegass Chapter 18 Challenge Question

    - by jasonbogd
    I am working through Aaron Hillegass' Cocoa Programming for Mac OS X and am doing the challenge for Chapter 18. Basically, the challenge is to write an app that can draw ovals using your mouse, and then additionally, add saving/loading and undo support. I'm trying to think of a good class design for this app that follows MVC. Here's what I had in mind: Have a NSView-subclass that represents an oval (say JBOval) that I can use to easily draw an oval. Have a main view (JBDrawingView) that holds JBOvals and draws them. The thing is that I wasn't sure how to add archiving. Should I archive each JBOval? I think this would work, but archiving an NSView doesn't seem very efficient. Any ideas on a better class design? Thanks.

    Read the article

  • Understanding Rails core source code?

    - by jasonbogd
    Hi, I would like to start making code patches to Rails. Are there any good books on 'advanced' Ruby that I should read to understand the rails source code? Are there any other tips on getting started? Rails seems like a large beast and I don't know where to start! Thanks, Jason.

    Read the article

  • Gracefully exiting from thread in Ruby

    - by jasonbogd
    Hi, I am trying out Mongrel and using the following code: require 'rubygems' require 'mongrel' class SimpleHandler < Mongrel::HttpHandler def process(request, response) response.start(200) do |head, out| head["Content-Type"] = "text/plain" out.write("Hello World!\n") end end end h = Mongrel::HttpServer.new("0.0.0.0", "3000") h.register("/test", SimpleHandler.new) puts "Press Control-C to exit" h.run.join trap("INT") do puts "Exiting..." end Basically, this just prints out "Hello World!" when I go to localhost:3000/test. It works fine, and I can close the program with Control-C. But when I press Control-C, this gets outputted: my_web_server.rb:17:in `join': Interrupt from my_web_server.rb:17 So I tried putting that trap("INT") statement at the end, but it isn't getting called. Solution? Thanks.

    Read the article

  • Difference between mutableArrayValueForKey and calling insertObject:inEmployeesAtIndex: directly

    - by jasonbogd
    I have a question regarding using KVO-compliant methods to insert/remove objects from an array. I'm working through Aaron Hillegass' Cocoa Programming for Mac OS X and I saw the following line of code (in the insertObject:inEmployeesAtIndex: method: [[undoManager prepareWithInvocationTarget:self] removeObjectFromEmployeesAtIndex:index]; Correct me if I'm wrong, but I always thought it was better to call mutableArrayValueForKey: and then removeObjectAtIndex:...so I tried changing the above line to this: [[undoManager prepareWithInvocationTarget:[self mutableArrayValueForKey:@"employees"]] removeObjectAtIndex:index]; And it didn't work. Can someone explain the difference and why the first line works but the second line doesn't?

    Read the article

  • NSTextField and hidden property

    - by jasonbogd
    Hi, I have an NSTextField that I hide when the user presses a button. I hide the text field using [textField setHidden:YES]; The problem is that is the user is typing in the text field (i.e. the text field is first responder) and the user presses the return key (which is the key equivalent for the button that hides the text field) the user can keep typing in the text field even though its not visible. How do I correctly remove a text field without actually deallocating it? Thanks.

    Read the article

1