Re: Why must this be an element?

2008-04-05 Thread Antonio Nunes
On Apr 5, 2008, at 2:04 AM, Christiaan Hofman wrote: Note that if your -objectSpecifier implementation returns an NSUniqueIDSepcifier, then 1. […] 2. the container must implement objectInWithUniqueID: 3. […] I cannot find any reference to "objectInWithUniqueID" in the documentation. There

Re: Why must this be an element?

2008-04-05 Thread Antonio Nunes
Sorry, posted to the wrong list. António On Apr 5, 2008, at 8:30 AM, Antonio Nunes wrote: On Apr 5, 2008, at 2:04 AM, Christiaan Hofman wrote: Note that if your -objectSpecifier implementation returns an NSUniqueIDSepcifier, then 1. […] 2. the container must implement objectInWithUniqueID:

copyWithZone error

2008-04-05 Thread Nick Rogers
Hi, when i return the item for a tableColumn in NSOutlineView, the following error is there: *** -[HDIR copyWithZone:]: selector not recognized [self = 0x39b670] Here HDIR is the item that i return for a particular tableColumn of outline view. HDIR also inherits from NSObject. WIshes, Nic

Re: copyWithZone error

2008-04-05 Thread Cathy Shive
Hi Nick, When you return your item to the table column, I believe this is setting the cell's object value to this item. The object value of an NSCell needs to conform to the NSCopyingProtocol. If you implement the method: - (id)copyWithZone:(NSZone *)zone in HDIR to return a copy of the o

Re: core data - beyond the simple example

2008-04-05 Thread Torsten Curdt
On Apr 5, 2008, at 05:30, Ben Trumbull wrote: At 5:19 PM -0700 4/4/08, [EMAIL PROTECTED] wrote: It's a bummer the headstart videos are only available with a non-free ADC membership. really ? Did you try: Yeah ...did go through that. IB3

NSOutlineView Problem

2008-04-05 Thread Nick Rogers
Hi, i have checkboxes (NSButtonCell) in the first column of NSOutlineView. problem is what should I return as object for that column. Program is crashing there. Thanks, nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: 1 pixel bordered CALayer renders improperly

2008-04-05 Thread Martin
rdar://5844688 -Martin. On 3 avr. 08, at 19:43, David Duncan wrote: On Apr 2, 2008, at 10:26 PM, Martin wrote: It seems that a CALayer with a borderWidth of 1.0 renders improperly: all the border's pixels are good except the very top right pixel which has a different colour. Example: htt

Re: NSOutlineView Problem

2008-04-05 Thread Nick Rogers
hi, I'm now returning an instance of NSButtonCell for the checkbox, is it ok? Also I need to show smaller font in other columns of this outline view. The default font is bigger. So do I need to set custom cell in order to achieve small font? Wishes, nick On 05-Apr-08, at 3:09 PM, Nick Roge

NSShadow on a raster image

2008-04-05 Thread Lorenzo
As I understand, NSShadow works on vectorial paths only. If so, how can I apply a shadow to a raster image with alpha? The image has an irregular border with a half-a-transparence. On Photoshop of course this can be done. Best Regards -- Lorenzo email: [EMAIL PROTECTED] ___

Re: NSOutlineView Problem

2008-04-05 Thread のりちん
Nick, I believe NSCell has setFont method to specify which NSFont you want to use. > Also I need to show smaller font in other columns of this outline view. > The default font is bigger. > So do I need to set custom cell in order to achieve small font? __

Re: NSShadow on a raster image

2008-04-05 Thread Jean-Daniel Dupas
Le 5 avr. 08 à 13:42, Lorenzo a écrit : As I understand, NSShadow works on vectorial paths only. If so, how can I apply a shadow to a raster image with alpha? The image has an irregular border with a half-a-transparence. On Photoshop of course this can be done. Best Regards -- Lorenzo

display artifacts around cells

