[CODE] JPDurationToDecimalNumberFormatter

2008-10-14 Thread Jamie Phelps
Hi, all. I have received so much help from this list that I wanted to share a small something back. It is a subclass of NSNumberFormatter to format time duration. It works for me but I'm sure it could be improved as well. You can download it from my iDisk public folder (http://idisk.mac.com/j

Master-Detail Interface Examples

2008-10-06 Thread Jamie Phelps
I'm looking for examples of well-designed Master-Detail interfaces. I have tried several different layouts for the details and haven't been satisfied with any of them. In looking at the layout, I think it has to do with the table view being rather wide and not finding a comfortable place to

Re: Do I Need Multiple NSArrayControllers For This?

2008-09-15 Thread Jamie Phelps
> > On Thu, Sep 11, 2008 at 3:11 PM, Benjamin Stiglitz <[EMAIL PROTECTED]> wrote: > > By the way, another way to implement this is to set a property in a >> subclass of NSArrayController inside its -arrangeObjects: method. > > I found this information

Re: Do I Need Multiple NSArrayControllers For This?

2008-09-11 Thread Jamie Phelps
On Wed, Sep 10, 2008 at 8:40 AM, Benjamin Stiglitz <[EMAIL PROTECTED]> wrote: You might want a value transformer on the arrangedObjects of the array > controller: one that just returns the count, and one that returns the count > as filtered by a predicate. > Just want to clarify this a bit. In th

NSPredicate BETWEEN inclusive or exclusive?

2008-09-11 Thread Jamie Phelps
In reading the Predicate Programming Guide, the BETWEEN operator seems to indicate that the $LOWER and $UPPER are not included in the comparison. Can someone confirm or correct my reading? Thanks, Jamie ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Custom Array/Set keypath

2008-09-09 Thread Jamie Phelps
I would like to bind the value of an NSTextField to the standard deviation of a keypath. My class Foo has an instance variable "amount." I found the NSExpression function stddev: and thought I would create a category but that didn't work out like I had hoped. Any thoughts appreciated. Tha

Do I Need Multiple NSArrayControllers For This?

2008-09-09 Thread Jamie Phelps
I have a Core Data entity that has a date and relationship. I want to create a label like. "25 Foos (12 New)" A Foo is active if it its relationship is null and it is new if its date is within the startDate and endDate specified by the user. My intuition is that this does require two NSArr

NSDateFormatter and Display Value bindings

2008-09-01 Thread Jamie Phelps
I have a label that I want to display the date range for which I am displaying data. So, the label would say "July 1, 2008 to September 1, 2008" for my QTD numbers. That is simple enough, but when I set the display value binding to my startDate and endDate objects' values, they display with

Seemingly Simple Bindings Question

2008-08-31 Thread Jamie Phelps
I have an NSPopUpButton with five menu items: WTD, MTD, QTD, YTD, and Specific Dates. What I want to do is show and hide two labels and textfields for Start Date and End Date depending on if the Specific Dates option is selected. My first attempt was to do @property (readonly) BOOL specify

Re: 2 NSRuleEditor questions?

2008-08-27 Thread Jamie Phelps
apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > > http://lists.apple.com/mailman/options/cocoa-dev/jamierphelps%2Bcocoa-dev%40gmail.

NSRuleEditor with Multiple Root Criteria Yields Empty Row

2008-08-27 Thread Jamie Phelps
Hi, all. I've been banging my head against this for some time now and I'm at a bit of a loss. I've searched the archives and haven't found much info on NSRuleEditor other than before Leopard was released and it was taboo because of NDA. Bear with me as I've done some experimentation that mi

Setting Core Data attribute values to related entity attribute values

2008-07-16 Thread Jamie Phelps
I have a Core Data entity in a Master-Detail view. In the detail view, I have a button that is bound to the createFoo: method of the selected object where Foo is the class name of the related entity. What I want to do is use this button to create a Foo and set its relationship programmatica

Re: [NSDate +dateWithNaturalLanguageString] question

2008-07-13 Thread Jamie Phelps
Well, I worked it out using NSCalendarDate's - dateByAddingYears:months:days:hours:minutes:seconds: but I'd still be curious as to why the natural language I was trying to use didn't work... JP On Jul 13, 2008, at 10:44 AM, Jamie Phelps wrote: Hi, all. I searched the arc

[NSDate +dateWithNaturalLanguageString] question

2008-07-13 Thread Jamie Phelps
Hi, all. I searched the archives regarding this method and didn't find anything applicable. Sorry if this has been covered. Is there some list of acceptable strings for +dateWithNaturalLanguageString:? I am trying to set my Core Data entity's expirationDate attribute's default value to "fou

Janky Tab View Behavior

2008-07-12 Thread Jamie Phelps
I'm really hoping this is some stupid thing I'm doing wrong. When I first open the window pictured, I get the behavior shown in the screenshot. I can click where the tabs should be and get the other tab, after which it behaves as it should. Anyone have an idea wth is going on with this? H

