RE: interact with users in a background app

2008-12-08 Thread BirdSong
yep> Date: Mon, 8 Dec 2008 02:56:59 -0500> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> Subject: Re: interact with users in a background app> CC: cocoa-dev@lists.apple.com> > On Mon, Dec 8, 2008 at 2:14 AM, BirdSong <[EMAIL PROTECTED]> wrote:>> Hi all,I want to add a window to a background a

Re: Access to this item is restricted?

2008-12-08 Thread Kyle Sluder
On Sun, Dec 7, 2008 at 9:16 AM, Robert Nicholson <[EMAIL PROTECTED]> wrote: > Is there a way to correct that? Have you tried Get Info on the items in Keychain Access.app? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Fixed width of left pane in NSSplitView

2008-12-08 Thread Jushin
I would like to have fixed with of the left pane in NSSplitView when I resize the window, and I found this code from google search. http://www.cocoabuilder.com/archive/message/cocoa/2008/3/28/202614 It says, === Your split view delegate should implement the following method: -(void)splitView:(NS

RE: interact with users in a background app

2008-12-08 Thread BirdSong
you can simply create a cocoa application, add a item in the Info.plist which the key is "Application Background Only", value is YES. Then add some textField, colorWell (or any other editable control )on the window in nib. you will find the reaction is not what you want...> Date: Mon, 8 Dec 200

Re: Fixed width of left pane in NSSplitView

2008-12-08 Thread Benjamin Dobson
On 8 Dec 2008, at 08:03:51, Jushin wrote: However, I have no idea how to do this. Should I create a subclass of NSSplitView? No. Just wire up a different object as the delegate for your split view. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

NSArrayController, NSPopupMenu, defaults and arrangedObjects

2008-12-08 Thread Steven Hamilton
Hi folks, I've got a single NSPopupButton. The content is bound to an NSArrayController arrangedObjects and value bound an attribute. All good. THe ArrayController is sourcing a Core Data store for its array and this is all good too. The problem is when the window is loaded the NSPopupButt

Re: Fixed width of left pane in NSSplitView

