From ahoesch at smartsoft.de Thu Nov 1 03:15:19 2007 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Thu Nov 1 03:35:30 2007 Subject: NSNotificationCenter problem Message-ID: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> Hi all, I have a very weird problem that causes me tearing my hair out. For the first time in my life something works beautifully well under GNUstep but not at all under MacOSX. And I have no idea why. I do [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(storeDidRevert:) name:SOInvalidatedAllObjectsInStoreNotification object:editingContext]; [[NSNotificationCenter defaultCenter] postNotificationName:SOInvalidatedAllObjectsInStoreNotification object:editingContext]; - (void)storeDidRevert:(NSNotification *)notification { NSLog(@"storeDidRevert..."); } This works initially, but when I trigger [[NSNotificationCenter defaultCenter] postNotificationName:SOInvalidatedAllObjectsInStoreNotification object:editingContext]; again, storeDidRevert: is not called anymore (only under MacOSX). My first guess was there must be an removeObserver: statement anywhere, but there is none. And I use exactly the same code on GNUstep where my code works perfectly! :-( Any idea how this can be tracked done efficiently (with gdb)? Under GNUstep I would raise an exception in removeObserver if notificationName is SOInvalidatedAllObjectsInStoreNotification but on MacOSX I cannot simply alter and recompile the code of NSNotificationCenter. Hints are greatly appreciated! Thanks, Andreas From cmhofman at gmail.com Thu Nov 1 03:44:55 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Thu Nov 1 03:45:02 2007 Subject: NSNotificationCenter problem In-Reply-To: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> Message-ID: On 1 Nov 2007, at 11:15 AM, Andreas H?schler wrote: > Hi all, > > I have a very weird problem that causes me tearing my hair out. For > the first time in my life something works beautifully well under > GNUstep but not at all under MacOSX. And I have no idea why. I do > > [[NSNotificationCenter defaultCenter] addObserver:self > selector:@selector(storeDidRevert:) > name:SOInvalidatedAllObjectsInStoreNotification > object:editingContext]; > > [[NSNotificationCenter defaultCenter] > postNotificationName:SOInvalidatedAllObjectsInStoreNotification > object:editingContext]; > > - (void)storeDidRevert:(NSNotification *)notification > { > NSLog(@"storeDidRevert..."); > } > > This works initially, but when I trigger > > [[NSNotificationCenter defaultCenter] > postNotificationName:SOInvalidatedAllObjectsInStoreNotification > object:editingContext]; > > again, storeDidRevert: is not called anymore (only under MacOSX). > My first guess was there must be an removeObserver: statement > anywhere, but there is none. And I use exactly the same code on > GNUstep where my code works perfectly! :-( > Are you also using the same (identical) editingContext object? > Any idea how this can be tracked done efficiently (with gdb)? Under > GNUstep I would raise an exception in removeObserver if > notificationName is SOInvalidatedAllObjectsInStoreNotification but > on MacOSX I cannot simply alter and recompile the code of > NSNotificationCenter. > > Hints are greatly appreciated! > > Thanks, > > Andreas You can always use a subclass and poseAsClass: for debugging. make sure you do it early enough (e.g. at the start of main()). Christiaan From georg.seifert at gmx.de Thu Nov 1 05:35:15 2007 From: georg.seifert at gmx.de (Georg Seifert) Date: Thu Nov 1 05:35:22 2007 Subject: NSCollectionView Message-ID: hello, I tried the new xCode 3 an I?m very happy to see the NSCollectionView in Interface Builder. Does anyone know how to enable drag reordering as it is possible with ist accessor IKImageBrowserView. I cannot find anything on the net about it. Many Thanks, Georg From idiotsavant2005 at gmail.com Thu Nov 1 06:40:01 2007 From: idiotsavant2005 at gmail.com (I. Savant) Date: Thu Nov 1 06:40:05 2007 Subject: NSCollectionView In-Reply-To: References: Message-ID: Georg: > I tried the new xCode 3 an I'm very happy to see the NSCollectionView > in Interface Builder. Does anyone know how to enable drag reordering > as it is possible with ist accessor IKImageBrowserView. I cannot find > anything on the net about it. Sadly, it seems there's no public means of supporting drag and drop with a collection view. However, if you subclass NSCollectionView, you may be able to do your own legwork (since it's laid out in a predictable grid) and calculate the drop point then re-index your model based on that. In a few weeks time, I might go that route with a new in-house project. If I develop anything I'm not ashamed of, I'll post it on cocoadev.com. :-) In the meantime, hopefully someone ( cocoadevcentral.com? ) will come up with something better. That'd save some effort. -- I.S. From sstevenson at mac.com Thu Nov 1 18:28:17 2007 From: sstevenson at mac.com (Scott Stevenson) Date: Thu Nov 1 18:28:20 2007 Subject: NSNotificationCenter problem In-Reply-To: References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> Message-ID: On Nov 1, 2007, at 3:44 AM, Christiaan Hofman wrote: > You can always use a subclass and poseAsClass: for debugging. make > sure you do it early enough (e.g. at the start of main()). FWIW, this is deprecated in Leopard. - Scott From tjones at acworld.com Thu Nov 1 19:16:23 2007 From: tjones at acworld.com (Tom Jones) Date: Thu Nov 1 19:34:53 2007 Subject: Calendar control Message-ID: Hello, I was wondering if there is a calendar control that someone may have written. Either for free or pay. Thanks, tom From tjones at acworld.com Thu Nov 1 20:25:49 2007 From: tjones at acworld.com (Tom Jones) Date: Thu Nov 1 20:25:54 2007 Subject: Calendar control In-Reply-To: Message-ID: Sorry, I forgot to mention that I really want a iCal type control. - tom On 11/1/07 8:15 PM, "SD" wrote: > You could look at this: > http://www.bassetsoftware.com/osx/jtcalendarwidget/ > > ______________________________________________________________________ > Previous message on 11/1/07 at 7:16 PM -0700 > ********************************************************************** >> Hello, >> I was wondering if there is a calendar control that someone may have >> written. Either for free or pay. >> >> Thanks, >> tom >> >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > From macosxdevlist at personal.fishh2o.com Thu Nov 1 20:27:54 2007 From: macosxdevlist at personal.fishh2o.com (SD) Date: Thu Nov 1 20:29:54 2007 Subject: Calendar control In-Reply-To: References: Message-ID: What do you mean by iCal type control? ______________________________________________________________________ Previous message on 11/1/07 at 8:25 PM -0700 ********************************************************************** >Sorry, >I forgot to mention that I really want a iCal type control. > >- tom -- ========================================== SD WARNING: Programming may be habit forming. From macosxdevlist at personal.fishh2o.com Thu Nov 1 20:15:06 2007 From: macosxdevlist at personal.fishh2o.com (SD) Date: Thu Nov 1 21:17:54 2007 Subject: Calendar control In-Reply-To: References: Message-ID: You could look at this: http://www.bassetsoftware.com/osx/jtcalendarwidget/ ______________________________________________________________________ Previous message on 11/1/07 at 7:16 PM -0700 ********************************************************************** >Hello, >I was wondering if there is a calendar control that someone may have >written. Either for free or pay. > >Thanks, >tom > > >_______________________________________________ >MacOSX-dev mailing list >MacOSX-dev@omnigroup.com >http://www.omnigroup.com/mailman/listinfo/macosx-dev -- ========================================== SD WARNING: Programming may be habit forming. From adam.q.salter at gmail.com Thu Nov 1 22:09:25 2007 From: adam.q.salter at gmail.com (Adam Salter) Date: Thu Nov 1 22:09:32 2007 Subject: RubyCocoa In-Reply-To: References: Message-ID: <6CE582C1-5F6E-4EEC-9836-CE0914B16B21@gmail.com> OK, I loved all the 'hype' about RubyCocoa so I thought I'd jump in... First install XCode 3.0, no real issues... Second try a RubyCocoa example... ahh issues :) Just like the good old days :) OK so i'm trying to compile _any_ of the example RubyCocoa code in Examples/Ruby/RubyCocoa Take RoundTransparentWindow for instance... It won't compile off-the-bat. But a new RubyCocoa application from "File > New Project" will, so I thought I'd just copy the setup from that... Anway long story short it's still not compiling... I have the RubyCocoa framework installed, but it still can't find RubyCocoa/RBRuntime.h It seems you have to import the Cocoa.h beforehand, but this isn't working because I get many errors about 'unable to find WebServicesCore.h' and others... I've cleaned my project and I still get the same errors. Has anybody tried compiling any of the RubyCocoa example projects? TIA, -Adam From bbum at mac.com Thu Nov 1 22:45:24 2007 From: bbum at mac.com (Bill Bumgarner) Date: Thu Nov 1 22:45:49 2007 Subject: RubyCocoa In-Reply-To: <6CE582C1-5F6E-4EEC-9836-CE0914B16B21@gmail.com> References: <6CE582C1-5F6E-4EEC-9836-CE0914B16B21@gmail.com> Message-ID: On Nov 1, 2007, at 10:09 PM, Adam Salter wrote: > I have the RubyCocoa framework installed, but it still can't find > RubyCocoa/RBRuntime.h Leopard? You installed RubyCocoa.framework on Leopard? Did you try with stock Leopard Dev Tools? For PyObjC, the one person that reported failures had a legacy Python 2.5 install when he upgraded from Tiger. Removal of that fixed everything. What is the exact set of errors? b.bum From cmhofman at gmail.com Fri Nov 2 02:59:43 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Fri Nov 2 02:59:54 2007 Subject: NSNotificationCenter problem In-Reply-To: References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> Message-ID: <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> On 2 Nov 2007, at 2:28 AM, Scott Stevenson wrote: > > On Nov 1, 2007, at 3:44 AM, Christiaan Hofman wrote: > >> You can always use a subclass and poseAsClass: for debugging. make >> sure you do it early enough (e.g. at the start of main()). > > FWIW, this is deprecated in Leopard. > > - Scott > So what's the alternative in Leopard? There are situations where you don't have control over inserting subclasses, like this one. Christiaan From tjones at acworld.com Fri Nov 2 07:47:49 2007 From: tjones at acworld.com (Tom Jones) Date: Fri Nov 2 07:48:10 2007 Subject: Calendar control In-Reply-To: Message-ID: I would like something like (e.g. NSIcalView), it would be a weekly calendar which would allow for event creations etc. like iCal does. I really want to add something like this to my app for it's scheduling component. Thanks, tom On 11/1/07 8:27 PM, "SD" wrote: > What do you mean by iCal type control? > > ______________________________________________________________________ > Previous message on 11/1/07 at 8:25 PM -0700 > ********************************************************************** >> Sorry, >> I forgot to mention that I really want a iCal type control. >> >> - tom From idiotsavant2005 at gmail.com Fri Nov 2 08:09:53 2007 From: idiotsavant2005 at gmail.com (I. Savant) Date: Fri Nov 2 08:09:57 2007 Subject: Calendar control In-Reply-To: References: Message-ID: > I would like something like (e.g. NSIcalView), it would be a weekly calendar > which would allow for event creations etc. like iCal does. I really want to > add something like this to my app for it's scheduling component. There is nothing as full-featured as this. NSDatePicker in graphical mode is the closest you can get without having to create your own. -- I.S. From amaxwell at mac.com Fri Nov 2 08:51:41 2007 From: amaxwell at mac.com (Adam R. Maxwell) Date: Fri Nov 2 08:51:58 2007 Subject: NSNotificationCenter problem In-Reply-To: <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> Message-ID: <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> On Nov 2, 2007, at 2:59 AM, Christiaan Hofman wrote: > On 2 Nov 2007, at 2:28 AM, Scott Stevenson wrote: > >> On Nov 1, 2007, at 3:44 AM, Christiaan Hofman wrote: >> >>> You can always use a subclass and poseAsClass: for debugging. make >>> sure you do it early enough (e.g. at the start of main()). >> >> FWIW, this is deprecated in Leopard. >> >> - Scott >> > > So what's the alternative in Leopard? There are situations where you > don't have control over inserting subclasses, like this one. It looks like you can replace specific methods, like OBUtilities. http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/index.html -- adam From cmhofman at gmail.com Fri Nov 2 10:02:49 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Fri Nov 2 10:02:58 2007 Subject: NSNotificationCenter problem In-Reply-To: <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> Message-ID: On 2 Nov 2007, at 4:51 PM, Adam R. Maxwell wrote: > On Nov 2, 2007, at 2:59 AM, Christiaan Hofman wrote: > >> On 2 Nov 2007, at 2:28 AM, Scott Stevenson wrote: >> >>> On Nov 1, 2007, at 3:44 AM, Christiaan Hofman wrote: >>> >>>> You can always use a subclass and poseAsClass: for debugging. >>>> make sure you do it early enough (e.g. at the start of main()). >>> >>> FWIW, this is deprecated in Leopard. >>> >>> - Scott >>> >> >> So what's the alternative in Leopard? There are situations where >> you don't have control over inserting subclasses, like this one. > > It looks like you can replace specific methods, like OBUtilities. > http://developer.apple.com/documentation/Cocoa/Reference/ > ObjCRuntimeRef/index.html > > -- > adam I know. But it seems to me that if class posing is deprecated than method swizzling might also be "deprecated", perhaps even more so? Christiaan From amaxwell at mac.com Fri Nov 2 10:28:47 2007 From: amaxwell at mac.com (Adam R. Maxwell) Date: Fri Nov 2 10:29:06 2007 Subject: NSNotificationCenter problem In-Reply-To: References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> Message-ID: <63AD68A8-0B3D-454E-9CD2-65287FDF9D86@mac.com> On Nov 2, 2007, at 10:02 AM, Christiaan Hofman wrote: > > On 2 Nov 2007, at 4:51 PM, Adam R. Maxwell wrote: > >> On Nov 2, 2007, at 2:59 AM, Christiaan Hofman wrote: >> >>> On 2 Nov 2007, at 2:28 AM, Scott Stevenson wrote: >>> >>>> On Nov 1, 2007, at 3:44 AM, Christiaan Hofman wrote: >>>> >>>>> You can always use a subclass and poseAsClass: for debugging. >>>>> make sure you do it early enough (e.g. at the start of main()). >>>> >>>> FWIW, this is deprecated in Leopard. >>>> >>>> - Scott >>>> >>> >>> So what's the alternative in Leopard? There are situations where >>> you don't have control over inserting subclasses, like this one. >> >> It looks like you can replace specific methods, like OBUtilities. >> http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/index.html >> >> -- >> adam > > I know. But it seems to me that if class posing is deprecated than > method swizzling might also be "deprecated", perhaps even more so? From that page: class_poseAs: deprecated in favor of categories and method_setImplementation So there are now public, supported ways to replace IMPs. -- adam From cmhofman at gmail.com Sat Nov 3 17:32:10 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Sat Nov 3 17:32:23 2007 Subject: Undo without dirtying document, take 10.5 Message-ID: <60A29DB3-BF3F-461F-BACE-772F05FABF88@gmail.com> Hi, I have some undoable changes that do not change and savable state, but rather some display state. Therefore, the document should not be marked dirty for those changes. However undoManager in a document based app automatically dirties the document. This could be avoided by "undoing" the change count using an explicit -updateChangeCount: call. However, in Leopard this does not seem to work anymore. Could anyone here explain why it fails to work, something changed in Leopards undo architecture or in document change count? Or is this a bug? Also would there be an alternative workaround to this problem that works on Leopard? thanks, Christiaan From adam.q.salter at gmail.com Sun Nov 4 16:33:15 2007 From: adam.q.salter at gmail.com (Adam Salter) Date: Sun Nov 4 16:33:23 2007 Subject: RubyCocoa In-Reply-To: References: <6CE582C1-5F6E-4EEC-9836-CE0914B16B21@gmail.com> Message-ID: <8C42BE44-DA54-4805-9DD6-3977EC17C3CD@gmail.com> Sorry it took a while to get back to you... No I didn't install anything on Leopard... is that my mistake? Ok to confirm step by step: 1. I open RoundTransparentWindow.xcodeproj from Examples folder 2. I do Build from build menu. 3. I get: CompileC /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/ build/RoundTransparentWindow.build/Deployment/ RoundTransparentWindow.build/Objects-normal/i386/main.o main.m /Developer/usr/bin/gcc-4.0 -c -I/Developer/Examples/Ruby/ RubyCocoa/RoundTransparentWindow/build/RoundTransparentWindow.build/ Deployment/RoundTransparentWindow.build/RoundTransparentWindow.hmap - F/Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/build/ Deployment -I/Developer/Examples/Ruby/RubyCocoa/ RoundTransparentWindow/build/Deployment/include -arch i386 -fno- common -fpascal-strings -Os -Wmost -Wno-four-char-constants -Wno- unknown-pragmas -pipe "-fmessage-length=0" -mdynamic-no-pic -g main.m -o /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/ build/RoundTransparentWindow.build/Deployment/ RoundTransparentWindow.build/Objects-normal/i386/main.o main.m:1:32: error: RubyCocoa/RBRuntime.h: No such file or directory main.m: In function 'main': main.m:5: warning: implicit declaration of function 'RBApplicationMain' RubyCocoa is listed in linked frameworks... I noticed that new RubyCocoa projects import Cocoa.h, so if I try that I get: CompileC /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/ build/RoundTransparentWindow.build/Deployment/ RoundTransparentWindow.build/Objects-normal/i386/main.o ...failed CompileC /Developer/Examples/Ruby/RubyCocoa/ RoundTransparentWindow/build/RoundTransparentWindow.build/Deployment/ RoundTransparentWindow.build/Objects-normal/i386/main.o ... CompileC /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/ build/RoundTransparentWindow.build/Deployment/ RoundTransparentWindow.build/Objects-normal/i386/main.o main.m /Developer/usr/bin/gcc-4.0 -c -I/Developer/Examples/Ruby/ RubyCocoa/RoundTransparentWindow/build/RoundTransparentWindow.build/ Deployment/RoundTransparentWindow.build/RoundTransparentWindow.hmap - F/Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/build/ Deployment -I/Developer/Examples/Ruby/RubyCocoa/ RoundTransparentWindow/build/Deployment/include -arch i386 -fno- common -fpascal-strings -Os -Wmost -Wno-four-char-constants -Wno- unknown-pragmas -pipe "-fmessage-length=0" -mdynamic-no-pic -g main.m -o /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/ build/RoundTransparentWindow.build/Deployment/ RoundTransparentWindow.build/Objects-normal/i386/main.o In file included from /System/Library/Frameworks/ ApplicationServices.framework/Headers/ApplicationServices.h:20, from /System/Library/Frameworks/Foundation.framework/ Headers/NSAppleEventDescriptor.h:8, from /System/Library/Frameworks/Foundation.framework/ Headers/Foundation.h:104, from /System/Library/Frameworks/Cocoa.framework/ Headers/Cocoa.h:12, from main.m:1: [...Snip...] /System/Library/Frameworks/Foundation.framework/Headers/ NSAppleEventDescriptor.h:14: error: syntax error before 'AEDesc' /System/Library/Frameworks/Foundation.framework/Headers/ NSAppleEventDescriptor.h:24: error: syntax error before 'DescType' /System/Library/Frameworks/Foundation.framework/Headers/ NSAppleEventDescriptor.h:26: error: syntax error before 'DescType' /System/Library/Frameworks/Foundation.framework/Headers/ NSAppleEventDescriptor.h:30: fatal error: method definition not in @implementation context compilation terminated. {standard input}:32:FATAL:.abort detected. Assembly stopping. A brand new RubyCocoa project compiles fine though... so I'm at a loss as to what it is... -Adam On 02/11/2007, at 4:45 PM, Bill Bumgarner wrote: > On Nov 1, 2007, at 10:09 PM, Adam Salter wrote: >> I have the RubyCocoa framework installed, but it still can't find >> RubyCocoa/RBRuntime.h > > Leopard? > > You installed RubyCocoa.framework on Leopard? > > Did you try with stock Leopard Dev Tools? > > For PyObjC, the one person that reported failures had a legacy > Python 2.5 install when he upgraded from Tiger. Removal of that > fixed everything. > > What is the exact set of errors? > > b.bum > From dunham at mac.com Sun Nov 4 18:32:57 2007 From: dunham at mac.com (David Dunham) Date: Sun Nov 4 18:33:06 2007 Subject: Undo without dirtying document, take 10.5 In-Reply-To: <60A29DB3-BF3F-461F-BACE-772F05FABF88@gmail.com> References: <60A29DB3-BF3F-461F-BACE-772F05FABF88@gmail.com> Message-ID: <1E2E365F-E1A0-438A-A76F-7F48563476DD@mac.com> On 3 Nov 2007, at 17:32, Christiaan Hofman wrote: > I have some undoable changes that do not change and savable state, > but rather some display state. Therefore, the document should not be > marked dirty for those changes. However undoManager in a document > based app automatically dirties the document. This could be avoided > by "undoing" the change count using an explicit -updateChangeCount: > call. However, in Leopard this does not seem to work anymore. I believe the change in Leopard is that its call to - updateChangeCount: is now deferred. This workaround seems to work: - (void) undoableActionDoesntDirtyDocument { // This action, while undoable, shouldn't mark the document dirty NSDocument* doc = [[[self window] windowController] document]; BOOL isUndoing = [[doc undoManager] isUndoing]; SInt32 response; OSErr err; err = Gestalt(gestaltSystemVersion, &response); if (response < 0x1050) { [doc updateChangeCount: isUndoing ? NSChangeDone : NSChangeUndone]; } else { [self performSelector: @selector(undoableActionDoesntDirtyDocumentDeferred:) withObject: [NSNumber numberWithBool: isUndoing] afterDelay: 0]; } } - (void) undoableActionDoesntDirtyDocumentDeferred: (NSNumber*)anUndoState { NSDocument* doc = [[[self window] windowController] document]; [doc updateChangeCount:[anUndoState boolValue] ? NSChangeRedone : NSChangeUndone]; } David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com "People seem to misinterpret complexity as sophistication" -- Niklaus Wirth From dunham at mac.com Sun Nov 4 21:16:14 2007 From: dunham at mac.com (David Dunham) Date: Sun Nov 4 21:16:19 2007 Subject: Simple -[NSFont defaultLineHeightForFont] replacement Message-ID: So defaultLineHeightForFont is deprecated, and I guess I sorta see why. You're supposed to use -[NSLayoutManager defaultLineHeightForFont:] instead. But I'm trying to measure before using -[NSString drawAtPoint:withAttributes:]. So I don't have an NSLayoutManager to talk to. Do I really need to make a NSLayoutManager (and NSTextContainer) each time I want to figure out a font's height? David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From amaxwell at mac.com Sun Nov 4 21:56:26 2007 From: amaxwell at mac.com (Adam R. Maxwell) Date: Sun Nov 4 21:56:39 2007 Subject: Simple -[NSFont defaultLineHeightForFont] replacement In-Reply-To: References: Message-ID: <6CF94C74-5A5D-47A2-98A6-1ED8AADA861B@mac.com> On Nov 4, 2007, at 9:16 PM, David Dunham wrote: > So defaultLineHeightForFont is deprecated, and I guess I sorta see > why. You're supposed to use -[NSLayoutManager > defaultLineHeightForFont:] instead. > > But I'm trying to measure before using -[NSString > drawAtPoint:withAttributes:]. So I don't have an NSLayoutManager to > talk to. Do I really need to make a NSLayoutManager (and > NSTextContainer) each time I want to figure out a font's height? I generally cache an NSLayoutManager for this purpose, and you don't need a text container; just create it with alloc/init. You may also need to call setTypesetterBehavior: with the appropriate constant, as well. -- adam From ssudre at intego.com Mon Nov 5 02:28:09 2007 From: ssudre at intego.com (Stephane Sudre) Date: Mon Nov 5 03:28:22 2007 Subject: Is anyone able to use Bug Reporter reliably lately? Message-ID: <4726c75ff9f0197a8351f481c2efe5de@intego.com> Is anyone able to use Bug Reporter (ADC) reliably lately? From what I'm experiencing, it's becoming a real PITA to use it: - submitting bug reports fails 20% of time - you're logged out 75% when you try to access the "My Originated Problems" section. - 5% of time you just can't login because of a "can't find instance" issue. And when you report the issues to ADC, they are unable to reproduce the issue (sometimes I wonder if they even tried) while I can reproduce it on 4 different Macs, 4 different OS versions, multiple versions of Safari and 3 different network settings. From shawnce at gmail.com Mon Nov 5 04:11:48 2007 From: shawnce at gmail.com (Shawn Erickson) Date: Mon Nov 5 04:11:55 2007 Subject: Is anyone able to use Bug Reporter reliably lately? In-Reply-To: <4726c75ff9f0197a8351f481c2efe5de@intego.com> References: <4726c75ff9f0197a8351f481c2efe5de@intego.com> Message-ID: <7FCDC2CD-2E20-4546-8CE6-EB3DB0A08FB8@gmail.com> On Nov 5, 2007, at 2:28 AM, Stephane Sudre wrote: > Is anyone able to use Bug Reporter (ADC) reliably lately? > > From what I'm experiencing, it's becoming a real PITA to use it: > > - submitting bug reports fails 20% of time > > - you're logged out 75% when you try to access the "My Originated > Problems" section. > > - 5% of time you just can't login because of a "can't find instance" > issue. > > And when you report the issues to ADC, they are unable to reproduce > the issue (sometimes I wonder if they even tried) while I can > reproduce it on 4 different Macs, 4 different OS versions, multiple > versions of Safari and 3 different network settings. I had issue a couple days ago with it fail on a bug submit and then it was offline for a short while however in the last two days I have used it twice without issue. I do believe bug watcher is under heavily then average load due to folks verifying / submitting defects now that Leopard is officially out. -Shawn From mattejames at gmail.com Mon Nov 5 05:26:26 2007 From: mattejames at gmail.com (Matthew James) Date: Mon Nov 5 05:26:29 2007 Subject: Core Animation Input Responding Message-ID: <27cd4a440711050526l71baffb1tf7bcaa78868602f2@mail.gmail.com> Hey guys, >From what I can tell from the Core Animation documentation, it is not possible to have a layer respond to input directly. Is it true (as in the CovertFlow sample code), that you have to wrap all your animation in one NSView and run all input response through that? -Matt James From ben at tanjero.com Mon Nov 5 08:48:20 2007 From: ben at tanjero.com (Benjamin Stiglitz) Date: Mon Nov 5 08:48:21 2007 Subject: Core Animation Input Responding In-Reply-To: <27cd4a440711050526l71baffb1tf7bcaa78868602f2@mail.gmail.com> References: <27cd4a440711050526l71baffb1tf7bcaa78868602f2@mail.gmail.com> Message-ID: > From what I can tell from the Core Animation documentation, it is not > possible to have a layer respond to input directly. Is it true (as > in the > CovertFlow sample code), that you have to wrap all your animation in > one > NSView and run all input response through that? Pretty much. You?re can always use layer-backed views, or alternatively, cook up some event forwarding. I built an app that uses layers? style dictionary to store target/action pairs for specific events; you could also just forward the NSResponder methods where appropriate based on -hitTest:. -Ben From brian.bechtel at gmail.com Mon Nov 5 09:09:25 2007 From: brian.bechtel at gmail.com (Brian Bechtel) Date: Mon Nov 5 09:09:30 2007 Subject: Is anyone able to use Bug Reporter reliably lately? In-Reply-To: <4726c75ff9f0197a8351f481c2efe5de@intego.com> References: <4726c75ff9f0197a8351f481c2efe5de@intego.com> Message-ID: On Nov 5, 2007 2:28 AM, Stephane Sudre wrote: > And when you report the issues to ADC, they are unable to reproduce the > issue (sometimes I wonder if they even tried) while I can reproduce it > on 4 different Macs, 4 different OS versions, multiple versions of > Safari and 3 different network settings. When I see a message like that, it usually means that you haven't provided enough information to ADC to be able to reproduce the bug, or that Apple is misunderstanding what information you provided. I recommend you always include a full profile system profiler report (under the View menu, choose Full Profile) so that the console and system logs are included, as well as very explicit steps for reproducing the bug. From sstevenson at mac.com Mon Nov 5 22:55:39 2007 From: sstevenson at mac.com (Scott Stevenson) Date: Mon Nov 5 22:55:43 2007 Subject: NSNotificationCenter problem In-Reply-To: References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> Message-ID: <5A39E910-3E93-4FEE-975E-84B9C7E16BD9@mac.com> On Nov 2, 2007, at 10:02 AM, Christiaan Hofman wrote: > I know. But it seems to me that if class posing is deprecated than > method swizzling might also be "deprecated", perhaps even more so? Yes. Swizzling and all that hackery will not work in the future (64- bit, in particular) because the runtime is apparently moving away from making everything revolve around raw structs. The idea is to resolve the fragile base class issue. Along with better performance, better architecture, and so on. - Scott From bbum at mac.com Mon Nov 5 23:42:00 2007 From: bbum at mac.com (Bill Bumgarner) Date: Mon Nov 5 23:42:04 2007 Subject: NSNotificationCenter problem In-Reply-To: <5A39E910-3E93-4FEE-975E-84B9C7E16BD9@mac.com> References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> <5A39E910-3E93-4FEE-975E-84B9C7E16BD9@mac.com> Message-ID: On Nov 5, 2007, at 10:55 PM, Scott Stevenson wrote: > On Nov 2, 2007, at 10:02 AM, Christiaan Hofman wrote: >> I know. But it seems to me that if class posing is deprecated than >> method swizzling might also be "deprecated", perhaps even more so? > > Yes. Swizzling and all that hackery will not work in the future (64- > bit, in particular) because the runtime is apparently moving away > from making everything revolve around raw structs. > > The idea is to resolve the fragile base class issue. Along with > better performance, better architecture, and so on. You can still swizzle methods, you just can't do it in the raw Obj-C structures. It is still considered naughty, but at least there is API via which you can commit the naughtiness in a somewhat predictable fashion (i.e. it'll do the right thing in terms of threading & cache flushing, but you'll still be hosed if you put the wrong IMP somewhere). Specifically: OBJC_EXPORT BOOL class_addMethod(Class cls, SEL name, IMP imp, const char *types); OBJC_EXPORT IMP class_replaceMethod(Class cls, SEL name, IMP imp, const char *types); And, yes, I don't like the "types" parameter any more than anyone else. If you have suggestions as to how to make it more palatable, please file enhancement requests via (http://bugreporter.apple.com/). b.bum From bbum at mac.com Mon Nov 5 23:45:56 2007 From: bbum at mac.com (Bill Bumgarner) Date: Mon Nov 5 23:46:05 2007 Subject: NSNotificationCenter problem In-Reply-To: References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> <5A39E910-3E93-4FEE-975E-84B9C7E16BD9@mac.com> Message-ID: <136B0BF3-C96B-4F01-BDCC-FF353B915C96@mac.com> On Nov 5, 2007, at 11:42 PM, Bill Bumgarner wrote: > You can still swizzle methods, you just can't do it in the raw Obj-C > structures. It is still considered naughty, but at least there is > API via which you can commit the naughtiness in a somewhat > predictable fashion (i.e. it'll do the right thing in terms of > threading & cache flushing, but you'll still be hosed if you put the > wrong IMP somewhere). > > Specifically: > > OBJC_EXPORT BOOL class_addMethod(Class cls, SEL name, IMP imp, > const char *types); > OBJC_EXPORT IMP class_replaceMethod(Class cls, SEL name, IMP imp, > const char *types); Dang it. Hit deliver too soon. The whole point was also to say that these APIs are available in the 32 bit -- the legacy ObjC -- runtime, too. You can write one bit of code that'll behave the same in 32 bit and 64 bit. Convenient and consistent, but it doesn't make it any more of a good idea to go and class_replaceMethod() on just any method of any class. ;) b.bum From sstevenson at mac.com Tue Nov 6 01:58:43 2007 From: sstevenson at mac.com (Scott Stevenson) Date: Tue Nov 6 01:58:47 2007 Subject: NSNotificationCenter problem In-Reply-To: References: <59662DE8-8863-11DC-A4E1-000393CA0072@smartsoft.de> <26138EB9-D4F0-4AA7-B223-46286FBA5949@gmail.com> <8C8E4C17-6E73-4CC9-BBC9-ED3CFB9370D9@mac.com> <5A39E910-3E93-4FEE-975E-84B9C7E16BD9@mac.com> Message-ID: <6D6A61FF-4494-4707-B59D-36BC540ED9B7@mac.com> On Nov 5, 2007, at 11:42 PM, Bill Bumgarner wrote: > You can still swizzle methods, you just can't do it in the raw Obj-C > structures. Ah. I think of swizzle as "isa swizzling," which implies mucking with - >isa. - Scott From bbum at mac.com Tue Nov 6 11:10:51 2007 From: bbum at mac.com (Bill Bumgarner) Date: Tue Nov 6 11:11:19 2007 Subject: RubyCocoa In-Reply-To: <8C42BE44-DA54-4805-9DD6-3977EC17C3CD@gmail.com> References: <6CE582C1-5F6E-4EEC-9836-CE0914B16B21@gmail.com> <8C42BE44-DA54-4805-9DD6-3977EC17C3CD@gmail.com> Message-ID: On Nov 4, 2007, at 4:33 PM, Adam Salter wrote: > A brand new RubyCocoa project compiles fine though... so I'm at a > loss as to what it is... It looks like one of two things may be going on: (1) you have targeted the 10.4u SDK instead of the 10.5 SDK. See the project build settings. Or, there may be some other weirdness going on-- compiler flag or something that is non-standard. (2) you have one of those wonky syntax errors that occasionally happens in C that causes masses of syntax errors in imported files without actually telling you were the real problem is. b.bum From ivan at myrvold.org Wed Nov 7 09:04:29 2007 From: ivan at myrvold.org (Ivan C Myrvold) Date: Wed Nov 7 09:04:36 2007 Subject: Fwd: Nested SOAP parameters References: <9AC97229-D625-4507-9E50-F2A3A377F154@myrvold.org> Message-ID: <0474A86B-FCDE-4E88-958B-7EBCEABFA4E3@myrvold.org> > > Den 5. okt.. 2007 kl. 20:15 skrev Michael Dautermann: > >> >> On Oct 4, 2007, at 12:00 PM, macosx-dev-request@omnigroup.com wrote: >>> >>> How do I make nested SOAP parameters in Cocoa? >>> >>> If I want to send a parameter like >>> >>> ivan >>> >>> I can simply set >>> WSMethodInvocationSetParameters(soapCall, (CFDictionaryRef)params, >>> nil); >>> where >>> params = [NSDictionary dictionaryWithObjectsAndKeys:@"ivan", >>> @"name", >>> nil); >>> >>> But what if I have a parameter like: >>> >>> >>> ivan >>> >>> >>> How do I pass that to WSMethodInvocationSetParameters? >> >> How about >> >> params = [ NSDictionary dictionaryWithObject: [ NSDictionary >> dictionaryWithObject: @"ivan" forKey: @"name" ] forKey: @"person" ]; >> >> ???? > > This will result in: > > > ivan > > > and I will get an error like: > > The specified type was not recognized: name='Dictionary'... > > Ivan Is it no way to avoid getting SOAP-ENC: Dictionary? Ivan From peakrecruit at gmail.com Thu Nov 8 09:45:11 2007 From: peakrecruit at gmail.com (Armand Daniels) Date: Thu Nov 8 10:47:10 2007 Subject: Cocoa Developer needed Message-ID: <95b348b00711080945g1b2f51c8va5ff40709ac587bf@mail.gmail.com> Cocoa Developer Required Skills - 2 years of experience coding with Cocoa and Objective-C on Mac OS X, at least one year professionally - Must also be an excellent hands-on implementer with strong object oriented C++ programming skills - Strong analytical, diagnostic and problem-solving skills with ability to generate new ideas and work independently - Must be quick to learn and conquer new technologies and have a strong passion for building cutting-edge Mac applications in a team of OS internals experts - Knowledge of internet protocols such as TCP/IP, HTTP and HTTPS - Familiarity with the x86 and PowerPC architectures including virtual memory, privilege levels and assembly language - Ability to tackle complex software issues such as deadlocks and exceptions using gdb - Cross-platform development experience - Knowledge of OS X internals and/or device driver development - Degree in EE or computer science Salary range- $100,000 to $125,000 Full-time, permanent position with full benefits package (health, life, disability insurance) 4 weeks vacation/personal time, 11 paid holidays, stock options, 401k (company match) Location- Austin, TX Please send inquiries to: info@peakrecruit.com From dunham at mac.com Sat Nov 10 21:07:49 2007 From: dunham at mac.com (David Dunham) Date: Sat Nov 10 21:07:59 2007 Subject: Trouble with GenerateThumbnailForURL Message-ID: <13D0C8D3-CE00-4E06-BDD8-EC19A45DE931@mac.com> I'm trying to write a Quick Look generator in Cocoa, based on the Sketch sample code. I send [view displayRectIgnoringOpacity:theRect inContext:context]; but my view's drawRect: is never called, and the Quick Look is blank. (I tossed in some CGContext drawing just to verify that the thumbnail was being generated; it was.) I'm creating the view and not inserting it into any hieararchy. Besides my drawRect: not getting called, the other oddity is that the context is a NSBitmapGraphicsContext even though I use QLThumbnailRequestCreateContext(aThumbnail, *(CGSize *)&docSize, false, NULL), which should be making a single page vector context. David Dunham Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From slittle at free.fr Sun Nov 11 14:08:31 2007 From: slittle at free.fr (scott little) Date: Sun Nov 11 14:08:36 2007 Subject: loadArchive: problems Message-ID: Hello there, I'm having a bit of trouble using the loadArchive: method on the WebFrame more than once and I am wondering if there is something that I am completely missing about how this works. I'm doing something like this: [aView setFrameLoadDelegate:self]; [[aView mainFrame] loadArchive:[[mySignature] webArchive]]; Where mySignature is actually a signature within Mail.app (this is a plugin for Mail). The first time I do this for the indicated WebView (aView) it works fine and calls my delegate methods properly. For every time after this the only delegate that is called is the webView:didStartProvisionalLoadForFrame: method. In fact any WebViews that seem to use this signature afterward has the same failure. Either I am having a problem with my view or the data seems to be creating one, however. I'm not getting any exceptions or failures during the loads. Any ideas? Thanks, scott -- You and I, we reject these narrow attitudes We add to each other, like a coral reef - Neil Peart, Rush Building bridges on the ocean floor "Alien Shore" Reaching for the alien shore -- scott little slittle@free.fr -- sadly no music right now: iTunes is Paused From cmhofman at gmail.com Sun Nov 11 15:15:34 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Sun Nov 11 15:15:42 2007 Subject: UTIs and document types in Leopard Message-ID: <84D0536B-601D-45E5-8EDE-9D0E647CD6CD@gmail.com> Dear list, Leopard seems to have moved from custom document type names to UTIs. Unfortunately this is an all or nothing approach, which often leads to a "nothing" approach. Reading the Leopard release notes I'm really confused though how UTIs should be used as document types. One problem I can't find an answer to is how to handle standard file types for which no UTI exists. There are of course a lot of those around in the big bad world. If I want to use UTIs in my app (in some document types) I seem to be forced to declare a UTI for such a type. However just declaring UTI of my own seems wrong as I don't "own" the file type. It seems to me worse than fragile. If some other app would do the same and declare its own custom UTI for this file type, NSWorkSpace could just as well return that UTI instead of my UTI, which would break my app. This is aggravated by the fact that in Leopard NSWorkSpace is used to identify the UTI from the URL instead of NSDocumentController. Another problem is: how does the Save panel / document determine the file extension for a saved type? In Tiger [NSDocumentController fileExtensionsForType:] was used. But in Leopard this method is depreated, and it's replacement in NSDocument is not used for this situation according to the docs. So am I forced to declare all UTIs for all document types I'd like to save? Then my question is: how can I declare UTIs, apart from in Info.plist? We have an app that can define document types for saving at run time, so these cannot be defined in Info.plist. So how does NSDocumentController register UTIs with the system? It seems to me that Leopard really has limited my possibilities and made things more fragile, rather than solving problems. That seems too bad. Christiaan From dunham at mac.com Sun Nov 11 18:18:48 2007 From: dunham at mac.com (David Dunham) Date: Sun Nov 11 18:18:53 2007 Subject: "Badging" Quick Look thumbnails Message-ID: <96612538-756B-4CAE-A1A9-6D47CE965EC8@mac.com> Finder is superimposing "RTF", "SHELL", "TXT" on icon previews of various text files (presumably thumbnails, as a Quick Look shows the document as text), and "DOC" on Word documents. I'm thinking of doing the same, as the text is so small it's hard to make out. Are there any guidelines as to the font size and color? Even better, sample code? David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From adam.q.salter at gmail.com Sun Nov 11 18:53:49 2007 From: adam.q.salter at gmail.com (Adam Salter) Date: Sun Nov 11 18:53:55 2007 Subject: Neat Dtrace idea... Message-ID: Hi all, This is really more of a "can this be done" type question than anything but... I was looking for a way to monitor my time machine backups and, according to the law of finding the most complicated way of doing anything, I thought of dtrace... Then I thought of how great it would be to get a growlnotify message on backup start... Is it possible to have Dtrace execute an external program?? I'm not familiar with Dtrace obviously. Cheers in advance, -Adam From amaxwell at mac.com Sun Nov 11 20:49:51 2007 From: amaxwell at mac.com (Adam R. Maxwell) Date: Sun Nov 11 20:50:08 2007 Subject: "Badging" Quick Look thumbnails In-Reply-To: <96612538-756B-4CAE-A1A9-6D47CE965EC8@mac.com> References: <96612538-756B-4CAE-A1A9-6D47CE965EC8@mac.com> Message-ID: <196BD381-2F76-4171-B8AF-210FB358594B@mac.com> On Nov 11, 2007, at 6:18 PM, David Dunham wrote: > Finder is superimposing "RTF", "SHELL", "TXT" on icon previews of > various text files (presumably thumbnails, as a Quick Look shows the > document as text), and "DOC" on Word documents. > > I'm thinking of doing the same, as the text is so small it's hard to > make out. Are there any guidelines as to the font size and color? > Even better, sample code? You might get it for free if your UTI conforms to public.text. Our file type gets that badge by conforming to public.plain-text as far as I can see; it draws on top of the QL thumbnail. -- adam From dunham at mac.com Mon Nov 12 00:00:51 2007 From: dunham at mac.com (David Dunham) Date: Mon Nov 12 00:01:01 2007 Subject: "Badging" Quick Look thumbnails In-Reply-To: <196BD381-2F76-4171-B8AF-210FB358594B@mac.com> References: <96612538-756B-4CAE-A1A9-6D47CE965EC8@mac.com> <196BD381-2F76-4171-B8AF-210FB358594B@mac.com> Message-ID: <288665D8-018F-44E6-A8C3-C0DBB0C353BC@mac.com> On 11 Nov 2007, at 20:49, Adam R. Maxwell wrote: >> Finder is superimposing "RTF", "SHELL", "TXT" on icon previews of >> various text files (presumably thumbnails, as a Quick Look shows >> the document as text), and "DOC" on Word documents. >> > You might get it for free if your UTI conforms to public.text. Our > file type gets that badge by conforming to public.plain-text as far > as I can see; it draws on top of the QL thumbnail. Which badge do you get? (I don't think I can be plain-text.) David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com "People seem to misinterpret complexity as sophistication" -- Niklaus Wirth From leeg at thaesofereode.info Mon Nov 12 00:04:41 2007 From: leeg at thaesofereode.info (Graham J Lee) Date: Mon Nov 12 00:04:50 2007 Subject: Neat Dtrace idea... In-Reply-To: References: Message-ID: <8620BA75-AD2E-4582-9699-425552223CFA@thaesofereode.info> On 12 Nov 2007, at 02:53, Adam Salter wrote: > Hi all, > This is really more of a "can this be done" type question than > anything but... > I was looking for a way to monitor my time machine backups and, > according to the law of finding the most complicated way of doing > anything, I thought of dtrace... That would actually be very easy. > Then I thought of how great it would be to get a growlnotify > message on backup start... > > Is it possible to have Dtrace execute an external program?? No. Cheers, Graham. From jjalon at gmail.com Mon Nov 12 03:24:16 2007 From: jjalon at gmail.com (Julien Jalon) Date: Mon Nov 12 03:24:19 2007 Subject: "Badging" Quick Look thumbnails In-Reply-To: <96612538-756B-4CAE-A1A9-6D47CE965EC8@mac.com> References: <96612538-756B-4CAE-A1A9-6D47CE965EC8@mac.com> Message-ID: The icon decoration (form, badging, etc.) is determined by your UTI and its conformance to functional UTIs (see:). There are no official rules for now but what is important: 1) focus your thumbnail only on your document's content, not on decoration. 2) chose your UTI's conformance on what your file type actually is, not on what you expect Quick Look to produce. If you feel that you lack some decoration, please file a bug describing your file type (and its full declaration in your Info.plist) and what you are trying to achieve. -- Julien On Nov 12, 2007 3:18 AM, David Dunham wrote: > Finder is superimposing "RTF", "SHELL", "TXT" on icon previews of > various text files (presumably thumbnails, as a Quick Look shows the > document as text), and "DOC" on Word documents. > > I'm thinking of doing the same, as the text is so small it's hard to > make out. Are there any guidelines as to the font size and color? Even > better, sample code? > > David Dunham A Sharp, LLC > Voice/Fax: 206 783 7404 http://a-sharp.com > Efficiency is intelligent laziness. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From jjalon at gmail.com Mon Nov 12 03:32:15 2007 From: jjalon at gmail.com (Julien Jalon) Date: Mon Nov 12 03:32:20 2007 Subject: Trouble with GenerateThumbnailForURL In-Reply-To: <13D0C8D3-CE00-4E06-BDD8-EC19A45DE931@mac.com> References: <13D0C8D3-CE00-4E06-BDD8-EC19A45DE931@mac.com> Message-ID: Hi David, 1) Can you check that the drawing rect against your view's bounds? I suspect AppKit won't even try to draw something if there is nothing to draw. 2) The context returned by QLThumbnailRequestCreateContext() is always a bitmap context, even when you specify "false" for "isBitmap". It's an implementation detail and you should not worry about that, it still does what is needed for your thumbnail to look correct :-) On Nov 11, 2007 6:07 AM, David Dunham wrote: > I'm trying to write a Quick Look generator in Cocoa, based on the > Sketch sample code. I send > > [view displayRectIgnoringOpacity:theRect inContext:context]; > > but my view's drawRect: is never called, and the Quick Look is blank. > (I tossed in some CGContext drawing just to verify that the thumbnail > was being generated; it was.) > > I'm creating the view and not inserting it into any hieararchy. > > Besides my drawRect: not getting called, the other oddity is that the > context is a NSBitmapGraphicsContext even though I use > QLThumbnailRequestCreateContext(aThumbnail, *(CGSize *)&docSize, > false, NULL), which should be making a single page vector context. > > > David Dunham > Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/ > Imagination is more important than knowledge. -- Albert Einstein > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From psarge at gmail.com Mon Nov 12 04:05:12 2007 From: psarge at gmail.com (Paul Sargent) Date: Mon Nov 12 04:05:22 2007 Subject: Neat Dtrace idea... In-Reply-To: <8620BA75-AD2E-4582-9699-425552223CFA@thaesofereode.info> References: <8620BA75-AD2E-4582-9699-425552223CFA@thaesofereode.info> Message-ID: <2C65C03F-358E-41AC-A29B-3E8297233330@gmail.com> On 12 Nov 2007, at 08:04, Graham J Lee wrote: > On 12 Nov 2007, at 02:53, Adam Salter wrote: > >> Hi all, >> This is really more of a "can this be done" type question than >> anything but... >> I was looking for a way to monitor my time machine backups and, >> according to the law of finding the most complicated way of doing >> anything, I thought of dtrace... > > That would actually be very easy. > >> Then I thought of how great it would be to get a growlnotify >> message on backup start... >> >> Is it possible to have Dtrace execute an external program?? > > No. Actually it is, or at least it is according to the Sun docs I've been reading this morning. You just need to declare the script as destructive and then use the system() action. I don't know what the process that runs the backup is called, but this should do the job ------------- #pragma D option destructive #pragma D option quiet syscall::execve:return /execname = "processname"/ { system("growlnotify -m \"Backup Started\""); } From cmhofman at gmail.com Mon Nov 12 12:14:44 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Mon Nov 12 12:14:56 2007 Subject: Disable window events without a sheet Message-ID: <1F381FBB-68DB-4538-B0FA-7E2996C7B21D@gmail.com> Is there a way to disable events for a window, like when you add a shet to it, without usign a sheet? Christiaan From adam.q.salter at gmail.com Mon Nov 12 20:41:59 2007 From: adam.q.salter at gmail.com (Adam Salter) Date: Mon Nov 12 20:42:07 2007 Subject: Neat Dtrace idea... In-Reply-To: <2C65C03F-358E-41AC-A29B-3E8297233330@gmail.com> References: <8620BA75-AD2E-4582-9699-425552223CFA@thaesofereode.info> <2C65C03F-358E-41AC-A29B-3E8297233330@gmail.com> Message-ID: OK apparently the backup process is called backupd. but on trying to run the script I got: dtrace: failed to compile script backup_watch.dtrace: line 6: operator = can only be applied to a writable variable line 5 needs == (not =) > #pragma D option destructive > #pragma D option quiet > > syscall::execve:return > /execname == "backupd"/ > { > system("growlnotify -m \"Backup Started\""); > } Thanks... haven't seen it work yet, but it's chugging away :) -Adam From psarge at gmail.com Tue Nov 13 01:16:05 2007 From: psarge at gmail.com (Paul Sargent) Date: Tue Nov 13 01:16:07 2007 Subject: Neat Dtrace idea... In-Reply-To: References: <8620BA75-AD2E-4582-9699-425552223CFA@thaesofereode.info> <2C65C03F-358E-41AC-A29B-3E8297233330@gmail.com> Message-ID: <68aed4c30711130116j8bcb714weee6060e78a50803@mail.gmail.com> Whoops! That's what you get for writing stuff into the mail directly. note that this won't work if the process is always running. It's triggered by the system call to start a new process with the name you specify. I can't check right now how TM works. On Nov 13, 2007 4:41 AM, Adam Salter wrote: > OK apparently the backup process is called backupd. > but on trying to run the script I got: > dtrace: failed to compile script backup_watch.dtrace: line 6: operator = > can only be applied to a writable variable > > line 5 needs == (not =) > > #pragma D option destructive > #pragma D option quiet > > syscall::execve:return > /execname == "backupd"/ > { > system("growlnotify -m \"Backup Started\""); > } > > > Thanks... haven't seen it work yet, but it's chugging away :) > > -Adam > From bob at apple.com Tue Nov 13 08:06:36 2007 From: bob at apple.com (Bob Frank) Date: Tue Nov 13 08:07:28 2007 Subject: MEETING: Chicago CocoaHeads / CAWUG - Leopard Dev Tools - Tuesday November 13th 7:00 PM In-Reply-To: <56D99030-558E-4FAD-B4EB-AC84E8B032AC@apple.com> References: <56D99030-558E-4FAD-B4EB-AC84E8B032AC@apple.com> Message-ID: <8D3E219D-1664-427C-B034-8681B35E2EB4@apple.com> IMPORTANT NOTES: Our meetings will be permanently starting at ** 7:00 ** instead of 6:00 We have a new mailing list URL: http://groups.google.com/group/cawug Email Address: cawug@googlegroups.com You can email here to subscribe immediately: cawug-subscribe@googlegroups.com -------- Hi all, Just a quick reminder. The Chicago CocoaHeads / Chicago Cocoa and WebObjects User Group (CAWUG) is holding our next meeting tonight Tuesday, November 13th, at 7:00 PM at the Apple Store on Michigan Ave. Agenda: - Introductions & Announcements - Bob on Lots of Leopard Dev Tools goodnes - Highlights of obscure features of Leopard Client & Server - adjournment to O'Toole's When: Tuesday, September 11th, 6:00 PM Where: Apple Store Michigan Avenue 679 North Michigan Ave. (at the corner of Huron & Michigan Ave.) Chicago, IL 60611 http://maps.yahoo.com/maps_result? ed=gYbE5Op_0Tokf_p7h61dwjbWtjC2r1YehzWw&csz=60611 http://tinyurl.com/26z5nb (in case long URL gets cut) - O'Tooles We will continue the discussion at our local watering hold Timothy O'Toole's at 622 Fairbanks (2 blocks east of the store). We also wish to thank the folks who run the theater space at the Apple store for letting us have our meetings there, and Jonathan 'Wolf' Rentzsch for hosting the new and revived CAWUG web site. Thanks all. Also, if you are working on a project and would like to talk about it briefly / promote it, I think it would be fun for people to hear about other people's projects. Please email me off line and you can talk at a future meeting or would like a book to review. Future meetings dates: 12/11/07 CAWUG Resources Mail list: http://groups.google.com/group/cawug Google Site: http://groups.google.com/group/cawug Web Site: http://www.cawug.org/ RSS feed: http://www.cawug.org/rss.xml iCal: http://ical.mac.com/chicagobob/ Chicago-CocoaHeads-CAWUG (view on the web) iCal: webcal://ical.mac.com/chicagobob/Chicago-CocoaHeads-CAWUG.ics (subscribe to in iCal) Cocoa Heads web site: http://cocoaheads.org/us/ChicagoIllinois/index.html Hope to see you at the meeting. -Bob From adam.q.salter at gmail.com Tue Nov 13 21:15:50 2007 From: adam.q.salter at gmail.com (Adam Salter) Date: Tue Nov 13 21:15:57 2007 Subject: Neat Dtrace idea... In-Reply-To: <68aed4c30711130116j8bcb714weee6060e78a50803@mail.gmail.com> References: <8620BA75-AD2E-4582-9699-425552223CFA@thaesofereode.info> <2C65C03F-358E-41AC-A29B-3E8297233330@gmail.com> <68aed4c30711130116j8bcb714weee6060e78a50803@mail.gmail.com> Message-ID: ... and it appears growlnotify doesn't yet work on leopard :( backupd appears to only start as needed for backups.... Still code looks good and I'm confident it will work. Thanks for help :) One thing I did think was that growlnotify would be run as root... would I receive the notification? As noted it is purely theoretical atm since growlonotify doesn't work on Leopard. -Adam On 13/11/2007, at 8:16 PM, Paul Sargent wrote: > Whoops! That's what you get for writing stuff into the mail directly. > > note that this won't work if the process is always running. It's > triggered by the system call to start a new process with the name > you specify. > > I can't check right now how TM works. > > On Nov 13, 2007 4:41 AM, Adam Salter wrote: > OK apparently the backup process is called backupd. > but on trying to run the script I got: > dtrace: failed to compile script backup_watch.dtrace: line 6: > operator = can only be applied to a writable variable > > line 5 needs == (not =) > >> #pragma D option destructive >> #pragma D option quiet >> >> syscall::execve:return >> /execname == "backupd"/ >> >> { >> system("growlnotify -m \"Backup Started\""); >> } > > Thanks... haven't seen it work yet, but it's chugging away :) > > -Adam > From edenwaith at mac.com Tue Nov 13 21:22:44 2007 From: edenwaith at mac.com (Chad Armstrong) Date: Tue Nov 13 21:22:37 2007 Subject: Storing license keys In-Reply-To: <20071113200005.8AF511D30F7@forums.omnigroup.com> References: <20071113200005.8AF511D30F7@forums.omnigroup.com> Message-ID: <5E394A1E-4338-4FFC-A074-ED3B48E1D71B@mac.com> Hello: I'm looking at using eSellerate to help sell my products and to generate license keys. Perhaps I haven't dug deep enough into the documentation, or perhaps this question might be valid. How are others storing the registration license keys? Is there a common place that a key should be stored, and is it saved as a file, or is the key injected somewhere inside the application file itself (perhaps not the best idea)? What I want to do is allow a user (either admin or a standard user if possible) be able to enter in the registration info into the application, and this will be saved so any user can use the application without having to re-enter the license info for each new user. Regards, Chad From joar at joar.com Tue Nov 13 21:56:38 2007 From: joar at joar.com (j o a r) Date: Tue Nov 13 22:14:45 2007 Subject: Storing license keys In-Reply-To: <5E394A1E-4338-4FFC-A074-ED3B48E1D71B@mac.com> References: <20071113200005.8AF511D30F7@forums.omnigroup.com> <5E394A1E-4338-4FFC-A074-ED3B48E1D71B@mac.com> Message-ID: On Nov 13, 2007, at 9:22 PM, Chad Armstrong wrote: > What I want to do is allow a user (either admin or a standard user > if possible) be able to enter in the registration info into the > application, and this will be saved so any user can use the > application without having to re-enter the license info for each new > user. You'll probably end up saving this file in one of these locations: /Library/Application Support/ /Library/Preferences /Users/Shared See also: j o a r From sstevenson at mac.com Tue Nov 13 22:20:37 2007 From: sstevenson at mac.com (Scott Stevenson) Date: Tue Nov 13 22:20:43 2007 Subject: Storing license keys In-Reply-To: <5E394A1E-4338-4FFC-A074-ED3B48E1D71B@mac.com> References: <20071113200005.8AF511D30F7@forums.omnigroup.com> <5E394A1E-4338-4FFC-A074-ED3B48E1D71B@mac.com> Message-ID: <28317E56-3065-40F9-9767-BE3520891CF5@mac.com> On Nov 13, 2007, at 9:22 PM, Chad Armstrong wrote: > I'm looking at using eSellerate to help sell my products and to > generate license keys. Perhaps I haven't dug deep enough into the > documentation, or perhaps this question might be valid. I'm not sure this directly answers your question, but take a look at the AquaticPrime framework for help with licensing and such. Free, open source, etc. - Scott From macosxdevlist at personal.fishh2o.com Tue Nov 13 22:24:26 2007 From: macosxdevlist at personal.fishh2o.com (SD) Date: Tue Nov 13 22:25:43 2007 Subject: Storing license keys In-Reply-To: <28317E56-3065-40F9-9767-BE3520891CF5@mac.com> References: <20071113200005.8AF511D30F7@forums.omnigroup.com> <5E394A1E-4338-4FFC-A074-ED3B48E1D71B@mac.com> <28317E56-3065-40F9-9767-BE3520891CF5@mac.com> Message-ID: LicenseControl is another low cost secure licensing framework. https://www.derman.com/LicensingService/Licensing-Overview.html ______________________________________________________________________ Previous message on 11/13/07 at 10:20 PM -0800 ********************************************************************** >On Nov 13, 2007, at 9:22 PM, Chad Armstrong wrote: > >>I'm looking at using eSellerate to help sell my products and to >>generate license keys. Perhaps I haven't dug deep enough into the >>documentation, or perhaps this question might be valid. > >I'm not sure this directly answers your question, but take a look at >the AquaticPrime framework for help with licensing and such. > > > >Free, open source, etc. > > - Scott >_______________________________________________ >MacOSX-dev mailing list >MacOSX-dev@omnigroup.com >http://www.omnigroup.com/mailman/listinfo/macosx-dev -- ========================================== SD WARNING: Programming may be habit forming. From dunham at mac.com Tue Nov 13 23:28:12 2007 From: dunham at mac.com (David Dunham) Date: Tue Nov 13 23:28:17 2007 Subject: -draggingEnded Message-ID: <457BD5AC-ABBB-4A79-B6B4-0036E1AE912F@mac.com> The release notes say "-draggingEnded is now implemented for applications linked on Leopard or later." But when I rebuild my app, I get *** -[CellEditor draggingEnded:]: unrecognized selector sent to instance 0x175bc440 when I send [super draggingEnded: aSender]; So it almost looks like the reverse! David Dunham Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From cmhofman at gmail.com Wed Nov 14 01:44:47 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Nov 14 01:44:55 2007 Subject: -draggingEnded In-Reply-To: <457BD5AC-ABBB-4A79-B6B4-0036E1AE912F@mac.com> References: <457BD5AC-ABBB-4A79-B6B4-0036E1AE912F@mac.com> Message-ID: NSDraggingSource is an informal protocol, which means it may be implemented in some views (like NSTableView) and in other cases you may have to implement it yourself. I don't know what CellEditor is, but it sure does not sound like a subclass of a view that implements it. Christiaan On 14 Nov 2007, at 8:28 AM, David Dunham wrote: > The release notes say "-draggingEnded is now implemented for > applications linked on Leopard or later." But when I rebuild my > app, I get > > *** -[CellEditor draggingEnded:]: unrecognized selector sent to > instance 0x175bc440 > > when I send > > [super draggingEnded: aSender]; > > So it almost looks like the reverse! > > David Dunham > Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/ > Imagination is more important than knowledge. -- Albert Einstein From vip at avatar.com.au Wed Nov 14 05:16:05 2007 From: vip at avatar.com.au (David Worrall) Date: Wed Nov 14 05:17:07 2007 Subject: site packages and /System/Library Message-ID: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> Hi All, Given the direction from Apple at that "The Frameworks directory in the system domain is for Apple-provided frameworks only. Developers should install their custom frameworks in either the local or user domain." What is the correct location for 3rd party site-packages to be used with the system python? _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: creative.canberra.edu.au/scrg/ From jep9816 at yahoo.com Wed Nov 14 05:52:03 2007 From: jep9816 at yahoo.com (jerry porter) Date: Wed Nov 14 05:52:11 2007 Subject: Odd error messages when using WebView Message-ID: <128780.754.qm@web51405.mail.re2.yahoo.com> Hello, I just finished upgrading an app from Tiger to Leopard and I am getting a bunch of errors (listed at the bottom of this message) when I load html in a WebView. I get the same errors regardless if I load file with html or just plain ext with no html markup. The html renders just fine. Also when I load web pages from external sites I don't get the error messages when the page is loaded just when I click on a link. This is the code I am using to load the html: - (void)_locateElementHelpTip { NSBundle *aBundle = [NSBundle mainBundle]; NSString *aPath = [aBundle pathForResource: [self elementHelpTip] ofType: @"html" inDirectory: @"ElementTipHelp"]; NSString *message = @"Not Found Page

Document Not found!

Index

"; NSURL *baseURL = [NSURL fileURLWithPath: [aBundle pathForResource: @"index" ofType: @"html" inDirectory: @"ElementTipHelp"]]; if(aPath == nil) { [[webView mainFrame] loadHTMLString: message baseURL: baseURL]; else { NSURL *url = [NSURL fileURLWithPath: aPath]; if(url != nil) [[webView mainFrame] loadRequest: [NSURLRequest requestWithURL: url]]; else [[webView mainFrame] loadHTMLString: message baseURL: baseURL]; } } Any ideas? Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFillColorWithColor: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetStrokeColorWithColor: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetTextMatrix: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFont: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFontSize: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextGetShouldSmoothFonts: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFontRenderingStyle: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetStyle: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetCharacterSpacing: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetTextPosition: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextShowGlyphsWithAdvances: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFillColorWithColor: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetStrokeColorWithColor: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetTextMatrix: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFont: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFontSize: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextGetShouldSmoothFonts: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFontRenderingStyle: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetFillColorWithColor: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetStrokeColorWithColor: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSaveGState: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetStyle: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextSetTextPosition: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextShowGlyphsWithAdvances: invalid context Tue Nov 13 18:16:29 MyHostName MyAppName[20733] : CGContextRestoreGState: invalid context Jerry Porter IT Distribution MS 34-202 Lincoln Financial Group One Commerce Square 2005 Market Street Philadelphia, PA 19103 (215) 255-7031 ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.yahoo.com/r/hs _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/jep9816%40yahoo.com This email sent to jep9816@yahoo.com ____________________________________________________________________________________ Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. http://overview.mail.yahoo.com/ From cmhofman at gmail.com Wed Nov 14 05:52:46 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Nov 14 05:52:57 2007 Subject: site packages and /System/Library In-Reply-To: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> References: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> Message-ID: The same rules should apply, so in the Python directory of the local or user domain. Christiaan On 14 Nov 2007, at 2:16 PM, David Worrall wrote: > Hi All, > > Given the direction from Apple at > BPFileSystem/Articles/LibraryDirectory.html> > that > "The Frameworks directory in the system domain is for Apple- > provided frameworks only. Developers should install their custom > frameworks in either the local or user domain." > > What is the correct location for 3rd party site-packages to be used > with the system python? From psarge at gmail.com Wed Nov 14 07:50:36 2007 From: psarge at gmail.com (Paul Sargent) Date: Wed Nov 14 07:50:43 2007 Subject: Neat Dtrace idea... In-Reply-To: References: <8620BA75-AD2E-4582-9699-425552223CFA@thaesofereode.info> <2C65C03F-358E-41AC-A29B-3E8297233330@gmail.com> <68aed4c30711130116j8bcb714weee6060e78a50803@mail.gmail.com> Message-ID: On 14 Nov 2007, at 05:15, Adam Salter wrote: > ... and it appears growlnotify doesn't yet work on leopard :( Typical. It's always the "easy" bit that goes wrong. > One thing I did think was that growlnotify would be run as root... > would I receive the notification? Good point, but there are a couple of options in that case. 1) change the command to su to the right account (i.e. 'su -c 'command' user). 2) Use the growl network interface for the message. (No idea about that one) From dunham at mac.com Wed Nov 14 07:52:33 2007 From: dunham at mac.com (David Dunham) Date: Wed Nov 14 07:52:45 2007 Subject: -draggingEnded In-Reply-To: References: <457BD5AC-ABBB-4A79-B6B4-0036E1AE912F@mac.com> Message-ID: <82F47012-0E06-4D5B-93FF-73017F35AFB3@mac.com> On 14 Nov 2007, at 01:44, Christiaan Hofman wrote: > NSDraggingSource is an informal protocol, which means it may be > implemented in some views (like NSTableView) and in other cases you > may have to implement it yourself. I don't know what CellEditor is, > but it sure does not sound like a subclass of a view that implements > it. CellEditor is my class, and I do implement draggingEnded:. The exception comes when I call super (an NSTextView). It's even worse -- I changed the code to - (void) draggingEnded: (id ) aSender // ... if ([super respondsToSelector: @selector(draggingEnded:)]) [super draggingEnded: aSender]; and still get unrecognized selector. David Dunham Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From psarge at gmail.com Wed Nov 14 07:56:29 2007 From: psarge at gmail.com (Paul Sargent) Date: Wed Nov 14 07:56:38 2007 Subject: site packages and /System/Library In-Reply-To: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> References: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> Message-ID: On 14 Nov 2007, at 13:16, David Worrall wrote: > > What is the correct location for 3rd party site-packages to be used > with the system python? >>> import sys >>> print sys.path ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python25.zip', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/ python', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/ python/PyObjC'] Looks like /Library/Python/2.5/site-packages Fairly unsurprising really. From cmhofman at gmail.com Wed Nov 14 08:10:04 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Nov 14 08:10:13 2007 Subject: -draggingEnded In-Reply-To: <82F47012-0E06-4D5B-93FF-73017F35AFB3@mac.com> References: <457BD5AC-ABBB-4A79-B6B4-0036E1AE912F@mac.com> <82F47012-0E06-4D5B-93FF-73017F35AFB3@mac.com> Message-ID: <2BDBE00F-1F5D-407D-B769-E62F7347CCBA@gmail.com> On 14 Nov 2007, at 4:52 PM, David Dunham wrote: > > On 14 Nov 2007, at 01:44, Christiaan Hofman wrote: > >> NSDraggingSource is an informal protocol, which means it may be >> implemented in some views (like NSTableView) and in other cases >> you may have to implement it yourself. I don't know what >> CellEditor is, but it sure does not sound like a subclass of a >> view that implements it. > > > CellEditor is my class, and I do implement draggingEnded:. The > exception comes when I call super (an NSTextView). > > It's even worse -- I changed the code to > > - (void) draggingEnded: (id ) aSender > // ... > if ([super respondsToSelector: @selector(draggingEnded:)]) > [super draggingEnded: aSender]; > > and still get unrecognized selector. > That code is totally wrong. It does not check whether the superclass implements draggingEnded:, it just uses the superclass's implementation of -respondsToSelector: to check whether the object itself implements it ('super' does not change the receiver, only the method implementation). As this is the same as self's implementation, your code is equivalent to: - (void) draggingEnded: (id ) aSender // ... if ([self respondsToSelector: @selector(draggingEnded:)]) [super draggingEnded: aSender]; and as you're guaranteed to implement to draggingEnded: it is equivalent to: - (void) draggingEnded: (id ) aSender // ... if (YES) [super draggingEnded: aSender]; So it's no wonder it will fail. You should do this: if ([[CellEditor superclass] instancesRespondToSelector:_cmd]) [super draggingEnded: aSender]; As a general remark on your question, note that the release notes do not say *where* draggingEnded: is implemented, only that it is implemented *somewhere*. Certainly, it is not implemented everywhere (i.e. in NSObject). Maybe it is only *called* at the correct time now? I agree they should have indicated what they mean with this sentence, because it basically contains no information. Christiaan > David Dunham > Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/ > Imagination is more important than knowledge. -- Albert Einstein > > > David Dunham A Sharp, LLC > Voice/Fax: 206 783 7404 http://a-sharp.com > Efficiency is intelligent laziness. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From dunham at mac.com Wed Nov 14 08:35:58 2007 From: dunham at mac.com (David Dunham) Date: Wed Nov 14 08:36:08 2007 Subject: -draggingEnded In-Reply-To: <2BDBE00F-1F5D-407D-B769-E62F7347CCBA@gmail.com> References: <457BD5AC-ABBB-4A79-B6B4-0036E1AE912F@mac.com> <82F47012-0E06-4D5B-93FF-73017F35AFB3@mac.com> <2BDBE00F-1F5D-407D-B769-E62F7347CCBA@gmail.com> Message-ID: <21C22692-A71D-448D-B64B-5228CDDCF630@mac.com> On 14 Nov 2007, at 08:10, Christiaan Hofman wrote: > You should do this: > > if ([[CellEditor superclass] instancesRespondToSelector:_cmd]) > [super draggingEnded: aSender]; Thanks, that worked (under Leopard). > As a general remark on your question, note that the release notes do > not say *where* draggingEnded: is implemented, only that it is > implemented *somewhere*. Certainly, it is not implemented everywhere > (i.e. in NSObject). Maybe it is only *called* at the correct time > now? I agree they should have indicated what they mean with this > sentence, because it basically contains no information. FWIW, my original code (without any test, simply passing dragginEnded: on to super) worked fine in Tiger. David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From cmhofman at gmail.com Wed Nov 14 10:15:40 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Nov 14 10:15:50 2007 Subject: -draggingEnded In-Reply-To: References: <457BD5AC-ABBB-4A79-B6B4-0036E1AE912F@mac.com> <82F47012-0E06-4D5B-93FF-73017F35AFB3@mac.com> <2BDBE00F-1F5D-407D-B769-E62F7347CCBA@gmail.com> <21C22692-A71D-448D-B64B-5228CDDCF630@mac.com> Message-ID: <20166d560711141015n153734abu4c58c598f911c912@mail.gmail.com> On Nov 14, 2007 7:11 PM, Christiaan Hofman wrote: > > On 14 Nov 2007, at 5:35 PM, David Dunham wrote: > > > On 14 Nov 2007, at 08:10, Christiaan Hofman wrote: > > > >> You should do this: > >> > >> if ([[CellEditor superclass] instancesRespondToSelector:_cmd]) > >> [super draggingEnded: aSender]; > > > > Thanks, that worked (under Leopard). > > > >> As a general remark on your question, note that the release notes > >> do not say *where* draggingEnded: is implemented, only that it is > >> implemented *somewhere*. Certainly, it is not implemented > >> everywhere (i.e. in NSObject). Maybe it is only *called* at the > >> correct time now? I agree they should have indicated what they > >> mean with this sentence, because it basically contains no > >> information. > > > > > > FWIW, my original code (without any test, simply passing > > dragginEnded: on to super) worked fine in Tiger. > > > > David Dunham A Sharp, LLC > > Voice/Fax: 206 783 7404 http://a-sharp.com > > Efficiency is intelligent laziness. > > Are you sure? The only AppKit objects implementing it seem to be > related to tokens. > > Christiaan > > Well I think I understand. It's what the cryptic sentence in the release notes really mean: on Tiger draggingEnded: is actually never called. So the fact that your code didn't crash on Tiger is actually a bug, that was fixed in Leopard! The code is buggy both on Tiger and Leopard (as the meaning of "super", "respondsToSelector:", and "informal protocol" have not changed). Christiaan From vip at avatar.com.au Wed Nov 14 13:16:17 2007 From: vip at avatar.com.au (David Worrall) Date: Wed Nov 14 13:16:50 2007 Subject: site packages and /System/Library In-Reply-To: References: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> Message-ID: <9E159983-7850-4E4D-BFB9-882D64BE213A@avatar.com.au> Unsurprising? perhaps if you're telepathic: >>> import sys >>> print sys.path ['', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python23.zip', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/lib/ python'] which doesn't include a '/Library/Python/2.3/site-packages' Following Paul's lead, however /Library/Python/2.3/site-packages has a lovely little README and is in the path So why doesn't /Library/Python/2.3/site-packages show up in sys.path? Fairly surprising, really. On 15/11/2007, at 2:56 AM, Paul Sargent wrote: > > On 14 Nov 2007, at 13:16, David Worrall wrote: >> >> What is the correct location for 3rd party site-packages to be >> used with the system python? > > >>> import sys > >>> print sys.path > ['', > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python25.zip', > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5', > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/plat-darwin', > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/plat-mac', > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/plat-mac/lib-scriptpackages', > '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ > lib/python', > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/lib-tk', > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/lib-dynload', > '/Library/Python/2.5/site-packages', > '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ > lib/python/PyObjC'] > > Looks like /Library/Python/2.5/site-packages > > Fairly unsurprising really. > _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: creative.canberra.edu.au/scrg/ From psarge at gmail.com Thu Nov 15 07:11:37 2007 From: psarge at gmail.com (Paul Sargent) Date: Thu Nov 15 07:11:47 2007 Subject: site packages and /System/Library In-Reply-To: <9E159983-7850-4E4D-BFB9-882D64BE213A@avatar.com.au> References: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> <9E159983-7850-4E4D-BFB9-882D64BE213A@avatar.com.au> Message-ID: <112D3C97-F98B-47FE-A61D-B371C4DB14AE@gmail.com> Ok, forgive my glib remark in that post. I did my path dump on a 10.5 system, and it looks like you're on 10.4. Looks like Apple got it wrong in Tiger, not providing a site-packages directory outside of system. This appears to be fixed in Leopard. If you have python installed from Macports (which I also have) it seems that the site-packages path is (for python 2.4): '/opt/local/lib/python2.4/site-packages' I expect it's something similar for their 2.5 package, but I don't have a need to install it. It'd be nice if they also included the Apple one, but I don't know if that's practical. On 14 Nov 2007, at 21:16, David Worrall wrote: > Unsurprising? perhaps if you're telepathic: > > >>> import sys > >>> print sys.path > ['', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python23.zip', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/plat-darwin', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/plat-mac', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/plat-mac/lib-scriptpackages', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/lib-tk', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/lib-dynload', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/site-packages', > '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/lib/ > python'] > > which doesn't include a > '/Library/Python/2.3/site-packages' > > Following Paul's lead, however > /Library/Python/2.3/site-packages > has a lovely little README > and is in the path > So why doesn't /Library/Python/2.3/site-packages show up in sys.path? > > Fairly surprising, really. > > > On 15/11/2007, at 2:56 AM, Paul Sargent wrote: > >> >> On 14 Nov 2007, at 13:16, David Worrall wrote: >>> >>> What is the correct location for 3rd party site-packages to be >>> used with the system python? >> >> >>> import sys >> >>> print sys.path >> ['', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python25.zip', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/plat-darwin', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/plat-mac', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/plat-mac/lib-scriptpackages', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ >> lib/python', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/lib-tk', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/lib-dynload', >> '/Library/Python/2.5/site-packages', >> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ >> lib/python/PyObjC'] >> >> Looks like /Library/Python/2.5/site-packages >> >> Fairly unsurprising really. >> > > _________________________________________________ > experimental polymedia: www.avatar.com.au > Sonic Communications Research Group, > University of Canberra: creative.canberra.edu.au/scrg/ > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From vip at avatar.com.au Thu Nov 15 07:22:48 2007 From: vip at avatar.com.au (David Worrall) Date: Thu Nov 15 07:23:29 2007 Subject: site packages and /System/Library In-Reply-To: <112D3C97-F98B-47FE-A61D-B371C4DB14AE@gmail.com> References: <3F2ACD03-9DB8-4E18-A10A-FB5B3B54FE7E@avatar.com.au> <9E159983-7850-4E4D-BFB9-882D64BE213A@avatar.com.au> <112D3C97-F98B-47FE-A61D-B371C4DB14AE@gmail.com> Message-ID: <7D302660-932E-4685-AF80-06F579466F3A@avatar.com.au> Hi Paul, No offense was taken - I thought it you were joking around ... As I pointed out, whilst >> >>> import sys >> >>> print sys.path >> doesn't include a >> '/Library/Python/2.3/site-packages' >> the real question now becomes why doesn't /Library/Python/2.3/site- packages show up when it is there and it can be imported from? (It works - I tried it) >> Following Paul's lead, however >> /Library/Python/2.3/site-packages >> has a lovely little README >> and is in the path >> So why doesn't /Library/Python/2.3/site-packages show up in sys.path? ciao, David On 16/11/2007, at 2:11 AM, Paul Sargent wrote: > Ok, forgive my glib remark in that post. > > I did my path dump on a 10.5 system, and it looks like you're on 10.4. > > Looks like Apple got it wrong in Tiger, not providing a site- > packages directory outside of system. This appears to be fixed in > Leopard. > > If you have python installed from Macports (which I also have) it > seems that the site-packages path is (for python 2.4): > > '/opt/local/lib/python2.4/site-packages' > > I expect it's something similar for their 2.5 package, but I don't > have a need to install it. It'd be nice if they also included the > Apple one, but I don't know if that's practical. > > On 14 Nov 2007, at 21:16, David Worrall wrote: > >> Unsurprising? perhaps if you're telepathic: >> >> >>> import sys >> >>> print sys.path >> ['', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python23.zip', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3/plat-darwin', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3/plat-mac', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3/plat-mac/lib-scriptpackages', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3/lib-tk', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3/lib-dynload', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3/site-packages', >> '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/ >> lib/python'] >> >> which doesn't include a >> '/Library/Python/2.3/site-packages' >> >> Following Paul's lead, however >> /Library/Python/2.3/site-packages >> has a lovely little README >> and is in the path >> So why doesn't /Library/Python/2.3/site-packages show up in sys.path? >> >> Fairly surprising, really. >> >> >> On 15/11/2007, at 2:56 AM, Paul Sargent wrote: >> >>> >>> On 14 Nov 2007, at 13:16, David Worrall wrote: >>>> >>>> What is the correct location for 3rd party site-packages to be >>>> used with the system python? >>> >>> >>> import sys >>> >>> print sys.path >>> ['', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python25.zip', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/plat-darwin', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/plat-mac', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/plat-mac/lib-scriptpackages', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ >>> lib/python', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/lib-tk', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/lib-dynload', >>> '/Library/Python/2.5/site-packages', >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ >>> lib/python/PyObjC'] >>> >>> Looks like /Library/Python/2.5/site-packages >>> >>> Fairly unsurprising really. >>> >> >> _________________________________________________ >> experimental polymedia: www.avatar.com.au >> Sonic Communications Research Group, >> University of Canberra: creative.canberra.edu.au/scrg/ >> >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: creative.canberra.edu.au/scrg/ From ahoesch at smartsoft.de Sat Nov 17 05:31:02 2007 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Sat Nov 17 05:31:10 2007 Subject: gdb on the Mac Message-ID: <570F6922-9511-11DC-9749-000393CA0072@smartsoft.de> Hi all, when I use gdb on the Mac (10.2) I get stack traces like this ... #14 0x930f9f5c in -[NSApplication sendAction:to:from:] () #15 0x9316f638 in -[NSMenu performActionForItemAtIndex:] () #16 0x931afd48 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] () #17 0x932bae48 in -[NSMenu performKeyEquivalent:] () #18 0x930a8efc in -[NSApplication sendEvent:] () #19 0x930b2418 in -[NSApplication run] () #20 0x931605cc in NSApplicationMain () #21 0x00002ea4 in _start () #22 0x00002d24 in start () It gives me no line numbers! gdb -v GNU gdb 5.1-20020408 (Apple version gdb-228) (Sun Jul 14 10:07:24 GMT 2002) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-macos10". On my Solaris box it gives me line numbers which helps a lot. Here I use -bash-3.00$ gdb -v GNU gdb 6.3.50.20051117 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.10". Can I convince the Apple gdb to generate line numbers as well? Thanks a lot! Regards, Andreas From shawnce at gmail.com Sat Nov 17 07:57:20 2007 From: shawnce at gmail.com (Shawn Erickson) Date: Sat Nov 17 07:57:24 2007 Subject: gdb on the Mac In-Reply-To: <570F6922-9511-11DC-9749-000393CA0072@smartsoft.de> References: <570F6922-9511-11DC-9749-000393CA0072@smartsoft.de> Message-ID: <43CD697C-4044-4757-8F25-85E256DA5C3E@gmail.com> On Nov 17, 2007, at 5:31 AM, Andreas H?schler wrote: > Hi all, > > when I use gdb on the Mac (10.2) I get stack traces like this > > ... > #14 0x930f9f5c in -[NSApplication sendAction:to:from:] () > #15 0x9316f638 in -[NSMenu performActionForItemAtIndex:] () > #16 0x931afd48 in -[NSCarbonMenuImpl > performActionWithHighlightingForItemAtIndex:] () > #17 0x932bae48 in -[NSMenu performKeyEquivalent:] () > #18 0x930a8efc in -[NSApplication sendEvent:] () > #19 0x930b2418 in -[NSApplication run] () > #20 0x931605cc in NSApplicationMain () > #21 0x00002ea4 in _start () > #22 0x00002d24 in start () > > It gives me no line numbers! > > Can I convince the Apple gdb to generate line numbers as well? Well you aren't going to get line numbers for code that isn't yours unless that information is included in the executable or an associated dSYM file. The above lists all Apple code. If you are talking about not seeing line numbers for your code then the answer depends on debug symbol format you are using, how you may or may not strip your applications, the use of dSYM file, and even when you are attempting to debug it (debugger from Xcode, etc.). -Shawn From ahoesch at smartsoft.de Mon Nov 19 05:31:18 2007 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Mon Nov 19 05:31:23 2007 Subject: Setting checkbox with keyboard Message-ID: Hi all, I want to have a checkbox in a tableview and be able to tab into it from the column to its left with the TAB key and then set its state with the keyboard (e.g. the space key, any other would be fine as well). This is to avoid the need to use the mouse for very efficient data entry. I did NSButtonCell *buttonCell = [[NSButtonCell alloc] initTextCell:@""]; [buttonCell setButtonType:NSSwitchButton]; [buttonCell setImagePosition:NSImageOnly]; [buttonCell setSelectable:YES]; [buttonCell setEditable:YES]; [tableColumn setDataCell:buttonCell]; [_displayObjects addObject:buttonCell]; [buttonCell release]; This allows me to tab into and over the checkbox column on the Mac. This does not work under GNUstep! Why? I subclasses NSButtonCell @implementation GSButtonCell - (BOOL)acceptsFirstResponder { BOOL result = [super acceptsFirstResponder]; NSLog(@"%@ acceptsFirstResponder %d", self, result); return result; } @end and expected acceptsFirstResponder to be called when I try to tab into the column. However, this does not happen under GNUstep!? When tabbing into the checkbox column on MacOSX the following method is called with an NSCBBoolean as anObject. However, the state of he boolean is always false whether the checkbox was set with the mouse before or not!? - (void)tableView:(NSTableView *)aTableView setObjectValue:anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { } Any idea what I am missing? Thanks, Andreas From Guenther.Fuerthaller at onevision.com Mon Nov 19 05:27:39 2007 From: Guenther.Fuerthaller at onevision.com (Guenther Fuerthaller) Date: Mon Nov 19 05:39:29 2007 Subject: gdb on the Mac In-Reply-To: <570F6922-9511-11DC-9749-000393CA0072@smartsoft.de> Message-ID: you should try: info threads and from the resulting thread list you might see the first known function/method from your code. pick the number and try: thread then: where does that help? Andreas H?schler Sent by: macosx-dev-bounces@omnigroup.com 17.11.2007 14:35 To macosx-dev@omnigroup.com cc Subject gdb on the Mac Hi all, when I use gdb on the Mac (10.2) I get stack traces like this ... #14 0x930f9f5c in -[NSApplication sendAction:to:from:] () #15 0x9316f638 in -[NSMenu performActionForItemAtIndex:] () #16 0x931afd48 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] () #17 0x932bae48 in -[NSMenu performKeyEquivalent:] () #18 0x930a8efc in -[NSApplication sendEvent:] () #19 0x930b2418 in -[NSApplication run] () #20 0x931605cc in NSApplicationMain () #21 0x00002ea4 in _start () #22 0x00002d24 in start () It gives me no line numbers! gdb -v GNU gdb 5.1-20020408 (Apple version gdb-228) (Sun Jul 14 10:07:24 GMT 2002) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-macos10". On my Solaris box it gives me line numbers which helps a lot. Here I use -bash-3.00$ gdb -v GNU gdb 6.3.50.20051117 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.10". Can I convince the Apple gdb to generate line numbers as well? Thanks a lot! Regards, Andreas _______________________________________________ MacOSX-dev mailing list MacOSX-dev@omnigroup.com http://www.omnigroup.com/mailman/listinfo/macosx-dev From ahoesch at smartsoft.de Mon Nov 19 05:55:19 2007 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Mon Nov 19 05:55:26 2007 Subject: Setting checkbox with keyboard In-Reply-To: Message-ID: <1076DDB3-96A7-11DC-B067-000393CA0072@smartsoft.de> Hi all, > I want to have a checkbox in a tableview and be able to tab into it > from the column to its left with the TAB key and then set its state > with the keyboard (e.g. the space key, any other would be fine as > well). This is to avoid the need to use the mouse for very efficient > data entry. I did > > NSButtonCell *buttonCell = [[NSButtonCell alloc] > initTextCell:@""]; > [buttonCell setButtonType:NSSwitchButton]; > [buttonCell setImagePosition:NSImageOnly]; > [buttonCell setSelectable:YES]; > [buttonCell setEditable:YES]; > [tableColumn setDataCell:buttonCell]; > [_displayObjects addObject:buttonCell]; > [buttonCell release]; > > This allows me to tab into and over the checkbox column on the Mac. > This does not work under GNUstep! Why? I subclasses NSButtonCell > > @implementation GSButtonCell > > - (BOOL)acceptsFirstResponder > { > BOOL result = [super acceptsFirstResponder]; > NSLog(@"%@ acceptsFirstResponder %d", self, result); > return result; > } > > @end > > and expected acceptsFirstResponder to be called when I try to tab into > the column. However, this does not happen under GNUstep!? > > When tabbing into the checkbox column on MacOSX the following method > is called with an NSCBBoolean as anObject. However, the state of he > boolean is always false whether the checkbox was set with the mouse > before or not!? > > - (void)tableView:(NSTableView *)aTableView setObjectValue:anObject > forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex > { > } > > Any idea what I am missing? If setting the state of the checkbox with the keyboard is not possible (right now) it would already help a lot if one were able to tab ove rthe checkbox column. Right now, tabbing ends when the checkbox column is reached which is very annoying for the user. Any idea how to avoid that? The tableview should just select the next editable cell behind the checkbox column for editing. Thanks a lot! Regards, Andreas From antti.karanta at napa.fi Mon Nov 19 08:06:34 2007 From: antti.karanta at napa.fi (Antti Karanta) Date: Mon Nov 19 08:08:30 2007 Subject: Finding out executable location from a c program Message-ID: Hi! I would need to find out the directory where the current executable resides to find some stuff whose location I know relative to the executable location. On linux /proc/{pid}/exe is a symbolic link to the executable, on solaris the corresponding symlink is /proc/{pid}/path/a.out, on windows I can use GetModuleFileNameA, but I haven't been able to find any way to do this on os-x. Any ideas? -Antti- From idiotsavant2005 at gmail.com Mon Nov 19 08:12:23 2007 From: idiotsavant2005 at gmail.com (I. Savant) Date: Mon Nov 19 08:12:25 2007 Subject: Finding out executable location from a c program In-Reply-To: References: Message-ID: > I would need to find out the directory where the current executable > resides to find some stuff whose location I know relative to the > executable location. The first argument ( argv[0] ) is the path to your executable. -- I.S. From antti.karanta at napa.fi Mon Nov 19 08:24:40 2007 From: antti.karanta at napa.fi (Antti Karanta) Date: Mon Nov 19 08:27:02 2007 Subject: Finding out executable location from a c program References: Message-ID: On Mon, 19 Nov 2007 18:12:23 +0200, I. Savant wrote: >> I would need to find out the directory where the current executable >> resides to find some stuff whose location I know relative to the >> executable location. > > The first argument ( argv[0] ) is the path to your executable. On other systems (at least on windows and AFAIK on linux / solaris as well) argv[0] is the string how the program was invoked. This is different; if the program was invoked with full or relative path, then I can get the info I want. However, if the program is found on PATH argv[0] is pretty useless. Ok, I could replicate the functionality of "which" command to find out where the program was, but this seems clumsy. Or is this different on os-x so that argv[0] always contains the full path to the executable? -Antti- From psarge at gmail.com Mon Nov 19 08:37:25 2007 From: psarge at gmail.com (Paul Sargent) Date: Mon Nov 19 08:37:38 2007 Subject: Finding out executable location from a c program In-Reply-To: References: Message-ID: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> On 19 Nov 2007, at 16:12, I. Savant wrote: >> I would need to find out the directory where the current executable >> resides to find some stuff whose location I know relative to the >> executable location. > > The first argument ( argv[0] ) is the path to your executable. Not true. Argv[0] is the first argument given on the command line when your code was invoked. This might be a full path, or it might be just the executable name. #include int main(int argc, char** argv) { printf("Arg 0 is %s\n", argv[0]); return 0; } Compiled and then placed into my path. Dr-Stupid:~ pauls$ /Users/pauls/bin/a.out Arg 0 is /Users/pauls/bin/a.out Dr-Stupid:~ pauls$ bin/a.out Arg 0 is bin/a.out Dr-Stupid:~ pauls$ a.out Arg 0 is a.out There's no guaranteed consistency there, unless you know how it'll be invoked. I can't think of a way of doing it. It's normal practise to put support files in a location like /usr/local/lib or similar rather than with the executable on Unix. On a Mac the solution is normally to package it inside the app bundle and use the API to access that. From idiotsavant2005 at gmail.com Mon Nov 19 08:44:18 2007 From: idiotsavant2005 at gmail.com (I. Savant) Date: Mon Nov 19 08:44:23 2007 Subject: Finding out executable location from a c program In-Reply-To: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> Message-ID: > Not true. Argv[0] is the first argument given on the command line when > your code was invoked. This might be a full path, or it might be just > the executable name. Ack! An excellent point! -- I.S. From cmhofman at gmail.com Mon Nov 19 08:51:58 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Mon Nov 19 08:52:10 2007 Subject: Finding out executable location from a c program In-Reply-To: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> Message-ID: <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> On 19 Nov 2007, at 5:37 PM, Paul Sargent wrote: > > On 19 Nov 2007, at 16:12, I. Savant wrote: > >>> I would need to find out the directory where the current >>> executable >>> resides to find some stuff whose location I know relative to the >>> executable location. >> >> The first argument ( argv[0] ) is the path to your executable. > > Not true. Argv[0] is the first argument given on the command line > when your code was invoked. This might be a full path, or it might > be just the executable name. > > #include > > int main(int argc, char** argv) { > printf("Arg 0 is %s\n", argv[0]); > return 0; > } > > Compiled and then placed into my path. > > Dr-Stupid:~ pauls$ /Users/pauls/bin/a.out > Arg 0 is /Users/pauls/bin/a.out > Dr-Stupid:~ pauls$ bin/a.out > Arg 0 is bin/a.out > Dr-Stupid:~ pauls$ a.out > Arg 0 is a.out > > There's no guaranteed consistency there, unless you know how it'll > be invoked. > It can even be the location of a symlink if called that way. > I can't think of a way of doing it. It's normal practise to put > support files in a location like /usr/local/lib or similar rather > than with the executable on Unix. On a Mac the solution is normally > to package it inside the app bundle and use the API to access that. I also wouldn't know. There should be a way though, as internally NSBundle does. Christiaan From psarge at gmail.com Mon Nov 19 10:38:29 2007 From: psarge at gmail.com (Paul Sargent) Date: Mon Nov 19 10:38:40 2007 Subject: Are they laughing at us? Message-ID: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> I was just building up an interface in IB3 and I used the NSTextview. It comes with some Lorem Ipsum in there just to give it something. While I was moving things around, I noticed this: > ....Et harumd und lookum like Greek to me, dereud.... I thought it was meant to be Latin ;-) From leeg at thaesofereode.info Mon Nov 19 10:56:23 2007 From: leeg at thaesofereode.info (Graham J Lee) Date: Mon Nov 19 10:57:12 2007 Subject: Are they laughing at us? In-Reply-To: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> References: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> Message-ID: <64CFACE6-D245-4B69-AC9C-B695F7377EA2@thaesofereode.info> On 19 Nov 2007, at 18:38, Paul Sargent wrote: > I was just building up an interface in IB3 and I used the > NSTextview. It comes with some Lorem Ipsum in there just to give it > something. > > While I was moving things around, I noticed this: > >> ....Et harumd und lookum like Greek to me, dereud.... > > I thought it was meant to be Latin ;-) When noting that one of my app's files had an unexpected icon, I read this: http://thaesofereode.info/images/excelprefs.png Made me chuckle, anyway :-) Graham. From newslists at autonomy.caltech.edu Mon Nov 19 11:23:09 2007 From: newslists at autonomy.caltech.edu (R.L. Grigg) Date: Mon Nov 19 11:23:20 2007 Subject: Are they laughing at us? In-Reply-To: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> References: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> Message-ID: <4CF0FF47-72EC-42EE-956F-81AFEEAF59BB@autonomy.caltech.edu> On Nov 19, 2007, at 10:38 AM, Paul Sargent wrote: > I was just building up an interface in IB3 and I used the > NSTextview. It comes with some Lorem Ipsum in there just to give it > something. > > While I was moving things around, I noticed this: > >> ....Et harumd und lookum like Greek to me, dereud.... > > I thought it was meant to be Latin ;-) It is. It's from 'The Extremes of Good and Evil' by Cicero, written in 45 BC. From http://www.lipsum.com/: "There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text." Hmmm... Russ From merlyn at stonehenge.com Mon Nov 19 11:51:20 2007 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Nov 19 11:51:24 2007 Subject: Are they laughing at us? In-Reply-To: <4CF0FF47-72EC-42EE-956F-81AFEEAF59BB@autonomy.caltech.edu> (R. L. Grigg's message of "Mon, 19 Nov 2007 11:23:09 -0800") References: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> <4CF0FF47-72EC-42EE-956F-81AFEEAF59BB@autonomy.caltech.edu> Message-ID: <86sl329fpj.fsf@blue.stonehenge.com> >>>>> "R" == R L Grigg writes: R> "There are many variations of passages of Lorem Ipsum available, but the R> majority have suffered alteration in some form, by injected humour, or R> randomised words which don't look even slightly believable. If you are R> going to use a passage of Lorem Ipsum, you need to be sure there isn't R> anything embarrassing hidden in the middle of text." I like the Corporate Ipsum generator. Works great for powerpoint^Wkeynote slides before you get the real text to flesh it out. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From psarge at gmail.com Mon Nov 19 12:13:35 2007 From: psarge at gmail.com (Paul Sargent) Date: Mon Nov 19 12:13:43 2007 Subject: Are they laughing at us? In-Reply-To: <86sl329fpj.fsf@blue.stonehenge.com> References: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> <4CF0FF47-72EC-42EE-956F-81AFEEAF59BB@autonomy.caltech.edu> <86sl329fpj.fsf@blue.stonehenge.com> Message-ID: <09C9106A-E30B-4DE7-83B1-6208DD471C56@gmail.com> On 19 Nov 2007, at 19:51, Randal L. Schwartz wrote: > I like the Corporate Ipsum > > generator. Works great for powerpoint^Wkeynote slides before you get > the real text to flesh it out. "Efficiently incubate global channels after client-focused alignments." I don't know. I think a lot of presentations to take that verbatim. From idiotsavant2005 at gmail.com Mon Nov 19 12:47:33 2007 From: idiotsavant2005 at gmail.com (I. Savant) Date: Mon Nov 19 12:47:41 2007 Subject: Are they laughing at us? In-Reply-To: <09C9106A-E30B-4DE7-83B1-6208DD471C56@gmail.com> References: <6AB668D3-B000-463E-A006-9604D9571CEF@gmail.com> <4CF0FF47-72EC-42EE-956F-81AFEEAF59BB@autonomy.caltech.edu> <86sl329fpj.fsf@blue.stonehenge.com> <09C9106A-E30B-4DE7-83B1-6208DD471C56@gmail.com> Message-ID: > "Efficiently incubate global channels after client-focused alignments." > > I don't know. I think a lot of presentations to take that verbatim. "Seamlessly underwhelm holistic expertise ..." I swear this was my previous employer's business model. -- I.S. From sstevenson at mac.com Mon Nov 19 14:55:47 2007 From: sstevenson at mac.com (Scott Stevenson) Date: Mon Nov 19 14:55:55 2007 Subject: Finding out executable location from a c program In-Reply-To: <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> Message-ID: <312EE0D0-1826-4348-AB13-A54590772B21@mac.com> On Nov 19, 2007, at 8:51 AM, Christiaan Hofman wrote: >> I can't think of a way of doing it. It's normal practise to put >> support files in a location like /usr/local/lib or similar rather >> than with the executable on Unix. On a Mac the solution is normally >> to package it inside the app bundle and use the API to access that. > > I also wouldn't know. There should be a way though, as internally > NSBundle does. I believe CFBundle is open source. - Scott From roy at adeptsolutions.com Mon Nov 19 14:53:01 2007 From: roy at adeptsolutions.com (Roy Lovejoy) Date: Mon Nov 19 15:53:28 2007 Subject: Finding out executable location from a c program In-Reply-To: <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> Message-ID: <74704B92-D6BD-459C-A8F0-D980AB58FDB8@adeptsolutions.com> >> >>>> I would need to find out the directory where the current >>>> executable >>>> resides to find some stuff whose location I know relative to the >>>> executable location. >>> if you aren't adverse to linking to carbon, GetCurrentProcess(&applicationSerialNumber); GetProcessInformation(&applicationSerialNumber, &application); will return the executable's fsspec in processAppSpec. From clarkcox3 at gmail.com Mon Nov 19 18:09:36 2007 From: clarkcox3 at gmail.com (Clark Cox) Date: Mon Nov 19 18:09:39 2007 Subject: Finding out executable location from a c program In-Reply-To: <312EE0D0-1826-4348-AB13-A54590772B21@mac.com> References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> <312EE0D0-1826-4348-AB13-A54590772B21@mac.com> Message-ID: On Nov 19, 2007 2:55 PM, Scott Stevenson wrote: > > On Nov 19, 2007, at 8:51 AM, Christiaan Hofman wrote: > > >> I can't think of a way of doing it. It's normal practise to put > >> support files in a location like /usr/local/lib or similar rather > >> than with the executable on Unix. On a Mac the solution is normally > >> to package it inside the app bundle and use the API to access that. > > > > I also wouldn't know. There should be a way though, as internally > > NSBundle does. > > I believe CFBundle is open source. Why bother with CFBundle's source? Just *use* CFBundle. (composed in e-mail, but should give a basic idea): #include #include #include char *GetExecutableLocation() { CFBundleRef bundle = CFBundleGetMainBundle(); CFURLRef executableURL = CFBundleCopyExecutableURL(bundle); CFStringRef executablePath = CFURLCopyFileSystemPath(executableURL, kCFURLPOSIXPathStyle); CFIndex maxLength = CFStringGetMaximumSizeOfFileSystemRepresentation(executablePath); char *result = malloc(maxLength); if(result) { if(!CFStringGetFileSystemRepresentation(executablePath, result, maxLength)) { free(result); result = NULL; } } CFRelease(executablePath); CFRelease(executableURL); return result; } int main() { char *path = GetExecutableLocation(); printf("path = \"%s\"\n", path); free(path); return 0; } int main() { char *path = GetExecutableLocation(); printf("path = \"%s\"\n", path); free(path); return 0; } -- Clark S. Cox III clarkcox3@gmail.com From sstevenson at mac.com Mon Nov 19 21:31:22 2007 From: sstevenson at mac.com (Scott Stevenson) Date: Mon Nov 19 21:31:27 2007 Subject: Finding out executable location from a c program In-Reply-To: References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> <312EE0D0-1826-4348-AB13-A54590772B21@mac.com> Message-ID: <60075E7E-361F-4C5B-A7BF-0DC20AC88B2D@mac.com> On Nov 19, 2007, at 6:09 PM, Clark Cox wrote: > Why bother with CFBundle's source? Just *use* CFBundle. (composed in > e-mail, but should give a basic idea): > > #include > #include > #include > > char *GetExecutableLocation() { > CFBundleRef bundle = CFBundleGetMainBundle(); I got the impression from the description that this is a program which does not necessarily have a bundle. Does CFBundle actually work some magic in that situation? - Scott From clarkcox3 at gmail.com Mon Nov 19 21:37:24 2007 From: clarkcox3 at gmail.com (Clark S. Cox III) Date: Mon Nov 19 21:37:40 2007 Subject: Finding out executable location from a c program In-Reply-To: <60075E7E-361F-4C5B-A7BF-0DC20AC88B2D@mac.com> References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> <312EE0D0-1826-4348-AB13-A54590772B21@mac.com> <60075E7E-361F-4C5B-A7BF-0DC20AC88B2D@mac.com> Message-ID: <3B80BDA5-DBE0-4636-9CF5-938432459EC2@gmail.com> In a word: yes. CFBundle works in single-file executables as well as bundled executables. Clark Cox III Clark.cox@apple.com Sent from my iPhone On Nov 19, 2007, at 21:31, Scott Stevenson wrote: > > On Nov 19, 2007, at 6:09 PM, Clark Cox wrote: > >> Why bother with CFBundle's source? Just *use* CFBundle. (composed in >> e-mail, but should give a basic idea): >> >> #include >> #include >> #include >> >> char *GetExecutableLocation() { >> CFBundleRef bundle = CFBundleGetMainBundle(); > > I got the impression from the description that this is a program > which does not necessarily have a bundle. Does CFBundle actually > work some magic in that situation? > > - Scott > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From alastair at alastairs-place.net Tue Nov 20 04:36:53 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Tue Nov 20 04:37:03 2007 Subject: Finding out executable location from a c program In-Reply-To: <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> References: <346DD29C-EC3B-4D2A-8156-7434CC7E1CC8@gmail.com> <9AEFEC41-74E5-4A79-9CE8-D9C7BC8E3FB7@gmail.com> Message-ID: <9AA9BC85-08F5-441E-B6E9-8BAE759A2AC9@alastairs-place.net> On 19 Nov 2007, at 16:51, Christiaan Hofman wrote: > I also wouldn't know. There should be a way though, as internally > NSBundle does. You can use _NSGetExecutablePath() from . According to the header, it might return the path to a symlink, so you may want to use realpath() as well, and you could potentially create a security hole if you use this the wrong way. (I should add that this function is "officially sanctioned" in as much as it's used in MoreIsBetter: ; it used to be documented in the NSModule man page, but it looks like that no longer exists.) It's perhaps worth saying though that using the path of your tool is generally an evil thing to do. It's normally best, for command line tools, to hard-code paths to any resources they need in the normal UNIX places, or to stick them inside an associated application and use Launch Services to locate that (you probably want LSFindApplicationForInfo()), then use CF or NSBundle to grab references to the relevant files from there. Kind regards, Alastair. -- http://alastairs-place.net From madbird2 at noos.fr Wed Nov 21 00:56:02 2007 From: madbird2 at noos.fr (=?ISO-8859-1?Q?J=E9r=F4me=20Seydoux?=) Date: Wed Nov 21 01:26:27 2007 Subject: ld: duplicate symbol typeinfo Message-ID: <20071121085602.989710973@smtp.free.fr> Hello, After migrating to Mac OS X 10.5 and XCode 3, I have the following link error in my project: ld: duplicate symbol typeinfo for TArrayin CMailBrowser.o and CPMApp.o CMailBrowser.o and CPMApp.o are two c++ classes, which have some PowerPlant classes in common in their superclasses. Some of these superclasses have a member variables of class TArray, which is a PowerPlant template class. I don't understand what this link error means, why it was not occurring with previous versions of XCode, and what can I do to fix it? Thanks for any help J?r?me From macosxdevlist at personal.fishh2o.com Thu Nov 22 12:12:55 2007 From: macosxdevlist at personal.fishh2o.com (SD) Date: Thu Nov 22 12:13:15 2007 Subject: .framework from .a files Message-ID: I have a bunch of .a static library files that I would like to turn into a .framework (from wxWidgets). Is there an easy way to do this? Thanx again. Happy Thanks Giving to those in the US. -- ========================================== SD WARNING: Programming may be habit forming. From Philip.Moetteli at tele2.ch Fri Nov 23 05:42:35 2007 From: Philip.Moetteli at tele2.ch (=?ISO-8859-1?Q?Philip_M=F6tteli?=) Date: Fri Nov 23 05:42:43 2007 Subject: With What does Apple Swizzle the IsA-pointer in KVO? Message-ID: Hi, Apple says, that it uses IsA-swizzling as the underlying technology to implement KVO. What are/is the class(es), which replace the original class of the observed object? Is it an NSProxy subclass? Different NSProxy subclasses, depending on the observe