Re: breakout game - openGL or quartz?

2009-12-06 Thread Chunk 1978
cool game, patrick. i especially liked your sound. On Mon, Dec 7, 2009 at 2:05 AM, Nick Zitzmann wrote: > > On Dec 6, 2009, at 11:48 PM, Patrick J. Collins wrote: > >> and it's been on my mind to make a version for the iPhone..  But before I do >> that, I thought it would be good to just make a

Re: breakout game - openGL or quartz?

2009-12-06 Thread Nick Zitzmann
On Dec 6, 2009, at 11:48 PM, Patrick J. Collins wrote: > and it's been on my mind to make a version for the iPhone.. But before I do > that, I thought it would be good to just make a version for plain old OS X... > So before I do this, I wanted to ask the opinions of every one here-- Should >

Re: breakout game - openGL or quartz?

2009-12-06 Thread Seth Willits
On Dec 6, 2009, at 10:48 PM, Patrick J. Collins wrote: > So before I do this, I wanted to ask the opinions of every one here-- Should > I > use OpenGL or quartz/core animation for my graphics drawing? OpenGL. Come join the party: http://www.idevgames.com/forum/ -- Seth Willits

breakout game - openGL or quartz?

2009-12-06 Thread Patrick J. Collins
Hi everyone, I wrote a "breakout" style game for actionscript3: http://collinatorstudios.com/dev/super_collins_breakout and it's been on my mind to make a version for the iPhone.. But before I do that, I thought it would be good to just make a version for plain old OS X... So before I do this, I

Re: Services Menu Heading

2009-12-06 Thread Kyle Sluder
On Sun, Dec 6, 2009 at 10:24 PM, Gerriet M. Denkmann wrote: > NSServiceCategary = Searching, which seems to work. Kind of obvious once > found. Some documentation would have been even better (and would have saved > me some time). Apple obviously hasn't nailed down the Services stuff yet, as evi

Re: Services Menu Heading

2009-12-06 Thread Gerriet M. Denkmann
On 7 Dec 2009, at 13:15, Nick Zitzmann wrote: > > On Dec 6, 2009, at 11:10 PM, Gerriet M. Denkmann wrote: > >> 2. public.item ist NOT the right thing so use. But what is? >> "string.to.look.up.in.some.dictionary" sounds not quite right. > > IIRC I asked about this before, and the reply I got

Re: Services Menu Heading

2009-12-06 Thread Nick Zitzmann
On Dec 6, 2009, at 11:10 PM, Gerriet M. Denkmann wrote: > 2. public.item ist NOT the right thing so use. But what is? > "string.to.look.up.in.some.dictionary" sounds not quite right. IIRC I asked about this before, and the reply I got said that there isn't a UTI or old-school pasteboard type

Re: Services Menu Heading

2009-12-06 Thread Gerriet M. Denkmann
On 7 Dec 2009, at 12:54, Nick Zitzmann wrote: > > On Dec 6, 2009, at 9:38 PM, Gerriet M. Denkmann wrote: > >> What magic incantations do I have to perform to make my service appear under >> it's appropiate heading ? > > You need to set the undocumented key "NSServiceCategory" in the > NSRequ

Re: Problem setting to-one relationship on NSManagedObject

2009-12-06 Thread Kyle Sluder
On Fri, Dec 4, 2009 at 3:37 PM, Jim Majure wrote: >        NSManagedObject *project = [selectProjectController selection]; >        [newTimeEntry setValue:project forKey:@"project"]; As per the documentation, -selection returns a KVC-compliant proxy object. You can't turn around and hand that of

Re: Services Menu Heading

2009-12-06 Thread Kyle Sluder
It's good list etiquette to keep replies on-list. On Sun, Dec 6, 2009 at 9:55 PM, Gerriet M. Denkmann wrote: > Yes, but Dictionary and Safari just have NSSendTypes = NSStringPboardType (no > UTIs at all) and appear under the correct heading. Like I said, there are hardcoded exceptions. > Any i

Re: Services Menu Heading

