Re: Sending messages without knowing number of args and types at compile time

2010-02-02 Thread Per Bull Holmen
Greg Parker wrote: On Feb 1, 2010, at 3:30 AM, Per Bull Holmen wrote: I've been playing around with the idea of making a simple bridge between Objective-C (running under Cocoa) and a script language. /.../ I'd like to know whether there are any other ways than NSInvocation to send a

RegisterEventHotKey and keylogging

2010-02-02 Thread Michael Vannorsdel
Can RegisterEventHotKey be used to log an admin password or other passwords? I accidentally hotkey'd some regular characters and had them trigger when typing in my admin pass on 10.5.8. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Breaking on 'autoreleased with no pool in place - just leaking'

2010-02-02 Thread Matt Gough
What symbol should I put a break point on to track down which part of my code is responsible for trying to autorelease without a pool in place. i.e, what prints out the __NSAutoreleaseNoPool(): Object 0xc74bc0 of class NSCFString autoreleased with no pool in place - just leaking messages. I

Re: Breaking on 'autoreleased with no pool in place - just leaking'

2010-02-02 Thread Dave Keck
What symbol should I put a break point on to track down which part of my code is responsible for trying to autorelease without a pool in place. i.e, what prints out the __NSAutoreleaseNoPool(): Object 0xc74bc0 of class NSCFString autoreleased with no pool in place - just leaking messages.

Re: RegisterEventHotKey and keylogging

2010-02-02 Thread Symadept
Hi Michael, Basically RegisterEventHotKey registers given combination of hotkey identified with the keycode. If it happens to be your pressing key is registered as hotkey then you wont be able to see that. Lets say you have registered A as hotkey in some application then either in your password

Re: [MEET] February CocoaHeads Developer Meetings

2010-02-02 Thread Symadept
Why can't it be possible in Singapore? -Mustafa On Fri, Jan 29, 2010 at 11:20 AM, Stephen Zyszkiewicz st...@cocoaheads.orgwrote: Greetings, CocoaHeads is an international Cocoa programmer's group. Meetings are free and open to the public. We specialize in Cocoa, but everything Mac/iPhone

Finder-like icon view (MIT license)

2010-02-02 Thread Alastair Houghton
Hi all, I thought I'd just post a link to some code I just posted on Google Code. It's been sitting on my disk for ages (since 2005, in fact), somewhat unloved and not quite complete, but I think it's still an interesting bit of code and hopefully someone will find it useful. Here's the URL:

Re: Finder-like icon view (MIT license)

2010-02-02 Thread Daniel DeCovnick
Shiny. I really like the rectangle that appears when you hold shift so you know what will be selected next when you press an arrow key. Can you turn off snap-to-grid? Also, there is a serious spike in memory usage as the test app starts up. It releases most of that memory, but it's still

Re: NSDocument save as bug

2010-02-02 Thread Mike Abdullah
-awakeFromNib is called whenever the receiver is awoken from a nib, or is used as the owner of a nib that is instantiated. Therefore, it may be called more than once on any given object. What's happening: Document system is preparing an accessory view for the save panel, probably so it can

Re: NSDocument save as bug

2010-02-02 Thread steven Hooley
It all boils down to the point that this little popup that's added to the panel to select the file type seems to be screwing everything up. Is the little popup loaded from a nib? Is the 'File's Owner' of the little popup's nib set to your document? Did you know that -awakeFromNib message is

Re: Finder-like icon view (MIT license)

2010-02-02 Thread Alastair Houghton
On 2 Feb 2010, at 10:51, Daniel DeCovnick wrote: I really like the rectangle that appears when you hold shift so you know what will be selected next when you press an arrow key. Can you turn off snap-to-grid? Yes, you can turn that off; there isn't much documentation, but the methods in

tableView:objectValueForTableColumn: number column

