From dunham at mac.com Thu Jul 5 22:06:07 2007 From: dunham at mac.com (David Dunham) Date: Thu Jul 5 22:06:21 2007 Subject: alignCenter: menu never gets check state Message-ID: <7EBD7CC7-2B0E-4A69-ADEA-5AF9AE14C75B@mac.com> I added the align*: actions to my NSTextView subclass (which displays rich text), and while they work, they never receive a checkmark. I notice that TextEdit doesn't show a checkmark either, so I doubt it's my application. Is this a bug, or by design? Or am I just missing a way to hook this up via IB? David Dunham A Sharp, LLC http://a-sharp.com "People seem to misinterpret complexity as sophistication" -- Niklaus Wirth From i.joyner at acm.org Fri Jul 6 06:08:57 2007 From: i.joyner at acm.org (Ian Joyner) Date: Fri Jul 6 06:09:06 2007 Subject: Modern version of MacEiffel? In-Reply-To: <419497832.20070627092359@web.de> References: <40268858-250C-473E-9CEF-690954684700@gmail.com> <419497832.20070627092359@web.de> Message-ID: <1888EBF7-0D0C-482A-B775-2AB7FAB1A18F@acm.org> Lothar, You really ought to check your facts before you post such claims. You are wrong on many of your points below. Ian On 27/06/2007, at 12:23 PM, Lothar Scholz wrote: > Hello Henry, > > Sunday, June 24, 2007, 6:03:51 AM, you wrote: > > H> I am looking into the Eiffel programming language, > > Unforunately Eiffel is dead. There are only two alive dialects > > a) SmartEiffel Eiffel (implemented by SmartEiffel) > b) ECMA Eiffel (implemented by EiffelStudio) > > (a) is a complete unuseable for real world programming. Compilation is > slow as hell, the runtime is a joke and the project team is completely > insane. Breaking backward compatibility every 5 minutes, with > arguments "oh i like the method name barfoo much more then foobar". > > H> to not to use the EiffelStudio IDE in X11. I have found the > maceiffel > H> project (maceiffel.com), but it seems like it has not been > updated in > H> a while, and doesn't seem to be Intel compatible. > > Because it is based on Object Tools Eiffel compiler and this was > discontinued around four years ago. There is no hope that it will > ever be > an active project from this company again. And there is no community > large enough to work on a GPL compiler (especially when the Runtime is > GPL which forbids the use for most people). > > H> It also looks like > H> it has rather restrictive licensing. Is there a newer product > similar > H> to MacEiffel? Another other way to use Eiffel in XCode? > > I'm using my own Eiffel compiler based on a heavily patched version of > SmallEiffel (i spend around 1 year full time). But i don't believe > i will release it to the public, because turning it into something > usefull for normal customers would require about two or three months > full time work. It is also working only with the FOX Toolkit in X11. > > So EiffelStudio seems to be your only real choice. Why don't you like > it, because of the license/pricing or because it's X11? > > > -- > Best regards, > Lothar mailto:llothar@web.de > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From ben at tanjero.com Fri Jul 6 16:32:32 2007 From: ben at tanjero.com (Benjamin Stiglitz) Date: Fri Jul 6 16:32:37 2007 Subject: alignCenter: menu never gets check state In-Reply-To: <7EBD7CC7-2B0E-4A69-ADEA-5AF9AE14C75B@mac.com> References: <7EBD7CC7-2B0E-4A69-ADEA-5AF9AE14C75B@mac.com> Message-ID: <1E9A5274-99F2-4DB1-BBE0-AA1095819A13@tanjero.com> > I added the align*: actions to my NSTextView subclass (which > displays rich text), and while they work, they never receive a > checkmark. > > I notice that TextEdit doesn't show a checkmark either, so I doubt > it's my application. > > Is this a bug, or by design? Or am I just missing a way to hook this > up via IB? David, which check marks are you talking about? Checked items in the Text submenu of the Format menu? In IB? Somewhere else? -Ben From dunham at mac.com Fri Jul 6 17:27:06 2007 From: dunham at mac.com (David Dunham) Date: Fri Jul 6 17:27:28 2007 Subject: alignCenter: menu never gets check state In-Reply-To: <1E9A5274-99F2-4DB1-BBE0-AA1095819A13@tanjero.com> References: <7EBD7CC7-2B0E-4A69-ADEA-5AF9AE14C75B@mac.com> <1E9A5274-99F2-4DB1-BBE0-AA1095819A13@tanjero.com> Message-ID: Sorry, I was sloppy. The menu items for the actions don't get checkmarks. www.pensee.com/dunham/ On Jul 6, 2007, at 4:32 PM, Benjamin Stiglitz wrote: >> I added the align*: actions to my NSTextView subclass (which >> displays rich text), and while they work, they never receive a >> checkmarks. >> >> > > David, which check marks are you talking about? Checked items in the > Text submenu of the Format menu? In IB? Somewhere else? > > -Ben From dunham at mac.com Sun Jul 8 13:25:58 2007 From: dunham at mac.com (David Dunham) Date: Sun Jul 8 13:26:16 2007 Subject: Alignment segmented control for an NSTextView Message-ID: I'd like to put a segmented control in my toolbar, essentially the same one that TextEdit uses in the ruler. (My application layout doesn't support a ruler.) TextEdit keeps the alignment segments updated as the selection changes (even though it doesn't update the corresponding menu items). How do I make this happen? Observe NSTextViewDidChangeSelectionNotification and update it then? And that won't catch changes due to Undo. David Dunham www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From cmhofman at gmail.com Sun Jul 8 13:39:56 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Sun Jul 8 13:40:18 2007 Subject: Alignment segmented control for an NSTextView In-Reply-To: References: Message-ID: <9B8EDDB9-79D0-492D-8B64-EF4CDF0BF0E3@gmail.com> Obvious one: have you looked at the source code of TextEdit? Christiaan On 8 Jul 2007, at 10:25 PM, David Dunham wrote: > I'd like to put a segmented control in my toolbar, essentially the > same one that TextEdit uses in the ruler. (My application layout > doesn't support a ruler.) > > TextEdit keeps the alignment segments updated as the selection > changes (even though it doesn't update the corresponding menu > items). How do I make this happen? Observe > NSTextViewDidChangeSelectionNotification and update it then? And > that won't catch changes due to Undo. > > David Dunham www.pensee.com/dunham/ > Imagination is more important than knowledge. -- Albert Einstein > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From bob at apple.com Mon Jul 9 06:33:37 2007 From: bob at apple.com (Bob Frank) Date: Mon Jul 9 06:33:57 2007 Subject: MEETING: Chicago CocoaHeads / CAWUG Tuesday July 10th - iPhone & WWDC Recap In-Reply-To: <587DE7E8-B457-44C8-8BE4-2A4BADE4626A@apple.com> References: <587DE7E8-B457-44C8-8BE4-2A4BADE4626A@apple.com> Message-ID: <8059666F-DC0D-4941-941C-2791CA61DAF3@apple.com> Hi all, This Tuesday will be our next meeting. I will be talking about the public announcements from WWDC and about designing web content for the iPhone. The Chicago CocoaHeads / Chicago Cocoa and WebObjects User Group (CAWUG) is holding our next meeting this coming Tuesday, July 10th, at 6:00 PM at the Apple Store on Michigan Ave. http://developer.apple.com/iphone/designingcontent.html Agenda: - Introductions & Announcements - Bob Frank on WWDC Recap - Bob on web development for the iPhone - Q & A - adjournment to O'Toole's When: Tuesday, July 10th, 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 - Bob on WWDC Wrapup Lots was discussed at WWDC, even in the public keynote. The overall theme was get your apps ready for Leopard. I will discuss several of the points highlighted in the public keynote. - Bob on web development for the iPhone. The iPhone is here. I know some of our regulars already have them (if you already have an iPhone, I doubt I need to ask you to bring it to the meeting :-). Apple has just published this excellent guide about developing for the iPhone. I will discuss iPhone development issues. http://developer.apple.com/iphone/designingcontent.html - O'Tooles We will continue the discussion at our local watering hold Timothy O'Toole's at 622 Fairbanks (2 blocks east of the store). We also wish to thank the folks who run the theater space at the Apple store for letting us have our meetings there, and Jonathan 'Wolf' Rentzsch for hosting the CAWUG web site and our listserve. Thanks all. Also, if you are working on a project and would like to talk about it briefly / promote it, I think it would be fun for people to hear about other people's projects. Please email me off line and you can talk at a future meeting or would like a book to review. Future meetings dates: July 10th, Aug. 14th (post C40 CAWUG Resources Web Site: http://www.cawug.org/ RSS feed: http://www.cawug.org/rss.xml Mail list: http://redshed.net/mailman/listinfo/cawug-announce iCal: http://ical.mac.com/chicagobob/ Chicago-CocoaHeads-CAWUG (view on the web) iCal: webcal://ical.mac.com/chicagobob/Chicago-CocoaHeads-CAWUG.ics (subscribe to in iCal) Cocoa Heads web site: http://cocoaheads.org/us/ChicagoIllinois/index.html Hope to see you at the meeting. -Bob --- Bob Frank (312) 961 - 0509 [cell] bob@apple.com From bierman at apple.com Mon Jul 9 15:04:18 2007 From: bierman at apple.com (Peter Bierman) Date: Mon Jul 9 15:04:31 2007 Subject: New Finder In-Reply-To: References: Message-ID: At 9:18 PM -0700 6/12/07, Andrew Merenbach wrote: >Hi, all, > >I had a quick question that's been gnawing a huge hole in my side. >Could anyone not under NDA (or, if it is acceptable under NDA) tell >me whether the Finder is now pure Cocoa? The answer is irrelevant. There is no such thing as "Pure" Cocoa, or "Pure" anything. Cocoa is an object oriented interface to Apple's frameworks and libraries. There are other interfaces, such as C interfaces commonly called "Carbon", and other C interfaces known as POSIX or BSD APIs. All of Apple's code uses a mix of those interfaces. They are not parallel stacks of code (and really never were.) Some of Cocoa is built on Carbon is built on BSD is built on POSIX is built on... And even that quip is oversimplification. There are many interfaces. Some are faster than others, depending on what sort of "faster" you're talking about. -pmb From ERIK.BUCK at SBCGLOBAL.NET Mon Jul 9 17:06:43 2007 From: ERIK.BUCK at SBCGLOBAL.NET (Erik Buck) Date: Mon Jul 9 17:06:56 2007 Subject: New Finder Message-ID: <2ADC7B07-36D2-4778-863B-5CFA9DA9012C@SBCGLOBAL.NET> The predecessor to Cocoa, Openstep, combined with Unix/BSD/Posix APIs generally provided everything a traditional application programmer needed. Openstep for Windows came with Cygwin which provided the necessary Unix APIs upon which Openstep and Openstep applications depended. While renaming Openstep to Cocoa, Apple removed features from Openstep and added dependancies on Carbon and other Mac only technologies. In all fairness, over the years Apple has added a lot of new capabilities that never existed in Openstep. Typical applications now also demand features that were unheard of in the Openstep days. Many Mac OS X users have concluded that the quality and nativeness of Cocoa applications is superior to Carbon applications. In reality, it is possible to produce a fantastic application that is fully native using either Cocoa or Carbon. In fact, now that Cocoa has dependencies on Carbon, in a sense every Cocoa application is a Carbon application. However, the general conclusion that Cocoa applications are "better" has some basis in reality. Part of that has to do with the companies that chose to use Carbon vs. Cocoa. Companies that had a bunch of old code from OS 9 days used Carbon to port to OS X with a minimum of effort. In many cases, the same goal of minimal effort also meant that they didn't invest enough in new Mac OS X idioms to make their applications feel native. However, the argument is that without Carbon, the applications wouldn't have been ported to OS X at all. Minimally ported applications are better than none. Another fact of life is that it is much harder and error prone to write a good Mac OS X application using pure Carbon than with Cocoa. The same was true in the old days: it was easier to write a good Windows, Solaris, NeXTstep/Mach, or HPUX application with Openstep than with Win32 or X/Motif. Because it is so much harder to use pure Carbon, many Carbon applications are missing features that are taken for granted in Cocoa applications. Finally, in my experience, great companies and great programmers know a great technology when they see it. e.g. Cocoa. Mediocre companies and bad programmers ignore great technology and prefer to stay with the familiar. There are often solid business reasons why a great technology can't be adopted, so don't read too much into this. In the case of Mac OS X, mediocre companies and bad programmers prefer Carbon. To put it another way, if you are a great company or a great programmer, you may not be able to use Cocoa for valid business reasons. If you are a mediocre company or a bad programmer, you may not even want to use Cocoa. From dunham at mac.com Mon Jul 9 20:31:29 2007 From: dunham at mac.com (David Dunham) Date: Mon Jul 9 20:31:49 2007 Subject: Alignment segmented control for an NSTextView In-Reply-To: <9B8EDDB9-79D0-492D-8B64-EF4CDF0BF0E3@gmail.com> References: <9B8EDDB9-79D0-492D-8B64-EF4CDF0BF0E3@gmail.com> Message-ID: <26724CE7-04C8-4AAF-927F-A4F021449819@mac.com> On 8 Jul 2007, at 13:39, Christiaan Hofman wrote: > Obvious one: have you looked at the source code of TextEdit? I didn't see anything relevant there -- my guess is that NSTextView handles this all internally. David Dunham www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From d.theisen at gmx.net Wed Jul 11 00:42:16 2007 From: d.theisen at gmx.net (Dirk Theisen) Date: Wed Jul 11 00:42:31 2007 Subject: New Finder In-Reply-To: <77947544-7628-48DE-80E9-EDC7A191A4DD@mclink.it> Message-ID: Hi! > And in accordance with Occam's razor, I think what I suggest is a lot > more likely than the yellowbox theory. Anyone interested in Cocoa on WIndows is welcome to contribute to Cocotron. IMHO an extremely promising approach with examples already running. CU there... Greetings, Dirk From dunham at mac.com Thu Jul 12 13:16:36 2007 From: dunham at mac.com (David Dunham) Date: Thu Jul 12 13:16:52 2007 Subject: WWDC bags Message-ID: <19F61CA2-00ED-49B7-8D51-BE2B4C86349A@mac.com> Maybe this is covered by the NDA, but I think we had the bags during the keynote so probably not... Does anyone know where the laptop bags came from this year? They were significantly better than last year's bags. Someone told me Brenthaven, but I think this was just a guess, and their bags don't match. David Dunham www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From fabianschuiki at bluewin.ch Thu Jul 12 15:19:12 2007 From: fabianschuiki at bluewin.ch (Fabian Schuiki) Date: Thu Jul 12 15:19:41 2007 Subject: SVN? Message-ID: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Hi, Question going to Omni or all other developers: Are you usign SVN oder some sort of SCM? Best, Fabian Fabian Schuiki fabianschuiki@bluewin.ch From alastair at alastairs-place.net Thu Jul 12 15:11:40 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Thu Jul 12 15:41:02 2007 Subject: WWDC bags In-Reply-To: <19F61CA2-00ED-49B7-8D51-BE2B4C86349A@mac.com> References: <19F61CA2-00ED-49B7-8D51-BE2B4C86349A@mac.com> Message-ID: <10386598-229C-4BC0-AC45-923EEC0D3740@alastairs-place.net> On 12 Jul 2007, at 21:16, David Dunham wrote: > Maybe this is covered by the NDA, but I think we had the bags > during the keynote so probably not... It can't be NDA'd, because we walked around with them in public, so they are clearly public knowledge. > Does anyone know where the laptop bags came from this year? Sadly I don't know. They are quite nice though. Kind regards, Alastair. -- http://alastairs-place.net From dunham at mac.com Thu Jul 12 15:47:24 2007 From: dunham at mac.com (David Dunham) Date: Thu Jul 12 15:47:30 2007 Subject: SVN? In-Reply-To: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Message-ID: On 12 Jul 2007, at 15:19, Fabian Schuiki wrote: > Question going to Omni or all other developers: Are you usign SVN > oder some sort of SCM? Xcode supports SVN and CVS. I use both, depending on the project. (I happen to use SVN with multi-person projects and CVS with a one- developer project.) David Dunham www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From atomicbird at gmail.com Thu Jul 12 16:23:30 2007 From: atomicbird at gmail.com (Tom Harrington) Date: Thu Jul 12 16:23:46 2007 Subject: WWDC bags In-Reply-To: <19F61CA2-00ED-49B7-8D51-BE2B4C86349A@mac.com> References: <19F61CA2-00ED-49B7-8D51-BE2B4C86349A@mac.com> Message-ID: <68162e550707121623o1f7d0dbfnabf3d10cb93d3271@mail.gmail.com> On 7/12/07, David Dunham wrote: > Maybe this is covered by the NDA, but I think we had the bags during > the keynote so probably not... > > Does anyone know where the laptop bags came from this year? They were > significantly better than last year's bags. Someone told me > Brenthaven, but I think this was just a guess, and their bags don't > match. I can't be certain, but they do look an awful lot like the Brenthaven Fusion MB-- though without the removable sleeve. See http://www.brenthaven.com/catalog-fusion-black.html for pics. -- Tom Harrington atomicbird@gmail.com AIM: atomicbird1 From newsletters at vonBelow.Com Thu Jul 12 16:26:46 2007 From: newsletters at vonBelow.Com (Alex v. Below) Date: Thu Jul 12 16:27:06 2007 Subject: SVN? In-Reply-To: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Message-ID: Am 13.07.2007 um 00:19 schrieb Fabian Schuiki: > Hi, > > Question going to Omni or all other developers: Are you usign SVN > oder some sort of SCM? We are using svn. And even for my personal projects, anything that does not live in /tmp goes into SCM Alex From dunham at mac.com Thu Jul 12 17:01:44 2007 From: dunham at mac.com (David Dunham) Date: Thu Jul 12 17:02:07 2007 Subject: WWDC bags In-Reply-To: <68162e550707121623o1f7d0dbfnabf3d10cb93d3271@mail.gmail.com> References: <19F61CA2-00ED-49B7-8D51-BE2B4C86349A@mac.com> <68162e550707121623o1f7d0dbfnabf3d10cb93d3271@mail.gmail.com> Message-ID: <96FE6480-08AE-42B0-98B1-6D06283C9810@mac.com> On 12 Jul 2007, at 16:23, Tom Harrington wrote: > I can't be certain, but they do look an awful lot like the Brenthaven > Fusion MB-- though without the removable sleeve. See > http://www.brenthaven.com/catalog-fusion-black.html for pics. I think you're right. This bag is out of stock, which might be why I didn't spot it. (And can't get a price :-) David Dunham www.pensee.com/dunham/ Imagination is more important than knowledge. -- Albert Einstein From fabianschuiki at bluewin.ch Fri Jul 13 07:55:31 2007 From: fabianschuiki at bluewin.ch (Fabian Schuiki) Date: Fri Jul 13 07:55:50 2007 Subject: SVN? In-Reply-To: References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Message-ID: <08D08981-7C9A-4E92-AFE4-7AE35F1FA525@bluewin.ch> Nice, I started using SVN a few months ago and it seems to be quite solid. Do you use any GUI-frontend for CVS / SVN? Best Fabian Schuiki fabianschuiki@bluewin.ch Am 13.07.2007 um 01:26 schrieb Alex v. Below: > > Am 13.07.2007 um 00:19 schrieb Fabian Schuiki: > >> Hi, >> >> Question going to Omni or all other developers: Are you usign SVN >> oder some sort of SCM? > > We are using svn. And even for my personal projects, anything that > does not live in /tmp goes into SCM > > Alex From cmhofman at gmail.com Fri Jul 13 08:02:23 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Fri Jul 13 08:02:31 2007 Subject: SVN? In-Reply-To: <08D08981-7C9A-4E92-AFE4-7AE35F1FA525@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <08D08981-7C9A-4E92-AFE4-7AE35F1FA525@bluewin.ch> Message-ID: <9CD938DE-B35E-4EB8-812C-6BE9A6129E54@gmail.com> I am using Xcode for committing and some basic status checking. Though Xcode's CSM UI is a bit buggy and misses some crucial svn features, and it can sometimes interfere with the rest of Xcode's uses. Another SVN GUI I sometimes use is svnX. Christiaan On 13 Jul 2007, at 4:55 PM, Fabian Schuiki wrote: > Nice, I started using SVN a few months ago and it seems to be quite > solid. > Do you use any GUI-frontend for CVS / SVN? > > Best > > Fabian Schuiki > fabianschuiki@bluewin.ch > > > Am 13.07.2007 um 01:26 schrieb Alex v. Below: > >> >> Am 13.07.2007 um 00:19 schrieb Fabian Schuiki: >> >>> Hi, >>> >>> Question going to Omni or all other developers: Are you usign SVN >>> oder some sort of SCM? >> >> We are using svn. And even for my personal projects, anything that >> does not live in /tmp goes into SCM >> >> Alex > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From newsletters at vonBelow.Com Fri Jul 13 15:15:11 2007 From: newsletters at vonBelow.Com (Alex v. Below) Date: Fri Jul 13 15:15:23 2007 Subject: SVN? In-Reply-To: <08D08981-7C9A-4E92-AFE4-7AE35F1FA525@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <08D08981-7C9A-4E92-AFE4-7AE35F1FA525@bluewin.ch> Message-ID: <1945088F-E951-4260-8B0E-ED803D90AC93@vonBelow.Com> Am 13.07.2007 um 16:55 schrieb Fabian Schuiki: > Do you use any GUI-frontend for CVS / SVN? I use Xcode for what I can, but I do not trust svn GUIs in general. And I am comfortable with doing things Old Skool in the command line Alex From kusterer at gmail.com Sat Jul 14 18:04:18 2007 From: kusterer at gmail.com (Uli Kusterer) Date: Sat Jul 14 18:04:47 2007 Subject: SVN? In-Reply-To: <1945088F-E951-4260-8B0E-ED803D90AC93@vonBelow.Com> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <08D08981-7C9A-4E92-AFE4-7AE35F1FA525@bluewin.ch> <1945088F-E951-4260-8B0E-ED803D90AC93@vonBelow.Com> Message-ID: On 14.07.2007, at 00:15, Alex v. Below wrote: > Am 13.07.2007 um 16:55 schrieb Fabian Schuiki: >> Do you use any GUI-frontend for CVS / SVN? > > I use Xcode for what I can, but I do not trust svn GUIs in general. > And I am comfortable with doing things Old Skool in the command line We're using SmartSVN at work. Really great app, although I initially had some problems getting it set up. It kinda feels like Eclipse, GUI-wise, but the actual source control features are much better, and it's not as slow, nor as frustrating as svnX can be. Cheers, -- M. Uli Kusterer http://www.zathras.de From macosx-dev at brainchild.nl Sun Jul 15 05:34:20 2007 From: macosx-dev at brainchild.nl (Richard Altenburg (brainchild.nl)) Date: Sun Jul 15 05:43:08 2007 Subject: Clearing print queues and starting stopped print queues Message-ID: Being new to this list, I would like to say "Hi". I have a particular print queue related problem on a school I work for, and have a script to work around the issues: #!/bin/bash lpstat -p | awk '{print $2}' | while read printer do echo "Clearing jobs for printer:" $printer lprm - -P $printer /usr/bin/enable $printer done I would rather do this in a Cocoa application that does a little more housekeeping work on the Mac OS X 10.4.x machines in the school. The application should launch at login of a student, and run without being too intrusive. I have a lot to learn, and am reading books and the documentation in my Developer folder all the time, but controlling CUPS for printing from Cocoa seems not so obvious, at least not to me. Can a script like the above be replaced by code in my Cocoa app? Can you show me the way to a solution? Thanks for your time, Richard. -- Brainchild :: Every product a sparkle of common sense * ----------------------------------------------------- * * * From mah at jump-ing.de Sun Jul 15 07:24:19 2007 From: mah at jump-ing.de (Markus Hitter) Date: Sun Jul 15 07:24:40 2007 Subject: Clearing print queues and starting stopped print queues In-Reply-To: References: Message-ID: <63101838-50C1-4154-A6F8-FD394209C23A@jump-ing.de> Am 15.07.2007 um 14:34 schrieb Richard Altenburg (brainchild.nl): > I would rather do this in a Cocoa application that does a little more > housekeeping work on the Mac OS X 10.4.x machines in the school. The > application should launch at login of a student, and run without > being too > intrusive. Well, running just a script would be least intrusive, the student would barely notice the housekeeping. To make a script double- clickable, give it the .command suffix; you can put it into startup items, then. Another way to go would be a login hook (google for it). Login hooks use the same script for all users, run with root privileges. > Can a script like the above be replaced by code in my Cocoa app? > Can you > show me the way to a solution? Administration tasks are often best done by shell scripts. Quick, good performance. The easiest way to run a script from a Cocoa app is path = "/full/path/to/script"; r = system(path); if (r) { NSLog(@"Something went wrong with %s", path); } Your application's bundle is a fine place the put the script in, use NSBundle to find out where the app currently lives. Alternatively to system() you can use NSTask, which is more complex, but gives you more options as well. HTH, Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From kusterer at gmail.com Sun Jul 15 11:44:17 2007 From: kusterer at gmail.com (Uli Kusterer) Date: Sun Jul 15 15:01:02 2007 Subject: Clearing print queues and starting stopped print queues In-Reply-To: <63101838-50C1-4154-A6F8-FD394209C23A@jump-ing.de> References: <63101838-50C1-4154-A6F8-FD394209C23A@jump-ing.de> Message-ID: <670ABBAE-693A-4DB4-9240-372629CFA0AF@gmail.com> On 15.07.2007, at 16:24, Markus Hitter wrote: > Well, running just a script would be least intrusive, the student > would barely notice the housekeeping. To make a script double- > clickable, give it the .command suffix; you can put it into startup > items, then. Errr... that would cause it to open in Terminal.app with a visible Terminal window. Not sure that qualifies as "barely notice", but YMMV. > path = "/full/path/to/script"; > r = system(path); > if (r) { > NSLog(@"Something went wrong with %s", path); > } > > Your application's bundle is a fine place the put the script in, > use NSBundle to find out where the app currently lives. > > Alternatively to system() you can use NSTask, which is more > complex, but gives you more options as well. Watch out to only use system() with hardcoded paths. system() effectively "types its argument into a Terminal", so if you pass user data in, someone could type in quotes or whatever into a path field and inject code into your app. NSTask doesn't parse its arguments, which is a lot safer. Cheers, -- M. Uli Kusterer http://www.zathras.de From gerti at bitart.com Mon Jul 16 12:48:13 2007 From: gerti at bitart.com (Gerd Knops) Date: Mon Jul 16 12:57:01 2007 Subject: SVN? In-Reply-To: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Message-ID: Like others I only use SCM from the command line, or occasionally from Textmate. The svn implementation in Xcode seems to get in the way more often than it helps. My current projects use a remote svn repository. I prefer to only check in tested versions that more or less work, so I am using darcs for local finer-grained control. Darcs (once one gets it to work) works quite nicely in parallel to svn. Gerd From SRNoyes at cox.net Mon Jul 16 18:27:01 2007 From: SRNoyes at cox.net (Steven Noyes) Date: Mon Jul 16 18:27:10 2007 Subject: SVN? In-Reply-To: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Message-ID: Using SVN but not through XCode. Using SmartSVN (not bad at all but not without its own warts) with the a single repository but multiple projects. Code is compiled VIA Borland C 3.1 (Yep DOS) in Virtual PC (G5) or Parallels (Laptop) using a Samba share to symbolic links to the repository files. Would not mind getting the XCode interface up and running. Pretty seamless actually and requires no copying even of shared common files between projects. Steven On Jul 12, 2007, at 3:19 PM, Fabian Schuiki wrote: > Hi, > > Question going to Omni or all other developers: Are you usign SVN > oder some sort of SCM? > > Best, > Fabian > > Fabian Schuiki > fabianschuiki@bluewin.ch > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From macosx-dev at brainchild.nl Mon Jul 16 21:30:04 2007 From: macosx-dev at brainchild.nl (Richard Altenburg (brainchild.nl)) Date: Mon Jul 16 21:30:18 2007 Subject: Clearing print queues and starting stopped print queues In-Reply-To: <63101838-50C1-4154-A6F8-FD394209C23A@jump-ing.de> Message-ID: On 15-07-2007 16:24, "Markus Hitter" wrote: > Another way to go would be a login hook (google for it). Login hooks > use the same script for all users, run with root privileges. That is good to know, that it runs as root. Sometimes the script needs to clean up print queues from the previous user, which the current user can not do because of privileges. Being able to run my script as root eliminates this problem. > Administration tasks are often best done by shell scripts. Quick, > good performance. The easiest way to run a script from a Cocoa app is > > path = "/full/path/to/script"; > r = system(path); > if (r) { > NSLog(@"Something went wrong with %s", path); > } > > Your application's bundle is a fine place the put the script in, use > NSBundle to find out where the app currently lives. > Alternatively to system() you can use NSTask, which is more complex, > but gives you more options as well. In "Wrapping a Command Line Application with a GUI Interface" in the Reference Library I found more about NSTask which I do not yet understand but will read and try. If that does not work, I will go with system() for now. Thank you Markus. -- Richard Altenburg - brainchild.nl From macosx-dev at brainchild.nl Mon Jul 16 21:36:08 2007 From: macosx-dev at brainchild.nl (Richard Altenburg (brainchild.nl)) Date: Mon Jul 16 21:36:13 2007 Subject: Clearing print queues and starting stopped print queues In-Reply-To: <670ABBAE-693A-4DB4-9240-372629CFA0AF@gmail.com> Message-ID: On 15-07-2007 20:44, "Uli Kusterer" wrote: > On 15.07.2007, at 16:24, Markus Hitter wrote: >> Well, running just a script would be least intrusive > Errr... that would cause it to open in Terminal.app with a visible > Terminal window. Not sure that qualifies as "barely notice", but YMMV. It is not a big problem, but an application that sits nicely in the background and does the housekeeping at login, logout, or during the work of the student, would be best of course. My idea is that the program will do more in the future, like giving notices to all or some students about news that applies to them, or about system maintenance that is coming, and more. And maybe it will provide a user interface to our helpdesk system, so that students can call our department for help. > Watch out to only use system() with hardcoded paths. system() > effectively "types its argument into a Terminal", so if you pass user > data in, someone could type in quotes or whatever into a path field > and inject code into your app. NSTask doesn't parse its arguments, > which is a lot safer. I will try to understand NSTask. If system() gets its script from the application bundle, a student could find and change it, right? And if I wanted to run the script commands as root, I would have to include logon credentials in it as well, or? Sorry for my newbie questions, and thanks for your help, Uli. -- Richard Altenburg - brainchild.nl From mah at jump-ing.de Tue Jul 17 08:52:37 2007 From: mah at jump-ing.de (Markus Hitter) Date: Tue Jul 17 08:53:23 2007 Subject: Clearing print queues and starting stopped print queues In-Reply-To: References: Message-ID: <87C37D71-4407-46B6-A4B0-42C8703F8D38@jump-ing.de> Am 17.07.2007 um 06:36 schrieb Richard Altenburg (brainchild.nl): > If system() gets its script from the application bundle, a student > could > find and change it, right? This is true for system(), NSTask or any other mechanism to run scripts. You have to set permissions to disallow any changes. Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From deeptinker at 141.com Tue Jul 17 17:55:39 2007 From: deeptinker at 141.com (Deep Tinker) Date: Tue Jul 17 17:55:43 2007 Subject: SVN? In-Reply-To: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Message-ID: <11660552.post@talk.nabble.com> Fabian Schuiki wrote: > > Hi, > > Question going to Omni or all other developers: Are you usign SVN > oder some sort of SCM? > > Best, > Fabian > Hi Fabian, I use SVN for my Java development in NetBeans. After I set up the repository, I can use it directly from NetBeans with minimal fuss. It also lets me develop on both my laptop and my base Mac by checking in my changes on one machine, then update from SVN on the other. Travis -- View this message in context: http://www.nabble.com/SVN--tf4071195.html#a11660552 Sent from the OmniGroup - MacOSX-Dev mailing list archive at Nabble.com. From fabianschuiki at bluewin.ch Wed Jul 18 03:04:03 2007 From: fabianschuiki at bluewin.ch (Fabian Schuiki) Date: Wed Jul 18 03:04:19 2007 Subject: SVN? In-Reply-To: <11660552.post@talk.nabble.com> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> Message-ID: Okay, seems like a lot of people are using SVN. I think I'll use it more often from now on. One thing i realized and that hurts me somehow is that SVN doesn't preserve all those attributes of a file like labels and so on. Do you all use branches and tags? Best, Fabian Fabian Schuiki fabianschuiki@bluewin.ch Am 18.07.2007 um 02:55 schrieb Deep Tinker: > > > > Fabian Schuiki wrote: >> >> Hi, >> >> Question going to Omni or all other developers: Are you usign SVN >> oder some sort of SCM? >> >> Best, >> Fabian >> > > Hi Fabian, > > I use SVN for my Java development in NetBeans. After I set up the > repository, I can use it directly from NetBeans with minimal fuss. > It also > lets me develop on both my laptop and my base Mac by checking in my > changes > on one machine, then update from SVN on the other. > > Travis > -- > View this message in context: http://www.nabble.com/SVN-- > tf4071195.html#a11660552 > Sent from the OmniGroup - MacOSX-Dev mailing list archive at > Nabble.com. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From john_clayton at mac.com Wed Jul 18 03:20:11 2007 From: john_clayton at mac.com (Clayton John) Date: Wed Jul 18 03:20:23 2007 Subject: SVN? In-Reply-To: References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> Message-ID: <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> Hi SVN is worth the effort of learning it and crossing over. There are no tags in SVN, just branches. You can create a branch and call it a tag if you like, SVN does not care. Not having different syntax for tags/branches is also a time/life saver in my opinion. What attributes do you want preserved? I dont quite get that - file labels? -- John On 18 Jul 2007, at 12:04, Fabian Schuiki wrote: > Okay, seems like a lot of people are using SVN. I think I'll use it > more often from now on. > One thing i realized and that hurts me somehow is that SVN doesn't > preserve all those attributes of a file like labels and so on. > > Do you all use branches and tags? > > Best, > Fabian > > Fabian Schuiki > fabianschuiki@bluewin.ch > > > Am 18.07.2007 um 02:55 schrieb Deep Tinker: > >> >> >> >> Fabian Schuiki wrote: >>> >>> Hi, >>> >>> Question going to Omni or all other developers: Are you usign SVN >>> oder some sort of SCM? >>> >>> Best, >>> Fabian >>> >> >> Hi Fabian, >> >> I use SVN for my Java development in NetBeans. After I set up the >> repository, I can use it directly from NetBeans with minimal >> fuss. It also >> lets me develop on both my laptop and my base Mac by checking in >> my changes >> on one machine, then update from SVN on the other. >> >> Travis >> -- >> View this message in context: http://www.nabble.com/SVN-- >> tf4071195.html#a11660552 >> Sent from the OmniGroup - MacOSX-Dev mailing list archive at >> Nabble.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 fabianschuiki at bluewin.ch Wed Jul 18 03:24:17 2007 From: fabianschuiki at bluewin.ch (Fabian Schuiki) Date: Wed Jul 18 03:24:21 2007 Subject: SVN? In-Reply-To: <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> Message-ID: Hi, Okay. Yeah file labels would be quite nice (I usually use them to mark the important parts in my project folders). But I can also live without them :D Best, Fabian Fabian Schuiki fabianschuiki@bluewin.ch Am 18.07.2007 um 12:20 schrieb Clayton John: > Hi > > SVN is worth the effort of learning it and crossing over. There > are no tags in SVN, just branches. You can create a branch and call > it a tag if you like, SVN does not care. Not having different > syntax for tags/branches is also a time/life saver in my opinion. > > What attributes do you want preserved? I dont quite get that - > file labels? > > -- > John > > On 18 Jul 2007, at 12:04, Fabian Schuiki wrote: > >> Okay, seems like a lot of people are using SVN. I think I'll use >> it more often from now on. >> One thing i realized and that hurts me somehow is that SVN doesn't >> preserve all those attributes of a file like labels and so on. >> >> Do you all use branches and tags? >> >> Best, >> Fabian >> >> Fabian Schuiki >> fabianschuiki@bluewin.ch >> >> >> Am 18.07.2007 um 02:55 schrieb Deep Tinker: >> >>> >>> >>> >>> Fabian Schuiki wrote: >>>> >>>> Hi, >>>> >>>> Question going to Omni or all other developers: Are you usign SVN >>>> oder some sort of SCM? >>>> >>>> Best, >>>> Fabian >>>> >>> >>> Hi Fabian, >>> >>> I use SVN for my Java development in NetBeans. After I set up the >>> repository, I can use it directly from NetBeans with minimal >>> fuss. It also >>> lets me develop on both my laptop and my base Mac by checking in >>> my changes >>> on one machine, then update from SVN on the other. >>> >>> Travis >>> -- >>> View this message in context: http://www.nabble.com/SVN-- >>> tf4071195.html#a11660552 >>> Sent from the OmniGroup - MacOSX-Dev mailing list archive at >>> Nabble.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 alastair at alastairs-place.net Wed Jul 18 05:23:52 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Wed Jul 18 05:24:16 2007 Subject: SVN? In-Reply-To: References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> Message-ID: On 18 Jul 2007, at 11:04, Fabian Schuiki wrote: > Okay, seems like a lot of people are using SVN. I think I'll use it > more often from now on. > One thing i realized and that hurts me somehow is that SVN doesn't > preserve all those attributes of a file like labels and so on. You should file bug reports about anything you need to use. Subversion has full support for arbitrary attributes on files (it calls these "properties"), so if there are things that you would like it to track that it doesn't right now, there's no reason that it couldn't be altered to do so in future. In the meantime, it's entirely possible for you to store this extra metadata in the Subversion repository and retrieve it on demand using a script, if that's what you want to do. In fact, I just wrote a blog entry about it and wrote a couple of programs and scripts that you might find useful for doing this. http://alastairs-place.net/2007/07/cmdline-finder-labels/ Kind regards, Alastair. -- http://alastairs-place.net From louisdemers at mac.com Wed Jul 18 08:15:03 2007 From: louisdemers at mac.com (Louis Demers) Date: Wed Jul 18 08:15:28 2007 Subject: SVN? In-Reply-To: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> Message-ID: <438BCAE8-EED1-41B2-A42D-8F49A9614F8D@mac.com> We just switched to SVN and in addition to the reference book on SVN, the book was excellent to help us figure out the strategies and structure of the repository. http://www.pragmaticprogrammer.com/titles/svn/ On 12-Jul-07, at 18:19 , Fabian Schuiki wrote: > Hi, > > Question going to Omni or all other developers: Are you usign SVN > oder some sort of SCM? > > Best, > Fabian > > Fabian Schuiki > fabianschuiki@bluewin.ch > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev Louis Demers eng. www.obzerv.com From kusterer at gmail.com Wed Jul 18 09:22:12 2007 From: kusterer at gmail.com (Uli Kusterer) Date: Wed Jul 18 09:22:19 2007 Subject: SVN? In-Reply-To: <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> Message-ID: <44B516E2-D869-4CBF-BF95-175359813784@gmail.com> On 18.07.2007, at 12:20, Clayton John wrote: > SVN is worth the effort of learning it and crossing over. There > are no tags in SVN, just branches. You can create a branch and call > it a tag if you like, SVN does not care. Not having different > syntax for tags/branches is also a time/life saver in my opinion. Well, it simplifies things, but having real tags (i.e. "write- locked branches") comes in really handy sometimes. Though I guess in SVN you can at worst note down the revision number and build from that. > What attributes do you want preserved? I dont quite get that - > file labels? The ones in Finder, where you can set the color a file's title shows up in. SVN also doesn't do resource forks, which can be problematic if you have Aliases, type and creator codes and other Mac specifics. Cheers, -- M. Uli Kusterer http://www.zathras.de From alastair at alastairs-place.net Wed Jul 18 10:06:33 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Wed Jul 18 10:06:40 2007 Subject: Subversion and Mac specific things (was: Re: SVN?) In-Reply-To: <44B516E2-D869-4CBF-BF95-175359813784@gmail.com> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> <44B516E2-D869-4CBF-BF95-175359813784@gmail.com> Message-ID: <98A6081A-FAEF-4DEB-A074-D1D7A96D12FD@alastairs-place.net> On 18 Jul 2007, at 17:22, Uli Kusterer wrote: > On 18.07.2007, at 12:20, Clayton John wrote: >> SVN is worth the effort of learning it and crossing over. There >> are no tags in SVN, just branches. You can create a branch and >> call it a tag if you like, SVN does not care. Not having >> different syntax for tags/branches is also a time/life saver in my >> opinion. > > Well, it simplifies things, but having real tags (i.e. "write- > locked branches") comes in really handy sometimes. Though I guess > in SVN you can at worst note down the revision number and build > from that. > >> What attributes do you want preserved? I dont quite get that - >> file labels? > > The ones in Finder, where you can set the color a file's title > shows up in. SVN also doesn't do resource forks, which can be > problematic if you have Aliases, type and creator codes and other > Mac specifics. Sure. Again, though, the solution is to file a bug report, and (for the meantime), stuff any extra data you need into Subversion properties. It isn't hard to do, and changes to them are versioned, so you do get the behaviour you're looking for apart from having to do a couple of extra things at check-out, commit or update. However, before a whole load of us going stuffing our Subversion repositories full of differently named attributes for these things, perhaps we should standardise the names of them? I propose reserving the prefix "mac:" for Mac specific attributes. The scripts I posted earlier are using "mac:colour" for the coloured labels. Since I expect U.S.-based folk will probably complain about the spelling, perhaps we should call that "label" instead? We could then reserve mac:label - Finder label mac:type - Mac type code mac:creator - Mac creator code mac:rsrc - Resource fork and then when Subversion gets updated to support these directly, it will be able to spot that we've already got the relevant data kicking around in our repositories. Is there anything else anyone needs? Kind regards, Alastair. -- http://alastairs-place.net From kusterer at gmail.com Wed Jul 18 11:32:29 2007 From: kusterer at gmail.com (Uli Kusterer) Date: Wed Jul 18 11:32:38 2007 Subject: Subversion and Mac specific things (was: Re: SVN?) In-Reply-To: <98A6081A-FAEF-4DEB-A074-D1D7A96D12FD@alastairs-place.net> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> <44B516E2-D869-4CBF-BF95-175359813784@gmail.com> <98A6081A-FAEF-4DEB-A074-D1D7A96D12FD@alastairs-place.net> Message-ID: On 18.07.2007, at 19:06, Alastair Houghton wrote: > We could then reserve > > mac:label - Finder label > mac:type - Mac type code > mac:creator - Mac creator code > mac:rsrc - Resource fork > > and then when Subversion gets updated to support these directly, it > will be able to spot that we've already got the relevant data > kicking around in our repositories. > > Is there anything else anyone needs? Sounds OK, though I'm not sure SVN's properties were intended to hold an entire resource fork. Has anyone got information about how properties perform with large data? We don't have many resources anymore (and those we have are mostly DeRezzed), but I'd hate if we standardized on this and it blew up when someone puts his resource fork full of PICTs into CVS -- in that case we might rather write a script that generates a ._rsrc file next to the data fork and puts the res fork in there. Or standardize on DeRez right away? Would be kinda wasteful for binary data, but OTOH it'd be partially diffable. Cheers, -- M. Uli Kusterer http://www.zathras.de From alastair at alastairs-place.net Wed Jul 18 12:28:33 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Wed Jul 18 12:28:52 2007 Subject: Subversion and Mac specific things (was: Re: SVN?) In-Reply-To: References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> <44B516E2-D869-4CBF-BF95-175359813784@gmail.com> <98A6081A-FAEF-4DEB-A074-D1D7A96D12FD@alastairs-place.net> Message-ID: <89DFD76F-C32C-4885-B326-BFBD38B52DF9@alastairs-place.net> On 18 Jul 2007, at 19:32, Uli Kusterer wrote: > On 18.07.2007, at 19:06, Alastair Houghton wrote: >> We could then reserve >> >> mac:label - Finder label >> mac:type - Mac type code >> mac:creator - Mac creator code >> mac:rsrc - Resource fork >> >> and then when Subversion gets updated to support these directly, >> it will be able to spot that we've already got the relevant data >> kicking around in our repositories. >> >> Is there anything else anyone needs? > > Sounds OK, though I'm not sure SVN's properties were intended to > hold an entire resource fork. Well it depends how large you're talking, I think. > Has anyone got information about how properties perform with large > data? Subversion's design docs say: "A property value is an arbitrary string of bytes. Property values may be of any size, but Subversion may not handle very large property values efficiently." > We don't have many resources anymore (and those we have are mostly > DeRezzed), but I'd hate if we standardized on this and it blew up > when someone puts his resource fork full of PICTs into CVS :-) Well, Subversion :-D > -- in that case we might rather write a script that generates > a ._rsrc file next to the data fork and puts the res fork in there. > Or standardize on DeRez right away? Would be kinda wasteful for > binary data, but OTOH it'd be partially diffable. Sure. I'm not that familiar with the ins and outs of resource forks (we don't use them), so I'm happy to defer to anyone who really uses them. There are obviously other ways to deal with them; we could: 1. Put a reference to a filename in a Subversion property and hold the resource data in that file instead. 2. Store files with resource forks in AppleSingle, MacBinary or AppleDouble (MIME-encoded). Downside is that it breaks textual diffing. 3. Store files with resource forks in AppleDouble form (i.e. as two files, one normal file and a "._" file). We could also support small resource forks in property form (given their prevalence this might be sensible), and larger ones in e.g. AppleDouble. But I'm not the person to make this decision, because I don't use resource forks. Any thoughts? Kind regards, Alastair. -- http://alastairs-place.net From alastair at alastairs-place.net Wed Jul 18 14:54:03 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Wed Jul 18 14:54:18 2007 Subject: Subversion and Mac specific things In-Reply-To: <469E7E15.7020700@ggerard.com> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> <44B516E2-D869-4CBF-BF95-175359813784@gmail.com> <98A6081A-FAEF-4DEB-A074-D1D7A96D12FD@alastairs-place.net> <89DFD76F-C32C-4885-B326-BFBD38B52DF9@alastairs-place.net> <469E7E15.7020700@ggerard.com> Message-ID: <956B230E-C256-4F2E-82A3-105C6ABE4788@alastairs-place.net> On 18 Jul 2007, at 21:54, Gregory Gerard wrote: > What about adding a property per resource item? mac:rsrc- encoded resource type>- I wouldn't be inclined to use it that way, especially if (as you imply) these can go up to 16MB in size (which fits the description "very large", I think). It sounds like exactly the kind of thing that the authors of Subversion weren't expecting people to use properties for Probably the best thing to do would be to use AppleDouble (i.e. "._" files) for the resource fork, because that would also mean that if you checked code out on e.g. Linux or Windows, the resource forks would stay with the files. Of course, we also need to see if the Subversion people are doing any work on this front. Kind regards, Alastair. -- http://alastairs-place.net From jb at heilancoo.net Thu Jul 19 01:24:55 2007 From: jb at heilancoo.net (Joerg Bullmann) Date: Thu Jul 19 01:38:03 2007 Subject: Subversion and Mac specific things Message-ID: <33849.192.168.1.35.1184833495.webmail@192.168.1.35> Hi Alastair, If you are investigating resource fork handling options, please have a look at what I have done here a little while ago: http://www.heilancoo.net/MacCVSClient/MacCVSClientDoc/rbl-spec.html This has worked really quite well in the MacCVSClient context. With it we were able to merge resource files on a RESOURCE/INDEX basis. As good as it gets unless you have detailed knowledge of structure of the actual content of a resource. So I wonder whether it is something you might find useful. Cheers, Joerg On Wed, July 18, 2007 11:54 pm, Alastair Houghton said: > On 18 Jul 2007, at 21:54, Gregory Gerard wrote: > >> What about adding a property per resource item? mac:rsrc-> encoded resource type>- > > I wouldn't be inclined to use it that way, especially if (as you > imply) these can go up to 16MB in size (which fits the description > "very large", I think). It sounds like exactly the kind of thing > that the authors of Subversion weren't expecting people to use > properties for > > Probably the best thing to do would be to use AppleDouble (i.e. "._" > files) for the resource fork, because that would also mean that if > you checked code out on e.g. Linux or Windows, the resource forks > would stay with the files. > > Of course, we also need to see if the Subversion people are doing any > work on this front. > > Kind regards, > > Alastair. > > -- > http://alastairs-place.net > > > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From alastair at alastairs-place.net Thu Jul 19 04:41:39 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Thu Jul 19 04:41:52 2007 Subject: Subversion and Mac specific things In-Reply-To: <469EB707.4040305@ggerard.com> References: <5BE17B88-1F16-4341-91CF-D14EF45A93F8@bluewin.ch> <11660552.post@talk.nabble.com> <8B2F5DF2-1246-4337-92A9-9D66BAFD99FB@mac.com> <44B516E2-D869-4CBF-BF95-175359813784@gmail.com> <98A6081A-FAEF-4DEB-A074-D1D7A96D12FD@alastairs-place.net> <89DFD76F-C32C-4885-B326-BFBD38B52DF9@alastairs-place.net> <469E7E15.7020700@ggerard.com> <956B230E-C256-4F2E-82A3-105C6ABE4788@alastairs-place.net> <469EB707.4040305@ggerard.com> Message-ID: <8D77F537-BD73-46B0-B018-A62F976371F9@alastairs-place.net> On 19 Jul 2007, at 01:57, Gregory Gerard wrote: > Oh, the whole resource fork is limited to 16mb. My recollection is > that the max size per resource entry is 32k or 64k. Reading through the Subversion dev list, it seems that the fact that the entire fork could be 16MB in size means it's too large to sensibly store in properties even if split up. Apparently *all* the properties for a file are loaded into memory if you ask for a single property... Kind regards, Alastair. -- http://alastairs-place.net From john_clayton at mac.com Fri Jul 20 07:09:33 2007 From: john_clayton at mac.com (Clayton John) Date: Fri Jul 20 07:10:00 2007 Subject: CGLContextObj and CGImageRef. Message-ID: Hi All Imagine that I am drawing stuff into a CGLContextObj - does anyone know of a way to get the content of that context as a CGImageRef? A secondary question is: is it fast? Thanks -- John From flor at mac.com Sat Jul 21 03:35:09 2007 From: flor at mac.com (Florian Soenens) Date: Sat Jul 21 06:24:30 2007 Subject: Change NSTextFieldCell textColor when text is selected Message-ID: Hi list, i'm struggling with the following: i subclassed an nsoutlineview and the cells of a specific row are ImageAndTextCell, like the ones in the DragDropTableView example. The code in my ImageAndTextCell class to change the text color when the cell (the row) is hilighted is the following: - (NSColor *)textColor { if([self isHighlighted]) { return [NSColor selectedMenuItemTextColor]; } else { return [NSColor controlTextColor]; } } However, i would like to be able to check if the text is selected so i can change the color to black, because if your background color is green or light pink or whatever, the text is nor readable anymore. iPhoto implements this behavior, so it should be possible... I can't find a method anywhere like "istextSelected" or so. What should i do? Any help is muchos appreciated... Flor. From fret at memecode.com Mon Jul 23 13:35:29 2007 From: fret at memecode.com (Matthew Allen) Date: Sun Jul 22 17:56:18 2007 Subject: Stack Traces Message-ID: <1NDZE1.5818693021Z7SCM@memecode.com> Hi, I'm looking for a way to store a stack trace at a particular point in my application. In some of my windows apps I've got some assembly that walks the previous 8 or so stack frames and stores their IP's in an array. Then at some later point I can look those IP values up and work out which file/line number they map to via the debugging DLL that MS publish. The point of that is that I can get a stack trace at runtime and work out what is calling a particular peice of code without actually stopping the program. This is particularly useful when debugging certain types of issues, where you typically don't know when you'll need the stack frame information until much later. In my case... I'm trying to work out what is not unlocking a semaphore. Anyway, is there any easy way to replicate this on an Intel Mac? I know it's a long shot. I can probably get the stack walking asm from the PC version to work with gcc (it's all x86 ops) but the look up of a given IP value to find the associated file/line number is going to be hard. regards -- Matthew Allen http://www.memecode.com From ahknight at pobox.com Sun Jul 22 19:10:56 2007 From: ahknight at pobox.com (Adam Knight) Date: Sun Jul 22 19:11:12 2007 Subject: Stack Traces In-Reply-To: <1NDZE1.5818693021Z7SCM@memecode.com> References: <1NDZE1.5818693021Z7SCM@memecode.com> Message-ID: On Jul 23, 2007, at 3:35 PM, Matthew Allen wrote: > Hi, > > I'm looking for a way to store a stack trace at a particular point > in my application. In some of my windows apps I've got some > assembly that walks the previous 8 or so stack frames and stores > their IP's in an array. Then at some later point I can look those > IP values up and work out which file/line number they map to via > the debugging DLL that MS publish. The point of that is that I can > get a stack trace at runtime and work out what is calling a > particular peice of code without actually stopping the program. > This is particularly useful when debugging certain types of issues, > where you typically don't know when you'll need the stack frame > information until much later. In my case... I'm trying to work out > what is not unlocking a semaphore. > > Anyway, is there any easy way to replicate this on an Intel Mac? > > I know it's a long shot. I can probably get the stack walking asm > from the PC version to work with gcc (it's all x86 ops) but the > look up of a given IP value to find the associated file/line number > is going to be hard. Throw an exception which you immediately catch. The exception will have a stack trace as a property. The link below gives a category you can add to NSException to make it print out the backtrace as you go, if you like. http://www.cocoadev.com/index.pl?StackTraces Adam Knight If you're not going to stop and appreciate the scenery, you're not going to enjoy Myst. The same thing applies on the Mac as well. -- Rand Miller From georg.seifert at gmx.de Tue Jul 24 15:58:14 2007 From: georg.seifert at gmx.de (Georg Seifert) Date: Tue Jul 24 15:58:23 2007 Subject: draw a line with subpixel rendering Message-ID: <4AFF6C81-4EFB-404B-BFFF-6666D88FFA13@gmx.de> hello, I would like to draw thin lines (bezier) in a View (or image) with subpixel precision. Quartz does not support this as far as I could find out (it only supports subpixels with text). Is there any way to do it? Thanks Georg From alastair at alastairs-place.net Tue Jul 24 16:27:45 2007 From: alastair at alastairs-place.net (Alastair Houghton) Date: Tue Jul 24 16:27:58 2007 Subject: draw a line with subpixel rendering In-Reply-To: <4AFF6C81-4EFB-404B-BFFF-6666D88FFA13@gmx.de> References: <4AFF6C81-4EFB-404B-BFFF-6666D88FFA13@gmx.de> Message-ID: <1B6C3E27-6EE6-48EE-AB76-27B25E596E87@alastairs-place.net> On 24 Jul 2007, at 23:58, Georg Seifert wrote: > I would like to draw thin lines (bezier) in a View (or image) with > subpixel precision. Quartz does not support this as far as I could > find out (it only supports subpixels with text). Is there any way > to do it? Hmmm. I think "subpixel precision" means the ability to shade pixels touched or covered by a curve according to the proportion of a path that covers them, coupled with the ability to specify sub-pixel-width lines and fractional co-ordinates; AFAIK, Quartz (assuming antialiasing is enabled) always does all of that. Perhaps you mean ClearType-style rendering (i.e. use of the fact that LCDs tend to use discrete R, G and B pixels arranged horizontally next to each other to increase the apparent horizontal resolution)? If so, I don't know of a way to use Quartz for this directly, but you could render to an image three times the required width, then run an algorithm over the result to scale it down, taking account of contrasting edge pixels by tweaking their colours to make the best use of the "extra" resolution. Of course, if you do that, you'll need to be careful because AFAIK different LCDs have different RGB layouts, and I would hazard a guess that even Apple branded equipment isn't uniform in that regard. I don't know how you tell which layout a particular display uses (perhaps the I/O registry might contain that information?) Kind regards, Alastair. -- http://alastairs-place.net From cmhofman at gmail.com Tue Jul 24 16:33:35 2007 From: cmhofman at gmail.com (Christiaan Hofman) Date: Tue Jul 24 16:33:42 2007 Subject: draw a line with subpixel rendering In-Reply-To: <4AFF6C81-4EFB-404B-BFFF-6666D88FFA13@gmx.de> References: <4AFF6C81-4EFB-404B-BFFF-6666D88FFA13@gmx.de> Message-ID: What do you mean? E.g. CGPath and CGContext functions take floats (and structs of floats) as arguments, so that implies subpixel precision. Also note that Quartz is designed from the start to support resolution independece (building towards Leopard). You may not see thin lines as such on your screen, but that's more a restriction of your screen resolution rather than the technology. If you really want to see those thin lines, try playing with Quartz debugger. Christiaan On 25 Jul 2007, at 12:58 AM, Georg Seifert wrote: > hello, > > I would like to draw thin lines (bezier) in a View (or image) with > subpixel precision. Quartz does not support this as far as I could > find out (it only supports subpixels with text). Is there any way > to do it? > > Thanks > Georg >