2008-12-08 Thread Jushin
Could you tell me more in detail? It makes me more confusing :( Sorry for novice question. On Mon, Dec 8, 2008 at 3:29 AM, Benjamin Dobson <[EMAIL PROTECTED]> wrote: > > On 8 Dec 2008, at 08:03:51, Jushin wrote: > >> However, I have no idea how to do this. Should I create a subclass of >> NSSplitV

Re: Fixed width of left pane in NSSplitView

2008-12-08 Thread Brandon Walkin
Feel free to use the -splitView:resizeSubviewsWithOldSize: delegate method implementation from this class: http://www.bitbucket.org/bwalkin/bwtoolkit/src/tip/BWAnchoredButtonBar.m It keeps all views except the right most view at a constant width when the window is resized. To incorporate th

Re: Unit Testing Frameworks

2008-12-08 Thread Chris Hanson
On Dec 7, 2008, at 8:11 PM, Thaddeus Cooper wrote: Now that that's fixed I'm trying to get debugging of the framework working and I keep getting a launch path not accessible error. I added the executable target and set the arguments to -SenTest All Section Tests.octest This will be interp

Re: NSKeyedArchiver XML output?

2008-12-08 Thread Stephen J. Butler
On Mon, Dec 8, 2008 at 3:44 AM, Devraj Mukherjee <[EMAIL PROTECTED]> wrote: > I am trying to get an sample project that demos NSKeyedArchiver to > write in the XML format, > > All I can see is a call to a message > [NSKeyedArchiver archiveRootObject: rootObject toFile: path]; > > how do I instruct

Re: Monitor Magic packet(wake on lan packet )

2008-12-08 Thread Andrew Farmer
On 08 Dec 08, at 02:55, sheen mac wrote: In my app,I want to monitor the magic packet . Where I will get more info about this. Could give some link for this?. http://en.wikipedia.org/wiki/Wake-on-LAN I found a command tcpdump, Could I use this for wol packet monitoring? Not very well... the

Re: How to use NSWorkspace?

2008-12-08 Thread Rob Keniger
On 08/12/2008, at 8:59 PM, Mike Abdullah wrote: You probably don't want to use NSWorkspace to do this. You should use NSTask to run command line tools. I'm pretty certain he's doing the reverse. Wants to launch a proper application FROM a command-line tool. Yeah, you're right, sorry a

NSKeyedArchiver XML output?

2008-12-08 Thread Devraj Mukherjee
Hi all, I am trying to get an sample project that demos NSKeyedArchiver to write in the XML format, All I can see is a call to a message [NSKeyedArchiver archiveRootObject: rootObject toFile: path]; how do I instruct NSKeyedArchiver to write in its XML format? -- "I never look back darling, it

Re: PackageMaker installing into /Applications or ~/Applications depending on admin or not?

2008-12-08 Thread Stéphane Sudre
On Dec 8, 2008, at 6:48 AM, Chris Markle wrote: We have an installer for our current app that use Vise. We'd like to switch maybe to PackageMaker and its artifacts. One thing that the Vise-created install does is get installed to /Applications if you're and admin and to ~/Applications if you're

Re: NSKeyedArchiver XML output?

2008-12-08 Thread Graham Cox
On 8 Dec 2008, at 8:44 pm, Devraj Mukherjee wrote: Hi all, I am trying to get an sample project that demos NSKeyedArchiver to write in the XML format, All I can see is a call to a message [NSKeyedArchiver archiveRootObject: rootObject toFile: path]; how do I instruct NSKeyedArchiver to write

Re: How to use NSWorkspace?

2008-12-08 Thread Mike Abdullah
On 8 Dec 2008, at 00:45, Rob Keniger wrote: On 08/12/2008, at 10:07 AM, John Velman wrote: I want to use NSWorkspace to open an application from a command line Foundation Tool. You probably don't want to use NSWorkspace to do this. You should use NSTask to run command line tools. I'

Re: NSArrayController, NSPopupMenu, defaults and arrangedObjects

2008-12-08 Thread Steven Hamilton
Hi folks, I've got a single NSPopupButton. The content is bound to an NSArrayController arrangedObjects and value bound an attribute. All good. THe ArrayController is sourcing a Core Data store for its array and this is all good too. The problem is when the window is loaded the NSPopupButton is sh

Re: NSKeyedArchiver XML output?

2008-12-08 Thread Graham Cox
On 8 Dec 2008, at 9:24 pm, Devraj Mukherjee wrote: I assume that the NSMutableData Object *data would have the XML content. What do I need to do to get the XMLString out of that? To write it to a file, just use NSData's -writeToFile:atomically: method. If you want to convert the NSData b

Monitor Magic packet(wake on lan packet )

2008-12-08 Thread sheen mac
Hi All, In my app,I want to monitor the magic packet . Where I will get more info about this. Could give some link for this?.I found a command tcpdump, Could I use this for wol packet monitoring?. Thanks In Advance, Sheen ___ Cocoa-dev mailin

Re: Monitor Magic packet(wake on lan packet )

2008-12-08 Thread Jason Stephenson
sheen mac wrote: In my app,I want to monitor the magic packet . Where I will get more info about this. Could give some link for this?.I found a command tcpdump, Could I use this for wol packet monitoring?. As Andrew Farmer pointed out, you don't typically monitor for the magic packet, since

Re: how to manage two nib files

2008-12-08 Thread XiaoGang Li
Thanks. I have read these references, but I still have no idea about my issue, Maybe I did not understand them completely now, but I am worried that maybe I have not give a clear expression in my first email. Maybe I need give a more detailed description: this application is a utility f

Animation proxies and Python

2008-12-08 Thread Mani Ghasemlou
Hello list, I've been unsuccessfully trying to use an animation proxy for an NSWindow instance using Python: For example: def fadeOut(self, window): window.animator().setAlphaValue_(0.0) causes my application to crash. Bypassing the proxy, however works: def fadeOut(self, wind

Re: how to manage two nib files

2008-12-08 Thread jmunson
Not knowing why you need an apple event...here's my two cents (and boff on those who don't like my "feelings"): 1. find your printer (it is obviously installed, yes?) - you should know how to locate that in the Mac's resources. (get a list of installed printers/devices, etc.) 2. you shoul

What does 'DO' mean?

2008-12-08 Thread mark
What does 'DO' stand for? Mark ___ 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.com Help/Unsubscribe/Update your Subs

NSFilesPromisePboardType with copy/paste

2008-12-08 Thread Ling Li
I searched the archives and saw quite a lot discussion about NSFilesPromisePboardType with DnD. In my code the DnD part also works well. I also tried to implement NSFilesPromisePboardType for copy/paste, but never work. So my question is, after I put something into pasteboard, how can I get not