2009-12-06 Thread Nick Zitzmann
On Dec 6, 2009, at 9:38 PM, Gerriet M. Denkmann wrote: > What magic incantations do I have to perform to make my service appear under > it's appropiate heading ? You need to set the undocumented key "NSServiceCategory" in the NSRequiredContext dictionary if the Keyboard preference pane misinte

Re: SSH in my application

2009-12-06 Thread Kyle Sluder
On Sat, Dec 5, 2009 at 8:57 AM, Timofey Danshin wrote: > Hi. I've been hoping to write a number of applications that would be GUIs > for some command line tools on a remote FreeBSD machine. The only problem is > that i can't connect to it via SSH. This statement is virtually meaningless. What are

Re: Services Menu Heading

2009-12-06 Thread Kyle Sluder
On Sun, Dec 6, 2009 at 8:38 PM, Gerriet M. Denkmann wrote: > What magic incantations do I have to perform to make my service appear under > it's appropiate heading ? The heading is determined by what UITs your service accepts. There are certain hardcoded exceptions to this rule. This is an are

Services Menu Heading

2009-12-06 Thread Gerriet M. Denkmann
I have an app which offers an NSService. Works fine so far. But: I want this service to appear in the Services Menu under the "Searching" Header, together with "Look Up in Dictionary" and "Search With Google". (Currently it appears under "Text") So I checked the Info.plist of both Dictionary.ap

Re: NSTableView reloadData works just on init.

2009-12-06 Thread Nick Zitzmann
On Dec 5, 2009, at 5:22 AM, Alberto Piu wrote: >>shortcutsTable = [[NSTableView alloc] init]; There are several problems here: 1. The designated initializer of views is -initWithFrame:, not -init. 2. Even if you got that right, it would still not work, because you are resetting the po

Re: Carbon menus in Cocoa app

2009-12-06 Thread Vikram Sethi
I had some offline discussion with Eric around this. The problem was that I had stopped calling RunApplicationEventLoop() function, which installs an event handler that calls MenuSelect() in response to clicks on the menu bar. When I switched to Cocoa, MenuSelect() was not getting called. As a solu

Re: Draw rounded NSImage

2009-12-06 Thread Matt Neuburg
On or about 12/6/09 8:11 PM, thus spake "cocoa-dev-requ...@lists.apple.com" : > Date: Fri, 4 Dec 2009 14:22:04 -0700 > From: John Wright > Subject: Draw rounded NSImage > > I am trying to create a NSImage or NSImageCell with rounded corners > inside a NSTableView. I can't get anything to work. H

Re: Draw rounded NSImage

2009-12-06 Thread Gideon King
Your code restores the graphics state, which will remove your rounded rect clipping path, before you draw the image. If you draw the image before restoring the graphics state, you should be OK. Also you should not need to explicitly set the winding rule. HTH Gideon On 05/12/2009, at 7:22 AM,

Localizing Xibs using bindings

2009-12-06 Thread Rossi Matteo
I find it very annoying to localize Xibs by keeping a copy for each translation. It's both tedious and error-prone. I've found that by simply binding each button's title (or wharever other control you need) to the appropriate key of a NSDictionary object I can easily localize each item. No ne

SSH in my application

2009-12-06 Thread Timofey Danshin
Hi. I've been hoping to write a number of applications that would be GUIs for some command line tools on a remote FreeBSD machine. The only problem is that i can't connect to it via SSH. I have googled this issue, and found some scenarios for username/password authorization, but I use RSA authoriza

MacBook with USB GPS dongle and Core Location

2009-12-06 Thread Jeff Heard
I have a little GPS dongle that I have attached to my MacBook. Obviously I can access it via the serial port and read the NMEA strings directly from there, but I was wondering if it was possible to tie it into the Core Location API for a cleaner and more Apple-like way to get at the data? --

NSTableView reloadData works just on init.

2009-12-06 Thread Alberto Piu
Hi all, I'm writing on this mailing list because I can't get an NSTableView to display data. I have a NSTableView in my xib, connected to a NSObject controller. dataSource is my controller, and the IBOutlet is correctly connected to the NSTableView. This is my header // // ShortcutsTab

Problem setting to-one relationship on NSManagedObject

