Re: API to determine status of System Integrity Protection?

2015-09-14 Thread Jean-Daniel Dupas
> Le 14 sept. 2015 à 01:33, Ed Wynne a écrit : > > > On Sep 13, 2015, at 5:47 PM, Stephane Sudre wrote: > That document doesn't mention an API… Hence, since that is the current documentation, my conclusion : “Don’t think so”. >>> There is an API. Much like with sandboxing it jus

Re: Identifying a specific Mac model

2015-09-14 Thread Jean-Daniel Dupas
> Le 14 sept. 2015 à 12:16, sqwarqDev a écrit : > > > On 14 Sep 2015, at 01:09, John Daniel wrote: > >> >> MacBook8,1 covers all colours of the new MacBook. >> I am trying to differentiate the silver, from the space grey, from the gold. > > Since the machines are physically identical save t

Re: Identifying a specific Mac model

2015-09-14 Thread Jean-Daniel Dupas
> Le 14 sept. 2015 à 15:53, John Daniel a > écrit : > > Thanks for the responses. Unfortunately, Apple is way ahead of all of us. > > The “Model Identifier” (MacBook8,1 et al.) is not sufficient to identify a > particular model. It only identifies general families of models. All you have > t

Re: The joys of people using valueForKey to get objects out of a dictionary.

2015-11-10 Thread Jean-Daniel Dupas
> Le 10 nov. 2015 à 19:52, Alex Zavatone a écrit : > > > On Nov 10, 2015, at 12:35 PM, Greg Weston wrote: > >> >> >>> It's been about 4 or 5 years since I made this mistake but I've just seen a >>> massive swath of code where every access of a dictionary object is using >>> valueForKey ins

Re: View-based NSTableView and ending editing with "return"

