Re: a way to clear inactive RAM

2012-11-06 Thread Jean-Daniel Dupas
Le 6 nov. 2012 à 12:13, Tom Davie tom.da...@gmail.com a écrit : On 6 Nov 2012, at 11:01, Nick Rogers roger...@mac.com wrote: Hi, Thanks for the replies. I was trying to achieve what essentially free memory apps on the Mac AppStore do. The RAM usage can be divided into four parts as

Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()

2012-11-05 Thread Jean-Daniel Dupas
Le 5 nov. 2012 à 18:56, Jerry Krinock je...@ieee.org a écrit : Continuing. In here… http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h I find a maze of #define compiler directives which affect OS_OBJECT_USE_OBJC_RETAIN_RELEASE, and also there is a comment

Re: printing Utf8

2012-10-31 Thread Jean-Daniel Dupas
Le 31 oct. 2012 à 16:31, Ken Thomases k...@codeweavers.com a écrit : On Oct 31, 2012, at 10:17 AM, lbland wrote: On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *s = @ร่วมรส; Not supported. The compiler should be issuing a warning. You need

Re: lambda in C++

2012-10-17 Thread Jean-Daniel Dupas
If you want to see good conferences about C++11, you may have a look at the Going Native 2012 videos. While this is a Microsoft event, they mostly talk only about standard C++ and it even include a clang specific conference. http://channel9.msdn.com/Events/GoingNative/GoingNative-2012 Le 17

Re: Adding localization on Xcode 4.4

2012-08-20 Thread Jean-Daniel Dupas
Le 20 août 2012 à 16:08, Andreas Mayer andr...@harmless.de a écrit : Am 17.08.2012 um 18:59 schrieb Kelly Keenan kkee...@apple.com: You should add new localizations to your project the same way that you add a new target by selecting the Project, going to the Info tab for the Project

Re: Classes incompatible with weak references

2012-08-16 Thread Jean-Daniel Dupas
Le 14 août 2012 à 09:09, Vincent Habchi vi...@macports.org a écrit : Le 13 août 2012, à 23:47, Mike Abdullah cocoa...@mikeabdullah.net scripsit: An idea I've vaguely wondered about would be turning the isa variable into a tagged pointer. If you know nothing is accessing it directly (to do

Re: Classes incompatible with weak references

2012-08-13 Thread Jean-Daniel Dupas
Le 13 août 2012 à 17:56, Kyle Sluder k...@ksluder.com a écrit : On Aug 13, 2012, at 8:42 AM, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: I see in the documentation - and from a compiler error - that some classes are not compatible with weak references. What makes these classes

Re: Classes incompatible with weak references

2012-08-13 Thread Jean-Daniel Dupas
Le 13 août 2012 à 19:54, John McCall rjmcc...@apple.com a écrit : On Aug 13, 2012, at 9:29 AM, Jean-Daniel Dupas wrote: Le 13 août 2012 à 17:56, Kyle Sluder k...@ksluder.com a écrit : On Aug 13, 2012, at 8:42 AM, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: I see in the documentation

Re: 32-bit on 10.8

2012-08-12 Thread Jean-Daniel Dupas
Le 12 août 2012 à 03:16, Jayson Adams jay...@circusponies.com a écrit : On Aug 11, 2012, at 4:51 PM, Graham Cox wrote: On 12/08/2012, at 4:18 AM, Jayson Adams jay...@circusponies.com wrote: the porting guide currently states, which is that you may not want to move to 64-bit

Re: 32-bit on 10.8

2012-08-12 Thread Jean-Daniel Dupas
For memory addressing, 64 bit should be enough for some times. For computation, 128 bit is already something from the past as actual Mac processors provide 256bits register (AVX) ;-) Le 12 août 2012 à 04:09, koko k...@highrolls.net a écrit : Is 64-bit the end or will there be 128-bit?

Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-09 Thread Jean-Daniel Dupas
Le 9 août 2012 à 02:01, Greg Parker gpar...@apple.com a écrit : On Aug 8, 2012, at 4:52 PM, Graham Cox graham@bigpond.com wrote: I see that NSCopyObject is deprecated as of 10.8 (but is still being used internally). This is going to be fun moving forward :) I'm not sure how binary

Re: Storing strings in code

2012-08-08 Thread Jean-Daniel Dupas
Le 8 août 2012 à 22:15, Rick Mann rm...@latencyzero.com a écrit : On Aug 8, 2012, at 12:58 , Leo le...@rogers.com wrote: As I recently learned, plain strings are stored as is in the executable and can be discovered - if opening it in a text editor, for example. That is, if I have a

Re: ARC and reinterpret_cast

2012-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 2012 à 08:28, Rick Mann rm...@latencyzero.com a écrit : On Jul 9, 2012, at 16:00 , John McCall wrote: From: Rick Mann rm...@latencyzero.com Subject: ARC and reinterpret_cast? Date: July 7, 2012 9:13:29 PM PDT To: Cocoa-Dev List cocoa-dev@lists.apple.com Hi. I'd like to

