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 = [ infoDic

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 * and maintain the category > implementation in

Re: Design Question: Bindings & Custom Views

2008-08-28 Thread Negm-Awad Amin
Am Do,28.08.2008 um 10:15 schrieb 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 *

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 selec

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 phrase

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 at

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 i

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 t

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 list

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 app

[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 Tel

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 *) listener and I get "invalid receiver type 'id *' Funny enough after I get another warning

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. > Wh

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 am

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 autoreleas

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 t

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 NSMutableDi

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-rela

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 Glu

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 th

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 yo

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 = [ mainBu

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 *) listener and I get "invalid receive

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 c

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 id 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 functi

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 * Overs

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 class

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 server/clien

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 pr

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 *bundlePat

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 subcla

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 implemen

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 call

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 calayer

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 = [NSMutabl

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 Sent: Thursday, August 28, 2008 10:16:03 AM Subject: Semi-transparent offscreen CALayer I'm trying to animate a semi-transparent CALayer (opacity 0.8) by slidi

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, memo

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" val

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 encodin

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 qu

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 th

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

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 memory

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 an

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

NSProgressIndicator not responding to calls outside of AppController class

2008-08-28 Thread Martin Stoufer
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 loop that originally spit out multiple '.' to stdout as i

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 -m '. 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 well! Phil Faber wrote: Yes I

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 i

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 rea

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 l

Re: Quitting all active applications

2008-08-28 Thread Randall Meadows
On Aug 28, 2008, at 10:46 AM, Martin Stoufer wrote: A small app that utilized an NSTask object whose system command would be 'killall -u -m '. And that would be a great way to lose data, if any of the applications getting killed had unsaved documents.

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 >> dictionarie

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 10:

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 wro

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 nece

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 o

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

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 wro

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.

Re: ODBCKit problems with MySQL DB

2008-08-28 Thread Jonathan Monroe
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 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 re

#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? Wo

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 probl

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 backwar

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 f

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-z>0-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 an

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 Carbo

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: stringByRepl

Re: Convert unicode string into ascii

2008-08-28 Thread Wade Tregaskis
is a way to convert an unicode string into a simple a-z>0-9 string and replace the other wierd chars into a "." (full stop)? im doing a small hex reader, so maybe this could help you. CFDataRef CFStringCreateExternalRepresentation ( CFAllocatorRef alloc, CFStringRef theString, CFString

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. > > Thank

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 t

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 accom

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. co

[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 coverin

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 norm

Re: Quitting all active applications

2008-08-28 Thread Michael Watson
Even if this is the case, if you send a kill signal to a GUI Cocoa application, that application's app delegate will not receive - applicationWillTerminate:. If the application has any important cleanup/shut down code to run, it won't happen. I'd go with "don't kill GUI apps unless they're m

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 s

[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. Contac

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. I'm

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 the

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 offi

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] te

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 o

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 support

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 foun

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 onl

  1   2   >