Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Paul Sanders
If you don't crash the app, you don't get the stack trace. No stack trace = no clue about what went wrong. And we do offer to save the user's work (in the NSExceptionHandler delegate) before we bail out. And the idea, obviously, is to fix the crashes in the next maintenance release. We have

Re: Size of Core Animation Layer

2010-01-28 Thread vincent habchi
Le 28 janv. 2010 à 08:43, K.Darcy Otto a écrit : > NSRect rect = NSRectFromCGRect([hitLayer frame]); > float width = rect.size.width; > > That is, it returns a width, but not the width in the current window > coordinates. Any ideas? Thanks. What do you mean by "not the width in the current wi

Re: NSString category name collision?

2010-01-28 Thread jonat...@mugginsoft.com
On 27 Jan 2010, at 15:39, Sean McBride wrote: > On 1/27/10 11:27 AM, jonat...@mugginsoft.com said: > >> OBJC_PRINT_REPLACED_METHODS generates a lot of references to >> CoreFoundation/Quartz/OSA framework category replacements. > > Yes, for those of us outside Apple such messages are just noise.

Re: 10.6 : Class xxx does not implement the 'NSWindowDelegate' protocol

2010-01-28 Thread Gustavo Pizano
Hello all. Well Im not expert , but I just wanted to say that I have many NSWindowControllers in my app build on 10.6 and I have no such a warnings, and I hadn't have the need to implement NSWindowDelegate either. Gustavo On Jan 28, 2010, at 3:24 AM, Graham Cox wrote: > > On 28/01/2010, at

Re: 10.6 : Class xxx does not implement the 'NSWindowDelegate' protocol

2010-01-28 Thread Graham Cox
On 28/01/2010, at 9:56 PM, Gustavo Pizano wrote: > Well Im not expert , but I just wanted to say that I have many > NSWindowControllers in my app build on 10.6 and I have no such a warnings, > and I hadn't have the need to implement NSWindowDelegate either. OK, but have you attempted to set a

Re: 10.6 : Class xxx does not implement the 'NSWindowDelegate' protocol

2010-01-28 Thread Gustavo Pizano
I see. thanks for the clarification. :D G. On Jan 28, 2010, at 12:39 PM, Graham Cox wrote: > > On 28/01/2010, at 9:56 PM, Gustavo Pizano wrote: > >> Well Im not expert , but I just wanted to say that I have many >> NSWindowControllers in my app build on 10.6 and I have no such a warnings, >

Re: 10.6 : Class xxx does not implement the 'NSWindowDelegate' protocol

2010-01-28 Thread Peter C
On 28 Jan, 2010, at 7:39 PM, Graham Cox wrote: > > On 28/01/2010, at 9:56 PM, Gustavo Pizano wrote: > >> Well Im not expert , but I just wanted to say that I have many >> NSWindowControllers in my app build on 10.6 and I have no such a warnings, >> and I hadn't have the need to implement NSWin

NSKeyValueBindingCreation Leak

2010-01-28 Thread Richard Somers
I have a binding creation memory leak. -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] (in AppKit) A custom object in a nib is wired to a NSArrayController. @interface CustomObject : NSObject { IBOutlet id arrayController; NSArray *array; } @end @implemen

Re: NSKeyValueBindingCreation Leak

2010-01-28 Thread Graham Cox
On 28/01/2010, at 11:57 PM, Richard Somers wrote: > Why am I leaking? What's the evidence that you are? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact t

Re: NSKeyValueBindingCreation Leak

2010-01-28 Thread Richard Somers
On Jan 28, 2010, at 6:03 AM, Graham Cox wrote: What's the evidence that you are? MallocDebug reports a leak, and the leak grow over time. ... -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] ... -[CustomObject awakeFromNib] ... NSApplicationMain start --Richard _

Forcing menu update in 10.4?

2010-01-28 Thread Michael Domino
Hi, I have a hierarchical menu that places checkmarks next to sub-menu items when the user selects an item. If either of the sub-menu items are checked, I would like the top-level item to be checked. This works, but the top-level item does not update until the mouse rolls over any of the top level

Displaying animated content in iPhone app