Re: do you init your instance variables in init method or outside the class?

2012-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 2012 à 15:03, Chris Ridd chrisr...@mac.com a écrit : On 18 Jul 2012, at 08:09, Lee Ann Rucker wrote: In init, and only when they need it. They're all initialized to nil, which is a perfectly reasonable value for an instvar to have; there's very rarely a reason to do

Re: KVG generic enough?

2012-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 2012 à 15:08, William Squires wsqui...@satx.rr.com a écrit : Okay, after reading some of the documentation on KVC coding, I understand (I think) that the point is to allow me to specify a property of an object with an NSString, then set/get that property value using KVC (i.e.

Re: do you init your instance variables in init method or outside the class?

2012-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 2012 à 16:19, Lee Ann Rucker lruc...@vmware.com a écrit : fly2never wrote: name = [NSString string]; because sending a method to nil is perfectly safe, unlike C++. Ah! No! That's not a blanket guarantee! It is only valid for methods that return void, integer types or

Re: iChat plugin sample code ?

2012-07-17 Thread Jean-Daniel Dupas
Dupas wrote: I finally found a link to an old Lion DocSet which contains it. Le 12 juil. 2012 à 02:30, Jean-Daniel Dupas devli...@shadowlab.org a écrit : Hello, Does someone has a copy of the Apple IRCServicePlugIn sample code. It look like it has been removed from the ADC web site

Re: iChat plugin sample code ?

2012-07-12 Thread Jean-Daniel Dupas
I finally found a link to an old Lion DocSet which contains it. Le 12 juil. 2012 à 02:30, Jean-Daniel Dupas devli...@shadowlab.org a écrit : Hello, Does someone has a copy of the Apple IRCServicePlugIn sample code. It look like it has been removed from the ADC web site, and I need

iChat plugin sample code ?

2012-07-11 Thread Jean-Daniel Dupas
Hello, Does someone has a copy of the Apple IRCServicePlugIn sample code. It look like it has been removed from the ADC web site, and I need it. Thanks. -- Jean-Daniel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Equation style display

2012-07-02 Thread Jean-Daniel Dupas
Le 2 juil. 2012 à 17:55, Jean Suisse a écrit : Dear all, I was wondering if there is a way to get the pretty formatted version of an equation (from an NSString) to display within a view (similar to the way Graph.app displays it). The question is open, any means is acceptable (if not too

Re: Why do we use -fobjc-arc instead of removing code with #define?

2012-06-26 Thread Jean-Daniel Dupas
Le 26 juin 2012 à 11:24, Uli Kusterer a écrit : On 26.06.2012, at 03:20, Graham Cox wrote: On 26/06/2012, at 7:42 AM, Greg Parker wrote: We recommend each file be written for either one or the other, with no attempt to be ARC-agnostic. Does this imply that ARC can be adopted gradually?

Re: Why do we use -fobjc-arc instead of removing code with #define?

2012-06-24 Thread Jean-Daniel Dupas
Le 24 juin 2012 à 07:18, Roland King a écrit : On Jun 24, 2012, at 12:25 PM, Graham Cox wrote: On 24/06/2012, at 1:55 PM, Jerry Krinock wrote: Why didn't Apple do the same thing for ARC? Because ARC is a compiler technology that inserts -retain, -release automatically and

Re: resolve alias on ios 4

2012-06-18 Thread Jean-Daniel Dupas
Le 18 juin 2012 à 12:05, Ariel Feinerman a écrit : On Fri, Jun 15, 2012 at 9:05 PM, Mike Abdullah cocoa...@mikeabdullah.netwrote: On 15 Jun 2012, at 03:51, Ariel Feinerman wrote: On Thu, Jun 14, 2012 at 9:21 PM, Mike Abdullah cocoa...@mikeabdullah.netwrote: How are you coming

Re: updates for retina

2012-06-15 Thread Jean-Daniel Dupas
Le 15 juin 2012 à 16:21, Roland King a écrit : I was reading around about the new Macbook Pro retina display today and there were quite a lot of comments about how apps may need updating to support it. Chrome was mentioned as an app which doesn't look good currently, I saw the pictures,

Re: Authorization to copy a file -- is it really that complex?

2012-06-14 Thread Jean-Daniel Dupas
Le 14 juin 2012 à 22:39, Jens Alfke a écrit : I've managed to never have to deal with Authorization Services so far in my Cocoa career; until today. Basically I have an app that needs to install some helper tools that the user can run from a shell. (This is a lot like the way TextMate

Re: @synchronized crashing with ARC

2012-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2012 à 18:00, Jens Alfke a écrit : On May 31, 2012, at 8:47 AM, Antonio Nunes wrote: static void *kMyVLFContext = kMyVLFContext; ... @synchronized(kMyVLFContext) { Huh? I thought the parameter to @synchronized(…) had to be an object reference? The Objective-C

Re: @synchronized crashing with ARC

2012-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2012 à 22:28, Lane Roathe a écrit : On May 31, 2012, at 2:00 PM, Jean-Daniel Dupas devli...@shadowlab.org wrote: Le 31 mai 2012 à 18:00, Jens Alfke a écrit : On May 31, 2012, at 8:47 AM, Antonio Nunes wrote: static void *kMyVLFContext = kMyVLFContext

Re: Prompting for reboot programatically

2012-05-30 Thread Jean-Daniel Dupas
Le 30 mai 2012 à 10:30, Arun a écrit : Hi All Any one has a idea of how we can launch the prompt for Mac reboot from a Cocoa / Obj-C code? You can use AppleEvent to ask the loginwindow to do it: I'm using the C AppleEvent API to do this, but in AppleScript it is equivalent to tell

Re: Sandboxing. WTF?

2012-05-30 Thread Jean-Daniel Dupas
Le 30 mai 2012 à 16:56, Michael Nickerson a écrit : On May 28, 2012, at 5:51 AM, Graham Cox graham@bigpond.com wrote: That sounds fine, except that CFPreferencesCopyAppValue doesn't take a path, just a bundle ID and key. I can't see an alternative API that takes a path - are you

Re: Sandboxing. WTF?

2012-05-30 Thread Jean-Daniel Dupas
It would be true if Apple didn't start to limit availability of some API to sandboxed application distributed using the MAS. Le 30 mai 2012 à 23:20, Alex Kac a écrit : But that is why not everything has to be sandboxed. For my mom I'd prefer apps to be sandboxed. For myself I'll have the

Re: Sandboxing. WTF?

2012-05-28 Thread Jean-Daniel Dupas
Le 28 mai 2012 à 07:18, Graham Cox a écrit : On 28/05/2012, at 3:10 PM, Marco S Hyman wrote: I think that is your issue. What is the issue? I have read that, several times. It states: With these provisos in mind, you can use a path-based temporary exception entitlement to gain

Re: MPProcessing in Lion

2012-05-14 Thread Jean-Daniel Dupas
Le 14 mai 2012 à 14:34, McLaughlin, Michael P. a écrit : This past weekend I tried compiling my Snow Leopard Cocoa app in Lion (Xcode 4.3) just to make sure all was OK. I got two warnings stating that MPProcessorsScheduled and MPCreateCriticalRegion were deprecated in Lion but the

Re: architectures that prevent freezing

2012-05-11 Thread Jean-Daniel Dupas
Le 11 mai 2012 à 18:05, Jens Alfke a écrit : On May 9, 2012, at 7:14 AM, Ph.T wrote: . in a pre-emptive OS there should be no freezing; given the new concurrency model that includes the use of the graphics processor GPU to do the system's non-graphics processing, Well, the GPU can

Re: architectures that prevent freezing

2012-05-11 Thread Jean-Daniel Dupas
Le 11 mai 2012 à 19:55, Jens Alfke a écrit : On May 11, 2012, at 9:23 AM, Jean-Daniel Dupas wrote: While playing with GPU programming, I had a lot of such freeze, and they never locked the CPU. I was always able to connect to my machine though SSH. So a regular user process can

Re: Instruments, how to fix leak in C Lib

2012-05-02 Thread Jean-Daniel Dupas
Le 2 mai 2012 à 09:59, Alexander Reichstadt a écrit : Hi, through Instruments I found a memory leak outside my code in a pqlib, the postgres client library. This is what Leaks prints out: Bytes Used# Leaks Symbol Name 84.81 KB 100.0% 48 PQgetResult

Re: Converting between property names?

2012-04-10 Thread Jean-Daniel Dupas
Le 10 avr. 2012 à 23:40, Greg Parker a écrit : On Apr 10, 2012, at 1:49 PM, Rick Mann rm...@latencyzero.com wrote: Are there functions provided in the Objective-C runtime to convert property names? For example, say I have a key name like fooKey, and I want to get FooKey, or the setter name

Re: exception in init

2012-04-04 Thread Jean-Daniel Dupas
Le 4 avr. 2012 à 17:57, Jens Alfke a écrit : On Apr 4, 2012, at 8:37 AM, Andreas Grosam wrote: In a debug version, use NSAssert and friends (ensure Preprocessor macro NS_BLOCK_ASSERTIONS is not defined). Use Unit tests in order to detect *any* possible logic error. In a release version

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-31 Thread Jean-Daniel Dupas
Le 31 mars 2012 à 18:20, Andreas Grosam a écrit : Thank you all for your answers and suggestions. My use case is to create CFStrings from Unicode - which in the majority of cases are short strings - say, less than 100 characters. In this case, I create an immutable CFString directly in

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread Jean-Daniel Dupas
Le 28 mars 2012 à 20:00, Charles Srstka a écrit : On Mar 28, 2012, at 9:55 AM, jonat...@mugginsoft.com wrote: On 28 Mar 2012, at 15:35, Andreas Grosam wrote: On Mar 28, 2012, at 3:58 PM, jonat...@mugginsoft.com wrote: I presume that you considered CFStringAppendCString(): void

Re: How to become root

2012-03-16 Thread Jean-Daniel Dupas
Le 16 mars 2012 à 12:33, Gerriet M. Denkmann a écrit : I have an app which needs to do (among other things) to call task_for_pid() which seems to work only for root. The modern way to do this is have a small companion tool which exchanges info with my app via XPC. Correct? I am also

Re: How to become root

2012-03-16 Thread Jean-Daniel Dupas
Le 16 mars 2012 à 13:27, Gerriet M. Denkmann a écrit : On 16 Mar 2012, at 19:17, Jean-Daniel Dupas wrote: Le 16 mars 2012 à 12:33, Gerriet M. Denkmann a écrit : I have an app which needs to do (among other things) to call task_for_pid() which seems to work only for root

Re: How to become root

2012-03-16 Thread Jean-Daniel Dupas
dialog at launch. Le 16 mars 2012 à 23:56, Prime Coderama a écrit : Shouldn't the the SMJobBless example be used? Although I am still struggling to get this to work - even have an open Apple support issue. On 16/03/2012, at 11:45 PM, Jean-Daniel Dupas wrote: Le 16 mars 2012 à 13:27

Re: nil in cocoa collections

2012-03-14 Thread Jean-Daniel Dupas
Le 14 mars 2012 à 17:02, Fritz Anderson a écrit : On 14 Mar 2012, at 9:49 AM, Ariel Feinerman wrote: I have an mystique behavior in the NSMutableDictionary one cannot while one contains a nil for key and value so when print in nslog { key = value; (null) = (null); }

Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?

2012-03-14 Thread Jean-Daniel Dupas
Le 14 mars 2012 à 17:52, Per Bull Holmen a écrit : Den 17:19 14. mars 2012 skrev Wade Tregaskis wadesli...@mac.com følgende: The reality is of course more of a compromise. It's quite common to do drawing across multiple threads, though you still synchronise the final blits around a

Re: Forcing subclass creation through method swizzling not airtight?

2012-03-11 Thread Jean-Daniel Dupas
Yes. +initialize is not call until you try to use your class. So there is no garantee it will be call at all, and even if it is called, nothing prevent creation of instance of the super class before it append. Le 11 mars 2012 à 08:05, Antonio Nunes a écrit : In the latest public release of my

Re: Forcing subclass creation through method swizzling not airtight?

2012-03-11 Thread Jean-Daniel Dupas
Le 11 mars 2012 à 13:28, Antonio Nunes a écrit : On 11 Mar 2012, at 09:48, Jean-Daniel Dupas wrote: +initialize is not call until you try to use your class. So there is no garantee it will be call at all, Thanks Jean-Daniel, I think I can be pretty confident it is called, since

Re: @-directives

2012-03-09 Thread Jean-Daniel Dupas
Le 9 mars 2012 à 03:55, Roland King a écrit : Good thinking .. OBJC1_AT_KEYWORD(not_keyword) OBJC1_AT_KEYWORD(class) OBJC1_AT_KEYWORD(compatibility_alias) OBJC1_AT_KEYWORD(defs) OBJC1_AT_KEYWORD(encode) OBJC1_AT_KEYWORD(end) OBJC1_AT_KEYWORD(implementation)

Re: [Obj-C] if (self) vs. if (self != nil)

2012-02-27 Thread Jean-Daniel Dupas
Le 27 févr. 2012 à 02:40, Graham Cox a écrit : On 27/02/2012, at 12:13 PM, William Squires wrote: I prefer the if (self = [super init]) combined form, myself. One potentially annoying thing about this form is that, if you compile with plenty of warnings on, such as the possible

Re: What to use instead of operatingSystemVersionString

2012-02-24 Thread Jean-Daniel Dupas
Le 24 févr. 2012 à 07:56, Gerriet M. Denkmann a écrit : The documentation says of NSProcessInfo operatingSystemVersionString: This string is not appropriate for parsing. But if fails to mention what to use instead. So what should I use? Gestalt? Or is there some more convenient Cocoa

Re: copy isEqual nightmares

2012-02-17 Thread Jean-Daniel Dupas
Le 17 févr. 2012 à 21:33, Ben Kennedy a écrit : On 16 Feb 2012, at 3:54 pm, Ken Thomases wrote: In other words, you're being silly. It's clear to everyone that -[NSString isEqual:] must have semantics built on -[NSString isEqualToString:], which is clearly documented. What value does

Re: Open a new terminal tab or window from a Cocoa app at a certain directory without using NSAppleScript?

2012-01-26 Thread Jean-Daniel Dupas
Le 26 janv. 2012 à 20:30, Jens Alfke a écrit : On Jan 26, 2012, at 10:22 AM, Andrew wrote: NSString *cmd = [NSString stringWithFormat:@cd \%@\; clear”, dir]; // Assumes bash, which is okay for me, but maybe not others. Watch out — that line has quoting problems. If the path to the

Re: ARC and blocks

2012-01-26 Thread Jean-Daniel Dupas
Le 26 janv. 2012 à 22:51, Jan E. Schotsman a écrit : Hello, This code is given in the Transitioning to ARC Release Notes as an example of accomodating blocks in an ARC environment: __block MyViewController *myController = [[MyViewController alloc] init…]; // ...

Re: NSString looses Umlaute

2011-12-22 Thread Jean-Daniel Dupas
Le 22 déc. 2011 à 10:42, Alexander Reichstadt a écrit : OK, I found a way to import it into FileMaker. It looks good when I use DOS Encoding. But when I use kCFStringEncoding derivates I had no luck. I know CF and NSString is toll free bridged, but does this apply to the encodings as

Re: Singletons with ARC

2011-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 2011 à 08:47, Ken Thomases a écrit : On Dec 9, 2011, at 1:11 AM, Uli Kusterer wrote: On 09.12.2011, at 07:55, Ken Thomases wrote: Double-checked locking is broken. It is an anti-pattern in many languages, including the C family under most common implementations. Don't use

Re: Singletons with ARC

2011-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 2011 à 10:36, Jean-Daniel Dupas a écrit : Le 9 déc. 2011 à 08:47, Ken Thomases a écrit : On Dec 9, 2011, at 1:11 AM, Uli Kusterer wrote: On 09.12.2011, at 07:55, Ken Thomases wrote: Double-checked locking is broken. It is an anti-pattern in many languages, including

Re: Locks

2011-12-08 Thread Jean-Daniel Dupas
Le 8 déc. 2011 à 09:57, Andreas Grosam a écrit : On Dec 7, 2011, at 12:07 PM, Jean-Daniel Dupas wrote: Le 7 déc. 2011 à 06:10, Ken Thomases a écrit : On Dec 6, 2011, at 10:05 PM, Don Quixote de la Mancha wrote: You still shouldn't implement it manually using atomic increment

Re: Locks

2011-12-07 Thread Jean-Daniel Dupas
Le 7 déc. 2011 à 06:10, Ken Thomases a écrit : On Dec 6, 2011, at 10:05 PM, Don Quixote de la Mancha wrote: Contrary to Ken Thomases' assertion, there are all kinds of reasons to use atomic operations as locking primitives. One is that they cannot result in process context switches; if

Re: NSNumberFormatter Strangeness

2011-11-25 Thread Jean-Daniel Dupas
Le 25 nov. 2011 à 04:26, Conrad Shultz a écrit : On 11/24/11 3:20 PM, Jean-Daniel Dupas wrote: A formatter is used to convert an internal number representation (integer, floating point, fixed point) into a string. Is has nothing to do with the precision of the represented value. If you

Re: NSNumberFormatter Strangeness

2011-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 2011 à 22:42, Conrad Shultz a écrit : Greetings, (Happy Thanksgiving, to those in countries which celebrate it.) I am experiencing a strange behavior with NSNumberFormatter. For reasons that aren't really relevant to the matter at hand, I wanted to create a formatter that

Re: NSNumberFormatter Strangeness

2011-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 2011 à 23:46, Conrad Shultz a écrit : On 11/24/11 2:27 PM, Jean-Daniel Dupas wrote: Just a question. Why do you need a max frag digit greater than a couple of tens ? I'm writing a custom formatter that will be used in the context of a scientific application and which

Re: Resizable borderless windows in Lion

2011-11-18 Thread Jean-Daniel Dupas
Le 18 nov. 2011 à 10:59, Nicholas Francis a écrit : Problem with Xcode 4 is that this is the same build farm that compiles out standalone executable which has compatibility down to Tiger, so we're stuck on Xcode 3.x versions (at least for the next 8 months or so). Superannoying, but

Re: Resizable borderless windows in Lion

2011-11-18 Thread Jean-Daniel Dupas
Le 18 nov. 2011 à 11:59, Jean-Daniel Dupas a écrit : Le 18 nov. 2011 à 10:59, Nicholas Francis a écrit : Problem with Xcode 4 is that this is the same build farm that compiles out standalone executable which has compatibility down to Tiger, so we're stuck on Xcode 3.x versions

Re: Witch controls to use to implement an Xcode (4.2) like toolbar view

2011-11-14 Thread Jean-Daniel Dupas
Le 14 nov. 2011 à 16:06, DELHAISE Thierry a écrit : Hi All, Just wondering if someone have tried to reproduced the small toolbar view (not window) on top of Project source view for example witch allow to select Source Tree View and other kind of Source view. It seems to me that this is

Re: How to determine if there is an internet connection available?

2011-11-12 Thread Jean-Daniel Dupas
Le 12 nov. 2011 à 04:41, Conrad Shultz a écrit : On 11/11/11 6:39 PM, Vojtěch Meluzín wrote: Hi, I'm using BSD sockets for some internet access, it works fine. But if there is no connection available, it waits for say 30 seconds completely stopping the application. Is there a way to

Re: Calling a Cocoa library from C

2011-11-12 Thread Jean-Daniel Dupas
Le 12 nov. 2011 à 03:34, Charles Srstka a écrit : On Nov 11, 2011, at 8:22 PM, Wim Lewis wrote: On Nov 11, 2011, at 5:49 PM, Nathan Sims wrote: Newb question. I need to create an OS X Cocoa library that is going to be called from a C program. The C program's interface will be simple,

Re: ObjC's flat and all-exported namespace, help!

2011-11-09 Thread Jean-Daniel Dupas
Le 9 nov. 2011 à 09:14, Andy O'Meara a écrit : Unfortunately the problem is that when you sell and ship commercial software, shipped software can't look into the future. The real aspect of this issue, that I raised in my initial post, is that third party developers such as ourselves

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-09 Thread Jean-Daniel Dupas
Le 9 nov. 2011 à 07:44, Don Quixote de la Mancha a écrit : On Tue, Nov 8, 2011 at 9:48 PM, Wade Tregaskis wadesli...@mac.com wrote: Simple as that, eh? Being able to gracefully handle all out of memory situations to me seems as simple as being required to treat every single method /

Re: ObjC's flat and all-exported namespace, help!

2011-11-09 Thread Jean-Daniel Dupas
Le 9 nov. 2011 à 10:11, Karl Goiser a écrit : .. so if you prefix all your classes with your company name, the only conflicts will be with the same class from different bundles, which means that only one instance of any class will be loaded, thus saving memory on every client’s machine…

Re: How to compiler arm assembler .s source file with Xcode 4.2?

2011-11-09 Thread Jean-Daniel Dupas
Le 9 nov. 2011 à 19:53, Wim Lewis a écrit : On 8 Nov 2011, at 11:49 PM, Don Quixote de la Mancha wrote: I can see that Xcode is indeed calling CompileC on my .s source, which ultimately calls clang. Clang is the LLVM compiler's front end for the C-Like languages: C, Objective-C and C++.

Re: ObjC's flat and all-exported namespace, help!

2011-11-08 Thread Jean-Daniel Dupas
Le 9 nov. 2011 à 01:37, Ian Joyner a écrit : On 9 Nov 2011, at 05:21, Greg Parker wrote: On Nov 8, 2011, at 9:57 AM, Andy O'Meara wrote: Yes, I know that one workaround is to mangle all objC class names based on something unique in the project (we are forced to do this with our

Re: Private Method?

2011-11-07 Thread Jean-Daniel Dupas
Le 7 nov. 2011 à 08:49, Joar Wingfors a écrit : On 6 nov 2011, at 14:10, Bryan Harrison wrote: I'm a total tyro and hope nobody minds if I fire off the occasional incredibly elementary question. I'm reviewing some sample code and am looking at a class with a method declared in

Re: Private Method?

2011-11-07 Thread Jean-Daniel Dupas
Le 7 nov. 2011 à 16:19, Kyle Sluder a écrit : On Nov 7, 2011, at 4:10 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote: Le 7 nov. 2011 à 08:49, Joar Wingfors a écrit : In OjbC you don't need to provide declarations for a method foo if all callers of foo can see the definition

Re: dispatch queue as property

2011-11-02 Thread Jean-Daniel Dupas
From the compiler point of view, the 'retain' semantic does not mean anything for an arbitrary type like dispatch queue. So indicating the semantic to the compiler is pointless. Now, if you want to expose the semantic to the developers that use this class, a simple comment is probably enough.

Re: CFRunLoopObserver causes crash on NSView drag.

2011-10-22 Thread Jean-Daniel Dupas
I also encounter this annoying issue, and also try something like that, but as you can see, it does not works. I workaround this issue by periodically posting application defined event that trigger an event loop, and make the framework drain the autorelease pool. Somewhere in my application

Re: ARC + return of autoreleased CFType

2011-10-20 Thread Jean-Daniel Dupas
Le 20 oct. 2011 à 23:38, Bill Cheeseman a écrit : On Oct 20, 2011, at 4:43 PM, Matt Neuburg wrote: Sure, but still, he's returning a retained CGColorRef. And CGColor participates in this convention (CGColorRelease, CGColorRetain, CGColorCreate etc.). I'm not saying he has to do it; I'm

Re: Blocks vs. life, the universe and everything

2011-10-18 Thread Jean-Daniel Dupas
Le 18 oct. 2011 à 14:00, Michael Babin a écrit : On Oct 17, 2011, at 2:49 PM, Greg Parker wrote: On Oct 15, 2011, at 12:28 PM, Jean-Daniel Dupas wrote: Le 15 oct. 2011 à 21:10, Seth Willits a écrit : Unrelated, when did @autoreleasepool pop in? I don't remember if I knew about

Re: Blocks vs. life, the universe and everything

2011-10-18 Thread Jean-Daniel Dupas
Le 18 oct. 2011 à 16:09, Michael Babin a écrit : On Oct 18, 2011, at 8:42 AM, Jean-Daniel Dupas wrote: Le 18 oct. 2011 à 14:00, Michael Babin a écrit : What are the minimum requirements for using @autoreleasepool? The same as ARC, even when not used with ARC (Xcode 4.2 for Mac OS X

Re: Blocks vs. life, the universe and everything

2011-10-15 Thread Jean-Daniel Dupas
Le 15 oct. 2011 à 21:10, Seth Willits a écrit : On Oct 14, 2011, at 2:27 PM, Greg Parker wrote: Currently, a dispatch-provided autorelease pool is not drained until the dispatch worker thread goes idle. If you keep a dispatch queue continuously busy with dispatch work that generates

Re: AVFoundation and kYUVSPixelFormat from AVPlayer

2011-10-12 Thread Jean-Daniel Dupas
Le 12 oct. 2011 à 04:46, Robert Monaghan a écrit : Hi, A quick word of warning, while QTKit is being deprecated for AVFoundation/Core Media, there is no third party codec support in the new APIs. I would consider this while you develop your app. I doubt that 3rd party codec support for

Re: Missing header files/folders?

2011-10-07 Thread Jean-Daniel Dupas
Le 7 oct. 2011 à 09:02, Shane Stanley a écrit : On 07/10/2011, at 4:38 PM, Jens Alfke wrote: They might not be part of the base OS install. Thanks -- that seems to be the case. Kind of surprised me… Not so much. There is no compiler in the base system, so why bother to include

Re: Question about SMJobBless

2011-09-30 Thread Jean-Daniel Dupas
If you want answer, you should try the darwin-dev list. SMJobBless is not cocoa specific, and so is off-topic on this list, and IIRC, the engineer in charge of the ServiceManagement framework is a darwin-dev subscriber. Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup

Re: Question about SMJobBless

2011-09-30 Thread Jean-Daniel Dupas
Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup questions concerning the approach used by SMJobBless in developing a secure helper tool. In the How It Works section in the ReadMe, it states: 4. Requiring the user to authorize the privileged helper tool only

Re: Question about SMJobBless

2011-09-30 Thread Jean-Daniel Dupas
Le 30 sept. 2011 à 18:14, Eric Gorr a écrit : On Sep 30, 2011, at 10:34 AM, Jean-Daniel Dupas wrote: Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : I had a couple of followup questions concerning the approach used by SMJobBless in developing a secure helper tool. In the How

Re: Gestalt

2011-09-22 Thread Jean-Daniel Dupas
Le 22 sept. 2011 à 16:37, AM a écrit : On Sep 21, 2011, at 6:09 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/21/11 2:22 PM, Charles Srstka wrote: Why not? I find it to be safer than checking for the existence of a method, because you never know if that

Re: Replacement for MethodReplacement?

2011-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 2011 à 01:48, James Walker a écrit : The sample code page http://developer.apple.com/library/mac/#samplecode/MethodReplacement/Introduction/Intro.html describes it as Objective C 2.0 compatible class_poseAs() replacement. This demonstrates how to replace a method in an

Re: UpdateSystemActivity(OverallAct) to prevent sleep in Lion...

2011-08-30 Thread Jean-Daniel Dupas
Le 29 août 2011 à 22:29, R a écrit : I'm using UpdateSystemActivity(OverallAct) successfully to prevent sleep in Snow Leopard. Can anyone confirm that this works with Lion? thanks Probably, but you should use the IOPMAssertion API introduced in 10.5 instead. See

Re: How does Apple want us to deal with custom elements in Xcode 4, with IBPlugins having been killed?

2011-08-16 Thread Jean-Daniel Dupas
Le 16 août 2011 à 13:20, Vince a écrit : The point Charles makes about garbage collection is a very valid one. Writing dual-mode code sucks so much that Apple invented ARC. And I'm sure that the Xcode 4 team had perfectly valid reasons for omitting IB plugins from their ground-up rewrite

Re: Drawing text like Lion's Mail

2011-08-08 Thread Jean-Daniel Dupas
I think you can create a CGPath from some text using CTFrameGetPath(). Once you get the path, you can do whatever you want (clipping, shadow, gradient, …). Le 8 août 2011 à 02:22, Andre Masse a écrit : Interesting. Not sure if could be possible to convert the text to an image, apply a

Re: Drawing text like Lion's Mail

2011-08-08 Thread Jean-Daniel Dupas
Le 8 août 2011 à 18:50, David Duncan a écrit : On Aug 8, 2011, at 8:16 AM, Jean-Daniel Dupas wrote: I think you can create a CGPath from some text using CTFrameGetPath(). Once you get the path, you can do whatever you want (clipping, shadow, gradient, …). CTFrameGetPath() returns

Re: Symbol not found: _OBJC_CLASS_$_NSURL

2011-08-04 Thread Jean-Daniel Dupas
Le 4 août 2011 à 18:46, koko a écrit : My App has run on this users machine for quite some time now. I just did a new build changing nothing related to NSURL. Now when this user runs the app she gets this message: Dyld Error Message: Symbol not found: _OBJC_CLASS_$_NSURL Referenced

Re: Unnecessary Boolean Warning

2011-08-03 Thread Jean-Daniel Dupas
Le 3 août 2011 à 16:40, Thomas Davie a écrit : On 3 Aug 2011, at 15:15, Scott Ribe wrote: On Aug 3, 2011, at 7:54 AM, Thomas Davie wrote: Not really – both C ands are the same and… they're just operating on different representations of booleans. No, they're not the same at all. One

Re: ARC and Singletons

2011-08-02 Thread Jean-Daniel Dupas
Le 2 août 2011 à 08:22, Karl Goiser a écrit : Yes they are. They are a kludge that came about because C++ doesn’t implement object behaviour properly. Try this: http://www.google.com/search?hl=enq=Singleton%2Bevil You have not said what about NSFileManager is a great example of

Re: Unnecessary Boolean Warning

2011-08-01 Thread Jean-Daniel Dupas
If this warning bother you, just disable it. clang is smart enough to tell you what flag you have to turn off in the warning message. For instance, just add -Wno-constant-logical-operand in your other warning flags. Le 1 août 2011 à 17:47, Gordon Apple a écrit : It’s not that I object to

Re: Disable Lion's window restoration?

2011-07-26 Thread Jean-Daniel Dupas
Le 26 juil. 2011 à 02:33, Gerd Knops a écrit : Hi, Is there an application-global way of disabling window restoration? All I can find is NSWindow's - (BOOL)isRestorable method (and it's relatives). I was hoping for something more global, like a - (BOOL)shouldRestoreWindows method

Re: Does anyone else dislike Xcode 4?

2011-07-25 Thread Jean-Daniel Dupas
Le 25 juil. 2011 à 09:47, vincent habchi a écrit : Well, I wouldn’t want to throw more oil on the fire, as the French saying goes, but, in my opinion, this looks like tycoons arguing about the color of their Ferraris or which Bordeaux grand cru (or whatever else). Xcode is a tool we have

Re: Does anyone else dislike Xcode 4?

2011-07-25 Thread Jean-Daniel Dupas
Le 24 juil. 2011 à 23:28, Ed Wynne a écrit : On Jul 24, 2011, at 3:46 PM, Gary L. Wade wrote: As I mentioned before, everyone should go to bugreporter.apple.com and enter bugs against this horrible MS Windows method of UI that prevents usable viewing of multiple files that has been

Re: Does anyone else dislike Xcode 4?

2011-07-25 Thread Jean-Daniel Dupas
Le 25 juil. 2011 à 19:42, Nick Zitzmann a écrit : This is my main grievance with Xcode 4 as well, and really, it's the second time this has happened. The original Project Builder had an all-in-one view, and developers complained, so they added a CodeWarrior-like condensed view to

Re: NSWindowController window deprecated

2011-07-23 Thread Jean-Daniel Dupas
Make sure you import all the required headers (especially the one defining MainWindowController). Le 23 juil. 2011 à 21:29, Andre Masse a écrit : Not sure what's going on, I have my NSWindowController subclass declared as: @interface MainWindowController : NSWindowController

Re: Xcode 3.2.6 on Lion ?

2011-07-23 Thread Jean-Daniel Dupas
Le 23 juil. 2011 à 23:22, Mike Abdullah a écrit : Oh, then there's 10.5 thing with libcrypto As far as I can tell that got fixed for the GM. What's got fixed, and what GM ? AFAIK, if you link on libcrypto from the 10.6 or 10.7 SDK (whatever Xcode version you use), you cannot run your

Re: Xcode 3.2.6 on Lion ?

2011-07-23 Thread Jean-Daniel Dupas
Le 23 juil. 2011 à 23:40, Conrad Taylor a écrit : Sent from my iPhone On Jul 23, 2011, at 2:28 PM, Jean-Daniel Dupas devli...@shadowlab.org wrote: Le 23 juil. 2011 à 23:22, Mike Abdullah a écrit : Oh, then there's 10.5 thing with libcrypto As far as I can tell that got fixed

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