Setting NSImage with overlay blend to NSImageView

2008-04-23 Thread Ross Oliver
Hey, I haven't used core graphics before and I'm looking to create an overlay blend mode effect with two images. I have a NSImageView with the image set to an NSImage. What are the general steps I would need to take to draw another image on top of it and set it as an overlay? The docume

Re: "Safe" frameworks for privileged tools?

2008-04-23 Thread Ken Thomases
On Apr 23, 2008, at 1:18 AM, Michael Watson wrote: Okay, so LaunchServices is out as well. Is there *any* reliable way to know if a directory is a bundle or package without using NSWorkspace or LaunchServices? Here's some info: http://developer.apple.com/documentation/CoreFoundation/Concept

Re: How to create shortcuts after installing the my package

2008-04-23 Thread Jean-Daniel Dupas
Le 23 avr. 08 à 06:53, JanakiRam a écrit : Hi All, I'm porting a windows based application to Mac OS X. My application in windows will create desktop shortcut once we install. I really don't whether its mac standard to create desktop shortcut and dock icon once i install my cocoa app

Re: Inserting my own Responder before App?

2008-04-23 Thread Ken Thomases
On Apr 23, 2008, at 1:44 AM, Rick Mann wrote: I've got a subclass of NSWindowController (a singleton in my app) inserted after the NSApplication in the responder chain, but is there any way for it to be the last responder before the app, such that Cocoa automatically makes things point first

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
On Apr 23, 2008, at 2:07 AM, Jens Alfke wrote: On 22 Apr '08, at 10:21 PM, Daniel DeCovnick wrote: Through a lot of thought experiments, I've come to the conclusion that the best place to save this sort of thing would be in the resource fork of the file being opened, but I could be totall

Re: Inserting my own Responder before App?

2008-04-23 Thread Rick Mann
On Apr 23, 2008, at 12:37 AM, Ken Thomases wrote: See this: http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/chapter_2_section_6.html and also -[NSResponder setNextResponder:]. However, NSWindowController automatically uses that method to add itself

Re: [ANN] TransactionKit, Lockless Multi-Reader, Multi-Writer Transaction Capable Hash Tables

2008-04-23 Thread Daniel DeCovnick
On Apr 22, 2008, at 7:48 PM, John Engelhart wrote: *applause* ___ 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 cocoa-dev-admins(at)lists.apple.c

Re: Inserting my own Responder before App?

2008-04-23 Thread j o a r
On Apr 23, 2008, at 12:46 AM, Rick Mann wrote: My NSWindowController subclass is not automatically hooked up (I tried). I am able to use the setNextResponder et al. to put it *after* the app, but I can't figure out how to set it up so it'll be *before* the app. Did you hook it up to be

Re: Inserting my own Responder before App?

2008-04-23 Thread Manfred Schwind
I've got a subclass of NSWindowController (a singleton in my app) inserted after the NSApplication in the responder chain, but is there any way for it to be the last responder before the app, such that Cocoa automatically makes things point first to my responder and then I can pass things o

Re: Inserting my own Responder before App?

