Re: FastCGI and cocoa

2008-12-23 Thread Andrew Farmer
On 23 Dec 08, at 17:31, Mr. Gecko wrote: Hello, I'm working on a web server in cocoa, and I'm wanting to add FastCGI so I can add php and CGI to it, how might I do that? I don't really know how to download FastCGI, I'm guessing it's the API download, but I'm not sure. This isn't really a Coc

Re: Using Image- Hellp

2008-12-23 Thread Graham Cox
On 24 Dec 2008, at 4:30 pm, rethish wrote: But i need to use some images other than those default images . Is this possible ? Just add (drag) the images to your project's resources and they'll show up in IB. Then drag to the button. --Graham

Re: Drawing in a NSView out side of drawRect

2008-12-23 Thread Michael Ash
On Tue, Dec 23, 2008 at 12:44 PM, David Alter wrote: > Thanks to everyone that has responded to me. It has been a big help. > >> > I want to draw in a NSView but not when drawRect is called. >> >> Others have pointed this out, but I want to reiterate: no you don't. >> Trying to draw outside of dra

Using Image- Hellp

2008-12-23 Thread rethish
hi all, I want to add images on the button and segmentedcontrols. I had seen that there are some default images in the attribute inspector in interface builder which can be easily assigned to these controls.. But i need to use some images other than those default images . Is this possible ? Plea

re: help needed with odd NSCoding encodeWithCoder: call to Core Data object

2008-12-23 Thread Ben Trumbull
Greg, That looks pretty crazy. The API reference implies you might need a subclass of NSCollectionView to override - newItemForRepresentedObject: The documentation is pretty sparse. I'd just start filing bugs if I were you. - Ben ___ Cocoa-d

Re: Get notified of fullscreen switch