iPhone Orientation

2008-12-08 Thread Bruce Martin
I'm not sure this is the right list but a search in the Archives returned no results for this question so that makes this question a simple one, or maybe no one else has had an issue with it. I am trying to get notifications that the orientation of the iPhone has changed, if it changed then I

Printing File to PDF from Native Application

2008-12-08 Thread Jeff
Hello all, Long time listener, first time poster... I'm currently working on an app which needs to open files in their native application, print to a PDF (temp file) and then load the PDF and programmatically manipulate it. The main issue I am having is finding the correct API for impleme

Re: Cleanup inside a failed init method

2008-12-08 Thread John Engelhart
On Sat, Dec 6, 2008 at 4:07 PM, Ken Tozier <[EMAIL PROTECTED]> wrote: > Hi > > I'm writing my own socket class using a bunch of BSD functions and am a > little unclear on exactly what I should be doing to insure everything is > cleaned up if any of the low level functions fail. If I return nil from

Shell tool with GUI

2008-12-08 Thread Chris Hiszpanski
Hello, I'm trying to write a very simple oscilloscope in Cocoa as a shell tool that continuously reads samples via standard input and draws them as a waveform in a window. I do _not_ want a menu bar (i.e. an application), just one window that disappears when the parent shell tool receives

Re: PackageMaker installing into /Applications or ~/Applications depending on admin or not?

2008-12-08 Thread Michael Ash
On Mon, Dec 8, 2008 at 12:48 AM, Chris Markle <[EMAIL PROTECTED]> wrote: > We have an installer for our current app that use Vise. We'd like to > switch maybe to PackageMaker and its artifacts. One thing that the > Vise-created install does is get installed to /Applications if you're > and admin an

Re: What does 'DO' mean?

2008-12-08 Thread Dave DeLong
Usually "Distributed Object". Cheers, Dave On Dec 5, 2008, at 3:31 PM, mark wrote: What does 'DO' stand for? Mark ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: What does 'DO' mean?

2008-12-08 Thread Keary Suska
On Dec 5, 2008, at 3:31 PM, mark wrote: What does 'DO' stand for? Probably "Distributed Objects". Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: What does 'DO' mean?

2008-12-08 Thread Alexander Spohr
Distributed Objects atze Am 05.12.2008 um 23:31 schrieb mark: What does 'DO' stand for? Mark ___ 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: What does 'DO' mean?

2008-12-08 Thread jmunson
Distributed Objects Quoting mark <[EMAIL PROTECTED]>: What does 'DO' stand for? Mark ___ 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-adm

Re: iPhone Orientation

