Where does the undo manager come from?

2008-06-19 Thread Graham Cox
In a non-document based app, I can get the undo manager from any view, which appears to be inherited from NSResponder. The docs for that say: NSResponder’s implementation simply passes this message to the next responder. But NSApplication, which I think is the next responder, doesn't have

getting free space available in a drive

2008-06-19 Thread Angelo Chen
Hi, how to get the total free space available in a drive? thanks, Angelo ___ YM - 離線訊息 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。 http://messenger.yahoo.com.hk ___ Cocoa-dev mailing list

Problem with NSWindow setFrame

2008-06-19 Thread kalpana k
Hi all, I am working with dual monitor application. I want to extend the NSWindow to dual monitor. But the problem is that its height is not extending. i.e. the height of the window is set to height of a single monitor. for example : Monitor 1 : origin: (0,0) size : (1024, 640) - Window is

Re: Problem with NSWindow setFrame

2008-06-19 Thread j o a r
On Jun 18, 2008, at 11:50 PM, kalpana k wrote: window setFrame: NSMakeRect(0,0,1024,1200) Should this not be something more like: NSMakeRect(0.0, -768.0, 1024.0, 1200.0) Also note that, according to the documentation: Note that any NSWindow with a title bar automatically

Re: getting free space available in a drive

2008-06-19 Thread Michael Watson
There are two NSFileManager methods for this: 10.4.11 and earlier: -[NSFileManager fileSystemAttributesAtPath:] 10.5 and later: -[NSFileManager attributesOfFileSystemForPath:error:] Each returns an NSDictionary containing a NSFileSystemFreeSize key. The value for this key is an NSNumber that

Re: Tab-based (document-based?) application

2008-06-19 Thread Mattias Arrelid
On Thu, Jun 19, 2008 at 7:04 AM, Jacob Bandes-Storch [EMAIL PROTECTED] wrote: I'm creating an application that will have an arbitrary number of basically identical windows (document-like) which each have tabs (or something of the sort) in them that represent the actual documents, per se. Would

Re: Send Key Event to Focused Window

2008-06-19 Thread Daniel
hi! I've dig a little bit in Quartz Events services and I got some poorly results. CGEventRef event = CGEventCreateKeyboardEvent(NULL, (CGKeyCode) 40, true); CGEventPost(kCGHIDEventTap, event); This for example works, in Xcode a k is inserted, but there are a lot of other key codes that do not

Re: Problem with NSWindow setFrame

2008-06-19 Thread kalpana k
I had tried NSMakeRect(0.0, -768.0, 1024.0, 1200.0) also. But still the Window is displayed with height 640 only. I had get the window bounds after seeting the bounds. It is giving the height as 1200, but the window is displayed with only 640 height. Is there any default setting which is

NSPredicateEditor and decimal numbers with fractions

2008-06-19 Thread Ruotger Skupin
Hi, I've set up a NSPredicateEditor with a template that forms for example a predicate like: [Gross Value] [is] [ ] the format of the text field is set as Number in Interface Builder. If I input 32.99 into the field I get a predicate like this: grossAmount.amount == 32 Obviously the

Converting HID keyboards usages to characters ?

2008-06-19 Thread Fred Leboucher
Hi, I'm trying to do something that was discussed before in the Carbon lists : convert a HID keyboard usage to a unicode character, with the current modifier keys applied, and using the system-wide selected keyboard layout. This technical note from Apple

#import importing twice?

2008-06-19 Thread Martin Häcker
Hi guys, I was today stung by a problem that I couldn't quite understand. I was importing a header file with #import and the compiler complained about a duplicate interface declaration of the class defined in the header file. Which was bullshit, because the class was only defined in that

Re: #import importing twice?

2008-06-19 Thread Jonathan del Strother
On Thu, Jun 19, 2008 at 9:36 AM, Martin Häcker [EMAIL PROTECTED] wrote: Hi guys, I was today stung by a problem that I couldn't quite understand. I was importing a header file with #import and the compiler complained about a duplicate interface declaration of the class defined in the header

Re: Converting HID keyboards usages to characters ?

2008-06-19 Thread Jean-Daniel Dupas
Le 19 juin 08 à 10:32, Fred Leboucher a écrit : Hi, I'm trying to do something that was discussed before in the Carbon lists : convert a HID keyboard usage to a unicode character, with the current modifier keys applied, and using the system-wide selected keyboard layout. This technical

