Re: OS X Game Programming

2010-04-07 Thread Jean-Daniel Dupas
Most basics OpenGL sample codes on ADC handle keyboard events. For instance, first Google result for "Cocoa OpenGL" http://developer.apple.com/mac/library/samplecode/CocoaGL/Introduction/Intro.html Le 7 avr. 2010 à 09:34, Pascal Harris a écrit : > I've never programmed games before, although I

Re: CIContext in 10.6

2010-04-12 Thread Jean-Daniel Dupas
Le 12 avr. 2010 à 16:39, Gerriet M. Denkmann a écrit : > > This works (but is deprecated in 10.6): > > NSOpenGLPixelFormat *pixelFomat = > CGLPixelFormatObj b = [ pixelFomat CGLPixelFormatObj ]; > CGLContextObj a = CGLGetCurrentContext(); >

Re: base64Binary

2010-04-14 Thread Jean-Daniel Dupas
Google provide some class to do that too. See GTMBase64 classes at http://code.google.com/p/google-toolbox-for-mac/source/browse/#svn/trunk/Foundation Le 14 avr. 2010 à 22:00, joby abraham a écrit : > Hi Bialecki, > > for base64 encoding/decoding you can use openSSL Library which providing by

Re: base64Binary

2010-04-14 Thread Jean-Daniel Dupas
ially libcrypto). Le 14 avr. 2010 à 22:58, joby abraham a écrit : > Hi Bialecki, > > It always better use library which provided by MAC OS. > > Thanks& regards, > Joby Abraham. > > On Thu, Apr 15, 2010 at 02:17, Jean-Daniel Dupas > wrote: > Google provide some c

Re: Zeroing out instance variables

2010-04-17 Thread Jean-Daniel Dupas
Le 17 avr. 2010 à 16:16, Ken Thomases a écrit : > On Apr 17, 2010, at 8:53 AM, Paul Sanders wrote: > >> Something I've never been clear about though is >> where an object's retain count is stored. This obviously >> requires an iVar somewhere (in addition to isA), so there might >> be a trap

Re: Weird CGFloat issue

2010-04-18 Thread Jean-Daniel Dupas
Le 18 avr. 2010 à 19:26, Gideon King a écrit : > Hi all, > > I'm having a really strange problem with a simple method call: > > CGFloat newMin = 150.0f; > CGFloat newMax = 0.0f; > [mapContentSubview setMinDimension:newMin andMaxDimension:newMax]; > > The method is defined as: > > - (void)setM

Re: Introspecting the current method

2010-04-19 Thread Jean-Daniel Dupas
Le 19 avr. 2010 à 04:21, Michael Ash a écrit : > On Sun, Apr 18, 2010 at 10:15 PM, Dave DeLong wrote: >> Yes, code should obviously be written with this knowledge in mind. The use >> case I have for it is for macros. I like to use a debugging macro like the >> following to ensure that method

Re: blocks and autorelease weirdness

