Re: completely messed up with bindings...

2009-01-15 Thread Vitaly Ovchinnikov
One question was solved. I found a correct keypath to bind my document on selected filter. It works with selection.self keypath. But my -setFilter method still doesn't get called when I change it's properties. Maybe it is right, but I need to know when filter's properties were changed. Do I need

Re: NSImage resizing

2009-01-15 Thread Parimal Das
Heinrich when i am using the code corrected by U * NSImage *myIcon = [[NSWorkspace sharedWorkspace] iconForFile:filePath]; NSLog(@%@, myIcon); // check 1 NSLog(@OK1); NSSize imageSize = { 384.0, 384.0 }; // in points (384 pts = 512 px at 96 dpi resolution) [myIcon setSize:imageSize];

Re: Quick (?) NSCell question: getting the drawing (inner) rectangle

2009-01-15 Thread Luke Evans
Mmm... well it looks like NSTableColumn's -width might is returning the same size that I actually get asked to draw in my NSCell subclass, so perhaps this is indeed simple/quick. I was concerned that intercell spacing, grid etc. might have to come out of the column width before the cell

Re: File association

2009-01-15 Thread Mahaboob
Hi, I gone through the documentation and did in the info.plist file like: Document Tyoe Name : myApplication CFBundleTypeExtensions : prp Document OS Type : Role : Editor Handler rank : Owner Then run it and saved the project. Then I double click the saved project, but it opens in TextEdit.

Using an NSOpenGLVIew to play a Quartz composition with QCRenderer

2009-01-15 Thread Jonathan Selander
Hi, I want to be able to use antialiasing with my qtz as well as being able to record frames, so I'm looking at ways to load the composition with a custom opengl context. Ive looked at the QCTV example a bit, and tried to make the first example on

Re: NSImage resizing

2009-01-15 Thread Heinrich Giesen
Hi, On 15.01.2009, at 09:31, Parimal Das wrote: i am getting the following output error- 2009-01-15 13:43:09.313 te[747:10b] NSImage 0x117340 Size={32, 32} Reps=( NSIconRefBitmapImageRep 0x117e30 Size={128, 128} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=128x128

Filtering NSPopUpButtonCell when clicking on it

2009-01-15 Thread Kubernan
Hello, In my outline view i have a NSPopUpButtonCell for which the table column is bound to a NSArrayController that contains coredata entities. The goal is to restrict the content of items in the pop up cell depending on other attributes of the row. So i decided to call the

NSDictionary key from the content of a set

2009-01-15 Thread Tim McDonald
Hi I'm trying to create an NSDictionary that uses key based upon the contents of a NSSet (specifically a set of NSManagedObjectID's). I'm currently at a bit loss as to how to do it. My various attempts at a hash based solution (see below) don't appear to be working. I don't suppose

Re: WebView (Caching)

2009-01-15 Thread Mike Abdullah
On 15 Jan 2009, at 01:29, Rob Keniger wrote: On 15/01/2009, at 6:53 AM, Joseph Crawford wrote: When I drop a WebView on my XIB does it automatically cache the file(s) that it loads? I ask because I could not get a JS command to work properly even after I fixed the would be problem. This

NSPredicateEditor

2009-01-15 Thread Chris Idou
Is it just me or does the enabled checkbox in IB for NSPredicateEditor, as well as the enabled bindings do nothing? Stay connected to the people that matter most with a smarter inbox. Take a look http://au.docs.yahoo.com/mail/smarterinbox

Re: NSPredicateEditor

2009-01-15 Thread Volker in Lists
Hi, works for me on 10.5.5 just as well as via code and calling the appropriate methods. At least that was my experience from before christmas. Want me to retry on 10.5.6? Volker Am 15.01.2009 um 14:14 schrieb Chris Idou: Is it just me or does the enabled checkbox in IB for

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Jason Foreman
On Wed, Jan 14, 2009 at 11:58 PM, Vitaly Ovchinnikov vitaly.ovchinni...@gmail.com wrote: Well, OK. I am ready to release all root objects myself. Just tested with subclassed NSView from that NIB - it didn't get released automatically. So I added several -release calls to -dealloc method of my

Re: File association