NSPredicateEditor and decimal numbers with fractions

2008-06-19 Thread Ruotger Skupin
Hi, I've set up an NSPredicateEditor with a template that forms a predicate like: [Gross Value] [is] [32.99] the format of the text field is set as Number in Interface Builder. If I input 32.99 into the field I get a predicate like this: grossAmount.amount == 32 Obviously the number is

Re: Binding the enabled property of a NSMatrix instance to wether or not a multiple selection on a array controller is made.

2008-06-19 Thread Eloy Duran
Hi, Just wanted to check if I need to explain it differently? Simple recap: I want a NSMatrix to be disabled when the selection of the NSArrayController it's bound to returns a multiple selection. Cheers, Eloy On Jun 18, 2008, at 12:23 PM, Eloy Duran wrote: Hi list, I have a

Re: Converting to NSPersistentDocument

2008-06-19 Thread Steven Hamilton
On 16/06/2008, at 5:42 AM, Hamish Allan wrote: On Sun, Jun 15, 2008 at 11:42 AM, Steven Hamilton [EMAIL PROTECTED] wrote: I've been a busy bee learning Cocoa and core data (as my frequent postings may reveal) and now I wish to add NSPersistentDocument functionality. I started my project

Re: Converting to NSPersistentDocument

2008-06-19 Thread mmalc Crawford
On Jun 19, 2008, at 2:38 AM, Steven Hamilton wrote: What I don't understand is how to bind to the managedObjectContext. As far as I can tell in each windows .nib file I set File's Owner to be my subclassed WindowController. This doesn't contain the MOC so therefore I can't bind to it.

Re: Where does the undo manager come from?

2008-06-19 Thread mmalc Crawford
On Jun 18, 2008, at 11:42 PM, Graham Cox wrote: So my question is: in a non-document app, does a view's undo manager come from the app? If not, where from? and finally, is there a way to set the undo manager to some subclass of my own (easy in a document-based app, not so obvious here).

Re: Converting to NSPersistentDocument

2008-06-19 Thread Steven Hamilton
You do rock sir! Thanks a lot. On 19/06/2008, at 7:45 PM, mmalc Crawford wrote: On Jun 19, 2008, at 2:38 AM, Steven Hamilton wrote: What I don't understand is how to bind to the managedObjectContext. As far as I can tell in each windows .nib file I set File's Owner to be my subclassed

Re: Converting HID keyboards usages to characters ?