2008-12-23 Thread Eric Schlegel
On Dec 23, 2008, at 8:10 PM, Sean McBride wrote: On 17-Dec-08, at 11:59 AM, Eric Schlegel wrote: Is there a way, that my application (Playwatch), which is an iTunes Controller running in the menu bar, gets notified, when another Application, like DVD-Player, switches to full screen (kios

Re: Network volume

2008-12-23 Thread Ben Trumbull
On 2008 Dec, 23, at 14:02, Nor wrote: But I don't know which volumes were networks'. if (0 == statfs(fileName, &stats_buf)) { localFS = ((stats_buf.f_flags & MNT_LOCAL) == MNT_LOCAL); statfs will also tell you if the volume is the root volume. - Ben __

re: Crash as NSPersistentDocument creates its persistence stack

2008-12-23 Thread Ben Trumbull
Jerry, That's pretty odd. Crashes in objc_msgSend are often memory management related, so you might start with NSZombieEnabled and MallocScribble, MallocPrescribble. malloc_history is also a great tool. - Ben ___ Cocoa-dev mailing list (Coco

Re: Get notified of fullscreen switch

2008-12-23 Thread Sean McBride
On 17-Dec-08, at 11:59 AM, Eric Schlegel wrote: Is there a way, that my application (Playwatch), which is an iTunes Controller running in the menu bar, gets notified, when another Application, like DVD-Player, switches to full screen (kiosk) mode? At the moment, the recommended way to do th

Re: Network volume

2008-12-23 Thread Ken Thomases
On Dec 23, 2008, at 7:29 PM, Jerry Krinock wrote: On 2008 Dec, 23, at 14:02, Nor wrote: But I don't know which volumes were networks'. Well, I'd imagine you'd have the same problem if the USB cable on a local drive was yanked out. So, you need to identify anything not on the startup vol

Re: warning: unused parameter '_value'

2008-12-23 Thread Sean McBride
On 23-Dec-08, at 3:11 AM, Gerriet M. Denkmann wrote: Are there any known issues with 4.2? Why is 4.2 not the GCC System Version? Probably at least partly because 10.5 itself was built with 4.0, and the C++ STL version changed between releases. See:

help needed with odd NSCoding encodeWithCoder: call to Core Data object

2008-12-23 Thread Greg Beaver
Hi, I've got a pop-up button that has a binding of selectedObject to a Core Data relationship inside an NSCollectionViewItem's view. For some reason, occasionally encodeWithCoder: is called upon this item, here's a partial backtrace showing the relevant calls: #0 -[GreenwoodPieceType encodeWith

FastCGI and cocoa

2008-12-23 Thread Mr. Gecko
Hello, I'm working on a web server in cocoa, and I'm wanting to add FastCGI so I can add php and CGI to it, how might I do that? I don't really know how to download FastCGI, I'm guessing it's the API download, but I'm not sure. Thanks for help and tips, Mr. Gecko _

Re: Network volume

2008-12-23 Thread Jerry Krinock
On 2008 Dec, 23, at 14:02, Nor wrote: But I don't know which volumes were networks'. Well, I'd imagine you'd have the same problem if the USB cable on a local drive was yanked out. So, you need to identify anything not on the startup volume. I know this is a stupid answer, but actually,

Crash as NSPersistentDocument creates its persistence stack

2008-12-23 Thread Jerry Krinock
This morning I was working on some code in my Core Data document-based project, and upon testing I found it now crashes whenever I open a new or existing document. I backed out all the changes, cleaned with dependencies and precompiled headers, restarted -- still no good. So I over-rode -

Re: .DS_Store files, dirContentsAtPath? (newb)

2008-12-23 Thread Matt Long
Matt Gemmell is the guy to read on this: http://whathaveyoutried.com/ The shortcut function you are asking for doesn't exist. So now what? What have you tried? People are much more likely to provide answers to questions that show what you are currently doing. You're taking the risk that peo

Re: NSString stringByTrimmingCharactersInSet method doesnt work.

2008-12-23 Thread Graham Cox
On 24 Dec 2008, at 5:00 am, Alex.Wang wrote: Hi everyone. I came across a confusing issue, please see the following code: NSLog(@"Trick here: %@", [[NSString stringWithString:@"Thereare blanks"] stringByTrimmingCharactersInSet: [NSC

Re: automatic table scrolling when nsarraycontroller selection changes

2008-12-23 Thread Matt Neuburg
On or about 12/17/08 1:11 PM, thus spake "Matt Neuburg" : >> My app is very simple and involves an NSTableView of one column bound to >> an array controller. The app runs both on Tiger and Leopard. On Tiger, >> when my code changes the array controller selection (e.g. add: or >> setSelectionIndex:

Re: Network volume

2008-12-23 Thread Nor
My view displays file system including some network volumes hierarchically as one of Finder's style does.When the network is unexpectedly cut, I'd like to remove the network volumes from the view before didUnmount notification. I could get the faster way by using System Configuration when the line

Re: saving filename suggestion in NSSavePanel

2008-12-23 Thread Shawn Erickson
On Tue, Dec 23, 2008 at 1:17 PM, Nick Rogers wrote: > Hi, > I looked the docs for NSSavePanel, but it doesn't list any method for > putting in a suggested filename to the user. > How to do it? The "file:(NSString*)filename" parameter of the sheet and modal variants you use to show the save panel.

Re: saving filename suggestion in NSSavePanel

2008-12-23 Thread Douglas A. Welton
Hi Nick, re-read the doc for NSSavePanel and check out the methods: -runModalForDirectory:file: -beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector on 12/23/08 4:17 PM, Nick Rogers at roger...@mac.com wrote: > Hi, > I looked the docs for NSSavePanel, but it doesn't

saving filename suggestion in NSSavePanel

2008-12-23 Thread Nick Rogers
Hi, I looked the docs for NSSavePanel, but it doesn't list any method for putting in a suggested filename to the user. How to do it? Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

.DS_Store files, dirContentsAtPath? (newb)

2008-12-23 Thread Chris Paveglio
I need to use directoryContentsAtPath to do a simple count of files in a directory. But sometimes I get an incorrect number (vs the Finder's display), because there is a .DS_Store file in the folder. Is there a way to ignore invisible files? Is there something like directoryContentsAtPath:ignor

Re: Wake Up an iPhone

2008-12-23 Thread Robert Marini
There is no public way to do this. -rob. On Dec 23, 2008, at 2:44 AM, Angelica Grace Tanchico wrote: Hello,I have tried looking for a way (code) on how to "unsleep" the iPhone but I could not find any.I am developing a VOIP app. So far so good but I have a little problem. After my app is

Re: Custom Executable / NSTask / NSPipe...

2008-12-23 Thread Shawn Erickson
On Tue, Dec 23, 2008 at 5:02 AM, none given wrote: > Hi group, > (Sorry if this is the wrong group. I hesitated between Cocoa and OBJC) > > I am looking for information on how to control a command line tool through a > Cocoa UI. What do you mean by control exactly? What is the command line tools

NSTableView horiz scrollbar doesn't take into account last table column

2008-12-23 Thread John Michael Zorko
Hello, all ... I'm on 10.5.5, and i've code that shows a table with two columns. In IB, vert and horiz scrollbars are enabled, but when the applications runs, the horiz scroller only appears when I size the window such that the first table column is partially shown. The horiz scroller do

Re: Configuring NSNumberFormatter non-programmatically

2008-12-23 Thread Kirk Swenson
On Dec 22, 2008, at 9:11 AM, Avery Nickelby wrote: I've looked through the archives and the documentation; most of the information is related to using NSNumberFormatter programatically. I am looking for a good explanation for using 10.4 style data formatters in Interface Builder; when I conf

Saving unseen NSView with subviews to NSImage

2008-12-23 Thread John Kestner
I've got a custom NSView that displays a visualization and some subviews that I placed using Interface Builder that overlay some text. This is used as a secondary window that updates when I select a name from a list in the primary window, and that works great. And it's easy enough to save t

Custom Executable / NSTask / NSPipe...

2008-12-23 Thread none given
Hi group, (Sorry if this is the wrong group. I hesitated between Cocoa and OBJC) I am looking for information on how to control a command line tool through a Cocoa UI. Reading "Step into Xcode" I was interested in adding a custom executable. So I did, and it ran fine internally (after adding arg

Wake Up an iPhone

2008-12-23 Thread Angelica Grace Tanchico
Hello,I have tried looking for a way (code) on how to "unsleep" the iPhone but I could not find any.I am developing a VOIP app. So far so good but I have a little problem. After my app is loaded, run and turned to sleep,then, when a call is received, the phone rings but the screenis still down

Re: selectionShouldChangeInTableView called twice

2008-12-23 Thread Andreas Mayer
Am 23.12.2008 um 15:26 Uhr schrieb Andre Masse: Should have think of this sooner! Sure, there's no feedback why the table view isn't working [...] You could overlay the table view with an additional partially transparent view (i.e. white, 15% opaque or so) to create a dimming effect.

Re: Debugging memory smashers with GC

2008-12-23 Thread Clark Cox
On Tue, Dec 23, 2008 at 2:25 PM, Bill Bumgarner wrote: > Obviously, knowing what array is crashing will help. You might be able to > set a breakpoint on NSCFArray's finalize and then add a script to the > breakpoint that po's the object. > > Something like (you'll have to paste then in one line

Re: Main menu crash when migrating to Leopard

2008-12-23 Thread Quincey Morris
On Dec 23, 2008, at 04:32, Klaus Backert wrote: The cause of the crash is the following category, I had implemented, overriding a method of NSObject's NSKeyValueCoding category: @interface NSObject (MyKeyValueCoding) + (BOOL)accessInstanceVariablesDirectly; @end @implementation NSObject (MyK

Re: Debugging memory smashers with GC

2008-12-23 Thread Bill Bumgarner
On Dec 23, 2008, at 12:23 AM, Rob Keniger wrote: #0 0x96928cd0 in __CFTypeCollectionRelease () #1 0x968b5ad6 in CFArrayApplyFunction () #2 0x968b93fc in __CFArrayDeallocate () #3 0x90798f31 in -[NSCFArray finalize] () #4 0x92ba86b6 in finalizeOneObject () First, a question: is it always a

Re: copy object in kCFAllocatorMallocZone to scanned zone?

2008-12-23 Thread Michael Link
On Dec 23, 2008, at 1:19 PM, Michael Link wrote: I have a situation with something like this is going on: CFHTTPMessageRef response = CFHTTPMessageCreateEmpty(kCFAllocatorMallocZone, FALSE); CFHTTPMessageAppendBytes(response, bytes, length); if (CFHTTPMessageIsHead

copy object in kCFAllocatorMallocZone to scanned zone?

2008-12-23 Thread Michael Link
I have a situation with something like this is going on: CFHTTPMessageRef response = CFHTTPMessageCreateEmpty(kCFAllocatorMallocZone, FALSE); CFHTTPMessageAppendBytes(response, bytes, length); if (CFHTTPMessageIsHeaderComplete(response)) { CFIndex statusCode =

Re: Finding front most window of a document

2008-12-23 Thread glenn andreas
On Dec 23, 2008, at 12:55 PM, John Nairn wrote: I can't figure out how to determine the front most window of a document when the neither the document nor the application may be active. The application is when contacting an application from an Apple script. Here is what I tried: [NSApplic

NSCoding, objects that can

2008-12-23 Thread Alexander Cohen
Hi, i have a class that contains an NSDictionary. That dictionary is encoded in encodeWithCoder:. Once in a while, a user might put in something liek a CGColorSpaceRef or something similar and everything stops working. Is there a way to find out if bjects in the dictionary can actually be e

Finding front most window of a document

2008-12-23 Thread John Nairn
I can't figure out how to determine the front most window of a document when the neither the document nor the application may be active. The application is when contacting an application from an Apple script. Here is what I tried: [NSApplication keyWindow] and mainWindow become null when ap

Re: NSCoding, objects that can

2008-12-23 Thread Rob Rix
-conformsToProtocol will do it: for(id object in [dictionary objectEnumerator]) { if(![object conformsToProtocol: @protocol(NSCoding)]) { // raise an exception, exclude the object, or whatever } } Rob On 23-Dec-08, at 1:47 PM, Alexander Cohen wrote: Hi, i have a

NSCoding, objects that can

2008-12-23 Thread Alexander Cohen
Hi, i have a class that contains an NSDictionary. That dictionary is encoded in encodeWithCoder:. Once in a while, a user might put in something liek a CGColorSpaceRef or something similar and everything stops working. Is there a way to find out if bjects in the dictionary can actually be e

Re: NSString stringByTrimmingCharactersInSet method doesnt work.

2008-12-23 Thread j o a r
On Dec 23, 2008, at 10:00 AM, Alex.Wang wrote: We may expect to see "Trick here: Thereareblanks" output from the console. However, I got "Trick here: Thereareblanks" instead. I dont know why the stringByTrimmingCharactersInSet method doesn't work. Can anyone here give me an explana

NSString stringByTrimmingCharactersInSet method doesnt work.

2008-12-23 Thread Alex . Wang
Hi everyone. I came across a confusing issue, please see the following code: NSLog(@"Trick here: %@", [[NSString stringWithString:@"Thereare blanks"] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]])

Re: Drawing in a NSView out side of drawRect

2008-12-23 Thread David Alter
Thanks to everyone that has responded to me. It has been a big help. > > I want to draw in a NSView but not when drawRect is called. > > Others have pointed this out, but I want to reiterate: no you don't. > Trying to draw outside of drawRect: will only lead to pain. (It is > useful, on rare occa

Re: Replacing objects

2008-12-23 Thread DAS
Thanks for the help guys, I agree, the way I had been thinking about it seemed like a strange way to go about dealing with the problem I was having. While this has started an interesting topic on NSProxy (seems like a really helpful class for implementing that pattern), I think my problem is going

Re: Network volume

2008-12-23 Thread Kyle Sluder
On Tue, Dec 23, 2008 at 10:21 AM, norio wrote: > It might be easy thing but I don't know how to know whether or not the > volume is a network's one? Which volume? The startup volume? The one with the user's home directory on it? Any volume at all? Why does it matter if it's a network volume?

Re: Arg, lmao question - (int)getters/setters.

2008-12-23 Thread Robert Marini
Any stack variable (int, float, etc) won't be declared as a pointer. Recall that a variable containing a * indicates that it is, in fact, some address in memory that is being pointed to (hence a pointer). If we recall, then, that memory consists of a "stack" and a "heap" - the pointer sit

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

2008-12-23 Thread Gorazd Krosl
- Original Message From: Mahaboob Subject: Re: Saving the project To: Mike Abdullah Cc: "cocoa-dev@lists.apple.com" Message-ID: Content-Type: text/plain;charset="US-ASCII" Thanks for the help, Now it is working well with the menu item's action. I also need to perform the sam

Network volume

2008-12-23 Thread norio
Hi, It might be easy thing but I don't know how to know whether or not the volume is a network's one? Would you tell me how? Thank you, Norio ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator com

Re: Write to file.

2008-12-23 Thread John Cebasek
Well, it's been a long time since I worked on a loginwindow replacement, but I think it was when Tiger was released, I had to split my code into two mechanisms , one privileged - which could have no GUI, and could write to at least /tmp and the global Preferences directory and then a non-pr

Re: selectionShouldChangeInTableView called twice

2008-12-23 Thread Andre Masse
Hi, Found a simple way to achieve what I wanted (prevent selecting a different row when editing the detail view). Instead of messing with selectionShouldChangeInTableView: [tableView setEnabled:(!isDirty)]; Should have think of this sooner! Sure, there's no feedback why the table view is

Write to file.

2008-12-23 Thread Macarov Anatoli
CFPreferences doesn't work. My bundle works in login window under user account securityagent. Can I somehow with the user's rights create file? Вы уже с Yahoo!? Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo

Re: Main menu crash when migrating to Leopard

2008-12-23 Thread Klaus Backert
Apologies for answering my own question (nobody else did) On 2008-12-13 I posted the following: Being about to migrate a Cocoa document-based application of mine, which is under development, from Mac OS X 10.4.11 and Xcode 2.5 to Mac OS X 10.5.5 and Xcode 3.1.2 (on a PowerPC G5) the applicat

Re: Arg, lmao question - (int)getters/setters.

2008-12-23 Thread Graham Cox
On 23 Dec 2008, at 6:14 pm, aaron smith wrote: Sorry for the total newb here. What's the right way to create getters/setters for int's? Without the compiler warning about them? I've been trying: -(void)setSomeInt:(int)theInt { someInt=theInt; } -(int)someInt { return someInt; } Then c

Re: observeValueForKeyPath and how to do it right

2008-12-23 Thread Graham Cox
On 23 Dec 2008, at 3:19 pm, Chris Idou wrote: Use target-action. Control drag from the cell to your controller and hook it up to an action method. How do I then find out which object was clicked? any action method is declared thusly: - (IBAction) someAction:(id) sender; the answer to yo

Re: os x gui scripting

2008-12-23 Thread Bill Cheeseman
on 2008-12-22 5:58 AM, Luca Cioria at l.ciori...@virgilio.it wrote: > If you say so.. but for example how would you click at specified coordinates > in applescript? or get a pixel color? > Of course, if an app is scriptable I use appscpt or automator, but in many > case, even websites, I have to f

Re: warning: unused parameter '_value'

2008-12-23 Thread Gerriet M. Denkmann
On 23 Dec 2008, at 02:45, Nathan Vander Wilt li...@calftrail.com> wrote: On Dec 22, 2008, at 4:42 AM, Gerriet M. Denkmann wrote: When I use [GCC_WARN_UNUSED_PARAMETER, -Wunused-parameter] I get (in Release build, not in Development) for every @synthesize statement a warning: warning: unused p

Re: Saving the project

2008-12-23 Thread Mahaboob
I forgot to set the delegate. Now it is working well. Thanks a lot. Mahaboob. On 12/23/08 12:29 PM, "Mahaboob" wrote: > > Thanks for the help, > Now it is working well with the menu item's action. I also need to perform > the same thing when I'm clicking the close button of the window. I gone

Re: NSCalendar/NSDate - generating all months/days in a year

2008-12-23 Thread Ken Tozier
On Dec 22, 2008, at 2:30 PM, mmalc Crawford wrote: No! This is precisely the direction in which not to go: "Important: Use of NSCalendarDate strongly discouraged. It is not deprecated yet, however it may be in the next major OS release after Mac OS X v10.5. For calendrical calculations, you

Re: os x gui scripting

2008-12-23 Thread Andrew Farmer
On 22 Dec 08, at 02:58, Luca Cioria wrote: If you say so.. but for example how would you click at specified coordinates in applescript? or get a pixel color? Of course, if an app is scriptable I use appscpt or automator, but in many case, even websites, I have to follow this path. If you'r

Re: Debugging memory smashers with GC

2008-12-23 Thread Rob Keniger
On 23/12/2008, at 10:32 AM, Rob Keniger wrote: I've tried using the MallocStackLoggingNoCompact environment variable with malloc_history but my results have been inconclusive at best. What is the best way to go about looking for this type of bug with Garbage Collection enabled? Do you

Re: Setting Caps Lock state from the application

2008-12-23 Thread Jean-Daniel Dupas
Le 22 déc. 08 à 13:41, Girish Kolari a écrit : Hi All We have an application in which we post keyboard events using the API CGError CGPostKeyboardEvent (CGCharCode keyChar, CGKeyCode virtualKey, boolean_t keyDown); API works fine for all the events. However, we are facing an issue with Ca