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

2008-12-06 Thread Bridger Maxwell
Hey, Did you ever figure out what the problem is? It sounds like I am having the exact same problem. It has been driving me insane for a while now. I can't figure it out for the life of me. Thank You, Bridger Maxwell On Thu, May 22, 2008 at 10:02 PM, R.L. Grigg <[EMAIL PROTECTED] > wrote: > I ha

Re: Asynchronous timers (without a run loop)

2008-12-06 Thread Jean-Daniel Dupas
Le 6 déc. 08 à 00:22, Påhl Melin a écrit : 2008/12/5 Sherm Pendley <[EMAIL PROTECTED]>: On Dec 5, 2008, at 3:16 PM, Påhl Melin wrote: 2008/12/5 Sherm Pendley <[EMAIL PROTECTED]>: You'd have far, far less trouble programming for the Mac if you'd simply learn how Cocoa works, instead of tr

Core Data request predicates and to-many relationships

2008-12-06 Thread Luke Evans
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 entity. Now, I want to fetch the list of manage

Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Amy Gibbs
I've got a web based xml file in iso-8859-1 encoding that I'm trying to read into an NSXMLDocument. I've got the following code, but I can't seem to make it work? (I've tried all manner of combinations) //create the url NSString *urlString = [NSString stringWithFormat:

Re: Fix Populated NSMenu Of Files, Folders And Their Respected Images

2008-12-06 Thread Chunk 1978
thanks ashley, you cleared up a lot for me. however, i'm now presented with two (seemingly) small issues. the first is determining whether the directory is empty. i've added an array with directoryContentsAtPath, and an if statement counting the array, but it doesn't seem to work. second, how is

NSOutline view contents getting grayed

2008-12-06 Thread Arun
Hi All, I am writing a coca application in which i use NSOutline view for Navigating between different view like iTunes. So when i am clicking on the ouline view contents, the contents are highlighted in the blue. If i click on any other view other than the ouline view, ouline view content which i

Re: NSOutline view contents getting grayed

2008-12-06 Thread chaitanya pandit
That is happening because the outline view is loosing it's it's first responder status. You can refuse to resign the first responder status by overriding - (BOOL)resignFirstResponder and returning NO HTH, Chaitanya On 06-Dec-08, at 4:43 PM, Arun wrote: Hi All, I am writing a coca applicat

Re: NSOutline view contents getting grayed

2008-12-06 Thread Arun
Hi , I tried the technique which you had suggested, it solved the graying problem. But if i use this i will not be able to perform any actions on the other views as outline view is the first responder always. any idea? -Arun On Sat, Dec 6, 2008 at 5:04 PM, chaitanya pandit <[EMAIL PROTECTED]>wr

Re: NSOutline view contents getting grayed

2008-12-06 Thread Graham Cox
On 6 Dec 2008, at 10:34 pm, chaitanya pandit wrote: That is happening because the outline view is loosing it's it's first responder status. You can refuse to resign the first responder status by overriding - (BOOL)resignFirstResponder and returning NO Except that is likely to cause the re

MDQuery and searching within application package

2008-12-06 Thread [EMAIL PROTECTED]
My app has a number of document templates stored within the application package. The app adds these document templates to the metadata store itself via mdimport. Spotlight correctly locates and identifies the document UTI. When querying these documents with MDQuery - setSearchScopes: [NSArray

Re: NSOutline view contents getting grayed

2008-12-06 Thread Arun
Hi, Thats correct. But in My application i have a table view in which i need to take some actions. In short i can say that My application should behave like iTunes where in it just slightly changes the color of selected playlist in oulineview but still allows doubl-click and slection highlighting

Re: NSOutline view contents getting grayed

2008-12-06 Thread chaitanya pandit
On 06-Dec-08, at 6:19 PM, Arun wrote: Hi, Thats correct. But in My application i have a table view in which i need to take some actions. In short i can say that My application should behave like iTunes where in it just slightly changes the color of selected playlist in oulineview but sti

Re: Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Ricky Sharp
On Dec 6, 2008, at 4:35 AM, Amy Gibbs wrote: I've got a web based xml file in iso-8859-1 encoding that I'm trying to read into an NSXMLDocument. I've got the following code, but I can't seem to make it work? (I've tried all manner of combinations) //create the url NSStri

Re: Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Amy Gibbs
Is this 10.5 only? It doesn't seem to be recognised by xcode 2.5, and it doesn't run on my machine at all. I should have mentioned I'm targeting 10.4 with this. Sorry, On 6 Dec 2008, at 12:58, Ricky Sharp wrote: You can probably simplify this a bit by using stringWithContentsOfURL:encodin

Re: Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Ricky Sharp
On Dec 6, 2008, at 7:17 AM, Amy Gibbs wrote: Is this 10.5 only? It doesn't seem to be recognised by xcode 2.5, and it doesn't run on my machine at all. I should have mentioned I'm targeting 10.4 with this. stringWithContentsOfURL:encoding:error is in 10.4 and later. Do you have the prop

Re: Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Amy Gibbs
In my project details I've got 10.4 (Universal) selected, I've got xcode set up to do that autocomplete type thing, and it doesn't come up with encoding for NSString initWithContentsoOfURL, it does have encodingOnlyStreamAction? On 6 Dec 2008, at 13:24, Ricky Sharp wrote: On Dec 6, 2008,

Re: NSOutline view contents getting grayed

2008-12-06 Thread Arun
Hi What ever suggested by Graham has worked for me. Now i have one more problem where i am unable to turn on the text color to white upon selection in the outline view. Any idea? Thanks Arun KA On Sat, Dec 6, 2008 at 6:28 PM, chaitanya pandit <[EMAIL PROTECTED]>wrote: > > On 06-Dec-08, at 6:19

Window moving during drag and drop operation, (newbiew question)

2008-12-06 Thread Gustavo Pizano
On 6.12.2008, at 12:20, Gustavo Pizano wrote: Hi all, its me again. well Im implementing the drag-n-drop op for my app. in the Soruce view I have different layers, im checking which one of those was clicked and then commence the drag and drop, but the funny part is that ithe main window ts

Document package

2008-12-06 Thread Nor
Hi, I'm trying to make document package using NSFileWrapper. I could contain a regular file in the directory (document package), but the directory can't change its appearance, this is, it still looks a folder, not the icon I have specified in my info.plist. I have also set LSTypeIsPackage of the do

Re: Questions about [NSApplication run]

2008-12-06 Thread Scott Ribe
What about spawning a secondary thread which uses select (or kqueue, which is pretty easy to use BTW) to block waiting for events, without a timeout. When select (or kqueue) returns an event(s), then use: [yourAppDelegateOrControllerOrWhatever performSelectorOnMainThread: @selector(handleFactorEve

JSON Framework

2008-12-06 Thread development2
Hi, I hope someone can help me. I thought I was going to be able to use the JSON Framework from google code (http://code.google.com/p/json-framework/ ) but it won't build under the 10.4 SDK. I get errors on the build, mostly stuff that changed under 10.5. Does anyone know of a JSON framewor

Re: Custom Window Resize Image

2008-12-06 Thread Mr. Gecko
Thanks, I'm going to share what I did, just incase someone else is wanting to know how to do this. - (void)mouseDown:(NSEvent *)theEvent { // Resize if mouse is in the growbox isResizing = NSPointInRect([self convertPoint:[theEvent locationInWindow] fromView:nil], growRect); } -

Re: NSOutline view contents getting grayed

2008-12-06 Thread Nathan Kinsinger
On Dec 6, 2008, at 4:13 AM, Arun wrote: Hi All, I am writing a coca application in which i use NSOutline view for Navigating between different view like iTunes. So when i am clicking on the ouline view contents, the contents are highlighted in the blue. If i click on any other view other tha

cocoa class diagram

2008-12-06 Thread macdev
I was wondering whether there is a Cocoa class diagram poster to print. Thanx ___ 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)lis

Re: Not getting KeyDown events (and other peculiar things)

2008-12-06 Thread Shayne Wissler
Hello, I'm resending this because it didn't seem to get through to the list: On Fri, Dec 5, 2008 at 8:47 AM, Shayne Wissler <[EMAIL PROTECTED]> wrote: > 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 titl

Re: What are the limitations of Dot Syntax?

2008-12-06 Thread Charles Srstka
On Dec 5, 2008, at 10:06 PM, Bill Bumgarner wrote: Not really. 'name' is still something that is an accessor type thing, regardless of whether it is derived or declared via @property() "dot abuse" refers to expressions like: foo.retain; bar.lockFocusIfCanDraw; That is, expressions where yo

Re: What are the limitations of Dot Syntax?

2008-12-06 Thread jmunson
Namaste! I'm going to add my two cents here (despite being a noob). I like the dot syntax. Why? (and before I go any further, I realize this is not a Windows forum, and also realize this is a very general set of statements and quite open to debate) Because, in the Windows world at least,

Re: JSON Framework

2008-12-06 Thread Bill Garrison
On Dec 6, 2008, at 11:51 AM, development2 wrote: Hi, I hope someone can help me. I thought I was going to be able to use the JSON Framework from google code (http://code.google.com/p/json-framework/ ) but it won't build under the 10.4 SDK. I get errors on the build, mostly stuff that chang

Re: What are the limitations of Dot Syntax?

2008-12-06 Thread Bill Bumgarner
On Dec 6, 2008, at 11:15 AM, Charles Srstka wrote: So would something which is clearly not a property, but still returns an object, such as: myObj = mySet.anyObject; or: enumerator = myArray.objectEnumerator; be considered kosher? If you can write that and sleep well at night, then sure..

Cleanup inside a failed init method

2008-12-06 Thread Ken Tozier
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 my init, does the system call my dealloc method to allow proper clean

Re: Cleanup inside a failed init method

2008-12-06 Thread Charles Steinman
- Original Message > From: Ken Tozier <[EMAIL PROTECTED]> > To: Cocoa Developers > Sent: Saturday, December 6, 2008 1:07:00 PM > Subject: Cleanup inside a failed init method > > Hi > > I'm writing my own socket class using a bunch of BSD functions and am a > little > unclear on exact

Re: Cleanup inside a failed init method

2008-12-06 Thread Adam R. Maxwell
On Dec 6, 2008, at 1:36 PM, Charles Steinman wrote: From: Ken Tozier <[EMAIL PROTECTED]> To: Cocoa Developers 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 leve

Re: Cleanup inside a failed init method

2008-12-06 Thread Steven W Riggins
Should initWithHost be doing anything other than caching the host info? Other methods should do the connection/verification etc, no? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Vertically centering NSTextView

2008-12-06 Thread Tomas Franzén
Hi, I've written a text container to fit text inside of an oval shape (phew), and now I'd like to center the text vertically within the text view. What's the best way to approach this? NSLayoutManager is a jungle, and I'm not sure it's the right place to look. Thanks! Tomas Franzén Light

Re: What are the limitations of Dot Syntax?

2008-12-06 Thread jmunson
Of course that is true. No implication otherwise was meant or intended. I was merely establishing a point-of-reference. Hence the "...at least..." after "...Windows world...". Now, back to the coding... :D Peace, Love, and Light, /s/ Jon C. Munson II Quoting Alex Kac <[EMAIL PROTECTED]>

Re: Cleanup inside a failed init method

2008-12-06 Thread Ken Tozier
It's a matter of preference I guess. In practice, I can't think of any reason to connect to a server unless you intend to talk to it, so I just wrapped up all the ugliness into a nice simple interface. Creating one of my KClientSockets, connects to the host and retrieves any handshake data

Re: Cleanup inside a failed init method

2008-12-06 Thread mmalcolm crawford
mmalc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: Cleanup inside a failed init method

2008-12-06 Thread Jens Bauer
Hi Chuck, On Dec 6, 2008, at 22:36, Charles Steinman wrote: The system will only call dealloc if the object is released. Happily, the object should be released anyway if you plan to return nil since otherwise you'll leak a half-initialized object every time the method fails. So you should

Re: cocoa class diagram

2008-12-06 Thread Kyle Sluder
On Sat, Dec 6, 2008 at 12:42 PM, macdev <[EMAIL PROTECTED]> wrote: > I was wondering whether there is a Cocoa class diagram poster to print. Check out CocoaNav: http://inexdo.com/CocoaNav --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: Big picture relationships between NSConnection, NSInputStream, NSOutputStream etc

2008-12-06 Thread Andrew Farmer
On 04 Dec 08, at 16:39, Ken Tozier wrote: I tried it out and got the following printout to the console > inputStream: , outputStream: > connection: > Entered: stream:handleEvent: with sender: 0x13d170> > NSStreamEventErrorOccurred: Error Domain=NSPOSIXErrorDomain Code=61 "Operation could

Re: cocoa class diagram

2008-12-06 Thread jmunson
That's one of the coolest interfaces I've seen yet (or maybe I haven't seen much). How'd he/she/they do that??? Thanks for sharing! Peace, Love, and Light, /s/ Jon C. Munson II Quoting Kyle Sluder <[EMAIL PROTECTED]>: On Sat, Dec 6, 2008 at 12:42 PM, macdev <[EMAIL PROTECTED]> wrote: I w

Re: Various syntax errors and ICA kit

2008-12-06 Thread jmunson
Namaste! OK, after much beating of head against wall, I found the issue. 'Twas the way the #import statements were set up. Once I moved the Cocoa & Carbon imports to the header file that cleared up quite a bit of my issues. Also, I believe I had some of my own ignorance tossed in as well

Re: MTOM?

2008-12-06 Thread Todd Blanchard
http://wso2.org/ They've implemented a bunch of web services frameworks that can do MTOM in various languages. I've been trying to get the PHP one to build on OSX but have been wrestling with build issues. They don't see very Mac friendly, just Windows and Linux. But you can try. It wo

Re: Big picture relationships between NSConnection, NSInputStream, NSOutputStream etc

2008-12-06 Thread Ken Tozier
On Dec 6, 2008, at 6:45 PM, Andrew Farmer wrote: This is incorrect. A "connection refused" error in this context means that you're either trying to connect to a host/port which is not configured to accept a connection, or the host is behind a firewall which blocks incoming connections. In

Re: Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Michael Ash
On Sat, Dec 6, 2008 at 8:49 AM, Amy Gibbs <[EMAIL PROTECTED]> wrote: > In my project details I've got 10.4 (Universal) selected, I've got xcode set > up to do that autocomplete type thing, and it doesn't come up with encoding > for NSString initWithContentsoOfURL, it does have encodingOnlyStreamAct

Re: Cleanup inside a failed init method

2008-12-06 Thread Michael Ash
On Sat, Dec 6, 2008 at 4:53 PM, Adam R. Maxwell <[EMAIL PROTECTED]> wrote: > I used the [self release] pattern for a long time, but this thread indicates > that you should clean up in the initializer, then call [super dealloc] > directly: > > http://lists.apple.com/archives/objc-language/2008//Sep/

Re: Cleanup inside a failed init method

2008-12-06 Thread Charles Steinman
- Original Message > From: Jens Bauer <[EMAIL PROTECTED]> > Subject: Re: Cleanup inside a failed init method > > On Dec 6, 2008, at 22:36, Charles Steinman wrote: > > > The system will only call dealloc if the object is released. Happily, the > object should be released anyway if yo

NSPredicateEditor and date comparisons

2008-12-06 Thread Josh Abernathy
Hi all, In my application, users have the option of comparing to a date in an NSPredicateEditor. For the NSDates it is comparing against, only the date is important; time doesn't matter. The interesting thing I found about NSPredicateEditor is the NSTimeInterval it compares my NSDates to

XCode 3.1.1 Cocoa App template project leaking memory

2008-12-06 Thread WT
Hello all, it turns out that my application has been leaking a small amount of memory shortly after launching. I looked at the code and there was nothing obviously wrong, and yet Instruments (well, Leaks) tells me that it leaks. I then commented out all the code in all the awakeFromNib me

Array Controller Add method question

2008-12-06 Thread vince
Thanks for the help ... I'm using an Array Controller's Add method wired to a button to enable text data entries into a table. How do I set the table to activate it's top row when pressing the Add button in preparation for input? At this point if the table contains many rows of data and the user cl

Re: Array Controller Add method question

2008-12-06 Thread jmunson
You might try something like: int row = [a indexOfObjectIdenticalTo:p]; [tableView editColumn:0 row:row withEvent:nil select:YES]; a = your array controller/arrary p = object added This sample from Hillegass' book, "Cocoa Programming for Mac OS X Third Edition." Good Luck! Peace, Love, an

NSImageView gets stuck

2008-12-06 Thread Michael Rogers
Hi, All: I have an NSImageView (in a variable called ball) that I am trying to move programatically across the screen, and when it hits a wall, reposition it in the center. I've set up an NSTimer, and in the timerFireMethod have this: NSRect ballFrame = [ball frame]; bal

Re: Array Controller Add method question

2008-12-06 Thread jmunson
Yes, you do. Quoting vince <[EMAIL PROTECTED]>: Thanks. I'm using a Core Data model with Bindings. So there's no code in my class. I simply wired my Add object button to the the Array Controller's (Add) action to insert data into the table. Do I need to implement the Add method manually and cu

Re: NSImageView gets stuck

2008-12-06 Thread jmunson
Shot in the dark here... I noticed you are using ballFrame in your timer event, but not in your "reset" event. Is that your issue? Quoting Michael Rogers <[EMAIL PROTECTED]>: Hi, All: I have an NSImageView (in a variable called ball) that I am trying to move programatically across the scr

Re: Array Controller Add method question

2008-12-06 Thread mmalcolm crawford
On Dec 6, 2008, at 7:15 PM, [EMAIL PROTECTED] wrote: I'm using an Array Controller's Add method wired to a button to enable text data entries into a table. How do I set the table to activate it's top row when pressing the Add button in preparation for input? At this point if the table cont

Re: NSImageView gets stuck

2008-12-06 Thread Michael Rogers
On 6 Dec, 2008, at 9:52 PM, [EMAIL PROTECTED] wrote: Shot in the dark here... I noticed you are using ballFrame in your timer event, but not in your "reset" event. Is that your issue? That's a good idea, but I don't believe so: when I replaced my [ball setFrameOrigin:NSMakePoint(125,12

Re: NSImageView gets stuck

2008-12-06 Thread WT
Hi Michael, it's not clear from your code or your message, but could it be that your timer method calls setNeedsDisplay: YES on the appropriate view, but the placeBallInCenter method does not? I've recently made that very mistake and scratched my head for quite a while before I noticed th

File Sharing Within App

2008-12-06 Thread Bridger Maxwell
Hey, Is there an easy way to embed a file-sharing server into a Cocoa application? Right now, I have a client-server setup that communicates via distributed objects (with Bonjour for discovery). I would like the client to be able to download files from the server, but I don't want to write my own f