Re: Custom progress bar for QTMovie??

2010-04-21 Thread Chase Meadors
I thought as much. In fact, I might just add a myCurrentTime property to my subclass that is implemented with this mechanism. Just checking to make sure there wasn't anything I missed. Thanks! On Apr 20, 2010, at 11:56 PM, Kyle Sluder wrote: On Tue, Apr 20, 2010 at 8:09 PM, Chase Me

Custom progress bar for QTMovie??

2010-04-20 Thread Chase Meadors
I'm making a completely custom CoreAnimation-based view that plays an audio media stored in a QT movie. However, I'm struck with an implementation problem with indicating the current time in the movie. Ideally, if QTMovie defined a currentTime property, I could use bindings or a binding-lik

An iTunes-like music playing view?

2010-04-19 Thread Chase Meadors
Hi All, I just wanted to hit up the list with this one before sitting down and coding. Has anyone made or know of a Cocoa music player view, with movable slider & All, text, somewhat similar in functionality to the iTunes view at the top of the window? QTMovieView is a bit too bland for my

Re: Alternative Location of Cocoa ID3 Framework??

2010-04-07 Thread Chase Meadors
10:43 PM, Jens Alfke wrote: On Apr 7, 2010, at 8:37 PM, Chase Meadors wrote: I went into the directory and ran configure and make. Everything looks like it went okay, but what file am I looking for? It depends. All projects are different. Did it create a “bin” or “lib” subdirectory? (Did y

Re: Alternative Location of Cocoa ID3 Framework??

2010-04-07 Thread Chase Meadors
(most likely through some 'make' command). Then you can add that library file to your Xcode project. --Jens {via iPad} On Apr 7, 2010, at 8:03 PM, Chase Meadors wrote: I must confess, the framework sounds great. However, I'm a little new at this, especially open-source.

Re: Alternative Location of Cocoa ID3 Framework??

2010-04-07 Thread Chase Meadors
I must confess, the framework sounds great. However, I'm a little new at this, especially open-source. I can't seem to sort out from Apple's guide on building open source binaries exactly how to do it. Could you give or direct me to a guide on what exactly I need to do to get the framework

Re: Alternative Location of Cocoa ID3 Framework??

2010-04-06 Thread Chase Meadors
I'd much appreciate it if you would look. That's precisely the purpose I need it for; to edit & change tags. Thanks a lot - Chase. On Apr 6, 2010, at 4:36 PM, Jens Alfke wrote: On Apr 5, 2010, at 9:10 PM, Chase Meadors wrote: I've been searching google for a while,

Alternative Location of Cocoa ID3 Framework??

2010-04-05 Thread Chase Meadors
I've been searching google for a while, and have repeatedly stumbled across mention of an Objective-C ID3 framework constantly linked to http://drewfamily.homemail.com.au/Cocoa_-_ID3Tag_framework.html However, I must be really late because this project seems to have fallen off the face of th

Re: Where in the MVC should my code go?

2010-03-01 Thread Chase Meadors
Just my 2 cents, but I see these possibilities: 1. If it's a fairly custom application, small, or simple, just combine the code with the view since it's likely that the view will not need to be particularly flexible or used over and over. 2. On the other hand, if you want the view to be mor

Correct Bindings Practices

2010-01-20 Thread Chase Meadors
I have a couple of questions about the practices I'm using for bindings in my app. 1. Doing work in the setter: Something I do alot when making models & custom views. For example, I might have a layer subclass that exposes a binding called "concentration." I @synthesize the property, but I

Re: What exactly does NSController do?

2009-11-20 Thread Chase Meadors
Thought I'd give the question another try. Any insight appreciated. On Nov 18, 2009, at 7:44 PM, Chase Meadors wrote: I wanted to add that my problem in the second part of my question has been solved. The only reason it wasn't working was that graphView is actually a CALayer, a

Re: What exactly does NSController do?

2009-11-18 Thread Chase Meadors
re strange, as now I have many working bindings systems in my code without any NSControllers. Binding to plain old NSObjects seems to be fine. What is the purpose of NSController? On Nov 18, 2009, at 7:11 PM, Chase Meadors wrote: Maybe I'm missing some things here, but hey; that's

What exactly does NSController do?

2009-11-18 Thread Chase Meadors
Maybe I'm missing some things here, but hey; that's what I come to the list for. I'm not fully understanding the need for NSController's and/or what they do. Say I have an NSObject subclass: (.h) @interface TestObject : NSObject { BOOL boolProp; } @property BOOL boolProp;

Re: Xcode can't find cpu_capabilities.h?

2009-11-08 Thread Chase Meadors
Apparently, the issue was just an error in my code. Somehow one of my arguments to memcpy was set to an astronomical number, and caused this cryptic error... But the issue is resolved, anyway. On Nov 8, 2009, at 12:52 PM, Jerry Krinock wrote: The first thing I'd try would be to run the pro

Re: Xcode can't find cpu_capabilities.h?

2009-11-08 Thread Chase Meadors
ed. Hope this helps John On 2009-11-07, at 11:27 PM, Chase Meadors wrote: I'm not sure if this is completely on-topic, but it seemed more relevant here than the xcode list. This issue has come up randomly a few times before, but it seems to be persisting now. All of the sudden, seem

Xcode can't find cpu_capabilities.h?

2009-11-07 Thread Chase Meadors
I'm not sure if this is completely on-topic, but it seemed more relevant here than the xcode list. This issue has come up randomly a few times before, but it seems to be persisting now. All of the sudden, seemingly caused by calling memcpy(), my program freezes with the the message "GDB: Xc

Splitting controller logic

2009-09-29 Thread Chase Meadors
Hi All, I'm having some conceptual trouble concerning using multiple windows with multiple controllers in a project. Where exactly is the line as to what a window controller subclass should manage, and what the App controller should manage? Say I have a window with a fair amount of contro

Bindings and C arrays

2009-09-17 Thread Chase Meadors
Hi All, My question is quite simple, actually. Is there any way to use bindings with C arrays? I have someone else's code I'm working with here, and it uses a BOOL[] array to manage a long array of states. I don't imagine that there's any way to make bindings work with this kind of array,

Re: Have sheet delay until done?

2009-09-01 Thread Chase Meadors
Thanks for your answer, I'll do just that. On Sep 1, 2009, at 9:59 PM, Graham Cox wrote: On 02/09/2009, at 12:50 PM, Chase Meadors wrote: the class keeps the "readyNewItem" property updated according to what happens with the sheet. The problem is, the -runNewItemSheet meth

Have sheet delay until done?

2009-09-01 Thread Chase Meadors
I have the following method: - (void)runNewItemSheet { [NSApp runSheet: modalForWindow]; } Then I call it in this manner - (void)someMethod { [myClass runNewItemSheet]; id item = [myClass readyNewItem]; //item is nil because -runNewItemSheet has already returned

Re: Two controllers in a window, how do I get one to run a function in another?

2009-09-01 Thread Chase Meadors
Define an outlet in "MyController" IBOutlet id documentController; Connect it to "MyDocument" in interface builder. Then call: [documentController fileString]; --- This is a minor annoyance when using multiple controllers, as they will probably need information from the other controllers.

Confusion over erratic behavior in Xcode debugging

2009-08-23 Thread Chase Meadors
This issue has been bothering me. I'm experience some weird behavior when debugging with Xcode with breakpoints. Basically, the highlighted current code line seems to jump around erratically. It's almost like it has to go through a declaration/initialization twice to actually register it.

Re: initWithCoder but I do not have nib file

2009-08-15 Thread Chase Meadors
object and returning that. Instead of returning a new button object, you should be performing initialization on the one you already have. Luke On Aug 15, 2009, at 7:42 AM, Chase Meadors wrote: The idea is to do something like this in a custom class: - (id)initWithCoder:(NSCoder *)coder

Re: initWithCoder but I do not have nib file

2009-08-15 Thread Chase Meadors
Looks like you don't quite understand -init/initWithCoder methods. Why are you passing UIButtonTypeRoundedRect as the (NSCoder *)coder argument? -initWithCoder only exists to be called when an object is created in a nib. From the documentation on the NSCoding protocol (which includes in

Re: Arbitrary length ints from NSData

2009-08-13 Thread Chase Meadors
On Aug 13, 2009, at 1:50 PM, Quincey Morris wrote: On Aug 13, 2009, at 11:25, Chase Meadors wrote: I'm afraid you'll have to explain the multiply-by-256-and-add technique. I mean something like this (untested): unsigned char *bytes = [self bytes]; int byteInd

Re: Arbitrary length ints from NSData

2009-08-13 Thread Chase Meadors
On Aug 13, 2009, at 1:17 PM, Quincey Morris wrote: On Aug 13, 2009, at 10:34, Chase Meadors wrote: In other words, I might read one piece of data that is one byte: . I would want this to be read as -2. However, the current method would make the string "0xFE", then scan it to

Arbitrary length ints from NSData

2009-08-13 Thread Chase Meadors
Hi All, I'm having a problem reading numbers from some raw data I need to read. The data encodes numbers in little-endian format. I am defining a category on NSData to accomplish this. - (NSNumber *)interpretAsSingleNumber { NSMutableString *hexString = [NSMutableString str

Re: How can we distinguish which alert we are talking about?

2009-08-05 Thread Chase Meadors
In your delegate, method, do this: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex { if ([[alertView title] isEqualToString:@"Some Title"]) { ... return; } if ([[alertView title] isEqualTo

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
...What the...?? That fixed it!... I thought that was just a preference... come to think of it, why in the world DOES that make difference?? On Aug 3, 2009, at 5:49 PM, Quincey Morris wrote: On Aug 3, 2009, at 15:16, Chase Meadors wrote: NSPopUpButtonCell *cell = [[NSPopUpButtonCell

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
row, index); //reports correct return [NSNumber numberWithInt:index]; //cut... } Adding the line in the first method that should set it's object value doesn't appear to do anything. Index 0 is still selected. On Aug 3, 2009, at 4:05 PM, Quincey Morris wrote:

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
Maybe I'm missing what you mean here, but if I do that, then what should I do in the objectValueFor... method? On Aug 3, 2009, at 2:13 PM, Quincey Morris wrote: On Aug 3, 2009, at 12:01, Chase Meadors wrote: Actually, and I forgot to mention this, I need number 1 because my second c

Re: addSubview: and positioning at the bottom of a NSWindow

2009-08-03 Thread Chase Meadors
Consider using NSDrawer. It can contain a content view (i.e. your info view) and can be attached to any side of a parent window, and be shown or hidden. If you don't want to use this, however, just grab the content view's frame, NSRect r = [[window contentView] frame] and then call: [[w

Fwd: Table view data source methods order?

2009-08-03 Thread Chase Meadors
From: Chase Meadors Date: August 3, 2009 2:01:57 PM CDT To: Quincey Morris Subject: Re: Table view data source methods order? Actually, and I forgot to mention this, I need number 1 because my second column contains a mix of text cells and popup cells depending on the data type. And

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
From: Chase Meadors Date: August 3, 2009 1:27:26 PM CDT To: Andy Lee Subject: Re: Table view data source methods order? This is beginning to frustrate me. I tried assigning the menu in the -dataCellFor... method and eliminating -willDisplay... altogether. But STILL all of my popups have

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
No, both delegate and data source are connected, and they are all getting called. This is why I believe the order is the problem. On Aug 3, 2009, at 12:16 AM, Quincey Morris wrote: On Aug 2, 2009, at 22:04, Chase Meadors wrote: I'm having a bit of trouble here with table view data s

Table view data source methods order?

2009-08-02 Thread Chase Meadors
I'm having a bit of trouble here with table view data source methods. I have implemented. I have these three: 1) - (NSCell *)tableView:(NSTableView *)sender dataCellForTableColumn: (NSTableColumn *)tableColumn row:(NSInteger)row; 2) - (id)tableView:(NSTableView *)sender objectValueForTableColu

Re: Bindings/KV Too Magical

2009-08-02 Thread Chase Meadors
On Aug 2, 2009, at 8:07 PM, Gregory Holden wrote: Some n00b questions about Bindings/KV I'm facing: 1) NSArrayController and canRemove, how does it know? A familiar example to those who ran through Aaron Hillegass' Learning Cocoa Programming. I have an NSArrayController, an NSButton, and a

Use of cells with custom controls

2009-07-28 Thread Chase Meadors
I'm making my own class that will input a variety of data in different formats, and NSTableView really seems clunky and unsuited for my purposes. I'm trying to make a custom control, but I don't quite understand what I need to do to use cells in it. In drawRect, I can just draw the cells I

Re: How do I insure that my NSDocument subclass is not initialized before I open a document?

2009-07-28 Thread Chase Meadors
In MainMenu.xib, add an app delegate object and override: - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender { return NO; } On Jul 28, 2009, at 2:41 PM, Korei Klein wrote: I have a subclass of NSDocument which is initialized whenever I open a new document and when my

Dynamic UI with scroll view

2009-07-27 Thread Chase Meadors
I'm writing an app where the number of controls in the UI is dependent on the amount of information to be entered. The scroll view programming guide is not helping either. The only experience I've had with scroll views is the ones that come with other views in IB. If I'm thinking correctly,

Re: How to set the string and integer value of an NSButtonCell using NSOutilneView

2009-07-27 Thread Chase Meadors
Well, according to the documentation, an NSButtonCell's object value (and all interpretations thereof) correspond to the state of the button (on, off, or mixed). You want to set this as well as set the title of the button. Unlike NSBrowser, NSOutlineView's data source methods don't provide

Re: NSString -componentsSeparatedByString: line break

2009-07-27 Thread Chase Meadors
Nevermind though, it WAS an empty string, and I just changed the predicate to @"SELF == %@", @"" I didn't think the == was for strings but it worked. On Jul 27, 2009, at 1:03 PM, Shawn Erickson wrote: On Mon, Jul 27, 2009 at 10:36 AM, Chase Meadors wrote: Thanks gu

Re: NSString -componentsSeparatedByString: line break

2009-07-27 Thread Chase Meadors
Jul 26, 2009, at 9:57 PM, Rob Keniger wrote: On 27/07/2009, at 12:23 PM, Adam R. Maxwell wrote: On Jul 26, 2009, at 7:11 PM, Greg Guerin wrote: Chase Meadors wrote: If the length of this mystery string is 1 and it's not a space, what is it??? Use -characterAtIndex:0 and print

NSString -componentsSeparatedByString: line break

2009-07-26 Thread Chase Meadors
Say I have a string that looks like this Hello. How are you? This is the second line. Fourth line. I'm trying to get each line of the reciever by calling [string componentsSeparatedByString:@"\n"]; This works fine, but assuming the string is actually laid out like this: Hello. How

NSData dataWithBytes:Length: all 00

2009-07-21 Thread Chase Meadors
I have the following code, which is a category on NSData. It is always called on especially designated NSData objects with four bytes. - (NSData *)resolve { unsigned char *buf = [self bytes]; const unsigned char *newBytes[4] = { (buf[3] - 0x08), buf[2], buf[1], buf[

NSBrowser's current selection

2009-07-20 Thread Chase Meadors
Hi, I'm using an NSBrowser with old-fashioned delegate methods. How can I be notified when the selection changes, and then get the correct object value for that row and column? Both NSBrowser delegate methods – browser:selectCellWithString:inColumn: and – browser:selectRow:inColumn: which

Trouble with binary data and byte buffers

2009-07-13 Thread Chase Meadors
Hi, I'm having some confusion here over displaying raw binary data. I have my NSMutableData object that I'm getting the bytes from. As I understand it, there are different ways to get the bytes. The -getBytes:range: method NSRange r = NSMakeRange(x, y); char buf[y]; [data getBytes:&buf lengt

NSCell subclassing nightmares

2009-06-28 Thread Chase Meadors
I never dreamed such a task could cause such difficulty! I'm making a custom cell that will 'animate' in a sense. Each of these cells holds an NSTimer. The object value sets a bool that determines whether the code inside the timer's method is executed or not. The code in this method simply

NSTableView -setDataCell confusion

2009-06-28 Thread Chase Meadors
I'm using AMIndeterminateProgressIndicatorCell (at least the drawing code) to imitate a progress indicator in the table view. To get it to use the custom cell, I've been calling [myTableColumn setDataCell:[[MyCustomClass alloc] init]]; However, I've run into a 'slight' problem. Apparently, A