2010-02-02 Thread Hado Hein
I have a table view which is feeded from an array. - (id)tableView: (NSTableView *) aTableView objectValueForTableColumn: (NSTableColumn *) aTableColumn row: (int) rowIndex { CFStringRef returnvalue = 0; CFDictionaryRef fixture = [[deviceMenu selectedItem] representedObject];

Re: tableView:objectValueForTableColumn: number column

2010-02-02 Thread Graham Cox
On 02/02/2010, at 11:39 PM, Hado Hein wrote: eturnvalue = [[NSString stringWithFormat:@%d, rowIndex] autorelease]; That works fine. No it doesn't, because: For convinience I wanted to provide the users with a numbering column in the front. The problem is that, at this point of code, I

Threading issues with ivars

2010-02-02 Thread Andreas Grosam
Hello, I have the following issue: The code below shows a brief snippet of a view controller. Its responsibility - besides managing the views - is to create a URL request, and using a UIConnection to download data. Then, the data - a JSON format - will be parsed. The result is a dictionary

Re: Threading issues with ivars

2010-02-02 Thread Graham Cox
On 02/02/2010, at 11:49 PM, Andreas Grosam wrote: I don't see why this should happen, since I think I get a copy of the string - as the property declaration implies: @property (copy) NSString* name. Do I miss something fundamentally? My understanding is that copy refers to the read of

Re: Threading issues with ivars

2010-02-02 Thread Graham Cox
On 02/02/2010, at 11:53 PM, Graham Cox wrote: My understanding is that copy refers to the read OK, scratch that - my understanding was wrong. I should have checked before posting - indeed, copy refers to the assignment, not the read. --Graham ___

Re: Threading issues with ivars

2010-02-02 Thread Peter Blazejewicz
Hi Andreas, You're not clearing text - you're clearing UILabel reference in your code: self.nameLabel = nil; If you wan't to reset just text then: self.nameLabel.text = @; (or any way you prefer depending on UI requirements), With your current code you just sending message to nameLabel = which

Re: Threading issues with ivars

2010-02-02 Thread Andreas Grosam
On Feb 2, 2010, at 2:16 PM, Peter Blazejewicz wrote: Hi Andreas, You're not clearing text - you're clearing UILabel reference in your code: self.nameLabel = nil; Doh! bangs head on desk Especially, as I have *three* labels, and only this one was wrong ... Thank you very much Peter!

NSArrayController predicate filtering weirdness

2010-02-02 Thread Markus Spoettl
Hello, I have a problem with filtering an NSArrayController that I can't understand. Under some (unknown) circumstances, my array controller produces different filtered results, seemingly depending on which filter predicate was selected previously. It goes something like this: Filter using

Re: Core Data - Add an Entity to another Entity How?

2010-02-02 Thread Jerry Krinock
On 2010 Feb 01, at 10:32, Andreas Grauel wrote: I have the autogenerated accessor Methods and also added the implementation code -(void) addPersonObject but how can work with these Methods? I am not able to hook them up in Interface Builder. Write an action method which invokes either

Reading Modifier Keys Down during Launch - still needs Carbon?

2010-02-02 Thread Jerry Krinock
In Mac OS 10.6, during -applicationDidFinishLaunching, [NSEvent currentEvent] returns nil, so the usual code, [[NSEvent currentEvent] modifierFlags] is not useful for determining if a modifier key was held down during launch. (By accident, I've noticed that I do get an event with correct

Re: Reading Modifier Keys Down during Launch - still needs Carbon?

2010-02-02 Thread Jean-Daniel Dupas
Le 2 févr. 2010 à 15:51, Jerry Krinock a écrit : In Mac OS 10.6, during -applicationDidFinishLaunching, [NSEvent currentEvent] returns nil, so the usual code, [[NSEvent currentEvent] modifierFlags] is not useful for determining if a modifier key was held down during launch. (By

Re: Showing a menu after a delay...?

2010-02-02 Thread Eric Gorr
On Feb 1, 2010, at 6:18 PM, Nathan Kinsinger wrote: On Feb 1, 2010, at 2:42 PM, Eric Gorr wrote: What I am trying to accomplish is displaying a menu (perhaps with NSPopUpButtonCell's performClickWithFrame method) after a user clicks on a sublass of NSButton and holds the left mouse button

Re: bind:toObject:withKeyPath:options: Unidirectional or Bidirectional?

2010-02-02 Thread Jerry Krinock
On 2010 Feb 01, at 03:53, Quincey Morris wrote: I'd point you to the the documentation: (This is the quote from Cocoa Bindings Programming Topics the documentation I quoted in my original post.) I don't see how this can be clearer that bindings are bidirectional. Yes. It is clear. And

Re: Sending messages without knowing number of args and types at compile time

2010-02-02 Thread Jens Alfke
On Feb 2, 2010, at 12:21 AM, Per Bull Holmen wrote: Thanks. I forgot to mention one thing: It need not be perfect! Far from it... :) Just a simple tool, to facilitate letting a script (Lua) control a Cocoa application. FYI, there was already a Lua/Obj-C bridge library circa 2006, although

Re: Sending messages without knowing number of args and types at compile time

2010-02-02 Thread Dave DeLong
http://luaforge.net/projects/luaobjc On Feb 2, 2010, at 9:15 AM, Jens Alfke wrote: FYI, there was already a Lua/Obj-C bridge library circa 2006, although I don't remember the name or have a URL handy. (Sorry.) smime.p7s Description: S/MIME cryptographic signature

Re: NSProgressIndicator Stuck after unhiding + other triggers. Demo App.

2010-02-02 Thread Jerry Krinock
Since no one offered an explanation for this, I filed a bug. 7602237. The short workaround lesson is this: Do not unhide an NSProgressIndicator and then re-use it in determinate mode. Instead, create a new one in the same frame, as shown in the -recreate: method in my original post.

NSTableView questions (take 2)

2010-02-02 Thread Matthew Weinstein
Still trying to find a way to turn off setAllowsMultipleSelection just as the table becomes the responder. Is there some way of anticipating this, a willbecomefirstresponder kind of a notification? Thanks in advance, Matthew Weinstein ___

Opening dual NSStreams synchronously

2010-02-02 Thread Richard Penwell
Hello Devs, I'd like some feedback on my design here as I'm building an API that I hope will be of use to the community, and some of the finer nuances of Cocoa still escape me. I'm building a class called TDSConnection which is part of a object graph providing connectivity to the Tabular Data

Re: Reading Modifier Keys Down during Launch - still needs Carbon?

2010-02-02 Thread Eric Schlegel
On Feb 2, 2010, at 6:51 AM, Jerry Krinock wrote: Searching the list archives, from 8 years ago I find the solution is to instead #import Carbon/Carbon.h and use GetCurrentEventKeyModifiers(). It works, and although there is copious documentation in the header and in the Carbon Event

Re: NSTableView questions (take 2)

2010-02-02 Thread Corbin Dunn
On Feb 2, 2010, at 8:32 AM, Matthew Weinstein wrote: Still trying to find a way to turn off setAllowsMultipleSelection just as the table becomes the responder. Is there some way of anticipating this, a willbecomefirstresponder kind of a notification? What are you really trying to do? Or,

Re: Reading Modifier Keys Down during Launch - still needs Carbon?

2010-02-02 Thread Jerry Krinock
On 2010 Feb 02, at 07:02, Jean-Daniel Dupas wrote: NSUInteger modifiers = CGEventSourceFlagsState(kCGEventSourceStateCombinedSessionState); Thank you, Jean-Daniel. So we have in fact *three* API to get modifier keys. Looks like the one you gave is the best. Since I had Bug Reporter

Re: NSTableView questions (take 2)

2010-02-02 Thread Corbin Dunn
Table b should be set to setAllowsMultipleSelection:NO. However, despite that, you can programmatically change the selection yourself with -setSelectedRowIndexes:byExtendingSelection: when the selection in Table A changes. --corbin I have 2 tables that basically have a many to many

Re: NSArrayController predicate filtering weirdness

2010-02-02 Thread Markus Spoettl
On Feb 2, 2010, at 3:16 PM, Markus Spoettl wrote: It goes something like this: Filter using predicate A = arrangedObjects contains 4 objects (correct) Filter using predicate F = arrangedObjects contains 0 objects (incorrect) Filter using predicate B = arrangedObjects contains 2 objects

Re: NSTableView questions (take 2)

2010-02-02 Thread Corbin Dunn
Matthew -- I believe there was a problem with 10.5 asserting; that has been fixed, but you have to link on 10.5+ to get the fixed behavior (for compatibility reasons). I suggest requiring your uses to upgrade :) However, you should be able to do -setAllowsMultipleSelection:YES, select the

Re: NSTableView questions (take 2)

2010-02-02 Thread Matthew Weinstein
Thanks Corbin, So this is the rub: If I just set allowsMultipleSelection: NO in interface builder and don't set allowsMultipleSelection:YES [programmatically right before doing the setSelected... (though I have to support 10.2-?? so I am still using setSelectedRow...)] I get the

performFindPanelAction

2010-02-02 Thread John Nairn
I tried to implement performFindPanelAction: in my NSWindowController to do something for fields that do not support the find panel (e.g. NSTextField or WebView), but I can't get the menu command to activate. It is wired to firstResponder and according to documentation, the window's

Arbitrary Attributes affect text layout

2010-02-02 Thread Philip White
Hello, I have a problem I can't quite figure out. I have a program that displays some Hebrew text. I notice that at times some of the vowel markings are not displayed in the correct place. I figured out that this happened when I had applied some arbitrary attributes to that range of text.

HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Oleg Krupnov
Hi, After publishing an update of my app, I have received quite a few crash dumps with very weird stack traces that I cannot understand and fix. Namely, the exception message says that AXTitle, or AXWindow or AXValue or AXDocument etc. is unsupported by NSWindow, NSOpenPanel, NSApplication and

Re: bind:toObject:withKeyPath:options: Unidirectional or Bidirectional?

2010-02-02 Thread Keary Suska
On Feb 2, 2010, at 8:42 AM, Jerry Krinock wrote: So now we have this paradox: 1. Cocoa Bindings Programming Topics says that bindings are bidirectional. 2. bind:toObject:withKeyPath:options: documentation says it establishes a binding 3. bind:toObject:withKeyPath:options:

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Corbin Dunn
Oleg, I think you are misinterpreting an exception being raised as a crash of your application. The bt's below are not crashes; they are exceptions being raised (and caught) by appkit's accessibility. I understand that you have a problem with your app crashing -- do you have some actual crash

Re: Arbitrary Attributes affect text layout

2010-02-02 Thread Douglas Davidson
On Feb 2, 2010, at 9:48 AM, Philip White wrote: I have a problem I can't quite figure out. I have a program that displays some Hebrew text. I notice that at times some of the vowel markings are not displayed in the correct place. I figured out that this happened when I had applied some

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Oleg Krupnov
Hi Corbin, Thanks for your quick response. You are right, I should have been more specific. This is not a crash in precise meaning. This is an unhandled exception raised by appkit's accessibility and caught by my crash reporter facility that prints the stack trace and sends it to me by e-mail.

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Ken Ferry
Hi Oleg, Unfortunately, the accessibility mechanism uses unexceptional exceptions under the hood. These are a normal part of operation. They shouldn't be unhandled though… are you sure you're reporting what you think you are? -Ken On Tue, Feb 2, 2010 at 6:41 PM, Oleg Krupnov

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Richard Penwell
In case anyone wants the solution to this puzzle ;-) while (([inputStream streamStatus] [outputStream streamStatus]) == NSStreamStatusOpening [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]); That line will pump the asynchronous events and test

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Oleg Krupnov
Thanks Ken, I don't quite understand your response though. What do you mean by unexceptional exceptions? How should I handle those exceptions, and why should I, if I don't make any calls to accessibility frameworks at all? The report I have included in the first post is all I have so far. On

Re: Arbitrary Attributes affect text layout

2010-02-02 Thread Philip White
On Feb 2, 2010, at 12:34 PM, Douglas Davidson wrote: rangeOfComposedCharacterSequenceAtIndex Hello, thanks for the quick response. I didn't know that attributes couldn't be applied to only parts of composed character sequence ranges. When I only apply attributes to ranges returned by

Custom Field Editor Problem

2010-02-02 Thread John Nairn
I copied code from Cocoa documentation to create a custom field editor. It gets created OK and seems to work, but always crashes when the the window closes with the message Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all I created the custom editor in the

Re: NSTableView questions (take 2)

2010-02-02 Thread Matthew Weinstein
Problem somewhat solved. Landed up subclassing nstableview and overriding mouseDown: Works well (at least on my machine). On Feb 2, 2010, at 9:08 AM, Corbin Dunn wrote: Table b should be set to setAllowsMultipleSelection:NO. However, despite that, you can programmatically change the

Re: Arbitrary Attributes affect text layout

2010-02-02 Thread Douglas Davidson
On Feb 2, 2010, at 11:00 AM, Philip White wrote: Hello, thanks for the quick response. I didn't know that attributes couldn't be applied to only parts of composed character sequence ranges. When I only apply attributes to ranges returned by rangeOfComposedCharacterSequenceAtIndex: I don't

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Jesper Storm Bache
Are you sure you are seeing unhandled exceptions, or simply NSExceptions that are handled somewhere inside the Ax framework. If it is the latter, then you'll need to allow NSExceptions from inside the Ax framework to propagate to their handlers (also inside the Ax framework). Note: Apple does

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Jens Alfke
On Feb 2, 2010, at 10:56 AM, Richard Penwell wrote: while (([inputStream streamStatus] [outputStream streamStatus]) == NSStreamStatusOpening [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]); There are a couple of problems here... (1) That

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Corbin Dunn
Oleg, In addition to what Ken and Jesper said, you should be able to repro the problem yourself. Just turn on accessibility in System Prefs, and start something like Accessibility Inspector (/Developer/Applications/Utilities/Accessability tools) ..corbin On Feb 2, 2010, at 10:58 AM, Oleg

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Jens Alfke
On Feb 2, 2010, at 11:09 AM, Jesper Storm Bache wrote: Note: Apple does *not* guarantee that their implementation is NSException free; you just should not see such exceptions being thrown back to your code. Agreed. In some cases exceptions are thrown internally but then caught, so they

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Richard Penwell
Very true on the overall method, I'd prefer to make the whole thing asynchronous, but thus far cannot figure out how to wrangle SenTestKit into handling test methods that pass when a delegate method is called... On Feb 2, 2010, at 2:18 PM, Jens Alfke wrote: On Feb 2, 2010, at 10:56 AM,

Re: [MEET] February CocoaHeads Developer Meetings

2010-02-02 Thread Fritz Anderson
On 2 Feb 2010, at 4:17 AM, Symadept wrote: Why can't it be possible in Singapore? -Mustafa On Fri, Jan 29, 2010 at 11:20 AM, Stephen Zyszkiewicz st...@cocoaheads.orgwrote: ... Some chapters may have yet to post their meeting for next month. Meeting times may change. Locations and more

Core Data - Need an Observer but where and how to implement

2010-02-02 Thread Andreas Grauel
Hello, following situation. I have two Entities - Person and Event - both are with a many to many relationship, because a person can have more events and a event can have more persons. After I have added a few Persons to an Event I'd like to display them on in a Table. But how? I tried a Binding

Analyzer Questions

2010-02-02 Thread Bob Barnes
Hi all, I've recently upgraded to Mac OS X 10.6.2 in order to run the Analyzer for Xcode and it's pointing out some potential memory leaks that really have me confused. A typical example is where I have a method that allocates and returns something like a CGPDFDocumentRef or CGContextRef.

Buttons in Xcode's Data Model Window

2010-02-02 Thread Glen Simmons
I like the look of the little buttons in the bottom left of the Entity and Property table views in Xcode's Data Model window. I can't seem to get a combination of settings on an NSButton to emulate them though. Particularly, the blue highlight on click, but also the popup behavior, with an image.

Re: [MEET] February CocoaHeads Developer Meetings

2010-02-02 Thread Stephen Zyszkiewicz
Please see the Facebook group: http://www.facebook.com/group.php?v=wallgid=29368309964 or contact the organizer HongTing Wong: wong...@gmail.com Thanks, Steve On Feb 2, 2010, at 11:05 AM, Fritz Anderson wrote: On 2 Feb 2010, at 4:17 AM, Symadept wrote: Why can't it be possible in

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Oleg Krupnov
Fixed now, it worked like a charm! :) Indeed, I was intercepting exceptions from the AX framework in my - (BOOL)exceptionHandler:(NSExceptionHandler*)sender shouldHandleException:(NSException*)exception mask:(unsigned int)mask delegate method. This only occurs on Snow Leopard but not on Leopard.