Re: Core Data Entity Relationship -valueForKeyPath: question

2008-06-30 Thread Jamie Phelps
You're right. Someone off list pointed me in the right direction of NSNumber's -isEqualToNumber: method. Sorry for the noise, everyone! JP On Mon, Jun 30, 2008 at 9:42 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: > > On Jun 30, 2008, at 19:01, Jamie Phelps wrote: > >

Core Data Entity Relationship -valueForKeyPath: question

2008-06-30 Thread Jamie Phelps
I have a Core Data entity Item with a relationship "transaction." (It's actually a to-many relationship. I'll adjust the key when I migrate my Core Data model.) My question is about KVC. Can anyone help me understand why the following code always returns YES? I know for a fact that some of

NSPopupButton Item to Create New Object

2008-06-07 Thread Jamie Phelps
I have an NSPopupButton bound to an NSArrayController to provide options for the user to select from. What I would like to do is have one option (probably the first item) in the popup for the user to select that would allow them to create a new object if it doesn't yet exist. Is this poss

Graphing With Google Charts API

2008-05-31 Thread Jamie Phelps
I am writing an application that could seriously benefit from a good graphing API. Of course, the simplest solution to this would be if Apple opened up GraphKit for Cocoa developers. Sadly, that seems not to be in the near future, so I'm looking at alternatives. While there are some graphin

Resetting IKImageEditPanel's Effects Selection

2008-05-06 Thread Jamie Phelps
I have an IKImageBrowserView and IKImageView. When the selection changes in the IKImageBrowserView, the IKImageView is updated with the newly selected image. If I invoke the IKImageEditPanel by double clicking the IKImageView and choose an effect such as Sepia, the image changes appropriate

Re: Graphics seen when volume is modified.

2008-05-02 Thread Jamie Phelps
You might also check out the RoundedFloatingPanel code from Matt Gemmell: http://mattgemmell.com/source about 60% of the way down. JP On May 2, 2008, at 3:38 AM, John Clayton wrote: Hi All, Does anyone know of some code that mimics the graphics that are displayed by Apple when one modifie

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Jamie Phelps
Not sure if it's suitable for your purposes, but IKImageView and its currentToolMode property (IKToolModeMove). This would get you the behavior you want for free. JP On Apr 18, 2008, at 2:49 PM, Steve Sheets wrote: Does someone have any suggestions or hints about how to do this? I am usin

Re: Getting selection of IKImageView?

2008-04-16 Thread Jamie Phelps
On Apr 16, 2008, at 12:38 PM, Colin Cornaby wrote: The issue is that I really need a rect. Getting the actual image of what is selected will tell me the width and height of the rect, but not the x and y. So, you're after the origin of the rect in addition to the dimensions? Since IKImageV

Re: Getting selection of IKImageView?

2008-04-15 Thread Jamie Phelps
See last paragraph here: http://devworld.apple.com/documentation/GraphicsImaging/Conceptual/ImageKitProgrammingGuide/ImageViews/chapter_3_section_6.html HTH JP On Apr 15, 2008, at 5:16 PM, Colin Cornaby wrote: I have an IKImageView that I am using as a preview view for working with a flatbe

Updating IKImageBrowserView with Edited Image

2008-04-15 Thread Jamie Phelps
Hi, all. Does anyone know how I could go about updating the content of my IKImageBrowserView after editing an image in an IKImageView? So... 1) User has some images in an IKImageBrowserView. 2) User selects an image. 3) The selected image shows in an IKImageView 4) User edits the image (Adjust

Re: Tight loop processing

2008-04-10 Thread Jamie Phelps
Maybe look into NSThread and see if it meets your needs. You'd run your loop in the thread and keep processing events like normal in the main thread. (I'm still rather new to Cocoa myself, so I hope I'm not misleading you. The other list readers will correct me if I'm wrong.) HTH, Jamie

IKImageView -zoomImageToFit causes flicker

2008-04-09 Thread Jamie Phelps
Hi, all. I'm working with ImageKit, and I've bumped into a problem. (See below for relevant source.) If I select an image that I've brought in from the filesystem, the -setIKImageViewImage: method causes a flickr. I have narrowed it down to the -zoomImageToFit: call. Without it, there is no

Re: [OT] Dallas Cocoa Meetup?

2008-04-08 Thread Jamie Phelps
I'd also be interested in a Mac developer meetup group. I'm in Ft. Worth near TCU. Keep us updated! Jamie On Apr 7, 2008, at 11:31 PM, Dennis J. Hagner wrote: Hey, count me in. I'm in Irving. Dennis J. Hagner -- Date: Mon, 7 Apr 2008 15:49:26 -0500 From: Waqa

IKImageEditPanel Effects Preview Question