2016-02-03 Thread Jean-Daniel Dupas
> Le 24 janv. 2016 à 09:51, Arved von Brasch a écrit : > > Hello list, > > After putting it off for too long, I’m migrating to view-based NSTableViews. > I’ve worked through most of the conversion problems I’ve had, and am > generally pretty happy. There is, however, one problem I haven’t b

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
You don’t tell use what is your problem. You can perfectly encode any structure using Keyed archivers (whether there is cycles and backlinks). > Le 5 févr. 2016 à 14:13, Dave a écrit : > > Hi, > > I’m having problems with Back Links when Archiving/Unarchiving an Object. I > found the text bel

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
- > "Archive/Unarchive Problem/Question?”. > > Basically I need to save/restore a Network of Custom Objects….. > > All the Best > Dave > >> On 5 Feb 2016, at 13:18, Jean-Daniel Dupas wrote: >> >> You don’t tell use what is your problem. You can pe

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
And obviously, you also add - encodeWithCoder: and -initWithCoder: methods in your custom classes. > Le 5 févr. 2016 à 14:33, Jean-Daniel Dupas a écrit : > > That is your need, not your problem. > > To archive an object graph (cyclic or not), you just do [

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
Maybe an issue cause you use __weak reference which zeroed for some reason. Can you try to use __unsafe_unretained instead and see what happen ? > Le 5 févr. 2016 à 14:46, Dave a écrit : > > >> On 5 Feb 2016, at 13:34, Jean-Daniel Dupas wrote: >> >>

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-09 Thread Jean-Daniel Dupas
I agree. I can’t see how that can work with a properly configured Sparkle, that is an App that accepts only properly signed update. > Le 9 févr. 2016 à 23:22, Graham Cox a écrit : > > Thanks for the heads-up Jens. > > Is it enough to change the SUFeedURL to https (if your server supports it,

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-09 Thread Jean-Daniel Dupas
OK. I did watch the POC and it appears this is not in the update process, but in the check for update that the attack occurs. > Le 9 févr. 2016 à 23:27, Jean-Daniel Dupas a écrit : > > I agree. I can’t see how that can work with a properly configured Sparkle, > that is an App

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-10 Thread Jean-Daniel Dupas
> Le 10 févr. 2016 à 05:48, Trygve Inda a écrit : > >> If your hosting provider still charges an arm and a leg for SSL, switch. > > I need SSL for multiple subdomains. My host (Pair Networks) charges $449/yr > for such a certificate. That seems really expensive. What are others paying > for thi

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-11 Thread Jean-Daniel Dupas
> Le 11 févr. 2016 à 02:16, Ben Kennedy a écrit : > >> On 10 Feb 2016, at 5:00 pm, Gary L. Wade >> wrote: >> >> You've made my point. None of my friends would even bother with looking at >> the certificate for his site (assuming that's his site from his email >> address) and move on. At wor

Re: Can an NSArray ever have a count of -1?

2016-02-19 Thread Jean-Daniel Dupas
> Le 19 févr. 2016 à 22:29, Jens Alfke a écrit : > > >> On Feb 19, 2016, at 1:17 PM, Jim Adams wrote: >> >> SLogInfo(@"Starting csi %ld count %d", csi, sortedEvents.count); >> >> In the console I see: >> INFO: Starting csi -1 count -1 >> The very next line crashes when the sortedEv

Re: Can an NSArray ever have a count of -1?

2016-02-20 Thread Jean-Daniel Dupas
> Le 20 févr. 2016 à 07:28, Quincey Morris > a écrit : > > On Feb 19, 2016, at 22:14 , Gerriet M. Denkmann wrote: >> >> Is there (yet) a Swift version of ‘[NSString stringWithFormat: “%08lx”, >> (someCast) someValue]’ ? > > No, and yes, and no, and yes. > > There is currently AFAIK no such

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Jean-Daniel Dupas
It is unsafe to use availability conditional in headers. You can’t guarantee that the framework client will has the same settings that what was used to compile the framework. That said, if you want to use weak when compiling for ARC and assign otherwise, you can just use #if __has_feature(objc_a

Re: undomanger performance

2016-04-30 Thread Jean-Daniel Dupas
Just my 2 cents. Maybe registering the changes is not executed immediately but deferred until the end of the current event loop cycle, so the undo manager can group them into a single operation. In such case, it would mean that what you think is the undo registration is just a call to schedul

Re: undomanger performance

2016-05-01 Thread Jean-Daniel Dupas
> Le 1 mai 2016 à 01:42, Quincey Morris a > écrit : > > On Apr 30, 2016, at 12:49 , Jean-Daniel Dupas <mailto:mail...@xenonium.com>> wrote: >> >> Maybe registering the changes is not executed immediately but deferred until >> the end of the current

Re: Class is implemented in both

2016-08-15 Thread Jean-Daniel Dupas
> Le 15 août 2016 à 15:27, Trygve Inda a écrit : > >> >>> On Aug 15, 2016, at 3:41 AM, Stephane Sudre wrote: >>> >>> . you could redefine the class name in the .pch of one project. >> >> +1 — I’ve had to do this before, and it works fine. Just add >> #define MyDisplayManager MyDisplayManager

Re: Class is implemented in both

2016-08-15 Thread Jean-Daniel Dupas
> Le 15 août 2016 à 18:02, Jens Alfke a écrit : > > >> On Aug 15, 2016, at 11:34 AM, Jean-Daniel Dupas > <mailto:mail...@xenonium.com>> wrote: >> >> No, You can have only one PCH per project. That said, you can define a >> second one that include

Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?

2016-08-24 Thread Jean-Daniel Dupas
> Le 24 août 2016 à 18:50, David Duncan a écrit : > > >> On Aug 24, 2016, at 1:23 AM, Jeff Szuhay wrote: >> >> I’m using a bunch of layers to draw images to, compose them, and then draw >> into a viewRect >> with >> >> CGContextDrawLayerInRect( viewContext, viewRect, myLayer); >> >>

Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?

2016-08-24 Thread Jean-Daniel Dupas
> Le 24 août 2016 à 19:33, Jean-Daniel Dupas a écrit : > >> >> Le 24 août 2016 à 18:50, David Duncan a écrit : >> >> >>> On Aug 24, 2016, at 1:23 AM, Jeff Szuhay wrote: >>> >>> I’m using a bunch of layers to draw images to,

Re: Get file argument

2016-09-04 Thread Jean-Daniel Dupas
> Le 4 sept. 2016 à 20:48, Jens Alfke a écrit : > > >> On Sep 4, 2016, at 4:56 AM, Andreas Falkenhahn >> wrote: >> >> Is there also a way to get the file argument without having an NSApp, >> i.e. can my program somehow obtain the file argument *before* creating >> the NSApp object or is that

Re: Why not use path-based API? (was: Loading image resources)

2014-09-14 Thread Jean-Daniel Dupas
Le 14 sept. 2014 à 10:23, Quincey Morris a écrit : > On Sep 14, 2014, at 00:57 , Aandi Inston wrote: > >> Why? Really, why? Certainly there are APIs where we have to use URL's and >> we have to convert the path into a URL, but where a non-deprecated >> path-based URL exists, what current or f

Re: How does the Swift Darwin module work?

2014-10-18 Thread Jean-Daniel Dupas
AFAIK, variadic C functions are not (yet) callable from swift code. > Le 18 oct. 2014 à 20:37, Rick Mann a écrit : > > I need access to fcntl, so I thought I'd do what Apple does with Darwin. But > I don't actually see how to do that. They create Darwin.stdio.fopen(), for > example. But then

Re: WTF is happening?

2014-12-13 Thread Jean-Daniel Dupas
The Object class is not used anywhere is OS X. It is deprecated and should have been removed from the runtime long time ago. The OS X kernel does not even include obj runtime, so it can’t possibly use the Object class. Mach port are integer that represent kernel object and not classes. The ro

Re: WTF is happening?

2014-12-15 Thread Jean-Daniel Dupas
I found only 5 classes that does not responds to isProxy and they are all internal classes, so real code will never have to deal with instances of such classes. And all classes prefixed by « OS_ » inherits NSObject and responds to isProxy. I run the experiment for myself and do not doubt the r

Re: WTF is happening?

2014-12-15 Thread Jean-Daniel Dupas
> Le 15 déc. 2014 à 13:31, Uli Kusterer a écrit : > > On 15 Dec 2014, at 12:42, Jean-Daniel Dupas wrote: >> I found only 5 classes that does not responds to isProxy and they are all >> internal classes, so real code will never have to deal with instances of >> su

Re: WTF is happening?

2014-12-15 Thread Jean-Daniel Dupas
bool isSubclass(Class cls, Class superclass) { if (class_respondsToSelector(object_getClass(cls), @selector(isSubclassOfClass:))) { return [cls isSubclassOfClass:superclass]; } } > Le 15 déc. 2014 à 16:49, Maxthon Chan a écrit : > > But I still need some way to t

Re: WTF is happening?

2014-12-15 Thread Jean-Daniel Dupas
> Le 15 déc. 2014 à 19:45, Fritz Anderson a écrit : > > I can be dense. Do I understand correctly that > > - You have an application that ideally should run continually. > > - It accepts plugins that provide one or more classes. > > - Those classes must at least observe a protocol; otherwise

Re: WTF is happening?

2014-12-15 Thread Jean-Daniel Dupas
> Le 15 déc. 2014 à 21:36, Greg Parker a écrit : > > >> On Dec 15, 2014, at 11:02 AM, Jean-Daniel Dupas wrote: >> >>> Le 15 déc. 2014 à 19:45, Fritz Anderson a écrit : >>> >>> - As is typical of ObjC plugins, the classes are packaged i

Re: Looking at self = [super init].

2015-05-29 Thread Jean-Daniel Dupas
> Le 29 mai 2015 à 19:22, Alex Zavatone a écrit : > > Was just looking at good old object initialization and came across a stupid > idea. > > For most object initialization, we do this: > > - (id)init { >if (self = [super init]) { >// Set up stuff here. >// this could get

Re: Looking at self = [super init].

2015-05-29 Thread Jean-Daniel Dupas
> Le 29 mai 2015 à 19:22, Alex Zavatone a écrit : > > Was just looking at good old object initialization and came across a stupid > idea. > > For most object initialization, we do this: > > - (id)init { >if (self = [super init]) { >// Set up stuff here. >// this could get

Re: Using CFSTR() with const char * variable

2015-06-07 Thread Jean-Daniel Dupas
That’s not going to work. __builtin___CFStringMakeConstantString is a special compiler function that requires a constant string to work in the first place, as it tells the compiler to generate CFString literal. I doubt the compiler will accept anything else as parameter. > Le 7 juin 2015 à 03

Re: Scripting Bridge Questions

2015-06-25 Thread Jean-Daniel Dupas
> Le 25 juin 2015 à 15:13, Dave a écrit : > > >> On 25 Jun 2015, at 13:33, Bill Cheeseman wrote: >> >> >>> On Jun 25, 2015, at 8:09 AM, Dave wrote: >>> >>> That’s the problem, “sdef" and/or “sdp" barf when I try to generate the >>> header file and without the header file you are pretty mu

Re: Scripting Bridge Questions

2015-06-25 Thread Jean-Daniel Dupas
> Le 25 juin 2015 à 15:57, Dave a écrit : > > >> On 25 Jun 2015, at 14:48, Bill Cheeseman wrote: >> >> >>> On Jun 25, 2015, at 9:13 AM, Dave wrote: >>> >>> I get this error: >>> >>> sdp: enumerator of enumeration "e183": missing required "name" attribute. >> >> >> Can you generate the s

Re: Subclassing a Subclass of SBApplication

2015-06-30 Thread Jean-Daniel Dupas
Using class extension is probably a safe way to extends such classes. @interface SXPhotoshopApplication (MyExtension) - (void)myWrapper; @end > Le 29 juin 2015 à 13:54, Dave a écrit : > > Hi, > > I’m using the Scripting Bridge, and I was wondering if it ok to subclass > SBXXX classes. Basi

Re: Swift and parameter names

2015-07-01 Thread Jean-Daniel Dupas
> Le 30 juin 2015 à 23:46, Quincey Morris > a écrit : > > On Jun 29, 2015, at 15:42 , Rick Mann wrote: >> >> Here's an example (and this is what I frequently encounter) where requiring >> parameter names adds nothing but clutter: >> >> let config = WKWebViewConfiguration() >> self.webVi

Re: Obj-c to Swift conversion question

2015-07-28 Thread Jean-Daniel Dupas
> Le 28 juil. 2015 à 16:03, Eric E. Dolecki a écrit : > > The more I stretch to Swift goals, the more I learn. However I've come upon > a little thing where I am translating code into Swift and quickly stumbled. > > *Obj-C:* > NSValue *keyboardEndFrameValue = [[notification userInfo] > objectFo

Re: Unique ID for a Window?

2015-07-29 Thread Jean-Daniel Dupas
> Le 29 juil. 2015 à 12:25, Dave a écrit : > > Hi, > > For reasons that are too complex to go in to, I need to somehow create a > Unique ID that is valid for the life of a Window. The Window I am trying to > identify is not owned by my App (think Screen Dump, like “Grab”). > > I ran this co

Re: NSManagedObject, NSString property retain vs copy

2015-07-31 Thread Jean-Daniel Dupas
> Le 30 juil. 2015 à 18:26, Fritz Anderson a écrit : > > On 30 Jul 2015, at 11:03 AM, Trygve Inda wrote: > >> It seems Apple is using retain rather than copy for NSString properties in >> an NSManagedObject subclass. >> >> I was always under the impression that copy should be used for NSStrin

Re: contextual menu plugin example in cocoa

2009-09-01 Thread Jean-Daniel Dupas
Le 1 sept. 2009 à 19:41, Klaus Wik a écrit : Nick Zitzmann wrote: On Aug 19, 2009, at 5:26 PM, augusto callejas wrote: if so, where would i find sample code like above, except using just cocoa? There aren't any. You have to use Carbon for at least the entry point of a CM plugin. After that,

Re: After changing to MacOS 10.6 XCode no longer compiles

2009-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 2009 à 12:20, Horst Jäger a écrit : Hi, after changing to MacOS 10.6 my XCode no longer compiles. No error message and XCode doesn't freeze. It just says "CompileXIB ..." and that's it. Any idea what I could do? Which Xcode version ? _

Re: Finder contextual menu plugin 10.6

2009-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 2009 à 14:10, Marco Cassinerio a écrit : Hi, so far i've build finder plugin using Carbon and SampleCMPlugin code example. Now, with 10.6, Carbon support has been dropped. So, how can i create a finder plugin that works only on 10.6? Use System Services: http://developer.app

Re: What's actually important to do before exiting?

2009-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 2009 à 23:11, Erik Buck a écrit : - Posix message queues are a finite kernal resource that is not freed when processes terminate incorrectly. - Posix semaphores are a finite kernal resource that is not freed when processes terminate incorrectly. - MACH IPC message queues are a fin

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Jean-Daniel Dupas
Le 4 sept. 2009 à 13:20, Bill Cheeseman a écrit : On Sep 4, 2009, at 5:41 AM, Charles Srstka wrote: the latest release of Pacifist includes a QuickLook plug-in that can view many of the formats that Pacifist can read, which include zip, tar, tar.gz, tar.bz2, and others I just tried inst

Re: defaultConnection in Snow Leopard

2009-09-04 Thread Jean-Daniel Dupas
Le 4 sept. 2009 à 17:18, Kyle Sluder a écrit : On Sep 4, 2009, at 7:38 AM, "Gerriet M. Denkmann" > wrote: But it fails to mention, what I should use instead. The release notes say, but I don't have them in front of me andjim hesitant to go by memory for fear of miquoting. Quote from th

Re: OpenGL screen captures

2009-09-05 Thread Jean-Daniel Dupas
Le 5 sept. 2009 à 06:06, Development a écrit : I'm using opengl to do screen captures because that seems to be the fastest way. The problem is that I need the cursor to be visible but it is not. Is there a flag I can set with opengl to make the cursor visible? Or am I going to have to attac

Re: Services Menu in Snow Leopard

2009-09-05 Thread Jean-Daniel Dupas
Le 5 sept. 2009 à 06:26, Gerriet M. Denkmann a écrit : I have an app which provides info about files, folders, symlinks, etc. In Leopard the Services Menu of e.g. Finder did show my "Get Information" regardless whether a file or a folder was selected. In Snow Leopard the Services Menu of F

Re: subclassing with conditional method overriding

2009-09-05 Thread Jean-Daniel Dupas
Le 5 sept. 2009 à 12:33, jonat...@mugginsoft.com a écrit : On 5 Sep 2009, at 11:25, Alex Reynolds wrote: Let's say I have a class interface and implementation, as follows: --- @interface A : NSObject { ... } - (void) handleTask; @end @implementation A ... - (void) handleTask { // do stuf

Re: Turn on zombies in user environment?

2009-09-07 Thread Jean-Daniel Dupas
Le 7 sept. 2009 à 14:03, Graham Cox a écrit : On 07/09/2009, at 5:37 PM, Joar Wingfors wrote: You're not supposed to type either the "$", or the "(gdb)". They're just there to indicate that you're supposed to type this at a prompt, and what type of prompt you're at. Which was what I th

Re: [[NSHost currentHost] name] blocking on 10.6 ?

2009-09-08 Thread Jean-Daniel Dupas
Le 8 sept. 2009 à 22:15, jonat...@mugginsoft.com a écrit : I am not sure if this is a problem unique to me or not but under 10.5 [[NSHost currentHost] name] or [[[NSProcessInfo] processInfo] hostname] were quick and easy ways to get an mDNS friendly hostname such as imac-2.local On 10.6

Re: singleton pattern in cocoa

2009-09-14 Thread Jean-Daniel Dupas
Definition of true singleton is generally discouraged and not really useful. See more info about it here: http://eschatologist.net/blog/?p=178 Le 10 sept. 2009 à 22:07, Manuel Grau a écrit : Hi all, As I come from java world, I was trying to implement the singleton pattern, very usual i

Re: What replaces the (now deprecated) NSObjCValueType?

2009-09-16 Thread Jean-Daniel Dupas
Le 16 sept. 2009 à 10:09, Todd Blanchard a écrit : NSMethodSignature has methods: - (const char *)getArgumentTypeAtIndex:(NSUInteger)idx; - (const char *)methodReturnType; So apparently the runtime is using strings to denote types instead of the now deprecated NSObjCValueType. So where is

Re: NSRunLoop issue

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 16:41, Andreas Grosam a écrit : How can I prevent a run loop from returning immediately if there is no input source and no timer attached ? Following problem: I use a separate thread where several periodic timers shall be attached and detached to the thread's run loop

Re: NSRunLoop issue

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 18:28, Jerry Krinock a écrit : On 2009 Sep 17, at 07:48, Jean-Daniel Dupas wrote: Add a dummy source (mach port or timer with an insanely high fire date) before running your loop. So you re sure there is at least one source. Please show a few lines of code adding a

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 19:59, Matt Neuburg a écrit : On or about 9/17/09 9:55 AM, thus spake "David Duncan" : On Sep 16, 2009, at 7:13 PM, Matt Neuburg wrote: I guess I wasn't clear. Deployment target is 10.5. Base SDK is 10.5. Runs fine on 10.6 but crashes in Core Animation on 10.5. The questi

Re: Obtaining the application icon

2009-09-17 Thread Jean-Daniel Dupas
An other way is to use - [NSApplication applicationIconImage] Le 17 sept. 2009 à 20:06, Kyle Sluder a écrit : http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html#//apple_ref/doc/uid/2344-imageNamed_ --Kyle Slude

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 20:22, David Duncan a écrit : On Sep 17, 2009, at 10:59 AM, Matt Neuburg wrote: I'm happy to try to reduce this to a simpler case, but before I do that - I thought that setting the deployment target and base sdk to 10.5 meant that there was *no* such difference? In other

Re: basic threading question: if parent thread completes

2009-09-17 Thread Jean-Daniel Dupas
Le 18 sept. 2009 à 00:32, Stephen J. Butler a écrit : On Thu, Sep 17, 2009 at 5:23 PM, Nick Rogers wrote: Hi, I need to know this before going in for changes that are too complex. I spawned a thread from AppController (thread1). From thread1, I spawn another thread2. thread1 completes. Will

Re: What is the life of the c string returned by NSString's UTF8String method?

2009-09-18 Thread Jean-Daniel Dupas
Le 18 sept. 2009 à 20:20, Nick Zitzmann a écrit : On Sep 18, 2009, at 12:04 PM, Stuart Malin wrote: I am under the impression that the reference returned by NSString's UTF8String method is valid for the life of the NSString instance which provided the reference (and further, that the memo

Re: Static Analyzer and Core Foundation

2009-09-19 Thread Jean-Daniel Dupas
Le 19 sept. 2009 à 02:25, Steve Cronin a écrit : Luke; I've adapted the code to accomodate your's and Chris' answer to question 2. Here's the entire method, which now shows not static analyzer issues but I still would like to understand why not. + (NSDictionary *)metadataForFilePath:(NS

Re: favicon of address

2009-09-21 Thread Jean-Daniel Dupas
As not everybody like the nasty ico file format, some web developer are nice enough to use 32 bits PNG. So, without page content, I don't see how you would now where the favicon is. Le 21 sept. 2009 à 01:11, Mike Abdullah a écrit : The best engineered approach would probably be to load t

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-22 Thread Jean-Daniel Dupas
You can use an enum to define integer constants enum { x = 123, }; Le 21 sept. 2009 à 23:15, Frederick C. Lee a écrit : I suspected such.Thanks to all. I'm assuming 'const ' is better then the compiler directive '#define', due to the use of the compiler for more-efficient code. Henc

Re: Suppressing Crash Reporter dialogs for a task

2009-09-23 Thread Jean-Daniel Dupas
The only way I now is to prevent the exception to be caught by the Crash Reporter. It can be done by disabling your task exception port. #include task_set_exception_ports(mach_task_self(), EXC_MASK_BAD_ACCESS | EXC_MASK_CRASH, MACH_PORT_NULL, NULL, NULL) This is not something I would do i

Re: Global Hotkeys in 64-bit mode

2009-09-28 Thread Jean-Daniel Dupas
Le 26 sept. 2009 à 02:54, Tobias Zimmerman a écrit : I sent a longer message yesterday, but it apparently didn’t get posted. I am looking for a way to implement global hotkeys in 64-bit mode. When I use the method described here: http://unsanity.org/archives/45.php I am having a prob

Re: Disable CD Ejection

2009-10-02 Thread Jean-Daniel Dupas
I would look at DiskArbitration. Don't know if there is something to do this, but if there is, it is here. Maybe DARegisterDiskEjectApprovalCallback() may do the trick ? Le 2 oct. 2009 à 21:58, Bryan Matteson a écrit : I'm not quite sure where to look for this. I need to put a lock on the

Re: Issues with NSWindowDelegate on multiple Mac OS X platforms

2009-10-06 Thread Jean-Daniel Dupas
Le 7 oct. 2009 à 06:42, Kyle Sluder a écrit : Please read the 10.6 Foundation release notes, particularly the section entitled "Formal protocol adoption": http://developer.apple.com/mac/library/releasenotes/Cocoa/Foundation.html We compile dual-mode code using the following: @interface Subcla

Re: real verses Virtual memory

2009-10-10 Thread Jean-Daniel Dupas
Le 10 oct. 2009 à 17:24, jon a écrit : it loads a website, to see if there are changes to the website, it then does a lot of work, the large memory things, like the "webView" are just one instance, and are not deallocating... (uses just that one instance over and over again, not mak

Re: real verses Virtual memory

2009-10-10 Thread Jean-Daniel Dupas
Le 10 oct. 2009 à 18:53, jon a écrit : Ok, let me re-word it then, is there a way i can keep a process from using Disk writes as a form of it's own memory use? I already know that it is a memory "thing" since the program never uses the disk to write out any files. (during the proce

Re: real verses Virtual memory

2009-10-10 Thread Jean-Daniel Dupas
No, Activity Monitor as not a developer tool. As I said (and other too), uses proper tools. Instrument, may be a good starting point. Le 10 oct. 2009 à 20:12, jon a écrit : ok, I have Activity monitor open, particularly to the "disk activity" tab, and the IO checked, as i said before, an

Re: Record and Playback immediately

2009-10-15 Thread Jean-Daniel Dupas
Le 15 oct. 2009 à 09:41, Symadept a écrit : Hi, I took the examples of afplay & afrecord. But it does the normal record to completion and play to completion manner. How can I Record into buffer and play from there. I hope instead of AFPlay, Queue based recording and playing would help. C

Re: Record and Playback immediately

2009-10-16 Thread Jean-Daniel Dupas
have any Macos Dev forums where I can ask this kind of questions. And I am working on AQRecord/Play. But still I haven't figured it out how to make it immediately. Regards Mustafa On Thu, Oct 15, 2009 at 4:27 PM, Jean-Daniel Dupas > wrote: Le 15 oct. 2009 à 09:41, Symadept a écrit :

Re: Make a solid line look like 3D

2009-10-26 Thread Jean-Daniel Dupas
Le 26 oct. 2009 à 17:44, Matthias Arndt a écrit : Hi guys, first let me thank you for all information and suggestions you provided! Am 26.10.2009 um 00:48 schrieb I. Savant: That was entirely my fault, sorry. I have no idea where I got the idea it was for a screen saver. I did not follo

Re: Alternative to stringWithContentsOfURL

2009-10-27 Thread Jean-Daniel Dupas
If you want something closer than what the browser does, use the URL Loading System: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html Le 27 oct. 2009 à 16:35, James Lin a écrit : The sticky point right now is: the same url string use

Re: waiting for async callback in main thread

2009-10-27 Thread Jean-Daniel Dupas
Le 27 oct. 2009 à 21:47, Alexander Cohen a écrit : On Oct 27, 2009, at 3:42 PM, Jens Alfke wrote: On Oct 27, 2009, at 12:11 PM, Alexander Cohen wrote: 100% agree with you, and that's what i would normally do. But unfortunately, this time i must wait in the mainthread for the callback.

Re: Single Static Library for iPhone and Desktop applications

2009-10-28 Thread Jean-Daniel Dupas
Le 28 oct. 2009 à 10:44, Karolis Ramanauskas a écrit : ...also I wanted to ask, in case this is not possible how do I avoid copying existing classes I have written for desktop and using them in iPhone? I can easily create two versions of static library and keep copying/ pasting files betwe

Re: Trying blocks

2009-10-30 Thread Jean-Daniel Dupas
Le 30 oct. 2009 à 07:33, Greg Parker a écrit : On Oct 28, 2009, at 5:56 PM, Charlie Dickman wrote: It compiles fine but the load fails with... "__NSConcreteGlobalBlock", referenced from: ___block_holder_tmp_1.1207 in Controller.o ld: symbol(s) not found collect2: ld returned 1 exit status

Re: PolKit for Leopard and later

2009-10-30 Thread Jean-Daniel Dupas
Le 30 oct. 2009 à 17:25, Jens Alfke a écrit : On Oct 29, 2009, at 6:25 AM, Pierre-Olivier Latour wrote: The entire project is available open-source under GPLv3 license hosted on Google Code. If you are interested in using PolKit in a non-open- source project and need a commercial license,

Re: why use pow(x, 2)?

2009-11-02 Thread Jean-Daniel Dupas
Le 2 nov. 2009 à 20:01, Chunk 1978 a écrit : i just came across some code, and i'm trying to understand why the developer chose to use the pow() function instead of simply multiplying as the 2nd arguments are always 2. i'm certainly no mathematician, but if the 2nd argument is going to be

Re: cocoabuilder.com

2009-11-10 Thread Jean-Daniel Dupas
Le 10 nov. 2009 à 14:09, Rui Pacheco a écrit : > Seems to be down for a few days. Maybe we should email whoever registered > the domain? > > 2009/11/10 John Love > >> Is http://www.cocoabuilder.com/ dead? >> >> In the meantime, if you want to search archives, you can use google: "my query

Re: CALayer subclass allocation problem

2009-11-11 Thread Jean-Daniel Dupas
Le 10 nov. 2009 à 23:51, Nick Zitzmann a écrit : > > On Nov 10, 2009, at 3:13 PM, Bob Barnes wrote: > >> Good ideas, but the static analyzer is Xcode 3.2, which requires 10.6 I >> believe. I'm still running 10.5. > > If you're using Leopard, you can still run the object alloc instrument with

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Jean-Daniel Dupas
Le 14 nov. 2009 à 11:47, Roni Music a écrit : > >> I'm building a Framework with some exported extern "C" functions in >> Objective-C++, based on this example: >> http://developer.apple.com/internet/webservices/webservicescoreandcfnetwork.html >> >> Because this is a Framework, it doesn't have

Re: Scanning

2009-11-17 Thread Jean-Daniel Dupas
http://developer.apple.com/mac/library/samplecode/ScannerBrowser/ Le 17 nov. 2009 à 15:51, Tom Davie a écrit : > I'm trying desperately to find where the API for scanning images is, I've > found the Image Capture API on developer.apple.com, but I can't find a more > recent version than one for 10

Re: Authorization plugin samples

2009-11-20 Thread Jean-Daniel Dupas
Le 19 nov. 2009 à 12:14, Alan James Caruana a écrit : > Hi, > > I am not sure this is the right list for this question. If it is not, I > aplologize, and ask which list should I address ? Security related questions go on this list: http://lists.apple.com/mailman/listinfo/apple-cdsa -- Jean-

Re: ColorSyncDeprecated.h in OSX - 10.6

2009-11-20 Thread Jean-Daniel Dupas
Le 19 nov. 2009 à 12:35, Simon ONeill a écrit : > Hi, > > Does anyone have any idea where the new functions for ColorSyncManager > (presumably 64bit focused) are documented? Currently, the only place is in the headers themselves (the header are in the same folder as ColorSyncDeprecated.h).

Re: question about informal protocols

2009-11-20 Thread Jean-Daniel Dupas
Le 20 nov. 2009 à 20:46, Michael de Haan a écrit : > I am working through an example in Buck/Yacktman's book that uses an > informal protocol. > > In the interface of of a custom class, it is declared as such. > > > #import > > > @interface MyShapeEditorDocument : NSDocument > { >...

Re: question about informal protocols

2009-11-20 Thread Jean-Daniel Dupas
Le 20 nov. 2009 à 21:09, Michael de Haan a écrit : >> >> >> The usual way is to NOT implements the NSObject category and test if the >> delegate implements the method using -respondsToSelector: >> But this way works too if you don't want to have to test before sending your >> message. >> >>

Re: method_getNumberOfArguments counts blocks twice

2009-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 2009 à 02:25, Philip White a écrit : > Hello, > I apologize if this has been touched on already. Have others observed that > the function method_getNumberOfArguments counts block arguments as two > arguments? The corresponding method in NSMethodSignature counts them once. > Similar

Re: [OT] Re: A question of legality...

2009-11-23 Thread Jean-Daniel Dupas
Le 23 nov. 2009 à 19:10, Alastair Houghton a écrit : > On 23 Nov 2009, at 10:58, Michael Davey wrote: > >> I want to share with you all the 4 arch version of the mysql libs that I >> went to some trouble to make today, but in light of the information given to >> me today by Andrew Farmer, I do

Re: How to get notified pause when QTMovieView when clicked

2009-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 2009 à 11:03, Symadept a écrit : > Hi, > > I figured out that when I click on the QTMovieView, it pauses and double > clicks it plays again. How to get notified whenever the movie is paused or > played by click and double click on the QTMovieView. > > I tried all the possibilities lik

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Jean-Daniel Dupas
Le 25 nov. 2009 à 17:49, Mario Kušnjer a écrit : > > On 2009.11.25, at 17:20, Jens Alfke wrote: > >> >> On Nov 25, 2009, at 5:49 AM, Mario Kušnjer wrote: >> >>> How to hide the disclosure triangle in front of the Root object and remove >>> indentation for it, and just that object (and later

Re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Jean-Daniel Dupas
Le 18 mars 2010 à 07:41, BJ Homer a écrit : > On Wed, Mar 17, 2010 at 11:47 PM, Greg Guerin wrote: >> >> Two main questions come to mind: >> >> Q1. What are you trying to accomplish? >> Q2. Why do you think this would work? >> >> More on Q1: You said you need user-space threads, but you gave

Re: Sync .DS_Store files

2010-03-26 Thread Jean-Daniel Dupas
.fseventd is not a time machine specific folder. See FSEvent API for details. Le 26 mars 2010 à 13:21, gMail.com a écrit : > Thank you Dave, Thank you Jens. > I will ignore the .DS_Store files. I think the Finder will take care of > them. Also I have got the same question on the hidden directory

Re: The fastest way to render bitmaps to screen in Cocoa on Snow Leopard?

2010-03-27 Thread Jean-Daniel Dupas
Le 27 mars 2010 à 14:05, Oleg Krupnov a écrit : > Thanks everyone! Ariel, thanks for the CoreImageGLTextureFBO sample. > No, Paul, NSImage performance is not enough for my purpose. > > Mike, I am aware that OpenGL is perhaps the fastest drawing API in the > system. However, because it's so low-l

Re: Terminating subtasks reliably

2010-03-31 Thread Jean-Daniel Dupas
Le 31 mars 2010 à 05:18, John Harte a écrit : > > On Mar 30, 2010, at 4:01 PM, McLaughlin, Michael P. wrote: > >> I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks >> (since threads are not sufficient in this case). Currently, I terminate >> these subtasks via the ap

Re: Terminating subtasks reliably

2010-03-31 Thread Jean-Daniel Dupas
Look at the sources. It uses kevent. (man kevent) Le 31 mars 2010 à 14:24, McLaughlin, Michael P. a écrit : > How does WatchForTermination() do its watching? Is it constantly polling? > That would be a performance-killer. > > > On 3/30/10 11:18 PM, "John Harte" wrote: > > > > On Mar 30,

Re: Copy Folder Attributes of /dev

2010-04-01 Thread Jean-Daniel Dupas
Le 1 avr. 2010 à 19:54, gMail.com a écrit : > Hi, > I want to copy all the folder's attributes, so instead of using the Cocoa > API I have to use FSSetCatalogInfo. This requires an FSRef, so I use > FSPathMakeRef or FSPathMakeRefWithOptions, e.g. > > err = FSPathMakeRefWithOptions((UInt8*)cSrcPa

Re: Alternative startup for application

2010-04-06 Thread Jean-Daniel Dupas
Le 3 avr. 2010 à 05:13, Michael Nickerson a écrit : > > On Apr 02, 2010, at 10:12 PM, Gideon King wrote: > >> That's the instance method. New in 10.6 is the class method of the same >> name, which is what I need in this case, since I don't have an event to work >> with. >> >> On 03/04/2010,

Re: How do I get a file reference w/o relying on the path?

2010-04-06 Thread Jean-Daniel Dupas
Le 4 avr. 2010 à 19:50, Jens Alfke a écrit : > You're saying that if I have a FSRef to a file, then the file is moved, the > FSRef will still reference the moved file and not the location where it used > to be? > > That's surprising to me, because FSRefs were created as a replacement for > FS

  1   2   3   4   5   6   7   8   9   10   >