Re: Analyzer Questions

2010-02-02 Thread David Duncan
On Feb 2, 2010, at 11:58 AM, Bob Barnes wrote: I've recently upgraded to Mac OS X 10.6.2 in order to run the Analyzer for Xcode and it's pointing out some potential memory leaks that really have me confused. A typical example is where I have a method that allocates and returns something

Re: bind:toObject:withKeyPath:options: Unidirectional or Bidirectional?

2010-02-02 Thread Quincey Morris
(Apologies for over-quoting here. And for the length of the response.) On Feb 2, 2010, at 07:42, Jerry Krinock wrote: On 2010 Feb 01, at 03:53, Quincey Morris wrote: I'd point you to the the documentation: (This is the quote from Cocoa Bindings Programming Topics the documentation I

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Jesper Storm Bache
My advice is: Don't do this in release builds. There is nothing that says that Apple in the future will throw more exceptions inside their implementation (in a different framework) - and you'll then have to patch your handler again. Feel free to experiment with this kind of functionality in your

Re: Custom Field Editor Problem

2010-02-02 Thread Ross Carter
On Feb 2, 2010, at 2:02 PM, John Nairn wrote: I copied code from Cocoa documentation to create a custom field editor. It gets created OK and seems to work, but always crashes when the the window closes with the message Program received signal: “EXC_BAD_ACCESS”. sharedlibrary