2009-01-15 Thread Benjamin Stiglitz
Document Tyoe Name : myApplication CFBundleTypeExtensions : prp Document OS Type : Role : Editor Handler rank : Owner Then run it and saved the project. Then I double click the saved project, but it opens in TextEdit. Is there any other keys I need to set? You need to set a unique

Re: NSDictionary key from the content of a set

2009-01-15 Thread Benjamin Stiglitz
I'm trying to create an NSDictionary that uses key based upon the contents of a NSSet (specifically a set of NSManagedObjectID's). I'm currently at a bit loss as to how to do it. My various attempts at a hash based solution (see below) don't appear to be working. Are you creating a map

Re: Quick (?) NSCell question: getting the drawing (inner) rectangle

2009-01-15 Thread Benjamin Stiglitz
Perhaps this method is only intended to provide information to the system by the NSCell implementation and is not intended for the purpose I need. In which case, is there a way to achieve what I want without having to ask for the NSTableColumn width and working out what proportion of this

RE: Report writer for Cocoa?

2009-01-15 Thread Jon C. Munson II
Thanks for the answers so far. Matt: Just making sure I get what you are saying, the answer is Yes that IB can be used as a sort of report writer. Do you know of any examples out there where folx have done that sort of thing? I don't mind experimenting, but there are some things I'd probably

Manipulating QC input ports with QCRenderer

2009-01-15 Thread Jonathan Selander
Hi, I just managed to set up QCRenderer to play my composition in order to record the composition to a video file, but I also need to change the values of a couple of input ports in the composition that are published. I could do it with QCView and QCPatchController, but i know QCRenderer

save screengrab on iphone

