Re: Core Data - use of simple accessors vs. KVC

2008-08-28 Thread Negm-Awad Amin
Am Mi,27.08.2008 um 19:57 schrieb mmalc crawford: On Aug 27, 2008, at 10:36 AM, Negm-Awad Amin wrote: Am Mi,27.08.2008 um 19:19 schrieb mmalc crawford: On Aug 27, 2008, at 9:48 AM, Negm-Awad Amin wrote: Am Mi,27.08.2008 um 18:22 schrieb Oleg Krupnov: Suppose I have a Core Data model

Re: NSFileManager Help

2008-08-28 Thread Andrew Farmer
On 27 Aug 08, at 17:43, J. Todd Slack wrote: NSString *applicationSupportDirectory = @~/Library/Application Support/Ring-Maker/tmp/; /* temp scratch space */ If you need temp scratch space, use the NSTemporaryDirectory() function - the user's home directory may be on a device with slow

Re: Core Data - use of simple accessors vs. KVC

2008-08-28 Thread Negm-Awad Amin
Am Do,28.08.2008 um 06:43 schrieb Caleb Strockbine: On Aug 27, 2008, at 2:43 PM, Negm-Awad Amin and mmalc crawford argued: You can subclass NSManagedObject and add properties using @property and @dynamic, which means, that the accessors will be generated dynamically at run-time. (Without

CFBundleIconFile: heiß or hot?

2008-08-28 Thread Gerriet M. Denkmann
// this shows the application default icon if CFBundleIconFile = heiß // works ok for CFBundleIconFile = hot - (IBAction)iconForFileN: sender; { NSBundle *mainBundle = [ NSBundle mainBundle ]; NSString *bundlePath = [ mainBundle bundlePath ]; NSImage *image = [ [

Re: Bindings and empty text field nil assigments

2008-08-28 Thread Markus Spoettl
On Aug 27, 2008, at 9:32 PM, mmalc crawford wrote: I don't want to go and store NSNumbers instead of scalar values, which I imagine would have the advantage of accepting nil values inherently. Why not? There may be an advantage if you are doing a lot of mathematical calculations, but the

Re: Bindings and empty text field nil assigments

2008-08-28 Thread Markus Spoettl
On Aug 27, 2008, at 9:21 PM, Quincey Morris wrote: I suspect you can get the effect you want by using a formatter on the text field. Someone was complaining on this list a week or two ago that 10.4+ style formatters never set properties to nil values, but this sounds like the behavior you

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Michael Nickerson
On Aug 28, 2008, at 2:15 AM, Gerriet M. Denkmann wrote: // this always works, regardless of name: - (IBAction)ImageNameD: sender; { NSBundle *mainBundle = [ NSBundle mainBundle ]; NSDictionary *infoDictionary = [ mainBundle infoDictionary ]; NSString *iconFile = [

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Oleg Krupnov
Parts of your first question remind me of a situation that I had. Erik Buck gave me some great advice and part of it was the following: If you are worried about adding drawing code to a Model object, add the drawing code in a category of the model object* and maintain the category

NSURLConnection and JavaScript

2008-08-28 Thread dexter morgan
Hello guys, I'm using NSURLConnection to download a web page. Unfortunatly some particular pages detects JavaScript compatibility so the result data is something like you cannot see this page because you have not js enabled. Is there any way to workaround this problem? Thank you so much

[MEET] Aachen CocoaHeads TODAY (August 28, 2008)

2008-08-28 Thread Stefan Hafeneger
Hi everyone, Aachen CocoaHeads is today (August 28, 2008) at 7PM. Talk: Stefan Hafeneger, Developing multi-touch Applications for Mac OS X Bring along your iPhone or iPod touch and your Mac to participate in the workshop. Please visit http://www.cocoaheads.de/ for location information.

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Oleg Krupnov
Yes, you are correct. I am looking not to break MVC and also get the correct implementation of binding in a custom view Just an example: I had a graphic application that drawed some inserted shapes. The shape itself is a part of the model, the color of the shape, too. But when the user selects

Re: NSURLConnection and JavaScript

2008-08-28 Thread Andrew Farmer
On 28 Aug 08, at 01:38, dexter morgan wrote: I'm using NSURLConnection to download a web page. Unfortunatly some particular pages detects JavaScript compatibility so the result data is something like you cannot see this page because you have not js enabled. Is there any way to workaround this

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Negm-Awad Amin
Okay, I – hopefully – understand you now: You have a view with some (model) objects displayed. There is another view (potentially or really?) that can display these objects, too The additional attributes are specific for each displayed object and each view? Correct? (There is a german

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Cathy Shive
On Aug 28, 2008, at 11:06 AM, Oleg Krupnov wrote: In other words, I need a way to associate additional custom-view-specific properties with model object, without adding them as transitive properties to the model. What is the best way to do this? Or maybe your point is that this is a bad idea

Creating Interface

2008-08-28 Thread Christian Giordano
Hi guys, I would like to create an Interface which will be eventually implemented by some classes. I am a bit confused here, in objective-c the .h files are basically already interfaces. Ok, but how could a .m file implements more than one? I couldn't find any document explaining how to implements

Re: Creating Interface

2008-08-28 Thread Matthias Schonder
You may read this: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_7_section_6.html#/ /apple_ref/doc/uid/TP30001163-CH15-TPXREF148 On 28.08.2008, at 12:14, Christian Giordano wrote: Hi guys, I would like to create an Interface which will be eventually

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Oleg Krupnov
I think there are times when it's appropriate to have wrapper objects - that are view related - for your model objects. In an image browser, it's likely that there is a thumbnail object that draws image objects. Yeah, maybe view-related wrapper objects for model objects is the right term. In

Quitting all active applications

2008-08-28 Thread Phil Faber
Is there a simple way to quit all running applications? Basically I want to achieve the same result as the first stage of hitting 'shut down' (closing all applications) without actually shutting down the system. Thanks. ___ Cocoa-dev mailing

Re: Quitting all active applications

2008-08-28 Thread Rob Keniger
On 28/08/2008, at 8:36 PM, Phil Faber wrote: Is there a simple way to quit all running applications? Basically I want to achieve the same result as the first stage of hitting 'shut down' (closing all applications) without actually shutting down the system. You could get the launched

[meeting] Swindon, UK: upcoming cocoaheads

2008-08-28 Thread graham . lee
Hi all, September's CocoaHeads Swindon will be at the Glue Pot pub, at 20:00 BST on Monday 1st September. As ever, the website for more information is: http://cocoaheads.org/uk/Swindon/index.html See (some of) you there! Graham. -- Graham Lee Senior Macintosh Software Engineer, Sophos

Re: Creating Interface

2008-08-28 Thread Christian Giordano
Protocols seems definitely the way to go and seems to work, I'm only getting some warnings. Basically what I did, I pass the instance implementing the protocol with this syntax: - (void) addListener:(id MyProtocol *) listener and I get invalid receiver type 'id MyProtocol*' Funny enough after I

Re: Quitting all active applications

2008-08-28 Thread Phil
On Thu, Aug 28, 2008 at 10:36 PM, Phil Faber [EMAIL PROTECTED] wrote: Is there a simple way to quit all running applications? Basically I want to achieve the same result as the first stage of hitting 'shut down' (closing all applications) without actually shutting down the system. What do

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Graham Cox
On 28 Aug 2008, at 6:15 pm, Oleg Krupnov wrote: I have only one problem with this approach: As I mentioned before, I need to add custom-view specific instance variables (states) to the model object's category. The Objective-C categories do not allow adding instance variables, only methods I

NSMutableDictionary, NSNumber and more memory management

2008-08-28 Thread Memo Akten
Hi All, I have a few questions regarding using NSMutableDictionary, NSNumbers, and more memory management. I have a mutable dictionary, which I would like to store a bunch of values, which my app will modify and save and load as a plist. This is inside a QCPlugIn and it seems the

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Graham Cox
On 28 Aug 2008, at 8:26 pm, Oleg Krupnov wrote: In your image browser example, this problem sounds as follows: where to store the cached thumbnail images, to avoid re-creating them anew in each drawRect call? Also, if a thumbnail is in process of dragging inside the custom view, where to save

Re: NSMutableDictionary, NSNumber and more memory management

2008-08-28 Thread Joshua Pennington
On Aug 28, 2008, at 6:46 AM, Memo Akten [EMAIL PROTECTED] wrote: q1: Is this all correct? When you setObject, the docs say that the object receives a retain, so that means its safe (and correct) for me to do the above? Do I need to release the NSNumbers in dealloc? or does the

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Cathy Shive
On Aug 28, 2008, at 12:26 PM, Oleg Krupnov wrote: I think there are times when it's appropriate to have wrapper objects - that are view related - for your model objects. In an image browser, it's likely that there is a thumbnail object that draws image objects. Yeah, maybe view-related

Re: [meeting] Swindon, UK: upcoming cocoaheads

2008-08-28 Thread Graham Cox
On 28 Aug 2008, at 9:24 pm, [EMAIL PROTECTED] wrote: September's CocoaHeads Swindon will be at the Glue Pot pub, at 20:00 BST on Monday 1st September. As ever, the website for more information is: http://cocoaheads.org/uk/Swindon/index.html Now that's a coincidence... I just saw the

Re: NSMutableDictionary, NSNumber and more memory management

2008-08-28 Thread Memo Akten
Thanks Joshua, that clears up the memory stuff... i think i finally get it now: unless you explicitly alloc or retain, you never need to release... cheers, memo. On 28 Aug 2008, at 13:12, Joshua Pennington wrote: On Aug 28, 2008, at 6:46 AM, Memo Akten [EMAIL PROTECTED] wrote: q1: Is

Re: NSMutableDictionary, NSNumber and more memory management

2008-08-28 Thread Joshua Pennington
The safest thing to do is to check the documentation for a method and see what it says about object ownership. A good rule of thumb is, however, when a convenience method returns an object, you do not have ownership over it. If you need it to persist, you should retain it (at which point

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Gerriet M. Denkmann
On 28 Aug 2008, at 14:37, Michael Nickerson wrote: On Aug 28, 2008, at 2:15 AM, Gerriet M. Denkmann wrote: // this always works, regardless of name: - (IBAction)ImageNameD: sender; { NSBundle *mainBundle = [ NSBundle mainBundle ]; NSDictionary *infoDictionary = [

Re: Creating Interface

2008-08-28 Thread Jean-Daniel Dupas
Le 28 août 08 à 13:24, Christian Giordano a écrit : Protocols seems definitely the way to go and seems to work, I'm only getting some warnings. Basically what I did, I pass the instance implementing the protocol with this syntax: - (void) addListener:(id MyProtocol *) listener and I get

Re: Design Question: Bindings Custom Views

2008-08-28 Thread graham . lee
Grahaam Cox wrote on 2008-08-28 13:11:47: Regarding the above though, if this is similar to your situation - what's really wrong with model objects caching a thumbnail? Being a slave to MVC is going to lead to suboptimal solutions just as ignoring MVC altogether is going to be. The

Re: Design Question: Bindings Custom Views

2008-08-28 Thread Oleg Krupnov
Thanks, that mostly answers my question, finally. And the short answer is No :). There is no standard Cocoa way of doing this and it's up to me how to implement it. I just wanted to make sure I was not reinventing the wheel. You are correct in suspecting me in a kind of MVC purism (typical for a

Re: Creating Interface

2008-08-28 Thread Phil
On Fri, Aug 29, 2008 at 12:32 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: When you use the idprotocol syntaxt, the compiler assume your object only implements the method declared in your protocol. If you want to use some other function, you have to use an object type that declare thoses

Seeking UI designer

2008-08-28 Thread Benjamin D. Rister
Decimus Software is looking for a user interface designer to work with in designing future versions of our software. Responsibilities: * Work closely with Ben brainstorming and hashing out user interface designs for future products * Produce mockups and specifications of design ideas *

Re: Quitting all active applications

2008-08-28 Thread Marcus
28 aug 2008 kl. 12.36 skrev Phil Faber: Is there a simple way to quit all running applications? Basically I want to achieve the same result as the first stage of hitting 'shut down' (closing all applications) without actually shutting down the system. Take a look at the NSWorkspace

Re: global key bindings

2008-08-28 Thread David Reitter
On 28 Aug 2008, at 00:27, Eric Schlegel wrote: Menus contained in NSStatusItems (and displayed on the right side of the menubar) don't currently respond to command keys at all. This is already reported in Radar. Thanks, I'll stop looking then. FWIW, the binding does work once the menu is

Re: CoreData, SQLite and GUID

2008-08-28 Thread Amy Heavey
My biggest problem is I don't have access to the source code for the application that creates and uses the sqlite database. I think I'll have to look at creating my own application, Ideally, I need a solution that enables me to share data between machines (so I was thinking of a

Re: Creating Interface

2008-08-28 Thread Roland King
I tried that before, making my protocol inherit from the NSObject Protocol and it sort of worked, but not quite. In my case I was using KVO and wanted to call addObserver:forKeyPath:options:context:, something I'm very used to NSObject just doing. However that's not part of the NSObject

Re: Core Data Entity object

2008-08-28 Thread R T
Yes, I set up a master/detail view and IB automatically set up the add button... Enabled:(threeAttributesEntityArrayController.selection) which is described as a multiple-value binding that determines if the NSButton is enabled in the user interface. You wrote: ...master-detail view going

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Jean-Daniel Dupas
Le 28 août 08 à 08:15, Gerriet M. Denkmann a écrit : // this shows the application default icon if CFBundleIconFile = heiß // works ok for CFBundleIconFile = hot - (IBAction)iconForFileN: sender; { NSBundle *mainBundle = [ NSBundle mainBundle ]; NSString *bundlePath =

Re: Creating Interface

2008-08-28 Thread Sherm Pendley
On Thu, Aug 28, 2008 at 9:56 AM, Roland King [EMAIL PROTECTED] wrote: I tried that before, making my protocol inherit from the NSObject Protocol and it sort of worked, but not quite. Protocols aren't inherited. You can inherit an implementation of the NSObject protocol, by writing a subclass

Re: Creating Interface

2008-08-28 Thread Roland King
On Aug 28, 2008, at 10:15 PM, Sherm Pendley wrote: On Thu, Aug 28, 2008 at 9:56 AM, Roland King [EMAIL PROTECTED] wrote: I tried that before, making my protocol inherit from the NSObject Protocol and it sort of worked, but not quite. Protocols aren't inherited. You can inherit an

Re: mark added object in NSArrayController as dirty?

2008-08-28 Thread Keary Suska
8/27/08 6:46 PM, also sprach [EMAIL PROTECTED]: I've got a simple detail view backed by an NSArrayController. The view views the NSArrayController's selection. The NSArrayController manages an array of dictionaries, all very simple. I've implemented validateValue:... and it's being called

Semi-transparent offscreen CALayer

2008-08-28 Thread Shaun Larkin
I'm trying to animate a semi-transparent CALayer (opacity 0.8) by sliding it in from offscreen but it only seems to exist is it's opaque:YES is set, essentially negating any transparent effects. I've look through the documentation but haven't found a solution. I had assumed that when the

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Shawn Erickson
On Thu, Aug 28, 2008 at 5:38 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: But, another problem: when I run my app with CFBundleIconFile = heiß the picture in the dock is just the default app icon. What encoding is being used for your Info.plist? -Shawn

Re: File Extensions Problem

2008-08-28 Thread Ingvar Nedrebo
Adil, I use NSWorkspace and UTI types to do this, as in the code below. Look at the UTI hierarchy and replace public.movie in the code with whichever type covers the files you're interested in. -(NSArray *)mediaFilesInFolder:(NSString *)folderPath { NSMutableArray * files =

Re: Semi-transparent offscreen CALayer

2008-08-28 Thread Shaun Larkin
Solution found, I wasn't setting the bounds properly. - Original Message From: Shaun Larkin [EMAIL PROTECTED] To: cocoa-dev Cocoa-dev@lists.apple.com Sent: Thursday, August 28, 2008 10:16:03 AM Subject: Semi-transparent offscreen CALayer I'm trying to animate a semi-transparent

Re: Deep Recursion

2008-08-28 Thread Michael Ash
On Wed, Aug 27, 2008 at 10:01 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: Yesterday I did some nice recursive programming - the only problem was: I did not intend to do so. As a consequence, there was no defined end to the recursion, which made it essentially infinite. Well, memory -

Re: Get current amount of available RAM

2008-08-28 Thread Michael Ash
On Thu, Aug 28, 2008 at 12:44 AM, Alex Kac [EMAIL PROTECTED] wrote: Right - but that doesn't work for my situation. I need actual free available physical RAM. Like when you use top and it shows you: PhysMem: 1173M wired, 5340M active, 2658M inactive, 9175M used, 1065M free. This free value is

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Shawn Erickson
On Thu, Aug 28, 2008 at 8:32 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Probably the good one, as the Cocoa framework managed to retreive the icon properly. (the About Box display the icon propertly) Well my thinking was it could be that some frameworks have broader support for encodings

Re: CoreData, SQLite and GUID

2008-08-28 Thread Michael Ash
On Wed, Aug 27, 2008 at 1:30 PM, mmalc crawford [EMAIL PROTECTED] wrote: On Aug 27, 2008, at 9:33 AM, Michael Ash wrote: On Wed, Aug 27, 2008 at 5:30 AM, Amy Heavey [EMAIL PROTECTED] wrote: I use an application that I believe is written using CoreData. It is currently quite tedious to

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Jean-Daniel Dupas
I did test with an UTF-8 one (the default encoding). Le 28 août 08 à 17:44, Shawn Erickson a écrit : On Thu, Aug 28, 2008 at 8:32 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Probably the good one, as the Cocoa framework managed to retreive the icon properly. (the About Box display the

Re: File Extensions Problem

2008-08-28 Thread Michael Ash
On Wed, Aug 27, 2008 at 6:59 PM, R.L. Grigg [EMAIL PROTECTED] wrote: Hmm, I guess the wrinkle in this particular case is if the contract doesnt specify something that the programmer assumes to be safe to do (like enumerating backwards), how can you know how to implement your end? I guess there

Re: Quitting all active applications

2008-08-28 Thread Phil Faber
Yes I agree it could be most annoying in the majority of cases to quit other people's apps! All I'm trying to achieve is a tiny app that only quits open apps and then quits itself; the purpose being when I want to release as much memory and disc space as possible before I run another

ODBCKit problems with MySQL DB

2008-08-28 Thread matt
I am having a problem with the ODBCKit, and a MySQL database. I really like the design and usage of the ODBCKit, and it is quite easy to use. There is however quite a serious problem that I cannot get around. When a recordset is returned, I can only see one record. Attempting to move to

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Gerriet M. Denkmann
On 28 Aug 2008, at 22:10, Shawn Erickson wrote: On Thu, Aug 28, 2008 at 5:38 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: But, another problem: when I run my app with CFBundleIconFile = heiß the picture in the dock is just the default app icon. What encoding is being used for your

Re: Quitting all active applications

2008-08-28 Thread Martin Stoufer
A small app that utilized an NSTask object whose system command would be 'killall -u your short username here -m regex'. Where the regex would probably exclude processes that did not include 'login' or anything 'launchd'. This would keep the reaper from killing your loginwindow process as

Re: Core Animation : are text attributes animatable ?

2008-08-28 Thread Rodolfo Niborski
CATransform3D transform = CATransform3DMakeScale(factor, factor, factor); [mainLayer setTransform:transform]; [mainLayer setOpacity:0.0]; The layer instead gets *scaled* by the factor you specify. I tried this, and it works fine as far as smooth animation is concerned. The problem though

Re: ODBCKit problems with MySQL DB

2008-08-28 Thread Martin Stoufer
Matt, I have run across this with the JDBC plugin talking to an Oracle DB. I found that if only one record was returned, this logic bombed in the exact same manner, the workaround was to set the curRecord pointer to the last and read backwards if the record count ==1. Otherwise you just

Re: NSProgressIndicator not responding to calls outside of AppController class

2008-08-28 Thread Randall Meadows
On Aug 28, 2008, at 10:37 AM, Martin Stoufer wrote: I am developing an app that is utilizing some legacy C code that I have massaged into Objective-C classes. In one of them, I am trying to drive an NSProgressIndicator view as defined by the NIB for the project. There is a core processing

Re: mark added object in NSArrayController as dirty?

2008-08-28 Thread Matt Neuburg
On Thu, 28 Aug 2008 08:47:10 -0600, Keary Suska [EMAIL PROTECTED] said: 8/27/08 6:46 PM, also sprach [EMAIL PROTECTED]: I've got a simple detail view backed by an NSArrayController. The view views the NSArrayController's selection. The NSArrayController manages an array of dictionaries, all

Re: Quitting all active applications

2008-08-28 Thread Martin Stoufer
Actually no, since the default kill signal is TERM, apps will be allowed to prompt to save if necessary. This assumes the app is handling that signal properly. We could send KILL or ABRT and that would just end the processes w/o any save options. Randall Meadows wrote: On Aug 28, 2008, at

Re: NSProgressIndicator not responding to calls outside of AppController class

2008-08-28 Thread Martin Stoufer
I totally forgot about the 'display' call. I will try that as a first pass. As for refactoring, that IS the long term solution to the problem, but the legacy code is like a pool of mud when it comes to moving it around. I will need a shot of courage before I dive into that. Randall Meadows

Re: Quitting all active applications

2008-08-28 Thread Clark Cox
GUI applications do not generally handle SIGTERM (or any other signals for that matter). Killing GUI applications is a Bad Thing™ :) Randal is correct, this will lose your saved data in any currently open applications. On Thu, Aug 28, 2008 at 10:39 AM, Martin Stoufer [EMAIL PROTECTED] wrote:

Re: Quitting all active applications

2008-08-28 Thread Jean-Daniel Dupas
Cocoa Application expects a Quit AppleEvent, not a sigterm. SIGTERM will kill the app and it will not have any chance to save the edited document. Try with TextEdit if you don't belive it ;-) Actually no, since the default kill signal is TERM, apps will be allowed to prompt to save if

Re: Quitting all active applications

2008-08-28 Thread Randall Meadows
On Aug 28, 2008, at 11:39 AM, Martin Stoufer wrote: Actually no, since the default kill signal is TERM, apps will be allowed to prompt to save if necessary. This assumes the app is handling that signal properly. We could send KILL or ABRT and that would just end the processes w/o any save

Re: ODBCKit problems with MySQL DB

2008-08-28 Thread matt
Matt, I have run across this with the JDBC plugin talking to an Oracle DB. I found that if only one record was returned, this logic bombed in the exact same manner, the workaround was to set the curRecord pointer to the last and read backwards if the record count ==1. Otherwise you just read

Re: Quitting all active applications

2008-08-28 Thread Martin Stoufer
I had always naively assumed that all the some *Framework underneath an app was setting up signal handlers for you with default behaviours. If this isn't the case, then yes any killall approach will cause loss of data. Now I'm interested into finding out why this isn't the case. Clark Cox

Re: ODBCKit problems with MySQL DB

2008-08-28 Thread Martin Stoufer
So we know there are multiple rows in the db that satisfy your query. Can you verify that multiple rows do show up in the rs object? I find that the call to rs.moveFirst is a bit redundant and the loop condition being [rs moveNext]. This assumes that this call does return a BOOL if successful.

#import, #include, pre-compiled headers

2008-08-28 Thread J. Todd Slack
HI All, Question on #import, #include and pre-compiled headers. I have a bunch of classes that import the same #imports (like QTKit, Quicktime, Cocoa, Foundation, etc, etc) Is there a way that I can just #import them once and not have to for each class? Is that a pre-compiled header?

Re: NSProgressIndicator not responding to calls outside of AppController class

2008-08-28 Thread Martin Stoufer
The display bit did the trick and with all the computing going on, the updating is still responsive. Thanks to Randall for the tips. Martin Stoufer wrote: I totally forgot about the 'display' call. I will try that as a first pass. As for refactoring, that IS the long term solution to the

Re: File Extensions Problem

2008-08-28 Thread Ken Thomases
On Aug 27, 2008, at 5:59 PM, R.L. Grigg wrote: Hmm, I guess the wrinkle in this particular case is if the contract doesnt specify something that the programmer assumes to be safe to do (like enumerating backwards), how can you know how to implement your end? Enumerating NSArrays

Re: #import, #include, pre-compiled headers

2008-08-28 Thread J. Todd Slack
Hi Jon, Thanks, the Headers and Performance section was helpful. -Jason On Aug 28, 2008, at 11:27 AM, Jonathan Hohle wrote: #import and #include do not copy the contents of the other files into the file which contains them, rather it tells the compiler that it is referencing definitions

Convert unicode string into ascii

2008-08-28 Thread Davide Scheriani
hello guys, is a way to convert an unicode string into a simple a-z0-9 string and replace the other wierd chars into a . (full stop)? im doing a small hex reader, so maybe this could help you. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: ODBCKit problems with MySQL DB

2008-08-28 Thread matt
-- Original Message -- From: Jonathan Monroe [EMAIL PROTECTED] Date: Thu, 28 Aug 2008 12:59:44 -0500 On Aug 28, 2008, at 12:19 PM, [EMAIL PROTECTED] wrote: I am having a problem with the ODBCKit, and a MySQL database. I really like the design and

Re: global key bindings

2008-08-28 Thread Eric Schlegel
On Aug 28, 2008, at 5:21 AM, David Reitter wrote: Can you give me a pointer on how to implement global key bindings? (Again, the app has no menu / Dock icon and would want to receive the event without having focus. I need something like Hot Keys in Carbon.) Use the hot key API in

Re: Convert unicode string into ascii

2008-08-28 Thread Martin Stoufer
The simplest way I've accomplished this is: [[NSString alloc] initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding]; Where encoding is :NSUTF8StringEncoding You will then have to replace the unknown char with a . with the NSString method:

Re: mark added object in NSArrayController as dirty?

2008-08-28 Thread Keary Suska
8/28/08 11:37 AM, also sprach [EMAIL PROTECTED]: AFAIK, you can't. And, AFAIK, simply entering a field is enough to trigger editing, so if you set the first blank field as as first responder, validation should be called on end editing. But just for that field, unfortunately. Thanks (and

Re: global key bindings

2008-08-28 Thread Jean-Daniel Dupas
Le 28 août 08 à 14:21, David Reitter a écrit : On 28 Aug 2008, at 00:27, Eric Schlegel wrote: Menus contained in NSStatusItems (and displayed on the right side of the menubar) don't currently respond to command keys at all. This is already reported in Radar. Thanks, I'll stop looking

Re: Convert unicode string into ascii

2008-08-28 Thread Ricky Sharp
Just to point this out, the sequence of ASCII may not be useful at all if the file is say Unicode. The actual bytes making up each char could be ASCII values themselves. Sent from my iPhone On Aug 28, 2008, at 1:53 PM, Martin Stoufer [EMAIL PROTECTED] wrote: The simplest way I've

NSXMLNode and NSXMLElement issue

2008-08-28 Thread Andrew R. Kinnie
Greetings: I am attempting to programmatically create an html (rather, xhtml) document using NSXMLDocument, NSXMLElement, etc. I am able to create the document and it works, but I am not sure how to create text which is not inside a paragraph or another tag which can be a node. e.g.

[Meet] LA CocoaHeads tonight, 8/28 7:30pm

2008-08-28 Thread Rob Ross
Hey LA CocoaHeads. Just a quick reminder that tonight we have our first study group meeting for the Aaron Hillegass book Cocoa Programming for Mac OS X, 3rd Edition. http://search.barnesandnoble.com/Cocoa-Programming-for-Mac-OS-X/Aaron- Hillegass/e/9780321503619/?itm=1 We'll be covering

Re: Quitting all active applications

2008-08-28 Thread Shawn Erickson
On Thu, Aug 28, 2008 at 9:37 AM, Phil Faber [EMAIL PROTECTED] wrote: All I'm trying to achieve is a tiny app that only quits open apps and then quits itself; the purpose being when I want to release as much memory and disc space as possible before I run another memory / processor intensive

Re: Creating Interface

2008-08-28 Thread Chris Hanson
On Aug 28, 2008, at 7:32 AM, Roland King wrote: I don't quite understand why protocols like NSKeyValueObserving aren't formalized and in a .h file somewhere so you could just use them in the same way you can the NSObject protocol. They're documented, why not just write the .h file. There's

Re: NSXMLNode and NSXMLElement issue

2008-08-28 Thread Nate Weaver
You need to use NSXMLNode itself, and not NSXMLElement (since text nodes aren't elements). [NSXMLNode textWithStringValue:someString] or - [[NSXMLNode alloc] initWithKind:NSXMLTextKind], followed by - setStringValue:. Then just addChild: or insertChild:atIndex: with your new text node as

Re: [Moderator] Re: iphone SDK questions

2008-08-28 Thread Bob Sabiston
On Aug 27, 2008, at 8:30 PM, CocoaDev Admins wrote: I've been given explicit instructions to enforce the non-disclosure agreement when moderating this list. So that's what I do. The admins in the discussions groups should be following the same rules, and I've passed along the information.

Re: [Moderator] Re: iphone SDK questions

2008-08-28 Thread Eric Gorr
On Aug 28, 2008, at 4:04 PM, Bob Sabiston wrote: On Aug 27, 2008, at 8:30 PM, CocoaDev Admins wrote: I've been given explicit instructions to enforce the non-disclosure agreement when moderating this list. So that's what I do. The admins in the discussions groups should be following the

[Moderator] Re: iphone SDK questions

2008-08-28 Thread Scott Anguish
thanks for you comments and understanding, but please direct them off- list rather than to cocoa-dev. scott [moderator[ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

What is the preferred aynchronous data load using a common protocol like HTTP?

2008-08-28 Thread Lee, Frederick
Greetings: I need to continuously receive data (textual, xml format) from a server asynchronously, in the background to the ignorance of the end-user. That is, to be able to retrieve a stream of xml data (loading/processing variables) onto the front-end until the user chooses to exit.

Re: [Moderator] Re: iphone SDK questions

2008-08-28 Thread Robert Claeson
On 28 Aug 2008, at 22:15, Eric Gorr wrote: On Aug 28, 2008, at 4:04 PM, Bob Sabiston wrote: On Aug 27, 2008, at 8:30 PM, CocoaDev Admins wrote: I've been given explicit instructions to enforce the non- disclosure agreement when moderating this list. So that's what I do. The admins in

Undocumented Leopard support for overlapping sibling views

2008-08-28 Thread Nathan Vander Wilt
According to two list postings (http://lists.apple.com/archives/cocoa-dev/2007/Nov/msg01760.html , http://lists.apple.com/archives/cocoa-dev/2007/Nov/msg01764.html) both by Apple employees, overlapping sibling subviews are fully supported in Leopard (and presumably beyond). However, the

programatically quit a program

2008-08-28 Thread Wayne Shao
Hi What is the correct way to quit a cocoa app? I could use C exit() but that would loose the chance to invoke the right callbacks for clean up. What is the call that would be equivalent to user explicitly selecting the Quit from the menu. I only found this [[NSApplication sharedApplication]

Re: Convert unicode string into ascii

2008-08-28 Thread Andrew Farmer
On 28 Aug 08, at 12:08, Ricky Sharp wrote: Just to point this out, the sequence of ASCII may not be useful at all if the file is say Unicode. The actual bytes making up each char could be ASCII values themselves. Unicode is a character set, not an encoding. I'm not sure about UTF-16 or

Re: programatically quit a program

2008-08-28 Thread Robert Claeson
On 28 Aug 2008, at 22:38, Wayne Shao wrote: What is the correct way to quit a cocoa app? I could use C exit() but that would loose the chance to invoke the right callbacks for clean up. What is the call that would be equivalent to user explicitly selecting the Quit from the menu. I only

Re: Undocumented Leopard support for overlapping sibling views

2008-08-28 Thread j o a r
On Aug 28, 2008, at 1:28 PM, Nathan Vander Wilt wrote: According to two list postings (http://lists.apple.com/archives/cocoa-dev/2007/Nov/msg01760.html,http://lists.apple.com/archives/cocoa-dev/2007/Nov/msg01764.html ) both by Apple employees, overlapping sibling subviews are fully supported

Re: Undocumented Leopard support for overlapping sibling views

2008-08-28 Thread Ricky Sharp
On Aug 28, 2008, at 3:28 PM, Nathan Vander Wilt wrote: According to two list postings (http://lists.apple.com/archives/cocoa-dev/2007/Nov/msg01760.html , http://lists.apple.com/archives/cocoa-dev/2007/Nov/msg01764.html) both by Apple employees, overlapping sibling subviews are fully

Re: programatically quit a program

2008-08-28 Thread Andrew Farmer
On 28 Aug 08, at 13:38, Wayne Shao wrote: What is the correct way to quit a cocoa app? I could use C exit() but that would loose the chance to invoke the right callbacks for clean up. What is the call that would be equivalent to user explicitly selecting the Quit from the menu. I only

Re: programatically quit a program

2008-08-28 Thread Ken Thomases
On Aug 28, 2008, at 3:38 PM, Wayne Shao wrote: What is the correct way to quit a cocoa app? I could use C exit() but that would loose the chance to invoke the right callbacks for clean up. What is the call that would be equivalent to user explicitly selecting the Quit from the menu. I

  1   2   >