Re: Analyzer Questions

2010-02-02 Thread Wade Tregaskis
- (CGPDFDocumentRef)getPDFDocumentRef:(const char *)filename { CGPDFDocumentRefdocument; snip... document = CGPDFDocumentCreateWithURL(url); return document; } The CF convention is that functions and methods that return a literal reference to an

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Oleg Krupnov
Good point, Jesper. But in this case, how should I catch real unhandled exceptions and send bug reports? What is the recommended best practice? Thanks! On Tue, Feb 2, 2010 at 10:22 PM, Jesper Storm Bache jsba...@adobe.com wrote: My advice is: Don't do this in release builds. There is nothing

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Corbin Dunn
On Feb 2, 2010, at 12:41 PM, Oleg Krupnov wrote: Good point, Jesper. But in this case, how should I catch real unhandled exceptions and send bug reports? What is the recommended best practice? NSSetUncaughtExceptionHandler possibly. I haven't had to use it myself... --corbin

Re: Analyzer Questions

2010-02-02 Thread Bob Barnes
David, Thanks, changing several methods to use the 'new... naming standard did the trick. Using create as suggested by Wade didn't fix the problem, which explains why another method (createBitmapContext) was showing similar behavior. Bob On Feb 2, 2010, at 12:18 PM, David Duncan wrote:

Re: Analyzer Questions

2010-02-02 Thread David Duncan
On Feb 2, 2010, at 1:14 PM, Bob Barnes wrote: Thanks, changing several methods to use the 'new... naming standard did the trick. Using create as suggested by Wade didn't fix the problem, which explains why another method (createBitmapContext) was showing similar behavior. Create only

Re: Showing a menu after a delay...?

2010-02-02 Thread Graham Cox
On 03/02/2010, at 2:12 AM, Eric Gorr wrote: This method is generally not overridden I have filed a bug requesting that trackMouse:inRect:ofView:untilMouseUp: call continueTracking:at:inView: and stopTracking:at:inView:mouseIsUp: ... or is there a reason why it shouldn't? Note that it

Re: Custom Field Editor Problem

2010-02-02 Thread Corbin Dunn
John, I suggest reading: http://www.corbinstreehouse.com/blog/2007/10/instruments-on-leopard-how-to-debug-those-random-crashes-in-your-cocoa-app/ --corbin On Feb 2, 2010, at 11:02 AM, John Nairn wrote: I copied code from Cocoa documentation to create a custom field editor. It gets created

Re: Analyzer Questions

2010-02-02 Thread Jean-Daniel Dupas
If for some reason you really want to use a naming convention that confuses the analyzer, you can also use the ns_returns_retained and cf_returns_retained clang attributes. For details about these attributes (how to use them in a way that do not conflict with GCC), have a look at the following

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Jesper Storm Bache
Did you try: NSException.h: void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *); Be aware that I don't have any experience with this API - my implementation has top level exception handlers in relevant places, so I should never see an uncaught exception. Jesper On Feb 2,

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Kyle Sluder
On Tue, Feb 2, 2010 at 2:28 PM, Jesper Storm Bache jsba...@adobe.com wrote: Did you try: NSException.h:        void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *); I might be missing something here, but why would this be usable and NSExceptionHandler not? NSExceptionHandler is

