Re: backporting nibs question / Rhapsody license anyone?

2008-08-06 Thread Jean-Daniel Dupas
Le 6 août 08 à 09:50, Bill Bumgarner a écrit : On Aug 6, 2008, at 12:19 AM, Ralf Edmund Stranzenbach wrote: because i'm currently facing a comparable situation - i'd like to migrate old NeXT style mails and mailboxes and also some old NeXTstep based applications for my personal use - i'm

Re: autorelease CGImageRef?

2008-08-06 Thread Jean-Daniel Dupas
Be carefull when you mix CFType memory management, and obj-c memory management. It works well when you do not use GC, but may become problematic if you do not take special care with GC code. If I'm not wrong, it should be something like this: [NSMakeCollectable(aCGImageRef) autorelease];

Re: autorelease CGImageRef?

2008-08-08 Thread Jean-Daniel Dupas
Le 8 août 08 à 16:17, Thomas Engelmeier a écrit : Am 07.08.2008 um 17:24 schrieb Chris Hanson: This appears correct, except for the fact that, for reasons known only to Apple, although CFMakeCollectable is available in 10.4, the trivial NSMakeCollectable macro is available only in 10.5.

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Jean-Daniel Dupas
Le 8 août 08 à 20:56, Ken Ferry a écrit : Hi James, Nicholas, I still bet it's someone holding too many file descriptors open. Nicholas, when you said this, but I have forced the thumbnail creation to have at most 10 files opened at the same time, what did you mean? You can see what files

Re: How to tell whether an executable supports GC?

2008-08-09 Thread Jean-Daniel Dupas
You can also create your own helper tool compiled with GC support and, that just preflight the bundle you pass as argument and return the result. It's a little more works, but it's cleaner too. Le 9 août 08 à 03:32, André Pang a écrit : On 08/08/2008, at 3:18 PM, Chris Suter wrote: You

Re: Using @selector()

2008-08-09 Thread Jean-Daniel Dupas
Le 9 août 08 à 10:34, Christian Giordano a écrit : Hi guys, I'm a newbie and I'm reading a book which shows the two different option to link programmatically a control to an action: SEL mySelector; mySelector = @selector(methodName:); [myButton setAction:mySelector]; OR SEL mySelector;

Re: I don't understand why this is leaking...