2009-12-06 Thread Jim Majure
I'm using the following code to create a new Core Data entity and populate a to-one relationship. Everything seems to be working okay except the "setValue:forKey:" to establish the to-one relationship. I've included the error messages below. Any ideas what I might be doing wrong? Thanks,

Draw rounded NSImage

2009-12-06 Thread John Wright
I am trying to create a NSImage or NSImageCell with rounded corners inside a NSTableView. I can't get anything to work. Here is the best I have so far inside my custom NSCell: - (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView {   if (thumbnailLink) {         NSURL *url = [NS

Re: Best way to hook into the run loop?

2009-12-06 Thread Kyle Sluder
On Dec 6, 2009, at 3:12 PM, Graham Cox wrote: Yes, which does make me wonder how others have implemented undo of drags in general. Is there a simple solution staring me in the face and I just can't see it? I don't have the code in front of me, and it would be a good idea to check our NSU

Re: unrecognized selector error when calling -stringValue on NSNumber

2009-12-06 Thread Quincey Morris
On Dec 6, 2009, at 15:58, Mazen M. Abdel-Rahman wrote: > NSNumber * primaryLanguageNumber = [self primaryLanguageID]; > NSString * primaryLanguageString = [primaryLanguageNumber stringValue]; > > primaryLanguageID is of type NSNumber. When I am stepping through the > debugger I can see the vari

Re: unrecognized selector error when calling -stringValue on NSNumber

2009-12-06 Thread Mazen M. Abdel-Rahman
Thanks! I found the problem - it is being assigned from a ComboBox - and the datasource for the ComboBox was returning a string - so I just had to change it to return a number. Bad mistake on my part. Thanks, Mazen On Dec 6, 2009, at 5:31 PM, Joar Wingfors wrote: > > On 6 dec 2009, at 15.5

Re: Heap and memory zone queries

2009-12-06 Thread Andrew Farmer
On 6 Dec 2009, at 13:57, jonat...@mugginsoft.com wrote: > 1. GC is on. Does that mean that all allocations invocation by NS*/CF* will > be in the auto_zone? Not necessarily. AppKit and CoreFoundation objects are still capable of allocating unmanaged memory (via malloc(), for instance) for their

Re: unrecognized selector error when calling -stringValue on NSNumber

2009-12-06 Thread Joar Wingfors
On 6 dec 2009, at 15.58, Mazen M. Abdel-Rahman wrote: > 2009-12-06 16:51:24.525 Averroes[21013:a0f] -[NSCFString stringValue]: > unrecognized selector sent to instance 0x1001d8a70 > > Doesn't that mean that it thinks primaryLanguageNumber is a string? And why > would it see it as a string?

Re: unrecognized selector error when calling -stringValue on NSNumber

2009-12-06 Thread Dave Carrigan
On Dec 6, 2009, at 3:58 PM, Mazen M. Abdel-Rahman wrote: > > NSNumber * primaryLanguageNumber = [self primaryLanguageID]; > NSString * primaryLanguageString = [primaryLanguageNumber stringValue]; > > primaryLanguageID is of type NSNumber. When I am stepping through the > debugger I can see th

Re: NSTextView & Horizontal Scrollbar bug

2009-12-06 Thread Ross Carter
On Dec 5, 2009, at 9:14 AM, Eric Gorr wrote: > On Dec 4, 2009, at 12:30 PM, Ross Carter wrote: > >> On Dec 4, 2009, at 9:29 AM, Eric Gorr wrote: >> >>> I've got a sample application at >>> http://ericgorr.net/cocoadev/TextViewNoWrap.zip which demonstrates the >>> problem I am seeing. >>> >>>

unrecognized selector error when calling -stringValue on NSNumber

2009-12-06 Thread Mazen M. Abdel-Rahman
Hi all, I am getting a very confusing error when I try to send a -stringValue message to an NSNumber object. Here is my code: NSNumber * primaryLanguageNumber = [self primaryLanguageID]; NSString * primaryLanguageString = [primaryLanguageNumber stringValue]; primaryLanguageID is of type NSNumb

Re: Best way to hook into the run loop?

2009-12-06 Thread Markus Spoettl
On Dec 7, 2009, at 12:12 AM, Graham Cox wrote: > Yes, which does make me wonder how others have implemented undo of drags in > general. Is there a simple solution staring me in the face and I just can't > see it? I believe the problems with multi-event undoing stem from the fact the you implem