NSCollectionView and its Items

2010-02-02 Thread Joachim Deelen
Hi, is it possible, in Mac OS X 10.5, to get a list of the NSCollectionViewItems directly from the NSCollectionView. The content Message returns a list of the Represented-Objects, not the Items. Currently I'm overwriting the newItemForRepresentedObject. Within that method I'm putting the

CoreAnimation breaks when switching from NSView to NSBox

2010-02-02 Thread Mark Sanvitale
Breaks is a subjective description (thus the quotes) for what I experienced, but from my perspective it is accurate. Here's what happened. I had a custom subclass of NSView and I setup it up (in code) to be layer-backed with a CATransition for the subviews key (i.e. fade in/out animation for

Re: Analyzer Questions

2010-02-02 Thread Wade Tregaskis
Thanks, changing several methods to use the 'new... naming standard did the trick. Using create as suggested by Wade didn't fix the problem, which explains why another method (createBitmapContext) was showing similar behavior. Create only works with functions (CF convention). new only

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Jens Alfke
On Feb 2, 2010, at 11:27 AM, Richard Penwell wrote: Very true on the overall method, I'd prefer to make the whole thing asynchronous, but thus far cannot figure out how to wrangle SenTestKit into handling test methods that pass when a delegate method is called... I've done this in the