2008-06-19 Thread Bill Cheeseman
on 2008-06-19 4:32 AM, Fred Leboucher at [EMAIL PROTECTED] wrote: This technical note from Apple (http://developer.apple.com/technotes/tn2002/tn2056.html) details the file formats available for keyboard layouts, but there's no information about the way to: - get info about the currently

Re: Send Key Event to Focused Window

2008-06-19 Thread Bill Cheeseman
on 2008-06-19 3:46 AM, Daniel at [EMAIL PROTECTED] wrote: CGEventRef event = CGEventCreateKeyboardEvent(NULL, (CGKeyCode) 40, true); CGEventPost(kCGHIDEventTap, event); I wouldn't expect you to get even the k character with that code by itself. To type a character requires posting a key down

Re: disappearing NSSpellingStateAttributeName

2008-06-19 Thread Jesse Grosjean
Martin, I haven't fixed it yet, but that seems likely to be the problem. Thank you! Jesse On Jun 18, 2008, at 5:41 PM, Martin Wierschin wrote: Does anyone know what causes the _clearTemporaryAttributesForCharacterRange method to get called... and have theories on why it's being called

NSViewContoller contained subviews not redrawing

2008-06-19 Thread Godfrey van der Linden
This bug is blowing my mind as the behaviour is not deterministic. I have two different NSViewController xibs that get loaded into the a place holder view in the main persistent document window. The xib's views each contain 2 outline views. The outlines views are only *occasionally* get

Re: Where does the undo manager come from? [SOLVED]

2008-06-19 Thread Graham Cox
Ah! OK, I'd seen that in the past never really grokked what it was for... understood, thanks. G. On 19 Jun 2008, at 7:50 pm, mmalc Crawford wrote: On Jun 18, 2008, at 11:42 PM, Graham Cox wrote: So my question is: in a non-document app, does a view's undo manager come from the app? If

Re: Binding the current table view selection to property in my controller

2008-06-19 Thread Clint Shryock
NSTableView sends a NSTableViewSelectionDidChangeNotification notification when it's selection changes, you could have your window controller listen for those notifications. also, you could make your window controller the tableView's delegate and implement the table view's

Re: CFWriteStreamWrite Blocking if we give invalid Host.

2008-06-19 Thread Kyle Sluder
On Thu, Jun 19, 2008 at 1:00 AM, SridharRao M [EMAIL PROTECTED] wrote: Friends please help me if you know how to avoid blocking. Have you tried asking on the macnetworkprog list? This is the cocoa-dev list, and while many people here are familiar with using CFNetwork, that's not a Cocoa

Re: NSOpenPanel setDirectory to a package

2008-06-19 Thread Dale Jensen
On Jun 18, 2008, at 5:44 PM, Ken Thomases wrote: On Jun 18, 2008, at 5:18 PM, Dale Jensen wrote: I have an application picker bit in my preferences, which allows the user to select an app to do something. 90% of the time, I presume, this will be a package, not a single file. My code is

Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Jerry LeVan
Last night while browsing Slashdot I found this: http://it.slashdot.org/it/08/06/18/1919224.shtml It gives a simple command that can be used to basically execute code as root. osascript -e 'tell app ARDAgent to do shell script whoami' The above will print root and replacing whoami will other

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread lbland
hi- There are better ways to do this, but I'm not commenting. :-) thanks!- -lance On Jun 19, 2008, at 10:22 AM, Jerry LeVan wrote: Last night while browsing Slashdot I found this: http://it.slashdot.org/it/08/06/18/1919224.shtml It gives a simple command that can be used to basically

Add item to NSSavePanel sidebar

2008-06-19 Thread Fedor Larin
Hi, I need to allow user to save some data to a file or a recordable cd ( dvd ), using NSSavePanel. Is it possible to programmatically add an icon representing recordable media to NSSavePanel's sidebar? Writing will be performed on-fly, so standard way used in Finder with 'untitled cd' icon

Re: [ANN] NYC CocoaHeads meeting Thu 6/19

2008-06-19 Thread Andy Lee
There's been a last-minute topic change. Cathy will be discussing a work in progress. --Andy On Jun 18, 2008, at 3:12 PM, Andy Lee wrote: WHAT: Cathy Shive will talk about creating IB plugins. Afterwards, food and beer as usual. WHEN: Thursday, June 19, 6:00PM (special date this

Problems with a Layer backed NSView in a NSScrollView

2008-06-19 Thread Moray Taylor
Hi there! I've been tearing my hair out trying to figure this out, so hopefully someone will take pity! Basicaly, I've a CALayer-backed custom view, which works pretty great, I use a transform to flip it, and it works fine, the problem happens when I put it in a NSScrollView If I put it

Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-19 Thread John Love
Completed the housekeeping I needed to do .. so I began moving all the sheet code over to SheetController. Within FileController, I have 3 IBOutlets which are the 3 different sheet NSWindow's *and* the same 3 sheet NSWindow outlets for SheetController. I need to pass the specific sheet to my

Re: NSURLRequest conditional GET

2008-06-19 Thread Jens Alfke
On 18 Jun '08, at 3:01 AM, Marc Monguio wrote: The documentation I've found about Conditional GET in the web says I should be sending If-Modified-Since and If-None-Match headers with the contents of Last-Modified and ETag headers from the last server's answer. However it doesn't look like

NSLineBreakByTruncatingMiddle on Selected Text?

2008-06-19 Thread Dalzhim Dalzhim
Hello! I have a NSMatrix which contains multiple NSTextFieldCells which are being displayed with attributed string that have their ParagraphStyle's line break mode set to NSLineBreakByTruncatingMiddle. These cells aren't editable but they are currently selectable. Reading the documentation, I

Can't sort NSTableView

2008-06-19 Thread Trygve Inda
I have an NSTableView tied to an NSArrayController After I populate the array, the table does show the data via bindings on each of the columns. However, clicking a column header does nothing - how can I make it sort? I have done this before in IB2 and it sorted ok, but I can't make this new

Spaces bug when [NSTextView complete:] called?

2008-06-19 Thread Jesse Grosjean
I think I've found an odd bug in [NSTextView complete:] and Spaces. To reproduce: 1. Open TextEdit 2. Open a few different TextEdit documents, put them in different spaces. 3. Then trying using the complete: (escape key) feature in the different TextEdit documents that are in different

Re: Can't sort NSTableView

2008-06-19 Thread Brent Fulgham
On Thu, Jun 19, 2008 at 10:24 AM, mmalc crawford [EMAIL PROTECTED] wrote: http://homepage.mac.com/mmalc/CocoaExamples/controllers.html - Disabling sorting in a tableview mmalc mmalc's note reminds me: I would like to publicly thank him for this great resource. The examples and documentation

NSReponder chain and controllers

2008-06-19 Thread Robert Douglas
My code is getting ugly so I suspect I'm doing something wrong. I'm trying to hook up menu items in my main menu to actions that I've defined in my controllers. I have a Core Data doc with a multiple master-detail view hierarchy, and for testing purposes have buttons connected to a wide

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Charles Steinman
This is in fact a Cocoa vulnerability, so it seems relevant to this list. All Cocoa applications automagically come with rudimentary AppleScript support (including do shell script), so any Cocoa app that runs with suid is a security risk unless you short circuit the Foundation scripting

NSData text representation

2008-06-19 Thread Trygve Inda
In my plist (xml1 format) I see something like: data +/YgByAMQo78MBADoA /data However when I send a [myNSData description] I get something like: 4705 78da8d53 cb4ac340 146d1ea0 a0b8f133 5c09 How can I get something more like the first example that I can copy/paste into a plist? Thanks,

Re: Binding the enabled property of a NSMatrix instance to wether or not a multiple selection on a array controller is made.

2008-06-19 Thread Keary Suska
6/19/08 3:30 AM, also sprach [EMAIL PROTECTED]: Just wanted to check if I need to explain it differently? Simple recap: I want a NSMatrix to be disabled when the selection of the NSArrayController it's bound to returns a multiple selection. What I will often do in these cases is bind enabled

Re: NSReponder chain and controllers

2008-06-19 Thread Adam Knight
Add your controllers to the responder chain when appropriate and then put the IBAction methods in the relevant controllers. If you duplicate methods (like delete: or cancel:) take care as to what order you add them into the chain because the first to respond wins (though it can always

Re: NSData text representation

2008-06-19 Thread Charles Steinman
--- On Thu, 6/19/08, Trygve Inda [EMAIL PROTECTED] wrote: From: Trygve Inda [EMAIL PROTECTED] Subject: NSData text representation To: Cocoa-Dev List cocoa-dev@lists.apple.com Date: Thursday, June 19, 2008, 11:50 AM In my plist (xml1 format) I see something like: data +/YgByAMQo78MBADoA

Re: NSReponder chain and controllers

2008-06-19 Thread Cathy Shive
NSArrayController isn't an NSResponder, so you can't add your subclasses to the responder chain. I think the problem is that you should be using NSWindowController and NSViewControllers to handle menu actions, not NSArrayController. Those objects can be added to the responder chain so

Time Machine Helpers

2008-06-19 Thread Omar Qazi
I want to enable my application to be able to display it's own interface when time machine opens, so that users can see what the data in the application looked like at that point in time, similar to the way applications like Mail and iPhoto display their interfaces in Time Machine. I did

Re: disable manual resizing of NSWindow

2008-06-19 Thread Sean McBride
On 6/18/08 3:40 PM, Uli Kusterer said: In a NSWindow, I'd like to disable manual resizing(don't allow user to drag the lower right corner to resize the window), only by clicking 'max' and 'restore' icons, possible? the reason is, I put a QuickTIme's movieview in the window and the preserving

Re: NSData text representation

2008-06-19 Thread Andreas Monitzer
On Jun 19, 2008, at 20:50, Trygve Inda wrote: In my plist (xml1 format) I see something like: data +/YgByAMQo78MBADoA /data However when I send a [myNSData description] I get something like: 4705 78da8d53 cb4ac340 146d1ea0 a0b8f133 5c09 How can I get something more like the first

Re: how to prevent sleep mode when app is running

2008-06-19 Thread Sean McBride
If you can require 10.5, then don't use UpdateSystemActivity(), instead, do this: IOPMAssertionID assertionID ; IOReturn err = IOPMAssertionCreate ( kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, assertionID); On 6/12/08 12:34 PM, Hank Heijink (Mailinglists) said: Look into

install_name_tool

2008-06-19 Thread Martin
Hi, I can't figure out how install_name_tool works. I've tried it with the simplest project ever: 1. I've created a blank Foo framework in Xcode 2. I've built it with the -headerpad_max_install_names linker flag (as man install_name_tool says) 3. I do this in the terminal : $ otool -L Foo

Re: install_name_tool

2008-06-19 Thread Kyle Sluder
On Thu, Jun 19, 2008 at 4:40 PM, Martin [EMAIL PROTECTED] wrote: And as you can see, nothing has changed and the first line has certainly not been replaced by bla. What am I doing wrong? Shouldn't you be using the -id flag, not -change? --Kyle Sluder

Re: Time Machine Helpers

2008-06-19 Thread Adam Leonard
Yup, it probably would be a useful thing in third part apps, but unfortunately there is no public API to do this. (There is a way to do this using private APIs that you could find online, but I would not recommend it and it is of course off topic to discuss here) If you want an API for

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Jean-Daniel Dupas
That's why you should basically never link on high-level framework with a setuid tools. Le 19 juin 08 à 20:48, Charles Steinman a écrit : This is in fact a Cocoa vulnerability, so it seems relevant to this list. All Cocoa applications automagically come with rudimentary AppleScript

Re: Problems with a Layer backed NSView in a NSScrollView

2008-06-19 Thread Gordon Apple
As I stated in my recent post, I implemented my own transform to flip the layer since nothing else worked. That worked, and my view is in a scrolling window. What I'm currently having trouble with is scaling the view. My window is similar to that in Sketch, with a popup scale factor in the

2 NSRuleEditor questions?

2008-06-19 Thread Laurent Cerveau
Hi Hi I have 2 questions related to NSRuleditor (not NSPRedicateEditor); - On one side, I can not find the format of a formattingDictionary for a NSRuleEditor. If I look at the doc the only thing I find is The formatting dictionary should have NSString keys and NSString values. The syntax

Re: install_name_tool

2008-06-19 Thread Jean-Daniel Dupas
Le 19 juin 08 à 23:02, Kyle Sluder a écrit : On Thu, Jun 19, 2008 at 4:40 PM, Martin [EMAIL PROTECTED] wrote: And as you can see, nothing has changed and the first line has certainly not been replaced by bla. What am I doing wrong? Shouldn't you be using the -id flag, not -change?

Class Browser and Code Sense not fully working

2008-06-19 Thread Joan Lluch (casa)
Since I upgraded to XCode 3.0 the Class Browser is not longer showing frameworks methods, and also code sense is only showing methods from my own project. I am not able to figure out what setting I should change to remedy this. I have XCode 2.5 installed alongside 3.0 and it does not have

Re: NSData text representation

2008-06-19 Thread Adam Leonard
+[NSPropertyListSerialization dataFromPropertyList:format:errorDescription:] should do what you want too in Cocoa. Adam Leonard On Jun 19, 2008, at 1:15 PM, Andreas Monitzer wrote: On Jun 19, 2008, at 20:50, Trygve Inda wrote: In my plist (xml1 format) I see something like: data

Re: install_name_tool

2008-06-19 Thread Laurent Cerveau
On Jun 19, 2008, at 11:02 PM, Kyle Sluder wrote: On Thu, Jun 19, 2008 at 4:40 PM, Martin [EMAIL PROTECTED] wrote: And as you can see, nothing has changed and the first line has certainly not been replaced by bla. What am I doing wrong? Shouldn't you be using the -id flag, not -change?

Re: NSNumberFormatterPercentStyle flakiness

2008-06-19 Thread Deborah Goldsmith
Please write a bug. Thanks, Deborah Goldsmith Apple Inc. [EMAIL PROTECTED] On Jun 15, 2008, at 5:22 AM, Aron Nopanen wrote: Hi, I've noticed some odd behavior with NSNumberFormatterPercentStyle in NSNumberFormatter (on Leopard 10.5.3). Attempting to translate an invalid string to a

Help debugging why NSOutlineView stops updating

2008-06-19 Thread Godfrey van der Linden
This is a resend of the previous email with a more accurate title and better organised detail. This bug is blowing my mind as the behaviour is not deterministic. I have three outline views that are contained in 2 different NSViewControlled sub-xibs which get loaded into the a place holder

Re: NSReponder chain and controllers

2008-06-19 Thread Robert Douglas
Thanks for the reminder about NSViewController. I make heavy use of the NSArrayController methods but I suppose I can move most of my code over simply by using an outlet and changing self to myArrayController. But having two controllers simply to handle menu actions still doesn't

Re: 2 NSRuleEditor questions?

2008-06-19 Thread Laurent Cerveau
Hi Peter The formatting dictionary is used for localization. You can see a sample at http://homepage.mac.com/gershwin/NibBasedSpotlightSearcher.zip Nice! Thanks for the pointer. A nil formatting dictionary should be fine. The delegate methods are probably not being called because

Save animation to QuickTime movie?

2008-06-19 Thread Yung-Luen Lan
Hi, I want to make some slideshow program for myself which display photos with transition effect and extra text information on it, and save the slideshow into QuickTime movie. 1. Is Core Image the correct technology to use? I mean that I don't want to rewrite the common transition effect

PDFKit guidance

2008-06-19 Thread Torsten Curdt
I have been browsing through PDFKit examples and documentation. But it seems most things are about showing PDFs, searching them or annotating them. I would like to convert a PDF of any size so it fits to A4/Letter. I would also like to reduce it to gray scale. This all without displaying

Re: PDFKit guidance

2008-06-19 Thread John Calhoun
On Jun 19, 2008, at 4:35 PM, Torsten Curdt wrote: I would like to convert a PDF of any size so it fits to A4/Letter. I would also like to reduce it to gray scale. This all without displaying anything. PDFKit gives you -[PDFPage setBounds:forBox] which would easily give you A4/Letter size

Re: PDFKit guidance

2008-06-19 Thread Joel Norvell
Torsten, These aren't really PDFKit issues. PDF is a native Quartz data type. The issues you mentioned, scaling and color, are addressed in the Cocoa Drawing Guide. You probably want to use an Affine Transform for scaling. I'm not sure about how to go grayscale, but looks like NSColorSpace

Re: CFWriteStreamWrite Blocking if we give invalid Host.

2008-06-19 Thread Jens Alfke
Looks like you're using the stream in synchronous mode, since you haven't added it to a runloop. In that case, I'm pretty sure that the DNS lookup and socket opening are done synchronously, too. That explains the delay you're seeing. The -1 return value only indicates that the socket's

Re: Trying to get hang of PDO

2008-06-19 Thread Jens Alfke
On 18 Jun '08, at 12:31 PM, Waldo Lee Sharvey wrote: I'm getting SIGBUS errors when my [connection rootProxy] is called. That doesn't tell us much without a backtrace. If the crash is in objc_msgsend (or a similarly-named function) then the bug is almost certainly that you're calling an

Re: File System Notifications

2008-06-19 Thread Jens Alfke
On 17 Jun '08, at 7:04 PM, Omar Qazi wrote: can I use those to get a notification when another application opens a file? If not is there any way I can achieve this? No. You can't get notifications with that fine a granularity, because if the OS sent them, everything would slow to a crawl

Re: Add item to NSSavePanel sidebar

2008-06-19 Thread Omar Qazi
On Jun 19, 2008, at 7:57 AM, Fedor Larin wrote: I need to allow user to save some data to a file or a recordable cd ( dvd ), using NSSavePanel. Is it possible to programmatically add an icon representing recordable media to NSSavePanel's sidebar? Writing will be performed on-fly, so

Re: PDFKit guidance

2008-06-19 Thread Joel Norvell
Torsten, John Calhoun wrote: So, PDF Kit can I think do what you want. I stand corrected! But (to salvage a little face :-) you can't go wrong by reading the Cocoa Drawing Guide. Joel ___ Cocoa-dev mailing list

Re: Add item to NSSavePanel sidebar

2008-06-19 Thread Jens Alfke
On 19 Jun '08, at 6:22 PM, Omar Qazi wrote: The finder has to save the sidebar state to disk somewhere. I image that it would be possible to read that file and change the place where it mentions all the items in the sidebar to include your directory. The Open/Save panels are not part of

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Andrew Farmer
On 19 Jun 08, at 07:22, Jerry LeVan wrote: Last night while browsing Slashdot I found this: http://it.slashdot.org/it/08/06/18/1919224.shtml It gives a simple command that can be used to basically execute code as root. osascript -e 'tell app ARDAgent to do shell script whoami' The above will

Re: NSReponder chain and controllers

2008-06-19 Thread Graham Cox
Sometimes dispatching from First Responder to some other object is necessary. But there is an easy way to do it other than capturing each individual message and forwarding it - just use invocation forwarding which will do that automatically. http://www.cocoadev.com/index.pl?NSInvocation

NSTableView DataSource Problem

2008-06-19 Thread Alex Wait
First time doing this on my own. I have the classic AppController class. I set the datasource and the delegate to be AppController for my dataSource. I have a NSTableView* to the table that I also set in Interface Builder. I have the methods below. listOfItems is a NSMutableArray with some

Re: Add item to NSSavePanel sidebar

2008-06-19 Thread Omar Qazi
On Jun 19, 2008, at 6:36 PM, Jens Alfke wrote: (b) there's no way to get NSSavePanel in your own process to notice the file's changed, since you don't want to kill yourself... Good point. Omar Qazi Hello, Galaxy! 1.310.294.1593 smime.p7s Description: S/MIME cryptographic signature

Re: NSTableView DataSource Problem

2008-06-19 Thread Cemil Browne
Alex, I believe your problem may lie in: -(id) table: (NSTableView*)tv objectValueForTableColumn:(NSTableColumn*)tableColumn row:(int) row is not an implementation of tableView:objectValueForTableColumn:row: - note you name it table rather than tableView I could

Race in Apple's NSTreeContoller/NSOutlineView

2008-06-19 Thread Godfrey van der Linden
Ok, this bug is thread related. I suspected that this was the case earlier since the problem is non-deterministic. Now I'm pretty sure. The bug I have specified below DOES NOT OCCUR on a powerbook. Now combining non-determinism with only occurring on an iMac CoreDuo. I'm not much of a

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Jens Alfke
It might not be a bad idea to proactively disarm this vulnerability on your own machine(s), as I just did: sudo chmod -s System/Library/CoreServices/RemoteManagement/ ARDAgent.app/ARDAgent That turns off the setuid bit. I'm sure that'll break Remote Desktop functionality, but that's

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Ken Thomases
On Jun 19, 2008, at 10:39 PM, Jens Alfke wrote: It might not be a bad idea to proactively disarm this vulnerability on your own machine(s), as I just did: sudo chmod -s System/Library/CoreServices/RemoteManagement/ ARDAgent.app/ARDAgent That's sudo chmod -s

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Jerry LeVan
On Jun 19, 2008, at 11:39 PM, Jens Alfke wrote: It might not be a bad idea to proactively disarm this vulnerability on your own machine(s), as I just did: sudo chmod -s System/Library/CoreServices/RemoteManagement/ ARDAgent.app/ARDAgent That turns off the setuid bit. I'm sure that'll

Re: Race in Apple's NSTreeContoller/NSOutlineView

2008-06-19 Thread Conrad Taylor
Hi Godfrey, could you simply file a bug report at bugreport.apple.com? -Conrad Sent from my iPhone On Jun 19, 2008, at 7:49 PM, Godfrey van der Linden [EMAIL PROTECTED] wrote: Ok, this bug is thread related. I suspected that this was the case earlier since the problem is

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Derek Chesterfield
On 20 Jun 2008, at 05:10, Jerry LeVan wrote: On Jun 19, 2008, at 11:39 PM, Jens Alfke wrote: It might not be a bad idea to proactively disarm this vulnerability on your own machine(s), as I just did: sudo chmod -s System/Library/CoreServices/RemoteManagement/ ARDAgent.app/ARDAgent

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Dave Carrigan
On Jun 19, 2008, at 9:10 PM, Jerry LeVan wrote: I removed my user name from the allow access from only these users and the hack quit working... I added myself back in and turned on all of the options and the hack still does not work... Apparently, the attack only works if Remote

Re: Problems with a Layer backed NSView in a NSScrollView

2008-06-19 Thread Brian Christensen
On Jun 19, 2008, at 5:14 , Gordon Apple wrote: I've tried a variety of things including regenerating the CALayers, but so far haven't been able to get the layers to scale to the coordinates of the underlying view. Again, I'll probably figure it out eventually, but this stuff just shouldn't