Re: NSToolbar help

2010-12-19 Thread Knut Lorenzen
Am 19.12.2010 um 20:20 schrieb lorenzo7...@gmail.com: > I'm trying to add an NSToolbar to an existing application. I need > compatibility with 10.4, so I'm creating the toolbar programmatically, > initializing and configuring the toolbar in my -init. Just a shot in the dark, but perhaps -init

Re: Embedding a system preference pane

2010-08-20 Thread Knut Lorenzen
Am 20.08.2010 um 10:44 schrieb Jon Guy: > I'm trying to embed a couple of the system pref panes into an app by > following the Apple documented method, here's basically whats going on: <...> I've slightly modified your code (mainWindow is the apps main window) to look like this: NSBundle *pr

Re: Detecting a remote volume

2010-08-04 Thread Knut Lorenzen
Am 04.08.2010 um 15:10 schrieb Mark Fleming: > Here is what I use for: > - detecting WebDAV Volumes... can change the -t to afp to list AFP volumes. > - for mounting and unmounting WebDAV volumes. <...> Thanks Mark. I have found an even easier way to reach my goal: NSWorkspace *workspace = [NS

Re: Detecting a remote volume

2010-08-02 Thread Knut Lorenzen
l the time. My clients (mostly PR Agencies) with 10 or 20 users or the like have their server volumes mounted constantly. <...> Misunderstanding anyone? ___ Dipl.-Phys. Knut Lorenzen <http://Knut.MacDisk.de> _

Re: Detecting a remote volume

2010-08-02 Thread Knut Lorenzen
nstead of just connecting to a server. I cannot mount myself, because I would need the users password in order to do so. Perhaps advising the user to click (in order to mount) is the best solution. Anyway, thanks for your thoughts, Ken! ___

Detecting a remote volume

2010-08-02 Thread Knut Lorenzen
Dear List, my app should copy a few files to a remote (afp://) volume, hence it notifies the user if there is no connection, using NSFileManager's fileExistsAtPath: method. However, if the user connects to the Server using Finder's "Connect As...", NSFileManager's fileExistsAtPath: @"/Volumes

Re: Prevent NSWindow from hiding with app

2010-03-25 Thread Knut Lorenzen
Am 25.03.2010 um 20:52 schrieb fabian: > Sorry for being unclear. I want NSApp to behave normally, i.e. when the user > hides it (with Command+H) the menu bar and all windows _except this one > window_ should hide. I am no expert here, but I don't believe that is possible. > I do know when this

Re: Prevent NSWindow from hiding with app

2010-03-25 Thread Knut Lorenzen
Am 25.03.2010 um 19:44 schrieb fabian: > Thanks, but the "Hide on Deactivate" option only works when NSApp is > deactived, not hidden (as in Command+H). The window I want to stay on screen > is a system wide icon window like the one you see when adjusting screen > brightness, so it's most definit

Re: Prevent NSWindow from hiding with app

2010-03-25 Thread Knut Lorenzen
Am 25.03.2010 um 19:10 schrieb fabian: > Is it possible to prevent a window from hiding when NSApp is hidden, so it > always stays on screen? I only want the menu bar to go away. Do you really mean "hidden" (like Command-H) or do you mean "not the frontmost application"? If the latter is the c

Re: NSScrollView & its width

2010-02-06 Thread Knut Lorenzen
h to something large, possibly the > unlimited value that is the default for the maximum height. I've tried that - and *much* more for several hours now and didn't get it to work... For what I want to do, it's not worth the effort. Conclusion: I will use an NSImageView for displa

Re: NSScrollView & its width

2010-02-05 Thread Knut Lorenzen
> Try using setMinSize: on the NSTextView. Thanks for responding, Ross. Your idea suffers from the same problem, namely that as soon as the window/view is resized, everything snaps back. ___ Dipl.-Phys. Knu

Re: NSScrollView & its width

2010-02-05 Thread Knut Lorenzen
hts, Mark. Settings setWidthTracksTextView to NO works, but after doing that, the NSScrollView (parent of the TextView in question) clips the content to its own width :/ Perhaps there is a good reason that even TextEdit does not support this?

NSScrollView & its width

2010-02-04 Thread Knut Lorenzen
Dear List, an NSScrollView ("Show Horizontal Scroller" in IB checked) contains an NSTextView that displays some RTFD-data, including some pictures. However, the Horizontal Scroller is not shown. BTW, TextEdit seems to behave exactly the same. Logging [[myScrollView documentView] frame].size.w

Re: NSSpellChecker and checkSpellingOfString problems

2009-12-03 Thread Knut Lorenzen
Am 03.12.2009 um 17:55 schrieb Keith Blount: > I have an NSTextView subclass that provides a custom contextual menu by > overriding -menuForEvent:. Because I override this, I have to provide any > menu items I want to retain from the original menu myself. Can't you simply use something like NS

Re: Validate NSToolbarPrintItem

2009-10-14 Thread Knut Lorenzen
Am 13.10.2009 um 21:00 schrieb Knut Lorenzen: how does one validate a NSToolbarPrintItem that was added in IB 3.2? To answer my own question (and for the archives): This looks like a bug in IB's predefined Print Toolbar Item. Workaround: Simply delete it, add a custom item instead

Validate NSToolbarPrintItem

2009-10-13 Thread Knut Lorenzen
Dear List, how does one validate a NSToolbarPrintItem that was added in IB 3.2? The delegate's - (BOOL)validateToolbarItem:(NSToolbarItem *)theItem doesn't even get called. The Toolbar Item Attributes in IB's Inspector are all grayed out. Connecting to my Custom View sending a print: mes

NSPasteboard -> NSTextView

2009-10-03 Thread Knut Lorenzen
Dear List, My App receives RTF (or RTFD) data via Drag & Drop: - (BOOL)performDragOperation:(id )sender { NSPasteboard *pboard; pboard = [sender draggingPasteboard]; . . . and checks with if ( [[pboard types] containsObject: NSPasteboardTypeRTF] ) { ... for available data type

Setting BorderThickness moves resize widget?!?

2009-09-29 Thread Knut Lorenzen
ss and restores to rectangular when setting ContentBorderThickness back to 0. Cheers, Knut ___ Dipl.-Phys. Knut Lorenzen <http://Knut.MacDisk.de> ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Contextual Menus in Snow Leopard

2009-09-02 Thread Knut Lorenzen
This appears to be the final word on Contextual Menus in Snow Leopard: Cheers, Knut ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: Preventing Automatic Gzip Decompression with NSURLConnection?

2008-12-18 Thread Knut Lorenzen
Am 18.12.2008 um 20:53 schrieb Knut Lorenzen: Setting your MIMEType to @"gzip" and returning NO should to the trick. Ouch, this should probably be @"application/gzip" :) Cheers, Knut ___ Cocoa-dev mailing list (Cocoa

Re: Preventing Automatic Gzip Decompression with NSURLConnection?

2008-12-18 Thread Knut Lorenzen
Am 18.12.2008 um 20:22 schrieb Andrew Lindesay: I have figured out that NSURLConnection is decompressing data when the header "Content-Encoding" is equal to "gzip". Fair enough and probably quite handy, but I would like to stop it doing this as I would like to show a progress bar for a do

Re: IR Remote Control Events

2008-11-30 Thread Knut Lorenzen
Am 30.11.2008 um 21:12 schrieb Gordon Apple: Is there a simple way give to get the 6 button events from an Apple IR Remote control in Cocoa? Look here: Cheers, Knut

Re: Using a string as filepath

2008-11-28 Thread Knut Lorenzen
Am 28.11.2008 um 19:22 schrieb Tommy Nordgren: try using -[NSString fileSystemRepresentation] Actually, that was my 1st attempt :) Meanwhile I have a solution better than replacing all potentially "evil" characters with an underscore: for( i = 0; i < [temporaryPath length]; i++)

Re: Using a string as filepath

2008-11-27 Thread Knut Lorenzen
Am 27.11.2008 um 06:11 schrieb Michael Ash: There really isn't, because it's a pretty hard problem. Mike, thanks for your detailed reply. My case (one or two files a week or so) does not justify more than a few lines of code and string length is not a problem either. I think I'll simpl

Re: Using a string as filepath

2008-11-27 Thread Knut Lorenzen
Am 27.11.2008 um 01:22 schrieb Kiel Gillard: Can you use NSSavePanel? It handles all that detail for you. Unfortunately not. Alternatively, try using NSString's stringByAppendingPathComponent: method, it may validate the path component you're trying to add. Tried that, but stringByAppend

Using a string as filepath

2008-11-26 Thread Knut Lorenzen
Dear list, I would like to name a file according to an user defined entry. However, the user's name entry might be illegal as a filepath, containing illegal characters for a pathname like "." or "-" as 1st character, "/", ":", etc. I've looked into the Cocoa docs for NSString and NSFileMa

Re: Finder's sidebar background color

2008-11-15 Thread Knut Lorenzen
Am 15.11.2008 um 23:30 schrieb Kyle Sluder: On Sat, Nov 15, 2008 at 5:06 PM, Knut Lorenzen <[EMAIL PROTECTED]> wrote: I am afraid I was unclear, mimicing Finder (and it's ilk) only color-wise. I'm still a bit confused... where will you be using this color? This is the

Re: Finder's sidebar background color

2008-11-15 Thread Knut Lorenzen
Am 15.11.2008 um 22:45 schrieb Andrew Merenbach: Just out of curiosity: if you're trying to mimic the Finder, iTunes, etc., what would you be using besides an outline view? A normal table view wouldn't allow you to have groupings of subitems that are viewable with disclosure triangles. Hell

Re: Finder's sidebar background color

2008-11-15 Thread Knut Lorenzen
Am 15.11.2008 um 22:10 schrieb Markus Spoettl: On Nov 15, 2008, at 12:58 PM, Knut Lorenzen wrote: is there a way to obtain the background color of Finder's sidebar programmatically? Yes, if you have an NSOutlineView instance in SourceList display mode you can just use its -background

Re: Finder's sidebar background color

2008-11-15 Thread Knut Lorenzen
Am 15.11.2008 um 22:04 schrieb Kyle Sluder: On Sat, Nov 15, 2008 at 3:58 PM, Knut Lorenzen <[EMAIL PROTECTED]> wrote: is there a way to obtain the background color of Finder's sidebar programmatically? If you're trying to create a sidebar, set its selection hi

Finder's sidebar background color

2008-11-15 Thread Knut Lorenzen
Hi list, is there a way to obtain the background color of Finder's sidebar programmatically? In active (i.e. frontmost) and inactive state? I've searched the documentation and looked up NSColorList to no avail. Of course it it rather easy to "steal" the colors from Finder and set them to

TableColumn Enabled binding on 10.4/10.5

2008-03-06 Thread Knut Lorenzen
My Table Column Bindings to an NSArrayController are set like this: Binding: Value Controller Key: arrangedObjects Model Key Path: theName (this is a String) Binding: Enabled Controller Key: arrangedObjects Model Key Path: enabled (this is a Boolean) All this works perfectly well on 10.5, i.e.