Re: noob q: adding a button to a window programmatically

2008-06-10 Thread Graham Cox
You haven't set the button's frame size. If you use -initWithFrame: and pass something sensible that should work. Note - because NSButton subclasses NSView, the designated initializer for NSView (initWithFrame;) must be used. hth, Graham On 10 Jun 2008, at 3:28 pm, Stuart Malin wrote:

Re: noob q: adding a button to a window programmatically

2008-06-10 Thread Andrew Farmer
On 09 Jun 08, at 22:28, Stuart Malin wrote: Until now I have created my GUIs using IB. I want a better understanding of what goes on under the hood of instantiating a Nib, so decided to try adding a button to a window programmatically. I can't get the button to appear, and so presume I am

Detect editing a outline view cell

2008-06-10 Thread Ivan C Myrvold
I have been trying to find a solution to this for a long time: I want to have a action method to execute when I doubleclick in an NSOutlineView cell to start editing it. In an ordinary NSTextField delegate method textShouldBeginEditing, but that doesn't work for NSTextCell. Ivan

Re: Detect editing a outline view cell

2008-06-10 Thread Ivan C Myrvold
To answer my own question: Use the NSOutlineView delegate method outlineView:shouldEditTableColumn:item: Ivan Den 10. juni. 2008 kl. 08:11 skrev Ivan C Myrvold: I have been trying to find a solution to this for a long time: I want to have a action method to execute when I doubleclick in

Re: JNI trouble

2008-06-10 Thread Andrew Farmer
On 09 Jun 08, at 23:15, brien colwell wrote: hi all, I'm having some trouble compiling a JNI lib on Osx. I get the following Undefined synbols errors ... does anyone have a pointer? Very much appreciated! void *a_pointer = 0x90A4BCED; No, but seriously... cc -bundle

Re: Updating a progress bar from a code loop

2008-06-10 Thread j o a r
On Jun 9, 2008, at 11:24 PM, Graham Cox wrote: I have a lengthy routine that I'd like to show a progress bar for. The routine runs in a while() loop, and calls a delegate which implements the progress update. My progress window opens OK but nothing gets updated, though I know that it's

Re: Updating a progress bar from a code loop

2008-06-10 Thread Hamish Allan
On Tue, Jun 10, 2008 at 7:24 AM, Graham Cox [EMAIL PROTECTED] wrote: How do I give some time to the event loop while I'm running my own loop? See here for a recent discussion: http://www.cocoabuilder.com/archive/message/cocoa/2008/6/5/209308 Hamish

Spotlight sources w/o actual files?

2008-06-10 Thread Rasmus Andersson
I would like to create a Spotlight plugin that allows me to search among a very big set of data, located at a central server (i.e. not able to store it locally) Thus I need to query this central storage for matches whenever I search for something in Spotlight. (I/O latency is not an issue) What I

extracting output from AMWorkflow when using AMWorkflowController

2008-06-10 Thread Mark Munz
It appears that it is only possible to access the output of an AMWorkflow if you call runWorkflowAtURL:withInput:error:. If, as an alternative, I wanted to use AMWorkflowController, there doesn't appear to be a way to extract the output from the AMWorkflow after calling run from the controller.

Re: Spotlight sources w/o actual files?

2008-06-10 Thread Ken Ferry
Hi Rasmus, You do need to have one file per findable item, and you cannot get a callback at search time. You may not care about latency at search time, but Apple does. :-) If it helps at all, your files don't actually have to contain the data that you supply to the spotlight indexer. They can

Re: Spotlight sources w/o actual files?

2008-06-10 Thread Rasmus Andersson
Oh, just as I feared. The problem is the metadata itself is probably hundreds of gigabytes, if not terabytes in size, so it would be impossible to have mdimporter index fake files. Thank you anyway! Will probably look into Quicksilver then. Anyone got any good hints about where to find proper

failure to create NSStatusItem

2008-06-10 Thread Ben Willmore
Under what circumstances can [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] fail? The docs say statusItemWithLength: can return nil if it was not possible to create the NSStatusItem, but what might cause this to happen? Ben

Re: App hangs when displaying any sheet in 10.5 [SOLVED]