Re: Best way to hook into the run loop?

2009-12-06 Thread Graham Cox
It's not just me running into undo problems - ironically just got this from Xcode (requiring quit and relaunch to recover) while trying to build after tweaking my undo manager source: "Internal error occurred while creating dependency graph: _registerUndoObject:: NSUndoManager 0x3befcb10 is in

Heap and memory zone queries

2009-12-06 Thread jonat...@mugginsoft.com
I have been using heap(1) to examine my apps heap. Small section for the auto_zone is shown. Queries follow. Zone auto_zone_0x2f6000: 70460 nodes (53237600 bytes) COUNT BYTES AVG CLASS_NAME TYPEBINARY = = === ===

Re: NSPopUpButton questions

2009-12-06 Thread Andy Lee
On Dec 6, 2009, at 2:11 PM, Paul Bruneau wrote: > On Dec 6, 2009, at 12:29 PM, Andy Lee wrote: >> Indeed, there are a few methods where the docs specifically recommend >> accessing the menu directly, e.g.: >> >>

Re: Best way to hook into the run loop?

2009-12-06 Thread Quincey Morris
On Dec 6, 2009, at 04:36, Graham Cox wrote: > On 06/12/2009, at 10:57 PM, Mike Abdullah wrote: > >> But why are you opening a group without registering an undo action? Why not >> just wait until the first action actually needs to be registered? > > I tried it but it doesn't work. I forget the d

Re: NSPopUpButton questions

2009-12-06 Thread Paul Bruneau
On Dec 6, 2009, at 12:29 PM, Andy Lee wrote: > On Dec 6, 2009, at 11:34 AM, Matt Neuburg wrote: >> On Sat, 5 Dec 2009 20:29:25 -0500, "timm...@gmail.com" >> said: >>> The Apple docs for NSPopUpButtons says to avoid accessing it's NSMenu >>> directly >> because it may need to do housekeeping. >>

[MEET] CocoaHeads-NYC this Thursday (*note location*)