2008-04-05 Thread Aaron Wallis
I seem to be having some issues with display artifacts in a new app i'm working on. I've got a NSView (which renders within a transparent window) and when you interact with the controls within the view you get little corners popping up here and there. I've uploaded a screen shot here: htt

Re: NSShadow on a raster image

2008-04-05 Thread Lorenzo
You are right, it worked even with images. Best Regards -- Lorenzo email: [EMAIL PROTECTED] > From: Jean-Daniel Dupas <[EMAIL PROTECTED]> > Date: Sat, 05 Apr 2008 15:06:22 +0200 > To: Lorenzo <[EMAIL PROTECTED]> > Cc: cocoa-dev@lists.apple.com > Subject: Re: NSShadow on a raster image > > > L

unexpected outlineView:setObjectValue:forTableColumn:byItem: messages

2008-04-05 Thread Kurt Bigler
In my app running under 10.4.11 (and compiled against the 10.4 sdk), I am finding that outlineView:setObjectValue:forTableColumn:byItem: messages are being sent in response to *single* clicks in outline view cells in some cases. It appears this is true whenever the cell has non-empty text.

Re: Need for a creator code?

2008-04-05 Thread Kevin Dixon
>> ...but since most uses of documents >> over time tend to be to view... > > That really, really sticks out for 2 reasons: 1) for the person creating > the > documents, that's not so true and 2) it really hints at the MS/media > cartel > attitude that users are, or ideally should be, mere passive

Scaling a window background image quickly

2008-04-05 Thread Mike R. Manzano
Hi everyone, I have a window with a custom content view. The content view loads in a PDF image to be used as the window's background. I'd like the image to scale smoothly when the window is resized, so I set the source image to scale when resized (scalesWhenResized returns YES), and in my

Delegate not getting called for CATiledLayer

2008-04-05 Thread douglas a. welton
Hi all, I'm developing an application that uses a CATiledLayer to host several sublayers full of user manipulated image content. The user can set any size for the CATiledLayer and therein lies the rub. If I set a size with both horizontal and vertical dimensions less than 2046, my - draw

Re: [Moderator] Re: Need for a creator code?

2008-04-05 Thread Uli Kusterer
On 04.04.2008, at 20:31, Scott Anguish wrote: OK, time to shut this one down folks. We've been down this road far too many times in the past. Feel free to move this to the Mac-GUI-Dev group, where it's fine and on topic: http://groups.yahoo.com/group/mac-gui-dev/ Cheers, -- Uli

Re: NSOutlineView Problem

2008-04-05 Thread Peter Maurer
i have checkboxes (NSButtonCell) in the first column of NSOutlineView. problem is what should I return as object for that column. Program is crashing there. Try [NSNumber numberWithInt: (isChecked ? NSOnState : NSOffState)]. Also I need to show smaller font in other columns of this outline vi

Re: Scaling a window background image quickly

2008-04-05 Thread Jean-Daniel Dupas
Le 5 avr. 08 à 19:53, Mike R. Manzano a écrit : Hi everyone, I have a window with a custom content view. The content view loads in a PDF image to be used as the window's background. I'd like the image to scale smoothly when the window is resized, so I set the source image to scale when re

Re: Scaling a window background image quickly

2008-04-05 Thread Mike R. Manzano
I did try that at first, but the image becomes pixelated when you make the window larger. What I'm trying now is to do an initial scale of the image to some large dimensions, and then doing what you suggested. Maybe it will look fine if the only scaling it has to do is in the downwards dire

Re: NSTreeController / CoreData still broken in 10.5?

2008-04-05 Thread Adam Gerson
Hey Doug, I know under 10.5 I can use the treecontroller methods selectedObjects and representedObject to get at the real objects. However, this only gives me the selected object(s) or another single object. Do you know of a way for me to get all of the objects in the tree so I can loop over them?

Re: Delegate not getting called for CATiledLayer