2010-04-19 Thread Jean-Daniel Dupas
Le 19 avr. 2010 à 11:35, Henk Kampman a écrit : > Have a look at the following code > > -(void) test > { > testString = NULL; > > dispatch_async(dispatch_get_global_queue(0, 0), ^{ > dispatch_async(dispatch_get_main_queue(), ^{ > >

Re: Introspecting the current method

2010-04-19 Thread Jean-Daniel Dupas
Le 19 avr. 2010 à 20:54, Greg Parker a écrit : > On Apr 18, 2010, at 7:01 PM, Ken Thomases wrote: >> On Apr 18, 2010, at 7:14 PM, Dave DeLong wrote: >>> If I'm inside a method, is there a way to know at runtime whether that >>> method is a class or an instance method? >> >> Keep in mind that cl

Re: Simple low memory warning?

2010-04-20 Thread Jean-Daniel Dupas
Le 20 avr. 2010 à 19:23, Bill a écrit : > > On Apr 20, 2010, at 10:17 AM, Nick Zitzmann wrote: > >> >> On Apr 20, 2010, at 10:10 AM, Bill wrote: >> >>> Does there exist a low-memory warning for Mac apps similar to the >>> didReceiveMemoryWarning for the iPhone? I have looked at NSCache and

Re: Simple low memory warning?

2010-04-20 Thread Jean-Daniel Dupas
Le 20 avr. 2010 à 19:36, Bill a écrit : > > On Apr 20, 2010, at 10:34 AM, Jean-Daniel Dupas wrote: > >> >> Le 20 avr. 2010 à 19:23, Bill a écrit : >> >>> >>> On Apr 20, 2010, at 10:17 AM, Nick Zitzmann wrote: >>> >>>> >

Re: Forcing plist preferences file to be saved as text?

2010-04-22 Thread Jean-Daniel Dupas
Le 22 avr. 2010 à 23:36, Laurent Daudelin a écrit : > Is there any way to force the NSUserDefaults instances to save preferences of > an application as a text-only plist file in 10.5 as it does on 10.6? For some > reason, that seems to be happening only on 10.5. > I don't think so. NSUserDefau

Re: Finder file label from cocoa?

2010-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 2010 à 02:14, Rainer Standke a écrit : > Hello, > > is there a way to get to the finder label of a file from Cocoa? I'd like to > be able to get & set them. To get and set it, you can probably use the NSURLLabelNumberKey property (introduced in 10.6) and the URL Resource API: - (B

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 2010 à 13:09, Graham Cox a écrit : > > On 28/04/2010, at 8:00 PM, Gerriet M. Denkmann wrote: > >> // *** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver >> cannot encode structs >> >> Using NSArchiver (without the "Keyed") works fine. >> >> How am I supposed

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 2010 à 21:45, Raffael Cavallaro a écrit : > > On Apr 28, 2010, at 3:31 PM, Quincey Morris wrote: > >> So my original point stands: I want my original bit pattern back again after >> unarchiving, and I don't believe that a finite decimal string will guarantee >> that. > > As a prac

Re: How to setup idle timer in 64-bit 10.6?

2010-05-10 Thread Jean-Daniel Dupas
Le 10 mai 2010 à 22:26, Marc Respass a écrit : > Hi All, > > My application has a requirement that it "locks out" the user after X minutes > of inactivity. I was using Uli Kusterer's excellent UKIdleTimer in my > application and it worked great. Then I upgraded to 64-bit and it does not > wor

Re: self = [super init], nil?

2010-05-10 Thread Jean-Daniel Dupas
Le 10 mai 2010 à 22:24, David Duncan a écrit : > On May 10, 2010, at 1:18 PM, Henry McGilton wrote: > >> Hi Scott. Is there any rationale for the change? Or just Evolution In >> Action? > > I would imagine the biggest reason for the change is that if(self = [super > init]) causes a warning

Re: Notifications on main thread

2010-05-18 Thread Jean-Daniel Dupas
Le 18 mai 2010 à 16:34, Jonny Taylor a écrit : > Hi all, > > I have been programming on the mac for many years but have only just started > trying to get the hang of cocoa. I have a particular question about > NSNotification that I hope somebody will be able to help with. > > My code works wi

Re: Calling allObjects memory allocation problem

2010-05-21 Thread Jean-Daniel Dupas
Le 21 mai 2010 à 17:54, Keary Suska a écrit : > On May 21, 2010, at 9:18 AM, Paul Sanders wrote: > >>> Also be aware that just because memory is released, doesn't mean it is >>> returned to the system (e.g. you will not >>> see your apps memory usage go down in Activity Monitor). In fact, AFAI

Re: subclass overwriting superclass ivar

2010-05-26 Thread Jean-Daniel Dupas
Le 26 mai 2010 à 14:53, Graham Cox a écrit : > > On 26/05/2010, at 10:41 PM, vincent habchi wrote: > >> Hmmm... Let's say you have a class A with a private variable "priv" and b a >> pointer to a subclass of A. Is: >> >> [(A *)b priv] >> >> legal? > > > No. It's not legal syntax for access

Re: subclass overwriting superclass ivar

2010-05-26 Thread Jean-Daniel Dupas
Le 26 mai 2010 à 15:00, Roland King a écrit : > @interface A(MyCategory) > > -(void)someMethodWhichLegallyAccessesThePrivateVariablePriv; > > @end > > That's legal, I can write a category against an already-compiled class > without having the source and without recompiling it and I can access

Re: subclass overwriting superclass ivar

2010-05-26 Thread Jean-Daniel Dupas
Le 26 mai 2010 à 15:10, vincent habchi a écrit : > Le 26 mai 2010 à 14:53, Graham Cox a écrit : > >> >> On 26/05/2010, at 10:41 PM, vincent habchi wrote: >> >>> Hmmm... Let's say you have a class A with a private variable "priv" and b a >>> pointer to a subclass of A. Is: >>> >>> [(A *)b pri

Re: send computer to sleep

2010-05-26 Thread Jean-Daniel Dupas
Le 26 mai 2010 à 23:01, Julian. a écrit : > what is the correct way to send the computer to sleep? i couldn't find > anything in the documentation, except appleevents... #include void SystemSleep() { io_connect_t port = IOPMFindPowerManagement(MACH_PORT_NULL); IOPMSleepSystem(port); IOS

Re: subclass overwriting superclass ivar

2010-05-27 Thread Jean-Daniel Dupas
Le 27 mai 2010 à 13:53, jonat...@mugginsoft.com a écrit : > > > On 26 May 2010, at 20:00, Greg Parker wrote: >>> >> >> Mac or iPhone? >> iPhone device or iPhone simulator? >> 32-bit Mac or 64-bit Mac? >> > Sorry for the vagueness. 32 bit mac. > >> My guess is that (1) you're running on iPho

Re: Notification of file system modification arrives too early?

2010-05-28 Thread Jean-Daniel Dupas
Le 28 mai 2010 à 12:53, Antonio Nunes a écrit : > On 28 May 2010, at 11:41, Antonio Nunes wrote: > >> I was hoping the system would provide something better for this. Looks like >> an enhancement request is in order. > > Request filed. Bug ID# 8038793: "Need notification of file system > modi

Re: six things I wasn't able to do with Cocoa

2010-05-28 Thread Jean-Daniel Dupas
Le 28 mai 2010 à 20:55, Bill Appleton a écrit : > hi Kevin, > > sorry if this is a repost, my last one was rejected for being too big > > YES, the QTMovieNaturalSizeAttribute definitely returns the size i am > looking for > > the remaining problem is that the movie posetr returns a size of 100

Re: Notification of file system modification arrives too early?

2010-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2010 à 05:39, Dave Keck a écrit : >> Unfortunately you probably can’t do any better than that, since there’s no > cheap way to find out if another process has the file open. > > proc_listpidspath() is meant for this, but it is indeed quite expensive. In > my testing, it takes about a s

Re: UTI strings

2010-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2010 à 10:25, julius a écrit : > > On 31 May 2010, at 01:42, John Joyce wrote: > >> >> On May 30, 2010, at 5:15 PM, julius wrote: >> >>> John hi >>> On 30 May 2010, at 19:47, John Joyce wrote: >>> That's not how these constants work. These are intended to be constants tha

Re: UTI strings

2010-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2010 à 10:53, julius a écrit : > On 31 May 2010, at 09:43, Jean-Daniel Dupas wrote: >>>> >>>> This data is covered, but you may want to explore further the docs, a few >>>> books on cocoa, and sample apps from apple. >>>> Look

Re: dynamic resolution

2010-05-31 Thread Jean-Daniel Dupas
You have to include objc runtime header to use runtime methods. #include Le 31 mai 2010 à 15:03, Rafael Cerioli a écrit : > Hi, > > I guess you need the framework libobjc.A.dylib for that stuff. > > > Rafael > > Le 31 mai 2010 à 08:45, Louis-Philippe a écrit : > >> Hi, >> >> I am trying t

Re: dynamic resolution

2010-05-31 Thread Jean-Daniel Dupas
Le 31 mai 2010 à 20:50, Rafael Cerioli a écrit : > > Le 31 mai 2010 à 13:41, Alastair Houghton a écrit : > >> On 31 May 2010, at 14:03, Rafael Cerioli wrote: >> >>> I guess you need the framework libobjc.A.dylib for that stuff. >> >> 1. That's a dylib (aka DLL, aka shared object), not a frame

Re: App will not launch

2010-06-01 Thread Jean-Daniel Dupas
Le 1 juin 2010 à 19:47, k...@highrolls.net a écrit : > I have many customers and one is having a problem with my application not > launching. > > The customer tells me that upon double-clicking the app just bounces in the > Dock and never finishes launching. The customer must Force Quit. > >

Re: CFAttributedString and NSDATA

2010-06-03 Thread Jean-Daniel Dupas
Le 3 juin 2010 à 12:14, Chaitanya Pandit a écrit : > It's really funny that the 3.2 SDk has incorporated the use of > CFAttributedStrings, but its really funny theres no way to convert it to > NSData and back. > Does anyone have any idea about how to persist a CFAttributedString by > convertin

Re: CFAttributedString and NSDATA

2010-06-03 Thread Jean-Daniel Dupas
Le 3 juin 2010 à 14:07, Kyle Sluder a écrit : > On Jun 3, 2010, at 4:24 AM, Jean-Daniel Dupas wrote: > >> If it behaves as the Mac OS CFAttributedString, cast it into an >> NSAttributedString and use an archiver. > > Is NSAttributedString a public type in

Re: Debugging sporadic crashes

2010-06-07 Thread Jean-Daniel Dupas
Le 7 juin 2010 à 16:39, Gabriel Zachmann a écrit : > I have an application with LSBackgroundOnly = on, and LSUIElement = off. > > Unfortunately, it crashes occasionally, or, rarely, it just hangs for a > minute (with beach ball) then comes back to life. > > So far, I have been unable to find a

Re: QuickTime web browser plugin - get current timecode

2010-06-08 Thread Jean-Daniel Dupas
Le 8 juin 2010 à 17:45, Paweł Kostecki a écrit : > Hi all, > > Is there any possibility of getting a current timecode of a QuickTime video > played on a web page (in QT plugin)? > > I mean a possibility similar to desktop [qtMovie currentTime] in Cocoa. > > What I need to do is to get a curre

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread Jean-Daniel Dupas
Le 8 juin 2010 à 19:23, James Bucanek a écrit : > Nick Zitzmann wrote (Tuesday, June 8, 2010 9:27 > AM -0600): > >> On Jun 8, 2010, at 10:16 AM, James Bucanek wrote: >> >>> I've been trying to track down a peculiar bug reported by a customer, and >>> I've narrowed

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread Jean-Daniel Dupas
Le 8 juin 2010 à 19:52, Alexander Heinz a écrit : > On Jun 8, 2010, at 1:37 PM, Jean-Daniel Dupas wrote: >> >> Le 8 juin 2010 à 19:23, James Bucanek a écrit : >> >>> Nick Zitzmann <mailto:n...@chronosnet.com> wrote (Tuesday, June 8, 2010 >>> 9:27

Re: NSRunLoop

2010-06-14 Thread Jean-Daniel Dupas
Le 15 juin 2010 à 00:22, Ariel Feinerman a écrit : > Hi, > I wish to make programme has cpu-related (one thread per core) number of > worker threads. When user inputs the data, main thread splits up the data > and send to the workers. Then worker threads go to sleep in anticipation of > the next

Re: NSLog and va_list

2010-06-17 Thread Jean-Daniel Dupas
Le 17 juin 2010 à 14:21, Matt James a écrit : > Hi everyone, > > Can anyone tell me how to NSLog() a va_list variable so I can see what's in > it? > You can't. va_list does not contains information about the type of variables it contains. -- Jean-Daniel ___

Re: terminates app when main window closes

2010-06-18 Thread Jean-Daniel Dupas
On Jun 18, 2010, at 2:02 AM, Kyle Sluder wrote: > On Thu, Jun 17, 2010 at 11:41 PM, Angelo Chen > wrote: >> I have a non document based application, I quit the app by sending terminate >> to NSApplication(file owner). if I close the main window, application will >> not be closed, what I'd like

Re: Base class/subclass model in objective c

2010-06-18 Thread Jean-Daniel Dupas
Le 18 juin 2010 à 12:44, Jonny Taylor a écrit : > I am still getting to grips with objective C, coming from a C++ background, > and I'm stuck on a particular aspect of the base class/subclass model that I > hope somebody can help me with. > > I need an object representing a video camera plugge

Re: Base class/subclass model in objective c

2010-06-18 Thread Jean-Daniel Dupas
Le 18 juin 2010 à 17:05, Jonny Taylor a écrit : > Thanks for your reply Jean-Daniel. > >>> I can see two ways of working around this - either implement placeholder >>> methods in the base class (that raise an exception or something) in order >>> to make the base class conform to the protocol (

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Jean-Daniel Dupas
Le 23 juin 2010 à 12:14, Ben Haller a écrit : > Hi all. I'm using NSTask and NSPipe to launch lots of little processes, and > I'm running out of file descriptors. In my googling and archive searching, I > found some info that led me to several approaches: > > 1. I ran ObjectAlloc and Leaks

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Jean-Daniel Dupas
Le 23 juin 2010 à 12:14, Ben Haller a écrit : > > So I have a workaround for the problem, but I want to understand *why* it > works. Shouldn't NSPipe close its associated files when it deallocs? Why > should it be necessary to call -closeFile? This behavior seems to be > specifically cont

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Jean-Daniel Dupas
Le 23 juin 2010 à 12:47, Ben Haller a écrit : > On 23-Jun-10, at 6:22 AM, Uli Kusterer wrote: > >> Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller: >>> So I have a workaround for the problem, but I want to understand *why* it >>> works. Shouldn't NSPipe close its associated files when it deallo

Re: Best way to determine if a directory is a package

2010-06-24 Thread Jean-Daniel Dupas
Le 24 juin 2010 à 23:24, Ron Aldrich a écrit : > Hello All, > > I've been asked to add the ability to drop a folder onto my application, and > scan the folder for acceptable documents. > > I'd like to filter the scan such that any file which is contained within a > package, or within a hidden

Re: Best way to compare CGFloats

2010-06-30 Thread Jean-Daniel Dupas
Le 30 juin 2010 à 10:35, Rimas M. a écrit : > Hello, > > I am stuck with floats (doubles, to be precise) comparison. > In part of my app, I am dealing with NSPoint components (x, y) > comparison. On 32bit architecture NSPoint components are floats, and > direct comparison ( float1 == float2 ) wo

Re: class_respondsToSelector() in runtime.h?

2010-07-01 Thread Jean-Daniel Dupas
Le 1 juil. 2010 à 19:30, Jonathon Kuo a écrit : > > On Jul 1, 2010, at 9:49 AM, Kyle Sluder wrote: > >> On Jul 1, 2010, at 9:42 AM, Jonathon Kuo >> wrote: >> >>> On Jul 1, 2010, at 7:56 AM, Matt Neuburg wrote: >>> "Instance methods defined in a root class can be performed both by

Re: Custom bundle icon

2010-07-02 Thread Jean-Daniel Dupas
Le 2 juil. 2010 à 15:39, John Johnson a écrit : > Just an aesthetic question. I've implemented an API for cocoa plugins in my > app, and the plugins use a custom extension, ftplugin. These plugins show up > as folders in the finder, even though I've set the app icon to an icns file. > Is there

Re: Bypass Network System Preferences for DNS lookup

2010-07-02 Thread Jean-Daniel Dupas
Le 2 juil. 2010 à 19:33, Jens Alfke a écrit : > > On Jul 1, 2010, at 7:42 PM, Michael Jackson wrote: > >> Is there any way to bypass the system network preferences for DNS >> servers to perform all DNS lookups from within a Cocoa app? For >> example, I would like my app to always make DNS queri

Re: NSWorkspace iconForFile

2010-07-06 Thread Jean-Daniel Dupas
Le 6 juil. 2010 à 18:17, k...@highrolls.net a écrit : > NSWorkspace iconForFile returns folder images for Documents, Desktop and > Downloads. > > Where does one get the icon used by the Finder Places View for these paths? Not for me. It returns the expected icon: [[NSWorkspace sharedWorkspac

Re: NSWorkspace iconForFile

2010-07-06 Thread Jean-Daniel Dupas
Le 6 juil. 2010 à 18:45, Kyle Sluder a écrit : > On Tue, Jul 6, 2010 at 9:42 AM, Jean-Daniel Dupas > wrote: >> Not for me. It returns the expected icon: >> >> [[NSWorkspace sharedWorkspace] iconForFile:[@"~/Desktop" >> stringByStandardizingPath]]

Re: Finding Application support folder without Cocoa or Carbon

2010-07-12 Thread Jean-Daniel Dupas
Le 12 juil. 2010 à 22:17, Alexander Cohen a écrit : > Hello, > > I need to find the system Application Support folder without using either > Carbon or Cocoa, i can use CoreFoundation though. Is there a way to do this? > What prevent you to use CoreServices which is neither Carbon, nor Cocoa ?

Re: print object by %@

2010-07-22 Thread Jean-Daniel Dupas
Le 22 juil. 2010 à 13:32, Ariel Feinerman a écrit : > Hi developers, > > I search in google, but can see nothing. Is there Cocoa fuction for objects > like printf(), without timestamps? Not the most efficient way, but straightforward for debugging purpose: printf("%s", [[NSString stringWithFor

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 a

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=en&q=Singleton%2Bevil > > > You have not said what about NSFileManager is a great ex

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

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

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 grad

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 (clippi

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

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 IOPMAssertionCreateWith

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 > > describes it as > > "Objective C 2.0 compatible class_poseAs() replacement. This demonstrates how > to replace a method in

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 nev

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 onl

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

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

Re: Blocks vs. life, the universe and everything

2011-10-14 Thread Jean-Daniel Dupas
Le 15 oct. 2011 à 01:45, Quincey Morris a écrit : > On Oct 14, 2011, at 14:27 , Greg Parker wrote: > >> Do you actually use exceptions in your code, or do you follow the Cocoa >> convention that exceptions are for programmer error only? If you don't use >> exceptions, then you can omit any try

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 generat

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 @autor

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

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

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 ini

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

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 wrote: > >> >> Le 7 nov. 2011 à 08:49, Joar Wingfors a écrit : >> >>> >>> In OjbC you don't need to provide declarations for a method "foo&quo

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

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 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 / function call

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 a

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 wa

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 sim

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 >

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 t

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

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

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

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

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

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.

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

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

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

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…]; > // ... > myController.

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 v

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