2009-12-06 Thread Andy Lee
For our last meeting of 2009, Bob Clair will talk about blocks. ** IMPORTANT NOTE ABOUT LOCATION ** The December meeting will not be at the usual Tekserve location. Instead, it will be hosted by our friends at Apress: Apress 233 Spring Street (between 6th Aven

Re: Is it possible to pass an object to a NIB

2009-12-06 Thread DeNigris Sean
I tightened up the code a bit: #Obj-C version: - (id)initWithContentsOfURL:(NSURL *)nibFileURL nib_file = NSNib.alloc.initWithContentsOfURL NSURL::fileURLWithPath(@@NibPath) #Obj-C version: - (BOOL)instantiateNibWithOwner:(id)ownertopLevelObjects:(NSArray **)topLevelObjects #The Ruby bridge puts

Re: Programatically Setting Delegate

2009-12-06 Thread Kyle Sluder
On Dec 6, 2009, at 7:12 AM, Alexander Spohr wrote: So what are you telling us? He's saying he eventually found the problem on his own. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: NSPopUpButton questions

2009-12-06 Thread Andy Lee
On Dec 6, 2009, at 11:34 AM, Matt Neuburg wrote: > On Sat, 5 Dec 2009 20:29:25 -0500, "timm...@gmail.com" > said: >> The Apple docs for NSPopUpButtons says to avoid accessing it's NSMenu >> directly > because it may need to do housekeeping. > > Where do the Apple docs say that? I'm thinking ther

Re: NSPopUpButton questions

2009-12-06 Thread Matt Neuburg
On Sat, 5 Dec 2009 20:29:25 -0500, "timm...@gmail.com" said: >The Apple docs for NSPopUpButtons says to avoid accessing it's NSMenu directly because it may need to do housekeeping. Where do the Apple docs say that? I'm thinking there might be some misunderstanding lurking here. m. -- matt neubu

Re: Best way to hook into the run loop?

2009-12-06 Thread Paul Bruneau
On Dec 6, 2009, at 5:53 AM, Graham Cox wrote: > > On 06/12/2009, at 8:12 PM, Uli Kusterer wrote: > >> I thought that was what undo groups were for? Open a group at the start of >> the drag manually, close it at the end, and everything in between gets >> lumped into one big action at the end.

Re: Best way to hook into the run loop?

2009-12-06 Thread Andy Lee
On Dec 6, 2009, at 10:20 AM, Mike Abdullah wrote: > On 6 Dec 2009, at 13:30, Andy Lee wrote: > >> On Dec 6, 2009, at 7:36 AM, Graham Cox wrote: >>> My fourth approach is to write my own bloody undo manager and have done >>> with it. Result so far - bliss. >> >> FWIW, Wil Shipley agrees about the

Re: NSPopUpButton questions

2009-12-06 Thread Keary Suska
On Dec 5, 2009, at 6:29 PM, timm...@gmail.com wrote: > The Apple docs for NSPopUpButtons says to avoid accessing it's NSMenu > directly because it may need to do housekeeping. I had to access it's NSMenu > directly though so that I could make a separator menu item. Is this fine for > this situa

Re: Best way to hook into the run loop?

2009-12-06 Thread Mike Abdullah
On 6 Dec 2009, at 13:30, Andy Lee wrote: > On Dec 6, 2009, at 7:36 AM, Graham Cox wrote: >> My fourth approach is to write my own bloody undo manager and have done with >> it. Result so far - bliss. > > FWIW, Wil Shipley agrees about the bliss part: > >

Re: Programatically Setting Delegate

2009-12-06 Thread Alexander Spohr
I translate you url for a better understanding for other readers: You google: > you forgot to allocate the object before setting it's delegate The result: > No results found for "you forgot to allocate the object before setting it's > delegate". So what are you telling us? Maybe you should have

Re: Best way to hook into the run loop?

2009-12-06 Thread Graham Cox
Ah, thanks for that little glimmer of encouragement! If it's good enough for WS, it's good enough for me. I guess my problems stem from the fact that my app is heavily based on mouse dragging gestures, and mouse dragging is a whole series of events. The undo manager is maybe not so well designe

Re: Best way to hook into the run loop?

2009-12-06 Thread Andy Lee
On Dec 6, 2009, at 7:36 AM, Graham Cox wrote: > My fourth approach is to write my own bloody undo manager and have done with > it. Result so far - bliss. FWIW, Wil Shipley agrees about the bliss part: > I was so into using Cor

Re: Best way to hook into the run loop?

2009-12-06 Thread Graham Cox
On 06/12/2009, at 10:57 PM, Mike Abdullah wrote: > But why are you opening a group without registering an undo action? Why not > just wait until the first action actually needs to be registered? I tried it but it doesn't work. I forget the details now as this was my first approach and that was

Re: Best way to hook into the run loop?

2009-12-06 Thread Mike Abdullah
On 6 Dec 2009, at 10:53, Graham Cox wrote: > > On 06/12/2009, at 8:12 PM, Uli Kusterer wrote: > >> I thought that was what undo groups were for? Open a group at the start of >> the drag manually, close it at the end, and everything in between gets >> lumped into one big action at the end. It

Re: passing nothing to method with CGPoint argument

2009-12-06 Thread Graham Cox
On 06/12/2009, at 1:08 PM, Chunk 1978 wrote: > for factoring purposes i want to be able to call the same > method from touchesEnded that will clear the output strings if there > is no point, but CGPointZero is a point. Can't you just define an 'impossible' point value to act as a sentinel? So

Re: Best way to hook into the run loop?

2009-12-06 Thread Graham Cox
On 06/12/2009, at 8:12 PM, Uli Kusterer wrote: > I thought that was what undo groups were for? Open a group at the start of > the drag manually, close it at the end, and everything in between gets lumped > into one big action at the end. It may get "replayed" internally, but will > all be trig

Re: Best way to hook into the run loop?

2009-12-06 Thread Uli Kusterer
On 05.12.2009, at 01:36, Graham Cox wrote: > If anyone can think of an elegant and straightforward alternative, please > feel free to suggest it. I've found that the "obvious" solution of submitting > an object's state at the start of a drag is actually really awkward and > horrible in practice,