2008-06-10 Thread Michael Vannorsdel
Ah ok. I was bit by something similar a few years ago. I had forgotten to put the prototype in my class interface and believed the compiler was using a prototype from an unrelated class which had different arg and return types. But the twist was the missing prototype caused the default

Where are window prefs stored?

2008-06-10 Thread Ken Tozier
Hi My app opens several palettes and uses the following line to store the palette positions [[self window] setFrameAutosaveName: @palette name here]; I ran into a problem with the stored size and want to flush the old prefs and start over. Where are these types of prefs located and is

Re: Where are window prefs stored?

2008-06-10 Thread Matt Gough
10 Jun 2008, at 11:21, Ken Tozier wrote: Hi My app opens several palettes and uses the following line to store the palette positions [[self window] setFrameAutosaveName: @palette name here]; I ran into a problem with the stored size and want to flush the old prefs and start over. Where

from CFDataRef to NSString

2008-06-10 Thread Angelo Chen
Hi, What is the correct way to cast from CFDataRef to NSString, I have this code: CFDataRef data; NSString *messageString = [NSString stringWithCString:CFDataGetBytePtr(data)]; it always return this warning, any idea? warning:pointer targets in passing argument 1 of 'stringWithCString:'

Re: from CFDataRef to NSString

2008-06-10 Thread Michael Vannorsdel
Something like: messageString = [[NSString alloc] initWithData:(NSData*)data encoding:NSASCIIStringEncoding]; the encoding type will depend on what encoding you expect the data to be in. On Jun 10, 2008, at 4:08 AM, Angelo Chen wrote: What is the correct way to cast from CFDataRef to

checking application is document based application or not

2008-06-10 Thread Apparao Mulpuri
Hi List, I have applicaton name, path, pid. I want to find out, whether that application is document based application or not?. Is there any way to do this? Regards, - Apparao. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

warning: return makes pointer from integer without cast