2009-01-15 Thread Memo Akten
Not sure if this is the right place for this, but is it possible for my app to screengrab what its done and save it to the photo app? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Vitaly Ovchinnikov
I'll try to describe it again. I have NIB, NSObject-based owner of this nib and NSView + NSArrayController in that NIB. Let's name owner of this NIB MyViewController. It has -init and -dealloc methods -(id) init { self = [super init]; [NSBundle loadNibNamed:@MyView1 owner:self];

Re: save screengrab on iphone

2009-01-15 Thread danton chin
Memo, While in your iPhone app hold down the power off button then hit the home button. A picture of the current screen will be added to your photo album. On Thu, Jan 15, 2009 at 11:08 AM, Memo Akten m...@memo.tv wrote: Not sure if this is the right place for this, but is it possible for my

Re: save screengrab on iphone

2009-01-15 Thread Memo Akten
wow i did not know that, brilliant thanks! is there a way to do it programmatically? i could not find it in the docs... On 15 Jan 2009, at 16:17, danton chin wrote: Memo, While in your iPhone app hold down the power off button then hit the home button. A picture of the current screen

Re: completely messed up with bindings...

2009-01-15 Thread Keary Suska
On Jan 15, 2009, at 1:02 AM, Vitaly Ovchinnikov wrote: One question was solved. I found a correct keypath to bind my document on selected filter. It works with selection.self keypath. But my -setFilter method still doesn't get called when I change it's properties. Maybe it is right, but I need

Re: Filtering NSPopUpButtonCell when clicking on it

2009-01-15 Thread Keary Suska
On Jan 15, 2009, at 4:04 AM, Kubernan wrote: In my outline view i have a NSPopUpButtonCell for which the table column is bound to a NSArrayController that contains coredata entities. The goal is to restrict the content of items in the pop up cell depending on other attributes of the row.

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Jason Foreman
On Thu, Jan 15, 2009 at 10:04 AM, Vitaly Ovchinnikov vitaly.ovchinni...@gmail.com wrote: - (void) dealloc { // next two lines added after your comment [pView release]; [pArrayController release]; [super dealloc]; } This won't work as you intend, see below for explanation.

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Keary Suska
On Jan 15, 2009, at 9:04 AM, Vitaly Ovchinnikov wrote: I'll try to describe it again. I have NIB, NSObject-based owner of this nib and NSView + NSArrayController in that NIB. Let's name owner of this NIB MyViewController. It has -init and - dealloc methods Basically, you have a classic

Re: save screengrab on iphone

2009-01-15 Thread Robert Marini
Take a look at UIGraphicsGetImageFromCurrentImageContext() (or something like that, don't have the docs handy). -rob. On Jan 15, 2009, at 11:18 AM, Memo Akten wrote: wow i did not know that, brilliant thanks! is there a way to do it programmatically? i could not find it in the docs...

Re: What determines VSIZE allocation?

2009-01-15 Thread Michael Ash
On Thu, Jan 15, 2009 at 1:59 AM, Bill Bumgarner b...@mac.com wrote: On Jan 14, 2009, at 9:40 PM, Michael Ash wrote: On Wed, Jan 14, 2009 at 5:31 PM, Tobias Zimmerman automa...@gmail.com wrote: I know there are people who will say VSIZE doesn't matter if there is no paging, This is kind of

Re: completely messed up with bindings...

2009-01-15 Thread Vitaly Ovchinnikov
So, if my filter will have ten properties, I should observe them all? Is it possible to fake this somehow. Like define self property that depends of all my properties and them observe it? Or something like this... On Thu, Jan 15, 2009 at 7:19 PM, Keary Suska cocoa-...@esoteritech.com wrote: On

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Vitaly Ovchinnikov
Well, I got the idea and will try this. Just one question: do I miss something when just releasing my two outlets to two top-level objects. Your method is more common solution, but am I wrong with mine one? I have only two objects in my NIB and release them both. Thanks for help. On Thu, Jan 15,

Re: Constructing class names dynamically

2009-01-15 Thread Mohan Parthasarathy
Both of the methods return nil and as per the document it says Class is not loaded. Is there a compile time option to load the classes or only way to do it as at runtime.. thanks mohan On Wed, Jan 14, 2009 at 6:46 AM, Adam Venturella aventure...@gmail.comwrote: The output is the same, but

Re: completely messed up with bindings...

2009-01-15 Thread Keary Suska
On Jan 15, 2009, at 10:05 AM, Vitaly Ovchinnikov wrote: So, if my filter will have ten properties, I should observe them all? Is it possible to fake this somehow. Like define self property that depends of all my properties and them observe it? Or something like this... If all 10 properties

Re: what the hell is Error (1007) creating CGSWindow?

2009-01-15 Thread David Duncan
On Jan 14, 2009, at 9:10 PM, Michael B Johnson wrote: So I have an application that has been bedeviled by a nasty, nasty bug for years that manifests itself as an exception being thrown with: Error (1007) creating CGSWindow At that point, the user has no choice but to reboot the machine -

Re: what the hell is Error (1007) creating CGSWindow?

2009-01-15 Thread David Duncan
On Jan 15, 2009, at 9:32 AM, David Duncan wrote: On Jan 14, 2009, at 9:10 PM, Michael B Johnson wrote: So I have an application that has been bedeviled by a nasty, nasty bug for years that manifests itself as an exception being thrown with: Error (1007) creating CGSWindow At that point,

Re: what the hell is Error (1007) creating CGSWindow?

2009-01-15 Thread Michael B Johnson
On Jan 15, 2009, at 9:35 AM, David Duncan wrote: On Jan 15, 2009, at 9:32 AM, David Duncan wrote: On Jan 14, 2009, at 9:10 PM, Michael B Johnson wrote: So I have an application that has been bedeviled by a nasty, nasty bug for years that manifests itself as an exception being thrown

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Keary Suska
On Jan 15, 2009, at 10:11 AM, Vitaly Ovchinnikov wrote: Well, I got the idea and will try this. Just one question: do I miss something when just releasing my two outlets to two top-level objects. Your method is more common solution, but am I wrong with mine one? I have only two objects in my

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Vitaly Ovchinnikov
I release outlets in -dealloc that gets called after I removed array controller's binding to it. I checked this with NSLog() calls and by breakpoint - it works. I release my outlets there and they seems to be deallocated too (I checked for NSView, but it seems array controller works the same way).

Re: NSDictionary key from the content of a set

2009-01-15 Thread Tim McDonald
Thanks for the response. The code wasn't working as I expected because I'd failed to initialise the setOfValuesForCharacteristicTypes NSMutableSet which I was using check the hashFromCharacteristicTypes before sending the hash to the dictionary. I'd presumed it was a problem with set

formatting toolbar-please help

2009-01-15 Thread rethish
Hi all, Is there any components for formatting the text (other than show font toolbaritem in nstoolbar) which can be used in xcode? I want a formatting toolbar which can be attached with the textview so that formatting can be done easily. Somewhat like the attachment. Please refer the

AudioFileOpen Error

2009-01-15 Thread Julio Ferrer
Hi, I'm new to Cocoa and I'm totally stucked with AudioFileOpen. I searched the web and the mailing list for hints on what I'm doing wrong, but I can't figure out the problem. Below is what I did. a) Created a Cocoa Core Data Document Application. b) Code for MyDocument.h #import

Re: AudioFileOpen Error

2009-01-15 Thread Benjamin Stiglitz
When I build the project I get one error on the AudioFileOpen line. This is log:_AudioFileOpen, referenced from: It sounds like you haven’t linked against the AudioToolbox framework. You can add the framework by bringing up the context menu in the Xcode group tree and selecting Add

Can dirhelper delete files in NSTemporaryDirectory() while app is running?

2009-01-15 Thread Steve Shepard
Question: It appears that dirhelper can delete files from NSTemporaryDirectory() while an app is running. Is this a bug in com.apple.bsd.dirhelper.plist, which specifies that dirhelper run periodically? Background: I'm trying to track down a bug that a few users have reported but that I can't

Poll Processes For Menu Bar Items?

2009-01-15 Thread Chunk 1978
i'm trying to poll the active processes for menu bar items (Volume, Date Time, etc.) but the NSDictionary key @NSApplicationBundleIdentifier doesn't seem to recognize the bundle identifier for them. -=-=-=- //Poll Processes NSWorkspace *ws = [NSWorkspace sharedWorkspace]; NSArray

Re: what the hell is Error (1007) creating CGSWindow?

2009-01-15 Thread Rick Mann
On Jan 15, 2009, at 09:32:00, David Duncan wrote: On Jan 14, 2009, at 9:10 PM, Michael B Johnson wrote: So I have an application that has been bedeviled by a nasty, nasty bug for years that manifests itself as an exception being thrown with: Error (1007) creating CGSWindow At that

Re: Constructing class names dynamically

2009-01-15 Thread Andy Lee
Unless you're explicitly loading in bundles or plugins, I wouldn't think you need to force the class to be loaded. I just tested a call to NSClassFromString(nameOfTestClass) as the first line of my main() function and it worked. In situations like this I try to question my most petty

Re: Constructing class names dynamically

2009-01-15 Thread Mohan Parthasarathy
Hi, I have tried this to make sure that the class is loaded, but not working: [[NSBundle mainBundle] classNamed:clsName]; [self loadBundleForClass:clsName]; Class cls = NSClassFromString(clsName); I still get nil.. What am i missing ? thanks mohan On Thu, Jan 15, 2009 at 9:17 AM, Mohan

Re: Constructing class names dynamically

2009-01-15 Thread Mohan Parthasarathy
Hi, Thanks a bunch.. It really helped me to debug the problem. -mohan On Thu, Jan 15, 2009 at 10:48 AM, Andy Lee ag...@mac.com wrote: Unless you're explicitly loading in bundles or plugins, I wouldn't think you need to force the class to be loaded. I just tested a call to

Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread Mike Chambers
I am using NSCoder to encode my class. This is working fine, but I am having trouble figuring out how to encode CGPoint. I have searched online, but have found some conflicting information, and as I am relatively new to Objective-C, I am having trouble figuring it out. Does anyone have a simple

Working with python interface form Obj-C app

2009-01-15 Thread James Maxwell
I have a Cocoa app, written in Obj-C, and I want to communicate with a 3rd party app, which has a python interface. The 3rd party app itself is actually written in C++, but it's run from python. How do I go about doing this? I want to basically send python commands to this app's python

Re: Poll Processes For Menu Bar Items?

2009-01-15 Thread Benjamin Dobson
On 15 Jan 2009, at 18:44:22, Chunk 1978 wrote: i'm trying to poll the active processes for menu bar items (Volume, Date Time, etc.) but the NSDictionary key @NSApplicationBundleIdentifier doesn't seem to recognize the bundle identifier for them. Each one of them is a plugin for

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-15 Thread Vitaly Ovchinnikov
I finally did it :) I added third object to NIB and used it as proxy to store data and to bind array controller. Now array controller doesn't retain file's owner and I don't need to unbind anything, just release file's owner when I need. Thank you. On Thu, Jan 15, 2009 at 7:40 PM, Keary Suska