2010-01-28 Thread patrick machielse
I'm working on an iPhone application and I need some advice on displaying animated content (think: cartoon like movies). Hopefully someone can point me in the right direction. Goal The application needs to display short 2 second 'clips' of animated characters in a loop. Animation can be tr

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Scott Ribe
> If you don't crash the app, you don't get the stack trace. No > stack trace = no clue about what went wrong. Just yesterday I was working on some new code, which threw an exception, and the logged message included the stack trace. Never seen that before, so I assume it's new in Snow Leopard. At

Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
Hello everybody, I'm new blind developer from Spain. Well, I can use interface builder to add objects to a window, define outlets and actions but I can define a connection between an outlet and an action. How can I do this in sourceCode using objetive-C? I searched it in my Objetive-C spanish

Re: Displaying animated content in iPhone app

2010-01-28 Thread glenn andreas
On Jan 28, 2010, at 8:22 AM, patrick machielse wrote: > I'm working on an iPhone application and I need some advice on displaying > animated content (think: cartoon like movies). Hopefully someone can point me > in the right direction. > > Goal > > The application needs to display short 2

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Paul Sanders
Yes, I believe this is new in Snow Leopard. But on Leopard and Tiger, only numerical addresses are available and to interpret those requires that you know the 'slide' of each dylib loaded, which varies from machine to machine. Mind you, with the breathtaking speed of uptake of Snow Leopard, m

how can i do the equivalent of "new email with selection" service?

2010-01-28 Thread Stephane Huaulme
how can i do the equivalent of "new email with selection" service from a cocoa app programmatically? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 12:10 AM, Paul Sanders wrote: > If you don't crash the app, you don't get the stack trace. No > stack trace = no clue about what went wrong. That's why I said the error alert should include the same "Report" button as the crash report would. > And we do offer to > save

Re: Hot to define a connection from source code?

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 6:38 AM, Jonathan Chacón wrote: > I can use interface builder to add objects to a window, define outlets and > actions but I can define a connection between an outlet and an action. How > can I do this in sourceCode using objetive-C? To set an outlet, just set the instance

Re: Forcing menu update in 10.4?

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 5:52 AM, Michael Domino wrote: > I have a hierarchical menu that places checkmarks next to sub-menu items > when the user selects an item. If either of the sub-menu items are checked, > I would like the top-level item to be checked. This works, but the top-level > item does no

Re: NSKeyValueBindingCreation Leak

2010-01-28 Thread Kyle Sluder
On Jan 28, 2010, at 5:13 AM, Richard Somers wrote: MallocDebug reports a leak, and the leak grow over time. If you never unbind, you're probably just seeing the KVO bookkeeping taking place. Alternatively, you're calling super's implementation of - bind:toObject:withKeyPath:options: fr

NSSlider

2010-01-28 Thread David Blanton
I cannot discern a method that tracks the knob on and NSSlider. Is it possible to track an NSSlider? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderator

Re: NSSlider

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 9:05 AM, David Blanton wrote: > I cannot discern a method that tracks the knob on and NSSlider. Check the "continuous" checkbox in IB (or set the object property of the same name) and your target will get called while the user drags, as soon as the position changes. —Jens_

Re: NSSlider

2010-01-28 Thread vincent habchi
Le 28 janv. 2010 à 18:05, David Blanton a écrit : > I cannot discern a method that tracks the knob on and NSSlider. > > Is it possible to track an NSSlider? Binds "value" to some KVC variable of your tracking object, no? Vincent___ Cocoa-dev mailing

Which CA Layer am I dragging over?

2010-01-28 Thread K. Darcy Otto
On 28-Jan-10, at 2:47 AM, vincent habchi wrote: Le 28 janv. 2010 à 08:43, K.Darcy Otto a écrit : NSRect rect = NSRectFromCGRect([hitLayer frame]); float width = rect.size.width; That is, it returns a width, but not the width in the current window coordinates. Any ideas? Thanks. What do

Re: Displaying animated content in iPhone app