2008-06-10 Thread Steven Hamilton
Hi folks, newbie here. A quickie query on a warning. Both returns in the following code give a 'warning: return makes pointer from integer without cast' - (id)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem: (id)item { if (!item) { return

Re: warning: return makes pointer from integer without cast

2008-06-10 Thread John Pannell
Hi Steven- Your method signature says the method returns an object (id), but your return values you give back are int. I think that may be where your code is making a pointer from an int without a cast. I'm guessing you are implementing this as an outlineView datasource... in this case,

Re: warning: return makes pointer from integer without cast

2008-06-10 Thread Jonathan del Strother
On Tue, Jun 10, 2008 at 1:32 PM, Steven Hamilton [EMAIL PROTECTED] wrote: Hi folks, newbie here. A quickie query on a warning. Both returns in the following code give a 'warning: return makes pointer from integer without cast' - (id)outlineView:(NSOutlineView *)outlineView

Re: warning: return makes pointer from integer without cast

2008-06-10 Thread Jason Coco
Hey Steve, In this case, you are returning a regular integer (count returns just a regular, scalar type). But you've declared your return value as id, which is a typedef for a type of pointer. You either have to return an actual integer, or wrap the return of count in an object like

adding a delegate to a class

2008-06-10 Thread Angelo Chen
Hi, I have a code like this: @interface BackgroundObj : NSObject { Controller *mc; } - (void) sayHi; @implementation BackgroundObj - (void) sayHi { [mc showText:@Hi]; } @end As you can see, the code is hard coded to use class Controller, can not be used with any other

RE: adding a delegate to a class

2008-06-10 Thread john darnell
Without knowing what exactly you are trying to achieve, it's hard to advise you, Angelo. Would a simple printf or one of its variants do for you? R, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angelo Chen Sent: Tuesday, June 10, 2008 8:11

Re: adding a delegate to a class

2008-06-10 Thread Jesse Armand
Hello Angelo, I think this code might help you: @protocol BackgroundObjDelegate NSObject @optional - (void)showText:(NSString*)text; @end @interface BackgroundObj : NSObject { idBackgroundObjDelegate _delegate; } @property(assign) idBackgroundObjDelegate delegate - (void) sayHi;

Re: Spotlight sources w/o actual files?

2008-06-10 Thread Stephen J. Butler
On Tue, Jun 10, 2008 at 3:07 AM, Rasmus Andersson [EMAIL PROTECTED] wrote: I would like to create a Spotlight plugin that allows me to search among a very big set of data, located at a central server (i.e. not able to store it locally) Thus I need to query this central storage for matches

Re: adding a delegate to a class

2008-06-10 Thread Erik Buck
See http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_4.html ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: 3rd Party Nonsense (was Re: Regular Expressions?)

2008-06-10 Thread Chris Ridd
On 10 Jun 2008, at 05:12, Mark Munz wrote: Just wishing for the problem to go away or blaming external criteria will almost guarantee that nothing gets done. Filing bugs is how you, the developer, communicate your needs to Apple. Since ICU is open source, the other productive thing to do

Re: Spotlight sources w/o actual files?

2008-06-10 Thread Rasmus Andersson
Thanks! That might work, but would add some awkward dependencies (i.e. the fusefs kernel module) Will investigate further. On Tue, Jun 10, 2008 at 4:00 PM, Stephen J. Butler [EMAIL PROTECTED] wrote: On Tue, Jun 10, 2008 at 3:07 AM, Rasmus Andersson [EMAIL PROTECTED] wrote: I would like to

Re: Spotlight sources w/o actual files?

2008-06-10 Thread matt . gough
On 10 Jun 2008, at 10:57, Rasmus Andersson wrote: Oh, just as I feared. The problem is the metadata itself is probably hundreds of gigabytes, if not terabytes in size, so it would be impossible to have mdimporter index fake files. One thing you could consider is to just create these fake

Building against 10.5 SDK, link error on open

2008-06-10 Thread Dale Jensen
I'm trying to get my project to build against the 10.5 SDK, but when I switch it from $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk to 10.5, I get a couple of errors: Undefined symbols: _open$UNIX2003, referenced from: _CreateEventForPath in editorBridge.o _close$UNIX2003, referenced from:

Re: crash on command-W

2008-06-10 Thread Adam R. Maxwell
On Jun 9, 2008, at 11:17 PM, James W. Walker wrote: On Jun 9, 2008, at 10:44 PM, Joseph Kelly wrote: Toggle the release when closed setting on the window nib? See the docs for -[NSWindow setReleasedWhenClosed:] Tried that, didn't seem to make any difference to the crash. (Right now I

Re: Binding NSMenuItem state in Document-based app

2008-06-10 Thread Steve Nicholson
On 2008 Jun, 09, at 12:57, Quincey Morris wrote: Doing this through bindings involves re-inventing a bit of stuff that NSResponder normally takes care of, but it need not be too difficult. For example, you could Or something like that. On Jun 9, 2008, at 3:04 PM, Jerry Krinock

Re: Building against 10.5 SDK, link error on open

2008-06-10 Thread Kevin Grant
It's possible the SDK has a problem, but first double-check everything you're using (and everything it depends on) to be sure it's built with consistent headers and libraries. If it's C++, the compiler version is also important. You may have to examine the list of environment variables printed

Re: Spotlight sources w/o actual files?

2008-06-10 Thread Rasmus Andersson
This is actually something I'm thinking of implementing. But still, it would only be semi-useful, since the service I intend to interface with is in many parts search-oriented. (Spotify, a music service) Maybe I will fork this little project into two separate, small projects: 1) Spotlight

changing locale

2008-06-10 Thread Alexander Cohen
Is there a way to change the locale from cocoa as if i was to go into System Preferences and change the language then the format? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Garbage collector vs variable lifetime

2008-06-10 Thread Charles Srstka
On Jun 9, 2008, at 1:39 PM, Chris Hanson wrote: It is perfectly legal to return an NSMutableArray from a hypothetical +(NSArray *)array method. However, all the sender of that +(NSArray *)array message can know is that the result can be treated as an NSArray. It can't know whether an

Re: 3rd Party Nonsense (was Re: Regular Expressions?)

2008-06-10 Thread Jens Alfke
On 9 Jun '08, at 10:38 PM, Michael Ash wrote: It's perfectly possible to write safe code that calls C str functions. My code is no more vulnerable than the next man's. You can call things like strnstr, pass the length of the NSData you're working on, and there is exactly zero risk of anything.

Re: Building against 10.5 SDK, link error on open

2008-06-10 Thread Dale Jensen
On Jun 10, 2008, at 10:04 AM, Kevin Grant wrote: You may have to examine the list of environment variables printed at build time, and the GCC command lines, to see the problem. For example, the -isysroot option may not be set correctly. I've attached the command lines at the end of this. It

Re: checking application is document based application or not

2008-06-10 Thread Jens Alfke
On 10 Jun '08, at 5:07 AM, Apparao Mulpuri wrote: I have applicaton name, path, pid. I want to find out, whether that application is document based application or not?. There isn't really any distinction. Document based application is just the name of a project template in Xcode that sets

Re: Garbage collector vs variable lifetime

2008-06-10 Thread Charles Srstka
On Jun 9, 2008, at 5:55 PM, Hamish Allan wrote: Sure. But it gives you *more* information than if it just returns id. I agree with you in all other respects of your post, but I don't agree that +[NSArray array] returns id because if it returned NSArray * you'd have to have a separate

Re: Building against 10.5 SDK, link error on open

2008-06-10 Thread Kevin Grant
You do have -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib in there. Check the list of environment variables (or add a script build phase that runs env first, if you don't see one) and try to fix the most generic variable that will affect all the others. Another thing to look at is the precompiled

Re: Building against 10.5 SDK, link error on open

2008-06-10 Thread Julien Jalon
The basic POSIX functions have changed a bit in Leopard (to achieve POSIX conformance). This means that POSIX libraries are different in 10.4 SDK vs. 10.5. You can not mix them. Also, if you change the SDK, it's generally a good idea to clean all your targets. -- Julien On Tue, Jun 10, 2008 at

Re: Building against 10.5 SDK, link error on open

2008-06-10 Thread Dale Jensen
On Jun 10, 2008, at 10:33 AM, Kevin Grant wrote: You do have -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib in there. Check the list of environment variables (or add a script build phase that runs env first, if you don't see one) and try to fix the most generic variable that will affect all the

NSSlider responding to superview's drawRect

2008-06-10 Thread Jonathan Dann
Hi All, This is something that I haven't seen before. I have a custom view that inherits from NSView directly and just draws a gradient background. In IB I've placed an NSSlider on the view which works fine. The problem comes when drawRect in my custom view is invoked, I draw the

Re: NSSlider responding to superview's drawRect

2008-06-10 Thread Andy Lee
Check the code that draws the 1-pixel line. It should be calculating coordinates of the line based on the view's bounds rectangle, not the rectangle that is passed to drawRect:. --Andy On Jun 10, 2008, at 11:51 AM, Jonathan Dann wrote: Hi All, This is something that I haven't seen

Re: NSSlider responding to superview's drawRect

2008-06-10 Thread Ken Ferry
You're probably filling your gradient into the rect passed in drawRect. That rectangle just represents the dirty part of your view. If you had a solid color to draw, you could just fill the rect, but with a gradient you will get your gradient, top to bottom, within this possibly small rect

Re: Garbage collector vs variable lifetime

2008-06-10 Thread Adam R. Maxwell
On Tuesday, June 10, 2008, at 08:29AM, Charles Srstka [EMAIL PROTECTED] wrote: On Jun 9, 2008, at 5:55 PM, Hamish Allan wrote: Sure. But it gives you *more* information than if it just returns id. I agree with you in all other respects of your post, but I don't agree that +[NSArray array]

Selectable NSTextFieldCell and NSTextField break attributed strings when selected

2008-06-10 Thread Dalzhim Dalzhim
Hello! this is my first time posting on this mailing list so I hope I do not forget to provide any necessary details! I've been searching around for a long while to fix this problem I am having and I have yet to find a solution or an explanation. I have a NSWindow with a few NSTextField

Re: 3rd Party Nonsense (was Re: Regular Expressions?)

2008-06-10 Thread Michael Ash
On Tue, Jun 10, 2008 at 8:20 AM, Jens Alfke [EMAIL PROTECTED] wrote: On 9 Jun '08, at 10:38 PM, Michael Ash wrote: It's perfectly possible to write safe code that calls C str functions. My code is no more vulnerable than the next man's. You can call things like strnstr, pass the length of

Re: Updating a progress bar from a code loop

2008-06-10 Thread Michael Ash
On Tue, Jun 10, 2008 at 3:17 AM, Graham Cox [EMAIL PROTECTED] wrote: Thanks for the suggestions - basically I have to run my loop on a thread, seems to be what you're both saying. In this case I can do that... though out of curiosity I wonder if there is a way to do this cooperatively on the

Re: Updating a progress bar from a code loop

2008-06-10 Thread Quincey Morris
On Jun 10, 2008, at 03:17, Graham Cox wrote: In this case I can do that... though out of curiosity I wonder if there is a way to do this cooperatively on the main thread without having to break up the loop doing the actual work. For example, in Carbon one can run the event loop for a

Re: crash on command-W

2008-06-10 Thread Vijay Malhan
On Tue, Jun 10, 2008 at 7:54 PM, Adam R. Maxwell [EMAIL PROTECTED] wrote: On Jun 9, 2008, at 11:17 PM, James W. Walker wrote: On Jun 9, 2008, at 10:44 PM, Joseph Kelly wrote: Toggle the release when closed setting on the window nib? See the docs for -[NSWindow setReleasedWhenClosed:]

Re: NSSlider responding to superview's drawRect

2008-06-10 Thread Jonathan Dann
On 10 Jun 2008, at 17:05, Ken Ferry wrote: You're probably filling your gradient into the rect passed in drawRect. That rectangle just represents the dirty part of your view. If you had a solid color to draw, you could just fill the rect, but with a gradient you will get your gradient,

Tooltip and 10.4.11. Bug?

2008-06-10 Thread Stephane Sudre
Is there a known bug in Mac OS X 10.4.11 when it comes to tooltips attached to a NSTableView rows? I'm seeing tool tips being cut off when the mouse is over a row and a medium length string should be displayed in the tool tip. ___ Cocoa-dev

Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-10 Thread John Love
Before I begin, I want to assure you that I have researched entries here on sheets, as well as those in MacTech.com. It's reasonably probable that I have missed some entries and so that is why I am asking for help. I also realize that this description is very long and I *really* did try to

applicationWillTerminate and asynchronous orderly shutdown

2008-06-10 Thread Stuart Malin
I have an app that establishes multiple TCP connections. If the user quits the app, I'd like to shut all those connections gracefully (i.e., conduct a bit of protocol) rather than just close them abruptly. To most properly handle this, I should even wait for the servers' responses. I am

Mail Rule Actions Control

2008-06-10 Thread Steven Huey
I'm looking to create a control or set of controls like the actions portion of a rule in Apple Mail. The new NSRuleEditor control in Leopard looks like it might be a good fit, but I can't find any sample code. Does anyone have any experiences with NSRuleEditor or code they're willing to

Re: Updating a progress bar from a code loop

2008-06-10 Thread Hamish Allan
On Tue, Jun 10, 2008 at 11:17 AM, Graham Cox [EMAIL PROTECTED] wrote: In this case I can do that... though out of curiosity I wonder if there is a way to do this cooperatively on the main thread without having to break up the loop doing the actual work. For example, in Carbon one can run the

Re: applicationWillTerminate and asynchronous orderly shutdown

2008-06-10 Thread Hamish Allan
On Tue, Jun 10, 2008 at 9:12 PM, Stuart Malin [EMAIL PROTECTED] wrote: I have an app that establishes multiple TCP connections. If the user quits the app, I'd like to shut all those connections gracefully (i.e., conduct a bit of protocol) rather than just close them abruptly. To most properly

Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-10 Thread Michael Ash
On Tue, Jun 10, 2008 at 1:10 PM, John Love [EMAIL PROTECTED] wrote: I have chosen the title Prevent Asynchronous operation of beginSheetModalForWindow because I use various calls to beginSheetModalForWindow in many parts of my app code and in one case I need the calls to didEndSelector to be

re-factoring a category into a class instance

2008-06-10 Thread Paul Archibald
Comrades: I am working on a file-handling Cocoa app that (at this point) has a single window. We are adding a second window (really sort of a non- modal dialog) to do some extra processing of the target files. The interface for the new window is already built (with IB), but is not hooked

Re: Mail Rule Actions Control

2008-06-10 Thread Scott Anguish
try searching in Xcode's documentation with full text mode http://developer.apple.com/samplecode/PredicateEditorSample/index.html is what I got. On Jun 10, 2008, at 1:16 PM, Steven Huey wrote: I'm looking to create a control or set of controls like the actions portion of a rule in Apple

Re: NSSlider responding to superview's drawRect

2008-06-10 Thread Michael Watson
This is normally what I have to do as well, but is there a more optimized way to achieve the goal of drawing only the rect that needs redrawing? -- m-s On 10 Jun, 2008, at 12:05, Ken Ferry wrote: You're probably filling your gradient into the rect passed in drawRect. That rectangle

Re: re-factoring a category into a class instance

2008-06-10 Thread Brian Stern
On Jun 10, 2008, at 5:05 PM, Paul Archibald wrote: Comrades: I am working on a file-handling Cocoa app that (at this point) has a single window. We are adding a second window (really sort of a non- modal dialog) to do some extra processing of the target files. The interface for the new

Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-10 Thread Jens Alfke
On 10 Jun '08, at 1:27 PM, Michael Ash wrote: If there were a synchronous API the code would have to somehow jump down the stack to where you're waiting for A, while somehow leaving the stuff that's waiting for B live farther up the stack. This is quite simply impossible in a C-based language.

launching standard apps with NSTask

2008-06-10 Thread Memo Akten
Hi all, i'm writing an app that launches some default apps like safari, itunes, iphoto etc using NSTask. I was wondering if there is a way of writing the launch url not fully hardcoded but using some system variables / methods etc.? Memo (Mehmet S. Akten) www.memo.tv [EMAIL PROTECTED]

Re: launching standard apps with NSTask

2008-06-10 Thread Nick Zitzmann
On Jun 10, 2008, at 4:55 PM, Memo Akten wrote: Hi all, i'm writing an app that launches some default apps like safari, itunes, iphoto etc using NSTask. I was wondering if there is a way of writing the launch url not fully hardcoded but using some system variables / methods etc.? Take

Re: launching standard apps with NSTask

2008-06-10 Thread Michael Vannorsdel
[[NSWorkspace sharedWorkspace] launchApplication:@Safari]; On Jun 10, 2008, at 4:55 PM, Memo Akten wrote: Hi all, i'm writing an app that launches some default apps like safari, itunes, iphoto etc using NSTask. I was wondering if there is a way of writing the launch url not fully

Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-10 Thread Graham Cox
Hi John, While I understand to some extent why you've done it this way, you've also managed to tie yourself in knots here. Sheets are slightly more complex than running an old-school modal dialog inline but they are not as complicated as you seem to have made them! The basic idea is that

Re: NSSlider responding to superview's drawRect

2008-06-10 Thread Graham Cox
I don't think it's worth attempting. I *think* that gradients are cached in some way so trying to recalculate the gradient to span the update rect correctly is: a) going to need a fair bit of work to calculate and b) not allow caching to work efficiently. In any case, pixels that are

Re: launching standard apps with NSTask

2008-06-10 Thread Memo Akten
Hi, that looks great thanks, I've just been looking through the documentation, but I don't think it allows control over terminating the app, or detecting when its closed. I would like to have that level of control (just terminate, and detect if user close it) - which is why I was opting

creating and using a View xib

2008-06-10 Thread Jerry Isdale
I'm building up a rather complex UI and would like to design, build, test portions of it as stand alone applications (esp so I can pass subsections to others to build). Initially I started building the apps by creating new Cocoa apps in Xcode3 and using IB to tweak up the MainMenu.xib

Re: changing locale

2008-06-10 Thread Deborah Goldsmith
Not a supported way, no. We don't encourage applications to change system-wide settings. Deborah Goldsmith Apple Inc. [EMAIL PROTECTED] On Jun 10, 2008, at 8:05 AM, Alexander Cohen wrote: Is there a way to change the locale from cocoa as if i was to go into System Preferences and change

Cocoa PDE validation

2008-06-10 Thread David Geering
Hi there, I'm trying to develop a Cocoa print dialog extension that requires a user to input a value. For arguments sake, imagine a PDE that requires a passphrase. I have an alert that pops up if the passphrase is missing, and this alert is displayed whether or not my PDE is ever selected/shown.

Re: creating and using a View xib

2008-06-10 Thread Graham Cox
A .xib file is just a .nib file in a text format, so it is more compatible with svn. Xcode compiles the .xib into a .nib. So to edit one, use Interface Builder as usual. because a .xib *is* a .nib, you load it as you do a nib - loadNibNamed:owner: You don't have to do anything different

Re: launching standard apps with NSTask

2008-06-10 Thread Adam Leonard
LaunchServices or NSWorkspace (which uses LS) is still probably your best option, as NSTask is not really designed to deal with GUI apps. To terminate the app, you can send a quit apple event or use applescript. This has come up recently, so search the list archives. To detect when the

Re: A simple doubt about array

2008-06-10 Thread Adam Leonard
If you do want to make use of some of the nice features of NSArray that C arrays don't have, it is trivial to add a category to NSArray that makes object retrieval easier. See http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_4_section_1.html An example

Re: launching standard apps with NSTask

2008-06-10 Thread Memo Akten
Ok Thanks, will check it out... Memo (Mehmet S. Akten) www.memo.tv [EMAIL PROTECTED] On 11 Jun 2008, at 01:20, Adam Leonard wrote: LaunchServices or NSWorkspace (which uses LS) is still probably your best option, as NSTask is not really designed to deal with GUI apps. To terminate the

Re: changing locale

2008-06-10 Thread Douglas Davidson
On Jun 10, 2008, at 5:42 PM, Alexander Cohen wrote: Thats what i though but here is my problem, and i'm sure im not the only who has it. I am currently working on localizing apps for mulitple languages. I would like to have an easy way to set the locale without going into the system prefs

Re: changing locale

2008-06-10 Thread Alexander Cohen
On Jun 10, 2008, at 8:50 PM, Douglas Davidson wrote: On Jun 10, 2008, at 5:42 PM, Alexander Cohen wrote: Thats what i though but here is my problem, and i'm sure im not the only who has it. I am currently working on localizing apps for mulitple languages. I would like to have an easy way

Re: Spotlight sources w/o actual files?

2008-06-10 Thread Ken Thomases
On Jun 10, 2008, at 3:57 AM, Rasmus Andersson wrote: Oh, just as I feared. The problem is the metadata itself is probably hundreds of gigabytes, if not terabytes in size, so it would be impossible to have mdimporter index fake files. If the _meta_data is really that large, then this is sort

Re: re-factoring a category into a class instance

2008-06-10 Thread Paul Archibald
Ooops, saw that go by and spaced out fixing it. I am just beginning with Cocoa, and the framework names are not that familiar yet. Thanks for the advice, Brian, especially the part about instantiating my controller in code. I figured it couldn't be too hard, but a little nudge in the right

Re: Updating a progress bar from a code loop

2008-06-10 Thread j o a r
On Jun 10, 2008, at 3:17 AM, Graham Cox wrote: though out of curiosity I wonder if there is a way to do this cooperatively on the main thread without having to break up the loop doing the actual work. For example, in Carbon one can run the event loop for a short period or just for one

Re: crash on command-W

2008-06-10 Thread James W. Walker
On Jun 10, 2008, at 7:24 AM, Adam R. Maxwell wrote: On Jun 9, 2008, at 10:30 PM, James W. Walker wrote: On Jun 9, 2008, at 9:18 PM, Andrew Farmer wrote: On 09 Jun 08, at 21:03, James W. Walker wrote: OK, I turned on NSZombieEnabled, and now I get this in the log: *** -[LogController

Issue with displaying URI prefixes on child elements using NSXML

2008-06-10 Thread Lawrence Johnston
Hey everybody, I've got an issue that I can't figure out. If I'm using this code: NSString *XMLForDisplay { NSXMLElement *root = [NSXMLNode elementWithName:@root]; [root addNamespace:[NSXMLNode namespaceWithName:@a stringValue:@http://www.tempurl.com ]]; NSXMLElement *child =

Re: Updating a progress bar from a code loop

2008-06-10 Thread Graham Cox
On 11 Jun 2008, at 2:40 pm, j o a r wrote: On Jun 10, 2008, at 3:17 AM, Graham Cox wrote: though out of curiosity I wonder if there is a way to do this cooperatively on the main thread without having to break up the loop doing the actual work. For example, in Carbon one can run the