2008-08-10 Thread Jean-Daniel Dupas
Le 10 août 08 à 00:48, Cate Tony a écrit : This code is leaking: - (void)saveItemExtensions:(id)sender { NSMutableString* itemExtensionsFilePath = [NSMutableString stringWithString:@~/Library/Preferences/MyApp/extensions.abc]; NSDictionary* extensions = [NSDictionary

Re: Non-NSObject object and garbage collection

2008-08-11 Thread Jean-Daniel Dupas
Le 11 août 08 à 14:25, Antonio Nunes a écrit : On 11 Aug 2008, at 13:14, Antonio Nunes wrote: Will it cause a memory leak if I treat the Quartz object in the same way as I do to all my NSObject descendants, i.e. no retains and rely only on garbage collection? You either take care of the

Re: How to check the capital letter?

2008-08-11 Thread Jean-Daniel Dupas
Le 11 août 08 à 15:29, Ron Fleckner a écrit : On 11/08/2008, at 10:52 PM, Macarov Anatoli wrote: HI! Cocoa, Obj-C. How to check the capital letter? Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @Aa; char first =

Re: Use of AppKit in command-line app on headless node

2008-08-11 Thread Jean-Daniel Dupas
Le 11 août 08 à 22:26, Ken Ferry a écrit : Hi Rick, I think you might be misreading that technote.. what it says is that trying to guess which methods are and are not safe doesn't work, because a method that does not happen to require the windowserver in one release may require it in another.

Re: Accessing memory of another application?

2008-08-12 Thread Jean-Daniel Dupas
In practice, it's perfectly possible to access other processes memory using public functions (it require some privileges since 10.4 intel). But to do it you have to use the low-level mach API and that's off topic here. And no, code injection is not used only by virus. (see

Re: Generate back trace programmatically?

2008-08-12 Thread Jean-Daniel Dupas
Le 13 août 08 à 01:34, Nick Zitzmann a écrit : On Aug 12, 2008, at 5:28 PM, Joseph Kelly wrote: is there a known reliable way to generate a back trace from the current point in a given thread's call stack? Yes. (Hint: See the NSException documentation in Leopard, and the

Re: Accessing memory of another application?

2008-08-13 Thread Jean-Daniel Dupas
Le 13 août 08 à 15:27, Kyle Sluder a écrit : On Tue, Aug 12, 2008 at 10:14 PM, Steve Byan [EMAIL PROTECTED] wrote: Actually, the man-page is incomplete and doesn't tell you how to read and write another process's memory. The manpage also fails to mention the undocumented PT_DENY_ATTACH

Re: @try @catch

2008-08-14 Thread Jean-Daniel Dupas
Le 14 août 08 à 13:53, Devon Ferns a écrit : On 14-Aug-08, at 7:21 AM, Graham Cox wrote: On 14 Aug 2008, at 8:58 pm, Georg Seifert wrote: is it recommended to use @try .. @catch blocks as flow control like it is used in Python. They say explicitly to use it rather than do a lot of

Re: Clearing a Memory Buffer?

2008-08-18 Thread Jean-Daniel Dupas
Le 18 août 08 à 15:19, Dave a écrit : Hi All, I'm fairly new to Cocoa and was wondering if there are OS functions to Copy and Clear/Fill Memory available? I've tried searching for obvious names like MemoryZero, ZeroMemory, CopyMemory etc. but can't seem to find anything. Thanks a lot

Re: Tiger Compatible OpenGL Screenshot Code

2008-08-20 Thread Jean-Daniel Dupas
Le 20 août 08 à 19:54, David Duncan a écrit : On Aug 20, 2008, at 10:39 AM, Eric Hoaglin wrote: http://developer.apple.com/samplecode/OpenGLScreenSnapshot/index.html (Leopard+) The basic technique from this sample should work on 10.4 (the previous version of this sample did) but it

Re: Control-Click vs Right-Click in NSTableView

2008-08-20 Thread Jean-Daniel Dupas
Le 21 août 08 à 00:02, Matthew Mashyna a écrit : I have an NSTableView subclass whose only override method is rightMouseDown. I override it so I can have it select the table row before validating and presenting the context menu (by then passing it up to [super rightMouseDown]). This

Re: !foo vs foo == nil

2008-08-21 Thread Jean-Daniel Dupas
haha gros malin why free (func) does this test? arf sorry your trusting scale is going to zero Not sure what you're trying to say. According to the C standard, given a variable (foo) the following are identical: if(foo == 0) if(foo == nil) if(foo == NULL) if(!foo) if(foo == '0') and any

Re: !foo vs foo == nil

2008-08-21 Thread Jean-Daniel Dupas
Le 21 août 08 à 10:06, Clark Cox a écrit : On Thu, Aug 21, 2008 at 12:21 AM, Thomas Davie [EMAIL PROTECTED] wrote: On 21 Aug 2008, at 09:06, Jules Colding wrote: On 21/08/2008, at 01.56, John C. Randolph wrote: On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote: There was a common

Re: !foo vs foo == nil

2008-08-21 Thread Jean-Daniel Dupas
Le 21 août 08 à 19:06, Scott Ribe a écrit : Wow, don't check the list for a few days and look what happens! After all, that's why nil (and Nil) exist at all, rather than just reusing NULL. Actually nil exists at all because Objective-C was created *before* NULL was in such standard use!

Re: Implementing isEqual: and hash

2008-08-23 Thread Jean-Daniel Dupas
Le 23 août 08 à 13:41, Graham Cox a écrit : I have a class for which equality can be defined as having the same internal string value (which happens to be a UUID-turned-string). I can easily implement isEqual: based on that but the docs say I also need to implement -hash. Any pointers on

Re: Implementing isEqual: and hash

2008-08-23 Thread Jean-Daniel Dupas
Le 23 août 08 à 15:39, Graham Cox a écrit : On 23 Aug 2008, at 9:52 pm, Jean-Daniel Dupas wrote: Le 23 août 08 à 13:41, Graham Cox a écrit : I have a class for which equality can be defined as having the same internal string value (which happens to be a UUID-turned- string). I can

Re: How to read pixel values of monochrome images

2008-08-24 Thread Jean-Daniel Dupas
Le 24 août 08 à 05:55, John C. Randolph a écrit : On Aug 23, 2008, at 2:51 PM, Shawn Erickson wrote: On Fri, Aug 22, 2008 at 2:54 AM, Eduardo Areitio [EMAIL PROTECTED] wrote: I'm trying to read individual pixel values in a monochrome image using NSReadPixel, but I haven't been able to.

Re: Reading from Streams - Convenience methods

2008-08-24 Thread Jean-Daniel Dupas
Le 24 août 08 à 09:29, Ananda Bollu a écrit : Hi, What is the best way to read and write data to a Stream. In Java, DataInputStream and DataOutputStream classes provide various serialization methods such as, readInt(), readLong(), readBoolean() etc. Is there anything equivalent for

Re: Modal window

2008-08-25 Thread Jean-Daniel Dupas
Le 25 août 08 à 12:04, Marcus a écrit : 25 aug 2008 kl. 11.03 skrev Macarov Anatoli: When modal window is started up the application stops carrying out other processes. How to work out this issue? Cod: - (void)showCustomDialog: (NSWindow *)window widi:(NSPanel *)windowDialog { if

Re: 64-bit = Objc 2.0????

2008-08-25 Thread Jean-Daniel Dupas
Le 25 août 08 à 15:18, Stéphane Sudre a écrit : Probably a stupid question but I don't see anything in the objc headers or in some old slides corroborating this. When you build a project for a 64-bit architecture (such as x86_64), does this imply the Objective-C version for this

Re: Accessing Audio Samples in Cocoa

2008-08-25 Thread Jean-Daniel Dupas
Le 25 août 08 à 16:02, Joseph Ayers a écrit : I am interested in doing some signal processing on the audio channels of a QuickTime Movie. I can retrieve the buffer using MovieAudioExtractionFillBuffer, but the available examples specify the buffer as type Byte*. I am interested in

Re: Accessing Audio Samples in Cocoa

2008-08-25 Thread Jean-Daniel Dupas
: Hi Jean-Daniel: My issue is with the structure of the actual buffer and how to access the individual audio data samples. For example, is each data sample a UInt16 and can one count on the first sample pointed at by the buffer pointer being the left channel, the second sample the right channel

Re: is LSEnvironment working with Leopard?

2008-08-26 Thread Jean-Daniel Dupas
It' works on Leopard, but only as the documentation states: “These environment variables are set only for applications launched through Launch Services. If you run your executable directly from the command line, these environment variables are not set.” And unfortunately, Xcode does not

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

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: 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: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Jean-Daniel Dupas
Le 28 août 08 à 17:10, Shawn Erickson a écrit : 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: CFBundleIconFile: heiß or hot?

2008-08-29 Thread Jean-Daniel Dupas
Le 28 août 08 à 23:00, Kyle Sluder a écrit : On Thu, Aug 28, 2008 at 12:50 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: It starts with: ?xml version=1.0 encoding=UTF-8? Just because it *says* it's encoded in UTF-8 doesn't mean it *is*. For all you know it was saved in MacRoman. --Kyle

Re: NSArray as a static

2008-09-01 Thread Jean-Daniel Dupas
Unlike java, Obj-C does not have the concept of class variable. Your static variable is a classic C variable, and C variable are not automatically initialized to NULL. The first time you call init, relationshipMatch may contains anything and may not be NULL, and so it will never be properly

Re: NSArray as a static

2008-09-01 Thread Jean-Daniel Dupas
Le 1 sept. 08 à 21:18, Kyle Sluder a écrit : On Mon, Sep 1, 2008 at 2:29 PM, Richard Good [EMAIL PROTECTED] wrote: What I want is how to use the Java idea of a class static variable in Objective C Because Objective-C doesn't have class variables (as Jean-Daniel noted), you have to use

Re: NSArray as a static

2008-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 08 à 00:13, Steven Noyes a écrit : On Sep 1, 2008, at 1:38 PM, Jean-Daniel Dupas wrote: Unlike java, Obj-C does not have the concept of class variable. Your static variable is a classic C variable, and C variable are not automatically initialized to NULL. The first time you

Re: NSArray as a static

2008-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 08 à 16:29, Clark Cox a écrit : On Tue, Sep 2, 2008 at 12:33 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Le 2 sept. 08 à 00:13, Steven Noyes a écrit : On Sep 1, 2008, at 1:38 PM, Jean-Daniel Dupas wrote: Unlike java, Obj-C does not have the concept of class variable. Your

Re: Font Color In CTLineDraw?

2008-09-03 Thread Jean-Daniel Dupas
Le 3 sept. 08 à 17:17, Mike Rossetti a écrit : Thanks for clearing that up David. Apparently one cannot open an NSGraphicsContext within a CGContext, but I will experiment more this evening. I'm discovering that drawing attributed text via CTLineDraw has significant limitation, but for

Re: NSDate autorelease problem

2008-09-03 Thread Jean-Daniel Dupas
Le 3 sept. 08 à 19:02, [EMAIL PROTECTED] a écrit : Hi, I'm trying to calculate the elapsed time by calling this twice and getting the difference. double Seconds() { return [[NSDate date] timeIntervalSince1970]; } This is being called from an audio play back proc which is being called

Re: Can I get a FILE* from Cocoa (NSFileHandle )?

2008-09-04 Thread Jean-Daniel Dupas
Le 4 sept. 08 à 19:09, Paul Archibald a écrit : I have gotten some suggestions on a problem which require access to standard C calls. In particular, one poster suggested that I use some calls which require a FILE*, when all I have at this point are NSTask, NSPipe, and NSFileHandle

Re: Oracle and Objective C++

2008-09-05 Thread Jean-Daniel Dupas
Le 5 sept. 08 à 17:13, Bradley Randy a écrit : But I get the following errors when I try to compile it. Line Location occiAQ.h:280: error: 'oracle::occi::aq::Subscription::Protocol' has a previous declaration here Line Location occiAQ.h:280: error:

Re: Keyboard accelerators

2008-09-05 Thread Jean-Daniel Dupas
Le 5 sept. 08 à 21:40, Peter Hudson a écrit : I need to set the combination of option + command + up / down arrow in the main menu. It does not seem to be possible to do this in interface builder. Any suggestions ? Peter Yes, doing it in Interface Builder . What do you

Re: Posting Keyboard Events

2008-09-06 Thread Jean-Daniel Dupas
Le 6 sept. 08 à 14:00, Peter N Lewis a écrit : At 20:15 -0600 5/9/08, Dave DeLong wrote: How on earth can I post system keyboard events (without getting a beep)? As Ken mentioned, first off make sure the key has somewhere to go. After that, this is roughly the code I use in Keyboard

Re: Forcing finalization on the main thread?

2008-09-07 Thread Jean-Daniel Dupas
Le 8 sept. 08 à 00:25, Nick Zitzmann a écrit : I've got a C data structure in a GC-enabled app. I'm deallocating the structure when the parent object is finished, in -dealloc and - finalize. I've found out the hard way that the data structure is not thread-safe, and eventually causes a

Re: BOOL array

2008-09-09 Thread Jean-Daniel Dupas
Le 9 sept. 08 à 12:24, Alex Reynolds a écrit : I am currently putting 320 to 480 character long NSString * instances into an NSMutableArray. The characters are 0 or 1. I guess I could use an int array, but I'm looking to speed up my app and reduce storage. Is it possible to create a BOOL

Re: Cocoa application running very slow under 64 bit

2008-09-11 Thread Jean-Daniel Dupas
Le 11 sept. 08 à 13:01, Frank Illenberger a écrit : Hi there, I migrated an existing cocoa application to run under x86_64 with Xcode 3.1 / Mac OS 10.5.4. The app still runs fine under 32 bit but when started in x86_64 mode, it runs about 3-4 times slower. A shark profile reveals the

Re: BOOL array

2008-09-11 Thread Jean-Daniel Dupas
Le 11 sept. 08 à 13:32, dreamcat7 a écrit : Yes the NSMutableData needs this category method then it work. @interface NSMutableData (charArray) - (char*)char; @end @implementation NSMutableData (charArray) - (char*)char { char * foo = self.mutableBytes; return foo; } @end

Mixing ObjC and C++ STL on same ObjC source file

2008-09-12 Thread Daniel Luis dos Santos
Hello ! I have an objective C class and want to call a method on a class in C+ +. As argument to the C++ class is a map instance of the STL. The ObjC class definition is on a file with a mm extension. I have std::map *var as a member variable of the ObjC class. When I compile the code there

Re: Mixing ObjC and C++ STL on same ObjC source file

2008-09-13 Thread Daniel Luis dos Santos
On Sep 12, 2008, at 11:21 AM, Daniel Luis dos Santos wrote: The problem was that in CVDisplayPipeline.h I was declaring the map as a return type of a method, but without specifying the template types (caused by my relative ignorance of C++). Now I have another problem, which I wonder

Re: Getting NSTimeZone for a given NSDate

2008-09-15 Thread Jean-Daniel Dupas
Le 15 sept. 08 à 09:56, Jason Coco a écrit : On Sep 15, 2008, at 03:49 , Markus Spoettl wrote: Hi List, I just know it must be there but I can't see it. How can I get to the NSTimeZone for a given NSDate. When using -description: the date got a time zone, so it's stored in there but

Re: Modal dialog without NSApplication

2008-09-18 Thread Jean-Daniel Dupas
Le 18 sept. 08 à 15:12, brodhage a écrit : Hi, I am developing application software for Mac and Windows. Most of the code is developed using ObjectC - this way most of the code can be used for both OS. Only the OS depending stuff - like showing dialogs, menus... - is separated. The

How to call functions of a C dylib on a C++ dylib

2008-09-18 Thread Daniel Luis dos Santos
I am having trouble getting it to compile. From what I understand there must be an extern C before the inclusion of the C lib's header files. I still get a link error. Is there anything else to it ? ___ Cocoa-dev mailing list

Re: How to call functions of a C dylib on a C++ dylib

2008-09-18 Thread Daniel Luis dos Santos
Sorry, I forgot to say that I was already doing that. And it does build, my problem is in the link stage. On Sep 18, 2008, at 3:00 PM, Negm-Awad Amin wrote: Am Do,18.09.2008 um 15:55 schrieb Daniel Luis dos Santos: I am having trouble getting it to compile. From what I understand

Re: Modal dialog without NSApplication

2008-09-18 Thread Jean-Daniel Dupas
Le 18 sept. 08 à 16:15, brodhage a écrit : Hi, thank you very much for your quick answer, Jean-Daniel. If you want a complexe dialog... Yes. So I guess CFUserNotification does not help. I don't understand why using NSApp for this kind of works will have an impact on the remaining

Re: how to set Document type and its icon programatically

2008-09-20 Thread Jean-Daniel Dupas
Le 19 sept. 08 à 11:22, Nick Rogers a écrit : Hi, My cocoa app is not a document based app, but saves a binary file to the disk. I can set this file's name and extension and icon by going to the Target properties and adding a new document type there. It was working fine and the resulting

Re: fullscreen quicktime across multiple monitors

2008-09-21 Thread Jean-Daniel Dupas
You are free to setup a window yourself , add a QTMovieView in it, and display it as you need. NSRect contents = [aScreen frame]; contents.origin = NSZeroPoint; NSWindow *window = [super initWithContentRect:contents

Re: CGLayer questions

2008-09-24 Thread Jean-Daniel Dupas
Le 24 sept. 08 à 06:04, Alex Reynolds a écrit : Is it possible to take a CGLayer and turn it into a bitmap representation? Create a CGBitmapContext and draw you layer into it. Also, is it possible to grab a CGRect subset of a CGLayer and append that to a new CGLayer, so that it isn't

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Jean-Daniel Dupas
Le 25 sept. 08 à 17:53, Oleg Krupnov a écrit : I actually have tried this. My code looks like this (is it correct?): @implementation Worker - (void)threadMain:(id)data { runLoop = [NSRunLoop currentRunLoop]; [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; while(true) {

sizeof(unsigned long long)

2008-09-27 Thread Daniel Luis dos Santos
Hello, I have a piece of C code that generates an unsigned long long from an sequence of unsigned char's. When I do sizeof(unsigned long long) i get 8. Afterwards I try to shift each unsigned char into its position along the destination unsigned long long variable, but I get a warning from

Re: Parsing integers from strings

2008-10-07 Thread Jean-Daniel Dupas
Le 7 oct. 08 à 07:08, Cyrus Najmabadi a écrit : I've been unsuccessful finding the right class in cocoa to help me parse integers inside NSStrings. I'm looking for something similar to java's Long.parseInt(string, radix). i.e. something that can understand a stream of numbers along with a

Re: Optimized pixel manipulation

2008-10-08 Thread Jean-Daniel Dupas
CGImage does not provide an efficient way to update , but maybe CGImage is not what you want. Where your image come from, why do you need a CGImageRef and what are you trying to do with it ? Le 8 oct. 08 à 17:01, Christian Giordano a écrit : I'm modifying frequently the pixels of the

Re: Optimized pixel manipulation

2008-10-08 Thread Jean-Daniel Dupas
, but clearly I have no idea which other options I have. Maybe using OpenGL (ES)? The ultimate aim is of course to renderer the result of all the manipulation, at the moment this happens in a UIView.drawRect. Cheers, chr On Wed, Oct 8, 2008 at 4:25 PM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote

Re: Mirror...rorriM : Details Please

2008-10-09 Thread Jean-Daniel Dupas
It does not differenciate bewteen X and Y, but it allows -1. Just use the text field to enter the value instead of using the slider. Le 9 oct. 08 à 10:36, M Pulis a écrit : OK, I can see one of my problems IB and FH (funhouse) do not allow -1 nor differentiate between X and Y scale

Re: Strategy for naming support folder

2008-10-13 Thread Jean-Daniel Dupas
Le 10 oct. 08 à 20:04, Uli Kusterer a écrit : On 10.10.2008, at 07:15, Graham Cox wrote: On 10 Oct 2008, at 11:30 am, j o a r wrote: Most apps use just the name, but I've never liked that and I support your idea of using the bundle identifier. Makes a lot of sense. Yep, seemed to make

Re: keystroke logger for Mac OS X

2008-10-13 Thread Jean-Daniel Dupas
Note that this technic will not be able to catch secured events: http://developer.apple.com/technotes/tn2007/tn2150.html Le 13 oct. 08 à 16:24, Dave DeLong a écrit : Use a CGEventTap for the keystroke capturing, and the NSWorkspace class to get the info you need about the frontmost app.

Re: how to complete c/s app

2008-10-15 Thread Jean-Daniel Dupas
Use Distributed Object, there is plenty of sample codes. Le 15 oct. 08 à 12:43, han a écrit : how to complete a c/s app.Is there a sample code? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Decoding OSStatus values

2008-10-15 Thread Jean-Daniel Dupas
Le 15 oct. 08 à 16:49, Richard Dearlove a écrit : Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\

Re: Length of a filename

2008-10-16 Thread Jean-Daniel Dupas
Le 16 oct. 08 à 11:31, Gerriet M. Denkmann a écrit : How can I check the appositeness of a filename? This will not work: if ( [potentialPath length] 255 ) ... error: filename too long because HFS+ uses some decomposed form. This might work: if ( [[ NSString stringWithUTF8String:

Re: Screen not redrawing

2008-10-18 Thread Jean-Daniel Dupas
Le 18 oct. 08 à 05:50, Russ a écrit : Check to make sure [window isFlushWindowDisabled] is NO and [window isAutodisplay] is YES. Yes, both OK. Also, try dropping a standard control (e.g. a button) in and see if it redraws to the pressed state when you press it. When I do this

Re: what do you use to make icons and similar?

2008-10-19 Thread Jean-Daniel Dupas
Le 19 oct. 08 à 11:20, Roland King a écrit : I need a make a few icons and other graphics for my app, simple stuff like a small yellow triangle with an invisible background. I'm totally and completely graphically challenged which never helps. I can't find a simple (preferably free!)

Re: what do you use to make icons and similar?

2008-10-19 Thread Jean-Daniel Dupas
Le 19 oct. 08 à 16:32, John Joyce a écrit : : I believe png are really what I'm trying to make here, they seem to be recommended. PNGs are not resolution independent, although they are perfectly acceptable. Saving as a TIFF then converting it to PDF with Preview works well for me. Please

Re: Retain

2008-10-24 Thread Jean-Daniel Dupas
All answers you need are in this guide: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/ObjectOwnership.html Le 24 oct. 08 à 07:24, Ron Green a écrit : If I call NSString w = [NSString stringWithFormat:@something %i, x]; Am I now suppose to call retain on w?

Re: Apple Developer Forums

2008-10-25 Thread Jean-Daniel Dupas
Le 25 oct. 08 à 05:04, Stefan Arentz a écrit : On Fri, Oct 24, 2008 at 12:15 PM, Randall Meadows [EMAIL PROTECTED] wrote: It looks like we're legit to discuss now! http://devforums.apple.com/ Personally I think this is a big joke. You need to be signed up as a paying developer to access

Re: How to check the number of pending events in the application event queue?

2008-10-27 Thread Jean-Daniel Dupas
Le 27 oct. 08 à 13:54, Oleg Krupnov a écrit : In my app I'd like to perform some background task without affecting the responsiveness of the UI. To avoid multi-threading, I just postpone the task to a moment when the user becomes and stays idle for a certain time. Have you a good reason to

Re: Not so long filenames

2008-10-28 Thread Jean-Daniel Dupas
Le 28 oct. 08 à 12:50, Gerriet M. Denkmann a écrit : On 28 Oct 2008, at 01:39, Jeremy Pereira wrote: On 26 Oct 2008, at 09:55, Gerriet M. Denkmann wrote: On 26 Oct 2008, at 00:30, Postmaster wrote: On 14 Oct 2008, at 21:00, Gerriet M. Denkmann wrote: On 14 Oct 2008, at 18:07,

Re: Code signing validation

2008-10-28 Thread Jean-Daniel Dupas
You may fill a feature request to ask Apple to publish this API that is part of the Security Framework: http://www.opensource.apple.com/darwinsource/10.5.5/libsecurity_codesigning-33803/lib/SecStaticCode.h Le 28 oct. 08 à 10:36, [EMAIL PROTECTED] a écrit : Hello list Having implemented

Path handling routines

2008-10-29 Thread Daniel Luis dos Santos
Hello, Are there in the Foundation framework (or anywhere else on the Cocoa platform) path handling routines (directory extraction, path decomposition) ? Cheers ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Is there an equivalent to std::min/std::max for Cocoa programmer's

2008-10-29 Thread Jean-Daniel Dupas
MIN(), MAX() (from Foundation/NSObjCRuntime.h) ? Le 29 oct. 08 à 18:26, Michael A. Crawford a écrit : -Michael___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Customizing controls: Inheritance bad?

2008-10-30 Thread Jean-Daniel Dupas
Le 30 oct. 08 à 16:51, Brian Williams a écrit : Hello, I'm brand new to Cocoa/Obj-C and I'm working on converting an app. to use Cocoa... I've heard that, in general, if you are using inheritance in Cocoa, you're not following the typical standard design pattern. Is this true? To

Re: Type comparison warning

2008-10-30 Thread Jean-Daniel Dupas
Le 30 oct. 08 à 19:01, Scott Ribe a écrit : Not true, NSInteger and NSUInteger are typedefs for plain integer types, *not* Objective-C objects. Yes, yes, yes. Thanks for pointing that out. I'm not doing 10.5-only development yet, so I read NSNumber because I'm not used to seeing NSInteger

Re: Porting from Windows to Mac

2008-10-31 Thread Jean-Daniel Dupas
Le 30 oct. 08 à 23:49, Stefan Werner a écrit : I would also recommend that you start over with the design of your GUI, for the sensibilities and design principles of Mac OS X are very different. This difference is exacerbated if you consider the age of MFC... You are aware that MFC

Re: Splitting model I/O for optimization

2008-11-01 Thread Jean-Daniel Dupas
Le 1 nov. 08 à 09:31, Oleg Krupnov a écrit : In my app all model data are saved in a single file. For the purpose of optimizing file I/O, I'm looking for a solution that would not force me to resave the entire model when only a tiny bit of it has changed, and also allow loading (fetching) the

Re: CGFloat and 64 Bit

2009-02-09 Thread Jean-Daniel Dupas
Le 9 févr. 09 à 06:37, Rob Keniger a écrit : On 08/02/2009, at 9:52 PM, Gerriet M. Denkmann wrote: When I build a Cocoa Project with 32/64 bit, this line gets a warning: NSSize a = NSMakeSize( 11.2, 22.4); which went away using: NSSize a = NSMakeSize( (CGFloat)11.2,

Re: CGFloat and 64 Bit

2009-02-09 Thread Jean-Daniel Dupas
Le 9 févr. 09 à 09:50, Rob Keniger a écrit : On 09/02/2009, at 6:33 PM, Jean-Daniel Dupas wrote: NSSize a = NSMakeSize( 11.2f, 22.4f); The f suffix is a hint to the compiler that it's a float value. A very bad idea as it would force usage of float in 64bits applications where NSSize

Re: CGFloat and 64 Bit

2009-02-09 Thread Jean-Daniel Dupas
Le 9 févr. 09 à 10:14, Rob Keniger a écrit : On 09/02/2009, at 7:07 PM, Jean-Daniel Dupas wrote: Which warning flag have you enabled to have this warning. I don't see it by default ? Hmm, I think it might be Implicit Conversion to 32 bit type (GCC_WARN_64_TO_32_BIT_CONVERSION

Re: CGFloat and 64 Bit

2009-02-09 Thread Jean-Daniel Dupas
Le 9 févr. 09 à 19:04, Sean McBride a écrit : On 2/9/09 11:59 AM, Jean-Daniel Dupas said: Hmm, I think it might be Implicit Conversion to 32 bit type (GCC_WARN_64_TO_32_BIT_CONVERSION). IMHO, this flag is recommended only to compile 64 bits code. On 32 bits arch, as you saw, most

Re: NSScreen order?

2009-02-10 Thread Jean-Daniel Dupas
Le 10 févr. 09 à 17:23, Michael Ash a écrit : On Tue, Feb 10, 2009 at 10:31 AM, Jonathan Hendry jonhen...@mac.com wrote: Is there any way to predict how the displays will be numbered? Or to force the Mimo to be screen 3? (I'd rather not add code to the app to account for my toy monitor.)

Re: Objective-C question

2009-02-10 Thread Jean-Daniel Dupas
Le 10 févr. 09 à 18:33, I. Savant a écrit : On Tue, Feb 10, 2009 at 12:26 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: Read the documentation on -isKindOfClass: again. It does exactly what you want. -isMemberOfClass: performs the more specific test of excluding subclasses. In

Re: ProcessInformationCopyDictionary

2009-02-11 Thread Jean-Daniel Dupas
Le 11 févr. 09 à 11:43, Trygve Inda a écrit : I call ProcessInformationCopyDictionary (psn, kProcessDictionaryIncludeAllInformationMask); but if the application has moved since it was launched, the result of this call in the CFBundleExecutable and BundlePath keys is wrong. The values

Re: ProcessInformationCopyDictionary

2009-02-11 Thread Jean-Daniel Dupas
Le 11 févr. 09 à 12:54, Trygve Inda a écrit : I think it exists a standard Apple Event to retrieve a process version. (get «vers») But you can also add a custom get version Apple Event handler to your helper and use it to retrieve the version from your pref pane. Hmmm... It seems

Re: ProcessInformationCopyDictionary

2009-02-11 Thread Jean-Daniel Dupas
Le 11 févr. 09 à 12:46, Trygve Inda a écrit : I think it exists a standard Apple Event to retrieve a process version. (get «vers») But you can also add a custom get version Apple Event handler to your helper and use it to retrieve the version from your pref pane. This works great for

Re: newbie question on creating .png files

2009-02-12 Thread Jean-Daniel Dupas
Le 12 févr. 09 à 16:31, Smith, Steven (MCP) a écrit : Hi folks, I'm relatively new to Cocoa and need some direction on creating .png files. I need to create 365 png files (one for each day of the year) to be used as tags by other folks (eg JAN01.png JAN2.png...DEC31.png). I think I

Re: NSRunLoop / CFRunLoop

2009-02-13 Thread Jean-Daniel Dupas
Le 13 févr. 09 à 21:54, Alexander Cohen a écrit : Hi, Not sure if this is the right place to ask since my question is about CFRunLoop, not Cocoa but CoreFoundation. If not, please direct me to the right list. I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there

Re: Getting better compression

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 10:51, Graham Cox a écrit : I have a script that runs during my distribution build that compresses my app using zip. If I use the Finder's Compress command I get almost twice as much compression. Isn't the Finder using zip? If so, what command-line arguments would give me

Re: Getting better compression

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 11:53, Graham Cox a écrit : On 16 Feb 2009, at 9:48 pm, Jean-Daniel Dupas wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression

Re: Getting better compression

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 11:57, Graham Cox a écrit : On 16 Feb 2009, at 9:53 pm, Graham Cox wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method

Re: NSTimer Question

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 13:44, Andreas Grosam a écrit : Hello, how does a NSTimer object that has been setup with a repeating time interval calculate the time when it fires an event? There may be two possibilities: Say, the initial time is at t0, the interval is T, and the time when it fires

<    3   4   5   6   7   8   9   10   11   12   >