2008-04-23 Thread Cathy Shive
Does your window know about the window controller and vice-versa? It's not clear how you're setting this up from your post, but you might need to tell the window about your window controller subclass: [window setWindowController:windowController]; Or the other way around? [windowController

Uneditable NSTableView

2008-04-23 Thread Ewan Delanoy
Hello all, I'm trying to construct a Cocoa app that mimicks the Mail application, with the difference that it's not especially intended for mails : one the upper part a list of titles, and on the lower part exactly one title&text is shown. Double-clicking on a title in the upper part makes

Re: Uneditable NSTableView

2008-04-23 Thread Ian Jackson
Perhaps you have a good reason, but from your description, and being used to using Mail, I'd expect the lower part to display the content with a single click. Have you used setTarget: and setAction: to coordinate this double click event? Ian. On 23/04/2008, at 8:33 PM, Ewan Delanoy wrote:

Re: NSCollectionView and CoreData question

2008-04-23 Thread Matthew Delves
On 23/04/2008, at 12:08 AM, I. Savant wrote: Having set the 'content' binding to the arrangedObjects key in IB didn't produce a result though doing it programmatically has. Not sure why this would be. It depends. Since you have provided neither the exact bindings settings you're using nor

Re: Setting NSImage with overlay blend to NSImageView

2008-04-23 Thread Michael Vannorsdel
Each view draw's into the window's graphic context. When focus is locked on a view the window's context is clipped and translated to the view so that drawing is limited to just the view's bounds. Basically all views in a window generally use the window's context (OpenGL views and whatnot

NSScanner question

2008-04-23 Thread Jason Wiggins
Hi, I've been playing with NSScanner to cut a string eg: this is a test " So is this"test from a search field into its components. ie. extract the quoted text to be placed into an array as well as the other components, pre and post quoted text. The other components will eventually be

Re: NSScanner question

2008-04-23 Thread Michael Vannorsdel
At first glance I'd say it's crashing because you're not checking if scanUpToCharactersFromSet:intoString: was successful and trying to add what may be an invalid object (foundStrings) to an array. On Apr 23, 2008, at 3:46 AM, Jason Wiggins wrote: I've been playing with NSScanner to cut a s

Re: How to retain Previous content view in cocoa

2008-04-23 Thread Michael Vannorsdel
Not sure what you're really asking given there's no info other than the subject. If you're asking how to retain a previous window's content view, just call retain on it until you need it again. If you're talking about drawn areas in a view or window you can cache the area with NSWindow's

Re: Carriage returns and NSXMLParser

2008-04-23 Thread Ian Jackson
Whitespace is preserved, not ignored. But in your example, the new line is in the attribute value, so I don't suppose XML cares too much what's between the quotation marks. So if you can obtain the value of the data attribute, and print the value to the console, does it come out with a space

Re: Uneditable NSTableView

2008-04-23 Thread Andy Lee
On Apr 23, 2008, at 4:33 AM, Ewan Delanoy wrote: I have the line [uneditableTableView setDoubleAction:@selector(updateLowerPartAfterSelectionInUpperPart:)]; Unfortunately, this doesn't work : although the rows are indeed uneditable and I can select any one of them, the "updateLowerPartAfter

Re: Uneditable NSTableView

2008-04-23 Thread Andy Lee
Good question -- if you want the double action to be called, you have to set the app controller to be the table view's target, not just its delegate. You can, of course, make the connection in IB; you don't have to use setTarget:. --Andy On Apr 23, 2008, at 5:22 AM, Ian Jackson wrote: Per

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Rob Keniger
On 23/04/2008, at 5:41 PM, Daniel DeCovnick wrote: Thanks for the suggestion. I've just looked through them now, as well as at the OSXBook (Mac OS X Internals: A Systems Approach by Amit Singh) info on that. In theory it looks good, but it's somewhat confusing. It looks like, at least in 1

Re: [Ann] DMG Canvas

2008-04-23 Thread Raphael Sebbe
seems fine, cannot try it though:bzip2: (stdin): trailing garbage after EOF ignored the dmg won't mount. Is it me ? Raphael On Tue, Apr 22, 2008 at 11:58 PM, Ricky Sharp <[EMAIL PROTECTED]> wrote: > > On Apr 22, 2008, at 2:00 AM, Seth Willits wrote: > > Off topic, I admit, but y'all being fell

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Ken Thomases
On 23/04/2008, at 5:41 PM, Daniel DeCovnick wrote: Thanks for the suggestion. I've just looked through them now, as well as at the OSXBook (Mac OS X Internals: A Systems Approach by Amit Singh) info on that. In theory it looks good, but it's somewhat confusing. It looks like, at least in 10

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Matt Gough
I'd second that. The OS (well, Finder) also adds things to the resource fork of files (custom icons, info about which app to open a file with when you changed it from the default etc). Just as long as you respect the existing contents this is exactly where you should put your data. On 23

Re: Complex data for webservices

2008-04-23 Thread Niklas Saers
Hi Jeff, and thanks for answering :-) On Apr 21, 2008, at 3:30 PM, Jeff LaMarche wrote: I'm no expert on Web Services on Objective-C, but I've been playing around with them a bit. One thing that I have discovered is that CFTypeRef is not _always_ a dictionary. In some cases, it wants a str

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Adam R. Maxwell
On Apr 23, 2008, at 12:41 AM, Daniel DeCovnick wrote: On Apr 23, 2008, at 2:07 AM, Jens Alfke wrote: On 22 Apr '08, at 10:21 PM, Daniel DeCovnick wrote: Through a lot of thought experiments, I've come to the conclusion that the best place to save this sort of thing would be in the reso

