[Meet] Amsterdam CocoaHeads

2010-03-10 Thread Cathy Shive
Hi! The Amsterdam CocoaHeads group will be meeting tonight, March 10, from 7-9PM. Klass Pieter Annema will be presenting Cappuccino and Objective-J. http://cappuccino.org/ Directions and other info can be found here: http://groups.google.com/group/cocoaheads-amsterdam/web/next-meeting-wednesda

Re: Using a NSTextField inside a NSMenuItem?

2010-03-10 Thread jonat...@mugginsoft.com
On 10 Mar 2010, at 01:01, Robert Monaghan wrote: > Hi Everyone, > > Another Question: > How does one make a NSTextField work inside an NSMenuItem? (For 10.5/10.6) > > I can place the NSTextField into a View that I've created in a NIB file, and > have added it to the NSMenuItem > using setView:

Re: Bison/Yacc with Objective-C ?

2010-03-10 Thread Timothy Stafford Larkin
You don't need to change the file extension, just a build setting. Change "Compile Sources As" from "According to file type" to "Objective C". Also, I've found that "@" as in @"String Constant" produces Bison confusion. I use a #define so that I can write AT"String Constant". Tim Larkin Abstrac

Re: Bison/Yacc with Objective-C ?

2010-03-10 Thread F van der Meeren
On 10 Mar 2010, at 12:48, Timothy Stafford Larkin wrote: > You don't need to change the file extension, just a build setting. Change > "Compile Sources As" from "According to file type" to "Objective C". I find that confusing, especially when you have multiple yacc files to maintain. Some of th

Required overrides for NSAtomicStore subclass

2010-03-10 Thread Gideon King
In the documentation, it says that I have to override: type identifier setIdentifier metadata metadataForPersistentStoreWithURL:error: setMetadata:forPersistentStoreWithURL:error: from NSPersistentStore in addition to the overrides for NSAtomicStore, but the CustomAtomicStoreSubclass example doe

Re: Uninitialized rectangle??

2010-03-10 Thread fabian
For the records: the dummy view did the trick. Thank you! F. On Thu, Mar 4, 2010 at 11:24 PM, fabian wrote: > On Thu, Mar 4, 2010 at 8:10 PM, Steven Degutis > wrote: > >> NSStatusItem's -view and -setView: methods are related to your own custom >> view, and have nothing to do with the view it

Custom cell wanted

2010-03-10 Thread Graham Cox
Hi, I need a custom cell for a table/outline view that is exactly like Mail's 'unread' count - the grey lozenge with a number in it. It's probably only a few hours work but maybe someone has already done it and would be willing to share? --Graham___

Re: Custom cell wanted

2010-03-10 Thread jonat...@mugginsoft.com
On 10 Mar 2010, at 14:35, Graham Cox wrote: > Hi, > > I need a custom cell for a table/outline view that is exactly like Mail's > 'unread' count - the grey lozenge with a number in it. It's probably only a > few hours work but maybe someone has already done it and would be willing to > share?

Re: UIImageView animationImages problem

2010-03-10 Thread patrick machielse
Op 9 mrt 2010, om 21:21 heeft David Duncan het volgende geschreven: > In part this is decoding the image (if they haven't been previously decoded). > Are you using +imageNamed: or +imageWithContentsOfFile: to load the images? I'm using imageWithContentsOfFile:. Mainly this is because I need to m

Re: Custom cell wanted

2010-03-10 Thread Dave DeLong
Alex Rozanski's PXSourceList has them: http://github.com/Perspx/PXSourceList There was one here: http://th30z.netsons.org/2008/12/cocoa-sidebar-with-badges/ but the website appears to be having issues. Maybe it'll be back a bit later. :) Cheers, Dave DeLong On Mar 10, 2010, at 7:35 AM, Gra

Re: How to get NSPathControl to resize programatically? (Solved..)

2010-03-10 Thread Robert Monaghan
I figured out how to get the NSPathControl to "resize" after changing an NSPathComponentCell URL. I realize that the description I gave is vague, so here is a better explanation.. I am changing the URL of a NSPathComponent in the middle of NSPathControl's overall URL. By making the change, I wa

Core Animation vs. Basic Cocoa Graphics