Re: Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread Dave DeLong
-encodeWithCoder: [encoder encodeFloat:myPoint.x forKey:@myPoint.x]; [encoder encodeFloat:myPoint.y forKey:@myPoint.y]; -initWithCoder: myPoint = CGPointMake([decoder decodeFloatForKey:@myPoint.x], [decoder decodeFloatForKey:@myPoint.y]); HTH, Dave On Jan 15, 2009, at 12:38 PM, Mike

Re: Poll Processes For Menu Bar Items?

2009-01-15 Thread Chunk 1978
is it possible to poll SystemUIServer for it's active plugins? On Thu, Jan 15, 2009 at 2:44 PM, Benjamin Dobson importedfromsp...@googlemail.com wrote: On 15 Jan 2009, at 18:44:22, Chunk 1978 wrote: i'm trying to poll the active processes for menu bar items (Volume, Date Time, etc.) but the

Re: Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread David Duncan
On Jan 15, 2009, at 11:38 AM, Mike Chambers wrote: Does anyone have a simple example of how to encode and decode a CGPoint struct using NSCoder? You can always use NSValue's +valueWithPoint:. You will have to convert to NSPoint (which is virtually a no-op) via NSPointFromCGPoint(). --

Re: Report writer for Cocoa?

2009-01-15 Thread Ben
Have you seen MGTemplateEngine by Matt Gemmell? http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa I've not used it, but it looks quite an interesting system. -Ben On 14 Jan 2009, at 20:01, Jon C. Munson II wrote: Namaste! I could be missing the obvious, however, my

