From christiaan.hofman at weizmann.ac.il Wed Feb 1 07:34:44 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Wed Feb 1 07:34:54 2006 Subject: Binding varying content Message-ID: <617C3930-5F70-4653-8E5F-D2707CED841B@weizmann.ac.il> Hi all, We are developing an app that can display in one window the content of a varying source (concretely, a source is just a set of NSManagedObjects). The different sources however can contain varying types (entitites) of items. So we have different views for the display of the different items, with a corresponding controller objects. When the source changes, we swap in a view that can display the items in the new source. Now we want to use binding to observe the source. (BTW, the source is selected in a separate tableView). Simply bind or observe the change of the source gives problems, as then the source is changed before the proper view is swapped in, and the old view will give undefined key exceptions. Unfortunately there is no willChangeValueForKey observation, where we could unbind the old view. Does anyone have an idea of how to solve this problem? Christiaan From christiaan.hofman at weizmann.ac.il Wed Feb 1 07:49:00 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Wed Feb 1 07:49:02 2006 Subject: Smart playlists in core data Message-ID: Hi, Does anyone know how to create something like a Smart Playlist in Core data, i.e. a fetched property that is automatically updated? And perhaps a related question: is there a way to get a core data 'fetched property' (?) that contains all the managedObjects for a particular entity name? I found that if you bind a NSArrayController to a managedObjectContext setting a particular entity, so in a sense the contentSet of the arrayController can do this, but this may depend on private functionality. Or is there something in the NSManagedObjectContent I can observe (unfortunately the registered objects can not be observed). Thanks, Christiaan From ahoesch at smartsoft.de Wed Feb 1 10:10:29 2006 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Wed Feb 1 10:11:08 2006 Subject: NSComboBox delegate Message-ID: <07385FB5-934E-11DA-A275-003065CCA582@smartsoft.de> Hi all, I want to be notified when I leave a combobox with tab after entering a few charatcers. setCompletes is set to YES. I implemented - (void)comboBoxWillDismiss:(NSNotification *)notification { NSLog(@"comboBoxWillDismiss"); } - (void)textDidEndEditing:(NSNotification *)aNotification { NSLog(@"textDidEndEditing"); } - (void)textDidChange:(NSNotification *)aNotification { NSLog(@"textDidChange"); } in the delegate but none of these is ever called. Any ideas? Regards, Andreas From tyler at bleepsoft.com Wed Feb 1 10:21:12 2006 From: tyler at bleepsoft.com (R. Tyler Ballance) Date: Wed Feb 1 10:41:33 2006 Subject: Smart playlists in core data In-Reply-To: <8A689681-36E4-42FD-95D2-508A9278F65B@weizmann.ac.il> References: <0069237E-3C7C-4629-ADF3-BCC868481904@bleepsoft.com> <8A689681-36E4-42FD-95D2-508A9278F65B@weizmann.ac.il> Message-ID: <09E4D408-CB23-4610-B9F6-B961A909AA62@bleepsoft.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Are you uncomfortable at all with using Cocoa Bindings to do this? While a pain to debug, Cocoa Bindings are perfect for this, it should (as much as I've used the Cocoa Bindings-Core Data duo) automagically update. More or less, like whenever the data is updated, it's posting a notification, that is received by the UI via Cocoa Bindings. Unfortunately, I can't exactly paste any code for Cocoa Bindings...oh well Cheers, - -R. Tyler Ballance On Feb 1, 2006, at 12:15 PM, Christiaan Hofman wrote: > I understand the fetched property part, but my problem is the > automatic update when the content of the managedObjectContext > changes, i.e. when should I fetch? > > Christiaan > > On 1 Feb 2006, at 8:10 PM, R. Tyler Ballance wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> A "Smart Playlist" is nothing more than fetching data from the >> Core Data store with some defined search predicate. >> >> Add a fetch request, and enter the search predicate you would like. >> >> "Smart playlists" is one of the best reasons to use Core Data, >> have fun :) >> >> Cheers, >> >> - -R. Tyler Ballance >> >> On Feb 1, 2006, at 9:49 AM, Christiaan Hofman wrote: >> >>> Hi, >>> >>> Does anyone know how to create something like a Smart Playlist in >>> Core data, i.e. a fetched property that is automatically updated? >>> >>> And perhaps a related question: is there a way to get a core data >>> 'fetched property' (?) that contains all the managedObjects for a >>> particular entity name? I found that if you bind a >>> NSArrayController to a managedObjectContext setting a particular >>> entity, so in a sense the contentSet of the arrayController can >>> do this, but this may depend on private functionality. Or is >>> there something in the NSManagedObjectContent I can observe >>> (unfortunately the registered objects can not be observed). >>> >>> Thanks, >>> Christiaan >>> >>> _______________________________________________ >>> MacOSX-dev mailing list >>> MacOSX-dev@omnigroup.com >>> http://www.omnigroup.com/mailman/listinfo/macosx-dev >>> >>> >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.1 (Darwin) >> >> iD8DBQFD4PmXqO6nEJfroRsRAqLbAJ9TqUkTkQq1pv3+1JzLltUwb9KSCgCfewCn >> +CTwuxlmTWNLldYlZs0H+2E= >> =GeID >> -----END PGP SIGNATURE----- > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFD4PwaqO6nEJfroRsRAs/wAJ43caRB8ZJV7u9zdyK7+aMjrYtkRACfcjXT NvhlF12wRfEFa6SfB1y7WJA= =KMnR -----END PGP SIGNATURE----- From christiaan.hofman at weizmann.ac.il Wed Feb 1 10:44:24 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Wed Feb 1 10:44:33 2006 Subject: Smart playlists in core data In-Reply-To: <09E4D408-CB23-4610-B9F6-B961A909AA62@bleepsoft.com> References: <0069237E-3C7C-4629-ADF3-BCC868481904@bleepsoft.com> <8A689681-36E4-42FD-95D2-508A9278F65B@weizmann.ac.il> <09E4D408-CB23-4610-B9F6-B961A909AA62@bleepsoft.com> Message-ID: <164BF630-E726-4374-938B-4E8D7DC93377@weizmann.ac.il> I'd even prefer to use bindings, and that's exactly what I tried. But I don't see it updating. Also the docs say explicitly that fetched properties don't update automagically. This is what I do: MyContainerEntity --fetched--> myItems (MyItemEntity) entity name: MyItemEntity predicate: entity.name == "MyItemEntity" Then I bind the contentArray of an NSArrayController to an instance of an NSManagedObject (MyContainerEntity) property of my document. When I add an NSManagedObject(MyItemEntity) to the managedObjectContext (not through this arrayController), nothing happens with the tableView bound to the arrayController. Christiaan On 1 Feb 2006, at 8:21 PM, R. Tyler Ballance wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Are you uncomfortable at all with using Cocoa Bindings to do this? > > While a pain to debug, Cocoa Bindings are perfect for this, it > should (as much as I've used the Cocoa Bindings-Core Data duo) > automagically update. > > More or less, like whenever the data is updated, it's posting a > notification, that is received by the UI via Cocoa Bindings. > > Unfortunately, I can't exactly paste any code for Cocoa > Bindings...oh well > > Cheers, > > - -R. Tyler Ballance > > > On Feb 1, 2006, at 12:15 PM, Christiaan Hofman wrote: > >> I understand the fetched property part, but my problem is the >> automatic update when the content of the managedObjectContext >> changes, i.e. when should I fetch? >> >> Christiaan >> >> On 1 Feb 2006, at 8:10 PM, R. Tyler Ballance wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> A "Smart Playlist" is nothing more than fetching data from the >>> Core Data store with some defined search predicate. >>> >>> Add a fetch request, and enter the search predicate you would like. >>> >>> "Smart playlists" is one of the best reasons to use Core Data, >>> have fun :) >>> >>> Cheers, >>> >>> - -R. Tyler Ballance >>> >>> On Feb 1, 2006, at 9:49 AM, Christiaan Hofman wrote: >>> >>>> Hi, >>>> >>>> Does anyone know how to create something like a Smart Playlist >>>> in Core data, i.e. a fetched property that is automatically >>>> updated? >>>> >>>> And perhaps a related question: is there a way to get a core >>>> data 'fetched property' (?) that contains all the managedObjects >>>> for a particular entity name? I found that if you bind a >>>> NSArrayController to a managedObjectContext setting a particular >>>> entity, so in a sense the contentSet of the arrayController can >>>> do this, but this may depend on private functionality. Or is >>>> there something in the NSManagedObjectContent I can observe >>>> (unfortunately the registered objects can not be observed). >>>> >>>> Thanks, >>>> Christiaan >>>> >>>> _______________________________________________ >>>> MacOSX-dev mailing list >>>> MacOSX-dev@omnigroup.com >>>> http://www.omnigroup.com/mailman/listinfo/macosx-dev >>>> >>>> >>> >>> -----BEGIN PGP SIGNATURE----- >>> Version: GnuPG v1.4.1 (Darwin) >>> >>> iD8DBQFD4PmXqO6nEJfroRsRAqLbAJ9TqUkTkQq1pv3+1JzLltUwb9KSCgCfewCn >>> +CTwuxlmTWNLldYlZs0H+2E= >>> =GeID >>> -----END PGP SIGNATURE----- >> >> >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > > iD8DBQFD4PwaqO6nEJfroRsRAs/wAJ43caRB8ZJV7u9zdyK7+aMjrYtkRACfcjXT > NvhlF12wRfEFa6SfB1y7WJA= > =KMnR > -----END PGP SIGNATURE----- From christiaan.hofman at weizmann.ac.il Wed Feb 1 13:30:40 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Wed Feb 1 13:30:57 2006 Subject: Smart playlists in core data (Solved) In-Reply-To: <164BF630-E726-4374-938B-4E8D7DC93377@weizmann.ac.il> References: <0069237E-3C7C-4629-ADF3-BCC868481904@bleepsoft.com><8A689681-36E4-42FD-95D2-508A9278F65B@weizmann.ac.il><09E4D408-CB23-4610-B9F6-B961A909AA62@bleepsoft.com> <164BF630-E726-4374-938B-4E8D7DC93377@weizmann.ac.il> Message-ID: <2F8178A2-AC80-49EF-9D53-E47A0C4791CF@weizmann.ac.il> Thanks for your remarks Tyler. I found a solution to my little problem. I now use the NSManagedObjectContextObjectsDidChangeNotification to refresh all my "smart playlists". I would like to know though if anyone knows a way through binding/ observing rather than notification to do this (I wonder how NSArrayController does it). Christiaan On 1 Feb 2006, at 8:44 PM, Christiaan Hofman wrote: > I'd even prefer to use bindings, and that's exactly what I tried. > But I don't see it updating. Also the docs say explicitly that > fetched properties don't update automagically. > > This is what I do: > > MyContainerEntity --fetched--> myItems (MyItemEntity) > entity name: MyItemEntity > predicate: entity.name == "MyItemEntity" > > Then I bind the contentArray of an NSArrayController to an instance > of an NSManagedObject (MyContainerEntity) property of my document. > > When I add an NSManagedObject(MyItemEntity) to the > managedObjectContext (not through this arrayController), nothing > happens with the tableView bound to the arrayController. > > Christiaan > > On 1 Feb 2006, at 8:21 PM, R. Tyler Ballance wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Are you uncomfortable at all with using Cocoa Bindings to do this? >> >> While a pain to debug, Cocoa Bindings are perfect for this, it >> should (as much as I've used the Cocoa Bindings-Core Data duo) >> automagically update. >> >> More or less, like whenever the data is updated, it's posting a >> notification, that is received by the UI via Cocoa Bindings. >> >> Unfortunately, I can't exactly paste any code for Cocoa >> Bindings...oh well >> >> Cheers, >> >> - -R. Tyler Ballance >> >> >> On Feb 1, 2006, at 12:15 PM, Christiaan Hofman wrote: >> >>> I understand the fetched property part, but my problem is the >>> automatic update when the content of the managedObjectContext >>> changes, i.e. when should I fetch? >>> >>> Christiaan >>> >>> On 1 Feb 2006, at 8:10 PM, R. Tyler Ballance wrote: >>> >>>> -----BEGIN PGP SIGNED MESSAGE----- >>>> Hash: SHA1 >>>> >>>> A "Smart Playlist" is nothing more than fetching data from the >>>> Core Data store with some defined search predicate. >>>> >>>> Add a fetch request, and enter the search predicate you would like. >>>> >>>> "Smart playlists" is one of the best reasons to use Core Data, >>>> have fun :) >>>> >>>> Cheers, >>>> >>>> - -R. Tyler Ballance >>>> >>>> On Feb 1, 2006, at 9:49 AM, Christiaan Hofman wrote: >>>> >>>>> Hi, >>>>> >>>>> Does anyone know how to create something like a Smart Playlist >>>>> in Core data, i.e. a fetched property that is automatically >>>>> updated? >>>>> >>>>> And perhaps a related question: is there a way to get a core >>>>> data 'fetched property' (?) that contains all the >>>>> managedObjects for a particular entity name? I found that if >>>>> you bind a NSArrayController to a managedObjectContext setting >>>>> a particular entity, so in a sense the contentSet of the >>>>> arrayController can do this, but this may depend on private >>>>> functionality. Or is there something in the >>>>> NSManagedObjectContent I can observe (unfortunately the >>>>> registered objects can not be observed). >>>>> >>>>> Thanks, >>>>> Christiaan >>>>> >>>>> _______________________________________________ >>>>> MacOSX-dev mailing list >>>>> MacOSX-dev@omnigroup.com >>>>> http://www.omnigroup.com/mailman/listinfo/macosx-dev >>>>> >>>>> >>>> >>>> -----BEGIN PGP SIGNATURE----- >>>> Version: GnuPG v1.4.1 (Darwin) >>>> >>>> iD8DBQFD4PmXqO6nEJfroRsRAqLbAJ9TqUkTkQq1pv3+1JzLltUwb9KSCgCfewCn >>>> +CTwuxlmTWNLldYlZs0H+2E= >>>> =GeID >>>> -----END PGP SIGNATURE----- >>> >>> >>> >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.1 (Darwin) >> >> iD8DBQFD4PwaqO6nEJfroRsRAs/wAJ43caRB8ZJV7u9zdyK7+aMjrYtkRACfcjXT >> NvhlF12wRfEFa6SfB1y7WJA= >> =KMnR >> -----END PGP SIGNATURE----- > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From jim.correia at pobox.com Wed Feb 1 17:58:44 2006 From: jim.correia at pobox.com (Jim Correia) Date: Wed Feb 1 18:44:12 2006 Subject: Binding varying content In-Reply-To: <617C3930-5F70-4653-8E5F-D2707CED841B@weizmann.ac.il> References: <617C3930-5F70-4653-8E5F-D2707CED841B@weizmann.ac.il> Message-ID: <1CAD57EF-4F0D-4879-B6CD-85387615DEB0@pobox.com> On Feb 1, 2006, at 10:34 AM, Christiaan Hofman wrote: > We are developing an app that can display in one window the content > of a varying source (concretely, a source is just a set of > NSManagedObjects). The different sources however can contain > varying types (entitites) of items. So we have different views for > the display of the different items, with a corresponding controller > objects. When the source changes, we swap in a view that can > display the items in the new source. > > Now we want to use binding to observe the source. (BTW, the source > is selected in a separate tableView). Simply bind or observe the > change of the source gives problems, as then the source is changed > before the proper view is swapped in, and the old view will give > undefined key exceptions. Chrstiaan, You need to use more than one controller. The secondary controllers have their content either populated by hand after observing the changes in the primary controller and ensuring that the content is of the right type. (Alternatively, you could probably do this with bindings and an appropriate value transformer, forging the "by hand" part.) Jim From newslists at autonomy.caltech.edu Wed Feb 1 11:33:25 2006 From: newslists at autonomy.caltech.edu (Roland Torres) Date: Wed Feb 1 19:25:28 2006 Subject: Images from digital camera & NSImage -size Message-ID: <3CB8BCF0-30A5-4052-8CE7-EE8C457D3881@autonomy.caltech.edu> I'm reading in JPG images taken by a 5MP digital camera, using NSImage -initWithContentsOfFile: and then -size to obtain the size. This works for all image files *not* taken by this camera, however, I'm finding that the sizes reported for the images from this camera are simply WRONG. The camera images are 2576 x 1932, yet NSImage -size always returns an NSSize struct saying they're 806 x 604, without exception. GraphicConverter and even the Finder correctly report the size as 2576 x 1932. So why can't NSImage? Is there another way to obtain the size? How does the Finder do it? Roland OSX 10.4.4, Xcode 2.2, ObjC gcc 4.0 From ahknight at gmail.com Wed Feb 1 10:55:12 2006 From: ahknight at gmail.com (Adam Knight) Date: Wed Feb 1 19:33:07 2006 Subject: Binding varying content In-Reply-To: <617C3930-5F70-4653-8E5F-D2707CED841B@weizmann.ac.il> References: <617C3930-5F70-4653-8E5F-D2707CED841B@weizmann.ac.il> Message-ID: <103a6e650602011055r2f762fd7q4c5087d2096c7878@mail.gmail.com> Observe selectedIndex on the table's array controller and do your magic in there. On 2/1/06, Christiaan Hofman wrote: > Hi all, > > We are developing an app that can display in one window the content > of a varying source (concretely, a source is just a set of > NSManagedObjects). The different sources however can contain varying > types (entitites) of items. So we have different views for the > display of the different items, with a corresponding controller > objects. When the source changes, we swap in a view that can display > the items in the new source. > > Now we want to use binding to observe the source. (BTW, the source is > selected in a separate tableView). Simply bind or observe the change > of the source gives problems, as then the source is changed before > the proper view is swapped in, and the old view will give undefined > key exceptions. Unfortunately there is no willChangeValueForKey > observation, where we could unbind the old view. > > Does anyone have an idea of how to solve this problem? > > Christiaan > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > -- Adam From john at positivespinmedia.com Wed Feb 1 19:57:22 2006 From: john at positivespinmedia.com (John Pannell) Date: Wed Feb 1 19:57:37 2006 Subject: Images from digital camera & NSImage -size In-Reply-To: <3CB8BCF0-30A5-4052-8CE7-EE8C457D3881@autonomy.caltech.edu> References: <3CB8BCF0-30A5-4052-8CE7-EE8C457D3881@autonomy.caltech.edu> Message-ID: <3E3E926B-4C9D-483C-8A91-9B90C336F768@positivespinmedia.com> Hi Roland- To busy to find a code snippet, but the short of it is you need to query the underlying NSBitmapImageRep for the actual size in pixels. Search the archives for "size" and "NSBitmapImageRep" for more info. http://www.cocoabuilder.com/archive/bydate HTH! John On Feb 1, 2006, at 12:33 PM, Roland Torres wrote: > I'm reading in JPG images taken by a 5MP digital camera, using > NSImage -initWithContentsOfFile: and then -size to obtain the size. > This works for all image files *not* taken by this camera, however, > I'm finding that the sizes reported for the images from this camera > are simply WRONG. > > The camera images are 2576 x 1932, yet NSImage -size always returns > an NSSize struct saying they're 806 x 604, without exception. > GraphicConverter and even the Finder correctly report the size as > 2576 x 1932. So why can't NSImage? Is there another way to obtain > the size? How does the Finder do it? > > Roland > > OSX 10.4.4, Xcode 2.2, ObjC gcc 4.0 > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From glennz at z-sys.com Wed Feb 1 19:54:26 2006 From: glennz at z-sys.com (Glenn Zelniker) Date: Wed Feb 1 20:01:12 2006 Subject: Images from digital camera & NSImage -size In-Reply-To: <3CB8BCF0-30A5-4052-8CE7-EE8C457D3881@autonomy.caltech.edu> References: <3CB8BCF0-30A5-4052-8CE7-EE8C457D3881@autonomy.caltech.edu> Message-ID: <635971E0-3FA0-4D07-B9E3-CE8432D04D69@z-sys.com> On Feb 1, 2006, at 2:33 PM, Roland Torres wrote: > I'm reading in JPG images taken by a 5MP digital camera, using > NSImage -initWithContentsOfFile: and then -size to obtain the size. > This works for all image files *not* taken by this camera, however, > I'm finding that the sizes reported for the images from this camera > are simply WRONG. > > The camera images are 2576 x 1932, yet NSImage -size always returns > an NSSize struct saying they're 806 x 604, without exception. > GraphicConverter and even the Finder correctly report the size as > 2576 x 1932. So why can't NSImage? Is there another way to obtain > the size? How does the Finder do it? After you create the NSImage with -initWithContentsOfFile, you will have at least one underlying NSImageRep, which you can get by looking at the array returned by NSImage's -representations method. Then do - pixelsWide and -pixelsHigh on the NSImageRep. You should see your 2576x1932 dimensions at this point. GZ From ssudre at intego.com Wed Feb 1 10:12:41 2006 From: ssudre at intego.com (Stephane Sudre) Date: Wed Feb 1 20:20:43 2006 Subject: how to disable "replace" alert in NSSavePanel In-Reply-To: <20060125160516.CB5E.SHOOCHO@gmail.com> References: <20060125160516.CB5E.SHOOCHO@gmail.com> Message-ID: <9725426728136390784d88f7a0996ceb@intego.com> On 25 janv. 06, at 09:14, Shoo Cho wrote: > Hello, list, > > When I use NSSavePanel to ask user to save the file, if the file name > which user inputted is existed in file system already, NSSavePanel will > alert user Replace the existed file or Cancel. > > So, my question is how can I disable this alert box, so that when the > file is already existed in file system, NSSavePanel will always replace > the existing file without an alert box. > > Can anyone give me a hint? Thank you in advance. Possible solution I didn't test: 1) Create a category for NSSavePanel 2? Declare and implement: - (BOOL)_overwriteExistingFileCheck:(id)fp8; 3) Return NO From me at JonathonMah.com Wed Feb 1 16:46:20 2006 From: me at JonathonMah.com (Jonathon Mah) Date: Wed Feb 1 20:46:59 2006 Subject: Smart playlists in core data In-Reply-To: References: Message-ID: <035132CF-C0DE-4E65-A0CE-0E56A7D866A9@JonathonMah.com> Hi Christiaan, On 2006-02-02, at 02:19, Christiaan Hofman wrote: > Does anyone know how to create something like a Smart Playlist in > Core data, i.e. a fetched property that is automatically updated? Take a look at the "Core Recipes" example code. > And perhaps a related question: is there a way to get a core data > 'fetched property' (?) that contains all the managedObjects for a > particular entity name? Make a new fetch request, set its entity, and run it. Without a predicate, it will return all objects for that entity. Jonathon Mah me@JonathonMah.com From ahoesch at smartsoft.de Thu Feb 2 11:08:18 2006 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Thu Feb 2 11:08:59 2006 Subject: Popping up NSComboBox via key stroke Message-ID: <45584771-941F-11DA-B155-003065CCA582@smartsoft.de> Hi all, while editing the text field of a NSComboBox I would like to pop up the combo box (in order to view the items) via a key stroke without needing to click on the arrow with the mouse. I assume teh OPENSTEP spec does not offer/include this feature. Where would I hook this in? Ctrl-Space might be a good stroke for this but I don't know which keyDown: method I have to overwrite for this Any ideas? Thanks a lot! Regards, Andreas From jim.correia at pobox.com Thu Feb 2 11:44:34 2006 From: jim.correia at pobox.com (Jim Correia) Date: Thu Feb 2 11:44:46 2006 Subject: Popping up NSComboBox via key stroke In-Reply-To: <45584771-941F-11DA-B155-003065CCA582@smartsoft.de> References: <45584771-941F-11DA-B155-003065CCA582@smartsoft.de> Message-ID: <8BDE4570-18B1-4994-B132-CA1B2D496380@pobox.com> On Feb 2, 2006, at 2:08 PM, Andreas H?schler wrote: > while editing the text field of a NSComboBox I would like to pop up > the combo box (in order to view the items) via a key stroke without > needing to click on the arrow with the mouse. I assume teh OPENSTEP > spec does not offer/include this feature. Where would I hook this in? Down-arrow already does that on 10.4.x. (Not sure about earlier OS releases.) Jim From laptop at ghosttiger.com Thu Feb 2 12:15:48 2006 From: laptop at ghosttiger.com (Jonathan Grynspan) Date: Thu Feb 2 12:15:55 2006 Subject: Popping up NSComboBox via key stroke In-Reply-To: <8BDE4570-18B1-4994-B132-CA1B2D496380@pobox.com> References: <45584771-941F-11DA-B155-003065CCA582@smartsoft.de> <8BDE4570-18B1-4994-B132-CA1B2D496380@pobox.com> Message-ID: On 2-Feb-06, at 2:44 PM, Jim Correia wrote: > On Feb 2, 2006, at 2:08 PM, Andreas H?schler wrote: > >> while editing the text field of a NSComboBox I would like to pop >> up the combo box (in order to view the items) via a key stroke >> without needing to click on the arrow with the mouse. I assume teh >> OPENSTEP spec does not offer/include this feature. Where would I >> hook this in? > > Down-arrow already does that on 10.4.x. (Not sure about earlier OS > releases.) I remember being able to do that on 10.2 and 10.3 as well, but it could just be I have a bad memory. In response to Mr. H?schler's question, however: the first way that comes to mind is to have the control's class implement -keyDown:, find the one for the key combo you want to use, and send -keyDown: to super with a modified NSEvent object, whose characters field is equal to NSDownArrowFunctionKey. I have no idea if that would actually work, not having tested it, but I don't see why not. It's quick and dirty, and I wouldn't generally recommend doing it since it's probably not the keyboard behaviour the user expects. -Jonathan Grynspan From slehman2 at yahoo.com Thu Feb 2 13:33:22 2006 From: slehman2 at yahoo.com (Scott Lehman) Date: Thu Feb 2 13:33:31 2006 Subject: Simple IB question... Message-ID: <20060202213322.65346.qmail@web33211.mail.mud.yahoo.com> OK, I've been away from Cocoa programming for quite a while now, and I must have forgotten some basics of IB! I have a Window with an NSTextView and a button. I control-drag from the button to the NSTextView. What determines which actions are listed in the inspector? I was pretty sure it would show all NSTextView methods that took a single argument of typeid and returned void. But there are numerous functions in NSTextView.h fitting that description not shown in the inspector. For example alignJustified: is not shown. (some, butnot all, the missing actions do show when I drag to the First Responder though) What am I missing? Just some special workings of the text system? Thanks, __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jalkut at red-sweater.com Thu Feb 2 15:20:55 2006 From: jalkut at red-sweater.com (Daniel Jalkut) Date: Thu Feb 2 15:21:02 2006 Subject: Simple IB question... In-Reply-To: <20060202213322.65346.qmail@web33211.mail.mud.yahoo.com> References: <20060202213322.65346.qmail@web33211.mail.mud.yahoo.com> Message-ID: On Feb 2, 2006, at 4:33 PM, Scott Lehman wrote: > OK, I've been away from Cocoa programming for quite a > while now, and I must have forgotten some basics of > IB! Welcome back! > I have a Window with an NSTextView and a button. I > control-drag from the button to the NSTextView. What > determines which actions are listed in the inspector? While I'm no expert - I can offer some info to tide you over until more knowledgeable folks get a chance to chime in. Here are some factors (facts?) for you to consider: 1. Interface Builder's conception of what actions (and outlets) a particular class exposes is separate from the header-files (though it may be "taught" by dragging a header into a Nib's main window). 2. The list of actions that appear for a particular target class is a combination of "built-in" actions that IB already knew about through magic mojo (doesn't matter to us), and a list of actions that IB knows about because you told it about them. 3. You can tell IB about class actions by manually adding them from the "Classes" inspector for any class. 4. You can tell IB about class actions by dragging a header file with appropriately tagged "-(IBAction)" methods inside it. 5. By no means does IB do anything like scanning a header file for all methods of single argument of a particular type. > I was pretty sure it would show all NSTextView methods > that took a single argument of typeid and returned > void. But there are numerous functions in NSTextView.h > fitting that description not shown in the inspector. > For example alignJustified: is not shown. (some, > butnot all, the missing actions do show when I drag to > the First Responder though) Chalk this up to "magic mojo" that we can't control, I think. > What am I missing? Just some special workings of the > text system? More like special workings of the IB system. Bottom line? Just manually add an action if you know it's guaranteed to be implemented in the target object and conforms to the target-action paradigm. Daniel From jalkut at red-sweater.com Thu Feb 2 15:27:22 2006 From: jalkut at red-sweater.com (Daniel Jalkut) Date: Thu Feb 2 15:27:28 2006 Subject: Simple IB question... In-Reply-To: References: <20060202213322.65346.qmail@web33211.mail.mud.yahoo.com> Message-ID: Caveat: I don't think this "teaching by dragging" will work with, for instance, "NSText.h" because the action methods are not tagged with "(IBAction)". On Feb 2, 2006, at 6:20 PM, Daniel Jalkut wrote: > 1. Interface Builder's conception of what actions (and outlets) a > particular class exposes is separate from the header-files (though > it may be "taught" by dragging a header into a Nib's main window). From slehman2 at yahoo.com Thu Feb 2 15:56:41 2006 From: slehman2 at yahoo.com (Scott Lehman) Date: Thu Feb 2 15:56:54 2006 Subject: Simple IB question... In-Reply-To: Message-ID: <20060202235641.76031.qmail@web33203.mail.mud.yahoo.com> I tried dragging in NSTextView.h and the missing methods I was expecting to see then show up (even without the IBAction macro to my suprise - I know if just evaluates to void, but I thought the whole point of IBAction was that it's required for IB to intepret the method as an action method. Guess the method signature is all the matters.) So problem solved, though it has to be repeated for each nib file it seems. It just doesn't seem right for Apple's tools to require the extra step when using AppKit classes. Maybe I just have an outdated class cache in IB? Thanks, Scott --- Daniel Jalkut wrote: > Caveat: I don't think this "teaching by dragging" > will work with, for > instance, "NSText.h" because the action methods are > not tagged with > "(IBAction)". > > On Feb 2, 2006, at 6:20 PM, Daniel Jalkut wrote: > > > 1. Interface Builder's conception of what actions > (and outlets) a > > particular class exposes is separate from the > header-files (though > > it may be "taught" by dragging a header into a > Nib's main window). > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From shawnce at gmail.com Thu Feb 2 18:21:59 2006 From: shawnce at gmail.com (Shawn Erickson) Date: Thu Feb 2 18:22:03 2006 Subject: Simple IB question... In-Reply-To: <20060202235641.76031.qmail@web33203.mail.mud.yahoo.com> References: <20060202235641.76031.qmail@web33203.mail.mud.yahoo.com> Message-ID: On 2/2/06, Scott Lehman wrote: > So problem solved, though it has to be repeated for > each nib file it seems. It just doesn't seem right > for Apple's tools to require the extra step when using > AppKit classes. Maybe I just have an outdated class > cache in IB? File a defect (http://developer.apple.com/bugreporter/) about it. Inside of IB's application bundle are various files that list the set of actions a classes support, well at least for the OS provided frameworks. -Shawn From georg.seifert at gmx.de Fri Feb 3 01:06:28 2006 From: georg.seifert at gmx.de (Georg Seifert) Date: Fri Feb 3 01:06:40 2006 Subject: looking for co-programmer Message-ID: Hello, I?m a graphic design student and heavy MacOSX user, having smaller experience in Cocoa developing. But I have some smaller, but rather interesting projects in my mind. Is about file-sharing over LAN. The main interest is in simplicity of setup and use. Is anybody interested in a cooperation? This includes elaborating the concept, design, coding and marketing. I only can offer share of the earnings. any answer is welcome Georg Seifert ::::::::::::::::::::::::::: Georg Seifert Schriftgestaltung und Gebrauchsgrafik www.reets.de www.schriftgestaltung.de From John.Clayton at ubs.com Fri Feb 3 02:00:50 2006 From: John.Clayton at ubs.com (John.Clayton@ubs.com) Date: Fri Feb 3 02:17:16 2006 Subject: looking for co-programmer Message-ID: Hi, I'd be interested in having a chat with you - all my contact details (and protected email address) can be found on http://symbolexplorer.tryrabbit.com/ I look forward to hearing from you. John Clayton Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. From andy at hexten.net Fri Feb 3 02:20:14 2006 From: andy at hexten.net (Andy Armstrong) Date: Fri Feb 3 02:20:23 2006 Subject: looking for co-programmer In-Reply-To: References: Message-ID: On 3 Feb 2006, at 10:00, John.Clayton@ubs.com wrote: > Hi, > > I'd be interested in having a chat with you - all my contact details > (and protected email address) can be found on > http://symbolexplorer.tryrabbit.com/ > > I look forward to hearing from you. So is the email address ^ up there not you? :) -- Andy Armstrong, hexten.net From david_allouch at mac.com Fri Feb 3 05:44:44 2006 From: david_allouch at mac.com (David Allouch) Date: Fri Feb 3 05:44:49 2006 Subject: LDAP framework Message-ID: Greetings, About the LDAP framework. I have to authenticate my app in front of a Microsoft LDAP server and am a little confused about it. I only need to authenticate, don?t want to add anything, or do anything nasty. Before I start coding my own lib, I was wondering if anyone got the LDAP framework to work. I tried to dump it to get the headers without any success. Any sample or direction would be more than welcome. D. | David Allouch | * david_allouch[at]mac.com | Benjamin Franklin said, "Up sluggard and waste not life; In the grave will be sleeping enough.? From mickeyroberson at mac.com Fri Feb 3 07:06:29 2006 From: mickeyroberson at mac.com (Mickey Roberson) Date: Fri Feb 3 07:06:31 2006 Subject: File Extensions UTI Problems Message-ID: <71279.1138979189398.JavaMail.mickeyroberson@mac.com> I have recently written a Viewer and a Spotlight Plugin for a filetype that I work with frequently. These files have two possible file extensions: MICK and MCK. In both my viewer and mdimporter Info.plists I have added both these extensions as well as the UTI I wanted to apply to them: "com.mycompany.mick". I have two accounts on my machine; one for work and one for home. On my home account the Spotlight Plugin correctly indexes both MICK and MCK files. On my work account the Spotlight Plugin only indexes MICK files. When I run the following commands on my home account: /usr/bin/mdimport -d2 myfile.mick and /usr/bin/mdimport -d2 myfile.mck they both return the type 'com.mycompany.mick' as it should be and that kMDItemKind = {"" = MICK; }; However, on my work account running the same two commands returns the correct type for MICK files, but not MCK files. MCK files return 'dyn.ah62d4rv4ge8067dg' no mdimporter. It claims that both are kMDItemKind = {"" = MICK; }; just as in my home account. So, it appears that in my home account MICK and MCK files have both correctly received the 'com.mycompany.mick' UTI and my work account has only associated the MICK files to the UTI. Doing the same tests on a colleague's machine yields the same result as my work account (ie - the wrong result). My question, therefore, is how do I associate both MICK and MCK files with my UTI? Somehow it occurred on my home account, but I do not know how. -Mickey Roberson From tjw at omnigroup.com Fri Feb 3 08:24:29 2006 From: tjw at omnigroup.com (Timothy J. Wood) Date: Fri Feb 3 08:24:33 2006 Subject: File Extensions UTI Problems In-Reply-To: <71279.1138979189398.JavaMail.mickeyroberson@mac.com> References: <71279.1138979189398.JavaMail.mickeyroberson@mac.com> Message-ID: <89087BAD-75F7-4F76-B2BB-B802A26C4CE9@omnigroup.com> On Feb 3, 2006, at 7:06 AM, Mickey Roberson wrote: > However, on my work account running the same two commands returns > the correct type for MICK files, but not MCK files. MCK files > return 'dyn.ah62d4rv4ge8067dg' no mdimporter. Run 'mdimport -L' to get a list of importers that are currently being used and make sure that the correct version of yours shows up. If there are multiple copies of your importer available on your work machine (possibly one on a /Network drive), mds may be picking an older version or such. -tim From mickeyroberson at mac.com Fri Feb 3 09:50:13 2006 From: mickeyroberson at mac.com (Mickey Roberson) Date: Fri Feb 3 09:50:16 2006 Subject: File Extensions UTI Problems In-Reply-To: <89087BAD-75F7-4F76-B2BB-B802A26C4CE9@omnigroup.com> References: <71279.1138979189398.JavaMail.mickeyroberson@mac.com> <89087BAD-75F7-4F76-B2BB-B802A26C4CE9@omnigroup.com> Message-ID: <6074237.1138989013202.JavaMail.mickeyroberson@mac.com> > >On Feb 3, 2006, at 7:06 AM, Mickey Roberson wrote: >> However, on my work account running the same two commands returns >> the correct type for MICK files, but not MCK files. MCK files >> return 'dyn.ah62d4rv4ge8067dg' no mdimporter. > > Run 'mdimport -L' to get a list of importers that are currently >being used and make sure that the correct version of yours shows up. >If there are multiple copies of your importer available on your work >machine (possibly one on a /Network drive), mds may be picking an >older version or such. > >-tim > > > Running mdimport -L returns the correct mdimporter, which I have in ~/Library/Spotlight. From mickeyroberson at mac.com Fri Feb 3 11:43:56 2006 From: mickeyroberson at mac.com (Mickey Roberson) Date: Fri Feb 3 11:43:59 2006 Subject: File Extensions UTI Problems In-Reply-To: <71279.1138979189398.JavaMail.mickeyroberson@mac.com> References: <71279.1138979189398.JavaMail.mickeyroberson@mac.com> Message-ID: <16417543.1138995836556.JavaMail.mickeyroberson@mac.com> >I have recently written a Viewer and a Spotlight Plugin for a filetype that I work with frequently. These files have two possible file extensions: MICK and MCK. In both my viewer and mdimporter Info.plists I have added both these extensions as well as the UTI I wanted to apply to them: "com.mycompany.mick". > >I have two accounts on my machine; one for work and one for home. On my home account the Spotlight Plugin correctly indexes both MICK and MCK files. On my work account the Spotlight Plugin only indexes MICK files. > >When I run the following commands on my home account: > >/usr/bin/mdimport -d2 myfile.mick > >and > >/usr/bin/mdimport -d2 myfile.mck > >they both return the type 'com.mycompany.mick' as it should be and that kMDItemKind = {"" = MICK; }; >However, on my work account running the same two commands returns the correct type for MICK files, but not MCK files. MCK files return 'dyn.ah62d4rv4ge8067dg' no mdimporter. >It claims that both are kMDItemKind = {"" = MICK; }; just as in my home account. >So, it appears that in my home account MICK and MCK files have both correctly received the 'com.mycompany.mick' UTI and my work account has only associated the MICK files to the UTI. >Doing the same tests on a colleague's machine yields the same result as my work account (ie - the wrong result). >My question, therefore, is how do I associate both MICK and MCK files with my UTI? Somehow it occurred on my home account, but I do not know how. > I have solved my own problem, and am posting the solution for others who may encounter this. The problem was that LaunchServices had associated MCK and MICK with dozens of apps(many of which didn't even exist anymore). Each time I made and ran a version of my app from a different location, it was included in the launch services database. So some other version of an app was claiming MCK as a different UTI, and not allowing my new app and spotlight plugin to claim it. I found a command that wipes out the LaunchServices database and builds it fresh from apps currently on your computer. This in turn corrected my spotlighting UTI problems. The command is: /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain system -domain user To see what is currently registered in the database you can run: /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump | less From knarf at mac.com Fri Feb 3 12:20:12 2006 From: knarf at mac.com (Frank Midgley) Date: Fri Feb 3 12:20:18 2006 Subject: Images from digital camera & NSImage -size In-Reply-To: <635971E0-3FA0-4D07-B9E3-CE8432D04D69@z-sys.com> References: <3CB8BCF0-30A5-4052-8CE7-EE8C457D3881@autonomy.caltech.edu> <635971E0-3FA0-4D07-B9E3-CE8432D04D69@z-sys.com> Message-ID: <2519C60C-AD7F-46AA-B022-4E34A53F98C3@mac.com> On Feb 1, 2006, at 9:54PM, Glenn Zelniker wrote: > On Feb 1, 2006, at 2:33 PM, Roland Torres wrote: > >> I'm reading in JPG images taken by a 5MP digital camera, using >> NSImage -initWithContentsOfFile: and then -size to obtain the >> size. This works for all image files *not* taken by this camera, >> however, I'm finding that the sizes reported for the images from >> this camera are simply WRONG. >> >> The camera images are 2576 x 1932, yet NSImage -size always >> returns an NSSize struct saying they're 806 x 604, without >> exception. GraphicConverter and even the Finder correctly report >> the size as 2576 x 1932. So why can't NSImage? Is there another >> way to obtain the size? How does the Finder do it? > > After you create the NSImage with -initWithContentsOfFile, you will > have at least one underlying NSImageRep, which you can get by > looking at the array returned by NSImage's -representations method. > Then do -pixelsWide and -pixelsHigh on the NSImageRep. You should > see your 2576x1932 dimensions at this point. And the difference between the two (-pixelsWide and -size) tells you the resolution/DPI of the image. -Frank ------------------------------------ Frank M. Midgley knarf@mac.com http://homepage.mac.com/knarf/ From gweston at mac.com Fri Feb 3 14:38:28 2006 From: gweston at mac.com (Gregory Weston) Date: Fri Feb 3 14:38:33 2006 Subject: Newer iTunes SDK or modern visualizer source? Message-ID: <20F18D6D-5046-4EE8-87F4-AE7E7C5852B0@mac.com> As far as I can tell, the iTunes/Mac SDK available from Apple is quite a bit out of date, lacking several useful things from the Windows SDK and containing both headers and sample code that really aren't happy linking against the 10.4U SDK. I'm hoping someone can point me toward some more up-to-date resources or sample code. Even something trivial, like filling the visualizer display with black without using half a dozen deprecated routines would be nice. Any help? From ahoesch at smartsoft.de Fri Feb 3 15:38:01 2006 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Fri Feb 3 15:38:20 2006 Subject: NSButton in view loop question Message-ID: <1D0CA11A-950E-11DA-8CEC-003065CCA582@smartsoft.de> Hello, I want to create a user interface that allows the user to trigger button action with they keyboard. I have the following view loop. -> NSTextField --> NSComboBox --> GSButton -- <--------------------------------------------------------------< setup with setNextKeyView:. GSButton is a subclass of NSButton with - (BOOL)acceptsFirstResponder { return YES; } - (BOOL)becomeFirstResponder { return YES; } But the button never gets first responder status when I tab through the view loop!? I want the user to be able to tab from the combo box to the button and then press return to trigger the action. What am I missing? Thanks! Regards, Andreas From helge.hess at skyrix.com Fri Feb 3 16:53:10 2006 From: helge.hess at skyrix.com (Helge Hess) Date: Fri Feb 3 16:54:15 2006 Subject: LDAP framework In-Reply-To: References: Message-ID: <98A43527-B863-4B81-8EF6-8C5B5925F270@skyrix.com> On 3. Feb 2006, at 14:44 Uhr, David Allouch wrote: > I have to authenticate my app in front of a Microsoft LDAP server > and am a > little confused about it. > I only need to authenticate, don?t want to add anything, or do > anything > nasty. > > Before I start coding my own lib You might consider trying sope-ldap: http://svn.opengroupware.org/SOPE/trunk/sope-ldap/NGLdap/ We use it to authenticate against ActiveDirectory. Greets, Helge From christiaan.hofman at weizmann.ac.il Fri Feb 3 16:58:48 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Fri Feb 3 16:58:57 2006 Subject: NSButton in view loop question In-Reply-To: <1D0CA11A-950E-11DA-8CEC-003065CCA582@smartsoft.de> References: <1D0CA11A-950E-11DA-8CEC-003065CCA582@smartsoft.de> Message-ID: <34D0AFED-B00F-4E4F-8C36-D8063F5CD5E2@weizmann.ac.il> I had a similar problem with a custom NSButton subclass. I found that setting the bezelstyle solved it (even if that setting would be irrelevant to your subclass). Christiaan On 4 Feb 2006, at 1:38 AM, Andreas H?schler wrote: > Hello, > > I want to create a user interface that allows the user to trigger > button action with they keyboard. I have the following view loop. > > -> NSTextField --> NSComboBox --> GSButton -- > <--------------------------------------------------------------< > > setup with setNextKeyView:. GSButton is a subclass of NSButton with > > - (BOOL)acceptsFirstResponder > { > return YES; > } > > - (BOOL)becomeFirstResponder > { > return YES; > } > > But the button never gets first responder status when I tab through > the view loop!? I want the user to be able to tab from the combo > box to the button and then press return to trigger the action. What > am I missing? > > Thanks! > > Regards, > > Andreas > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From dunham at mac.com Fri Feb 3 21:14:55 2006 From: dunham at mac.com (David Dunham) Date: Fri Feb 3 21:15:03 2006 Subject: QuickDraw font number -> NSFont Message-ID: <115A0FF5-A419-45DF-9087-21840FD4907A@mac.com> I'm trying to read a legacy file that uses QuickDraw fonts (ID, face, and size). This will be used to construct a Cocoa NSAttributedString. My initial pass at this is Str255 qdName; GetFontName(bFont, qdName); NSString* fontName = [NSString stringWithCString: &qdName[1] length: qdName[0]]; NSFont* baseFont = [NSFont fontWithName: fontName size: bSize]; but this doesn't work for all QuickDraw fonts (seems to fail with Optima), let alone ignoring the face (bold, italic, etc.). I've tried googling, and haven't found anything that converts QuickDraw style info to Cocoa. David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From adam.q.salter at gmail.com Sat Feb 4 03:42:20 2006 From: adam.q.salter at gmail.com (Adam Salter) Date: Sat Feb 4 03:42:29 2006 Subject: Can't add framework to application... Message-ID: This is going to sound really stupid, but I'm trying to build my application and getting header file not found error for a framework. This used to work just fine until I upgraded to xCode 2.2, so I'm hoping it's not just me. I've found some similar experiences here: http://www.cocoabuilder.com/archive/message/xcode/2005/11/15/1131 and here... http://www.cocoabuilder.com/archive/message/xcode/2005/10/31/631 One person's fix was to rebuild their entire HD... I'm hoping this is not the only solution. Has anyone else come across this and did you find a fix? I'm pretty sure I'm referencing everything correctly. The frame work in question is AGProcess from: http://sourceforge.net/projects/agkit I've built the framework and then tried to reference it by: #import /Users/adam/Development/Applications/TestApp/GLProcess.h:10:32: error: AGProcess/AGProcess.h: No such file or directory Thanks in advance, Adam From drh at firethorne.com Sat Feb 4 13:08:02 2006 From: drh at firethorne.com (David Hill) Date: Sat Feb 4 13:02:10 2006 Subject: Can't add framework to application... In-Reply-To: References: Message-ID: <9E76A453-81C3-436B-8A75-93B45F78D5F8@firethorne.com> Interesting. I just had some very weird problems under Xcode2.2 while developing a fairly complex application -- some similar to what you describe, some where it couldn't find the superclass "NSObject" (or did it strip the "NS", I was in too much of a panic to remember exactly) and at least one of my header files had all the return value declarations neatly stripped from the method declarations. Up till this happened, I had been developing the App quite normally with no problems (except see below). The only thing that might have been involved was that I cleaned up the files in the App under Xcode, deleting some references and copying the original files into the App so all the real files were in the same folder. However, I was very careful to get the correct files by using Get Info on each of the files I was dealing with, and in any case, the "crash" didn't occur till a little while later. I had also noticed some odd things happening that lost files and got confused about the whereabouts of header files a day prior to my house cleaning, but had simply worked from backups and assumed I had had some kind of finger trouble. After the "crash" I uninstalled Xcode, rebooted the system, reinstalled Xcode and clawed my way back to the lost condition of the App from a backup. And, yes, I have all the real files in the same folder now and everything is working normally and apparently reliably again. Hope this may prod someone else's memory and maybe, if there's a serious problem, we can get it fixed. And yes, I too thought I must be at fault. david ------------- David Hill ------------- On Feb 4, 2006, at 3:42 AM, Adam Salter wrote: > > This is going to sound really stupid, but I'm trying to build my > application and getting header file not found error for a > framework. This used to work just fine until I upgraded to xCode > 2.2, so I'm hoping it's not just me. > > I've found some similar experiences here: > http://www.cocoabuilder.com/archive/message/xcode/2005/11/15/1131 > and here... > http://www.cocoabuilder.com/archive/message/xcode/2005/10/31/631 > > One person's fix was to rebuild their entire HD... I'm hoping this > is not the only solution. > > Has anyone else come across this and did you find a fix? > > I'm pretty sure I'm referencing everything correctly. The frame > work in question is AGProcess from: > http://sourceforge.net/projects/agkit > > I've built the framework and then tried to reference it by: > #import > > /Users/adam/Development/Applications/TestApp/GLProcess.h:10:32: > error: AGProcess/AGProcess.h: No such file or directory > > Thanks in advance, > Adam > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From geowar at apple.com Sat Feb 4 13:15:59 2006 From: geowar at apple.com (George Warner) Date: Sat Feb 4 13:16:03 2006 Subject: Newer iTunes SDK or modern visualizer source? Message-ID: On Fri, 3 Feb 2006 17:38:28 -0500, Gregory Weston wrote: > As far as I can tell, the iTunes/Mac SDK available from Apple is > quite a bit out of date, lacking several useful things from the > Windows SDK and containing both headers and sample code that really > aren't happy linking against the 10.4U SDK. I'm hoping someone can > point me toward some more up-to-date resources or sample code. Even > something trivial, like filling the visualizer display with black > without using half a dozen deprecated routines would be nice. Any help? I wrote that code in June 2001 (and never looked back). I don't know anything about the Windows SDK. I definitely remember using a lot of what's now depreciated functions (QuickDraw). I know Quartz better now than I did back then and could probably easily re-implement it without the depreciated functions. Now if I only had time... There's probably a way to get a CGContext instead of a CGPort... hummm... -- Enjoy, George Warner, Schizophrenic Optimization Scientist Apple Developer Technical Support (DTS) From gweston at mac.com Sat Feb 4 14:22:58 2006 From: gweston at mac.com (Gregory Weston) Date: Sat Feb 4 14:23:05 2006 Subject: Newer iTunes SDK or modern visualizer source? In-Reply-To: References: Message-ID: On Feb 4, 2006, at 4:15 PM, George Warner wrote: > On Fri, 3 Feb 2006 17:38:28 -0500, Gregory Weston > wrote: > >> I'm hoping someone can point me toward some more up-to-date resources >> or sample code [for an iTunes visualizer plugin]. Even >> something trivial, like filling the visualizer display with black >> without using half a dozen deprecated routines would be nice. Any >> help? > > I wrote that code in June 2001 (and never looked back). I don't know > anything about the Windows SDK. I definitely remember using a lot > of what's > now depreciated functions (QuickDraw). I know Quartz better now > than I did > back then and could probably easily re-implement it without the > depreciated > functions. > > Now if I only had time... > > There's probably a way to get a CGContext instead of a CGPort... > hummm... Actually getting a CGContext _from_ the CGrafPtr is fairly easy (although I wouldn't make a bet on how long until that's also officially discouraged). The part that was giving me problems was transforming the rectangle that's given into the new coordinate space. It's not just a vertical flip and finding the bounds of the CGrafPort is another deprecated call. G From geowar at apple.com Sat Feb 4 14:40:05 2006 From: geowar at apple.com (George Warner) Date: Sat Feb 4 14:40:07 2006 Subject: Newer iTunes SDK or modern visualizer source? In-Reply-To: Message-ID: on 2/4/06 2:22 PM, Gregory Weston at wrote: > Actually getting a CGContext _from_ the CGrafPtr is fairly easy > (although I wouldn't make a bet on how long until that's also > officially discouraged). Really? how? CreateCGContextForPort is depreciated. I suppose you could use QDBeginCGContext/ QDEndCGContext... > The part that was giving me problems was > transforming the rectangle that's given into the new coordinate > space. It's not just a vertical flip and finding the bounds of the > CGrafPort is another deprecated call. CGContextGetClipBoundingBox _might_ return the right bounding box of the CGContext... I'll add this to my queue of "things to do": Talk to the iTunes team about updating the Visual PlugIn API's for Quartz. -- Enjoy, George Warner, Schizophrenic Optimization Scientist Apple Developer Technical Support (DTS) From dunham at mac.com Sat Feb 4 23:29:23 2006 From: dunham at mac.com (David Dunham) Date: Sat Feb 4 23:29:33 2006 Subject: Updating color panel Message-ID: My app has a bunch of separate user-selectable objects. I can keep the font panel up to date with the user's selection via [[NSFontManager sharedFontManager] setSelectedFont: firstFont isMultiple: !isContinuous]; How do I do the same for the color panel? (I notice that Pages does this for the color of selected text, if you use View > Show Colors.) David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From eldenlars at yahoo.es Sun Feb 5 05:12:48 2006 From: eldenlars at yahoo.es (Lars Elden) Date: Sun Feb 5 05:19:42 2006 Subject: first steps Message-ID: <20060205131940.8F8C3507572C@machop.omnigroup.com> Hi, I am bran new to cocoa and need to learn it from the command line (terminal window), not using xcode by now. I have compiled this little sample: gcc -Wall -o test test.m -framework Cocoa ./test #import int main( int argc, char *argv[] ) { NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ]; NSApp = [ NSApplication sharedApplication ]; NSRunAlertPanel( @"Apple OSX", @"Hello world!", @"OK",NULL,NULL); [NSApp run]; [NSApp release]; [pool release]; return EXIT_SUCCESS; } but it creates a terminal window when I run it, and behind it there is the alert window. Is my code ok ? How to avoid the terminal window that shows when I run it ? many thanks! Lars ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com From finlay.dobbie at gmail.com Sun Feb 5 05:28:15 2006 From: finlay.dobbie at gmail.com (Finlay Dobbie) Date: Sun Feb 5 05:28:19 2006 Subject: first steps In-Reply-To: <20060205131940.8F8C3507572C@machop.omnigroup.com> References: <20060205131940.8F8C3507572C@machop.omnigroup.com> Message-ID: On 05/02/06, Lars Elden wrote: > Hi, > > I am bran new to cocoa and need to learn it from the command line (terminal > window), not using xcode by now. Why? That's an arbitrary constraint which will make your life harder. > I have compiled this little sample: > > gcc -Wall -o test test.m -framework Cocoa ./test Unbundled GUI apps are not supported. -- Finlay From jim.correia at pobox.com Sun Feb 5 06:24:49 2006 From: jim.correia at pobox.com (Jim Correia) Date: Sun Feb 5 06:25:05 2006 Subject: Updating color panel In-Reply-To: References: Message-ID: <38358AF9-E5DF-4E76-ABDB-50E313585FE5@pobox.com> On Feb 5, 2006, at 2:29 AM, David Dunham wrote: > My app has a bunch of separate user-selectable objects. > > I can keep the font panel up to date with the user's selection via > > [[NSFontManager sharedFontManager] setSelectedFont: firstFont > isMultiple: !isContinuous]; > > How do I do the same for the color panel? I would think using [[NSColorPanel sharedColorPanel] setColor: aColor] when you know you are the color panel target would work. Without a multiple mode you may have to punt or use a fixed color if the selection encompasses more than one color. I don't have Pages, but it doesn't appear that NSTextView attempts to keep the color panel up to date vis a vis the selected text attributes or type attributes. Jim From jalkut at red-sweater.com Sun Feb 5 07:19:42 2006 From: jalkut at red-sweater.com (Daniel Jalkut) Date: Sun Feb 5 07:19:50 2006 Subject: first steps In-Reply-To: <20060205131940.8F8C3507572C@machop.omnigroup.com> References: <20060205131940.8F8C3507572C@machop.omnigroup.com> Message-ID: <7894BA3A-E9F8-461A-A527-9CAF37DBF5B5@red-sweater.com> I just responded to your message on Cocoa-dev. Please pick a mailing list and only mail that one list with any particular message. A lot of us read several of them. Daniel On Feb 5, 2006, at 8:12 AM, Lars Elden wrote: > Hi, > > I am bran new to cocoa and need to learn it from the command line > (terminal > window), not using xcode by now. > > I have compiled this little sample: > > gcc -Wall -o test test.m -framework Cocoa ./test > > #import > > int main( int argc, char *argv[] ) > { > NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ]; > NSApp = [ NSApplication sharedApplication ]; > > NSRunAlertPanel( @"Apple OSX", @"Hello world!", > @"OK",NULL,NULL); > [NSApp run]; > [NSApp release]; > [pool release]; > return EXIT_SUCCESS; > } > > but it creates a terminal window when I run it, and behind it there > is the > alert window. > > Is my code ok ? How to avoid the terminal window that shows when I > run it ? > > many thanks! > > Lars > > > > ______________________________________________ > LLama Gratis a cualquier PC del Mundo. > Llamadas a fijos y m?viles desde 1 c?ntimo por minuto. > http://es.voice.yahoo.com > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From mah at jump-ing.de Sun Feb 5 08:48:28 2006 From: mah at jump-ing.de (Markus Hitter) Date: Sun Feb 5 08:48:45 2006 Subject: first steps In-Reply-To: <20060205131940.8F8C3507572C@machop.omnigroup.com> References: <20060205131940.8F8C3507572C@machop.omnigroup.com> Message-ID: <1636103E-FF96-4FC2-BBC7-9C47FCA6C8C7@jump-ing.de> Am 05.02.2006 um 14:12 schrieb Lars Elden: > gcc -Wall -o test test.m -framework Cocoa ./test Well, that last "./test" should go into it's own line. > Is my code ok ? The easiest way to get such things working ist probably to start out with one of Xcode's templates, build it, run it, looking at the build transscript (build window, click small icon at the bottom to open it) and what got created in the project's "build" folder. You should be able to step backwards from there. Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From dunham at mac.com Sun Feb 5 10:52:05 2006 From: dunham at mac.com (David Dunham) Date: Sun Feb 5 10:52:13 2006 Subject: Updating color panel In-Reply-To: <38358AF9-E5DF-4E76-ABDB-50E313585FE5@pobox.com> References: <38358AF9-E5DF-4E76-ABDB-50E313585FE5@pobox.com> Message-ID: On 5 Feb 2006, at 06:24, Jim Correia wrote: > I would think using > > [[NSColorPanel sharedColorPanel] setColor: aColor] > > when you know you are the color panel target would work. Unlike [[NSFontManager sharedFontManager] setSelectedFont: firstFont isMultiple: !isContinuous]; [[NSColorPanel sharedColorPanel] setColor: firstColor]; will send a changeColor:. I will try temporarily turning off the target. I'm sort of surprised that Cocoa seems to be asymmetric here -- one panel works better than the other, as near as I've been able to figure out. ------------ David Dunham dunham@mac.com http://www.pensee.com/dunham/ "No matter how far you have gone on a wrong road, turn back." - Turkish proverb From joar at joar.com Sun Feb 5 11:13:12 2006 From: joar at joar.com (j o a r) Date: Sun Feb 5 11:13:35 2006 Subject: Updating color panel In-Reply-To: References: <38358AF9-E5DF-4E76-ABDB-50E313585FE5@pobox.com> Message-ID: <7B3D3DA8-85BB-46F2-A9BB-6B0A9F63CB6A@joar.com> On 5 feb 2006, at 19.52, David Dunham wrote: > I'm sort of surprised that Cocoa seems to be asymmetric here -- one > panel works better than the other, as near as I've been able to > figure out. These panels can definitively be a bit awkward. I think the reason that they haven't been improved or replaced is mostly due to a combination of the need to support legacy code, and a lack of enhancement requests. Developers find workarounds and move on. Please file new cases in Radar when you find strange things in Cocoa! j o a r From dunham at mac.com Sun Feb 5 12:24:15 2006 From: dunham at mac.com (David Dunham) Date: Sun Feb 5 12:24:22 2006 Subject: Updating color panel In-Reply-To: <7B3D3DA8-85BB-46F2-A9BB-6B0A9F63CB6A@joar.com> References: <38358AF9-E5DF-4E76-ABDB-50E313585FE5@pobox.com> <7B3D3DA8-85BB-46F2-A9BB-6B0A9F63CB6A@joar.com> Message-ID: <6FBBEF5E-2931-4A65-A110-AD0D479C37B9@mac.com> On 5 Feb 2006, at 11:13, j o a r wrote: >> I'm sort of surprised that Cocoa seems to be asymmetric here -- >> one panel works better than the other, as near as I've been able >> to figure out. > > These panels can definitively be a bit awkward. I think the reason > that they haven't been improved or replaced is mostly due to a > combination of the need to support legacy code, and a lack of > enhancement requests. Developers find workarounds and move on. > Please file new cases in Radar when you find strange things in Cocoa! Good point, though I wasn't sure if it was my own Cocoa inexperience. rdar://4433951. I've tried [[NSColorPanel sharedColorPanel] setAction: nil]; [[NSColorPanel sharedColorPanel] setTarget: nil]; [[NSColorPanel sharedColorPanel] setColor: firstColor]; [[NSColorPanel sharedColorPanel] setAction: @selector(changeColor:)]; [[NSColorPanel sharedColorPanel] setTarget: self]; and the setColor still sends changeColor: (despite the documentation for -[NSColorPanel setAction:]). I note that very few Cocoa applications keep the Color Panel current -- the only one I've seen so far is Pages. David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From eldenlars at yahoo.es Sun Feb 5 15:45:01 2006 From: eldenlars at yahoo.es (Lars Elden) Date: Sun Feb 5 15:51:56 2006 Subject: first steps In-Reply-To: <20060205131940.8F8C3507572C@machop.omnigroup.com> Message-ID: <20060205235154.9FD5750827EC@machop.omnigroup.com> I discovered a bug in my little sample code: > #import > > int main( int argc, char *argv[] ) > { > NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ]; > NSApp = [ NSApplication sharedApplication ]; > > NSRunAlertPanel( @"Apple OSX", @"Hello world!", > @"OK",NULL,NULL); > [NSApp run]; > [NSApp release]; > [pool release]; > return EXIT_SUCCESS; > } [NSApp run] is not needed as there is no any main window defined. Once I remove it, the app properly closes after the Alert dialog. Lars ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com From eldenlars at yahoo.es Sun Feb 5 16:00:08 2006 From: eldenlars at yahoo.es (Lars Elden) Date: Sun Feb 5 16:07:01 2006 Subject: info.plist In-Reply-To: <20060205235154.9FD5750827EC@machop.omnigroup.com> Message-ID: <20060206000658.EF04C5082D1F@machop.omnigroup.com> Is info.plist a kind of "resource" (it looks as xml ascii code) to be attached or compiled into the application ? Is there a "resource compiler" to place such resource into the final application ? In Windows we are used to rc.exe, is there an equivalent in OSX ? Thanks, Lars ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com From finlay.dobbie at gmail.com Sun Feb 5 16:20:24 2006 From: finlay.dobbie at gmail.com (Finlay Dobbie) Date: Sun Feb 5 16:20:27 2006 Subject: info.plist In-Reply-To: <20060206000658.EF04C5082D1F@machop.omnigroup.com> References: <20060205235154.9FD5750827EC@machop.omnigroup.com> <20060206000658.EF04C5082D1F@machop.omnigroup.com> Message-ID: On 06/02/06, Lars Elden wrote: > Is info.plist a kind of "resource" (it looks as xml ascii code) to be > attached or compiled into the application ? Info.plist is a property list. See and > Is there a "resource compiler" to place such resource into the final > application ? Just copy it to the correct place in the application bundle. Xcode will do this automatically for you. Applications on Mac OS X generally consist of a certain hierarchy of directories. They typically contain not only the actual executable file, but also the necessary resource files (including the Info.plist). See . -- Finlay From chad+macosx at objectwerks.com Sun Feb 5 16:22:52 2006 From: chad+macosx at objectwerks.com (Chad Leigh) Date: Sun Feb 5 16:22:56 2006 Subject: first steps In-Reply-To: References: <20060205131940.8F8C3507572C@machop.omnigroup.com> Message-ID: <440F74C5-701B-4351-B4E4-EDB0DDBFEEBE@objectwerks.com> On Feb 5, 2006, at 6:28 AM, Finlay Dobbie wrote: > >> I have compiled this little sample: >> >> gcc -Wall -o test test.m -framework Cocoa ./test > > Unbundled GUI apps are not supported. Lars I would suggest understanding what Finlay said above. Go dig into your docs, google, etc on an OS X "App Bundle" or "Application Bundle". That will tell you what your issues are. plists can hold auxilliary info that the app uses but I would rathe think that the interface builder bundle (so-called "nib" file) is like the Windows Resources you are talking about. Chad From eldenlars at yahoo.es Sun Feb 5 16:26:40 2006 From: eldenlars at yahoo.es (Lars Elden) Date: Sun Feb 5 16:26:51 2006 Subject: info.plist In-Reply-To: Message-ID: <20060206002650.90EC050833CC@machop.omnigroup.com> Finlay, > Info.plist is a property list. Yes, it looks like that. > Just copy it to the correct place in the application bundle. > Xcode will do this automatically for you. The question is: is it possible to bundle it to the application without using xcode ? Same as we can compile a using gcc. Is there a tool to compile the plist file and attach it to the application file ? Thanks, Lars ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com From eldenlars at yahoo.es Sun Feb 5 16:29:45 2006 From: eldenlars at yahoo.es (Lars Elden) Date: Sun Feb 5 16:29:57 2006 Subject: info.plist In-Reply-To: Message-ID: <20060206002955.1835550834BA@machop.omnigroup.com> Finlay, ops, I missed your point: > Applications on Mac OS X generally consist of a certain > hierarchy of directories. They typically contain not only the > actual executable file, but also the necessary resource files > (including the Info.plist). So it may be placed in the same directory and it will be located and used by the OS. Thanks, Lars ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com From finlay.dobbie at gmail.com Sun Feb 5 17:10:16 2006 From: finlay.dobbie at gmail.com (Finlay Dobbie) Date: Sun Feb 5 17:10:20 2006 Subject: info.plist In-Reply-To: <20060206002650.90EC050833CC@machop.omnigroup.com> References: <20060206002650.90EC050833CC@machop.omnigroup.com> Message-ID: On 06/02/06, Lars Elden wrote: > Finlay, > > > Info.plist is a property list. > > Yes, it looks like that. > > > Just copy it to the correct place in the application bundle. > > Xcode will do this automatically for you. > > The question is: is it possible to bundle it to the application without > using xcode ? Yes, but there's not really any reason not to. Xcode is effectively just a pretty front-end to commandline tools such as gcc, cp, etc. If you read about what "bundle" means, it should be apparent that there's nothing special. > Same as we can compile a using gcc. How is that the same thing at all? > Is there a tool to compile the > plist file and attach it to the application file ? It is not compiled. It is a text file. As far as "attaching" goes, read the documentation. -- Finlay From joar at joar.com Sun Feb 5 23:04:34 2006 From: joar at joar.com (j o a r) Date: Sun Feb 5 23:04:45 2006 Subject: first steps In-Reply-To: <20060205235154.9FD5750827EC@machop.omnigroup.com> References: <20060205235154.9FD5750827EC@machop.omnigroup.com> Message-ID: On 6 feb 2006, at 00.45, Lars Elden wrote: > [NSApp run] is not needed as there is no any main window defined. > Once I > remove it, the app properly closes after the Alert dialog. I am surprised that it works at all without running the run loop, but regardless of if it works or not, it's a contrived example and not something you could use to create a real Mac OS X GUI application. The run loop is at the heart of any Cocoa GUI application, and most Foundation based projects. j o a r From adam.q.salter at gmail.com Mon Feb 6 03:42:04 2006 From: adam.q.salter at gmail.com (Adam Salter) Date: Mon Feb 6 03:42:28 2006 Subject: Can't add framework to application... In-Reply-To: <9E76A453-81C3-436B-8A75-93B45F78D5F8@firethorne.com> References: <9E76A453-81C3-436B-8A75-93B45F78D5F8@firethorne.com> Message-ID: I believe I have found the problem. And I almost can't believe it myself, but my build results prove it. You can't build and application if there is a space in the path. (or at least I can't - this is with a fresh install of XCode 2.2 - less than 1 week old). XCode 2.2 doesn't escape the framework search paths. That is so frustrating... I never would have though of it... but I guess I should have gone through the details build results earlier... I created the simplest app I could and added the framework, but with a " "(space) in the directory name: Building ZeroLink launcher /Users/adam/Development/Applications/Test App/build/Debug/TestApp.app/Contents/MacOS/TestApp cd "/Users/adam/Development/Applications/Test App" /usr/bin/gcc-4.0 -o /Users/adam/Development/Applications/Test\ App/build/Debug/TestApp.app/Contents/MacOS/TestApp -arch i386 /System/ Library/PrivateFrameworks/ZeroLink.framework/Resources/ libZeroLinkAppStub.a -Wl,-all_load -L/Users/adam/Development/ Applications/Test\ App/build/Debug -F/Users/adam/Development/ Applications/Test\ App/build/Debug -F/Users/adam/Development/ Applications/Test -FApp/../../Libraries/AGProcess/build/Default - framework Cocoa -framework AGProcess -framework ZeroLink -F/System/ Library/PrivateFrameworks/ -isysroot /Developer/SDKs/MacOSX10.4u.sdk - Wl,-x -Wl,-unexported_symbols_list -Wl,/System/Library/ PrivateFrameworks/ZeroLink.framework/Versions/A/Resources/ ZeroLinkAppStub.nexp -Wl,-sectcreate -Wl,__TEXT -Wl,__zerolink -Wl,/ Users/adam/Development/Applications/Test\ App/build/TestApp.build/ Debug/TestApp.build/Objects-normal/i386/TestApp.zerolink /usr/bin/ld: warning -F: directory name (/Users/adam/Development/ Applications/Test) does not exist /usr/bin/ld: warning -F: directory name (App/../../Libraries/ AGProcess/build/Default) does not exist /usr/bin/ld: can't locate framework for: -framework AGProcess collect2: ld returned 1 exit status The other error is that if you add a Framework as a direct dependency the Framework is not added to the search path!!! The same app, but with AGProcess.xcodeproj added: .....It's working now... Maybe I did something wrong the first time... but same thing with a space in the dir name: CompileC build/TestApp.build/Debug/TestApp.build/Objects-normal/i386/ Test.o "/Users/adam/Development/Applications/Test App/Test.m" normal i386 objective-c com.apple.compilers.gcc.4_0 cd "/Users/adam/Development/Applications/Test App" /usr/bin/gcc-4.0 -x objective-c -arch i386 -pipe -Wno-trigraphs - fpascal-strings -fasm-blocks -g -O0 -Wreturn-type -Wunused-variable - fmessage-length=0 -fzero-link -mfix-and-continue -I/Users/adam/ Development/Applications/Test\ App/build/TestApp.build/Debug/ TestApp.build/TestApp.hmap -F/Users/adam/Development/Applications/Test \ App/build/Debug -F/Users/adam/Development/Applications/Test - FApp/../../Libraries/AGProcess/build/Default -I/Users/adam/ Development/Applications/Test\ App/build/Debug/include -I/Users/adam/ Development/Applications/Test\ App/build/TestApp.build/Debug/ TestApp.build/DerivedSources -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -c /Users/adam/Development/Applications/Test\ App/ Test.m -o /Users/adam/Development/Applications/Test\ App/build/ TestApp.build/Debug/TestApp.build/Objects-normal/i386/Test.o In file included from /Users/adam/Development/Applications/Test App/ Test.m:9: /Users/adam/Development/Applications/Test App/Test.h:10:32: error: AGProcess/AGProcess.h: No such file or directory Very frustrating. I'm going to raise a radar now.... On 05/02/2006, at 5:08 AM, David Hill wrote: > Interesting. I just had some very weird problems under Xcode2.2 > while developing a fairly complex application -- some similar to > what you describe, some where it couldn't find the superclass > "NSObject" (or did it strip the "NS", I was in too much of a panic > to remember exactly) and at least one of my header files had all > the return value declarations neatly stripped from the method > declarations. Up till this happened, I had been developing the App > quite normally with no problems (except see below). > > The only thing that might have been involved was that I cleaned up > the files in the App under Xcode, deleting some references and > copying the original files into the App so all the real files were > in the same folder. However, I was very careful to get the correct > files by using Get Info on each of the files I was dealing with, > and in any case, the "crash" didn't occur till a little while later. > > I had also noticed some odd things happening that lost files and > got confused about the whereabouts of header files a day prior to > my house cleaning, but had simply worked from backups and assumed I > had had some kind of finger trouble. > > After the "crash" I uninstalled Xcode, rebooted the system, > reinstalled Xcode and clawed my way back to the lost condition of > the App from a backup. And, yes, I have all the real files in the > same folder now and everything is working normally and apparently > reliably again. > > Hope this may prod someone else's memory and maybe, if there's a > serious problem, we can get it fixed. > > And yes, I too thought I must be at fault. > > david > ------------- > David Hill > ------------- > > On Feb 4, 2006, at 3:42 AM, Adam Salter wrote: > >> >> This is going to sound really stupid, but I'm trying to build my >> application and getting header file not found error for a >> framework. This used to work just fine until I upgraded to xCode >> 2.2, so I'm hoping it's not just me. >> >> I've found some similar experiences here: >> http://www.cocoabuilder.com/archive/message/xcode/2005/11/15/1131 >> and here... >> http://www.cocoabuilder.com/archive/message/xcode/2005/10/31/631 >> >> One person's fix was to rebuild their entire HD... I'm hoping this >> is not the only solution. >> >> Has anyone else come across this and did you find a fix? >> >> I'm pretty sure I'm referencing everything correctly. The frame >> work in question is AGProcess from: >> http://sourceforge.net/projects/agkit >> >> I've built the framework and then tried to reference it by: >> #import >> >> /Users/adam/Development/Applications/TestApp/GLProcess.h:10:32: >> error: AGProcess/AGProcess.h: No such file or directory >> >> Thanks in advance, >> Adam >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> > From steve at cocoaheads.org Mon Feb 6 16:23:53 2006 From: steve at cocoaheads.org (Stephen Zyszkiewicz) Date: Mon Feb 6 16:30:28 2006 Subject: [MEET] Next CoocaHeads! Thursday Feb 9 and Tuesday Feb 14 Message-ID: <1C886EDD-A610-4EBD-A460-F1825D6940DF@cocoaheads.org> Greetings everyone, It's time again for CocoaHeads, a nation-wide U.S. Mac Programmer's group. More info can be found at The big news this month is that we welcome Cleveland, Ohio, to the CocoaHeads family of chapters. Cleveland will be meeting for the first time on Tuesday the 14th, at the Arabica. Our regular thursday chapters will meet on February 9th: * Boston, MA on the MIT campus. Topics: MVC, and writing a Cocoa-based CoreAudio Audio Unit * Colorado Springs, CO at Panera Bread Topics: General roundtable of OS X development, and small business issues * Pittsburgh, PA, on the Pitt Campus (location change). Topic will be custom NSViews * Silicon Valley, CA, on the Apple Campus Topics: Show-and-tell/Q&A. Please bring in your code or a topic from that book you are reading! Also: installing subversion-server on Tiger with Apache 2.2.0 (has anyone done this? :-p) * St. Louis, MO, at St. Louis Bread Co in the Loop Topics: Desktop Fiend, and new Intel Macs Our regular tuesday chapters will meet on February 14th: * Chicago / CAWUG at the North Michigan Apple store * Cleveland Ohio, at Arabica on Juniper Road Topic will be Memory Management * Lake Forest, CA (Orange County), at Diedrich's Coffee Topic: Continuing work on the logic puzzle. Please be sure to check the web site for up to the minute changes. Steve From shawnce at gmail.com Mon Feb 6 21:02:09 2006 From: shawnce at gmail.com (Shawn Erickson) Date: Mon Feb 6 21:04:11 2006 Subject: first steps In-Reply-To: References: <20060205235154.9FD5750827EC@machop.omnigroup.com> Message-ID: <3700F63C-EAF0-4B44-9FF1-B05BF7BF7A98@gmail.com> On Feb 5, 2006, at 11:04 PM, j o a r wrote: > > On 6 feb 2006, at 00.45, Lars Elden wrote: > >> [NSApp run] is not needed as there is no any main window defined. >> Once I >> remove it, the app properly closes after the Alert dialog. > > I am surprised that it works at all without running the run loop, > but regardless of if it works or not, it's a contrived example and > not something you could use to create a real Mac OS X GUI application. > The run loop is at the heart of any Cocoa GUI application, and most > Foundation based projects. That example only works because the alert dialog runs it own local runloop while displayed. Lars, I believe you are coming from a Windows background... anyway runloops are not associated with a window but with a thread (similar to window message loop but not the same). NSApplication based applications get a runloop managed for them by NSApplication and all (well usually nearly all) events from the user (keyboard, mouse, etc.) and the operating system in general are handled by that runloop (various event sources are connected to it). -Shawn From cguybrush at gmail.com Mon Feb 6 23:07:43 2006 From: cguybrush at gmail.com (GbT) Date: Mon Feb 6 23:07:52 2006 Subject: Core Data and @count keypath Message-ID: Hi, I have a core data app with some entities, the entity A has a to-many relationship with another entity B. I use an nstreecontroller for A and want to display the number of records for the relationship A-->>B, but if I put relationshipToB.@count in the model key path in the bindings I obtain this message: *** NSRunLoop ignoring exception '[<_NSFaultingMutableSet 0x3c5d30> addObserver:forKeyPath:options:context:] is not supported. Key path: @count' that raised during posting of delayed perform with target 37e980 and selector 'open:' The selector open is related to the drawer... but the addObserver thing isn't clear to me... My entities are all subclassed by NSManagedObject. Is there any doc that explains this simple question? I'm sure I'm missing something important :) Thanks From eldenlars at yahoo.es Tue Feb 7 01:22:24 2006 From: eldenlars at yahoo.es (Lars Elden) Date: Tue Feb 7 01:22:40 2006 Subject: NSAlert / NSRunAlert question In-Reply-To: <3700F63C-EAF0-4B44-9FF1-B05BF7BF7A98@gmail.com> Message-ID: <20060207092237.EB62A50B0E12@machop.omnigroup.com> Is it possible to show a NSAlert (or NSRunAlert) dialog that stays on top of an underlying window, and with modal execution to the below window ? Thanks. Lars ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com From joar at joar.com Tue Feb 7 09:23:51 2006 From: joar at joar.com (j o a r) Date: Tue Feb 7 09:24:17 2006 Subject: NSAlert / NSRunAlert question In-Reply-To: <20060207092237.EB62A50B0E12@machop.omnigroup.com> References: <20060207092237.EB62A50B0E12@machop.omnigroup.com> Message-ID: On 7 feb 2006, at 10.22, Lars Elden wrote: > Is it possible to show a NSAlert (or NSRunAlert) dialog that stays > on top of > an underlying window, and with modal execution to the below > window ? Thanks. It sounds like you're talking about an alert sheet? Check the documentation available for sheets. This might be one place to start looking: j o a r From mgee at gwi.net Tue Feb 7 16:29:37 2006 From: mgee at gwi.net (Michael Gregoire) Date: Tue Feb 7 16:49:54 2006 Subject: Newbie question Message-ID: Hi everyone, This is my first question to this group. I'm currently trying to find out how to implement a class method with an optional parameter. For some reason I can't find the answer anywhere. Could anyone explain how this is done in objective-c? Thanks Mike Gregoire From dunham at mac.com Tue Feb 7 17:23:24 2006 From: dunham at mac.com (David Dunham) Date: Tue Feb 7 17:23:32 2006 Subject: Newbie question In-Reply-To: References: Message-ID: <84C33823-D609-48B3-9398-4D2752B90789@mac.com> On 7 Feb 2006, at 16:29, Michael Gregoire wrote: > I'm currently trying to find out how to implement a class method > with an optional parameter. For some reason I can't find the answer > anywhere. > Could anyone explain how this is done in objective-c? Don't you just make two methods + process: (int) aValue; + process: (int) aValue withOptions: (int) anOptions; David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From mgee at gwi.net Tue Feb 7 16:34:37 2006 From: mgee at gwi.net (Michael Gregoire) Date: Tue Feb 7 18:13:56 2006 Subject: Newbie question Message-ID: <79336AA3-1F0F-48F9-B7F5-DA6FD88DCFA1@gwi.net> Hi everyone, This is my first question to this group. I'm currently trying to find out how to implement a class method with an optional parameter. For some reason I can't find the answer anywhere. Could anyone explain how this is done in objective-c? Thanks Mike Gregoire From mgee at gwi.net Tue Feb 7 18:14:47 2006 From: mgee at gwi.net (Michael Gregoire) Date: Tue Feb 7 18:14:51 2006 Subject: Newbie question Message-ID: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> Let me clarify. I'd like to know how to implement an instance or class method which has a parameter with a default value...allowing it to be an optional parameter when calling the method. From newslists at autonomy.caltech.edu Tue Feb 7 19:05:28 2006 From: newslists at autonomy.caltech.edu (Roland Torres) Date: Tue Feb 7 19:05:36 2006 Subject: Newbie question In-Reply-To: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> References: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> Message-ID: <0934AD79-8EA8-4487-995C-971B460F0BDB@autonomy.caltech.edu> On Feb 7, 2006, at 6:14 PM, Michael Gregoire wrote: > Let me clarify. I'd like to know how to implement an instance or > class method which has a parameter with a default value...allowing > it to be an optional parameter when calling the method. Hmm, what do you mean by default value? How does the receiver know you're defaulting the value? In ObjC, it's common to pass in nil for unused parameters. In this sense, the object for param4 can be considered optional, since you didn't pass anything in to it. [anObject makeStringUsingParam1:@"Hello" param2:"world" param3:"!" param4:nil]; (If you have *many* parameters, it can be easier to pass in a populated NSDictionary or NSArray instance.) It would be up to the code in the receiver method to supply a default value for any non- supplied parameters that need assignment. HTH, Roland From brianarthur at nc.rr.com Tue Feb 7 20:05:34 2006 From: brianarthur at nc.rr.com (Anthony Arthur) Date: Tue Feb 7 20:05:41 2006 Subject: Newbie question In-Reply-To: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> References: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> Message-ID: I suspect that you are talking about a C++ feature where an argument can have a default value specified in the method signature which is used when that method is called w/out that argument (must be the last or args at the end of the list, I believe). This feature is not supported in Obj-C, not with class methods or instance methods. Further, you can not overload methods in Obj-C..., override yes, overload no. Unlike C++, in Obj-C the colon ':' is part of the method signature where in C++ the arg list syntax '()' is not. So while in C++ obj->foo() is congruent with obj->foo(bar) (if foo specifies a default arg) in Obj-C [obj foo] does not call the same method as [obj foo:bar], and [obj foo:] would not compile. -b On Feb 7, 2006, at 9:14 PM, Michael Gregoire wrote: > Let me clarify. I'd like to know how to implement an instance or > class method which has a parameter with a default value...allowing > it to be an optional parameter when calling the method. > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From seth at freaksw.com Tue Feb 7 19:47:59 2006 From: seth at freaksw.com (Seth Willits) Date: Tue Feb 7 20:48:03 2006 Subject: Newbie question In-Reply-To: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> References: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> Message-ID: <446991EF-BC88-4C10-B7B0-757E95C62E96@freaksw.com> On Feb 7, 2006, at 6:14 PM, Michael Gregoire wrote: > Let me clarify. I'd like to know how to implement an instance or > class method which has a parameter with a default value...allowing > it to be an optional parameter when calling the method. In Objective-C, you don't. You define two separate methods. -- Seth Willits From dunham at mac.com Tue Feb 7 21:05:51 2006 From: dunham at mac.com (David Dunham) Date: Tue Feb 7 21:06:01 2006 Subject: Loading an NSView from a nib Message-ID: I think I'm just not in the Cocoa mindset on this. I'd like to add a panel to a print dialog. I keep expecting something like + (NSView*) loadFromNib:(NSNib*)aNib; rather than having to hook up an IBOutlet somewhere. (Oddly, there is a -[DRSetupPanel initWithNibName:] method, which seems like what I'm looking for, though of course for the wrong class.) Am I missing some way to do this? Is there a reason why it's not done? David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From leeg at teaching.physics.ox.ac.uk Wed Feb 8 01:44:21 2006 From: leeg at teaching.physics.ox.ac.uk (Graham J Lee) Date: Wed Feb 8 02:12:48 2006 Subject: Newbie question In-Reply-To: References: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> Message-ID: <43E9BD75.2090607@teaching.physics.ox.ac.uk> On 8/2/06 04:05, Anthony Arthur wrote: > I suspect that you are talking about a C++ feature where an argument can > have a default value specified in the method signature which is used > when that method is called w/out that argument (must be the last or args > at the end of the list, I believe). This feature is not supported in > Obj-C, not with class methods or instance methods. Further, you can not > overload methods in Obj-C..., override yes, overload no. > > Unlike C++, in Obj-C the colon ':' is part of the method signature where > in C++ the arg list syntax '()' is not. So while in C++ > obj->foo() is congruent with obj->foo(bar) (if foo specifies a default arg) > in Obj-C [obj foo] does not call the same method as [obj foo:bar], and > [obj foo:] would not compile. > so the closest the OP would get to having a 'default parameter' is something like: -(void)foo:(int)bar { //... } -(void)foo { [self foo:DEFAULTBAR]; } I suppose...? This is used frequently in initialiser; there'd be one 'designated initialiser' like -initWithFoo:bar:baz: and then convenience versions such as -init or -initWithBar: which call the designated version, passing through reasonable settings for the unspecified parameters. -- Graham Lee UNIX Systems Manager, Oxford Physics Practical Course http://users.ox.ac.uk/~wadh1342 From newslists at autonomy.caltech.edu Wed Feb 8 08:59:28 2006 From: newslists at autonomy.caltech.edu (Roland Torres) Date: Wed Feb 8 08:59:37 2006 Subject: Newbie question In-Reply-To: <446991EF-BC88-4C10-B7B0-757E95C62E96@freaksw.com> References: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> <446991EF-BC88-4C10-B7B0-757E95C62E96@freaksw.com> Message-ID: <744E46FC-70CF-4066-8637-62021A4E3294@autonomy.caltech.edu> On Feb 7, 2006, at 7:47 PM, Seth Willits wrote: > On Feb 7, 2006, at 6:14 PM, Michael Gregoire wrote: > >> Let me clarify. I'd like to know how to implement an instance or >> class method which has a parameter with a default value...allowing >> it to be an optional parameter when calling the method. > > In Objective-C, you don't. You define two separate methods. There's also the capability of variable (object) arguments in ObjC: http://developer.apple.com/qa/qa2005/qa1405.html Roland From brianarthur at nc.rr.com Wed Feb 8 09:39:32 2006 From: brianarthur at nc.rr.com (Anthony Arthur) Date: Wed Feb 8 09:40:01 2006 Subject: Newbie question In-Reply-To: <43E9BD75.2090607@teaching.physics.ox.ac.uk> References: <2CED70F4-D00E-4771-8D16-4B956C3F9350@gwi.net> <43E9BD75.2090607@teaching.physics.ox.ac.uk> Message-ID: <1022D8FD-1829-4BB9-A2CE-579B1E949B5F@nc.rr.com> Yes. Good example. That would be a way to achieve the default arg behavior in Obj-C. -b On Feb 8, 2006, at 4:44 AM, Graham J Lee wrote: > On 8/2/06 04:05, Anthony Arthur wrote: >> I suspect that you are talking about a C++ feature where an >> argument can have a default value specified in the method >> signature which is used when that method is called w/out that >> argument (must be the last or args at the end of the list, I >> believe). This feature is not supported in Obj-C, not with class >> methods or instance methods. Further, you can not overload >> methods in Obj-C..., override yes, overload no. >> Unlike C++, in Obj-C the colon ':' is part of the method signature >> where in C++ the arg list syntax '()' is not. So while in C++ >> obj->foo() is congruent with obj->foo(bar) (if foo specifies a >> default arg) >> in Obj-C [obj foo] does not call the same method as [obj foo:bar], >> and [obj foo:] would not compile. > so the closest the OP would get to having a 'default parameter' is > something like: > > -(void)foo:(int)bar > { > //... > } > -(void)foo > { > [self foo:DEFAULTBAR]; > } > > I suppose...? This is used frequently in initialiser; there'd be > one 'designated initialiser' like -initWithFoo:bar:baz: and then > convenience versions such as -init or -initWithBar: which call the > designated version, passing through reasonable settings for the > unspecified parameters. > > -- > Graham Lee > UNIX Systems Manager, > Oxford Physics Practical Course > http://users.ox.ac.uk/~wadh1342 From loki at arete.cc Wed Feb 8 15:33:46 2006 From: loki at arete.cc (Tyler Berry) Date: Wed Feb 8 16:03:33 2006 Subject: Double clicking without doubleAction selector Message-ID: I need to add double-clicks to a view that does not have doubleAction: in its class hierarchy at all. Specifically I've got an NSView subclass that's already overriding mouseDown: to do various other processing on single clicks. I could probably come up with a hackish double click scheme involving storing time, but that wouldn't for example use the system preference for double click speed. Does anybody have a reference on how to implement double-clicking in a view without doubleAction: built-in? -- T From ddavidso at apple.com Wed Feb 8 16:06:16 2006 From: ddavidso at apple.com (Douglas Davidson) Date: Wed Feb 8 16:06:25 2006 Subject: Double clicking without doubleAction selector In-Reply-To: References: Message-ID: <5AF094FD-B4D0-4DA2-AE68-F359601A6724@apple.com> On Feb 8, 2006, at 3:33 PM, Tyler Berry wrote: > Does anybody have a reference on how to implement double-clicking > in a view without doubleAction: built-in? > -[NSEvent clickCount] From dunham at mac.com Wed Feb 8 22:23:16 2006 From: dunham at mac.com (David Dunham) Date: Wed Feb 8 22:23:25 2006 Subject: Binding in an accessory view Message-ID: <21A1FCB3-E606-465F-A1BE-0D4CB232F293@mac.com> I've got a view which I'm using as an accessory view in a print dialog: [printOperation setAccessoryView: [fMyView printPanel]]; I read its nib, and it gets connected to instance data in fMyView just fine. But I'm wanting a bunch of checkboxes within the accessory view to be bound to fMyView. Although I've set this up, it doesn't seem to work. My getters and setters are never called, and the checkboxes come up with default values. It's always possible I got it wrong, but I did set up a sheet (which fMyView shows), and binding works from it. (I assumed that I'd bind the checkbox's value to a BOOL getter, but I tried int and that doesn't work either.) Do I have to explicitly bind, since the view ends up in a print dialog? David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From dunham at mac.com Wed Feb 8 22:48:48 2006 From: dunham at mac.com (David Dunham) Date: Wed Feb 8 22:48:54 2006 Subject: Binding in an accessory view In-Reply-To: <21A1FCB3-E606-465F-A1BE-0D4CB232F293@mac.com> References: <21A1FCB3-E606-465F-A1BE-0D4CB232F293@mac.com> Message-ID: <7B4D5CAD-90A1-4DE5-909B-C155D0EAC984@mac.com> On 8 Feb 2006, at 22:23, David Dunham wrote: > I've got a view which I'm using as an accessory view in a print > dialog: Never mind -- it turned out to be the fact that Xcode wasn't noticing that I had changed the nib file. When I did a Clean and rebuilt, my bindings work. ------------ David Dunham dunham@mac.com http://www.pensee.com/dunham/ "No matter how far you have gone on a wrong road, turn back." - Turkish proverb From scott at cocoadoc.com Thu Feb 9 01:49:37 2006 From: scott at cocoadoc.com (Scott Anguish) Date: Thu Feb 9 01:49:47 2006 Subject: Double clicking without doubleAction selector In-Reply-To: <5AF094FD-B4D0-4DA2-AE68-F359601A6724@apple.com> References: <5AF094FD-B4D0-4DA2-AE68-F359601A6724@apple.com> Message-ID: to expand slightly on what Doug said, check out this listing on the ADC site http://developer.apple.com/samplecode/MyPhoto/listing25.html On Feb 8, 2006, at 7:06 PM, Douglas Davidson wrote: > clickCount From keencoyote at earthlink.net Thu Feb 9 10:13:48 2006 From: keencoyote at earthlink.net (George Lawrence Storm) Date: Thu Feb 9 10:13:53 2006 Subject: Seattle XCoders meeting tonight, 7 PM - Squeak - book study: Advanced Mac OS X Programming Message-ID: <738A5EFE-62B3-4318-9D9F-88A1906CFA8D@earthlink.net> The next meeting of the Seattle XCoders will be held tonight, Thursday, February 9th at 7 PM. Tonight one of our members will be presenting an Overview of Squeak. In the second half of the meeting we will be starting our new book study "Advanced Mac OS X Programming", this evening we will be covering chapters 1 through 4 (please read prior to meeting). ----- The the Seattle Xcoders is Seattle's Macintosh programmers special interest group. Our core focus is on Cocoa, however we devote a fair amount of time to other core technologies, with occasional excursions to other lands of interest such as unix, perl, gdb and other acronyms too numerous to mention. We meet on the second and fourth Thursday of each month at 7 PM at the offices of Seattle dBug, 9620 Stone Avenue North, Suite 202, Seattle, WA 98103-3378, for directions: . Please visit our discussion list: - The Seattle XCoders From temp at jacobs.co.za Sun Feb 12 01:45:43 2006 From: temp at jacobs.co.za (Trent Jacobs) Date: Sun Feb 12 01:45:40 2006 Subject: Mac Development outsourcing in UK Message-ID: Apologies to all if this is the incorrect place for a post such as this... We are desperately looking for a person/company to take on some of the development for our Mac port, but have been unsuccessful. So far we have found one reputable-looking company, but received no reply from them. Can anyone point me towards a company they could recommend who could take on a short-term project? Regards, Trent. From david_allouch at mac.com Sun Feb 12 02:03:23 2006 From: david_allouch at mac.com (David Allouch) Date: Sun Feb 12 02:03:26 2006 Subject: NSMutableURLRequest headers unsorted/scrambled. Message-ID: I am using NSMutableURLRequest in conjunction with NSURLConnection to send calls to a soap service. (very sensitive to headers) If I NSLog the headers before triggering the connectionWithRequest call, I see the headers in an order that has nothing to do with the order I pushed them in (but let say that this I could live with for a while). The worse of it came after I looked at the headers the server received. Honestly the headers were way off, for example the ?Host? tag was the last one on the list while the ?Cookie? was the first one. >From what I understand this comes from the fact that the headers are kept in a dictionary. Anyone with an id on how to gain some kind of control over it? D. | David Allouch | * david_allouch[at]mac.com | Benjamin Franklin said, "Up sluggard and waste not life; In the grave will be sleeping enough.? From helge.hess at skyrix.com Sun Feb 12 03:30:28 2006 From: helge.hess at skyrix.com (Helge Hess) Date: Sun Feb 12 03:30:48 2006 Subject: NSMutableURLRequest headers unsorted/scrambled. In-Reply-To: References: Message-ID: <056D8636-732C-464C-8E2A-357911060C9C@skyrix.com> On 12. Feb 2006, at 11:03 Uhr, David Allouch wrote: > I am using NSMutableURLRequest in conjunction with NSURLConnection > to send > calls to a soap service. (very sensitive to headers) > > If I NSLog the headers before triggering the connectionWithRequest > call, I > see the headers in an order that has nothing to do with the order I > pushed > them in (but let say that this I could live with for a while). The ordering of headers (and other stuff like case sensitivity) is not relevant in HTTP, if your SOAP service depends on that its b0rked and should be fixed. > The worse of it came after I looked at the headers the server > received. > Honestly the headers were way off, for example the ?Host? tag was > the last > one on the list while the ?Cookie? was the first one. Which is perfectly fine protocol-wise. >> From what I understand this comes from the fact that the headers >> are kept in a dictionary. > Anyone with an id on how to gain some kind of control over it? You can't and shouldn't unless your intention is to create a proprietary protocol which is not HTTP (in that case you can't use NSURLRequest since as mentioned it most likely stores its header in an internal hashmap and therefore looses the ordering) regards, Helge From christiaan.hofman at weizmann.ac.il Sun Feb 12 03:58:35 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Sun Feb 12 03:58:44 2006 Subject: Core Data, transient ivars and undo Message-ID: <95D23715-9453-4EEB-9C3F-E1B36AFAB8AA@weizmann.ac.il> I am very much confused about undo in Core Data, in particular when it comes to "transient" values and other dependent state information. AFAICS the transient value or state info is not updated in any way in undo, which can easily lead to inconsistent states in CD apps. How should I handle this in general? For example a "transient" value stored in an ivar. Eg for a non- standard attribute, which is stored in the MOC as data, but has an ivar representation in a NSManagedObject subclass. Usually, you interact with the transient value (ivar) rather than the underlying CD value. However it is the data in the MOC that is changed in undo, and only that. So you get an inconsistent state. Writing (KVC compliant) accessors for the underlying data does not help, as they are not called by undo. In the docs and example projects like CoreRecipes many accessors seem to have this flaw. Eg the "bounds" example in "Non-Standard Attributes" section of the Core Data Programming Guide. Here the bounds ivar and the boundsAsData atribute should always be synchronized. However, AFAICS, if I would undo setting (changing) the bounds, only the boundsAsData attribute is changed, giving me an inconsistent state. This seems to me a bug in CD, or at least in the docs and the examples, as nothing is mentioned about it. So my question is: how should I handle dependent state information in general so that undo works properly? Do I need to observe MOM keys for values on which the state of some object depends? Or should I explicitly register undo operations when I change an ivar such as the bounds in the example? It would have been helpful (I would even say required) that these issues were mentioned in the docs, especially as undo is automatic with little information and control about what's going on behind the scene. Christiaan From newsletters at vonBelow.Com Sun Feb 12 03:41:44 2006 From: newsletters at vonBelow.Com (Alex v. Below) Date: Sun Feb 12 04:13:37 2006 Subject: NSMutableURLRequest headers unsorted/scrambled. In-Reply-To: References: Message-ID: Am 12.02.2006 um 11:03 schrieb David Allouch: > > I am using NSMutableURLRequest in conjunction with NSURLConnection > to send > calls to a soap service. (very sensitive to headers) >> From what I understand this comes from the fact that the headers >> are kept in > a dictionary. > > Anyone with an id on how to gain some kind of control over it? Yes, you can go ahead and subclass NSURLRequest to spit out headers in a certain order. I will not go into detail because 1) It is left as an exercise to the reader and more importantly 2) Helge is right! The order of header fields SHOULD NOT MATTER! Talk to the people who have implemented the service, or maybe something else is wrong and you are just blaming the headers. Alex From adam.q.salter at gmail.com Sun Feb 12 10:10:30 2006 From: adam.q.salter at gmail.com (Adam Salter) Date: Sun Feb 12 10:10:43 2006 Subject: Automatic version.plist update? Message-ID: <13E6B979-AA13-4807-BC97-AC3CF19F4BC4@gmail.com> Does anybody know of a way to automatically update a plist file on every build, so that you can have information like in Apple apps with a Version 1.0.1 (234) version number? I thought that version.plist might be such a beast, but it doesn't seem to do anything that I can see... Thanks, Adam From marcrespass at mac.com Sun Feb 12 10:20:46 2006 From: marcrespass at mac.com (Marc Respass) Date: Sun Feb 12 10:20:51 2006 Subject: Obj-C WebService breaks with WO 5.3? Message-ID: <331E9D4C-D06E-4C22-B7E7-3459915ED13B@mac.com> Hi All, I have a bunch of WebObjects apps that are web services and a Cocoa app that's a client. In WebObjects 5.3, my Cocoa app breaks. Although it seems like a WebObjects problem, I think it's really a WebServicesCore.framework problem The WSDL generated is nearly identical with the exception of the wsdl:input using a different namespace. The real difference can be seen in TCPMonitor. Below are examples of the same request using each version. The difference is that WO 5.2 returns ns1:loginResponse/ loginReturn and WO 5.3 returns ns1:loginResponse/ns1:loginReturn and WebServicesCore is looking for only loginResponse as is suggested by the WSDL file. In the stubs generated by WSMakeStubs, I can change the key and add "ns1:" and then everything works but this makes me nervous. Somewhere in WebServicesCore, a dictionary is created that contains the result. I'm guessing that a key is created for each element inside but, of course, the code needs to know which key in the dictionary has the result. The problem seems to be in WSMakeStubs since it generates code looking for the key "loginReturn" instead of the real key which is "ns1:loginReturn" but that namespace "ns1" is no where in the WSDL so maybe the problem is in WebServicesCore or maybe Axis (which WO 5 uses) is doing something wrong now that used to be right. If anyone has any ideas and can point me in a direction, I would really appreciate it. I've read the docs and the WSDL spec and I'm prepared to file a bug but I just don't know where the problem might be. Notice that in both versions, < ns1:loginResponse> includes an attribue, "xmlns:ns1" but WO 5.2 is not using that namespace for its . My best guess is that Axis was wrong in WO 5.2 and right in WO 5.3 and that WebServicesCore should be looking for a namespace and removing it since there is no way to know what the namespace is when generating the stub. That brings up another question -- can a response ever have more than one element in it. I would guess that it cannot. If it can't, then its name is unimportant since it is the response. I hope this makes sense. Any help is appreciated. Thanks Marc ===WebObjects 5.2 {courts = ({courtORI = "ME0J100E"; courtName = "SOMERSET COUNTY SUPERIOR COURT"; }, {courtORI = "ME0J101F"; courtName = "LINCOLN DISTRICT COURT"; }, {courtORI = "ME0J102G"; courtName = "AUGUSTA DISTRICT COURT"; }); username = "m"; authKey = "ABCD123456"; } ===WebObjects 5.3 {courts = ({courtORI = "ME0J100E"; courtName = "SOMERSET COUNTY SUPERIOR COURT"; }, {courtORI = "ME0J101F"; courtName = "LINCOLN DISTRICT COURT"; }, {courtORI = "ME0J102G"; courtName = "AUGUSTA DISTRICT COURT"; }); username = "m"; authKey = "ABCD123456"; } From marcrespass at mac.com Sun Feb 12 10:24:42 2006 From: marcrespass at mac.com (Marc Respass) Date: Sun Feb 12 10:24:49 2006 Subject: Automatic version.plist update? In-Reply-To: <13E6B979-AA13-4807-BC97-AC3CF19F4BC4@gmail.com> References: <13E6B979-AA13-4807-BC97-AC3CF19F4BC4@gmail.com> Message-ID: <235EC345-09C1-47EE-98A9-A2A1B63537CE@mac.com> You want Info.plist On Feb 12, 2006, at 1:10 PM, Adam Salter wrote: > > Does anybody know of a way to automatically update a plist file on > every build, so that you can have information like in Apple apps > with a Version 1.0.1 (234) version number? > > I thought that version.plist might be such a beast, but it doesn't > seem to do anything that I can see... > > Thanks, > Adam > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From edward.patel at memention.com Sun Feb 12 10:22:27 2006 From: edward.patel at memention.com (Edward Patel) Date: Sun Feb 12 11:14:25 2006 Subject: Automatic version.plist update? In-Reply-To: <13E6B979-AA13-4807-BC97-AC3CF19F4BC4@gmail.com> References: <13E6B979-AA13-4807-BC97-AC3CF19F4BC4@gmail.com> Message-ID: My guess would be that they use some CM tool like CVS/Subversion and that number within parentheses are a tag taken from the current revision being built... I'm using subversion, can see if I can figure out a way Edward http://www.memention.com 12 feb 2006 kl. 19.10 skrev Adam Salter: > > Does anybody know of a way to automatically update a plist file on > every build, so that you can have information like in Apple apps > with a Version 1.0.1 (234) version number? > > I thought that version.plist might be such a beast, but it doesn't > seem to do anything that I can see... > > Thanks, > Adam > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From laptop at ghosttiger.com Sun Feb 12 13:33:58 2006 From: laptop at ghosttiger.com (Jonathan Grynspan) Date: Sun Feb 12 13:34:12 2006 Subject: Intel ABI and function pointers Message-ID: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> I hope this is the right list for this. :) Consider the following code: ===CODE=== typedef void (* extraarg)(int arg, void *smasher); void somefunc(int argc) { printf("this program was run with %i command line argument(s)!", argc); } int main(int argc, char *argv[]) { extraarg ptr = (extraarg)&somefunc; (* ptr)(argc, NULL); } ===END CODE=== From my (admittedly simplistic) testing on an iBook G4, passing the extra argument to the function seems to be harmless. Is this in fact true? Is it also harmless using the IA-32 (Intel) ABI? Am I waltzing into undefined behaviour? Can anybody point me to documentation on the subject? If it's safe to do, that makes it a little easier for me to implement certain functions in my code (think of doSomething(int reps, func something) and doSomethingContextually(int reps, func something, void *contextInfo).) Thanks, Jonathan Grynspan my first name (swirly) ghost tiger (point) com From edward.patel at memention.com Sun Feb 12 13:43:47 2006 From: edward.patel at memention.com (Edward Patel) Date: Sun Feb 12 13:43:09 2006 Subject: Intel ABI and function pointers In-Reply-To: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> References: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> Message-ID: <3FA51A64-AA14-40AF-8D4C-73132C10A830@memention.com> For C it is possible to have a variable number of parameters... This is because the removal of the parameters is done from the calling point...sometimes one can be interested in removing the parameters from the stack just as the function returns, might be done in an old interrupt and is then marked as "pascal"...the pascal calling standard Look at "man stdarg" Edward htttp://www.memention.com 12 feb 2006 kl. 22.33 skrev Jonathan Grynspan: > I hope this is the right list for this. :) > > Consider the following code: > > ===CODE=== > > typedef void (* extraarg)(int arg, void *smasher); > void somefunc(int argc) { > printf("this program was run with %i command line argument > (s)!", argc); > } > > int main(int argc, char *argv[]) { > extraarg ptr = (extraarg)&somefunc; > (* ptr)(argc, NULL); > } > > ===END CODE=== > > From my (admittedly simplistic) testing on an iBook G4, passing the > extra argument to the function seems to be harmless. Is this in > fact true? Is it also harmless using the IA-32 (Intel) ABI? Am I > waltzing into undefined behaviour? Can anybody point me to > documentation on the subject? > > If it's safe to do, that makes it a little easier for me to > implement certain functions in my code (think of doSomething(int > reps, func something) and doSomethingContextually(int reps, func > something, void *contextInfo).) > > Thanks, > Jonathan Grynspan > my first name (swirly) ghost tiger (point) com > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From laptop at ghosttiger.com Sun Feb 12 14:39:58 2006 From: laptop at ghosttiger.com (Jonathan Grynspan) Date: Sun Feb 12 14:40:10 2006 Subject: Intel ABI and function pointers In-Reply-To: <3FA51A64-AA14-40AF-8D4C-73132C10A830@memention.com> References: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> <3FA51A64-AA14-40AF-8D4C-73132C10A830@memention.com> Message-ID: Except that I'm dealing with functions that aren't variadic and take a fixed number of arguments. I'm aware how variadic functions work, but they're not suitable for what I need to do. Thanks, Jonathan Grynspan On 12-Feb-06, at 4:43 PM, Edward Patel wrote: > For C it is possible to have a variable number of parameters... > > This is because the removal of the parameters is done from the > calling point...sometimes one can be interested in removing the > parameters from the stack just as the function returns, might be > done in an old interrupt and is then marked as "pascal"...the > pascal calling standard > > Look at "man stdarg" > > Edward > htttp://www.memention.com > > > 12 feb 2006 kl. 22.33 skrev Jonathan Grynspan: > >> I hope this is the right list for this. :) >> >> Consider the following code: >> >> ===CODE=== >> >> typedef void (* extraarg)(int arg, void *smasher); >> void somefunc(int argc) { >> printf("this program was run with %i command line argument >> (s)!", argc); >> } >> >> int main(int argc, char *argv[]) { >> extraarg ptr = (extraarg)&somefunc; >> (* ptr)(argc, NULL); >> } >> >> ===END CODE=== >> >> From my (admittedly simplistic) testing on an iBook G4, passing >> the extra argument to the function seems to be harmless. Is this >> in fact true? Is it also harmless using the IA-32 (Intel) ABI? Am >> I waltzing into undefined behaviour? Can anybody point me to >> documentation on the subject? >> >> If it's safe to do, that makes it a little easier for me to >> implement certain functions in my code (think of doSomething(int >> reps, func something) and doSomethingContextually(int reps, func >> something, void *contextInfo).) >> >> Thanks, >> Jonathan Grynspan >> my first name (swirly) ghost tiger (point) com >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From ssen at apple.com Sun Feb 12 17:16:41 2006 From: ssen at apple.com (Shantonu Sen) Date: Sun Feb 12 17:16:45 2006 Subject: Intel ABI and function pointers In-Reply-To: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> References: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> Message-ID: This is an extremely bad idea. The fact that you needed a cast for &somefunc to avoid: test.c:14: warning: initialization from incompatible pointer type Should probably be a hint that you're doing something bad. The (several) ABIs are published: It "looks" harmless because: 1) For this few arguments on PPC, everything is passed in a register, so whether $r4 has something or not doesn't really affect the callees behavior 2) Even on IA32, the caller pushes an extra argument on the stack, and as long as the callee never looks that high in the stack, it doesn't matter. In most cases it shouldn't. If "something" has type "func", then presumably the func typedef has the second argument, so all valid function pointers should accept that second argument, without having to resort to sledgehammer tactics of casts and ABI trickery Shantonu On Feb 12, 2006, at 1:33 PM, Jonathan Grynspan wrote: > I hope this is the right list for this. :) > > Consider the following code: > > ===CODE=== > > typedef void (* extraarg)(int arg, void *smasher); > void somefunc(int argc) { > printf("this program was run with %i command line argument > (s)!", argc); > } > > int main(int argc, char *argv[]) { > extraarg ptr = (extraarg)&somefunc; > (* ptr)(argc, NULL); > } > > ===END CODE=== > > From my (admittedly simplistic) testing on an iBook G4, passing the > extra argument to the function seems to be harmless. Is this in > fact true? Is it also harmless using the IA-32 (Intel) ABI? Am I > waltzing into undefined behaviour? Can anybody point me to > documentation on the subject? > > If it's safe to do, that makes it a little easier for me to > implement certain functions in my code (think of doSomething(int > reps, func something) and doSomethingContextually(int reps, func > something, void *contextInfo).) > > Thanks, > Jonathan Grynspan > my first name (swirly) ghost tiger (point) com > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From laptop at ghosttiger.com Sun Feb 12 17:18:36 2006 From: laptop at ghosttiger.com (Jonathan Grynspan) Date: Sun Feb 12 17:18:47 2006 Subject: Intel ABI and function pointers In-Reply-To: References: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> Message-ID: <12DF4B9A-9C3C-4FCC-9D08-AC36FEB265B7@ghosttiger.com> That's what I expected. I was still hoping it would be legal, because it means a lot less code to implement. Oh well. Thanks, Jonathan Grynspan On 12-Feb-06, at 8:16 PM, Shantonu Sen wrote: > This is an extremely bad idea. The fact that you needed a cast for > &somefunc to avoid: > test.c:14: warning: initialization from incompatible pointer type > > Should probably be a hint that you're doing something bad. > > The (several) ABIs are published: > LowLevelABI/Introduction.html> > > It "looks" harmless because: > 1) For this few arguments on PPC, everything is passed in a > register, so whether $r4 has something or not doesn't really affect > the callees behavior > 2) Even on IA32, the caller pushes an extra argument on the stack, > and as long as the callee never looks that high in the stack, it > doesn't matter. In most cases it shouldn't. > > If "something" has type "func", then presumably the func typedef > has the second argument, so all valid function pointers should > accept that second argument, without having to resort to > sledgehammer tactics of casts and ABI trickery > > Shantonu > > On Feb 12, 2006, at 1:33 PM, Jonathan Grynspan wrote: > >> I hope this is the right list for this. :) >> >> Consider the following code: >> >> ===CODE=== >> >> typedef void (* extraarg)(int arg, void *smasher); >> void somefunc(int argc) { >> printf("this program was run with %i command line argument >> (s)!", argc); >> } >> >> int main(int argc, char *argv[]) { >> extraarg ptr = (extraarg)&somefunc; >> (* ptr)(argc, NULL); >> } >> >> ===END CODE=== >> >> From my (admittedly simplistic) testing on an iBook G4, passing >> the extra argument to the function seems to be harmless. Is this >> in fact true? Is it also harmless using the IA-32 (Intel) ABI? Am >> I waltzing into undefined behaviour? Can anybody point me to >> documentation on the subject? >> >> If it's safe to do, that makes it a little easier for me to >> implement certain functions in my code (think of doSomething(int >> reps, func something) and doSomethingContextually(int reps, func >> something, void *contextInfo).) >> >> Thanks, >> Jonathan Grynspan >> my first name (swirly) ghost tiger (point) com >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > > From nat at mulle-kybernetik.com Sun Feb 12 18:11:43 2006 From: nat at mulle-kybernetik.com (Nat!) Date: Sun Feb 12 18:12:06 2006 Subject: Intel ABI and function pointers In-Reply-To: References: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> Message-ID: Am 13.02.2006 um 02:16 schrieb Shantonu Sen: > This is an extremely bad idea. The fact that you needed a cast for > &somefunc to avoid: > test.c:14: warning: initialization from incompatible pointer type > > Should probably be a hint that you're doing something bad. But what specifically "extremely bad" can happen ? I can't imagine anything. Ciao Nat! ------------------------------------------------------ A good dog, though a fool. Who wants a smart dog! -- R.A. Lafferty From laptop at ghosttiger.com Sun Feb 12 18:23:11 2006 From: laptop at ghosttiger.com (Jonathan Grynspan) Date: Sun Feb 12 18:23:20 2006 Subject: Intel ABI and function pointers In-Reply-To: References: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> Message-ID: <965B268C-C438-4306-ADAB-0D08B5DFB30D@ghosttiger.com> Well, I think see what he means. I was kind of hoping against hope. There's always the potential to smash the stack, though I can't think offhand of a situation that could cause this on either PPC or IA-32. It's also non-portable. Let's say Apple decides to move to Acme Brand Processors next week. Acme's ABI uses a calling convention where all arguments are passed on the stack, and the caller handles stack setup, but the callee handles stack teardown. We've got an extra argument pushed on the stack now, possibly taking the place of the return address, and so the stack gets smashed. Then again, my knowledge is mostly in higher-level stuff than this. I could be wrong. -Jonathan Grynspan On 12-Feb-06, at 9:11 PM, Nat! wrote: > > Am 13.02.2006 um 02:16 schrieb Shantonu Sen: > >> This is an extremely bad idea. The fact that you needed a cast for >> &somefunc to avoid: >> test.c:14: warning: initialization from incompatible pointer type >> >> Should probably be a hint that you're doing something bad. > > But what specifically "extremely bad" can happen ? I can't imagine > anything. > > Ciao > Nat! > ------------------------------------------------------ > A good dog, though a fool. > Who wants a smart dog! -- R.A. Lafferty > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From christiaan.hofman at weizmann.ac.il Sun Feb 12 23:47:05 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Sun Feb 12 23:47:18 2006 Subject: Automatic version.plist update? In-Reply-To: <13E6B979-AA13-4807-BC97-AC3CF19F4BC4@gmail.com> References: <13E6B979-AA13-4807-BC97-AC3CF19F4BC4@gmail.com> Message-ID: <22A51AC1-16F9-4B00-B616-63F17ADBC07E@weizmann.ac.il> You can use agvtool (see man agvtool or the docs on versioning). You need to set Versioning System to apple-generic in the build rules. In Info.plist set CFBundleGetInfoString to something like "AppName 1.1.1 (${CURRENT_PROJECT_VERSION})" and CFBundleVersion to "1.1.1 (${CURRENT_PROJECT_VERSION})". Run agvtool before every build. You still have to modify the release version number (like 1.1.1 above) by hand. We use the way I described to distinguish between nightly builds in bug reports. There are more sophisticated ways which also can update the release version number, or have different types of version numbers for release versions and nightly builds. For this you need to preprocess the Info.plist file, with a script of your own. Here is an example setup. In Info.plist, CFBundleVersion should be an integer (probably the same as Current Project Version). In Build Settings make sure these are set: Versioning System = apple-generic Current Project Version = 1 (or whatever) Preprocess Info.plist File = YES Info.plist Preprocessor Definitions = (see below) Info.plist Other Preprocessor Flags = -C The Info.plist Preprocessor Definitions are extra macros, which you can set to different values according to the build configuration. You can add a macro like _CONFIGURATION_=Debug etc. I think we should create separate build configurations for releases and for nightly builds. Then we can add a macro _RELEASE_ in the build configuration for the releases. These definitions can be useful in preprocessing the Info.plist file. E.g. you could use NSHumanReadableCopyright #ifdef _RELEASE_ Copyright 2001-06 A. Name. #else _CONFIGURATION_ version build on __DATE__ __TIME_. #endif Here is more info: http://www.gigliwood.com/weblog/Cocoa http://developer.apple.com/documentation/DeveloperTools/Conceptual/ XcodeUserGuide21/Contents/Resources/en.lproj/05_02_bs_targets/ chapter_30_section_6.html Christiaan On 12 Feb 2006, at 8:10 PM, Adam Salter wrote: > > Does anybody know of a way to automatically update a plist file on > every build, so that you can have information like in Apple apps > with a Version 1.0.1 (234) version number? > > I thought that version.plist might be such a beast, but it doesn't > seem to do anything that I can see... > > Thanks, > Adam > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From nat at mulle-kybernetik.com Mon Feb 13 01:39:02 2006 From: nat at mulle-kybernetik.com (Nat!) Date: Mon Feb 13 01:39:13 2006 Subject: Intel ABI and function pointers In-Reply-To: <965B268C-C438-4306-ADAB-0D08B5DFB30D@ghosttiger.com> References: <665EEAB7-CC48-4E48-AD6C-DD34AF30EE93@ghosttiger.com> <965B268C-C438-4306-ADAB-0D08B5DFB30D@ghosttiger.com> Message-ID: <8F0873E4-7CD9-4DC4-9C97-D219B9685606@mulle-kybernetik.com> Am 13.02.2006 um 03:23 schrieb Jonathan Grynspan: > Well, I think see what he means. I was kind of hoping against hope. > > There's always the potential to smash the stack, though I can't > think offhand of a situation that could cause this on either PPC or > IA-32. Neither can I. > > It's also non-portable. Let's say Apple decides to move to Acme > Brand Processors next week. Acme's ABI uses a calling convention > where all arguments are passed on the stack, and the caller handles > stack setup, but the callee handles stack teardown. Yeah in Pascal or some other languages it might be a problem but I don't see that for C. So conversely since C must be supported by the ABIs I don't see that for any ABI. Ciao Nat! ------------------------------------------------------ I was hoping that the people of the world might be united by something more interesting, like drugs or an armed struggle against the undead. Unfortunately my father's team won, so computers it is. -- Sedaris From ap-carbon at rambler.ru Mon Feb 13 01:02:32 2006 From: ap-carbon at rambler.ru (Alexey Proskuryakov) Date: Mon Feb 13 02:09:40 2006 Subject: NSMutableURLRequest headers unsorted/scrambled. In-Reply-To: <056D8636-732C-464C-8E2A-357911060C9C@skyrix.com> Message-ID: On 12.02.2006 14:30, "Helge Hess" wrote: > The ordering of headers (and other stuff like case sensitivity) is > not relevant in HTTP, if your SOAP service depends on that its b0rked > and should be fixed. I absolutely agree with that. Unfortunately, in real life, I've also seen servers that do not respect case-insensitivity, and I think that arbitrarily changing the case and order of headers is a serious bug in NSURLConnection. Fixing the server was never an option :( My report about changing the case is . - WBR, Alexey Proskuryakov From christiaan.hofman at weizmann.ac.il Mon Feb 13 06:43:44 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Mon Feb 13 06:43:58 2006 Subject: Core Data, transient ivars and undo In-Reply-To: References: <95D23715-9453-4EEB-9C3F-E1B36AFAB8AA@weizmann.ac.il> Message-ID: On 13 Feb 2006, at 1:09 AM, listposter@mac.com wrote: > Christiaan Hofman wrote: > >> I am very much confused about undo in Core Data, in particular >> when it comes to "transient" values and other dependent state >> information. AFAICS the transient value or state info is not >> updated in any way in undo, which can easily lead to inconsistent >> states in CD apps. How should I handle this in general? >> >> For example a "transient" value stored in an ivar. Eg for a non- >> standard attribute, which is stored in the MOC as data, but has an >> ivar representation in a NSManagedObject subclass. Usually, you >> interact with the transient value (ivar) rather than the >> underlying CD value. However it is the data in the MOC that is >> changed in undo, and only that. So you get an inconsistent state. >> Writing (KVC compliant) accessors for the underlying data does not >> help, as they are not called by undo. > >> In the docs and example projects like CoreRecipes many accessors >> seem to have this flaw. Eg the "bounds" example in "Non-Standard >> Attributes" section of the Core Data Programming Guide. Here the >> bounds ivar and the boundsAsData atribute should always be >> synchronized. However, AFAICS, if I would undo setting (changing) >> the bounds, only the boundsAsData attribute is changed, giving me >> an inconsistent state. This seems to me a bug in CD, or at least >> in the docs and the examples, as nothing is mentioned about it. > Perhaps [self setKey:@"boundsAsData" > triggerChangeNotificationForDependentKeys:[NSArray > arrayWithObject:@"bounds"]] ? > Since, bounds is not "known" by core data that it is related to > boundsAsData, it needs to be told they are, I beleive that telling > core data to generate a change note when boundsAsData changes to > also notify observers of the change to bounds, would call the > getter in your bounds method, and reverse the change.... have you > tried this? > No, this would not work. This way just observers are told that bounds has changed as well, however the actual value of the ivar bounds has not changed, which is the real problem. When the getter is called the stale value for bounds is found and returned. No new value is generated as it was not reset (note that it is only regenerated when it has the proper zero value, otherwise it would always be regenerated). BTW, in the actual example in the docs undo would work properly, as bounds is declared as a transient value in the MOM (even though the primitiveValue is not used, CD is smart enough to find the ivar). However I am asking about a situation where this is not, for example if the type is not of a KVC compliant type. Note that this is just a very simple version of a more general problem, where there can be more complex state information depending on the managed data. E.g. the contents of a smartgroup has to be regenerated when the (managed) predicateData changes through undo, but you definitely don't want to regenerate this every time someone asks for it. Christiaan >> So my question is: how should I handle dependent state information >> in general so that undo works properly? Do I need to observe MOM >> keys for values on which the state of some object depends? Or >> should I explicitly register undo operations when I change an ivar >> such as the bounds in the example? It would have been helpful (I >> would even say required) that these issues were mentioned in the >> docs, especially as undo is automatic with little information and >> control about what's going on behind the scene. > I think setKey: triggerChangeNotificationForDependentKeys may be > your answer. Called in +initialize it may work for your particular > difficulty. > >> Christiaan From bob at apple.com Mon Feb 13 13:40:37 2006 From: bob at apple.com (Bob Frank) Date: Mon Feb 13 13:39:48 2006 Subject: [MEET] Chicago CAWUG / CocoaHeads - Tuesday 2/14 In-Reply-To: References: Message-ID: <6E72591A-C24C-4357-A074-E4DE7016B5C7@apple.com> Hi All, The Chicago Cocoa and WebObjects User Group (CAWUG) is holding our next meeting this coming Tuesday, February 14th, at 6:00 PM at the Apple Store on Michigan Ave. Hope to see you there. Agenda: - Introductions & Announcements - Comparing WebObjects & Ruby on Rails by Jonathan 'Wolf' Rentzsch - Q & A - adjournment to O'Toole's When: Tuesday, November 1st, 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 - Comparing WebObjects & Rails (i.e. Ruby on Rails) by Jonathan 'Wolf' Rentzsch Jon's story on porting an existing WO application to Rails (and the painful differences between them). - 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, Steve Lorenz for hosting our listserve, 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 (you can pick one, or O'Reilly sent us a few for the user group). Future meetings dates: 3/14 & 4/11 CAWUG Resources Web Site: http://www.cawug.org/ RSS feed: http://www.cawug.org/rss.xml Mail list: http://mail-lists.xantham.net/mailman/listinfo/cawug iCal: http://ical.mac.com/alex27/CAWUG (view on the web) iCal: webcal://ical.mac.com/alex27/CAWUG.ics (subscribe to in iCal) NOTE: please stay tuned to this space, in the next few months we will be changing our calendar to a different URL. Hope to see you at the meeting. -Bob From christiaan.hofman at weizmann.ac.il Tue Feb 14 01:03:42 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Tue Feb 14 01:03:52 2006 Subject: Core Data, transient ivars and undo In-Reply-To: <18F7C872-1F17-43D8-A6C8-2F647AA822E9@mac.com> References: <95D23715-9453-4EEB-9C3F-E1B36AFAB8AA@weizmann.ac.il> <18F7C872-1F17-43D8-A6C8-2F647AA822E9@mac.com> Message-ID: On 14 Feb 2006, at 10:27 AM, listposter@mac.com wrote: > > On ?? 18/02/13, at 6:43, Christiaan Hofman wrote: > >> >> On 13 Feb 2006, at 1:09 AM, listposter@mac.com wrote: >> >>> Christiaan Hofman wrote: >>> >>>> I am very much confused about undo in Core Data, in particular >>>> when it comes to "transient" values and other dependent state >>>> information. AFAICS the transient value or state info is not >>>> updated in any way in undo, which can easily lead to >>>> inconsistent states in CD apps. How should I handle this in >>>> general? >>>> >>>> For example a "transient" value stored in an ivar. Eg for a non- >>>> standard attribute, which is stored in the MOC as data, but has >>>> an ivar representation in a NSManagedObject subclass. Usually, >>>> you interact with the transient value (ivar) rather than the >>>> underlying CD value. However it is the data in the MOC that is >>>> changed in undo, and only that. So you get an inconsistent >>>> state. Writing (KVC compliant) accessors for the underlying data >>>> does not help, as they are not called by undo. >>> >>>> In the docs and example projects like CoreRecipes many accessors >>>> seem to have this flaw. Eg the "bounds" example in "Non-Standard >>>> Attributes" section of the Core Data Programming Guide. Here the >>>> bounds ivar and the boundsAsData atribute should always be >>>> synchronized. However, AFAICS, if I would undo setting >>>> (changing) the bounds, only the boundsAsData attribute is >>>> changed, giving me an inconsistent state. This seems to me a bug >>>> in CD, or at least in the docs and the examples, as nothing is >>>> mentioned about it. >>> Perhaps [self setKey:@"boundsAsData" >>> triggerChangeNotificationForDependentKeys:[NSArray >>> arrayWithObject:@"bounds"]] ? >>> Since, bounds is not "known" by core data that it is related to >>> boundsAsData, it needs to be told they are, I beleive that >>> telling core data to generate a change note when boundsAsData >>> changes to also notify observers of the change to bounds, would >>> call the getter in your bounds method, and reverse the change.... >>> have you tried this? >>> >> >> No, this would not work. This way just observers are told that >> bounds has changed as well, however the actual value of the ivar >> bounds has not changed, which is the real problem. When the getter >> is called the stale value for bounds is found and returned. No new >> value is generated as it was not reset (note that it is only >> regenerated when it has the proper zero value, otherwise it would >> always be regenerated). > I see, how about in the boundsAsData method, override it to also > reset the cached value of bounds so that the next time bounds is > called, the cached value is non-existent, then it can regenerate > the cache and return it the next time bounds is called? Would that > work? > The question is: where should the cached (derived) data be reset? You seem to suggest here to do it in he getter, but that is equivalent to recalculating the derived data every time, making the cache useless, and this can become very inefficient (note that the getter cannot know if it was called after it was invalidate unless it was already invalidated). Doing this in a setter will not work, as undo does not call those. KVO dependent keys don't call anything, they merely notify, so they cannot invalidate the data either. I don't see any other way than KVO observing. >> BTW, in the actual example in the docs undo would work properly, >> as bounds is declared as a transient value in the MOM (even though >> the primitiveValue is not used, CD is smart enough to find the >> ivar). However I am asking about a situation where this is not, >> for example if the type is not of a KVC compliant type. Note that >> this is just a very simple version of a more general problem, >> where there can be more complex state information depending on the >> managed data. E.g. the contents of a smartgroup has to be >> regenerated when the (managed) predicateData changes through undo, >> but you definitely don't want to regenerate this every time >> someone asks for it. >> >> Christiaan >> >>>> So my question is: how should I handle dependent state >>>> information in general so that undo works properly? Do I need to >>>> observe MOM keys for values on which the state of some object >>>> depends? Or should I explicitly register undo operations when I >>>> change an ivar such as the bounds in the example? It would have >>>> been helpful (I would even say required) that these issues were >>>> mentioned in the docs, especially as undo is automatic with >>>> little information and control about what's going on behind the >>>> scene. >>> I think setKey: triggerChangeNotificationForDependentKeys may be >>> your answer. Called in +initialize it may work for your >>> particular difficulty. >>> >>>> Christiaan >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > Andre > listposter@mac.com > Christiaan From christiaan.hofman at weizmann.ac.il Tue Feb 14 01:56:16 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Tue Feb 14 01:56:21 2006 Subject: core data: transient entities? Message-ID: <70EC0CCD-738D-4F87-A22B-C74CFF5363C3@weizmann.ac.il> In an app we are developing we have some dynamically generated temporary entities. So in a way, they should be transient, similar to transient properties, and never be saved. However Core Data does not seem to have such a concept for entities. This gives me some problems with undo and the dirty state of the document. More concretely, the setup is a bit like a smart group. However it does not just auto-generate a (temporary) set of items, but rather a set of subgroups, that categorize the contained items. These subgroups are entities, and should be temporary: every time the parent 'smart group' refreshes, it disposes of them and rebuilds the set. Also, those subgroups should never be saved, as they are dynamically generated. The problem is that creating and deleting the temporary items marks the document as dirty. Even when I completely undo everything, the document still remains dirty. This seems to be related to deleting the subgroups. If I don't delete the subgroups, I can get the document not dirtied. However then the subgroups stay around in the context even after they have been replaced by new ones, which is certainly unwanted. BTW, I even have turned off undo while building and disposing of the set of subgroups, without success. Also it does not seem to matter whether I declare the relationship to the subgroups in the managed object model, or have it just as an ivar. Would anyone have an idea how to properly do this, and avoid dirtying the doc in this situation? Christiaan From christiaan.hofman at weizmann.ac.il Tue Feb 14 10:53:50 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Tue Feb 14 10:54:14 2006 Subject: Core Data, transient ivars and undo In-Reply-To: <5FE238D9-ADC9-4B81-A8D4-A9B302D822A4@mac.com> References: <95D23715-9453-4EEB-9C3F-E1B36AFAB8AA@weizmann.ac.il> <18F7C872-1F17-43D8-A6C8-2F647AA822E9@mac.com> <5FE238D9-ADC9-4B81-A8D4-A9B302D822A4@mac.com> Message-ID: <1C08E653-F7B8-422F-A09F-591ABEB358B8@weizmann.ac.il> On 14 Feb 2006, at 8:00 PM, Andre wrote: > > On ?? 18/02/14, at 1:03, Christiaan Hofman wrote: > >> >> On 14 Feb 2006, at 10:27 AM, listposter@mac.com wrote: >> >>> >>> On ?? 18/02/13, at 6:43, Christiaan Hofman wrote: >>> >>>> >>>> On 13 Feb 2006, at 1:09 AM, listposter@mac.com wrote: >>>> >>>>> Christiaan Hofman wrote: >>>>> >>>>>> I am very much confused about undo in Core Data, in particular >>>>>> when it comes to "transient" values and other dependent state >>>>>> information. AFAICS the transient value or state info is not >>>>>> updated in any way in undo, which can easily lead to >>>>>> inconsistent states in CD apps. How should I handle this in >>>>>> general? >>>>>> >>>>>> For example a "transient" value stored in an ivar. Eg for a >>>>>> non-standard attribute, which is stored in the MOC as data, >>>>>> but has an ivar representation in a NSManagedObject subclass. >>>>>> Usually, you interact with the transient value (ivar) rather >>>>>> than the underlying CD value. However it is the data in the >>>>>> MOC that is changed in undo, and only that. So you get an >>>>>> inconsistent state. Writing (KVC compliant) accessors for the >>>>>> underlying data does not help, as they are not called by undo. >>>>> >>>>>> In the docs and example projects like CoreRecipes many >>>>>> accessors seem to have this flaw. Eg the "bounds" example in >>>>>> "Non-Standard Attributes" section of the Core Data Programming >>>>>> Guide. Here the bounds ivar and the boundsAsData atribute >>>>>> should always be synchronized. However, AFAICS, if I would >>>>>> undo setting (changing) the bounds, only the boundsAsData >>>>>> attribute is changed, giving me an inconsistent state. This >>>>>> seems to me a bug in CD, or at least in the docs and the >>>>>> examples, as nothing is mentioned about it. >>>>> Perhaps [self setKey:@"boundsAsData" >>>>> triggerChangeNotificationForDependentKeys:[NSArray >>>>> arrayWithObject:@"bounds"]] ? >>>>> Since, bounds is not "known" by core data that it is related to >>>>> boundsAsData, it needs to be told they are, I beleive that >>>>> telling core data to generate a change note when boundsAsData >>>>> changes to also notify observers of the change to bounds, would >>>>> call the getter in your bounds method, and reverse the >>>>> change.... have you tried this? >>>>> >>>> >>>> No, this would not work. This way just observers are told that >>>> bounds has changed as well, however the actual value of the ivar >>>> bounds has not changed, which is the real problem. When the >>>> getter is called the stale value for bounds is found and >>>> returned. No new value is generated as it was not reset (note >>>> that it is only regenerated when it has the proper zero value, >>>> otherwise it would always be regenerated). >>> I see, how about in the boundsAsData method, override it to also >>> reset the cached value of bounds so that the next time bounds is >>> called, the cached value is non-existent, then it can regenerate >>> the cache and return it the next time bounds is called? Would >>> that work? >>> >> The question is: where should the cached (derived) data be reset? >> You seem to suggest here to do it in he getter, but that is >> equivalent to recalculating the derived data every time, making >> the cache useless, and this can become very inefficient (note that >> the getter cannot know if it was called after it was invalidate >> unless it was already invalidated). Doing this in a setter will >> not work, as undo does not call those. KVO dependent keys don't >> call anything, they merely notify, so they cannot invalidate the >> data either. I don't see any other way than KVO observing. > I see... here was what I was thinking. In the setter for > boundsAsData, set the value of (cached) bounds (setting the > variable directly) to nil. Then, only if the value of the cached > bounds is nill, it (the bounds getter) recalculates from the > derived value and sets the cache (directly, not using KVC), > otherwise it simply calls the cached value. If there are any > observers of bounds, then the dependent key notification will let > those observers know that when boundsAsData changed, also bounds is > changed, and they will pull the data from bounds. If there are no > observers, then its OK if the bounds cache is stale, since its nil, > only the first time its called, bounds is recalculated from the > derived value, then subsequent calls are from the cache, as long as > the cache is non-nil. It should be pretty effecient....KVB/KVO > basically encourages the lazy/deferred approach to data management > AFIACS. > I think you don't understand the question. In the bounds example, the cached bounds ivar is what I call the derived value. The persistent managed data is the boundsAsData value. In practice most of the app will work directly with the cached ivar. I don 't think in such a situation, where the persistent value is not directly accessed, there should be a need to implement a custom accessor at all. In fact setting the cache to nil in this setter will be useless, as the setter will never be called (by undo for instance). Therefore the stale value of the cache will _not_ be nil (or an appropriate zero value), which is a problem. So I think either the cache should be a transient attribute in the MOM, as in examples the docs (this is the easy case in which I am not interested). Or any refreshing of cache values and other dependent data should be done through KVO observation method. I see no other way. So something like the following: - (void)refresh { [self willChangeValueForKey:@"dependentValue"]; dependentValue release]; dependentValue = nil; [self didChangeValueForKey:@"dependentValue"]; // this can do more complicated stuff, like refreshing a smart group } - (id)dependentValue { if (dependentValue == nil) { dependentValue = [[self recalculateDependentValue] retain]; } return dependentValue; } - (void)setDependentValue:(id)value { NSData *persistentData = [self calculateDataFromDependentValue:value]; [self setValue:persistentData forKey:@"persistentData"]; // the dependent value will be automatically refreshed through KVO } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void)context { if ([keyPath isEqual:@"persistentData"]) { [self refresh]; } } Would this be the basic way to implement this kind of situation? I tried to think about the third option, where I implement by hand undo on the derived values. But this has a problem with redo. Or am I wrong? >>>> BTW, in the actual example in the docs undo would work properly, >>>> as bounds is declared as a transient value in the MOM (even >>>> though the primitiveValue is not used, CD is smart enough to >>>> find the ivar). However I am asking about a situation where this >>>> is not, for example if the type is not of a KVC compliant type. >>>> Note that this is just a very simple version of a more general >>>> problem, where there can be more complex state information >>>> depending on the managed data. E.g. the contents of a smartgroup >>>> has to be regenerated when the (managed) predicateData changes >>>> through undo, but you definitely don't want to regenerate this >>>> every time someone asks for it. >>>> >>>> Christiaan >>>> >>>>>> So my question is: how should I handle dependent state >>>>>> information in general so that undo works properly? Do I need >>>>>> to observe MOM keys for values on which the state of some >>>>>> object depends? Or should I explicitly register undo >>>>>> operations when I change an ivar such as the bounds in the >>>>>> example? It would have been helpful (I would even say >>>>>> required) that these issues were mentioned in the docs, >>>>>> especially as undo is automatic with little information and >>>>>> control about what's going on behind the scene. >>>>> I think setKey: triggerChangeNotificationForDependentKeys may >>>>> be your answer. Called in +initialize it may work for your >>>>> particular difficulty. >>>>> >>>>>> Christiaan >>>> >>>> _______________________________________________ >>>> MacOSX-dev mailing list >>>> MacOSX-dev@omnigroup.com >>>> http://www.omnigroup.com/mailman/listinfo/macosx-dev >>> >>> Andre >>> listposter@mac.com >>> >> >> Christiaan >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > Andre > listposter@mac.com > Christiaan From huntc at internode.on.net Wed Feb 15 02:24:36 2006 From: huntc at internode.on.net (Christopher Hunt) Date: Wed Feb 15 02:24:55 2006 Subject: Displaying natively to a 852 x 480 Plasma display Message-ID: Hi there, I'm looking to display my software on a Plasma with a native resolution of 852 x 480. I don't actually have the plasma, so I can't test it out until I buy it (which will depend on whether I can do what I need to do!). Can anybody indicate whether the following code should be sufficient to map my Mac Mini to the Plasma's native resolution? Would I need to do this via DVI-D to accurately control the resolution? boolean_t theModeMatched; CFDictionaryRef theNewDisplayMode = CGDisplayBestModeForParametersAndRefreshRateWithProperty( kCGDirectMainDisplay, 32, 852, 480, 60.0, kCGDisplayModeIsSafeForHardware, &theModeMatched ); if (theNewDisplayMode) CGDisplaySwitchToMode(kCGDirectMainDisplay, theNewDisplayMode); Additionally can anyone indicate what the kCGDisplayModeIsSafeForHardware property is really about. Unfortunately it isn't terribly well documented. Thanks for any help. Cheers, -C From marcrespass at mac.com Wed Feb 15 19:11:12 2006 From: marcrespass at mac.com (Marc Respass) Date: Wed Feb 15 19:11:19 2006 Subject: Authenticating via Open Directory? Message-ID: <54E05666-5B42-41B6-9B24-49E8E541D08B@mac.com> Hi All, Has anyone authenticated against open directory? I have a need authenticate directly to a password server (Tiger Server) rather than through the local directory services configuration. I have the sample code from CryptNoMore. I integrated that and it works perfectly against my local system. I tried to adapt it to use a remote password server and used dsOpenDirServiceProxy() but I get back eDSTCPReceiveError. FWIW, here is the code that I use err = dsOpenDirService(&dirRef); size_t userNameLen = strlen(username); size_t passwordLen = strlen(password); const char *inIPAddress = "10.1.1.1"; unsigned long inIPPort = 106; tDataNodePtr inAuthMethod = dsDataNodeAllocateString(dirRef, kDSStdAuthNodeNativeClearTextOK); tDataBufferPtr inAuthStepData = dsDataBufferAllocate(dirRef, sizeof (length) + userNameLen + 1 + sizeof(length) + passwordLen + 1 ); tDataBufferPtr outAuthStepDataResponse; tContextData *ioContinueData = NULL; err = dsOpenDirServiceProxy(&dirRef, inIPAddress, inIPPort, inAuthMethod, inAuthStepData, outAuthStepDataResponse, ioContinueData); I really don't know what I'm doing :). I'm not sure that port 106 is correct. The error return makes me think that I did get in and something went wrong in the response. I cannot find anything more on eDSTCPReceiveError. If anyone can poing me in the right direction, that would be great. My searches are leading no where good. Marc From dunham at mac.com Wed Feb 15 22:35:59 2006 From: dunham at mac.com (David Dunham) Date: Wed Feb 15 22:36:11 2006 Subject: NSView gets 2click even after creating intervening view Message-ID: <5AD7A210-F4B9-43D5-A4C7-38DA1865EBCF@mac.com> I'm a little confused by this. My view will create an NSTextView when clicked in certain areas, and passes the event on to the new view, which tracks just file (i.e. you can click-drag to select text). If you double-click my view, mouseDown: is sent twice. Even though after the first mouseDown: there is an NSTextView sitting at that exact location. How come the view hierarchy isn't observed for the second click? David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From beos at gmx.ch Thu Feb 16 04:56:48 2006 From: beos at gmx.ch (Matthias Schonder) Date: Thu Feb 16 04:57:09 2006 Subject: [Interface Builder]Changing Size between CustomViews Message-ID: <20331.1140094608@www042.gmx.net> Hei, I've got a question about InterfaceBuilder. How do I manage it, that a user can change the size of one CustomView. Or in otherwords, how do I get the little spot between controlls? Thank you very much in advance. Matthias Schonder -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie From christiaan.hofman at weizmann.ac.il Thu Feb 16 05:10:33 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Thu Feb 16 05:10:45 2006 Subject: [Interface Builder]Changing Size between CustomViews In-Reply-To: <20331.1140094608@www042.gmx.net> References: <20331.1140094608@www042.gmx.net> Message-ID: <5A54A00F-BE52-47FA-A0B3-BEB1A29276A2@weizmann.ac.il> On 16 Feb 2006, at 2:56 PM, Matthias Schonder wrote: > Hei, > > I've got a question about InterfaceBuilder. > How do I manage it, that a user can change the size of one > CustomView. Or > in otherwords, how do I get the little spot between controlls? > > Thank you very much in advance. > > Matthias Schonder > Put two (or more) views in a splitView: line up the views (best results if there is 9 px in between and they line up exactly) and select Layout > Make subviews of > Split View. It is important that you do the most of the layout before wrapping them in the split view, because split views are notoriously hard to adjust in IB. Christiaan From jim.correia at pobox.com Thu Feb 16 05:37:16 2006 From: jim.correia at pobox.com (Jim Correia) Date: Thu Feb 16 05:37:29 2006 Subject: [Interface Builder]Changing Size between CustomViews In-Reply-To: <5A54A00F-BE52-47FA-A0B3-BEB1A29276A2@weizmann.ac.il> References: <20331.1140094608@www042.gmx.net> <5A54A00F-BE52-47FA-A0B3-BEB1A29276A2@weizmann.ac.il> Message-ID: On Feb 16, 2006, at 8:10 AM, Christiaan Hofman wrote: > Put two (or more) views in a splitView: line up the views (best > results if there is 9 px in between and they line up exactly) and > select Layout > Make subviews of > Split View. It is important that > you do the most of the layout before wrapping them in the split > view, because split views are notoriously hard to adjust in IB. In fact, I'd suggest not putting any complex views in a split view in IB - you'll lose your mind for this very reasons. I put the split view in my window, with placeholder content views, and put the real content views as top level views in the nib, and swap them into place at runtime. Jim From idiotsavant2005 at gmail.com Thu Feb 16 05:56:53 2006 From: idiotsavant2005 at gmail.com (I. Savant) Date: Thu Feb 16 05:56:59 2006 Subject: [Interface Builder]Changing Size between CustomViews In-Reply-To: References: <20331.1140094608@www042.gmx.net> <5A54A00F-BE52-47FA-A0B3-BEB1A29276A2@weizmann.ac.il> Message-ID: <7818F702-02FD-4451-91A1-2A77946166FA@gmail.com> On Feb 16, 2006, at 8:37 AM, Jim Correia wrote: > In fact, I'd suggest not putting any complex views in a split view > in IB - you'll lose your mind for this very reasons. Amen, Brother Correia! :-) We'd all be doing ourselves a favor to learn thoroughly how to do *all* of what IB does at runtime. My latest project (a complete overhaul of an existing app) is being done almost entirely in code because of the complicated nature of the UI. The parts I do in IB are the standard views with lots of controls (like the preferences views, various sheets, etc.) but I plug them in at runtime too. I once spent a week making just two *minor* adjustments to my pathetic attempt to wire this all up with IB, fighting this precise problem (complex subviews in split views ... in tabless tab views, in other split views, etc.). This way lies madness. -- I.S. From christiaan.hofman at weizmann.ac.il Thu Feb 16 05:57:59 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Thu Feb 16 05:58:05 2006 Subject: NSTreeController selection binding Message-ID: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> I'd like to bind a particular KVC compliant property of a windowController to the object selected by a NSTreeController. I have no idea how to do that though. The only binding for selection of a treeController seems to be selectionIndexPath, but that seems rather useless to me as I don't know how to connect the indexPath to the actual object it represents. NSIndexPath seems a rather useless concept, except for internal use in standard bindings, as there is no methods like objectAtIndexPath:, like you have for arrays and NSIndexSet. Also most objects NSTreeController returns (like arrangedObjects) are completely opaque, so you can't do anything with them. NSTreeController is badly lacking in its (public) interface. Right now, I am observing the selectedObjects of the treeController, and set my property in the observation method. However that works only one way. And as NSTreeController does not have a - setSelectedObject(s): method, I don't know how to set the selection programmatically. Would anyone know how to do this? Thank, Christiaan From jim.correia at pobox.com Thu Feb 16 06:16:57 2006 From: jim.correia at pobox.com (Jim Correia) Date: Thu Feb 16 06:17:01 2006 Subject: NSTreeController selection binding In-Reply-To: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> References: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> Message-ID: <327FF593-E557-45E8-B2DA-E71564F00AA8@pobox.com> On Feb 16, 2006, at 8:57 AM, Christiaan Hofman wrote: > And as NSTreeController does not have a -setSelectedObject(s): > method, I don't know how to set the selection programmatically. > > Would anyone know how to do this? I have little direct experience with NSTreeController, but it appears that you must set the selection via an NSIndexPath (or an array of the same for multiple objects.) Jim From christiaan.hofman at weizmann.ac.il Thu Feb 16 06:24:27 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Thu Feb 16 06:24:34 2006 Subject: NSTreeController selection binding In-Reply-To: <327FF593-E557-45E8-B2DA-E71564F00AA8@pobox.com> References: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> <327FF593-E557-45E8-B2DA-E71564F00AA8@pobox.com> Message-ID: On 16 Feb 2006, at 4:16 PM, Jim Correia wrote: > On Feb 16, 2006, at 8:57 AM, Christiaan Hofman wrote: > >> And as NSTreeController does not have a -setSelectedObject(s): >> method, I don't know how to set the selection programmatically. >> >> Would anyone know how to do this? > > I have little direct experience with NSTreeController, but it > appears that you must set the selection via an NSIndexPath (or an > array of the same for multiple objects.) > > Jim > yea, that seems to be the case, and the problem. How do I find the indexPath for my object? There does not seem to be a single public interface to go from one to the other. In the program I usually know only about the objects. While the treeController only knows about indexPath. It's like talking Chinese... Christiaan From smokinmonkey at yahoo.com Thu Feb 16 08:17:18 2006 From: smokinmonkey at yahoo.com (Michael Dupuis) Date: Thu Feb 16 08:17:24 2006 Subject: Building universal binaries to run on both 10.3.9 and 10.4 - link errors? Message-ID: <20060216161718.21077.qmail@web30515.mail.mud.yahoo.com> Greetings, I'm wondering if anyone else who might be building UBs that need to run on both 10.3.9 and 10.4+ have run into this issue. My current build settings, based on Apple's docs are as follows for my Release build: In project info: Cross-Develop using Target SDK is set to Mac OS X 10.4 (I've tried current and 10.9.3 as well, none resolved this). SDKROOT: /Developer/SDKs/MacOSX10.4u.sdk MACOSX_DEPLOYMENT_TARGET: Mac OS X 10.3 GCC_VERSION_i386: 4.0 GCC_VERSION_ppc: 3.3 MACOSX_DEPLOYMENT_TARGET_i386: 10.4 MACOSX_DEPLOYMENT_TARGET_ppc: 10.3 SDKROOT_PPC: /Developer/SDKs/MacOSX10.3.9.sdk SDKROOT_i386: /Developer/SDKs/MacOSX10.4u.sdk When I build the Release target, which will build my universal binary, I get these link errors: ld: Undefined symbols: ___gcc_qadd ___gcc_qdiv ___gcc_qmul ___gcc_qsub I'm building this on an Intel Mac, and I've followed the docs, is there something I'm missing? There must be. Thanks for any help. Michael __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ssen at apple.com Thu Feb 16 08:20:29 2006 From: ssen at apple.com (Shantonu Sen) Date: Thu Feb 16 08:20:30 2006 Subject: Building universal binaries to run on both 10.3.9 and 10.4 - link errors? In-Reply-To: <20060216161718.21077.qmail@web30515.mail.mud.yahoo.com> References: <20060216161718.21077.qmail@web30515.mail.mud.yahoo.com> Message-ID: <9BF1B881-E17C-4F4C-ADD4-D6C747F4902D@apple.com> For one thing, you're using SDKROOT_PPC instead of SDKROOT_ppc. Case matters, since it's the architecture name. Try that first, and see if it works... Shantonu On Feb 16, 2006, at 8:17 AM, Michael Dupuis wrote: > Greetings, > > I'm wondering if anyone else who might be building UBs > that need to run on both 10.3.9 and 10.4+ have run > into this issue. My current build settings, based on > Apple's docs are as follows for my Release build: > > In project info: Cross-Develop using Target SDK is set > to Mac OS X 10.4 (I've tried current and 10.9.3 as > well, none resolved this). > > SDKROOT: /Developer/SDKs/MacOSX10.4u.sdk > MACOSX_DEPLOYMENT_TARGET: Mac OS X 10.3 > GCC_VERSION_i386: 4.0 > GCC_VERSION_ppc: 3.3 > MACOSX_DEPLOYMENT_TARGET_i386: 10.4 > MACOSX_DEPLOYMENT_TARGET_ppc: 10.3 > SDKROOT_PPC: /Developer/SDKs/MacOSX10.3.9.sdk > SDKROOT_i386: /Developer/SDKs/MacOSX10.4u.sdk > > When I build the Release target, which will build my > universal binary, I get these link errors: > > ld: Undefined symbols: > ___gcc_qadd > ___gcc_qdiv > ___gcc_qmul > ___gcc_qsub > > I'm building this on an Intel Mac, and I've followed > the docs, is there something I'm missing? There must > be. Thanks for any help. > > Michael > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From smokinmonkey at yahoo.com Thu Feb 16 08:58:27 2006 From: smokinmonkey at yahoo.com (Michael Dupuis) Date: Thu Feb 16 08:58:30 2006 Subject: Building universal binaries to run on both 10.3.9 and 10.4 - link errors? In-Reply-To: <9BF1B881-E17C-4F4C-ADD4-D6C747F4902D@apple.com> Message-ID: <20060216165827.60520.qmail@web30502.mail.mud.yahoo.com> Of course I found my fix right AFTER sending this out. When I changed the compiler to gcc 4, which is fine because I'm requiring 10.3.9, all was well (Though I haven't tested it on a 10.3.9 box yet, one thing at a time), it runs on both PPC and Intel. > For one thing, you're using SDKROOT_PPC instead of > SDKROOT_ppc. Case > matters, since it's the architecture name. I did update this as suggested, after getting things to work, but it didn't seem to make a difference, for what it's worth. *shrug* Thanks! Michael __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jocked at chello.se Thu Feb 16 09:44:31 2006 From: jocked at chello.se (Joakim Danielson) Date: Thu Feb 16 09:44:38 2006 Subject: NSTreeController selection binding In-Reply-To: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> References: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> Message-ID: Matt has a modified version of Apple's DragNDropOutlineView on this page,http://homepage.mac.com/matthol2/cocoa/page2/page2.html, that contains an extension to NSTreeController. I think it might be what you're looking for. Joakim On 16 feb 2006, at 14.57, Christiaan Hofman wrote: > I'd like to bind a particular KVC compliant property of a > windowController to the object selected by a NSTreeController. I > have no idea how to do that though. > > The only binding for selection of a treeController seems to be > selectionIndexPath, but that seems rather useless to me as I don't > know how to connect the indexPath to the actual object it > represents. NSIndexPath seems a rather useless concept, except for > internal use in standard bindings, as there is no methods like > objectAtIndexPath:, like you have for arrays and NSIndexSet. Also > most objects NSTreeController returns (like arrangedObjects) are > completely opaque, so you can't do anything with them. > NSTreeController is badly lacking in its (public) interface. > > Right now, I am observing the selectedObjects of the > treeController, and set my property in the observation method. > However that works only one way. And as NSTreeController does not > have a -setSelectedObject(s): method, I don't know how to set the > selection programmatically. > > Would anyone know how to do this? > > Thank, > Christiaan > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From christiaan.hofman at weizmann.ac.il Thu Feb 16 10:20:58 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Thu Feb 16 10:21:06 2006 Subject: NSTreeController selection binding In-Reply-To: References: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> Message-ID: Thanks Joakim, I had the example already downloaded, but never really came to look at it in detail. Also, it is basically sneakily providing the needed interface by exposing the undocumented properties I am looking for, and hope Apple won't change its implementation. Usually that is not a very good idea, and I wish there was a better way using documented features. But maybe it is the only way at the moment. It seems Apple provided just a half finished job with TreeController, all the interface Matt provides in his subclass should have been exposed natively, I think, because they are extremely useful, if not essential. Christiaan On 16 Feb 2006, at 7:44 PM, Joakim Danielson wrote: > Matt has a modified version of Apple's DragNDropOutlineView on this > page,http://homepage.mac.com/matthol2/cocoa/page2/page2.html, that > contains an extension to NSTreeController. I think it might be what > you're looking for. > > Joakim > > On 16 feb 2006, at 14.57, Christiaan Hofman wrote: > >> I'd like to bind a particular KVC compliant property of a >> windowController to the object selected by a NSTreeController. I >> have no idea how to do that though. >> >> The only binding for selection of a treeController seems to be >> selectionIndexPath, but that seems rather useless to me as I don't >> know how to connect the indexPath to the actual object it >> represents. NSIndexPath seems a rather useless concept, except for >> internal use in standard bindings, as there is no methods like >> objectAtIndexPath:, like you have for arrays and NSIndexSet. Also >> most objects NSTreeController returns (like arrangedObjects) are >> completely opaque, so you can't do anything with them. >> NSTreeController is badly lacking in its (public) interface. >> >> Right now, I am observing the selectedObjects of the >> treeController, and set my property in the observation method. >> However that works only one way. And as NSTreeController does not >> have a -setSelectedObject(s): method, I don't know how to set the >> selection programmatically. >> >> Would anyone know how to do this? >> >> Thank, >> Christiaan >> >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > Christiaan ------------------------------------------------------------------- Christiaan Hofman Email: christiaan.hofman@weizmann.ac.il Dept. of Particle Physics WWW: http://www.weizmann.ac.il/~hofman Weizmann Institute Phone: (+972) 8 934 2943 Rehovot 76100, Israel Fax: (+972) 8 934 4172 ------------------------------------------------------------------- From christiaan.hofman at weizmann.ac.il Thu Feb 16 10:22:25 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Thu Feb 16 10:22:33 2006 Subject: NSTreeController selection binding In-Reply-To: <39F58DA3-7E16-41EF-8D0A-534C91E613B1@gold.ac.uk> References: <200602161658.k1GGwfqo019447@slowbro.omnigroup.com> <39F58DA3-7E16-41EF-8D0A-534C91E613B1@gold.ac.uk> Message-ID: On 16 Feb 2006, at 7:58 PM, Hamish Allan wrote: > > On Thu, 16 Feb 2006 16:24:27 +0200, Christiaan Hofman wrote: > >> On 16 Feb 2006, at 4:16 PM, Jim Correia wrote: >> >>> I have little direct experience with NSTreeController, but it >>> appears that you must set the selection via an NSIndexPath (or an >>> array of the same for multiple objects.) >> >> yea, that seems to be the case, and the problem. How do I find the >> indexPath for my object? There does not seem to be a single public >> interface to go from one to the other. In the program I usually know >> only about the objects. While the treeController only knows about >> indexPath. It's like talking Chinese... > > If you bind the selectionIndexPaths to the same object as provides > the root object for the NSTreeController, you can walk the tree > from there, setting another member variable that the window > controller is bound to. > > For instance, download my example project at http://igor.gold.ac.uk/ > ~map01ra/assorted/NSBrowserBugWorkarounds.zip -- then bind the > window title to selection.description of the DetailArrayController. > > Best wishes, > Hamish > Unfortunately that would not work for me. I use Core Data, and the treeControllers fetches entities from a context using a predicate, and does not bind to any root object. Also the order of items in a treeController is determined by the treeController, so you don't really know how to traverse the objects (unless your data has arrays as children, which for Core Data is usually not the case). Christiaan From matt at tidbits.com Thu Feb 16 12:35:57 2006 From: matt at tidbits.com (Matt Neuburg) Date: Thu Feb 16 12:36:56 2006 Subject: NSView gets 2click even after creating intervening view Message-ID: On Wed, 15 Feb 2006 22:35:59 -0800, David Dunham said: >I'm a little confused by this. > >My view will create an NSTextView when clicked in certain areas, and >passes the event on to the new view, which tracks just file (i.e. you >can click-drag to select text). > >If you double-click my view, mouseDown: is sent twice. Even though >after the first mouseDown: there is an NSTextView sitting at that >exact location. > >How come the view hierarchy isn't observed for the second click? My guess is that it's because the facts about the view hiearchy are cached, not dynamic. If they were dynamic things would be really slow. m. -- matt neuburg, phd = matt@tidbits.com, A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! From hamish.allan at gold.ac.uk Thu Feb 16 09:58:22 2006 From: hamish.allan at gold.ac.uk (Hamish Allan) Date: Thu Feb 16 15:26:41 2006 Subject: NSTreeController selection binding In-Reply-To: <200602161658.k1GGwfqo019447@slowbro.omnigroup.com> References: <200602161658.k1GGwfqo019447@slowbro.omnigroup.com> Message-ID: <39F58DA3-7E16-41EF-8D0A-534C91E613B1@gold.ac.uk> On Thu, 16 Feb 2006 16:24:27 +0200, Christiaan Hofman wrote: > On 16 Feb 2006, at 4:16 PM, Jim Correia wrote: > >> I have little direct experience with NSTreeController, but it >> appears that you must set the selection via an NSIndexPath (or an >> array of the same for multiple objects.) > > yea, that seems to be the case, and the problem. How do I find the > indexPath for my object? There does not seem to be a single public > interface to go from one to the other. In the program I usually know > only about the objects. While the treeController only knows about > indexPath. It's like talking Chinese... If you bind the selectionIndexPaths to the same object as provides the root object for the NSTreeController, you can walk the tree from there, setting another member variable that the window controller is bound to. For instance, download my example project at http://igor.gold.ac.uk/ ~map01ra/assorted/NSBrowserBugWorkarounds.zip -- then bind the window title to selection.description of the DetailArrayController. Best wishes, Hamish From dunham at mac.com Thu Feb 16 22:06:02 2006 From: dunham at mac.com (David Dunham) Date: Thu Feb 16 22:06:14 2006 Subject: NSFindPanel Message-ID: <607B3A1A-D65D-4AC6-A4FB-4932C4A15707@mac.com> says to use NSFindPanel. I can't find this... Several years ago, Ali Ozer said to steal the one from TextEdit, but I can't find one in its nibs either. I do get one for a specific NSTextView if I send it setUsesFindPanel: YES, but I want to run my own dialog (to search multiple NSTextViews). David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From christiaan.hofman at weizmann.ac.il Fri Feb 17 05:33:59 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Fri Feb 17 05:34:17 2006 Subject: NSFindPanel In-Reply-To: <607B3A1A-D65D-4AC6-A4FB-4932C4A15707@mac.com> References: <607B3A1A-D65D-4AC6-A4FB-4932C4A15707@mac.com> Message-ID: <8DC8B12C-FBE8-4193-8470-391195F3A3E0@weizmann.ac.il> On 17 Feb 2006, at 8:06 AM, David Dunham wrote: > OSXHIGuidelines/XHIGWindows/chapter_17_section_6.html> says to use > NSFindPanel. I can't find this... > > Several years ago, Ali Ozer said to steal the one from TextEdit, > but I can't find one in its nibs either. > > I do get one for a specific NSTextView if I send it > setUsesFindPanel: YES, but I want to run my own dialog (to search > multiple NSTextViews). > > David Dunham http://www.pensee.com/dunham/ > Imagination is more important than knowledge. -- Albert Einstein NSFindPanel is a private class, so you can't use it directly. It is called automatically by NSTextView. I think TextEdit now simply uses the build-in one from NSTextView, so you won't find it there anymore (maybe it was there in an older version, I don't remember.) If you want NSTextView (and the standard Find menu) to use a custom findpanel, you'll have to write your own version and subclass NSTextView to return that in -findPanelAction:. Note that this one action represents several different actions, which should depend on the sender's tag. You might also look in OmniAppKit, which has a findpanel (but not suited for the findPanelAction, for that you'll need to rewrite the action). Christiaan From dunham at mac.com Fri Feb 17 08:08:38 2006 From: dunham at mac.com (David Dunham) Date: Fri Feb 17 08:08:50 2006 Subject: NSFindPanel In-Reply-To: <8DC8B12C-FBE8-4193-8470-391195F3A3E0@weizmann.ac.il> References: <607B3A1A-D65D-4AC6-A4FB-4932C4A15707@mac.com> <8DC8B12C-FBE8-4193-8470-391195F3A3E0@weizmann.ac.il> Message-ID: <9573B484-FDC1-443E-B412-16AA3E535DE1@mac.com> On 17 Feb 2006, at 05:33, Christiaan Hofman wrote: > If you want NSTextView (and the standard Find menu) to use a custom > findpanel, you'll have to write your own version and subclass > NSTextView to return that in -findPanelAction:. Actually, what I wanted was the reverse. I'm using the standard Cocoa menu, which is preloaded with performFindPanelAction goodness. And I want to use the standard find panel. I just want to do my own finding, so that users can find text in multiple NSTextViews, even if an NSTextView isn't the first responder. I guess I'll look into Omni's. (I figured I'd probably need to subclass NSTextView to handle find, so as to skip to the next NSTextView.) ------------ David Dunham dunham@mac.com http://www.pensee.com/dunham/ "No matter how far you have gone on a wrong road, turn back." - Turkish proverb From amaxwell at mac.com Fri Feb 17 08:21:45 2006 From: amaxwell at mac.com (Adam R. Maxwell) Date: Fri Feb 17 08:21:33 2006 Subject: NSFindPanel In-Reply-To: <8DC8B12C-FBE8-4193-8470-391195F3A3E0@weizmann.ac.il> References: <607B3A1A-D65D-4AC6-A4FB-4932C4A15707@mac.com> <8DC8B12C-FBE8-4193-8470-391195F3A3E0@weizmann.ac.il> Message-ID: On Feb 17, 2006, at 05:33, Christiaan Hofman wrote: > > On 17 Feb 2006, at 8:06 AM, David Dunham wrote: > >> > Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_6.html> >> says to use NSFindPanel. I can't find this... >> >> Several years ago, Ali Ozer said to steal the one from TextEdit, >> but I can't find one in its nibs either. >> >> I do get one for a specific NSTextView if I send it >> setUsesFindPanel: YES, but I want to run my own dialog (to search >> multiple NSTextViews). >> >> David Dunham http://www.pensee.com/dunham/ >> Imagination is more important than knowledge. -- Albert Einstein > > NSFindPanel is a private class, so you can't use it directly. It is > called automatically by NSTextView. I think TextEdit now simply > uses the build-in one from NSTextView, so you won't find it there > anymore (maybe it was there in an older version, I don't remember.) MagicHat doesn't show NSFindPanel on my machine, so I wonder where that came from? The find panel was rolled into NSTextView for 10.3, so you'd have to find a 10.2-era TextEdit project and grab the nib from it. > If you want NSTextView (and the standard Find menu) to use a custom > findpanel, you'll have to write your own version and subclass > NSTextView to return that in -findPanelAction:. Note that this one > action represents several different actions, which should depend on > the sender's tag. You might also look in OmniAppKit, which has a > findpanel (but not suited for the findPanelAction, for that you'll > need to rewrite the action). It's pretty easy to add support for OAFindPanel in a category on NSTextView (at least ours seems to work). Pulling in all the support for Omni's would be a pain unless you're already using their frameworks. -- Adam From dunham at mac.com Fri Feb 17 12:02:03 2006 From: dunham at mac.com (David Dunham) Date: Fri Feb 17 12:02:09 2006 Subject: NSView gets 2click even after creating intervening view In-Reply-To: References: Message-ID: <5F327C8D-4552-408D-BCCE-D53C75FE96CF@mac.com> On 16 Feb 2006, at 12:35, Matt Neuburg wrote: >> My view will create an NSTextView when clicked in certain areas, and >> passes the event on to the new view, which tracks just file (i.e. you >> can click-drag to select text). >> >> If you double-click my view, mouseDown: is sent twice. Even though >> after the first mouseDown: there is an NSTextView sitting at that >> exact location. >> >> How come the view hierarchy isn't observed for the second click? > > My guess is that it's because the facts about the view hiearchy are > cached, > not dynamic. If they were dynamic things would be really slow. m. I would have thought that addSubView: would invalidate the cache. Also, I'm sending makeFirstResonder: newView to the window. David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From keithblount at yahoo.com Fri Feb 17 12:14:42 2006 From: keithblount at yahoo.com (Keith Blount) Date: Fri Feb 17 12:21:27 2006 Subject: NSFindPanel Message-ID: <20060217201442.41397.qmail@web53801.mail.yahoo.com> I recently implemented exactly what you are looking to do in my own project. I have a view containing multiple text views, and I needed the find panel to search across them all. Unfortunately, as has already been stated by others, you can't just use the standard find panel for this. Like you, I would rather have used the default panel and just overridden the specific find methods to look in more than one text view. However, because the standard find panel is completely opaque, you have no access to its controls - so you can't check whether the "Ignore Case" or "Wrap Around" buttons are checked, what is in the "Contains" drop down menu, etc. So it's not a simple matter of overriding -performFindPanelAction: and shifting first responder status to another text view when necessary. Instead, you have to provide your own find panel and deal with all of this yourself. Fortunately, the code on which the standard find panel is based is still around. As I understand it, the current find panel is based on the TextFinder classes that used to be incorporated into TextEdit. You can still grab the code for TextFinder.h and TextFinder.m here: http://www.stone.com/The_Cocoa_Files/Doing_Objects_Right.html (You'd have to create your own find panel .nib, of course.) I used this as the basis for my own implementation. I just altered the find and replace methods so that they would leap to the next/previous text view upon finishing searching the current one. Then you need to use an NSTextView subclass for your text views that overrides -performFindPanelAction: to use your own find panel class. If you look at the tag constants in NSTextView's documentation and make sure that you use them to call your own find panel actions, all of the actions in the Find menu should still *just work*, but using your custom panel instead of the standard one. Hope that helps, Keith --- ORIGINAL MESSAGE --- says to use NSFindPanel. I can't find this... Several years ago, Ali Ozer said to steal the one from TextEdit, but I can't find one in its nibs either. I do get one for a specific NSTextView if I send it setUsesFindPanel: YES, but I want to run my own dialog (to search multiple NSTextViews). David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From scott at cocoadoc.com Fri Feb 17 22:50:58 2006 From: scott at cocoadoc.com (Scott Anguish) Date: Fri Feb 17 22:57:48 2006 Subject: NSTreeController selection binding In-Reply-To: References: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> Message-ID: you should ABSOLUTELY no rely on the arrangedObjects method on NSTreeController. This is an opaque root node representing all the currently displayed objects. This method should be used for binding, no assumption should be made about what methods this object supports. If you need the functionality, please file an enhancement bug. But that is a private, opaque object, and you should NOT rely on it On Feb 16, 2006, at 1:20 PM, Christiaan Hofman wrote: > Thanks Joakim, > > I had the example already downloaded, but never really came to look > at it in detail. > Also, it is basically sneakily providing the needed interface by > exposing the undocumented properties I am looking for, and hope > Apple won't change its implementation. Usually that is not a very > good idea, and I wish there was a better way using documented > features. But maybe it is the only way at the moment. It seems > Apple provided just a half finished job with TreeController, all > the interface Matt provides in his subclass should have been > exposed natively, I think, because they are extremely useful, if > not essential. > > Christiaan > > On 16 Feb 2006, at 7:44 PM, Joakim Danielson wrote: > >> Matt has a modified version of Apple's DragNDropOutlineView on >> this page,http://homepage.mac.com/matthol2/cocoa/page2/page2.html, >> that contains an extension to NSTreeController. I think it might >> be what you're looking for. >> >> Joakim >> >> On 16 feb 2006, at 14.57, Christiaan Hofman wrote: >> >>> I'd like to bind a particular KVC compliant property of a >>> windowController to the object selected by a NSTreeController. I >>> have no idea how to do that though. >>> >>> The only binding for selection of a treeController seems to be >>> selectionIndexPath, but that seems rather useless to me as I >>> don't know how to connect the indexPath to the actual object it >>> represents. NSIndexPath seems a rather useless concept, except >>> for internal use in standard bindings, as there is no methods >>> like objectAtIndexPath:, like you have for arrays and NSIndexSet. >>> Also most objects NSTreeController returns (like arrangedObjects) >>> are completely opaque, so you can't do anything with them. >>> NSTreeController is badly lacking in its (public) interface. >>> >>> Right now, I am observing the selectedObjects of the >>> treeController, and set my property in the observation method. >>> However that works only one way. And as NSTreeController does not >>> have a -setSelectedObject(s): method, I don't know how to set the >>> selection programmatically. >>> >>> Would anyone know how to do this? >>> >>> Thank, >>> Christiaan >>> >>> >>> _______________________________________________ >>> MacOSX-dev mailing list >>> MacOSX-dev@omnigroup.com >>> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> > > Christiaan > ------------------------------------------------------------------- > Christiaan Hofman Email: christiaan.hofman@weizmann.ac.il > Dept. of Particle Physics WWW: http://www.weizmann.ac.il/~hofman > Weizmann Institute Phone: (+972) 8 934 2943 > Rehovot 76100, Israel Fax: (+972) 8 934 4172 > ------------------------------------------------------------------- > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From finlay.dobbie at gmail.com Sat Feb 18 02:23:20 2006 From: finlay.dobbie at gmail.com (Finlay Dobbie) Date: Sat Feb 18 02:23:24 2006 Subject: Authenticating via Open Directory? In-Reply-To: <54E05666-5B42-41B6-9B24-49E8E541D08B@mac.com> References: <54E05666-5B42-41B6-9B24-49E8E541D08B@mac.com> Message-ID: On 2/16/06, Marc Respass wrote: > Hi All, > > Has anyone authenticated against open directory? I have a need > authenticate directly to a password server (Tiger Server) rather than > through the local directory services configuration. I have the sample > code from CryptNoMore. I integrated that and it works perfectly > against my local system. I tried to adapt it to use a remote password > server and used dsOpenDirServiceProxy() but I get back > eDSTCPReceiveError. FWIW, here is the code that I use dsOpenDirServiceProxy() is used to connect to a remote Directory Services daemon running on a server. If you want to connect directly to a specific Password Server node, I think you can just connect to the local DS daemon with dsOpenDirService(), but then what you want to do is connect to a specific PWS node. -- Finlay From christiaan.hofman at weizmann.ac.il Sat Feb 18 02:36:54 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Sat Feb 18 02:37:06 2006 Subject: NSTreeController selection binding In-Reply-To: References: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> Message-ID: <5E4B2DD4-18EB-4664-92A1-A6E744894BE7@weizmann.ac.il> I basically agree with that. And it is precisely the problem I have with Matt's solution in DragAndDropOutlineEdit. However AFAICS, it seems the _only_ way to do the very basic thing I want to do, namely selecting a particular object in the treeController. That does seems to me a very basic requirement for NSTreeController. Of course I'd love to be proven wrong, and someone could point to a legitimate way to select by object? And I will quite definitely file an enhancement bug. Christiaan On 18 Feb 2006, at 8:50 AM, Scott Anguish wrote: > you should ABSOLUTELY no rely on the arrangedObjects method on > NSTreeController. > > This is an opaque root node representing all the currently > displayed objects. This method should be used for binding, no > assumption should be made about what methods this object supports. > > > If you need the functionality, please file an enhancement bug. But > that is a private, opaque object, and you should NOT rely on it > > > > > On Feb 16, 2006, at 1:20 PM, Christiaan Hofman wrote: > >> Thanks Joakim, >> >> I had the example already downloaded, but never really came to >> look at it in detail. >> Also, it is basically sneakily providing the needed interface by >> exposing the undocumented properties I am looking for, and hope >> Apple won't change its implementation. Usually that is not a very >> good idea, and I wish there was a better way using documented >> features. But maybe it is the only way at the moment. It seems >> Apple provided just a half finished job with TreeController, all >> the interface Matt provides in his subclass should have been >> exposed natively, I think, because they are extremely useful, if >> not essential. >> >> Christiaan >> >> On 16 Feb 2006, at 7:44 PM, Joakim Danielson wrote: >> >>> Matt has a modified version of Apple's DragNDropOutlineView on >>> this page,http://homepage.mac.com/matthol2/cocoa/page2/ >>> page2.html, that contains an extension to NSTreeController. I >>> think it might be what you're looking for. >>> >>> Joakim >>> >>> On 16 feb 2006, at 14.57, Christiaan Hofman wrote: >>> >>>> I'd like to bind a particular KVC compliant property of a >>>> windowController to the object selected by a NSTreeController. I >>>> have no idea how to do that though. >>>> >>>> The only binding for selection of a treeController seems to be >>>> selectionIndexPath, but that seems rather useless to me as I >>>> don't know how to connect the indexPath to the actual object it >>>> represents. NSIndexPath seems a rather useless concept, except >>>> for internal use in standard bindings, as there is no methods >>>> like objectAtIndexPath:, like you have for arrays and >>>> NSIndexSet. Also most objects NSTreeController returns (like >>>> arrangedObjects) are completely opaque, so you can't do anything >>>> with them. NSTreeController is badly lacking in its (public) >>>> interface. >>>> >>>> Right now, I am observing the selectedObjects of the >>>> treeController, and set my property in the observation method. >>>> However that works only one way. And as NSTreeController does >>>> not have a -setSelectedObject(s): method, I don't know how to >>>> set the selection programmatically. >>>> >>>> Would anyone know how to do this? >>>> >>>> Thank, >>>> Christiaan >>>> From jim.correia at pobox.com Sat Feb 18 08:22:25 2006 From: jim.correia at pobox.com (Jim Correia) Date: Sat Feb 18 08:22:40 2006 Subject: NSTreeController selection binding In-Reply-To: References: <6B9C6D19-CD80-44AF-BB22-3D0323C848A9@weizmann.ac.il> Message-ID: <393FDBC5-E122-4765-9A60-408D19559AD8@pobox.com> On Feb 18, 2006, at 1:50 AM, Scott Anguish wrote: > you should ABSOLUTELY no rely on the arrangedObjects method on > NSTreeController. > > This is an opaque root node representing all the currently > displayed objects. This method should be used for binding, no > assumption should be made about what methods this object supports. > > If you need the functionality, please file an enhancement bug. But > that is a private, opaque object, and you should NOT rely on it Scott, Is there a sanctioned way to provide drag and drop in an outline view controlled by NSTreeController today, using only public methods? Thanks, Jim From aarontait at gmail.com Sat Feb 18 11:34:49 2006 From: aarontait at gmail.com (Aaron Tait) Date: Sat Feb 18 11:34:58 2006 Subject: Core Data... Applied to Philosophy Message-ID: <71AD054B-260A-4C7E-9D98-057BF0D1B50B@gmail.com> This isn't really a question, but rather it is a funny statement that I coined that talks about the possibility of an afterlife via Core Data terminology: "Are we all just transient properties in one big managed object context, Or are we entities, tied to a persistent store coordinator?" You know you have spent too much time programming when... :-) From dunham at mac.com Sat Feb 18 20:38:37 2006 From: dunham at mac.com (David Dunham) Date: Sat Feb 18 20:38:48 2006 Subject: NSFindPanel In-Reply-To: <20060217201442.41397.qmail@web53801.mail.yahoo.com> References: <20060217201442.41397.qmail@web53801.mail.yahoo.com> Message-ID: On 17 Feb 2006, at 12:14, Keith Blount wrote: > http://www.stone.com/The_Cocoa_Files/Doing_Objects_Right.html > I used this as the basis for my own implementation. I > just altered the find and replace methods so that they > would leap to the next/previous text view upon > finishing searching the current one. Then you need to > use an NSTextView subclass for your text views that > overrides -performFindPanelAction: to use your own > find panel class. Actually, I used different actions, and didn't have to subclass NSTextView -- the class that embeds them can easily do the searching and leaping. Thanks for the reference. And thanks to Christiaan for the pointer to OmniAppKit, which was also a useful example for implementing Find. David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From nutrition1 at mac.com Sun Feb 19 13:11:45 2006 From: nutrition1 at mac.com (nutrition1@mac.com) Date: Sun Feb 19 13:09:55 2006 Subject: iSight and barcode-scanning Message-ID: <70D16B98-6DE1-468E-9E2D-FD835224136D@mac.com> Hello out there, I look for a possibility to use my iSight for scanning of barcodes (Cocoa, objectiveC). As i am no pro in QuickTime API's and SequenceGrabber and so on, the easier the better :-)) If somenone is aware of a link, or someone has some (maybe well documented) codesnippets, i can learn from and can use, it could become a lucky day for me. It seems to be a really hard topic to use iSight and scanning with it, so every help is really appreciated!!! Thank you very much in advance !! T.Hoffmann From finlay.dobbie at gmail.com Sun Feb 19 15:28:24 2006 From: finlay.dobbie at gmail.com (Finlay Dobbie) Date: Sun Feb 19 15:28:30 2006 Subject: iSight and barcode-scanning In-Reply-To: <70D16B98-6DE1-468E-9E2D-FD835224136D@mac.com> References: <70D16B98-6DE1-468E-9E2D-FD835224136D@mac.com> Message-ID: On 2/19/06, nutrition1@mac.com wrote: > Hello out there, > > I look for a possibility to use my iSight for scanning of barcodes > (Cocoa, objectiveC). As i am no pro in QuickTime API's and > SequenceGrabber and so on, the easier the better :-)) QuickTime doesn't have any support for barcode scanning. You'd need to implement real-time image processing yourself. > It seems to be a really hard topic to use iSight and scanning with > it, so every help is really appreciated!!! It is hard. I believe the Delicious Library people invested a lot of time and effort into getting it to work. -- Finlay From me at JonathonMah.com Sun Feb 19 17:28:54 2006 From: me at JonathonMah.com (Jonathon Mah) Date: Sun Feb 19 17:29:49 2006 Subject: iSight and barcode-scanning In-Reply-To: <70D16B98-6DE1-468E-9E2D-FD835224136D@mac.com> References: <70D16B98-6DE1-468E-9E2D-FD835224136D@mac.com> Message-ID: <9939562E-FAD9-41BE-A538-4030333742F3@JonathonMah.com> Hi T, On 2006-02-20, at 07:41, nutrition1@mac.com wrote: > I look for a possibility to use my iSight for scanning of barcodes > (Cocoa, objectiveC). There's an open-source project to do this. Jonathon Mah me@JonathonMah.com From mattb at austin.rr.com Mon Feb 20 00:05:16 2006 From: mattb at austin.rr.com (Matt Brandt) Date: Mon Feb 20 00:05:19 2006 Subject: NSMatrix size in NSBrowser Message-ID: I'm implementing an NSBrowser with drag and drop so I subclassed NSMatrix and used that as the class of the matrix for each browser column and in that subclass I implement the drag source and drag destination protocols. All works fine except that if the column isn't full then the matrix doesn't get messages when the mouse is below the last row. In other words, if I try to drag into a column below the contents (like if the column is big enough for 10 items, only has 4 populated, and I drag to row 8) then I don't get the draggingEntered: or performDrag: messages. I started looking for what sizes the matrix thinking I could just force it to be the size of its enclosing view (the clip view) but it never seems to get a setFrame:. To make things more cryptic the size when the initializer is called is 100,100 which isn't anywhere near the size of the column. Any ideas on how to make a short matrix fill the whole column for event purposes? I suppose I could fill it up with empy cells but that seems like a real kludge... Matt Brandt mattb@austin.rr.com From dunham at mac.com Mon Feb 20 13:11:01 2006 From: dunham at mac.com (David Dunham) Date: Mon Feb 20 13:11:10 2006 Subject: Curved quotes in some fonts? Message-ID: I was looking into implementing my smart quotes algorithm in a Cocoa application, only to at first think that NSTextView was doing this automatically. It turns out that some fonts may curve quotes automatically? For example, run TextEdit and make a plain text document. Type some stuff involving quotes and apostrophes. Switch the document to rich text. Make the font big. Make the font Apple Chancery or Apple Gothic. Note that the quotes and apostrophes are now curved. Switch to Apple LiGothic or Lucida Grande and the quotes and apostrophes are all straight. So what's going on? Is there a way to prevent this (since a proper implementation of smart quotes allows a mix of curved and straight)? David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From bwebster at mac.com Mon Feb 20 14:49:24 2006 From: bwebster at mac.com (Brian Webster) Date: Mon Feb 20 14:49:36 2006 Subject: MacOSX-dev Digest, Vol 25, Issue 23 In-Reply-To: <200601252000.k0PK07qg018282@slowbro.omnigroup.com> References: <200601252000.k0PK07qg018282@slowbro.omnigroup.com> Message-ID: On Jan 25, 2006, at 2:00 PM, macosx-dev-request@omnigroup.com wrote: > To fix this I use an ugly hack: in an NSDocument subclass I > reimplement _setDisplayName:, calling supers implementation and an > empty method -(void)setDisplayName:(id)name (I could also use - > willChangeValueForKey: and willChangeValueForKey:). How about implementing an entirely new accessor in your subclass and binding to that instead? If you're only using this for display and not editing, the setter can just be empty. Something like: - (NSString*)bindingDisplayName { return [self displayName]; } - (void)setBindingDisplayName:(NSString*)newName { } If you need the pop-up to be able to update when the document changes, you could override setFileName: and/or setFileURL: and call will/didChangeValueForKey:@"bindingDisplayName" to trigger the KVO notification. -- Brian Webster bwebster@mac.com http://homepage.mac.com/bwebster/ From edenwaith at mac.com Mon Feb 20 14:49:46 2006 From: edenwaith at mac.com (Chad Armstrong) Date: Mon Feb 20 14:49:51 2006 Subject: MacOSX-dev Digest, Vol 26, Issue 22 In-Reply-To: <200602202000.k1KK07ql011233@slowbro.omnigroup.com> References: <200602202000.k1KK07ql011233@slowbro.omnigroup.com> Message-ID: <45BF0E21-38AE-4BA8-BB97-B055885690C4@mac.com> As previously mentioned, Wil Shipley of Delicious Monster spent a decent amount of time (an entire month from what I've heard) in trying to figure out how to get this done. I've heard of some packages available in Java which perform similar options, though. I'm not sure if they would work with iSight or not, but it might be worth it to search around and see if there might be some APIs or open source projects which might lead to some solutions for you. Unfortunately, it does not look like that there is any easy solution for your problem. Chad Armstrong On Feb 20, 2006, at 2:00 PM, macosx-dev-request@omnigroup.com wrote: > Hello out there, > > I look for a possibility to use my iSight for scanning of barcodes > (Cocoa, objectiveC). As i am no pro in QuickTime API's and > SequenceGrabber and so on, the easier the better :-)) > If somenone is aware of a link, or someone has some (maybe well > documented) codesnippets, i can learn from and can use, it could > become a lucky day for me. > > It seems to be a really hard topic to use iSight and scanning with > it, so every help is really appreciated!!! > > Thank you very much in advance !! > > T.Hoffmann From christiaan.hofman at weizmann.ac.il Mon Feb 20 15:11:28 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Mon Feb 20 15:11:47 2006 Subject: MacOSX-dev Digest, Vol 25, Issue 23 In-Reply-To: References: <200601252000.k0PK07qg018282@slowbro.omnigroup.com> Message-ID: On 21 Feb 2006, at 12:49 AM, Brian Webster wrote: > On Jan 25, 2006, at 2:00 PM, macosx-dev-request@omnigroup.com wrote: > >> To fix this I use an ugly hack: in an NSDocument subclass I >> reimplement _setDisplayName:, calling supers implementation and an >> empty method -(void)setDisplayName:(id)name (I could also use - >> willChangeValueForKey: and willChangeValueForKey:). > > How about implementing an entirely new accessor in your subclass > and binding to that instead? If you're only using this for display > and not editing, the setter can just be empty. Something like: > > - (NSString*)bindingDisplayName > { > return [self displayName]; > } > > - (void)setBindingDisplayName:(NSString*)newName > { > } > > If you need the pop-up to be able to update when the document > changes, you could override setFileName: and/or setFileURL: and > call will/didChangeValueForKey:@"bindingDisplayName" to trigger the > KVO notification. > > -- > Brian Webster > bwebster@mac.com > http://homepage.mac.com/bwebster/ > Thanks Brian, that is a much nicer solution. in fact it can be done even simpler than this. As the setter is never used, there is no need even to have it (the runtime system only complains about it when the value is actually changed through KVC methods). And the extra getter is also not needed, as there is already a getter. So I can just say (I use setFileName: because it should work on Panther) - (void)setFileName:(NSString *)fileName { [self willChangeValueForKey:@"displayName"]; [super setFileName:fileName]; [self didChangeValueForKey:@"displayName"]; } Christiaan From kusterer at gmail.com Mon Feb 20 16:26:35 2006 From: kusterer at gmail.com (Uli Kusterer) Date: Mon Feb 20 16:26:50 2006 Subject: Curved quotes in some fonts? In-Reply-To: References: Message-ID: Am 20.02.2006 um 22:11 schrieb David Dunham: > I was looking into implementing my smart quotes algorithm in a > Cocoa application, only to at first think that NSTextView was doing > this automatically. I believe it depends on the font. Both on how the font designer "painted" the quotes, and on whether the font file correctly advertises the font's features correctly. At least that's how it works for other features like ligatures. I've come across fonts that included a ligature character that was simply two separate characters not connected in any way... > So what's going on? Is there a way to prevent this (since a proper > implementation of smart quotes allows a mix of curved and straight)? Err... no, it doesn't. Typographically correct quotes are both curved, just in different directions. The straight ones are either doubled accents or the "inch" mark (which is what the quote key actually produces by default, and which e.g. I'm using in this e-mail. Since the actual details of the curvature depend a lot on countries, I'd have to google for the correct stuff, though, whether it's ?foo? or ?foo?. I think it's the former, but then in Germany we use ?foo?, and in France and Switzerland they use ?foo?, so who knows... the best way to do this is probably to provide some defaults and let the users specify their own if they want, at least if your app does printed output. (I hope the typographical quotes above didn't get ASCII-converted and ended up as garbage) Cheers, -- M. Uli Kusterer http://www.zathras.de From alastair at alastairs-place.net Tue Feb 21 08:01:48 2006 From: alastair at alastairs-place.net (Alastair Houghton) Date: Tue Feb 21 08:21:05 2006 Subject: Curved quotes in some fonts? In-Reply-To: References: Message-ID: On 21 Feb 2006, at 00:26, Uli Kusterer wrote: > Since the actual details of the curvature depend a lot on > countries, I'd have to google for the correct stuff, though, > whether it's ?foo? or ?foo?. I think it's the former, It's 66 then 99 (convenient that 6s and 9s look like quotes ;-)). > but then in Germany we use ?foo?, and in France and Switzerland > they use ?foo? There are some other schemes in use too; I'm sure I remember someone using ?foo? and also a single version of the ?? characters. > , so who knows... the best way to do this is probably to provide > some defaults and let the users specify their own if they want, at > least if your app does printed output. > > (I hope the typographical quotes above didn't get ASCII-converted > and ended up as garbage) Seemed to work OK here. On 20 Feb 2006, at 21:11, David Dunham wrote: > I was looking into implementing my smart quotes algorithm in a > Cocoa application, only to at first think that NSTextView was doing > this automatically. Just remember that not everyone likes smart quotes. The usual algorithm isn't 100% accurate and sometimes you just plain don't want typographic quotes (like in source code, for instance). Also, on the Mac, smart quotes should be pretty redundant, as it's easy to get proper typographic quotes from the keyboard (enable the keyboard viewer in System Preferences' International pane---under Input Menu---if you don't already know how to get them on your keyboard). The main argument in favour of the smart quote algorithm on the PC is that on that platform there is no way to get them without entering numeric codes with the Alt key held down or a trip to the Symbols/Characters dialogs (in applications that have them), which isn't at all user-friendly. Kind regards, Alastair. -- http://www.alastairs-place.net From dunham at mac.com Tue Feb 21 09:43:29 2006 From: dunham at mac.com (David Dunham) Date: Tue Feb 21 09:43:36 2006 Subject: Curved quotes in some fonts? In-Reply-To: References: Message-ID: On 21 Feb 2006, at 08:01, Alastair Houghton wrote: >> >> I was looking into implementing my smart quotes algorithm in a >> Cocoa application, only to at first think that NSTextView was >> doing this automatically. > > Just remember that not everyone likes smart quotes. The usual > algorithm isn't 100% accurate and sometimes you just plain don't > want typographic quotes (like in source code, for instance). Agreed -- it should be a preference. Which is why I found the behavior of Apple Chancery, Apple Gothic, Palatino, and Skia (and likely some other fonts) rather odd. I also think smart quotes should have an override. I used the ctrl key in the Cocoa code I just posted at . As for inaccuracies, I'd love to hear about them. The only one I know of is getting the year abbreviation right (this year is ?06 to many people) -- this can't be handled by looking at the previous character. > Also, on the Mac, smart quotes should be pretty redundant, as it's > easy to get proper typographic quotes from the keyboard I wouldn't call that easy (though it's obviously easier than Windows). David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From keencoyote at earthlink.net Tue Feb 21 13:22:57 2006 From: keencoyote at earthlink.net (George Lawrence Storm) Date: Tue Feb 21 13:23:01 2006 Subject: [Meet] Next Seattle XCoders meeting, Thursday, February 23rd Message-ID: The next meeting of the Seattle XCoders will be held this Thursday, February 23 at 7 PM at the offices of Seattle dBug, 9620 Stone Avenue North, Suite 202, Seattle, WA 98103-3378, for directions: Scott Anderson from Andescotia will present his software development product for MacOS X "Marten". Marten is a graphical programming environment that supports the Prograph computer language. Our continuing book study "Advanced Mac OS X Programming", will cover chapters 3 (Libraries) and 4 (Command Line Programs). ----- The the Seattle Xcoders is Seattle's Macintosh programmers special interest group. Our core focus is on Cocoa, however we devote a fair amount of time to other core technologies, with occasional excursions to other lands of interest such as unix, perl, gdb and other acronyms too numerous to mention. When you are in the Seattle area we invite you to visit. - The Seattle XCoders From dunham at mac.com Tue Feb 21 23:33:25 2006 From: dunham at mac.com (David Dunham) Date: Tue Feb 21 23:33:38 2006 Subject: Set Font button Message-ID: I'd like to have a Set Font button like in Xcode's "Font & Colors" preferences, but can't figure out how to set up the target, which I assume should be a NSFontManager (like the standard "Show Fonts" menu item). I don't see how to add an NSFontManager instance to my dialog's nib, and I can't find the nib for Xcode's dialog to see how that was done. Can this be set up in Interface Builder? David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From christiaan.hofman at weizmann.ac.il Wed Feb 22 00:26:04 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Wed Feb 22 00:26:17 2006 Subject: Set Font button In-Reply-To: References: Message-ID: On 22 Feb 2006, at 9:33 AM, David Dunham wrote: > I'd like to have a Set Font button like in Xcode's "Font & Colors" > preferences, but can't figure out how to set up the target, which I > assume should be a NSFontManager (like the standard "Show Fonts" > menu item). I don't see how to add an NSFontManager instance to my > dialog's nib, and I can't find the nib for Xcode's dialog to see > how that was done. > > Can this be set up in Interface Builder? > > David Dunham http://www.pensee.com/dunham/ > Imagination is more important than knowledge. -- Albert Einstein it's all in the docs, look for NSFontManager. You can either add a Font manager using IB (which will add the FontManager instance to the nib), or you can call it programmatically as [NSFontManager sharedFontManager]. Christiaan From alastair at alastairs-place.net Wed Feb 22 04:31:47 2006 From: alastair at alastairs-place.net (Alastair Houghton) Date: Wed Feb 22 04:51:56 2006 Subject: Curved quotes in some fonts? In-Reply-To: References: Message-ID: <9FA7302F-2D25-4E98-B7A4-1110ED7A2D97@alastairs-place.net> On 21 Feb 2006, at 17:43, David Dunham wrote: > On 21 Feb 2006, at 08:01, Alastair Houghton wrote: > As for inaccuracies, I'd love to hear about them. The only one I > know of is getting the year abbreviation right (this year is ?06 to > many people) -- this can't be handled by looking at the previous > character. Similarly for any word whose beginning is omitted?'til and 'cause are probably the most common examples but there are others. You might also sometimes want to distinguish between the mathematical "prime" character, the apostrophe and the single quote, so it's worth thinking about that also. And if you're going for broke, you'd need to support the full set of Unicode space characters and also work out how to get things right with bidirectional text. A major annoyance for me is the fact that because the smart quote feature is usually implemented by changing the characters in the text, if you miss-out a space and it gets the wrong quote, you have to delete the quote rather than just inserting a space. IMO the best place to implement it is in the renderer, rather than in the input stage; for instance, if you simply mark the quote as smart (because it hasn't been typed explicitly in that form by the user) rather than replacing it, then when drawing the text you could replace the glyph with the right one using the smart quote algorithm. That's the benefit of doing it in the font, of course (BTW, I believe you can turn OpenType features on and off, though I don't know which APIs you'd have to use to do it; if you're using Cocoa then you'd be best off posting to the cocoa-dev list because Apple's text system developers do watch that list and often reply to questions about Cocoa text). >> Also, on the Mac, smart quotes should be pretty redundant, as it's >> easy to get proper typographic quotes from the keyboard > > I wouldn't call that easy (though it's obviously easier than Windows). It's only like pressing Shift to get an exclamation mark, or indeed pressing Option to get a Euro (or on UK keyboards, a # characters). The only reason people might not think it was easy is that the characters aren't marked on the keyboard. Kind regards, Alastair. -- www.alastairs-place.net From dunham at mac.com Wed Feb 22 09:27:41 2006 From: dunham at mac.com (David Dunham) Date: Wed Feb 22 09:27:57 2006 Subject: Set Font button In-Reply-To: References: Message-ID: <25B98ECC-CC1E-45D5-96CE-CAC89268FE1A@mac.com> On 22 Feb 2006, at 00:26, Christiaan Hofman wrote: >> I'd like to have a Set Font button like in Xcode's "Font & Colors" >> preferences, but can't figure out how to set up the target, which >> I assume should be a NSFontManager (like the standard "Show Fonts" >> menu item). I don't see how to add an NSFontManager instance to my >> dialog's nib, and I can't find the nib for Xcode's dialog to see >> how that was done. > it's all in the docs, look for NSFontManager. You can either add a > Font manager using IB (which will add the FontManager instance to > the nib), or you can call it programmatically as [NSFontManager > sharedFontManager]. I'm not seeing this in the docs. When I select the class in IB, Instantiate NSFontManager is disabled. David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From christiaan.hofman at weizmann.ac.il Wed Feb 22 11:05:11 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Wed Feb 22 11:05:40 2006 Subject: Set Font button In-Reply-To: <25B98ECC-CC1E-45D5-96CE-CAC89268FE1A@mac.com> References: <25B98ECC-CC1E-45D5-96CE-CAC89268FE1A@mac.com> Message-ID: <45CD390D-3328-4587-AF86-474C990C41A8@weizmann.ac.il> On 22 Feb 2006, at 7:27 PM, David Dunham wrote: > > On 22 Feb 2006, at 00:26, Christiaan Hofman wrote: > >>> I'd like to have a Set Font button like in Xcode's "Font & >>> Colors" preferences, but can't figure out how to set up the >>> target, which I assume should be a NSFontManager (like the >>> standard "Show Fonts" menu item). I don't see how to add an >>> NSFontManager instance to my dialog's nib, and I can't find the >>> nib for Xcode's dialog to see how that was done. > >> it's all in the docs, look for NSFontManager. You can either add a >> Font manager using IB (which will add the FontManager instance to >> the nib), or you can call it programmatically as [NSFontManager >> sharedFontManager]. > > I'm not seeing this in the docs. When I select the class in IB, > Instantiate NSFontManager is disabled. > > David Dunham http://www.pensee.com/dunham/ > Imagination is more important than knowledge. -- Albert Einstein http://developer.apple.com/documentation/Cocoa/Conceptual/FontPanel/ index.html#//apple_ref/doc/uid/10000116i In IB you can add the Font menu, which will automatically add an NSFontmanager (shared) instance. Christiaan From keithblount at yahoo.com Wed Feb 22 12:04:48 2006 From: keithblount at yahoo.com (Keith Blount) Date: Wed Feb 22 12:04:52 2006 Subject: Set Font button Message-ID: <20060222200448.70290.qmail@web53806.mail.yahoo.com> Hi, the part in the docs you want is here: http://developer.apple.com/documentation/Cocoa/Conceptual/FontPanel/index.html#//apple_ref/doc/uid/10000116i Basically, what you need to do is this: You have an NSTextField and an NSButton labelled "Set Font" (obviously), with the the current font written in the text field. The method attached to your "Set Font" button would look something like this: - (IBAction)chooseFont:(id)sender { // You may want to use this method for several "Set Font" buttons // in preferences, in which case you would get the sender's tag // and set a flag for which font should currently be affected // accordingly. [[NSFontManager sharedFontManager] orderFrontFontPanel:sender]; } This will order front the font panel. As explained in the docs to which I linked above, whenever the user changes something in the font panel, the font panel calls -changeFont: on the first responder that implements this method. Thus, you just need to implement -changeFont: - if you are implementing this in a preferences panel, for instance, you would just implement this in your preferences panel window controller. Eg: - (void)changeFont:(id)sender { // If you have several fonts that could be affected, you would // check the flag you set in -chooseFont: here before proceeding, // obviously... NSFont *oldFont = [self tablesFont]; // Whatever font you want to affect NSFont *newFont = [sender convertFont:oldFont]; // Set newFont in the preferences here NSString *displayStr = [NSString stringWithFormat:@"%@, %ipt", [newFont displayName], (int)[mewFont pointSize]]; [tablesFontField setStringValue:displayStr]; // Your text field } You'll need to modify this to fit your project, of course, but that should do it. HTH, Keith __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From dunham at mac.com Wed Feb 22 15:03:27 2006 From: dunham at mac.com (David Dunham) Date: Wed Feb 22 15:03:36 2006 Subject: Set Font button In-Reply-To: <45CD390D-3328-4587-AF86-474C990C41A8@weizmann.ac.il> References: <25B98ECC-CC1E-45D5-96CE-CAC89268FE1A@mac.com> <45CD390D-3328-4587-AF86-474C990C41A8@weizmann.ac.il> Message-ID: <45E3BDA5-B019-4084-8A8F-2A149680ADC7@mac.com> On 22 Feb 2006, at 11:05, Christiaan Hofman wrote: >> I'm not seeing this in the docs. When I select the class in IB, >> Instantiate NSFontManager is disabled. > > http://developer.apple.com/documentation/Cocoa/Conceptual/FontPanel/ > index.html#//apple_ref/doc/uid/10000116i > > In IB you can add the Font menu, which will automatically add an > NSFontmanager (shared) instance. Thanks, I didn't think to add and delete a menu. (I don't see this trick in the document.) This way I won't need to write any code, except a minimal changeFont: (I've got the font name hooked up with bindings, so I don't even need most of what Keith suggested). David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From keithblount at yahoo.com Wed Feb 22 15:24:16 2006 From: keithblount at yahoo.com (Keith Blount) Date: Wed Feb 22 15:24:20 2006 Subject: Set Font button Message-ID: <20060222232416.10829.qmail@web53806.mail.yahoo.com> Well, given that so far you have found none of my suggestions helpful, I would be grateful if you could share how you have got your font name set up via bindings, as that may save me some code, too. :) Thanks, Keith --- ORIGINAL MESSAGE --- >> I'm not seeing this in the docs. When I select the class in IB, >> Instantiate NSFontManager is disabled. > > http://developer.apple.com/documentation/Cocoa/Conceptual/FontPanel/ > index.html#//apple_ref/doc/uid/10000116i > > In IB you can add the Font menu, which will automatically add an > NSFontmanager (shared) instance. Thanks, I didn't think to add and delete a menu. (I don't see this trick in the document.) This way I won't need to write any code, except a minimal changeFont: (I've got the font name hooked up with bindings, so I don't even need most of what Keith suggested). David Dunham http://www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From nutrition1 at mac.com Wed Feb 22 23:31:37 2006 From: nutrition1 at mac.com (nutrition1@mac.com) Date: Wed Feb 22 23:29:47 2006 Subject: iSight Focus Message-ID: <82EB450F-DDF6-4A03-BFA4-B048D422FFF9@mac.com> Hello, Anyone who knows, how to turn off/on autofocus of iSight programatically (objective-C) or how to fix the focus at a certain distance? Kind regards T.Hoffmann From scott at cocoadoc.com Wed Feb 22 23:37:21 2006 From: scott at cocoadoc.com (Scott Anguish) Date: Wed Feb 22 23:37:26 2006 Subject: Set Font button In-Reply-To: <20060222232416.10829.qmail@web53806.mail.yahoo.com> References: <20060222232416.10829.qmail@web53806.mail.yahoo.com> Message-ID: <5D693DC2-9AB2-4BD5-8520-3C2D826894BF@cocoadoc.com> I've done something quite similar to this before using a value transformer.. you bind the value transformer to the font name string that is stored in preferences (the postscript name) and it'll display the name (typically you use this with an NSTextField that isn't editable) But it's a very small change to do what you are asking.. You connect directly to the font object directly using similar code. just change the transformedValue: method to something like this - (id)transformedValue:(id)value; { NSString *fontName=nil; if (value != nil) { fontName=[(NSFont *) value displayName]; // for extra points, append the font size here!) ? if (theFont == nil) fontName=@"Font name not set"; return [theFont displayName]; } --- Here is the transformer // // FontNameToDisplayName.h #import @interface FontNameToDisplayNameTransformer : NSValueTransformer { } @end // // FontNameToDisplayName.m #import "FontNameToDisplayNameTransformer.h" @implementation FontNameToDisplayNameTransformer + (Class)transformedValueClass; { return [NSString class]; } + (BOOL)allowsReverseTransformation; { return NO; } - (id)transformedValue:(id)value; { NSFont *theFont=nil; if (value != nil) theFont=[NSFont fontWithName:(NSString *)value size:12.0]; if (theFont == nil) theFont=[NSFont systemFontOfSize:12.0]; return [theFont displayName]; } @end On Feb 22, 2006, at 6:24 PM, Keith Blount wrote: > Well, given that so far you have found none of my > suggestions helpful, I would be grateful if you could > share how you have got your font name set up via > bindings, as that may save me some code, too. :) From dunham at mac.com Wed Feb 22 23:37:12 2006 From: dunham at mac.com (David Dunham) Date: Wed Feb 22 23:37:30 2006 Subject: Set Font button In-Reply-To: <20060222232416.10829.qmail@web53806.mail.yahoo.com> References: <20060222232416.10829.qmail@web53806.mail.yahoo.com> Message-ID: <5E1921EC-9E7B-4F80-8AA2-46415A965B9C@mac.com> On 22 Feb 2006, at 15:24, Keith Blount wrote: > Well, given that so far you have found none of my > suggestions helpful, I would be grateful if you could > share how you have got your font name set up via > bindings, as that may save me some code, too. :) I hope I didn't sound ungrateful! I'm trying to do things the Cocoa Way as much as possible, and my impression of that is to use Interface Builder whenever possible. I have the font saved in a preference file, so I have a Shared Defaults (NSUserDefaultsController) in my nib. My text view binds displayPatternValue1 to its values.fontName, and displayPatternValue2 to its values.fontSize. The display pattern is %{value1}@-%{value2}@. As you point out, this is probably slightly incorrect, in that I should use displayName instead of fontName. Since I think fontName is the correct thing to save, I may end up binding to my dialog's controller instead (and provide a displayName accessor there). David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com "People seem to misinterpret complexity as sophistication" -- Niklaus Wirth From christiaan.hofman at weizmann.ac.il Thu Feb 23 02:36:46 2006 From: christiaan.hofman at weizmann.ac.il (Christiaan Hofman) Date: Thu Feb 23 02:36:55 2006 Subject: Core Data document dirtying Message-ID: <5C537222-7373-4ADA-9696-4B208AAE0069@weizmann.ac.il> I'm having problems with Core Data's automatic undo dirtying the state of my document. When I remove an entity, the undoManager seems to register 2 rather than 1 changeCounts, while only adding one item to the undo stack. As a result, I can never get to the clean state using undo. Even more disastrous, after a save operation, the document reaches the 'clean' state one undo _before_ the saved state (as the changeCount was one too high). This happens already in the simplest situation, i.e. a document based Core Data application (from the template) with a single entity and an automatically generated UI for Many Objects (so no code from my side). Is this a (known) bug? And does anyone know a way to avoid it? Christiaan From nutrition1 at mac.com Thu Feb 23 10:20:23 2006 From: nutrition1 at mac.com (nutrition1@mac.com) Date: Thu Feb 23 10:18:35 2006 Subject: Fwd: iSight Focus References: <82EB450F-DDF6-4A03-BFA4-B048D422FFF9@mac.com> Message-ID: <6B61CE83-2118-4597-967C-F817EB8B12D7@mac.com> Anfang der weitergeleiteten E-Mail: > Von: nutrition1@mac.com > Datum: 23. Februar 2006 08:31:37 MEZ > An: macosx-dev@omnigroup.com > Betreff: iSight Focus > > Hello, > > Anyone who knows, how to turn off/on autofocus of iSight > programatically (objective-C) or how to fix the focus at a certain > distance? > > Kind regards > > T.Hoffmann From mmalc_lists at mac.com Thu Feb 23 12:55:57 2006 From: mmalc_lists at mac.com (mmalcolm crawford) Date: Thu Feb 23 12:55:59 2006 Subject: Set Font button In-Reply-To: <5E1921EC-9E7B-4F80-8AA2-46415A965B9C@mac.com> References: <20060222232416.10829.qmail@web53806.mail.yahoo.com> <5E1921EC-9E7B-4F80-8AA2-46415A965B9C@mac.com> Message-ID: <081730F0-7B79-4ED5-8EBE-52ABDA41F846@mac.com> I'm not sure if this will be useful? (See "Controlled Preferences": .) mmalc From keithblount at yahoo.com Thu Feb 23 13:55:16 2006 From: keithblount at yahoo.com (Keith Blount) Date: Thu Feb 23 13:55:23 2006 Subject: Set Font button In-Reply-To: <5D693DC2-9AB2-4BD5-8520-3C2D826894BF@cocoadoc.com> Message-ID: <20060223215516.59113.qmail@web53806.mail.yahoo.com> > I hope I didn't sound ungrateful! I'm trying > to do things the Cocoa Way as much as possible, > and my impression of that is to use Interface > Builder whenever possible. Not at all - I just have a bad habit of doing things the long way when I could do them via bindings, and I am trying to get out of those habits. :) I am currently in the process of re-writing my preferences panel anyway, and I wasn't previously using an NSUserDefaultsController, which will save me a *lot* of code. Scott - thank you very much for the value transformer code, that is exactly what I needed. mmalc - thank you, that is very helpful. In fact, after the posts by David and Scott, I checked out your controllers page and downloaded exactly the example you linked to. It is very helpful. I can't believe the amount of unnecessary code I have just because I didn't use NSUserDefaultsController before... Thanks all, Keith __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From dunham at mac.com Thu Feb 23 23:05:54 2006 From: dunham at mac.com (David Dunham) Date: Thu Feb 23 23:06:05 2006 Subject: Set Font button In-Reply-To: <081730F0-7B79-4ED5-8EBE-52ABDA41F846@mac.com> References: <20060222232416.10829.qmail@web53806.mail.yahoo.com> <5E1921EC-9E7B-4F80-8AA2-46415A965B9C@mac.com> <081730F0-7B79-4ED5-8EBE-52ABDA41F846@mac.com> Message-ID: On 23 Feb 2006, at 12:55, mmalcolm crawford wrote: > I'm not sure if this will be useful? > > Yup. I was headed there, but you sped up the process. (It turns out you don't really want to connect to NSFontManager after all, since then you can't update the font panel.) Is the value transformer partly for illustrative purposes? It seemed simpler to put the displayName in an accessor rather than create a new class. David Dunham A Sharp, LLC Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From scott at cocoadoc.com Thu Feb 23 23:39:28 2006 From: scott at cocoadoc.com (Scott Anguish) Date: Thu Feb 23 23:39:32 2006 Subject: Set Font button In-Reply-To: References: <20060222232416.10829.qmail@web53806.mail.yahoo.com> <5E1921EC-9E7B-4F80-8AA2-46415A965B9C@mac.com> <081730F0-7B79-4ED5-8EBE-52ABDA41F846@mac.com> Message-ID: On Feb 24, 2006, at 2:05 AM, David Dunham wrote: > On 23 Feb 2006, at 12:55, mmalcolm crawford wrote: > >> I'm not sure if this will be useful? >> >> > > Yup. I was headed there, but you sped up the process. (It turns out > you don't really want to connect to NSFontManager after all, since > then you can't update the font panel.) > > Is the value transformer partly for illustrative purposes? It > seemed simpler to put the displayName in an accessor rather than > create a new class. well, that depends... You can easily reuse value transformers among your menu applications. but you're right, there isn't a significant win in this particular case. From drh at firethorne.com Fri Feb 24 22:11:41 2006 From: drh at firethorne.com (David Hill) Date: Fri Feb 24 22:05:45 2006 Subject: Objective-C to C string conversion In-Reply-To: References: Message-ID: Is there an easy way (e.g. an existing method) to convert the characters contained in an NSString object into a "simple" C-string (assuming I work with the restricted character set of C strings and ignore others) or is this so deprecated that no-one even considers it? Or am I just so naive and ignorant and unable to read documentation that the obvious and well-known simply escape me? Many thanks David Hill From sstevenson at mac.com Fri Feb 24 22:10:57 2006 From: sstevenson at mac.com (Scott Stevenson) Date: Fri Feb 24 22:11:03 2006 Subject: Objective-C to C string conversion In-Reply-To: References: Message-ID: On Feb 24, 2006, at 10:11 PM, David Hill wrote: > Is there an easy way (e.g. an existing method) to convert the > characters contained in an NSString object into a "simple" C-string > (assuming I work with the restricted character set of C strings and > ignore others) or is this so deprecated that no-one even considers it? -UTF8String The first of many indentical responses. - Scott From clarkcox3 at gmail.com Fri Feb 24 22:23:54 2006 From: clarkcox3 at gmail.com (Clark Cox) Date: Fri Feb 24 22:23:57 2006 Subject: Objective-C to C string conversion In-Reply-To: References: Message-ID: On 2/25/06, Scott Stevenson wrote: > > On Feb 24, 2006, at 10:11 PM, David Hill wrote: > > > Is there an easy way (e.g. an existing method) to convert the > > characters contained in an NSString object into a "simple" C-string > > (assuming I work with the restricted character set of C strings and > > ignore others) or is this so deprecated that no-one even considers it? > > -UTF8String > > The first of many indentical responses. -UTF8String (sorry, I just had to) -- Clark S. Cox III clarkcox3@gmail.com My CV/Resume: http://homepage.mac.com/clarkcox3/files/Resume.pdf http://homepage.mac.com/clarkcox3/files/Resume.html From mailist at ericgorr.net Sat Feb 25 03:33:18 2006 From: mailist at ericgorr.net (Eric Gorr) Date: Sat Feb 25 03:33:35 2006 Subject: High Quality Volume Rendering Message-ID: <4400407E.7040607@ericgorr.net> I have found SDKs like the one at: http://fovia.com/ however, I have not found any that can be used with X-Code. Is anyone aware of any? From drh at firethorne.com Sat Feb 25 09:57:43 2006 From: drh at firethorne.com (David Hill) Date: Sat Feb 25 09:51:32 2006 Subject: Objective-C to C string conversion In-Reply-To: References: Message-ID: Thanks to everyone who pointed out the info I couldn't see for looking :o} david On Feb 24, 2006, at 10:23 PM, Clark Cox wrote: > On 2/25/06, Scott Stevenson wrote: >> >> On Feb 24, 2006, at 10:11 PM, David Hill wrote: >> >>> Is there an easy way (e.g. an existing method) to convert the >>> characters contained in an NSString object into a "simple" C-string >>> (assuming I work with the restricted character set of C strings and >>> ignore others) or is this so deprecated that no-one even >>> considers it? >> >> -UTF8String >> >> The first of many indentical responses. > > -UTF8String > > (sorry, I just had to) > > > -- > Clark S. Cox III > clarkcox3@gmail.com > My CV/Resume: > http://homepage.mac.com/clarkcox3/files/Resume.pdf > http://homepage.mac.com/clarkcox3/files/Resume.html > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev ------- David Hill, Prof. Emeritus |---------------------------------------- | CS Dept, U. Calgary | Imagination is more | Calgary, AB T2N 1N4 Canada | important than knowledge. | hill@cpsc.ucalgary.ca | Alberta Einstein | http://www.cpsc.ucalgary.ca | | OR drh@firethorne.com | Kill your television! | http://www.firethorne.com |---------------------------------------- | From laptop at ghosttiger.com Sat Feb 25 14:55:39 2006 From: laptop at ghosttiger.com (Jonathan Grynspan) Date: Sat Feb 25 14:55:45 2006 Subject: Objective-C to C string conversion In-Reply-To: References: Message-ID: Alternatively, if you want a C string using the system encoding, use: const char *cString = [objcString cStringUsingEncoding: [NSString defaultCStringEncoding]]; There's also the simpler -cString method that does the same thing, but it's deprecated because the encoding used is unpredictable. (You can, of course, use any of the NS___StringEncoding constants in place of [NSString defaultCStringEncoding] if you need a C string in some other encoding. -Jonathan Grynspan On 25-Feb-06, at 12:57 PM, David Hill wrote: > Thanks to everyone who pointed out the info I couldn't see for > looking :o} > > david > > On Feb 24, 2006, at 10:23 PM, Clark Cox wrote: > >> On 2/25/06, Scott Stevenson wrote: >>> >>> On Feb 24, 2006, at 10:11 PM, David Hill wrote: >>> >>>> Is there an easy way (e.g. an existing method) to convert the >>>> characters contained in an NSString object into a "simple" C-string >>>> (assuming I work with the restricted character set of C strings and >>>> ignore others) or is this so deprecated that no-one even >>>> considers it? >>> >>> -UTF8String >>> >>> The first of many indentical responses. >> >> -UTF8String >> >> (sorry, I just had to) >> >> >> -- >> Clark S. Cox III >> clarkcox3@gmail.com >> My CV/Resume: >> http://homepage.mac.com/clarkcox3/files/Resume.pdf >> http://homepage.mac.com/clarkcox3/files/Resume.html >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > ------- > David Hill, Prof. Emeritus > |---------------------------------------- | > CS Dept, U. Calgary | Imagination is more | > Calgary, AB T2N 1N4 Canada | important than knowledge. | > hill@cpsc.ucalgary.ca | Alberta Einstein | > http://www.cpsc.ucalgary.ca | | > OR drh@firethorne.com | Kill your television! | > http://www.firethorne.com |---------------------------------------- | > > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From tron.thomas at verizon.net Sat Feb 25 16:37:56 2006 From: tron.thomas at verizon.net (Tron Thomas) Date: Sat Feb 25 16:38:06 2006 Subject: Slow build times Message-ID: <4400F864.6030904@verizon.net> I have a PowerBook G4 running at 1.5 Gigahertz with 1.5 Gigabytes of RAM. The system has a 70 Gigabyte hard drive with about 17 Gigabytes used. I am running Mac OS X 10.4.5, and I have the Xcode 2.2.1 development tools installed. Our code base for the Macintosh builds using GNU Make and GCC 3.3. Also we build only for PowerPC. Lately while trying to build the code base on my system, the build times have been excessively long. One day last week, I started a clean build some time probably between 10:30 and 11:00 AM, and the build still wasn't done when I was ready to leave around 5:00 PM. I asked a member on our build team, and he said that his Mac mini system takes about 45 minutes to do a clean build. What should I look into to determine why the build times on my system are so slow? From joar at joar.com Sat Feb 25 17:28:57 2006 From: joar at joar.com (j o a r) Date: Sat Feb 25 17:29:15 2006 Subject: Slow build times In-Reply-To: <4400F864.6030904@verizon.net> References: <4400F864.6030904@verizon.net> Message-ID: On 26 feb 2006, at 01.37, Tron Thomas wrote: > What should I look into to determine why the build times on my > system are so slow? Check the Activity Monitor / top to see what your CPU is doing. j o a r From robert at laferla.net Sun Feb 26 20:25:59 2006 From: robert at laferla.net (Robert La Ferla) Date: Sun Feb 26 20:31:10 2006 Subject: Slow build times In-Reply-To: References: <4400F864.6030904@verizon.net> Message-ID: <44027F57.9020004@laferla.net> j o a r wrote: > > On 26 feb 2006, at 01.37, Tron Thomas wrote: > >> What should I look into to determine why the build times on my system >> are so slow? > > Check the Activity Monitor / top to see what your CPU is doing. Also, are there any messages in any log files or the console? What are your Energy Saver preferences set to? From bigwig at dsl.pipex.com Mon Feb 27 16:56:31 2006 From: bigwig at dsl.pipex.com (nick briggs) Date: Mon Feb 27 16:56:53 2006 Subject: Slow build times In-Reply-To: <200602272000.k1RK05qj007575@slowbro.omnigroup.com> References: <200602272000.k1RK05qj007575@slowbro.omnigroup.com> Message-ID: <2C9EBE4B-8834-433F-B91A-883A7B5E3CA5@dsl.pipex.com> Its a long shot but... I once had very long build times and tracked it down to 'distributed build' looking for a non existent machine on the network. Nick j o a r wrote: > > On 26 feb 2006, at 01.37, Tron Thomas wrote: > > >> What should I look into to determine why the build times on my system >> are so slow? >> > > Check the Activity Monitor / top to see what your CPU is doing. > Also, are there any messages in any log files or the console? What are your Energy Saver preferences set to? From jalkut at red-sweater.com Mon Feb 27 20:23:16 2006 From: jalkut at red-sweater.com (Daniel Jalkut) Date: Mon Feb 27 20:23:24 2006 Subject: Slow build times In-Reply-To: <2C9EBE4B-8834-433F-B91A-883A7B5E3CA5@dsl.pipex.com> References: <200602272000.k1RK05qj007575@slowbro.omnigroup.com> <2C9EBE4B-8834-433F-B91A-883A7B5E3CA5@dsl.pipex.com> Message-ID: Another thing you might look into is whether or not you're running with an Intel Core Duo CPU. If you're not... well that would explain it. Daniel On Feb 27, 2006, at 7:56 PM, nick briggs wrote: > Its a long shot but... I once had very long build times and tracked > it down to 'distributed build' looking for a non existent machine > on the network. > > Nick > > > j o a r wrote: > >> >> On 26 feb 2006, at 01.37, Tron Thomas wrote: >> >> >>> What should I look into to determine why the build times on my >>> system >>> are so slow? >>> >> >> Check the Activity Monitor / top to see what your CPU is doing. >> > Also, are there any messages in any log files or the console? What > are > your Energy Saver preferences set to? > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From vctr.br at mail.ru Tue Feb 28 02:07:05 2006 From: vctr.br at mail.ru (=?koi8-r?Q?=F7=C9=CB=D4=CF=D2=20=E2=CF=D2=DD=C1=CB?=) Date: Tue Feb 28 02:07:23 2006 Subject: getting AFP server address Message-ID: Hello, Does anyone know if it's possible to get the AFP address of an AFP-server that is already mounted on the system. For example, if I have the server mounted at /Volumes/myserver, how do I get the address looking something like "afp://my-server.local"? Also, if there any possible way to find out this address for a server that is not yet mounted. For example for those that are located in /Network directory? I've searched all over the documentation but to no avail. But I think this must be possible for sure!... Thanks! From tron.thomas at verizon.net Tue Feb 28 18:23:01 2006 From: tron.thomas at verizon.net (Tron Thomas) Date: Tue Feb 28 18:23:15 2006 Subject: Slow build times In-Reply-To: <200602282000.k1SK06qe014037@slowbro.omnigroup.com> References: <200602282000.k1SK06qe014037@slowbro.omnigroup.com> Message-ID: <44050585.5060007@verizon.net> I'm not sure what you are suggesting Daniel. I'm using a PowerBook G4 so there is no Intel processor involved. The build time use to be much more reasonable. It is only lately that it has been really slow. I suspect there is something wrong with my system, and I'm not sure what it is. > Date: Mon, 27 Feb 2006 23:23:16 -0500 > From: Daniel Jalkut > Subject: Re: Slow build times > To: nick briggs > Cc: macosx-dev@omnigroup.com > Message-ID: > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > Another thing you might look into is whether or not you're running > with an Intel Core Duo CPU. If you're not... well that would explain it. > > Daniel > > On Feb 27, 2006, at 7:56 PM, nick briggs wrote: > > >> Its a long shot but... I once had very long build times and tracked >> it down to 'distributed build' looking for a non existent machine >> on the network. >> >> Nick >> From tron.thomas at verizon.net Tue Feb 28 18:25:53 2006 From: tron.thomas at verizon.net (Tron Thomas) Date: Tue Feb 28 18:26:10 2006 Subject: Slow build times In-Reply-To: <44027E54.3060103@comcast.net> References: <4400F864.6030904@verizon.net> <44027E54.3060103@comcast.net> Message-ID: <44050631.5090008@verizon.net> I did not see anything in the log files that looked relevant to the build slowness. Here's my Energy Saver preferences for when I have the power attached (which is the way mostly use the laptop): Energy settings are optimized for high performance. Computer never goes to sleep when inactive Display goes to sleep when computer is inactive for 20 minutes Hard drives go to sleep when possible Robert La Ferla wrote: > j o a r wrote: >> >> On 26 feb 2006, at 01.37, Tron Thomas wrote: >> >>> What should I look into to determine why the build times on my >>> system are so slow? >> >> Check the Activity Monitor / top to see what your CPU is doing. > Also, are there any messages in any log files or the console? What > are your Energy Saver preferences set to? > > > >