2010-03-10 Thread Mazen M. Abdel-Rahman
Hi All, I was able to write a simple calendar view that uses basic cocoa graphics to draw directly on the view (NSBezierPath, etc.). I actually use several different paths for drawing the calendar (it's a weekly calendar) to allow different horizontal line widths (hour, half hour, etc.). The

Re: Cocoa-dev Digest, Vol 7, Issue 287

2010-03-10 Thread Keith Blount
This is the relevant part of my cell subclass: - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { if(hasCount) { NSString * number = [NSString stringWithFormat:@"%i", count]; // Use the current font point size as a guide for the count font size CGFloat pointSize = [[sel

Re: Custom cell wanted

2010-03-10 Thread Keith Blount
Apologies all for the mis-titled e-mail. Resending for the sake of the archives. --- This is the relevant part of my cell subclass: - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { if(hasCount) { NSString * number = [NSString stringWithFormat:@"%i", count]; // Use th

Re: UIImageView animationImages problem

2010-03-10 Thread David Duncan
On Mar 10, 2010, at 6:56 AM, patrick machielse wrote: > - Animate individual parts of the screen by code. Less (or no) code <> > resource separation, labor intensive. There is no need to remove the code/resource separation to do parts of your animation in code. You would build a system that to

Re: Determining bounds of a glyph

2010-03-10 Thread David
Phillip -- Have you made any progress on this? I am trying to draw glyphs onto an NSBitmapImageRep using drawGlyphsForGlyphRange:atPoint: and having similar problems. In my case the symptoms are that underline and strikethrough are not being drawn correctly. Right now, my guess is that so

Re: Proper control for a list of actions

2010-03-10 Thread Dave DeLong
OK, following up: I've spent a couple days playing with NSRuleEditor, and I've found some stuff out: It appears to only be useful for a static tree of information (unless I dynamically modify the tree as rows are added and removed). I've come to this conclusion based on my tests, due primaril

NSScroller and Periodic Events

2010-03-10 Thread Abhinay Kartik Reddyreddy
Hi all, I have an application which uses periodic events to do some computation. The app works fine as long as i dont use a scrollbar. the moment i click a scrollbar it raises exception. The scroller is trying to start periodic events inside [NSScroller trackScrollButtons:]. since the app has a

Can you obtain the NSRuleEditor localized display?

2010-03-10 Thread John C. Daub
Can you obtain the localized display of an NSRuleEditor? I have an NSRuleEditor displaying my rule setup. The app has functionality where it provides a text summary of the search rules that generated the results. When I call -[NSRuleEditor displayValuesForRow:], that returns the actual display va

Re: NSScroller and Periodic Events

2010-03-10 Thread Kyle Sluder
On Wed, Mar 10, 2010 at 11:20 AM, Abhinay Kartik Reddyreddy wrote: > In case i should not use periodic events, how is an idle time task handled in > cocoa...?? In carbon i would say WaitNextEvent and if the return was null i > would perform my idle time task. Is there any design pattern for

Possible leak?

2010-03-10 Thread Laurent Daudelin
Just ran the build analyzer on my code and the analyzer flagged this as a possible leak: host = CFHostCreateWithName(kCFAllocatorDefault, (CFStringRef)hostName); assert(host != NULL); saying that on the "assert(host != NULL)" line, there was a potential leak of the object allocated just

CAKeyframeAnimation and NSView frame property

2010-03-10 Thread Mazen M. Abdel-Rahman
Hi All, I had another question about core animation. I am trying to animate my view's frame size so that it gets smaller - and then in the same animation goes back to the same size. I was able to get it to succesfully animate to a smaller size - but am having difficulty with getting to work u

Re: Determining bounds of a glyph

2010-03-10 Thread Philip White
On Mar 10, 2010, at 12:42 PM, David wrote: > Phillip -- Have you made any progress on this? I am trying to draw glyphs > onto an NSBitmapImageRep using drawGlyphsForGlyphRange:atPoint: and having > similar problems. In my case the symptoms are that underline and > strikethrough are not being

Re: CAKeyframeAnimation and NSView frame property

2010-03-10 Thread David Duncan
On Mar 10, 2010, at 12:35 PM, Mazen M. Abdel-Rahman wrote: > I had another question about core animation. I am trying to animate my > view's frame size so that it gets smaller - and then in the same animation > goes back to the same size. I was able to get it to succesfully animate to a > sma

Re: Possible leak?

2010-03-10 Thread Ken Ferry
File a bug with the static analyzer that it should not do this. :-) I'm not sure what's wrong here, because clang already knows about assert, unless you redefined the macro. See . -Ken On Wed, Mar 10, 2010 at 12:09 PM, Laurent

Re: Possible leak?

2010-03-10 Thread Laurent Daudelin
I didn't redefine the macro but for support of older OS X versions, I'm currently using LLVM GCC 4.2. Maybe that's why? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software

Re: Possible leak?

2010-03-10 Thread Thomas Clement
Do you call CFRelease() on the returned host object? If not, you should. Regards, Thomas On Mar 10, 2010, at 10:56 PM, Laurent Daudelin wrote: I didn't redefine the macro but for support of older OS X versions, I'm currently using LLVM GCC 4.2. Maybe that's why? -Laurent. -- Laurent Daud

Accessing the contextual menu of a QTMovieView?

2010-03-10 Thread John C. Randolph
I'd like to add an item to the menu that comes up when you right-click on a QTMovieView. I want to copy the URL of the movie it's showing into the pasteboard. I'm not finding any obvious API to get hold of that menu. Any suggestions? Thanks, -jcr

Help visualizing something in IB

2010-03-10 Thread Brian Postow
I'm having trouble visualizing something. Let say I have three views inside a scrollview with some other content. Top, buttons and image. buttons and image are both inside top. Top does NOT fill up the scrollview, however, buttons and image DO fill up top. Top has a maximum size determined at r

Clickable UILabel - iPhone

2010-03-10 Thread Sasikumar JP
Hi, I am new to the Cocoa Programming. I am working on my first iPhone app. I want to present the data in tableview, there user can click the url or user name in the text. I have customized the table view cell and displayed the text in UILabel. Not sure how to enable the clickable link for t

Group Table View Edit Mode Animation - iPhone

2010-03-10 Thread Sasikumar JP
Hi, I am working an iPhone app. when my Group Table View enter in to the Edit Mode,i want to add few more sections/rows dynamically with the animation. In the iPhone Contact application, user data modify screen has feature. when this screen enters in to the edit mode, it adds few more s

Re: UIImageView animationImages problem

2010-03-10 Thread banane
Patrick - I'm so glad you posted this. I'm writing a game (and have it working!) where the array of imageviews is different each user choice. It loads the array with UIImageViews (and does ImageNamed, which I guess I should change...). the problem with the animation is that it's variable for each

Re: Accessing the contextual menu of a QTMovieView?

2010-03-10 Thread Kevin Wojniak
Have you tried subclassing QTMovieView and overriding menuForEvent: ? On Mar 10, 2010, at 2:29 PM, John C. Randolph wrote: > I'd like to add an item to the menu that comes up when you right-click on a > QTMovieView. I want to copy the URL of the movie it's showing into the > pasteboard. I'm n

Re: Possible leak?

2010-03-10 Thread Laurent Daudelin
Ah, that was it! Thanks! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutter

Re: Clickable UILabel - iPhone

2010-03-10 Thread Henry McGilton
On Mar 9, 2010, at 9:25 PM, Sasikumar JP wrote: > Hi, > I am new to the Cocoa Programming. I am working on my first iPhone app. I > want to present the data in tableview, there user can click the url or user > name in the text. > > I have customized the table view cell and displayed the text

Re: Clickable UILabel - iPhone

2010-03-10 Thread Alex Kac
Or just use a UIButton which has a UILabel in it. On Mar 10, 2010, at 5:30 PM, Henry McGilton wrote: > > On Mar 9, 2010, at 9:25 PM, Sasikumar JP wrote: > >> Hi, >> I am new to the Cocoa Programming. I am working on my first iPhone app. I >> want to present the data in tableview, there user c

Re: Help visualizing something in IB

2010-03-10 Thread Quincey Morris
On Mar 10, 2010, at 14:58, Brian Postow wrote: > Let say I have three views inside a scrollview with some other content. Top, > buttons and image. buttons and image are both inside top. Top does NOT fill > up the scrollview, however, buttons and image DO fill up top. Top has a > maximum size de

Re: Help visualizing something in IB

2010-03-10 Thread Brian Postow
On Mar 10, 2010, at 6:36 PM, Quincey Morris wrote: > On Mar 10, 2010, at 14:58, Brian Postow wrote: > >> Let say I have three views inside a scrollview with some other content. Top, >> buttons and image. buttons and image are both inside top. Top does NOT fill >> up the scrollview, however, bu

[SOLVED] Re: Custom cell wanted

2010-03-10 Thread Graham Cox
On 11/03/2010, at 1:49 AM, jonat...@mugginsoft.com wrote: > Not sure if this will prove useful or not. > > Regards > > Jonathan Mitchell Thanks for this, and to everyone who responded, lots of great solutions! Nice to wake up to find a little bit of code I need has written itself - well, sor

NSPrintPanel

2010-03-10 Thread danchik
Hello, Is there a way to access/modify information in the print panel while the dialog is up? Lets say the task is to modify the currently selected paper size based on the available sizes when ever the user changes a printer selection. Is there a way to be notified of events on the PrintPane

Re: Can you obtain the NSRuleEditor localized display?

2010-03-10 Thread Peter Ammon
On Mar 10, 2010, at 11:30 AM, John C. Daub wrote: > > Can you obtain the localized display of an NSRuleEditor? > [...] > I can't see any way to extract the actual displayed GUI (post-formatting), > other than obtaining the criteria or displayValues myself, obtaining the > formattingDictionary

How to debug this error on closing a document?

2010-03-10 Thread Gideon King
I have a core data based application, and use the NSPersistentDocument's -managedObjectContext to get my managed object context. As far as I can see, I do not retain or release it anywhere in my code, but apparently it is getting over released when I close my document. My test case is to start m

Re: Help visualizing something in IB

2010-03-10 Thread Klaus Backert
On 11 Mar 2010, at 00:54, Brian Postow wrote: Basically, I want the topView to scroll, but I always want to be able to see the buttonView. So if part of the topView isn't visible because it's been scrolled up, I want the buttonview at the top of the screen. This looks like you just do *n

Re: Help visualizing something in IB

2010-03-10 Thread Quincey Morris
On Mar 10, 2010, at 15:54, Brian Postow wrote: > Basically, I want the topView to scroll, but I always want to be able to see > the buttonView. So if part of the topView isn't visible because it's been > scrolled up, I want the buttonview at the top of the screen. > > I think what I want is to

Re: How to debug this error on closing a document?

2010-03-10 Thread Kyle Sluder
On Wed, Mar 10, 2010 at 4:45 PM, Gideon King wrote: > Seeing as none of this appears to have anything to do with my code, I am > assuming that some notification created somewhere in my application is > somehow the cause, but I'm not sure how to track this down. Run the analyzer first, then if t

Re: Can you obtain the NSRuleEditor localized display?

2010-03-10 Thread John C. Daub
on 3/10/10 6:01 PM, Peter Ammon at pam...@apple.com wrote: > On Mar 10, 2010, at 11:30 AM, John C. Daub wrote: > >> Can you obtain the localized display of an NSRuleEditor? >> > [...] > >> I can't see any way to extract the actual displayed GUI (post-formatting), >> other than obtaining the cri

The Location of the Service Menu

2010-03-10 Thread Steve Cronin
Folks; I want to provide a service which will open a small HUD for fine-tuning the request. It seems to me that this HUD should open nearby where the context request occurred. I've poked around some and haven't hit anything promising. As the recipient of the service call 'xyz: userData:error:'

Better sorting using threads?

2010-03-10 Thread Graham Cox
I've got a situation where sorting an array using sort descriptors is slow. The number of items being sorted is not enormous - about 2,000 - but there could be several sort descriptors and the main string one is using a localized and natural numeric comparison. I cache the results and take a lot

Re: Better sorting using threads?

2010-03-10 Thread Ken Thomases
On Mar 10, 2010, at 11:50 PM, Graham Cox wrote: > I've got a situation where sorting an array using sort descriptors is slow. > The number of items being sorted is not enormous - about 2,000 - but there > could be several sort descriptors and the main string one is using a > localized and natur

Re: Better sorting using threads?

2010-03-10 Thread Graham Cox
On 11/03/2010, at 5:34 PM, Ken Thomases wrote: > However, sorting 2000 items should not take 10-20 seconds! Have you profiled > to find out what's actually taking the time? Thanks Ken, your response prompted me to question my assumptions, and indeed, the culprit was something else entirely.

Re: Better sorting using threads?

2010-03-10 Thread Ken Ferry
On Wed, Mar 10, 2010 at 10:34 PM, Ken Thomases wrote: > On Mar 10, 2010, at 11:50 PM, Graham Cox wrote: > > > I've got a situation where sorting an array using sort descriptors is > slow. The number of items being sorted is not enormous - about 2,000 - but > there could be several sort descriptor