Re: RegisterEventHotKey and keylogging

2010-02-02 Thread Michael Vannorsdel
Ya makes sense and pretty much what I saw; input was getting absorbed by the hotkey app. I'm just thinking if a userland processed hotkeyed all keys when the pass window popped. I'm guilty of quickly typing my pass so I could get 3-4 characters into it before I'd notice input isn't

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Jesper Storm Bache
I doubt you are missing something you may be right that maybe NSExceptionHandler can be used (with the right mask). The only real input I have on this matter is that I consider it fragile to fail if an Apple framework throws an exception internally. You'll need to be able to detect exceptions

Re: bind:toObject:withKeyPath:options: Unidirectional or Bidirectional?

2010-02-02 Thread Keary Suska
On Feb 2, 2010, at 1:20 PM, Quincey Morris wrote: 1. There are three (3) [III] agents involved in a binding. -- Class A (typically some kind of view) defines+implements a binding [behavior] identified by an attribute x. Attribute is not the best choice of terminology, but it's what the

Cloning an NSXMLElement and its children?

2010-02-02 Thread Robert Monaghan
Hi Everyone.. Is there an easy way to clone an XML tree in Cocoa? Or will I be going thru recursion code hell? :) Thanks! bob. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Cloning an NSXMLElement and its children?

2010-02-02 Thread Jens Alfke
On Feb 2, 2010, at 4:16 PM, Robert Monaghan wrote: Is there an easy way to clone an XML tree in Cocoa? Or will I be going thru recursion code hell? Did you try -copy? NSXMLNode implements NSCopying. The only question is whether it's a deep or a shallow copy.

Re: Cloning an NSXMLElement and its children?

2010-02-02 Thread Robert Monaghan
Its a fairly deep copy. There are several nodes deep. I am trying to copy parts of the tree, so that I don't have to write code to regenerate them. bob. On Feb 2, 2010, at 4:26 PM, Jens Alfke wrote: On Feb 2, 2010, at 4:16 PM, Robert Monaghan wrote: Is there an easy way to clone an XML

Re: Cloning an NSXMLElement and its children?

2010-02-02 Thread Robert Monaghan
Actually, I was able to use copyWithZone to do what I needed. Nice! bob. On Feb 2, 2010, at 4:28 PM, Robert Monaghan wrote: Its a fairly deep copy. There are several nodes deep. I am trying to copy parts of the tree, so that I don't have to write code to regenerate them. bob. On Feb

Re: Core Data - Need an Observer but where and how to implement

2010-02-02 Thread Jerry Krinock
On 2010 Feb 02, at 11:54, Andreas Grauel wrote: I have two Entities - Person and Event - both are with a many to many relationship, because a person can have more events and a event can have more persons. After I have added a few Persons to an Event I'd like to display them on in a Table.