2008-04-05 Thread John Clayton
Interesting... I've got a CATiledLayer derived class that sits in a scrollview, we've tested it here and it can render properly across two 30 inch monitors no worries, i.e. it works. But I notice you say 'delegate' here. Our stuff works via derivation instead of delegates. We derive a lay

Re: Scaling a window background image quickly

2008-04-05 Thread Jean-Daniel Dupas
This is because Cocoa cache the first representation it draws and then redraw the cached version. Disabling the cache for your image should do the trick: [_img setCacheMode:NSImageCacheNever]; Le 5 avr. 08 à 20:26, Mike R. Manzano a écrit : I did try that at first, but the image becomes pixe

Re: NSTreeController / CoreData still broken in 10.5?

2008-04-05 Thread Doug Knowles
Hi, Adam, I've never tried to get the content back out of a tree controller; I usually just walk the tree that I passed into setContent:. The disadvantage of the hypothetical accessor you and Will (and I) would prefer to use is that the objects won't necessarily be in the displayed order. If you

Re: display artifacts around cells

2008-04-05 Thread Jerry Krinock
On 2008 Apr, 05, at 6:25, Aaron Wallis wrote: I seem to be having some issues with display artifacts in a new app i'm working on. I've got a NSView (which renders within a transparent window) and when you interact with the controls within the view you get little corners popping up here an

Custom Buttons - Tutorial/Examples...

2008-04-05 Thread John Joyce
Does anybody know a tutorial or example on creating custom buttons in Cocoa? I can certainly set an image in IB or programmatically, but how can I determine the actual hitmask? Or even set the mouseOver type of event for something like a rollover ? I know I'm talking about stepping on Apple's

Re: Objective-C Instance Variable Names

2008-04-05 Thread Dennis C. De Mars
I didn't notice the Xcode syntax-coloring of the instance variables -- I'll have to try using that. There's another solution besides naming conventions. I've been through most of them -- underscore prefix or postfix, prefix with "m" etc. I generally don't find naming conventions very satisf

Place NSView into NSView

2008-04-05 Thread Lincoln Green
Is there a way to place one NSView into another NSView? This is what I have. - (IBAction)setContent:(id)sender{ [firstView addSubview:secondView]; [secondView setFrame:[firstView frame]]; [secondView setFrameOrigin:NSMakePoint(0, 0)]; [secondView display]; } How

Re: Scaling a window background image quickly

2008-04-05 Thread Mike R. Manzano
Unfortunately, that still didn't work. The resultant images continue to be pixelated, as you can see here: http://instantvoodoomagic.com/stickycapture.png In my window's -awakeFromNib: gStickyImage = [NSImage imageNamed:@"sticky.pdf"] ; [gStickyImage setDataRetained:YES] ; // Setting

Re: Place NSView into NSView

2008-04-05 Thread I. Savant
Is there a way to place one NSView into another NSView? This is what I have. Read the documentation: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/Introduction/chapter_1_section_1.html Pay particular attention to the "Working with the View Hierarchy" section.

Re: Place NSView into NSView

2008-04-05 Thread I. Savant
Of course my response was incomplete, sorry. I meant to add this: Pay particular attention to the "Working with the View Hierarchy" section. // Set viewB's frame to the desired rect, then ... [viewA addSubview:viewB]; ADDING: Think also about what coordinate system you're using when

Re: Scaling a window background image quickly

