NSSound thread-safety?

2008-06-16 Thread Jens Alfke
Speaking of AppKit on background threads … I've been using a background thread to load and play NSSounds, because the +soundNamed: and -play methods often block for significant amounts of time (half a second or more), which was stalling other time-critical actions. This has mostly been

Re: NSSound thread-safety?

2008-06-16 Thread Jens Alfke
On 16 Jun '08, at 5:15 PM, j o a r wrote: I think that you can use QTKit to load and play sound files asynchronously. QuickTime is pretty non-thread-safe too. NSSound already plays the sound asynchronously. It's apparently loading the sound that blocks for a long time (although it's lazy

Re: Newbie interface questions - multiple modal windows

2008-06-16 Thread Jens Alfke
On 16 Jun '08, at 4:38 PM, Matthew Youney wrote: I am creating an application that requires multiple “modal” windows. There is a “main” window, and there are multiple other windows that can be displayed from the main window (using a toolbar, buttons, etc.). These “other” windows need to

Re: Agent tutorial help needed.

2008-06-16 Thread Jens Alfke
On 16 Jun '08, at 12:40 PM, christian giacomi wrote: Hi all,I am new to Cocoa and Objective-C so I hope you will forgive my question if it sounds stupid. I am looking for some tutorials or demos on Cocoa Agents. No offense, but IMHO writing an agent is not a good newbie project ... you'll

Re: Strange leak reported by leaks command line tool

2008-06-16 Thread Jens Alfke
On 16 Jun '08, at 12:14 PM, Hamish Allan wrote: Or it has an autorelease pool, but never drains it. Maybe the OP is running a select() loop with an autorelease pool around it rather than within it? It wouldn't be reported as a leak then, because the autorelease pool, which is a per-thread

Re: Newbie interface questions - multiple modal windows

2008-06-17 Thread Jens Alfke
On 17 Jun '08, at 7:30 AM, Matthew Youney wrote: This certainly can be easily done using a tab control. The downside is that the entire NIB is loaded at once, adversely affecting performance/ resources. Have you found this to be true in actual operation, or do you just suspect that it

Re: objects aren't added to NSMutableArray

2008-06-17 Thread Jens Alfke
On 17 Jun '08, at 5:02 PM, Daniel Richman wrote: I get no error, but the object isn't added. If I try to do [myArray objectAtIndex:0]; I get (null) That's a tip-off that the array pointer is nil, by the way — - objectAtIndex: *never* returns nil, because it's not legal to store nil values

Re: NSURLRequest conditional GET

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

Re: CFWriteStreamWrite Blocking if we give invalid Host.

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

Re: Trying to get hang of PDO

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

Re: File System Notifications

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

Re: Add item to NSSavePanel sidebar

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

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

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

Re: SSCrypto Framework

2008-06-20 Thread Jens Alfke
On 20 Jun '08, at 8:45 AM, Trygve Inda wrote: I would embed a public key in my app and encrypt a data file on our site that the software needs to download periodically. This is mostly to ensure that file can not be modified or substituted except by us. A good way to do this would be to

Re: Creating a Bundle via Code

2008-06-20 Thread Jens Alfke
On 20 Jun '08, at 4:00 PM, Grant Limberg wrote: Currently, the user drags an existing image from their filesystem to an NSImageView bound to an NSData attribute in the sqlite data store. This causes the decompression from 1.5MB to 20MB. That's an issue with NSImageView — when an image is

Re: SplashScreen issues

2008-06-20 Thread Jens Alfke
On 20 Jun '08, at 4:13 PM, Damien Cooke wrote: When creating a splash screen what condition do you use to decide when to close your splash screen? Is there some obvious event that is triggered that I can use? Your app delegate's -applicationDidFinishLaunching: method is probably the

Re: Core Data : BlogDemo tutorial : I must have missed something, but I don't know what...

2008-06-21 Thread Jens Alfke
On 21 Jun '08, at 2:40 PM, John Joyce wrote: 2008-06-21 16:27:05.212 BlogDemo[1180] *** NSRunLoop ignoring exception '[NSManagedObject 0x3434e0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key topic.' that raised during posting of delayed perform with

Re: SplashScreen issues

2008-06-21 Thread Jens Alfke
On 21 Jun '08, at 12:10 AM, Damien Cooke wrote: You make an excellent point. My app does take too long to load. Once I get closer to release I will see what I can do to reduce the load time. Perhaps move some stuff out of the MainMenu.xib. You've currently got a chicken-and-egg

Re: CoreData local and on server sync

2008-06-21 Thread Jens Alfke
On 21 Jun '08, at 3:33 AM, René v Amerongen wrote: Now I have to make a similar database but then that the Laptop users can work offline. I would like to have them sync their local copy with the server when they are online again. Is this possible with Coredata and SQL? Does someone has

Re: Why does this https post request always return 404 Not Found

2008-06-21 Thread Jens Alfke
This is pretty weird. After some experimenting, I narrowed it down to the value of the User-Agent header. I think the del.icio.us server is checking that header and returning a 404 if it doesn't like it. And it doesn't seem to like CFNetwork's default user-agent header, though it likes

Re: Race in Apple's NSTreeContoller/NSOutlineView

2008-06-22 Thread Jens Alfke
FYI, another source of weird inconsistently-manifesting bugs involving nib loading: The objects in the nib are sent -awakeFromNib messages in a somewhat random order. The order is often the same from one run to the next on a single machine, but can vary between machines, or after seemingly

Re: A documentation dumdum

2008-06-22 Thread Jens Alfke
On 22 Jun '08, at 9:13 AM, Jeff LaMarche wrote: Whatever the object is, it will be converted to a string for display, but the table view is actually capable of holding different types of data and doesn't change the type that it's holding, so you can't assume that the object it holds is a

Re: [Q] How to add a program as a login item after installing?

2008-06-22 Thread Jens Alfke
On 21 Jun '08, at 11:21 PM, JongAm Park wrote: Well, in my case, we wanted to avoid such workflow. We want installing running the special app to be transparent from users. The best thing you can do to avoid extra workflow is to *not use an installer*. It's best if the user can simply

Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Jens Alfke
On 22 Jun '08, at 4:08 PM, Clayton Leitch wrote: #0 0x96cd5564 in NSDecimalCopy () #1 0x96d854f9 in NSDecimalSubtract () #2 0x96dadad8 in -[NSDecimalNumber decimalNumberBySubtracting:withBehavior:] () #3 0x96dada47 in -[NSDecimalNumber decimalNumberBySubtracting:] () #4 0x1b67 in

Re: Determining startup AppleEvents

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 1:04 AM, Mike wrote: Is there a way in Cocoa to determine if the application was launched with or without an initial AppleEvent? That's what -applicationDidFinishLaunching: is for. It's called after any initial AppleEvents are dispatched. So if you reach that method,

Re: Assert trigged in -[NSEvent eventNumber]

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 5:21 AM, Mattias Arrelid wrote: The error claim that an assert has failed in -[NSEvent eventNumber] - and each time this occured, our custom mouse tracking seemed to stop working. Unfortunately, I do not have access to the log at the moment. What would be the right™ thing to

Re: iCal server Cocoa API?

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 4:37 AM, Devraj Mukherjee wrote: I wondering if OSX Server components like iCal server or Address Book server (which I assume is LDAP based) have Cocoa libraries to populate/query data. I am trying to construct a Cocoa application but wish to re-use as much of Apple's

Re: OT: code signing

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 9:59 AM, Trygve Inda wrote: I have an Authenticode certificate for our VC++ Windows-based app, but it does not seem to work on 10.5's code signing system. I haven't tried to do any code signing yet, but my naïve impression is that any valid X.509 cert plus private key

Re: Learning SQLite by watching Core Data?

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 11:06 AM, David Carlisle wrote: just finished my first simple Core Data Document Based Application. Four entities with multiple relationships. Now I want to recreate the same thing using just SQLite. I don't know SQLite, and I know very little Unix. This isn't

Re: NSDateFormatter -- accepting different formats at runtime

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 2:24 PM, Daniel Richman wrote: I know it is possible to set how the date is formatted at compile time via IB, but is there any way to accept multiple formats at runtime? The only real way to do this is to create a number of NSDateFormatters, each with a different

Re: Learning SQLite by watching Core Data?

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 2:35 PM, David Carlisle wrote: I am studying an application design by implementing it with Core Data, then studying how I would move it to a platform where only sqlite is available. Whew. If you want to implement an app the same way on a no-CoreData platform, you're

Re: Learning SQLite by watching Core Data?

2008-06-23 Thread Jens Alfke
On 23 Jun '08, at 3:13 PM, David Carlisle wrote: As far as the filename extension, if I don't use the .sqlite extension, then sqlite3 creates an empty textfile with the same name as the database: That's what the sqlite3 tool does if you give it a filename that doesn't yet exist. This

Re: CFSocket and wifi

2008-06-24 Thread Jens Alfke
On 24 Jun '08, at 11:27 AM, sheen mac wrote: I am working on a server-client application for live video broadcast using CFSocket.Its working good in LAN connection.But when I changed it into wifi network .It gets blocked after a few seconds. There's nothing fundamentally different.

Re: Newbie question: instantiate a class in its header file OR in IB

2008-06-24 Thread Jens Alfke
On 24 Jun '08, at 8:34 PM, JArod Wen wrote: I am a cocoa newbie from Java. Recently I found an example code in which the instance of a class is defined in its own class's header file, as following: @interface AppController : NSObject { // Instance variables here } AppController

Re: Newbie question: instantiate a class in its header file OR in IB

2008-06-25 Thread Jens Alfke
On 25 Jun '08, at 7:01 AM, JArod Wen wrote: So if I have initialization method in the class, I need not to instantiate it explicitly in code, correct? IB will create the instant using the initialization method. Is this correct? You don't need a custom -init method for an object in a nib.

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread Jens Alfke
On 25 Jun '08, at 7:17 AM, Ling Wang wrote: I can't find a way to identify different NSURLConnection instances in the delegate methods, for NSURLConnection does not offer access to the NSURLRequest used to initialize it. If your delegate needs to know which connection is which, then it's

Re: Newbie question: error in creating a NSData object using handle(Resource Management)

2008-06-25 Thread Jens Alfke
Handle dataHandle = Get1IndResource( type1, n); I hope you checked that dataHandle!=NULL and *dataHandle!=NULL. struct A_STRUCT aStruct; memcpy( aStruct,[data bytes], [data length]); This is dangerous — if [data length] is larger than sizeof(aStruct), you've just clobbered

Re: SSH Wrapper

2008-06-25 Thread Jens Alfke
On 25 Jun '08, at 2:01 PM, Kevin Ferguson wrote: I am, however, running into a problem. I have my task set up to go. The issue I'm running into is that SSH obviously requires a password authentication. Reading though the SSH man page, I can't find a flag that lets you specify a password

Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Jens Alfke
On 26 Jun '08, at 11:36 AM, Hamish Allan wrote: What we really need is for the cocoa-dev list admin page to require new subscribers to type in the phrase I will not make posts about the iPhone or Snow Leopard :) No, you've bought into the whole reality distortion field. What we _really_

Re: NSString uppercaseString

2008-06-27 Thread Jens Alfke
On 27 Jun '08, at 8:51 PM, Shawn Erickson wrote: Could I assume if the doc does not mention releasing the memory, then I don't have to worry about it? No :) Well, to respond a bit more positively, it's not what the doc says so much as what the method's named, that tells you what its

Re: Style Question

2008-06-27 Thread Jens Alfke
On 27 Jun '08, at 9:44 PM, Alex Wait wrote: if I have a member, let's say a NSString, called FirstName... would the setter still be setFirstName? Yes. But you shouldn't name the property FirstName. Property and method (and instance variable) names should be lowercased. There are some

Re: Building a Setup Assistant

2008-06-28 Thread Jens Alfke
On 28 Jun '08, at 2:15 PM, Christopher Keath wrote: Do I want to try and do this with only 1 window object, and have each stage simply load a new view? Or do I want a new nib for each step? The best way to do an assistant UI is with an NSTabView. Put each step inside a separate tab, and

Re: XML-RPC Cocoa Parsing

2008-06-29 Thread Jens Alfke
On 28 Jun '08, at 10:24 PM, Rick Langschultz wrote: I am trying to use XML-RPC for my data access on a web server (HTTPS). I wanted to know if parsing the XML-RPC data can be handled using NSXMLDocument and parsing the member, struct, name, value XML-RPC tags. Sure. It'll parse any sort

Re: NSURLConnection vs CF and other ideas

2008-06-29 Thread Jens Alfke
On 28 Jun '08, at 6:11 PM, Alex Kac wrote: I've got a working HTTP Post with file upload using NSURLConnection, but I don't seem to see any ways to get progress on the upload beyond the connectionDidFinishLoading: delegate. Is there a better way to be able to get progress info so we can

Re: Output of NSHTTPCookieStorage to NSTableView

2008-06-29 Thread Jens Alfke
On 29 Jun '08, at 9:39 AM, Chris Purcell wrote: Thank you for the reply. I think right now the simplest would be to convert the cookies array to an array of NSStrings. What would be the easiest way to do this? Keep the array as an array of NSHTTPCookies. But your -

Re: Handling framework exceptions/errors?

2008-06-29 Thread Jens Alfke
On 29 Jun '08, at 9:56 AM, David Troy wrote: I have a situation where I am loading arbitray data from network- supplied URLs. Sometimes the URLs contain Kanji unicode characters. When they do, my HTTP loading mechanism (which is built around NSURL* frameworks) dies with an exception deep

Re: Output of NSHTTPCookieStorage to NSTableView

2008-06-30 Thread Jens Alfke
On 29 Jun '08, at 9:47 PM, Chris Purcell wrote: Thank you for the reply. I am a bit of a Cocoa newbie and I'm having trouble using the objectValueForTableColumn:. My NSTableView is only one column, but I would like to display all attributes of each key. You should have one column per

Re: Process app.

2008-06-30 Thread Jens Alfke
On 30 Jun '08, at 6:23 AM, Толя Макаров wrote: Yes, that's clear, but how to get this list? I have found 2 ways: ps -ef and [[NSWorkspace sharedWorkspace] launchedApplications]. There are underlying APIs that tools like ps and top use; you can call those. I'm not familiar with the details,

Re: Connecting to non-standard HTTP ports with authorization

2008-06-30 Thread Jens Alfke
Hm. I've never used NTLM authentication. Have you read the Handling Authentication section of the CFNetwork Programming Guide? It mentions that NTLM auth requires a domain as well as a username/ password. But I'm not sure how to configure that using the Obj-C wrapper APIs.

Re: Connecting to non-standard HTTP ports with authorization

2008-06-30 Thread Jens Alfke
On 30 Jun '08, at 12:51 PM, Niklas Saers wrote: In the HTTP header I get back from the server I cannot see a domain, but then again I cannot see a realm either. How do I find the domain? In NTLM authentication, is domain the same as the DNS domain, or is it the same as the domain windows

Re: Crashes with no backtrace when printing

2008-07-03 Thread Jens Alfke
On 3 Jul '08, at 4:24 PM, Ben wrote: Attaching to program: `/Path/goes/here', process 14859. Cannot access memory at address 0x9ead7 Cannot access memory at address 0x9ead7 I've found that gdb-in-Xcode is more reliable at being able to get a backtrace if you launch the program with the

Re: More CALayer Questions

2008-07-07 Thread Jens Alfke
On 7 Jul '08, at 12:42 PM, Gordon Apple wrote: One source of confusion is the anchorPoint/Position relation. Reference says The position is relative to anchorPoint. Huh? What anchorPoint? -- the layer in question, or its superLayer? And what does this mean for the view's layer in

Re: Does this caution need fixed? (newb)

2008-07-09 Thread Jens Alfke
On 9 Jul '08, at 7:44 AM, Chris Paveglio wrote: I'm trying to make sure that this part of my code is good and clean and not leaking. I believe that I have it right (but still think I have something wrong). It looks OK to me on quick reading. The main thing I'd change is to put the path

Re: afferentless mac mini

2008-07-09 Thread Jens Alfke
On 9 Jul '08, at 7:22 AM, em wrote: I have a Network Receiver application which is in my login items section of an Apple Intel mac mini computer running the latest version of Leopard. I do not need a keyboard, nor a mouse directly wired to this computer(or indirectly thru wifi:-)), as

Re: Debugging strategy - exceptions

2008-07-09 Thread Jens Alfke
On 9 Jul '08, at 5:32 AM, Ruotger Skupin wrote: I would rather not try to teach my users gdb... My MYUtilities library includes support for getting exception backtraces at runtime and reporting them to the user (see ExceptionUtils.h).

Re: Receive notifications about frontmost application change

2008-07-09 Thread Jens Alfke
On 9 Jul '08, at 3:22 AM, Александр Даровских wrote: Hi, Is there any way to subscribe to frontmost application change notification? For example, via NSDistributedNotificationCenter or some other facility? I have managed to get process startup and shutdown notifications, but I cannot get

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:09 AM, an0 wrote: I like the idea of adding prefix to my ivars, and in fact, all my C++ code use _ivars. Good! I highly recommend that in Obj-C too. (I use _ like you.) However, I like the declared properties feature of Objective-C 2.0, and the good feeling will be

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:19 AM, an0 wrote: However, if you don't know what exact type of Cocoa I am, how could you call me BlackCocoa so surely? Can we stop using confusing metaphors and just talk about OOP? :-p When the compiler parses a message-send expression ([]) it tries to figure out

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:52 AM, Sean McBride wrote: On 7/11/08 12:38 AM, Graham Cox said: What I would suggest though is that you adopt a naming convention for your instance variables (ivars) that consistently flag them as such. Some people use a leading underscore, but Apple say not to do that.

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:55 AM, an0 wrote: But if different return types cause different native code, how could my program still work with the mistaken type(an NSString * returned from the inner message is treated as an NSInteger at the first place, then is passed as an NSString * to the outer

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 10:19 AM, John Velman wrote: If I set the SCM options properly, and use XCode3, following steps as outlined in the NSPersistentDocument CoreDataUtilityTutorial (but setting the SCM options for 10.4), am I going to get there? If you mean SDK, not SCM, then the answer is

KVO: Observing an aggregate property of a collection?

2008-07-10 Thread Jens Alfke
How do I set up key-value observing of an aggregate property over an array, like a sum? Say I have a Bulb class with a boolean lit property. I have an NSArrayController with an array of Bulbs, being shown in a table view. To compute the number of lit bulbs I can do: - (unsigned)

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 3:46 PM, John Velman wrote: Thanks, Jens. I see that by selecting the SCM Menu item, and under that, Configure SCM for this project I find that I've actually set the SDK to 10.4 and the architectures to ppc and i386. Oh I see, that's why you were referring to SCM! That

Re: how to get the status of network when the network is set disable.

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 9:46 AM, xiaobin wrote: I test Michael's sample, it works well. But I think the SCNetworkReachability API is also used to try to connect to the server, right? What I want is to get the status of the network without any connection to the server. The SC reachability API does

Re: Click to edit

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 7:50 PM, Stefan Arentz wrote: I would like to use text labels that turn into editable text fields when you click them. Like Address Book has when you edit an address card. Does anyone know how those work? Is it a matter of flipping the editable property or are those

Re: Triangulating webcams

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 6:40 PM, em wrote: I can easily transport 'strings' over a network using UDP multi- casting/broadcasting via Quartz Composer, but some of these strings may get a little lengthy. What's a good language statement(s) (obj c API) for transporting small (10MB) data

Re: Trigonometric Problem, Particularly tan() Function

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 9:43 PM, Patrick Walker wrote: Everthing appears to be fine when going from 0 to 45 degrees but at 90 degrees, the tangent returns -22877334. That's not what I get. I just compiled and ran: printf(tan(90) = %g\n, tan(M_PI/2)); which printed: tan(90) =

Re: NSURLConnection substitutes characters?

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 9:25 PM, [EMAIL PROTECTED] wrote: Is there some content type I could use other than application/x-www- form-urlencoded that would work with PHP scripts? You can use any content-type you like, but your PHP script will then have to read the data from the input stream

Re: importing sqlite data into a core data database

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 8:25 PM, John Velman wrote: I'd be happy to be pointed to the right documentation! I've read a few hundred pages in the past week, but haven't come across anything directly related to this. Introduction to the sqlite3 API: http://www.sqlite.org/cintro.html Full API

Re: Setting Up Socket Streams

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 5:22 PM, StaS Bandol wrote: but my 192.168.1.1 still not recieve nothing... where i'm wrong? That's because you didn't write anything to the streams. You just opened and scheduled them. You need to wait for the streams to finish opening them, then write to the output

Re: Problem on reload data source of a table view

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 10:35 PM, JArod Wen wrote: The problem is that after I update the data source, which is tableSource in tableController, [dataTable reloadData] will not update the table view in the window You're sure that, at runtime, 'dataTable' is not nil? It's easy to overlook an

Re: Remove overlap on NSBezierPath

2008-07-13 Thread Jens Alfke
On 13 Jul '08, at 6:43 AM, Georg Seifert wrote: How I can merge to bezierPaths and remove the overlap in Cocoa. Does anyone has exerience with this or can point me to some information? That's a rather difficult bit of computational geometry. AFAIK, CoreGraphics doesn't have anything

Re: Webkit and image redirects

2008-07-13 Thread Jens Alfke
On 13 Jul '08, at 9:49 AM, Rod Schmidt wrote: I have an embedded webkit in my app. In my HTML that I display in the webview I have an image that refers to an image a Backpack web page. In Safari when you type in the URL for this image it gets redirected to another image that is stored on

Re: [NSDate +dateWithNaturalLanguageString] question

2008-07-13 Thread Jens Alfke
On 13 Jul '08, at 10:52 AM, Phil wrote: I'd really like to understand what *common* modern uses there are for non-Gregorian calendars Are you serious? A large fraction of the world's population uses other calendars. From the Wikipedia entry Calendar: While the Gregorian calendar is

Re: SOAP server framework?

2008-07-13 Thread Jens Alfke
On 13 Jul '08, at 12:15 PM, Stefan wrote: could anybody provide a pointer to a SOAP server framework - one with low impedance gap regarding ObjC/Cocoa? It's possible that WebObjects has SOAP support, but I don't know for sure. While there is much Java stuff available, I wonder why Apple

Re: Setting Up Socket Streams

2008-07-13 Thread Jens Alfke
On 13 Jul '08, at 1:46 PM, StaS Bandol wrote: Note that @http://192.168.1.2; is a URL, not a host name. Just use the host name portion of the URL. - so i shall use @192.168.1.2 instead of @http://192.168.1.2;? Yes. Nearly any API that takes a domain name also accepts the numeric

Re: Remove overlap on NSBezierPath

2008-07-13 Thread Jens Alfke
On 13 Jul '08, at 9:14 PM, Graham Cox wrote: Since apps like Adobe Illustrator and Flash can perform these operations on bezier paths, clearly there are methods that exist for doing it, even though the mathematicians claim otherwise (what they are claiming is the lack of a general

Re: Servicing Core Animations?

2008-07-14 Thread Jens Alfke
On 14 Jul '08, at 11:52 AM, Bill Dudney wrote: You can of course override this but in the example below you are doing the animation yourself so there is no reason for CA. i.e. tracking mouse movements is not something you want to do with CA animations anyway. It's fine to use CA while

Re: Trouble with performSelector afterDelay

2008-07-14 Thread Jens Alfke
On 14 Jul '08, at 11:53 AM, James Trankelson wrote: #0 0x0002606d in -[Worker release] at Worker.m:155 #1 0x94e8502a in __delayedPerformCleanup #2 0x9390d92b in CFRunLoopTimerInvalidate #3 0x9390e879 in CFRunLoopRunSpecific #4 0x9390ecf8 in CFRunLoopRunInMode #5

Re: Trouble with performSelector afterDelay

2008-07-14 Thread Jens Alfke
On 14 Jul '08, at 4:12 PM, Shawn Erickson wrote: It looks like you override release in your Worker object (based on the back trace you posted). Are you thinking -[Worker release] is the place to free resources? If so it isn't the right place. You want -[Worker dealloc]. Right. -release just

Re: Questions about Core Data and SQLite

2008-07-14 Thread Jens Alfke
On 14 Jul '08, at 6:05 PM, Steve Steinitz wrote: I use a little gigabit Thecus Network Drive which is just about as fast as using the internal disk. Humorously, my database currently fits in the Thecus' cache so it runs even faster. The scalability problem isn't the I/O speed, but the

Re: Newbie: How to understand Xcode's documentation

2008-07-15 Thread Jens Alfke
On 15 Jul '08, at 3:19 PM, Phil Faber wrote: - (void)getCharacters:(unichar *)buffer range:(NSRange)aRange My challenge is that I don't know what this means or how to convert this into actual code. So I have to keep guessing which surely can't be the preferred way to learn! What

Re: how do I make chat bubbles using a custom cell

2008-07-15 Thread Jens Alfke
On 15 Jul '08, at 8:08 PM, TARUN CHAPLOT wrote: I am very new to objective C and working on some application which needs to create Chat bubbles similar to iChat. Can anybody help me to find some documentation or the sample code which will help me to make chat bubbles using custom cell. A

Re: Log Into a Website

2008-07-16 Thread Jens Alfke
On 15 Jul '08, at 10:09 PM, Bridger Maxwell wrote: I am writing a Cocoa app that will access a user's account that is set up on a server. How do I log in and keep logged in? Do I keep a connection open? It depends on the protocol you're using. I think you mean HTTP, in which case the

Re: Text selection in NSTableView

2008-07-16 Thread Jens Alfke
On 15 Jul '08, at 10:57 PM, Satoshi Nakagawa wrote: But I cannot implement text selection on it. Is there a good way to implement it? You'd need to subclass NSTextFieldCell to inherit its behavior. Text layout is very, very complicated and you definitely don't want to try to implement it

Re: Calling an Apple Detector

2008-07-16 Thread Jens Alfke
On 15 Jul '08, at 1:05 AM, Laurent Cerveau wrote: Does anyone know if Is there a way to call an Apple Data Detector from Objective-C code. I'd like to use one that recognizes dates and events and that is working pretty well in Mail. There is no public API for Data Detectors. I'm expecting

Re: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS

2008-07-16 Thread Jens Alfke
On 16 Jul '08, at 12:55 AM, Alex Wied wrote: I've found the setting which causes the error below and thought I post the result in case somebody else runs into the same error. In menu Run disable setting Enable Guard Malloc and the scripts runs fine without any exceptions. You should file

Re: Base64 data string decode to save to file

2008-07-16 Thread Jens Alfke
On 16 Jul '08, at 7:21 AM, Pablo Herrera wrote: What are recommended methods to decode the data so I may save it to file? OpenSSL has base64 conversion APIs in its libCrypto. In my code I use a nice Obj-C wrapper by Dave Dribin: http://www.dribin.org/dave/files/base64.zip —Jens

Handling key equivalents in a controller class?

2008-07-16 Thread Jens Alfke
I've run into this problem a few times now: I have an NSWindowController subclass that manages a window. I want to handle certain hot-keys in this window, for example Esc to exit full-screen mode, or maybe use letter keys to switch tools as in Photoshop. Where do I put the handler for

How to programmatically open an NSComboBox's list?

2008-07-17 Thread Jens Alfke
I have an NSComboBox, and I want to automatically pop open the list, without the user having to click the button. But I can't find anything in the API of either the control or the cell to do this. Did I overlook something? (I suspect there might be a sneaky way to do this using the

Re: how do I make chat bubbles using a custom cell

2008-07-17 Thread Jens Alfke
On 16 Jul '08, at 8:22 AM, chaitanya pandit wrote: One idea would be to create an NSBezierPath with the shape of the chat bubble, once u have it you can use the CTGradient calss's [gradient fillBezierPath] method to fill it with an aqua look. The CTGradient project is here:

Re: Concurrent network transmission

2008-07-17 Thread Jens Alfke
On 17 Jul '08, at 6:13 AM, em wrote: So, architecturally, for high speed transmission over a closed network neighborhood of say 9 minis, isn't there something like a SuperSocket that could co-ordinate these now '3' streams of info. There's nothing super about it; just regular sockets. OS

Re: Sign extension in NSNumber / 10.4 SDK???

2008-07-17 Thread Jens Alfke
On 17 Jul '08, at 6:38 AM, Thomas Engelmeier wrote: What are my best options to get around that? (Except of using the next larger NSNumber variants to store unsigned values in order to prevent unwanted sign expensions for unsigned values)? Either require 10.5, or use a larger size. The

Re: Handling key equivalents in a controller class?

2008-07-17 Thread Jens Alfke
On 17 Jul '08, at 10:45 AM, Andy Lee wrote: I'd add a (BOOL)handleMyKeyDown: method in a category of NSObject, and override keyDown: in NSApplication to traverse windows, delegates (perhaps including control delegates), and descendant views until something returns YES. Well, if I'm

Re: Sign extension in NSNumber / 10.4 SDK???

2008-07-17 Thread Jens Alfke
On 17 Jul '08, at 10:18 AM, Thomas Engelmeier wrote: Thanks for confirming. I'll probably end up writing enhancement requests to documentation so this behavior gets documented. You can do that, but I really doubt the 10.4 documentation is still being updated! I guess it could be added to

Re: How to programmatically open an NSComboBox's list?

2008-07-17 Thread Jens Alfke
On 17 Jul '08, at 11:29 AM, Omar Qazi wrote: Maybe you could fake the mouse even that would normally pop it open. Actually, after some experimentation I figured out how to do it using the accessibility API: @interface NSComboBox (MYExpansionAPI) @property (getter=isExpanded) BOOL

Re: Image name for drag and drop from Safari

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 12:23 AM, chaitanya pandit wrote: In my application, i allow users to drag and drop images from Safari, however while receiving the drop i cannot retrieve the image name from the pasteboard. If i get the data for URL pasteboard type, it gives the URL up to the image, and

Re: tidying HTML up

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 3:07 PM, Ivan wrote: I'm asking for alternatives to NSXMLDocument to get a tidy XHTML document ready to be parsed with the NSXMLParser class NSXML uses libTidy. If for some reason you can't use those, you should be able to build libTidy yourself and link it into your

Re: Dot Syntax docs missing?

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 9:44 PM, Rick Mann wrote: I know how to use the dot syntax in the typical case. What I want is an authoritative reference on how property names change case to match accessor functions I define. It's probably described in the documentation for Key-Value Coding. If you

Re: Handling key equivalents in a controller class?

2008-07-19 Thread Jens Alfke
On 19 Jul '08, at 8:52 AM, Matt Neuburg wrote: Try it and see. Let's say we want to catch Esc directed to the window as a whole (to exit full screen mode, if I recall your example). So what I would do is to insert an NSResponder instance behind the window in the chain and implement

<    1   2   3   4   5   6   7   8   9   10   >