Removing subviews that are layer backed problem.

2008-04-23 Thread Mathieu Coursolle
Hi Cocoa developers, I have a custom view (let's call this one the main view) which shows some UI controls and another custom subview which is layer backed (wantsLayer = YES). I created my own CAOpenGLLayer subclass to perform specific OpenGL drawing in it. The main view needs to change i

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Sean McBride
On 4/23/08 1:21 AM, Daniel DeCovnick said: >I'm writing an application that opens particular kinds of files, >parses them, displays an editable graphical representation of the >contents of a file, and saves the results of the changes to the file. >However, some graphical changes don't result in ch

Re: Carriage returns and NSXMLParser

2008-04-23 Thread Daniel Staal
--As of April 23, 2008 9:04:21 PM +1200, Ian Jackson is alleged to have said: Whitespace is preserved, not ignored. But in your example, the new line is in the attribute value, so I don't suppose XML cares too much what's between the quotation marks. So if you can obtain the value of the data a

Re: Complex data for webservices

2008-04-23 Thread Jeff LaMarche
When I try to access your WSDL, I get: Server Error in '/DummyWS' Application. Generally, though, I don't believe the response from a web service is a dictionary - I believe it's usually a string and I'm wondering why you are sending an empty dictionary - it would seem like nil would be a

Re: Uneditable NSTableView

2008-04-23 Thread Ewan Delanoy
>Perhaps you have a good reason, but from your description, and being >used to using Mail, I'd expect the lower part to display the content >with a single click. The reason is, I know how to produce easily the "double-click" behaviour with Cocoa but not the (better) "click" behaviour >Good qu

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Jens Alfke
Another possibility is to write a short unique string (like a UUID) into an extended attribute, and then use that as a key into your own external data store, like a database or plist you put in some central place. A nice feature of this approach is that you only have to modify the file on

Re: Uneditable NSTableView

2008-04-23 Thread Keary Suska
on 4/23/08 8:41 AM, [EMAIL PROTECTED] purportedly said: >> Good question -- if you want the double action to be called, you have >> to set the app controller to be the table view's target, not just its >> delegate. You can, of course, make the connection in IB; you don't >> have to use setTarget:.

Special handling of keystrokes in a window controller

2008-04-23 Thread Duncan Champney
My app has a number of input fields that are used to change light settings, camera x/y/z position, etc for a 3D view window. ALL these fields are numeric, and don't need to handle non number characters (they need to handle 0-9, "+", "-", ".", and possibly "E" for scientific notation, althou

Re: A cursor bug in DragItemAround example

2008-04-23 Thread an0
> Chances are, calling '[[self enclosingScrollView] > setDocumentCursor:[NSCursor closedHandCursor]]' in 'mouseDown:' will fix the > problem you're seeing. NSScrollView/NSClipView's way of changing the cursor > conflicts with autoscrolling or drag-scrolling, but AFAIK there's no way of > preventin

Failure on unarchiving a NSBezierPath

2008-04-23 Thread an0
I was building a very simple drawing application, but met problems when reading the file saved by my application. The two functions as to archiving/unarchiving are as follows: - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError { return [NSKeyedArchiver archivedDataWithRootO

Re: Special handling of keystrokes in a window controller

2008-04-23 Thread Michael Vannorsdel
You can subclass NSWindow for your window and override keyDown:. The ones you want to pass down the chain you send by calling the superclass's keyDown. On Apr 23, 2008, at 9:36 AM, Duncan Champney wrote: I could easily change my zoom in/zoom out keystrokes to be the bracket keys ("[" "]

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
That's pretty much option 1, albeit implemented slightly more robustly than I was thinking of. But my data's not sensitive, so there's no advantage in losing it on sending it to someone else, and in fact I'd much prefer it was retained if possible. -Dan On Apr 23, 2008, at 11:10 AM, Jens

QTMovie grabing while playback

2008-04-23 Thread Nikolai Hellwig
Hi, I've done some image analysing software for QTKit Capture. It works fine. Now i need to use this for a quicktime movie. I can playback the quicktime movie, but i can't find any delegate which tells my application, that a new frame is rendered. If i can get this information i could grab

Re: Uneditable NSTableView (SOLVED)

2008-04-23 Thread Ewan Delanoy
>>I'm not quite sure what you mean by "target" here >The "target" is the object that your selector message will be sent to. >How will your TableView know which object responds to the selector you >give it? It's not magic... >HTH It did help indeed, and even solved my problem! (it now

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread John Stiles
Thirded. Matt Gough wrote: I'd second that. The OS (well, Finder) also adds things to the resource fork of files (custom icons, info about which app to open a file with when you changed it from the default etc). Just as long as you respect the existing contents this is exactly where you should

NSImage and NSImageView issues (not drawing correctly)

2008-04-23 Thread Nick Rogers
Hi, 1. I'm using: NSImage *image = [[NSImage alloc] initWithData:data]; NSImageRep *imageRep = [image bestRepresentationForDevice:nil]; NSImage *imageToBeDrawn = [[NSImage alloc] init]; [imageToBeDrawn addRepresentation:imageRep]; if ([imageToBeDrawn isValid] == YES) [previewImage setImage

Re: NSImage and NSImageView issues (not drawing correctly)

2008-04-23 Thread Michael Vannorsdel
You might need to specify a size for some formats for your imageToBeDrawn object. On Apr 23, 2008, at 10:27 AM, Nick Rogers wrote: Hi, 1. I'm using: NSImage *image = [[NSImage alloc] initWithData:data]; NSImageRep *imageRep = [image bestRepresentationForDevice:nil]; NSImage *imageToBeDrawn

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
That the Resource Manager is still around in 64-bit definitely alleviates one of my concerns - "will whatever I use still be around in the future?" Thanks much, Dan On Apr 23, 2008, at 10:12 AM, Sean McBride wrote: On 4/23/08 1:21 AM, Daniel DeCovnick said: I'm writing an application that

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Gerd Knops
Coincidentally I just went through that same song and dance. With Spotlight becoming more and more important in OSX, it is surprising Apple has not provided a clean method to store arbitrary metadata with any kind of file. Maybe time for us all to file an enhancement request. As others have

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
Actually it is possible, at least according to the OSXBook, to add arbitrary key-value paired metadata to a file (IIRC, all MDItem keys share a flat namespace). It theoretically works without Spotlight, but nothing uses metadata that doesn't use Spotlight currently, AFAIK, and my data isn't

Re: "Safe" frameworks for privileged tools?

2008-04-23 Thread stephen joseph butler
On Wed, Apr 23, 2008 at 11:42 AM, Dave Camp <[EMAIL PROTECTED]> wrote: > Unless I'm reading the OP wrong, he's writing a privileged helper tool, > not a daemon. Given that, I don't think the above documents are applicable. None of what I know is official, but just gathered and extrapolated from

Re: QTMovie grabing while playback

2008-04-23 Thread douglas a. welton
Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think th

Re: QTMovie grabing while playback

2008-04-23 Thread Bob Smith
On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the heade

Re: QTMovie grabing while playback

2008-04-23 Thread Jean-Daniel Dupas
Le 23 avr. 08 à 19:30, Bob Smith a écrit : On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is di

Re: QTMovie grabing while playback

2008-04-23 Thread Randall Meadows
On Apr 23, 2008, at 11:30 AM, Bob Smith wrote: On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed

Re: Uneditable NSTableView (SOLVED)

2008-04-23 Thread Corbin Dunn
On Apr 23, 2008, at 9:21 AM, Ewan Delanoy wrote: I'm not quite sure what you mean by "target" here The "target" is the object that your selector message will be sent to. How will your TableView know which object responds to the selector you give it? It's not magic... HTH It did

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Uli Kusterer
Am 23.04.2008 um 09:41 schrieb Daniel DeCovnick: Thanks for the suggestion. I've just looked through them now, as well as at the OSXBook (Mac OS X Internals: A Systems Approach by Amit Singh) info on that. In theory it looks good, but it's somewhat confusing. It looks like, at least in 10.4,

Re: QTMovie grabing while playback

2008-04-23 Thread Jean-Daniel Dupas
Le 23 avr. 08 à 19:58, Randall Meadows a écrit : On Apr 23, 2008, at 11:30 AM, Bob Smith wrote: On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method give

Re: Inserting my own Responder before App?

2008-04-23 Thread Rick Mann
On Apr 23, 2008, at 1:01 AM, j o a r wrote: Did you hook it up to be the delegate of the window? That's how it ends up in the responder chain. In this way it would appear *before* the app, which typically is what you want. If you want to add something *after* the app, don't use a window co

Re: QTMovie grabing while playback

2008-04-23 Thread Randall Meadows
On Apr 23, 2008, at 12:15 PM, Jean-Daniel Dupas wrote: This delegate method was also added to QTMovieView. It's really helpfull for example if you want to apply some effect or if you want to insert text in your movie. Nice. I use the QTCaptureView version in my app to rotate a live video

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Uli Kusterer
Am 23.04.2008 um 17:10 schrieb Jens Alfke: Another possibility is to write a short unique string (like a UUID) into an extended attribute, and then use that as a key into your own external data store, like a database or plist you put in some central place. Not a good idea. The user could

awakeFromInsert rules: ok to fetch and create other managed objects?

2008-04-23 Thread Sean McBride
Hi all, I've been reading the archives for hours, trying to figure out the 'rules' for what can and cannot be done in awakeFromInsert. 1) Is it ok to execute a fetch from awakeFromInsert? One might want to do this to set a default property value that depends on other objects' state. It seems th

Re: Using OSMemoryBarrier() with KVO

2008-04-23 Thread Paul Thomas
On 23 Apr 2008, at 03:41, Ken Thomases wrote: On Apr 22, 2008, at 6:37 AM, Paul Thomas wrote: Is this enough? Or will I need to use a full blown lock? What is it that you fear going wrong, such that you think even OSMemoryBarrier is necessary? I think the barrier is needed to ensure tha

Re: "Safe" frameworks for privileged tools?

2008-04-23 Thread Michael Watson
Yes, it's a helper tool. It runs for a couple of seconds (under normal conditions) and exits immediately. It interacts with the file system by reading information about some directories, so its launched duration is, of course, bound to the responsiveness of the hard drive on which it's oper

Re: QTMovie grabing while playback

2008-04-23 Thread Bob Smith
On Wed, 23 Apr 2008 20:15:39 +0200 Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: Le 23 avr. 08 à 19:58, Randall Meadows a écrit : On Apr 23, 2008, at 11:30 AM, Bob Smith wrote: On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: QTMovieView has a delegate method - (CIImage*) view: (QTM

Re: NSButton "reveals" keyboard shortuct [SOLVED]

2008-04-23 Thread Pierre Bernard
Answering part 1 of my own question: revealing the keyboard shortcut once the command key is pressed. C.f. below for the code What remains is the second part: how does NSButton implement keyboard shortcuts. How would I implement and additional shortcut for a button which already has one.

Re: NSScanner question

2008-04-23 Thread Jason Wiggins
Thanks Michael for your reply. I guess I should be doing more validity checks. I'll play some more. Thanks for the suggestion. Regards, Jason On 23/04/2008, at 7:57 PM, Michael Vannorsdel wrote: At first glance I'd say it's crashing because you're not checking if scanUpToCharactersFromSet:in

Re: Uneditable NSTableView (SOLVED)

2008-04-23 Thread Ewan Delanoy
Corbinn Dunn wrote I'm not quite sure what you mean by "target" here >>> The "target" is the object that your selector message will be sent >>> to. >>> How will your TableView know which object responds to the selector >>> you >>> give it? It's not magic... >>> HTH >> >> It did hel

Re: Inserting my own Responder before App?

2008-04-23 Thread Ken Thomases
On Apr 23, 2008, at 1:20 PM, Rick Mann wrote: My code currently inserts my controller between the app and whatever the app is pointing to. (I don't know what happens if an app delegate is installed after that.) I really need for my controller to be created at launch, but not its window. I

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Chris Williams
But the resource fork idea has the same issue if someone uses/sends/writes to the file from the other 90% of the computers on the planet... (windows). Doesn't it? I think you're best tracking the info in your own data source, doing your best to track and keep up with the user changing it outside y

Re: Uneditable NSTableView (SOLVED)

2008-04-23 Thread Nate Weaver
If that's the case, you can simply check [yourTableView numberOfSelectedRows] in -tableViewSelectionDidChange: and update the bottom view based on the result. On Apr 23, 2008, at 2:05 PM, Ewan Delanoy wrote: Corbinn Dunn wrote I'm not quite sure what you mean by "target" here The

Re: QTMovie grabing while playback

2008-04-23 Thread douglas a. welton
Bob & Randall, If all you want to do is slap some arbitrary text over a movie, I would suggest that you take a look at using QTMovieLayer and CATextLayer as the mechanism for doing this. I don't have any code that I can share with you on this, but a previous client project used these tw

A Cocoa means to detect SysPref 'Enable access for assistive devices"

2008-04-23 Thread Steve Cronin
Folks; Is there a straight Cocoa means to detect the System Preferences/ Universal Access setting for 'Enable access for assistive devices'? I've found plenty of references on using Applescript to detect this setting. The Cocoa Assistive API seems pretty extensive but I can't glean a way t

Re: A Cocoa means to detect SysPref 'Enable access for assistive devices"

2008-04-23 Thread Peter Maurer
Is there a straight Cocoa means to detect the System Preferences/ Universal Access setting for 'Enable access for assistive devices'? I don't think this counts as Cocoa, but it's better than AppleScript: AXAPIEnabled() Peter. ___ Cocoa-dev mailing

Re: A Cocoa means to detect SysPref 'Enable access for assistive devices"

2008-04-23 Thread Bill Cheeseman
on 2008-04-23 4:37 PM, Peter Maurer at [EMAIL PROTECTED] wrote: >> Is there a straight Cocoa means to detect the System Preferences/ >> Universal Access setting for 'Enable access for assistive devices'? > > I don't think this counts as Cocoa, but it's better than AppleScript: > AXAPIEnabled() Y

Re: Uneditable NSTableView (SOLVED)

2008-04-23 Thread Corbin Dunn
On Apr 23, 2008, at 12:05 PM, Ewan Delanoy wrote: Corbinn Dunn wrote I'm not quite sure what you mean by "target" here The "target" is the object that your selector message will be sent to. How will your TableView know which object responds to the selector you give it? It's not magic.

IB3 can't find my class

2008-04-23 Thread John Stiles
I have a class declared in code which, until recently, didn't have any IBActions in it. Recently I added some, and went to IB3, but it didn't notice that I had added the actions. I had to manually add them via the + button. Is there any way I can give IB3 a hint so it can find the class' @interf

Re: IB3 can't find my class

2008-04-23 Thread Nick Zitzmann
On Apr 23, 2008, at 4:04 PM, John Stiles wrote: I have a class declared in code which, until recently, didn't have any IBActions in it. Recently I added some, and went to IB3, but it didn't notice that I had added the actions. I had to manually add them via the + button. Is there any way I c

Caching a local file using NSURLCache

2008-04-23 Thread Stephan Burlot
Hi, I want to cache local files (images) so I cache a NSData using [NSURLCache storeCachedResponse] If I try to fetch it, the cachedResponseForRequest:request is always nil under 10.5 This works under 10.4. I tried to create my own sharedURLCache, but it still doesn't work. I use NSStr

Re: "Safe" frameworks for privileged tools?

2008-04-23 Thread Chris Suter
On 24/04/2008, at 4:35 AM, Michael Watson wrote: Yes, it's a helper tool. It runs for a couple of seconds (under normal conditions) and exits immediately. It interacts with the file system by reading information about some directories, so its launched duration is, of course, bound to the r

Re: IB3 can't find my class

2008-04-23 Thread John Stiles
Nick Zitzmann wrote: On Apr 23, 2008, at 4:04 PM, John Stiles wrote: I have a class declared in code which, until recently, didn't have any IBActions in it. Recently I added some, and went to IB3, but it didn't notice that I had added the actions. I had to manually add them via the + button.

NSTextView text coloring problem

2008-04-23 Thread tyler durden
Hi Everybody, I am reposting this since I haven't got any answers, yet. Hope somebody helps this time around. I am writing an easy chat application. I have an object of NSTextview on my UI form. I want to change the text color in a specified range from default color black to red. I used the met

Re: NSTextView text coloring problem

2008-04-23 Thread Jean-Daniel Dupas
Look like you text view does not allow rich text. Make sure the Allow Rich Text check box is checked in your TextView config in IB or set it programaticaly using -[NSTextView setRichText:] - (void)setRichText:(BOOL)flag “Controls whether the text views sharing the receiver’s layout manager

Re: NSTextView text coloring problem

2008-04-23 Thread Graham Cox
On 24 Apr 2008, at 8:19 am, tyler durden wrote: Any suggestions ? IBOutlet NSTextView* _view; [(_view) setTextColor:[NSColor redColor] range: NSMakeRange(1,5)]; You can just set the fore-colour attribute on the text itself: (typed into Mail) [[_view textStorage] addAttribute:NSForeg

Re: A cursor bug in DragItemAround example

2008-04-23 Thread Quincey Morris
On Apr 23, 2008, at 08:10, an0 wrote: Chances are, calling '[[self enclosingScrollView] setDocumentCursor:[NSCursor closedHandCursor]]' in 'mouseDown:' will fix the problem you're seeing. NSScrollView/NSClipView's way of changing the cursor conflicts with autoscrolling or drag-scrolling, bu

Re: IB3 can't find my class

2008-04-23 Thread glenn andreas
On Apr 23, 2008, at 5:04 PM, John Stiles wrote: I have a class declared in code which, until recently, didn't have any IBActions in it. Recently I added some, and went to IB3, but it didn't notice that I had added the actions. I had to manually add them via the + button. Is there any way I c

Library-Object in NSPersistentDocument but not in XML-file

2008-04-23 Thread Mike Donovan
Hello everybody! In my document-based core data application I have a outline view which displays a list of departments like this (similar to iTunes): COMPANY [Item] -- All Employees [SmartItem : Item] -- Department A [Department : Item] -- Department B [Department : Item] That works very well! It

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Mike Fischer
Am 23.04.2008 um 09:43 schrieb Daniel DeCovnick <[EMAIL PROTECTED]>: On Apr 23, 2008, at 2:07 AM, Jens Alfke wrote: On 22 Apr '08, at 10:21 PM, Daniel DeCovnick wrote: Through a lot of thought experiments, I've come to the conclusion that the best place to save this sort of thing would be i

Application Launch (or doesn't Launch as such)

2008-04-23 Thread David Wilson
Hi everyone... I'm perplexed... I'm running Xcode 3.1 (actually iPhone SDK Beta 3) on Mac OS 10.5.2 My application doesn't launch when I click the run button in Xcode (note it is NOT an iPhone app). It's an application to control USB devices. XCode tells me that the application has launche

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
You may want to look at the size limits on resource forks, though. I thought I'd blogged about that ages ago, but can't find the posting right now. The resource fork format is documented, though, so it shouldn't be too hard to figure out. There's for example a 2727 resources limit on ea

Re: Application Launch (or doesn't Launch as such)

2008-04-23 Thread Kevin Grant
Are you using features like ZeroLink, that won't work in a normal release build? Kevin G. Hi everyone... I'm perplexed... I'm running Xcode 3.1 (actually iPhone SDK Beta 3) on Mac OS 10.5.2 My application doesn't launch when I click the run button in Xcode (note it is NOT an iPhone app).

Re: Application Launch (or doesn't Launch as such)

2008-04-23 Thread David Wilson
Interestingly enough I thought that "Zero_Link" was off (so that I could send copies of the app to others). And this had been done long ago 10.4.x days... Looking now, I see a User Defined Attribute called "Zero_Link" and it's set to NO. I've deleted it and recompiled (from clean). This app

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Chris Suter
On 24/04/2008, at 11:53 AM, Daniel DeCovnick wrote: I'm pretty sure the resource fork size limits are rather large... EV Nova's data files, in which everything is stored in the resource fork, go up to 13.8 MB. Also, it's a definite advantage that the resource fork is well-documented. That'

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Jason Stephenson
Chris Suter wrote: Furthermore, it doesn't follow the file which was the original design goal. Going back to the original question, I personally think that the best thing to do is to just create another file and educate the user. Extended attributes and resource forks are all very nice but m

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
The problem with that is, as I wrote in my first message, the real data files aren't mine, and won't be opened by my app exclusively. The data that I need to save ought to be invisible to the file's owner. Imagine, for example, that when working on a file in HexEdit, it allowed you to highl

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Dmitry Markman
I'm not sure what is all about all resources can be stored in the data fork resource manager perfectly understands it there is no reason whatsoever to use resource fork. you can easiliy convert old resource file (with resources in the resource fork) to resource file with resources in the data

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Graham Cox
On 24 Apr 2008, at 12:59 pm, Chris Suter wrote: The limits for resource forks are the same as for data forks Not true - the ResourceMap contains some 24-bit pointers, or at least it used to, as well as some 16-bit length fields as well. Unless these have been changed (possible I guess, I

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Chris Suter
On 24/04/2008, at 2:28 PM, Graham Cox wrote: On 24 Apr 2008, at 12:59 pm, Chris Suter wrote: The limits for resource forks are the same as for data forks Not true - the ResourceMap contains some 24-bit pointers, or at least it used to, as well as some 16-bit length fields as well. Unles

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Graham Cox
On 24 Apr 2008, at 2:46 pm, Chris Suter wrote: On 24/04/2008, at 2:28 PM, Graham Cox wrote: On 24 Apr 2008, at 12:59 pm, Chris Suter wrote: The limits for resource forks are the same as for data forks Not true - the ResourceMap contains some 24-bit pointers, or at least it used to, as w

NSCollectionView like control for Tiger?

2008-04-23 Thread Ferhat Ayaz
Hi, I have to write an application which should also run with Tiger. Does someone know a third party NSCollectionView like control for Tiger? Thanks, Ferhat ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Re: A cursor bug in DragItemAround example

2008-04-23 Thread Scott Anguish
On Apr 23, 2008, at 6:44 PM, Quincey Morris wrote: On Apr 23, 2008, at 08:10, an0 wrote: Chances are, calling '[[self enclosingScrollView] setDocumentCursor:[NSCursor closedHandCursor]]' in 'mouseDown:' will fix the problem you're seeing. NSScrollView/NSClipView's way of changing the cur

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
Honestly, I don't care how the data is stored, as long as I've got some reliable place to store file-specific data such that it can be reliably tied to the file (cross-user/cross-computer concerns are primary, cross-platform concerns are secondary - I'm only writing this for OS X currently,

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Chris Suter
On 24/04/2008, at 4:14 PM, Daniel DeCovnick wrote: Honestly, I don't care how the data is stored, as long as I've got some reliable place to store file-specific data such that it can be reliably tied to the file (cross-user/cross-computer concerns are primary, cross-platform concerns are s

Re: Saving NSTextView data to CoreData without ending editing

2008-04-23 Thread Ferhat Ayaz
Hi Mike, try to check "continuously Update Value" in the bind options. Ferhat On Apr 22, 2008, at 9:26 PM, Mike Manzano wrote: I have an application that periodically needs to save content contained in an NSTextView. The text view is bound to a Core Data managed object. Currently, I am end

  1   2   >