Re: CoreAnimation breaks when switching from NSView to NSBox

2010-02-02 Thread Ken Ferry
Hi Mark, You probably want to set the animations on the box's contentView in addition to the box itself. Box forwards modifications to its subviews array to its contentView. However, this is something we'd like to get rid of eventually. It's just a question of doing it compatibly, having time

Re: How to upload a picture or movie existed in the iphone to a given server?

2010-02-02 Thread James
And, need I configure server especially for the app ? What exactly are you trying to accomplish? Sorry. thank you for your answer I want to accomplish an iphone app. And the app can upload picture or movie files in iphone to a given server. So I want to know whether it would be

Re: How to upload a picture or movie existed in the iphone to a given server?

2010-02-02 Thread Scott Ellsworth
2010/2/2 James ldl0313...@163.com:  And, need I configure server especially  for the app ?   What exactly are you trying to accomplish? Sorry. thank you for your answer I want to accomplish an iphone app. That is rather vague. What does this app do that the existing apps do not? If you

NSFont to CGFontRef

2010-02-02 Thread Andy O'Meara
Hi everyone, Given an NSFont object how can I extract or create a CGFontRef from it to use directly with CoreGraphics? I've already searched around in the lists and ADC with no luck. So far, I've tried the following: NSFontManager* fm = [NSFontManager sharedFontManager];

keyCode translation for various keyboards

2010-02-02 Thread Dave Carpeneto
Hello list folk - I'm trying to print out strings representing various keyDown events I receive. Using OS 10.6.2. It looks as though this was possible back in the classic days ( http://developer.apple.com/legacy/mac/library/documentation/mac/Toolbox/Toolbox-78.html ), however obviously that

Re: NSFont to CGFontRef

2010-02-02 Thread Nick Zitzmann
On Feb 2, 2010, at 10:26 AM, Andy O'Meara wrote: Given an NSFont object how can I extract or create a CGFontRef from it to use directly with CoreGraphics? You're close. Starting in (I think) Leopard, NSFont and CTFontRef (not CGFontRef) are toll-free bridged, so you should be able to use

Rosetta Quandry

2010-02-02 Thread David Blanton
I run my app on my Intel MacBook Pro. Get Info shows it as Universal. I have a customer who must turn Rosetta on else the app crashes. Is there any rhyme or reason to this? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Binding to an accessor that is only valid for subclass

2010-02-02 Thread BareFeet
Hi All, You can also uncheck the Raises For Not Applicable Keys in the bindings inspector pain in Interface Builder for your text fields. Thanks for the tip. Once I read it, it seemed like the logical solution. However, it doesn't seem to make any difference. After some further

Re: Rosetta Quandry

2010-02-02 Thread Nick Zitzmann
On Feb 2, 2010, at 8:07 PM, David Blanton wrote: I run my app on my Intel MacBook Pro. Get Info shows it as Universal. I have a customer who must turn Rosetta on else the app crashes. Is there any rhyme or reason to this? Assuming you meant to put an or between the on and else, did

Re: Rosetta Quandry

2010-02-02 Thread David Blanton
Yes, I have the crash log that is generated when launching with Rosetta off which I include here for list perusal. Interestingly, I just got off the phone with an Apple Consulting Engineer who let me know that there have been problems (mostly video) with the 27 iMac where this problem

Re: Rosetta Quandry

2010-02-02 Thread Nick Zitzmann
On Feb 2, 2010, at 9:11 PM, David Blanton wrote: Yes, I have the crash log that is generated when launching with Rosetta off which I include here for list perusal. Interestingly, I just got off the phone with an Apple Consulting Engineer who let me know that there have been problems

Re: Rosetta Quandry

2010-02-02 Thread David Blanton
I can't answer that just now as this is a joint development effort and some of the libs I link I am not intimately familiar with. They are C+ +. So you surmise and exception is being raised in x86 code and not ppc code. Interesting. Thanks, I now have a path to travel. -db On Feb 2,

Awkward issue deallocing document

2010-02-02 Thread Graham Cox
My document subclass retains a reference to an object representing the data model. When the document is dealloc'ed, the DM object is released. One of my app's main menus has dynamic content built from the DM found in the current document. This is done by setting the app delegate to also be the

  1   2   >