2008-03-27 Thread Jamie Phelps
When I first invoke the IKImageEditPanel, the preview in the Effects tab reflects the image that is in my IKImageView. If I change the image in the image view, however, the preview in the Effects tab does not show the preview applied to the image currently in the image view but to the image

Re: Invoke IKImageEditPanel for IKImageView without double click?

2008-03-25 Thread Jamie Phelps
andreas wrote: On Mar 25, 2008, at 3:04 PM, Jamie Phelps wrote: Before I file this as a bug, I wanted to check with the list to see if there's something I'm missing. I have an IKImageBrowserView and I want to implement the -(void)imageBrowser:(IKImageBrowserView *)aBrowser

Invoke IKImageEditPanel for IKImageView without double click?

2008-03-25 Thread Jamie Phelps
Before I file this as a bug, I wanted to check with the list to see if there's something I'm missing. I have an IKImageBrowserView and I want to implement the -(void)imageBrowser:(IKImageBrowserView *)aBrowser cellWasDoubleClickedAtIndex:(NSUInteger)index; delegate method to set the image

Re: View with sliding rearranging thumbnails

2008-03-21 Thread Jamie Phelps
You might have a look at the documentation for IKImageBrowserView (IKImageBrowserView Class Reference). It's Leopard only, but it might just do the trick. HTH, Jamie On Mar 21, 2008, at 8:15 PM, Dave Hersey wrote: Hi, I'm working on a view that has a bunch of image thumbnails, say somet

Re: Problem with NSDragPboard

2008-03-12 Thread Jamie Phelps
Thanks to both of you guys. Chalk another one up for missing info from my textbook. JP On Mar 12, 2008, at 12:12 AM, Jens Alfke wrote: You need to declare the type(s) on the pasteboard, before setting the data. —Jens On Mar 11, 2008, at 11:42 PM, Dave Hersey wrote: The only thing I c

Problem with NSDragPboard

2008-03-11 Thread Jamie Phelps
Hi, all. I am working on the Hillegass chapter that covers drag and drop, and I have the following method in my code. - (void)writeStringToPasteboard:(NSPasteboard *)pb { NSLog(@"Writing %@ to pasteboard [EMAIL PROTECTED]",self.string, pb); // Copy string data to the pasteboard. [pb

Re: [iPhone] UIImage drawInRect not scaling image

2008-03-10 Thread Jamie Phelps
No iPhone discussion in public lists because it is under NDA. This has been flogged to death. JP Sent from my iPhone On Mar 10, 2008, at 7:23 AM, "Stuart A. Malone" <[EMAIL PROTECTED] > wrote: (Please correct me if I'm on the wrong list. Cocoa-dev seems to be the list suggested at the e

An Excursus

2008-03-04 Thread Jamie Phelps
This is tangentially related to my previous message about NSSearchField and Apple's Core Data Tutorial, but it concerns my learning experience with Cocoa more than being directly relevant to that thread. In talking off-list with another list member, he mentioned that I needed to bind the

Problem with NSSearchField in Apple's Core Data Tutorial

2008-03-04 Thread Jamie Phelps
I am trying to follow Apple's Core Data tutorial and I am stuck on getting the NSSearchField to actually work. Another list member was helping me off-list and sent me a working nib file. When I dropped it into my project, however, it did not work; the search field

Core Data opens files as empty

2008-03-02 Thread Jamie Phelps
I'm sorry if this has been covered, but I searched the archives (http://moourl.com/x50hf ) and didn't find any answers. I just went through the Core Data tutorial here: http://developer.apple.com/cocoa/coredatatutorial/index.html Everything went well except that when I save a document and then

@property and messages

2008-02-28 Thread Jamie Phelps
By now, most of you know I'm working through Aaron Hillegass's book. Along the way, I'm trying to utilize Objective-C 2.0 constructs where I am aware of differences. Hillegass is using explicitly declared setters and getters. I am using @property and @synthesize. In his - (void)setString: me

Re: [NSBezierPath fillRect:[self bounds]] question

2008-02-26 Thread Jamie Phelps
Ah, please disregard my last message. I had a stupid error in IB. Move along; nothing to see here... Jamie ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the modera

Re: [NSBezierPath fillRect:[self bounds]] question

2008-02-26 Thread Jamie Phelps
On Feb 26, 2008, at 7:55 PM, Rob Keniger wrote: I have made a few changes to your code, including using - mouseDragged: to handle the oval drawing instead of -mouseUp: and I think it achieves what you are probably looking for. Rob, thanks for your response and the pointers. I made those chan

[NSBezierPath fillRect:[self bounds]] question

2008-02-26 Thread Jamie Phelps
Hey, guys. I'm having what I assume is a simple problem. [NSBezierPath fillRect:[self bounds]]; fills my NSView subclass fine the first time drawRect: is called, but breaks the frame on redraw. Here is some more code for context if needed. I tried adding the initial background fill to an aw