2010-01-28 Thread David Duncan
On Jan 28, 2010, at 6:22 AM, patrick machielse wrote: > - I've seen mentioned that movie playback inside a view is not currently > supported in the frameworks. I've also not found support for movie file > formats (you can only pass a url into the iPhone frameworks, that's it). Keep in mind that

Re: Which CA Layer am I dragging over?

2010-01-28 Thread David Duncan
On Jan 28, 2010, at 9:26 AM, K. Darcy Otto wrote: > The problem is that I'm having difficulty setting up the NSTrackingAreas. > Given CA layer x, I want to discover the position of x in the window so I can > set up the tracking area. Is this the right way to solve this problem? If > so, how

Re: NSSlider

2010-01-28 Thread vincent habchi
> On Jan 28, 2010, at 9:05 AM, David Blanton wrote: > >> I cannot discern a method that tracks the knob on and NSSlider. > > Check the "continuous" checkbox in IB (or set the object property of the same > name) and your target will get called while the user drags, as soon as the > position chan

Re: NSKeyValueBindingCreation Leak

2010-01-28 Thread Quincey Morris
On Jan 28, 2010, at 04:57, Richard Somers wrote: > - (void)awakeFromNib > { >[self bind:@"array" > toObject:arrayController > withKeyPath:@"arrangedObjects" > options:nil]; > >[arrayController addObserver:self > forKeyPath:@"arrangedObjects.changed" >

Re: Forcing menu update in 10.4?

2010-01-28 Thread Michael Domino
Thanks for replying! No, what happens is: 1. the user selects a sub-menu item, and item is checked or unchecked. 2. The menu closes. 3. The user selects the menu again, and keeps the mouse on the main menu title. The top-level item is not updated to its true state (either checked or unchecked) wh

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Paul Sanders
- Original Message - From: "Jens Alfke" To: "Paul Sanders" Cc: "Ken Thomases" ; Sent: Thursday, January 28, 2010 4:34 PM Subject: Re: Uncaught exceptions not terminating my app On Jan 28, 2010, at 12:10 AM, Paul Sanders wrote: >> If you don't crash the app, you don't get the stack tra

Re: Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
Hello, thanks for your help but I don't know where I have to define de connection between outleets and actions. I have to type them in the appController, windowDelegate or where the outlets were defined? I have to type the connection in a function/method of a class or like a variable or outlee

Re: NSSlider

2010-01-28 Thread David Blanton
Continuous Check Box did the trick .. Thanks! -db On Jan 28, 2010, at 10:11 AM, Jens Alfke wrote: On Jan 28, 2010, at 9:05 AM, David Blanton wrote: I cannot discern a method that tracks the knob on and NSSlider. Check the "continuous" checkbox in IB (or set the object property of the sam

Re: CALayer maybe silly question

2010-01-28 Thread David Duncan
On Jan 27, 2010, at 9:52 PM, vincent habchi wrote: >> But at the same time, you could probably simplify this a lot by creating >> CGImages with your content and then assign those images as the contents of >> your layers from the main thread. This is almost certainly likely to be >> simpler and

Re: NSSlider

2010-01-28 Thread mmalc Crawford
On Jan 28, 2010, at 9:42 am, vincent habchi wrote: >> Check the "continuous" checkbox in IB (or set the object property of the >> same name) and your target will get called while the user drags, as soon as >> the position changes. > > Do not forget there are some pitfalls. For example, I bound

Re: Forcing menu update in 10.4?

2010-01-28 Thread Kyle Sluder
On Jan 28, 2010, at 9:50 AM, Michael Domino > wrote: Is that clearer? Yes. It's even clearer now that you should be implementing the UI validation protocol. ;-) --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: NSSlider

2010-01-28 Thread Kyle Sluder
On Jan 28, 2010, at 9:42 AM, vincent habchi wrote: Do not forget there are some pitfalls. For example, I bound a slider to the alpha value of a CALayer. I had to subclass it, because there is no way I found (except a custom NSValueTransformer) to get the slider return a float value from [0

Re: how can i do the equivalent of "new email with selection" service?

2010-01-28 Thread Jerry Krinock
On 2010 Jan 28, at 07:34, Stephane Huaulme wrote: > how can i do the equivalent of "new email with selection" service from a > cocoa app programmatically? As far as the "selection", if you mean from your app, you're going to have to answer that for yourself. If you mean from another app, I do

Re: Which CA Layer am I dragging over?

2010-01-28 Thread K. Darcy Otto
On 28-Jan-10, at 9:38 AM, David Duncan wrote: On Jan 28, 2010, at 9:26 AM, K. Darcy Otto wrote: The problem is that I'm having difficulty setting up the NSTrackingAreas. Given CA layer x, I want to discover the position of x in the window so I can set up the tracking area. Is this the

Fuzzy Focus Ring

2010-01-28 Thread Charles Jenkins
Hi, everyone. I'm embarking on the creation of my first custom control, which will be basically like an NSSlider, but have more than one knob. To illustrate what I need it for, let's use a handy Star Trek analogy. Say Mr. Scott is in the Enterprise engine room. He has 20 units of power to di

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 9:53 AM, Paul Sanders wrote: No more dangerous then doing a random longjmp back to the event loop, which is what happens if you let the exception unwind. As I say, the frameworks do not appear to use exception handling internally, other than to get back to the event lo

Re: Hot to define a connection from source code?

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 9:52 AM, Jonathan Chacón wrote: thanks for your help but I don't know where I have to define de connection between outleets and actions. I have to type them in the appController, windowDelegate or where the outlets were defined? I have to type the connection in a functi

Re: Hot to define a connection from source code?

2010-01-28 Thread Jean-Daniel Dupas
Le 28 janv. 2010 à 19:57, Jens Alfke a écrit : > > On Jan 28, 2010, at 9:52 AM, Jonathan Chacón wrote: > >> thanks for your help but I don't know where I have to define de connection >> between outleets and actions. I have to type them in the appController, >> windowDelegate or where the outl

Re: NSKeyValueBindingCreation Leak

2010-01-28 Thread Richard Somers
On Jan 28, 2010, at 10:45 AM, Quincey Morris wrote: Could you maybe say what you're trying to do here? As is, this code looks completely and utterly wrong. "array" is an instance variable (and, by default, perhaps a property, but it's not a binding, AND the direction of the dependency looks

NSSavePanel and file extensions

2010-01-28 Thread Michael Domino
Hi, I run an NSSavePanel, and [dlg setCanSelectHiddenExtension:NO] is called on it. Running on Leopard, the extensions in the file browser list are always shown, and when a file is selected from the list the entire filename is copied to the text edit field at the top of the dialog, including the e

Re: NSSlider

2010-01-28 Thread vincent habchi
Le 28 janv. 2010 à 19:30, mmalc Crawford a écrit : > > On Jan 28, 2010, at 9:42 am, vincent habchi wrote: > >>> Check the "continuous" checkbox in IB (or set the object property of the >>> same name) and your target will get called while the user drags, as soon as >>> the position changes. >>

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Paul Sanders
Yes, I think I came across one of those in the Carbon menu stuff as I reported in my original post. But I don't think that is relevant. As I say, I silently ignore those very few exceptions that the frameworks do occasionally throw in the absence of any error in my own code, and I have formed

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread jonat...@mugginsoft.com
On 28 Jan 2010, at 18:55, Jens Alfke wrote: >> > > There are various places in the frameworks where exceptions get caught and > (mostly) ignored. Some of these are where Carbon code (like the menu or > open/save file panel implementation) calls into Cocoa, since throwing an > exception out th

Re: Uncaught exceptions not terminating my app

2010-01-28 Thread Paul Sanders
OK, thanks. I'll do a bit more testing on Snow Leopard. But I have code out in the field with my 'brutal' exception handling in place and nothing like this has ever (yet!) been reported. Paul Sanders. - Original Message - From: To: Sent: Thursday, January 28, 2010 7:38 PM Subject:

Re: Which CA Layer am I dragging over?

2010-01-28 Thread David Duncan
On Jan 28, 2010, at 10:39 AM, K. Darcy Otto wrote: > Thank you for this; but I'm still having a few problems. Here's what I have > as part of -mouseDragged (where hitLayer is the CA layer that has been > identified): > > CGRect p,q; > p = [hitLayer bounds]; > q = [[hitLayer superlayer] convert

Re: Fuzzy Focus Ring

2010-01-28 Thread Jerry Krinock
On 2010 Jan 28, at 10:51, Charles Jenkins wrote: > I'd like the active knob to have a nice, fuzzy focus ring, just like a normal > Aqua control. And it should appear blue or graphite color according to the > user's preference setting. So, just to be clear, you don't want a Fuzzy Focus Ring. Y

Re: CALayer maybe silly question

2010-01-28 Thread vincent habchi
David, > You can create the images on a secondary thread, then pass them back to the > main thread for assignment. The heavy operation is the drawing, not the > uploading of drawn content. You may also want to consider culling some of > that data before you draw it. You're right. Up to that po

Re: NSSavePanel and file extensions

2010-01-28 Thread Jerry Krinock
On 2010 Jan 28, at 11:26, Michael Domino wrote: > Running on Snow Leopard, the extensions still appear in the file browser > list, but when a file is selected the extension is not copied to the text > edit field along with the rest of the filename. When you find differences running in different

Re: Fuzzy Focus Ring

2010-01-28 Thread vincent habchi
Le 28 janv. 2010 à 19:51, Charles Jenkins a écrit : > Considering that the knob will probably be oddly shaped, how do I get the > system to draw the focus ring? Is the system focus ring something you can > just add to any graphic? No, but maybe you can back the drawing of your control by a smal

Re: CALayer maybe silly question

2010-01-28 Thread David Duncan
On Jan 28, 2010, at 12:29 PM, vincent habchi wrote: > You're right. Up to that point, I'm quite satisfied with generating the > contents directly out of the delegate, but, in a sense, your approach is more > unified, since the same layer could then display either vector (drawn out of > the data

Re: CALayer maybe silly question

2010-01-28 Thread vincent habchi
Le 28 janv. 2010 à 21:37, David Duncan a écrit : > On Jan 28, 2010, at 12:29 PM, vincent habchi wrote: > >> You're right. Up to that point, I'm quite satisfied with generating the >> contents directly out of the delegate, but, in a sense, your approach is >> more unified, since the same layer c

IKImageBrowserView drop operation always highlighting a specific row

2010-01-28 Thread Tobias Jordan
Hey guys, first off thank you for your time, I really appreciate it! So I am having problems with the drag'n'drop of the IKImageBrowserView. In my case I am dragging a file to the view which is automatically sorted case insensitive which means the user isn't able to re-arrange objects in

Re: Hot to define a connection from source code?

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 11:05 AM, Jean-Daniel Dupas wrote: I don't know any way to do it but in Interface Builder and unfortunately I don't see how to bind the outlet without mouse (but maybe someone has an idea). Oh! Sorry, Jonathan, I overlooked the word "blind" in your original message. I

Re: CALayer maybe silly question

2010-01-28 Thread David Duncan
On Jan 28, 2010, at 12:48 PM, vincent habchi wrote: > Of course. But then, admitting I do indeed draw offscreen and then load > contents in the CALayer, on what object shall I draw? A CGLayer? Something > else? There are only 2 types of context you can create (bitmap & pdf) and only one that c

Re: Forcing menu update in 10.4?

2010-01-28 Thread Michael Domino
Thanks for the advice, you are absolutely correct, now the menu update behaves as expected. On 1/28/10 1:33 PM, "Kyle Sluder" wrote: > On Jan 28, 2010, at 9:50 AM, Michael Domino > wrote: > >> Is that clearer? > > Yes. It's even clearer now that you should be implementing the UI > validation p

Apparent NSTableView Bug

2010-01-28 Thread Daniel Wambold
I have run up against an apparent 10.6.2 bug in the NSTableView object. Specifically, if NSTableViewSelectionHighlightStyleNone is set, the tableView causes Assertion failures and other problems. Below is some code demonstrating the problem. In any event, I need to emulate the None style for hig

Re: Apparent NSTableView Bug

2010-01-28 Thread Corbin Dunn
It's definitely a bug in AppKit; thank you for logging it, and including a test case. Try setting -setAllowsColumnSelection:NO. That work? corbin On Jan 28, 2010, at 2:00 PM, Daniel Wambold wrote: > I have run up against an apparent 10.6.2 bug in the NSTableView object. > Specifically, if NST

Re: Apparent NSTableView Bug

2010-01-28 Thread Daniel Wambold
Corbin- Looks like [myTableView setAllowsColumnSelection:NO]; stopped the crashing for now (I'm sure I've made plenty of other mistakes that are lurking in the dark) Thanks for the tip! -dan___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

Simulating drag and drop to another application - possible?

2010-01-28 Thread Van Mardian
Hello. I want to build a graphical application (App A) that would simulate a file drop onto certain areas of another running application (App B) at the touch of a button. The particular file that would be dropped, and the particular area of App B that it would be dropped onto, would depend on the

I get a "Pending Breakpoint" while running a Unit Test

2010-01-28 Thread Tony Romano
I am using this document as my guide: http://developer.apple.com/mac/articles/tools/unittestingwithxcode3.html OS: Snow Leopard, XCode 3.2.1 iMac - Quad CPU. I am able to run the sample as outlined, see the test failures, correct the bug and watch the test pass. When I try to set a break p

Re: NSKeyValueBindingCreation Leak

2010-01-28 Thread Quincey Morris
On Jan 28, 2010, at 11:12, Richard Somers wrote: > Actually that is about all there is (and it works except for the leak). I > started with Malcolm Crawford's "Graphics Bindings" example. It is the most > complex programmatic example he has but just so happened to be the one that > fit my need

NSXML and invalid UTF8 characters

2010-01-28 Thread Keith Blount
Hello, I am using the NSXML classes to generate and parse my own XML files. Sometimes these files store strings of text that has been brought in from other applications (for instance, there might be a plain text representation of some text the user has pasted in from Word). In some instances I

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Sixten Otto
On Thu, Jan 28, 2010 at 6:16 PM, Keith Blount wrote: > I am using the NSXML classes to generate and parse my own XML files. > Sometimes these files store strings of text that has been brought in from > other applications (for instance, there might be a plain text representation > of some text t

Re: Simulating drag and drop to another application - possible?

2010-01-28 Thread Jens Alfke
On Jan 27, 2010, at 10:51 PM, Van Mardian wrote: I want to build a graphical application (App A) that would simulate a file drop onto certain areas of another running application (App B) at the touch of a button. I don't believe there have ever been public APIs for simulating drag- and-drop

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 3:16 PM, Keith Blount wrote: So, my question is, what is the best way for me to filter out these invalid characters from my NSString before I pass it into NSXMLElement's -initWithName:stringValue: or similar methods, to avoid creating XML documents that won't open? M

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Keith Blount
Thanks for the heads up. Actually this came up recently - a character had pasted some Word characters into my app, including a non-valid UTF8 one, and it was throwing exceptions on loading the text storage (it turned out that using -replaceCharactersInRange:withAttributedString after init'ing th

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Keith Blount
Many thanks for your reply. Wouldn't using these methods be a lot more expensive (and slower) than going through using -characterAtIndex: or something similar, accessing the characters directly, though? I'm thinking that I would have to add every character to the character set and then let NSStr

mouseEntered/-mouseExited not firing on drag (NSTrackingEnabledDuringMouseDrag on)

2010-01-28 Thread K. Darcy Otto
I've managed to set up a series of NSTrackingAreas. These tracking areas work beautifully, highlighting and de-highlighting in turn by means of -mouseEntered and -mouseExited. The problem I've run into is that -mouseEntered and -mouseExited do not fire on a drag. Here is the code I've us

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Keith Blount
As an update, I tried this, which seems to partially work: - (NSString *)stringCleanedForXML // in an NSString category { unichar character; NSInteger index, len = [self length]; NSMutableString *cleanedString = [[NSMutableString alloc] init]; for (index =

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Graham Cox
On 29/01/2010, at 11:29 AM, Keith Blount wrote: > As an update, I tried this, which seems to partially work: > - (NSString *)stringCleanedForXML // in an NSString category { unichar character; > [] > Using this saved my XML strings in such a way as they didn't produce errors > on loadin

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Graham Cox
On 29/01/2010, at 11:34 AM, Graham Cox wrote: > 0x10 are (at least) 20 bit constants 24-bits in this case (misread it). --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Simulating drag and drop to another application - possible?

2010-01-28 Thread Van Mardian
App A is basically a custom file browser that I'm designing for a touchscreen display. App B is some music production software that accepts file drops into various "tracks". App A would be running on the touchscreen and App B would be running on the main display. On Thu, Jan 28, 2010 at 6:36 PM, J

Re: Fuzzy Focus Ring

2010-01-28 Thread Corbin Dunn
> Oh, it looks like you can eliminated most of the code below if you're > targetting Mac OS 10.5+. > > #import > > @interface NSView (FocusRing) Ah -- a quick side note on this code sample. Adding a category to NSView with generic names (like drawFocusRing) is quite dangerous. The issue is th

Re: IKImageBrowserView drop operation always highlighting a specific row

2010-01-28 Thread Thomas Goossens
Hi Tobias, The equivalent of setDropRow:dropOperation for the IKimageBrowserView is - (void) setDropIndex:(NSInteger)index dropOperation:(IKImageBrowserDropOperation)operation; available on 10.6 -- Thomas On Jan 28, 2010, at 10:01 PM, Tobias Jordan wrote: > Hey guys, > > first off thank y

Re: Hiding tab view items

2010-01-28 Thread BareFeet
Hi all, I am just following up on my previous queries about how to show a hierarchy of Nodes in the left pane (like iTunes or Disk Utility) and have the available tab view items on the right change according to the type of node that the user selects. Thanks to Volker, Kyle, Nathan and "Idiot S

can NSCollectionView be made to ask for properties in a lazy manner

2010-01-28 Thread Mark Sanvitale
I have an array within a model object that is hooked up to a NSCollectionView via an NSArrayController and NSCollectionViewItem (i.e. standard). The array elements are custom objects with a title and image property. These are bound to an NSTextField and NSImageView within the view managed by t

[MEET] February CocoaHeads Developer Meetings

2010-01-28 Thread Stephen Zyszkiewicz
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 programming related is welcome. Upcoming meetings: Australia Sydney- Thursday, February 4, 2010 18:30. Austria Wien- Thursday, Feb

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 3:47 PM, Keith Blount wrote: > Many thanks for your reply. Wouldn't using these methods be a lot more > expensive (and slower) than going through using -characterAtIndex: or > something similar, accessing the characters directly, though? No, because it's more efficient to l

Re: NSXML and invalid UTF8 characters

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 4:29 PM, Keith Blount wrote: > [cleanedString appendFormat:@"%C", character]; If you're worried about efficiency, format conversions like this are particularly slow; so is building up an NSString a character at a time. It's more efficient to allocate a

Re: Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
Hello everybody, OK, thanks for the information... I'll find info about @selector, setActions in Objetive-C and I'll post this question in xCode list. I want to develop some games for blind users in iPhone thanks and regards Jonathan Chacón El 28/01/2010, a las 22:08, Jens Alfke escri

Re: Hot to define a connection from source code?

2010-01-28 Thread Roland King
Jonathan Chacón wrote: Hello everybody, OK, thanks for the information... I'll find info about @selector, setActions in Objetive-C and I'll post this question in xCode list. I want to develop some games for blind users in iPhone thanks and regards Jonathan Chacón El 28/01/2010, a la

Re: mouseEntered/-mouseExited not firing on drag (NSTrackingEnabledDuringMouseDrag on)

2010-01-28 Thread Jerry Krinock
On 2010 Jan 28, at 16:00, K. Darcy Otto wrote: > It is my understanding that the "NSTrackingEnabledDuringMouseDrag" is > supposed to allow -mouseEntered/-mouseExited to fire during a drag. Is this > not correct? I hope someone who knows the answer to that specific question will answer you. >

Re: NSKeyValueBindingCreation Leak

2010-01-28 Thread Richard Somers
On Jan 28, 2010, at 4:04 PM, Quincey Morris wrote: But you did nothing like what's in that example. It defines (and exposes) 2 named bindings of the custom view object, and implements all of the behavior associated with each binding. The [bind:...] implementation is just one piece of the wh

Re: Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
Hello Roland, Could you tell me any example project where I examine the source code? thanks and regards Jonathan Chacón El 29/01/2010, a las 06:04, Roland King escribió: > Jonathan Chacón wrote: >> Hello everybody, >> OK, thanks for the information... >> I'll find info about @selector,

Network Reachability

2010-01-28 Thread Laurent Daudelin
Hello. Earlier this week, I asked how I could determine network reachability from my app. Someone replied to check the SystemConfiguration framework. I finally got around to have a look and wrote the following code: + (BOOL)hostIsReachable:(NSString *)hostName { CFHostRefhost;

Re: IKImageBrowserView drop operation always highlighting a specific row

2010-01-28 Thread Tobias Jordan
Hi Thomas, thanks for the information, didn't know there exists such a method but is there a way to do it like this on Mac OS X 10.5 Leopard? - Tobias On Jan 29, 2010, at 2:24 AM, Thomas Goossens wrote: Hi Tobias, The equivalent of setDropRow:dropOperation for the IKimageBrowserView is

Re: Network Reachability

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 9:22 PM, Laurent Daudelin wrote: >host = CFHostCreateWithName(kCFAllocatorDefault, (CFStringRef)hostName); >assert(host != NULL); > > SCNetworkReachabilityRef target = > SCNetworkReachabilityCreateWithName(NULL, [hostName > cStringUsingEncoding:NSUTF8Str

Node hierarchy with subclasses

2010-01-28 Thread BareFeet
Hi All, Summary: I have an NSTreeController driven hierarchy of "Nodes" in my window's left pane. I'd like to subclass Node into a few subclasses. Each subclass in the model shows its own tab view item(s) in the view (right half of the document window). The tab view item contains UI elements (