2008-12-08 Thread Dave DeLong
UIViewController has methods that are called to notify that the iPhone will, is, or has rotated: - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation - (void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientationduration: (NST

Re: iPhone Orientation

2008-12-08 Thread Luke Hiesterman
The UIKit changes orientation for you if you respond YES to shouldAutoRotateToOrientation which is part of UIViewController. Luke Sent from my iPhone. On Dec 6, 2008, at 9:19 AM, Bruce Martin <[EMAIL PROTECTED]> wrote: I'm not sure this is the right list but a search in the Archives return

Re: One-way communication from NSPanel in MainMenu.xib to Custom View

2008-12-08 Thread Keary Suska
On Dec 7, 2008, at 8:05 PM, Gordon Hughes wrote: I've been pulling my hair out over this for a few days now. I know I'm not understanding something quite elementary, so I'd greatly appreciate any insights offered. I'm attempting to write a "game show"-like application. My laptop would di

Re: iPhone Orientation

2008-12-08 Thread Roland King
have you looked at UIViewController at all? That's the generally recommended (in the documentation) way of controlling views and has all the methods required for telling you when orientations change, allowing you to say you do or do not want an orientation change and poking your view when i

Re: Cocoa-dev Digest, Vol 5, Issue 2097

2008-12-08 Thread Karl Moskowski
On 8-Dec-08, at 10:31 AM, mark <[EMAIL PROTECTED]> wrote: What does 'DO' stand for? In the context of Cocoa progamming, probably Distributed Objects. Karl Moskowski <[EMAIL PROTECTED]> Voodoo

Re: iPhone Orientation

2008-12-08 Thread I. Savant
On Sat, Dec 6, 2008 at 12:19 PM, Bruce Martin <[EMAIL PROTECTED]> wrote: > I'm not sure this is the right list but a search in the Archives returned no > results for this question so that makes this question a simple one, or maybe > no one else has had an issue with it. The best place for detail

Re: Shell tool with GUI

2008-12-08 Thread I. Savant
On Mon, Dec 8, 2008 at 12:57 AM, Chris Hiszpanski <[EMAIL PROTECTED]> wrote: > I'm trying to write a very simple oscilloscope in Cocoa as a shell tool that > continuously reads samples via standard input and draws them as a waveform > in a window. I do _not_ want a menu bar (i.e. an application),

Re: Shell tool with GUI

2008-12-08 Thread Nick Zitzmann
On Dec 7, 2008, at 10:57 PM, Chris Hiszpanski wrote: - How can I create a window without creating a full fledge application (i.e. without creating an instance of NSApplication)? While not technically supported, you can use anything in the AppKit after calling NSApplicationLoad() once. -

Re: Shell tool with GUI

2008-12-08 Thread I. Savant
On Mon, Dec 8, 2008 at 11:13 AM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > On Dec 7, 2008, at 10:57 PM, Chris Hiszpanski wrote: > >> - How can I create a window without creating a full fledge application >> (i.e. without creating an instance of NSApplication)? > > While not technically supported

Re: iPhone Orientation

2008-12-08 Thread Ricky Sharp
On Dec 8, 2008, at 9:58 AM, I. Savant wrote: On Sat, Dec 6, 2008 at 12:19 PM, Bruce Martin <[EMAIL PROTECTED]> wrote: I'm not sure this is the right list but a search in the Archives returned no results for this question so that makes this question a simple one, or maybe no one else has ha

Re: Shell tool with GUI

2008-12-08 Thread jmunson
Not to mention that the menu occupies an extremely small amount of screen real estate... Quoting "I. Savant" <[EMAIL PROTECTED]>: On Mon, Dec 8, 2008 at 11:13 AM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: On Dec 7, 2008, at 10:57 PM, Chris Hiszpanski wrote: - How can I create a window with

Sheet opens but not attached to window

2008-12-08 Thread Mike Chambers
I am trying to create a custom sheet for my application. The sheet is contained in a separate nib named "CalendarSheet", and has a class called CalendarSheetController set as its File Owner. (The class is below). I open the sheet like so: [calendarSheet showSheet:mainWindow]; Where mainWindow i

Re: Shell tool with GUI

2008-12-08 Thread I. Savant
On Mon, Dec 8, 2008 at 11:35 AM, <[EMAIL PROTECTED]> wrote: > Not to mention that the menu occupies an extremely small amount of screen > real estate... An interesting thought - maybe the OP is interested in a full-screen display? The "path of least resistance" here is still to create a "Cocoa

Re: Changing key behaviors for NSTableView

2008-12-08 Thread Corbin Dunn
Le Dec 5, 2008 à 10:12 PM, Steven W Riggins a écrit : I have written a simple application with a table view. I want the table to edit a cell when I press return. I could not find a way to do this other than subclassing and overriding keyDown. Did I miss a more elegant solution? This sho

NSArray represented in 2 different views at same time

2008-12-08 Thread Alexander Cohen
Hi, I've got a list of objects in an NSArray and i'm currently managing them with an NSArrayController and a view that is binded to it. Now i need to be able to show that same view in a new window with the same content but with possibly different selections and sort descriptors. I also ne

Re: Shell tool with GUI

2008-12-08 Thread douglas welton
Hi Chris, Not having a menu and not being an "application" are not the same thing. If you don't want to have a menu around, simply hide it using the available mechanisms (e.g., [NSMenu setMenuBarVisible: NO] or kiosk mode) and create a window to cover the entire screen. IMHO, you'll be

Re: NSArray represented in 2 different views at same time

2008-12-08 Thread I. Savant
On Mon, Dec 8, 2008 at 11:58 AM, Alexander Cohen <[EMAIL PROTECTED]> wrote: > I've got a list of objects in an NSArray and i'm currently managing them > with an NSArrayController and a view that is binded to it. Now i need to be > able to show that same view in a new window with the same content b

Re: Shell tool with GUI

2008-12-08 Thread Philip Ershler
On Dec 7, 2008, at 10:57 PM, Chris Hiszpanski wrote: Hello, I'm trying to write a very simple oscilloscope in Cocoa as a shell tool that continuously reads samples via standard input and draws them as a waveform in a window. I do _not_ want a menu bar (i.e. an application), just one wind

Re: Shell tool with GUI

2008-12-08 Thread Michael Ash
On Mon, Dec 8, 2008 at 12:57 AM, Chris Hiszpanski <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to write a very simple oscilloscope in Cocoa as a shell tool that > continuously reads samples via standard input and draws them as a waveform > in a window. I do _not_ want a menu bar (i.e. an appl

NSDictionary mutability test

2008-12-08 Thread [EMAIL PROTECTED]
There are a number of posts detailing with the ethics of the issue of determining an object's mutability. eg: http://www.cocoabuilder.com/archive/message/cocoa/2004/7/7/73 Does anyone have a current informed pragmatic opinion on how to deal with the following example? I am not trying to

Not getting KeyDown events (and other peculiar things)

2008-12-08 Thread Shayne Wissler
Hello, I'm writing something like a game engine using NSOpenGLView and am getting some odd behaviors (I am new to Cocoa): 1. Clicking on the title bar of my application does not activate my application, but clicking inside my window does. I can move the window around on the screen, but unlike all

Re: Sheet opens but not attached to window

2008-12-08 Thread Mike Abdullah
In IB, your window is probably set to be visible at launch. Turn that off as you are managing the visibility yourself. Mike. On 8 Dec 2008, at 16:44, Mike Chambers wrote: I am trying to create a custom sheet for my application. The sheet is contained in a separate nib named "CalendarSheet",

Re: NSDictionary mutability test

2008-12-08 Thread Mike Abdullah
On 8 Dec 2008, at 17:15, [EMAIL PROTECTED] wrote: There are a number of posts detailing with the ethics of the issue of determining an object's mutability. eg: http://www.cocoabuilder.com/archive/message/cocoa/2004/7/7/73 Does anyone have a current informed pragmatic opinion on how to dea

Re: NSDictionary mutability test

2008-12-08 Thread Charles Steinman
- Original Message > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > To: cocoa-dev@lists.apple.com > Sent: Monday, December 8, 2008 9:15:45 AM > Subject: NSDictionary mutability test > > There are a number of posts detailing with the ethics of the issue of > determining an object's muta

Re: NSDictionary mutability test

2008-12-08 Thread [EMAIL PROTECTED]
Thanks for the reply. I am aware of why the assertion is never applied but the thread I referenced was several years old and I was hoping that there had been some progress on this. Maybe not. I was using this assertion (written some time ago in ignorance) and wasted an afternoon tracking d

Re: NSArrayController, NSPopupMenu, defaults and arrangedObjects

2008-12-08 Thread Quincey Morris
On Dec 8, 2008, at 04:18, Steven Hamilton wrote: I have a custom NSWindowController called budgetController. Interface thus (cropped a bit) @interface MLBudgetController : NSWindowController { IBOutlet NSArrayController *incomeEnvelopeController; NSManagedObject *selectedInco

Re: NSDictionary mutability test

2008-12-08 Thread Devon Ferns
Instead of using exceptions, wouldn't -(BOOL)respondsToSelector:(SEL)aSelector work if you test for an NSMutableDictionary mutable method? Or does that not work with class clusters either(can't try it since I'm not at home) Devon [EMAIL PROTECTED] wrote: Thanks for the reply. I am aware of

Re: NSDictionary mutability test

2008-12-08 Thread Charles Steinman
- Original Message > From: Devon Ferns <[EMAIL PROTECTED]> > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > Cc: cocoa-dev@lists.apple.com > Sent: Monday, December 8, 2008 9:44:44 AM > Subject: Re: NSDictionary mutability test > > Instead of using exceptions, wouldn't -(BOOL)respondsToSele

Weird behavior of mouse location when performing a drag

2008-12-08 Thread Gustavo Pizano
Hello all. Well Im performing a drag-ndrop between views of the same app, I implemented the - (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender method, because I need to know the location of the mouse so I can place the image in the correct position of the view. But weirdly

Re: NSDictionary mutability test

2008-12-08 Thread Nick Zitzmann
On Dec 8, 2008, at 10:44 AM, Devon Ferns wrote: Instead of using exceptions, wouldn't -(BOOL)respondsToSelector: (SEL)aSelector work if you test for an NSMutableDictionary mutable method? Or does that not work with class clusters either(can't try it since I'm not at home) It does not work

best practice to create Custom Objects represented by a image in a d-n-d operation

2008-12-08 Thread Gustavo Pizano
Hello. I have in a view images of ships, and Im able to drag them to another view which is the sea board, now, what is better, to create the objects of the ships in the "shipsviewcontainer" and set the object in the Pasteboard, or, just have representative images in the "shipsviewcontaine

building a custom NSView with IB?

2008-12-08 Thread Bill Janssen
I'd like to build a custom view that is just an assemblage of an NSTextView, a couple of pushbuttons, and a checkbox. It seems to me that there should be some way to do this with IB, but I haven't figured it out yet. All the examples on the net seem to focus on overriding drawRect, which I *don't

Re: NSDictionary mutability test

2008-12-08 Thread Sherm Pendley
On Dec 8, 2008, at 12:38 PM, [EMAIL PROTECTED] wrote: I am aware of why the assertion is never applied but the thread I referenced was several years old and I was hoping that there had been some progress on this. Your use of the word "progress" implies that something is broken and needs t

Re: best practice to create Custom Objects represented by a image in a d-n-d operation

2008-12-08 Thread jmunson
Hopefully this will come across well... If each ship you are dragging is a visual representation of a ship object, then, your receiver needs to be able to accept that object. While I don't know much about how drag-n-drop works (haven't implemented it yet), I imagine that what you need to kn

Re: D.O. [NSPortCoder sendBeforeTime:sendReplyPort:] timed out

2008-12-08 Thread Jonathon Kuo
No, we were never able to find a fix or workaround for this. We're operating now on the assumption that it's an unfixable design flaw in DO. This makes for a very fragile client/server implementation. Jonathon On Dec 6, 2008, at 1:31 AM, Bridger Maxwell wrote: Hey, Did you ever figure out

Re: NSDictionary mutability test

2008-12-08 Thread I. Savant
On Mon, Dec 8, 2008 at 1:53 PM, Sherm Pendley <[EMAIL PROTECTED]> wrote: >> I was using this assertion (written some time ago in ignorance) and wasted >> an afternoon tracking down the fact that it didn't work. > > It does "work" - it does the job it's designed to do. I'll join the fray on this

NSFilesPromisePboardType with copy/paste

2008-12-08 Thread Ling Li
I searched the archives and saw quite a lot discussion about NSFilesPromisePboardType with DnD. In my code the DnD part also works well. I also tried to implement NSFilesPromisePboardType for copy/paste, but never work. So my question is, after I put something into pasteboard, how can I get not

Re: NSDictionary mutability test

2008-12-08 Thread [EMAIL PROTECTED]
On 8 Dec 2008, at 18:53, Sherm Pendley wrote: On Dec 8, 2008, at 12:38 PM, [EMAIL PROTECTED] wrote: I am aware of why the assertion is never applied but the thread I referenced was several years old and I was hoping that there had been some progress on this. Your use of the word "progres

Re: NSDictionary mutability test

2008-12-08 Thread Michael Ash
On Mon, Dec 8, 2008 at 12:29 PM, Charles Steinman <[EMAIL PROTECTED]> wrote: > This is explained in the thread you referenced. All NSDictionary objects are > instances of NSCFDictionary. Thus the only way to check if they are mutable > through public API is to try mutating them and see if Cocoa t

Re: NSDictionary mutability test

2008-12-08 Thread Jonathan Hess
On Dec 8, 2008, at 2:59 PM, Michael Ash wrote: On Mon, Dec 8, 2008 at 12:29 PM, Charles Steinman <[EMAIL PROTECTED]> wrote: This is explained in the thread you referenced. All NSDictionary objects are instances of NSCFDictionary. Thus the only way to check if they are mutable through public

Re: NSDictionary mutability test

2008-12-08 Thread Jonathan Hess
On Dec 8, 2008, at 2:05 PM, I. Savant wrote: On Mon, Dec 8, 2008 at 1:53 PM, Sherm Pendley <[EMAIL PROTECTED]> wrote: I was using this assertion (written some time ago in ignorance) and wasted an afternoon tracking down the fact that it didn't work. It does "work" - it does the job it's

Re: NSDictionary mutability test

2008-12-08 Thread [EMAIL PROTECTED]
On 8 Dec 2008, at 19:05, I. Savant wrote: I was using this assertion (written some time ago in ignorance) and wasted an afternoon tracking down the fact that it didn't work. It does "work" - it does the job it's designed to do. I'll join the fray on this one. :-) I agree with you, Sher

Re: NSDictionary mutability test

2008-12-08 Thread Sherm Pendley
On Dec 8, 2008, at 2:53 PM, [EMAIL PROTECTED] wrote: On 8 Dec 2008, at 18:53, Sherm Pendley wrote: No, the solution is to not try to test for mutability. Such tests don't work because they're not *supposed* to work - code that tries to do such things is broken as designed. And no, it's not

Re: NSDictionary mutability test

2008-12-08 Thread Gregory Weston
jonathan wrote: I am aware of why the assertion is never applied but the thread I referenced was several years old and I was hoping that there had been some progress on this. Maybe not. I was using this assertion (written some time ago in ignorance) and wasted an afternoon tracking down the fact

Re: NSDictionary mutability test

2008-12-08 Thread [EMAIL PROTECTED]
Thanks for the lateral insight. Ran a quick test and it looks as if the defective NSAssert([dict isKindOfClass:[NSMutableDictionary class]], @"dict is not mutable"); can be recomposed as NSAssert([dict classForCoder] == [NSMutableDictionary class], @"dict is not mutable"); The recompose

Re: building a custom NSView with IB?

2008-12-08 Thread Corbin Dunn
Le Dec 8, 2008 à 10:45 AM, Bill Janssen a écrit : I'd like to build a custom view that is just an assemblage of an NSTextView, a couple of pushbuttons, and a checkbox. It seems to me that there should be some way to do this with IB, but I haven't figured it out yet. All the examples on the

Re: NSDictionary mutability test

2008-12-08 Thread Bill Bumgarner
On Dec 8, 2008, at 11:53 AM, [EMAIL PROTECTED] wrote: I would disagree. I see nothing wrong with the logically necessity of testing for mutability. It's just a property. The AppKit and Foundation were designed with the decision to not allow for differentiation between mutable and immutable v

Drawing a string with a clearColor background

2008-12-08 Thread Randall Meadows
I know I've seen a discussion of this, but my search-fu is weak today, apparently. Please feel free to reply in links to the answer, if you wish... I'm trying to draw (in a view's -drawRect: method) a string over top an image background: NSDictionary *attrs = [NSDictionary dictionaryWi

Re: best practice to create Custom Objects represented by a image in a d-n-d operation

2008-12-08 Thread Sandeep Chayapathi
Go for option #1, use a "custom drag type" (in your case ships) to pasteboard. You could update the pasteboard with the array of dictionary objects, the dictionary could hold the image/link to image and an identifier field for the same. Make sure you register you drag destination for your custom d

Re: NSDictionary mutability test

2008-12-08 Thread [EMAIL PROTECTED]
On 8 Dec 2008, at 21:25, Bill Bumgarner wrote: On Dec 8, 2008, at 11:53 AM, [EMAIL PROTECTED] wrote: I would disagree. I see nothing wrong with the logically necessity of testing for mutability. It's just a property. The AppKit and Foundation were designed with the decision to not allow f

CocoaHeads: switzerland / zurich area

2008-12-08 Thread John Clayton
Hi All, Sorry to spam you non-europeans, but I'm sure you support the idea at least in concept anyway: I'm considering starting the Switzerland chapter of CocoaHeads - and would like to gauge interest of fellow Mac programmers in the greater Zurich / Rapperswil area. If you are in the a

Re: NSDictionary mutability test

2008-12-08 Thread Bill Bumgarner
On Dec 8, 2008, at 1:43 PM, [EMAIL PROTECTED] wrote: This decisions was purposeful, explicit, and intentional. I find this an interesting point. Why was such a decision made? It seems counter intuitive. Performance An NSMutableDictionary instance can be returned from a method declared as

Re: Core Data request predicates and to-many relationships

2008-12-08 Thread Melissa J. Turner
On Dec 6, 2008, at 01:45, Luke Evans wrote: If there are any NSPredicate gurus out there, I'm scratching my head on this one: I have an entity that can optionally have a set of attributes (name- value pairs). This is set up in the model as a optional to-many relationship to an attribute

Re: NSDictionary mutability test

2008-12-08 Thread Adam Leonard
The only thing you could consider "broken" is if the method promises an immutable object but gives you a mutable one (or vice-versa). I agree that it is definitely wrong to declare method as returning a mutable object, and actually returning a immutable object instead. But is it really true

Re: Drawing a string with a clearColor background

2008-12-08 Thread Rob Keniger
On 09/12/2008, at 7:31 AM, Randall Meadows wrote: NSDictionary *attrs = [NSDictionary dictionaryWithObjectsAndKeys: font, NSFontAttributeName, textColor, NSForegroundColorAttributeName, [NSColor clearColor], NSBackgroundColorAttributeName, nil]; [text drawI

NSTask

2008-12-08 Thread Filip van der Meeren
Good evening (for my region), I am currently working on a small project to manage the different builds of perl and its modules. Since it is such a hassle to find/ install PerlModules and newer builds of Perl itself. I am trying to retrieve all paths that perl uses to retrieve modules. I foun

Re: Shell tool with GUI

2008-12-08 Thread Rob Keniger
On 09/12/2008, at 3:06 AM, Michael Ash wrote: Can't be done. NSApplication is a prerequisite to creating windows with Cocoa. NSApplication is not incompatible with a shell tool as others have mentioned so you can simply do this *with* an instance of NSApplication, however I would like to point

Re: Weird behavior of mouse location when performing a drag

2008-12-08 Thread Rob Keniger
On 09/12/2008, at 3:56 AM, Gustavo Pizano wrote: Well Im performing a drag-ndrop between views of the same app, I implemented the - (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender method, because I need to know the location of the mouse so I can place the image in the corre

Re: NSDictionary mutability test

2008-12-08 Thread [EMAIL PROTECTED]
Thanks for the insight into this. Some subtle stuff here. On 8 Dec 2008, at 21:54, Bill Bumgarner wrote: On Dec 8, 2008, at 1:43 PM, [EMAIL PROTECTED] wrote: This decisions was purposeful, explicit, and intentional. I find this an interesting point. Why was such a decision made? It seems cou

Re: NSTask

2008-12-08 Thread Torsten Curdt
> I have tried to following: > > NSTask *task = [[[NSTask alloc] init] autorelease]; >[task setLaunchPath:@"/System/Library/Perl/5.8.8"]; >[task setArguments:[NSArray arrayWithObject:@"-v"]]; >[task launch]; >[task waitUntilExit]; You might want to point it to an ex

Re: NSTask

2008-12-08 Thread Darren Adkinson
Filip, the perl executable itself will be in somewhere like /usr/bin/perl (type 'which perl'). It looks like you'd need uppercase 'V' as the argument, I assume this was a typo. (no idea if the rest will work or not, I only scanned through your email...) darren On Dec 8, 2008, at 2:21 PM

Re: NSDictionary mutability test

2008-12-08 Thread Andy Lee
On Dec 8, 2008, at 5:15 PM, Adam Leonard wrote: But using NSDictionary as a placeholder for something that actually happens to be mutable seems fine to me if you don't want to have clients relying on the method's implementation using a mutable dictionary internally. I'm pretty sure I have

Re: NSTask

2008-12-08 Thread Filip van der Meeren
Ok, I did not type out the example as I should, but still, it fails. With an no permission exception. And I would love to execute the example with something like: [task setLaunchPath:@"perl"]; You never know what version is installed on the target computer... Filip van der Meeren [EMAIL PROTECT

Re: NSTask

2008-12-08 Thread Filip van der Meeren
I already replied to my typos. But still the exception is thrown every codesetup I use. Filip van der Meeren [EMAIL PROTECTED] http://www.sourceforge.net/projects/perlmanager On 08 Dec 2008, at 23:36, Darren Adkinson wrote: Filip, the perl executable itself will be in somewhere like /usr/bin/

Re: NSTask

2008-12-08 Thread Andrew Farmer
On 08 Dec 08, at 14:36, Darren Adkinson wrote: the perl executable itself will be in somewhere like /usr/bin/perl (type 'which perl'). It looks like you'd need uppercase 'V' as the argument... Or, better yet: [task setArguments:[NSArray arrayWithObjects: @"-e", @"print join $/, @INC", nil

Re: Core Data request predicates and to-many relationships

2008-12-08 Thread Luke Evans
Thanks for the reply Melissa - much appreciated. I was beginning to toy with the idea of trying a function expression (which I have used before for other purposes) to isolate an individual attribute object and perform the several comparisons therein. Presumably SUBQUERY, being designed for th

  1   2   >