Re: Manipulating QC input ports with QCRenderer

2009-01-15 Thread Jonathan Selander
Does anybody have an idea on this? It's driving me crazy that i can't read or set port values in the quartz composition. 15 jan 2009 kl. 16.52 skrev Jonathan Selander: Hi, I just managed to set up QCRenderer to play my composition in order to record the composition to a video file, but I

Re: Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread glenn andreas
On Jan 15, 2009, at 2:36 PM, David Duncan wrote: On Jan 15, 2009, at 11:38 AM, Mike Chambers wrote: Does anyone have a simple example of how to encode and decode a CGPoint struct using NSCoder? You can always use NSValue's +valueWithPoint:. You will have to convert to NSPoint (which is

Re: Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread glenn andreas
On Jan 15, 2009, at 1:38 PM, Mike Chambers wrote: I am using NSCoder to encode my class. This is working fine, but I am having trouble figuring out how to encode CGPoint. I have searched online, but have found some conflicting information, and as I am relatively new to Objective-C, I am having

Re: NSOutlineView, tracking in a custom NSTextFieldCell, ShiftCmd Keys

2009-01-15 Thread Eric Gorr
Now, one idea I had was to override the mouseDown method of my NSOutlineView to do something like: - (void)mouseDown:(NSEvent *)theEvent { NSPoint eventLocation = [theEvent locationInWindow]; NSPoint localPoint = [self convertPoint:eventLocation fromView:nil];

Re: NSOutlineView, tracking in a custom NSTextFieldCell, ShiftCmd Keys

2009-01-15 Thread Eric Gorr
Thanks. Any thoughts on whether or not it is even valid to call trackMouse when obtaining a cell this (via preparedCellAtColumn) way? On Jan 15, 2009, at 4:16 PM, Corbin Dunn wrote: You want -frameOfCellAtRow:column:, not frameOfOutlineCellAtRow:row. Do you get a call to this method, if

Re: Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread Sean McBride
On 1/15/09 2:33 PM, glenn andreas said: [aCoder encodeCGPoint: cgPoint forKey: @Key]; cgPoint = [aDecoder decodeCGPointForKey: @Key]; Seems those are iPhone-only methods. -- Sean McBride, B. Eng

ObjC in time-critical parts of the code

2009-01-15 Thread Jens Bauer
Hi all, I just want to let you know that I discovered I did a terrible mistake today. In other words: you don't have to learn from your own mistakes, if you can learn from mine. =) I investigated this, because my rendering was choppy. The code... - (void)renderObject { } -

Re: Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread Nick Zitzmann
On Jan 15, 2009, at 12:38 PM, Mike Chambers wrote: Does anyone have a simple example of how to encode and decode a CGPoint struct using NSCoder? In addition to what everyone else has already said, if you're using the Leopard or later SDK, you can also add NS_BUILD_32_LIKE_64 to your

Re: ObjC in time-critical parts of the code

2009-01-15 Thread Jean-Daniel Dupas
Le 15 janv. 09 à 23:16, Jens Bauer a écrit : Hi all, I just want to let you know that I discovered I did a terrible mistake today. In other words: you don't have to learn from your own mistakes, if you can learn from mine. =) I investigated this, because my rendering was choppy. The

Re: What determines VSIZE allocation?

2009-01-15 Thread Greg Parker
On Jan 15, 2009, at 8:55 AM, Michael Ash wrote: On Thu, Jan 15, 2009 at 1:59 AM, Bill Bumgarner b...@mac.com wrote: For example, an application's VSIZE might be growing over time because it is mmap()'ing a bunch of files (or a few small files). If the app fails to unmap, the VSIZE will

Re: Constructing class names dynamically

2009-01-15 Thread Greg Parker
On Jan 15, 2009, at 10:27 AM, Mohan Parthasarathy wrote: I have tried this to make sure that the class is loaded, but not working: [[NSBundle mainBundle] classNamed:clsName]; [self loadBundleForClass:clsName]; Class cls = NSClassFromString(clsName); I still get nil.. What am i missing ?

Re: Manipulating QC input ports with QCRenderer

2009-01-15 Thread Steve Christensen
So QCRenderer's -valueForInputKey: and -setValue:forInputKey: aren't working to, respectively, read or set a port value? Have you tried printing out the array returned by -inputKeys to make sure the particular keys are, in fact, published? steve On Jan 15, 2009, at 12:44 PM, Jonathan

Re: ObjC in time-critical parts of the code

2009-01-15 Thread Michael Ash
On Thu, Jan 15, 2009 at 5:16 PM, Jens Bauer jensba...@christian.net wrote: Hi all, I just want to let you know that I discovered I did a terrible mistake today. In other words: you don't have to learn from your own mistakes, if you can learn from mine. =) I investigated this, because my

Re: NSPredicateEditor

2009-01-15 Thread Chris Idou
Well it doesn't do anything for me. And I downloaded PredicateEditorSample ( http://developer.apple.com/samplecode/PredicateEditorSample/index.html) and unchecked enabled for the PredicateEditor and it doesn't do anything. And I tried calling setEnabled:NO in awakeFromNib on the

Re: NSOutlineView, tracking in a custom NSTextFieldCell, ShiftCmd Keys

2009-01-15 Thread Corbin Dunn
Reply for cocoa-dev: Eric is right -- NSTableView won't do tracking in a cell if the shift or alt keys are down. This is intentionally done, and has always been the case. A possible work around is what Eric is thinking about, which is to override mouseDown and do his own trackMouse

Re: [Leopard] Spotlight/Help-like menu item

2009-01-15 Thread Lee Ann Rucker
I've tried this - non-public APIs don't scare me - but when I set an event handler on the contentView, I didn't get kEventControlGetFrameMetrics. I only get it on the contentView's superview, but it doesn't have one at awakeFromNib time. I have to wait until it gets a

BYU Cocoaheads Meeting Tonight!

2009-01-15 Thread Dave DeLong
Hi everyone, BYU Cocoaheads will be having their monthly meeting tonight at 7PM in 1170 TMCB on BYU campus in Provo, UT. The topic of tonight's meeting is Properties in Objective-C 2.0. For more information, including a map to the meeting location, please visit

Localized Nib Still In English

2009-01-15 Thread Walker Argendeli
I'm starting chapter 16 in hillegass's book, which deals with localization. The first 3 pages or so had me get info for MyDocument.nib, add a French localization, open the new French nib, and change 4 things into French. I did that and changed my preferred language in system preferences

Re: ObjC in time-critical parts of the code

2009-01-15 Thread Chris Hanson
Rather than cobble together your own measurement infrastructure using old Carbon calls and NSLog, I recommend in the strongest possible terms that you measure your application's performance using purpose- built profiling and analysis tools like Shark and Instruments. Performance measurement

Re: NSPredicateEditor

2009-01-15 Thread Peter Ammon
On Jan 15, 2009, at 5:14 AM, Chris Idou wrote: Is it just me or does the enabled checkbox in IB for NSPredicateEditor, as well as the enabled bindings do nothing? enabled indeed does nothing yet. If you want to prevent the user from changing an NSPredicateEditor, you can use

Re: Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread Kyle Sluder
On Thu, Jan 15, 2009 at 5:21 PM, Nick Zitzmann n...@chronosnet.com wrote: In addition to what everyone else has already said, if you're using the Leopard or later SDK, you can also add NS_BUILD_32_LIKE_64 to your target's preprocessor definitions. Then CGPoint and NSPoint will be exactly the

Re: NSSpellChecker (foundation) broken for custom NSSpellServer servers

2009-01-15 Thread Gary L. Wade
First off, I tried to read the linked web page, but it appears your style sheet is causing the left margin to be displayed a couple of words or so to the left of the visible browser window on Safari and Camino, so it's almost impossible to read. Second, you should submit a bug by way of

Nib memory management under Garbage Collection

2009-01-15 Thread Rob Keniger
After reading the previous thread on memory management of Nib objects, I am unsure how it applies to memory-managed apps. The Garbage Collection programming guide says that if you don't want the collector to collect top-level Nib objects, you must maintain a strong reference to them in

Re: Working with python interface form Obj-C app

2009-01-15 Thread Andrew Farmer
On 15 Jan 09, at 11:37, James Maxwell wrote: I have a Cocoa app, written in Obj-C, and I want to communicate with a 3rd party app, which has a python interface. The 3rd party app itself is actually written in C++, but it's run from python. How do I go about doing this? I want to basically

Re: ObjC in time-critical parts of the code

2009-01-15 Thread Shawn Erickson
On Thu, Jan 15, 2009 at 2:16 PM, Jens Bauer jensba...@christian.net wrote: My guess is that the message dispatcher probably needs to do something else than servicing *my* application, so I believe it's the nature of the environment, not a bug. This statement isn't even close to being correct.

Re: Nib memory management under Garbage Collection

2009-01-15 Thread mmalc Crawford
On Jan 15, 2009, at 5:03 PM, Rob Keniger wrote: That's fine, but what happens when the Owner goes away? Is it still responsible for setting top-level Nib objects to nil before its - finalize method is called or will the collector clean up the Nib objects automatically?

Re: ObjC in time-critical parts of the code

2009-01-15 Thread Shawn Erickson
On Thu, Jan 15, 2009 at 2:16 PM, Jens Bauer jensba...@christian.net wrote: - (void)renderAll { UnsignedWideus; double time; Microseconds(us); time = ((double) us.hi) * 65536.0 * 65536.0 + ((double) us.lo); [self renderObject];

detecting touches not from a view/window on iphone

2009-01-15 Thread Memo Akten
Hi, what I'd like to be able to do in my iphone app, is detect touches on the window (or a view), from an object which is not a UIResponder. Ideally if touches sent notifications which could be registered via the notification center it would be ideal. I know I could add touchesBegan,

Re: Nib memory management under Garbage Collection

2009-01-15 Thread Rob Keniger
On 16/01/2009, at 11:45 AM, mmalc Crawford wrote: That's fine, but what happens when the Owner goes away? Is it still responsible for setting top-level Nib objects to nil before its - finalize method is called or will the collector clean up the Nib objects automatically?

Re: Report writer for Cocoa?

2009-01-15 Thread Chris Hanson
On Jan 14, 2009, at 12:01 PM, Jon C. Munson II wrote: I could be missing the obvious, however, my question is whether a report writer tool (like Crystal Reports or MS Access, by way of example) exists for Cocoa? In the future, it might make it easier to get help if you explain more

Re: Nib memory management under Garbage Collection

2009-01-15 Thread j o a r
On Jan 15, 2009, at 6:35 PM, Rob Keniger wrote: as far as I can tell the Nib objects should just get cleaned up automatically as their root (the File's Owner) is no longer hanging around. Note that the files owner isn't necessarily the owner / root of all objects instantiated by the

Re: Nib memory management under Garbage Collection

2009-01-15 Thread Rob Keniger
On 16/01/2009, at 1:06 PM, j o a r wrote: Under GC you're not responsible for releasing anything. That comment doesn't apply to GC. You have the inverse responsibility though: Making sure that you have strong references to all objects that you're interested in keeping alive. Thanks.

Re: detecting touches not from a view/window on iphone

2009-01-15 Thread Stephen J. Butler
On Thu, Jan 15, 2009 at 7:59 PM, Memo Akten m...@memo.tv wrote: Hi, what I'd like to be able to do in my iphone app, is detect touches on the window (or a view), from an object which is not a UIResponder. Ideally if touches sent notifications which could be registered via the notification

Re: Nib memory management under Garbage Collection

2009-01-15 Thread mmalc Crawford
On Jan 15, 2009, at 6:35 PM, Rob Keniger wrote: Well, yes, I've read that document several times already, and as far as I can tell the Nib objects should just get cleaned up automatically as their root (the File's Owner) is no longer hanging around. I was just a bit confused by this page

Re: Manipulating QC input ports with QCRenderer

2009-01-15 Thread Matt Long
Inputs and Outputs in the root patch can be accessed with @path.patchname.value where patchname is the name of the input or output. http://www.cocoabuilder.com/archive/message/cocoa/2008/12/27/226313 -Matt On Jan 15, 2009, at 1:44 PM, Jonathan Selander wrote: Does anybody have an idea on

Re: Cocoa-dev Digest, Vol 6, Issue 86

2009-01-15 Thread Tobias Zimmerman
On Thu, Jan 15, 2009 at 1:59 AM, Bill Bumgarner b...@mac.com wrote: For example, an application's VSIZE might be growing over time because it is mmap()'ing a bunch of files (or a few small files). If the app fails to unmap, the VSIZE will grow and the app may likely exhaust its

Re: Cocoa-dev Digest, Vol 6, Issue 86

2009-01-15 Thread Ashley Clark
On Jan 15, 2009, at 11:19 PM, Tobias Zimmerman wrote: I am grateful to everyone who has responded, and, as I expected, many concur that VSIZE is a (largely) meaningless statistic. However, I am still not entirely satisfied with the answer to my first question, which is: How does the OS

Re: What Determines VSIZE allocation?

2009-01-15 Thread Tobias Zimmerman
I believe, if I understood Bill Bumgarner's message correctly, is that the 8GB range being assigned to the app is due in part to the design of the garbage collector, libauto. I doubt that Apache is compiled to use the garbage collector at all and thus, is not having that memory range

Re: What Determines VSIZE allocation?

2009-01-15 Thread Bill Bumgarner
On Jan 15, 2009, at 10:26 PM, Tobias Zimmerman wrote: So, moral of the story: GC apps in 64-bit mode allocate themselves a tremendous amount of virtual memory, but unless they are actually *using* a lot of VM, then there is nothing to worry about. Did I get that right? That is correct.

Re: Report writer for Cocoa?

2009-01-15 Thread Gary L. Wade
In defense of the original poster, I understood perfectly what he was asking, and the responses he received showed others did, too. Pretty much everyone who has heard of FileMaker and Microsoft Office, two extremely well-known products each available on the Macintosh for well over a decade, as

Re: Getting the network Machine Icon

2009-01-15 Thread Sandro Noel
Guy's I think I found it. Using a packet analyzer on my laptop, and using my iphone with DataCase (AFP server for iphone) when the service is resolved, finder sends a special bonjour query. called device-info. Packet: 5, Packetlength: 252 bytes, Packet follows: 00030 00 05 00 00 00 00 16

Re: ObjC in time-critical parts of the code

2009-01-15 Thread Jens Bauer
Hi Chris, The rendering is not choppy in every frame. I'm already using Shark often (now it's a bit easier just jusing Activity Monitor, because it's always running anyway). I know the Microseconds() call by heart, and there's nothing wrong with it; it does work very well, and does not use

Re: ObjC in time-critical parts of the code

2009-01-15 Thread Greg Titus
Jens, The point of what people are trying to tell you is that the result you are getting (3ms per empty Objective-C call) is approximately 500,000 times longer than the time you ought to be getting (5-6ns). If an Objective-C message send took 3 milliseconds (333 method calls per