2008-04-05 Thread Jean-Daniel Dupas
That's strange. When I'm doing this, it scale properly (but it's slow). - (void)drawRect:(NSRect)aRect { if (!gSticky) { gSticky = [[NSImage imageNamed:@"sticky"] retain]; [gSticky setCacheMode:NSImageCacheNever]; } NSRect src = NSMakeRect(0, 0, [gSticky size].width, [gSticky siz

Re: Scaling a window background image quickly

2008-04-05 Thread Quincey Morris
On Apr 5, 2008, at 16:45, Mike R. Manzano wrote: Unfortunately, that still didn't work. The resultant images continue to be pixelated, as you can see here: http://instantvoodoomagic.com/stickycapture.png IIRC this came up on the list a couple of weeks ago. You need to set the interpolat

Re: Place NSView into NSView

2008-04-05 Thread Quincey Morris
On Apr 5, 2008, at 17:13, I. Savant wrote: ADDING: Think also about what coordinate system you're using when you tell a subview to set its frame to a superview's frame. Per the documentation, you'll want to set the subview's frame to the superview's *bounds*, not its frame (since the s

Re: Place NSView into NSView

2008-04-05 Thread I. Savant
And I'll add to your addition that [secondView display] isn't likely to be the correct way to get the view to draw. In that context, it should be [secondView setNeedsDisplay:YES]. Or, rather, since it's going to display anyway (just having being added to a view hierarchy), the call can be o

[MEET] April CocoaHeads Mac Developer Meetings CORRECTION

2008-04-05 Thread Stephen Zyszkiewicz
hi, CocoaHeads: Silicon Valley is actually going to be on the 17th this month. * Silicon Valley, CA - Thursday April 17, 2008 07:30 PM PST. Steve Silicon Valley CocoaHeads ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Re: Objective-C Instance Variable Names

2008-04-05 Thread Quincey Morris
On Apr 5, 2008, at 15:44, Dennis C. De Mars wrote: There's another solution besides naming conventions. I've been through most of them -- underscore prefix or postfix, prefix with "m" etc. I generally don't find naming conventions very satisfactory. It seems like I'm trying to encode somet

Re: NSTreeController / CoreData still broken in 10.5?

2008-04-05 Thread Andrew Merenbach
Hi, there, Maybe I'm simply confused or confusing the issue, but would it perhaps make sense to store the tree controller's contents *not* within the tree controller itself, but in an external array of "root" objects whose children the tree controller can present? This way, by binding thi

Re: How to create process independent of current process AND that takes command line arguments?

2008-04-05 Thread Jonathan Prescott
fork() is the basic process by which a Unix system (IRIX, Solaris, Darwin/MacOSX, AIX, etc.), and Linux systems spawn new processes (not threads). exec() and its variants are the way to cause a new executable image to be started in either the old or new process. The only concern the OP ha

Re: Objective-C Instance Variable Names

2008-04-05 Thread Richard Somers
On Apr 3, 2008, at 10:45AM, Jens Alfke wrote: Properties and ivars are not the same thing. Properties are shorthand for methods, not variables. A property doesn't have to correspond to any instance variable, or to one with the identical name. Excellent point. I did not realize that. Oft

Re: Objective-C Instance Variable Names

2008-04-05 Thread Jim Puls
On Apr 5, 2008, at 8:20 PM, Richard Somers wrote: I have also been looking through the WebKit framework and noticed that they will hide ALL of the instance variables in another class like this. @interface WebView : NSView { @private WebViewPrivate *_private; } Can anyone she

Re: Custom Buttons - Tutorial/Examples...

2008-04-05 Thread Ben Lachman
This isn't a subject that I've ever seen addressed really thoroughly in a tutorial type walk though, its more a journey of gleaning all the info you need to create new buttons and controls. Personally I'd call custom control creation the dark art of Cocoa ;-). For your case though I think

Re: Scaling a window background image quickly

2008-04-05 Thread Ben Lachman
On Apr 5, 2008, at 8:28 PM, Quincey Morris wrote: On Apr 5, 2008, at 16:45, Mike R. Manzano wrote: Unfortunately, that still didn't work. The resultant images continue to be pixelated, as you can see here: http://instantvoodoomagic.com/stickycapture.png IIRC this came up on the list a co

Re: Scaling a window background image quickly

2008-04-05 Thread Mike R. Manzano
Looks like the key difference was that I was using operation:NSCompositeSourceAtop instead of NSCompositeSourceOver. For whatever reason, it doesn't pixelate with NSCompositeSourceOver. Unfortunately, it's still slow. I guess I'll have to go back to the drawing board on the PDF. Thanks fo