From hayne at sympatico.ca Thu Aug 1 00:36:15 2002 From: hayne at sympatico.ca (Cameron Hayne) Date: Thu Nov 3 14:49:50 2005 Subject: NSImage Resolution In-Reply-To: <1E09C585-A4B7-11D6-AFF2-0050E450B45C@mac.com> Message-ID: On Wednesday, July 31, 2002, at 02:55 pm, Graphite400 wrote: > I am trying to take an image that is at 72dpi and save it at 250 dpi. > The code I am trying to use is below, but it doesn't work... why not? > NOTE: buffer is a NSImage at 72dpi resolution and completePath is a > string giving the absolute path to save the file to > NSBitmapImageRep *tiffRep = [NSBitmapImageRep imageRepWithData:[buffer > TIFFRepresentation]]; > // adjust resolution to 250dpi (72/250 == .288) > [tiffRep setSize:NSMakeSize([buffer size].width * .288, [buffer > size].height * .288)]; > [[tiffRep TIFFRepresentationUsingCompression:NSTIFFCompressionLZW > factor:1.0] writeToFile:completePath atomically:YES]; I believe that setSize sets the size for rendering - i.e the size to be used when this image is displayed - but does not change the actual data format at all. Thus when you get the TIFF representation, it gives you the data with the same pixelsWide & pixelsHigh as you gave it originally. In other words, I don't think you can do image format conversions using the NSBitmapImageRep methods. From comments I have heard in this forum, it seems that you need to use the QuickTime API to do image format conversions. -- Cameron Hayne (hayne@sympatico.ca) Hayne of Tintagel From esimcoe at mac.com Thu Aug 1 00:55:11 2002 From: esimcoe at mac.com (Graphite400) Date: Thu Nov 3 14:49:50 2005 Subject: JPEG and TIFF image size Message-ID: <5AE88CB0-A484-11D6-82B7-0050E450B45C@mac.com> I am saving TIFF and JPEG images out of a program that manipulates the raw bitmap data. In the process, the image goes through many transformations using NSAffineTransform and is eventually drawn into a new image for saving using the drawInRect method. The problem is, that instead of saving these images at 72 dpi, I want to save them at 250. I have taken a look at many files in a hex viewer/editor and I found the bits in a simple 1x1 pixel image. I can't, however find them in larger images (think 2048 x 2048). Is there any way to set the resolution the image should be displayed and printed at when you save the image using the NSBitmapImageRep's methods for returning bitmap data? Is there a flag somewhere I can set? I have looked through all of the documentation I could find and can't find it anywhere. I can't find it in jpeg or tiff specs I have read either... maybe I am just missing something very obvious. I tried resizing the image just before saving and that didn't work either... it just cropped it to the lower left corner. Any replies would be appreciated. Thank you. Eliot Simcoe From michael_mccracken at mac.com Thu Aug 1 00:58:43 2002 From: michael_mccracken at mac.com (Michael McCracken) Date: Thu Nov 3 14:49:50 2005 Subject: Slow TextFieldCell Drawing (Was Re: Optimizing OAPreference*) In-Reply-To: <186832BE-A4A4-11D6-803E-0003938E4E3C@omnigroup.com> Message-ID: Thanks for the advice, Tim. It looks like OAPreferenceController is not the culprit. sample (Actually Sampler.app) tells me that of the 6.9 seconds that it's taking to display the preference window, none of it is spent in the code I was expecting. I was thinking it was taking a long time to allocate the OAPreferenceController, but Sampler says not, and after looking at the source for it, OAPreferenceController is not doing much extra in init. Essentially it spends 6.8 seconds inside of -[NSTextFieldCell drawInteriorWithFrame:inView:], calling down into the text storage for a font, apparently one of the text fields uses an attributed string - (I don't set it, in UpdateUI, I call setStringValue on one text field, and all the others are unchanged from the nib... eventually it works its way down into mach_msg_overwrite_trap, where it sits for 6.1 seconds. So now, the question is why is it sending a mach message from within drawInteriorWithFrame? Why does drawing a textfieldcell require a distant object invocation? Here's the relevant sample report: (numbers on the left are sample counts.) 621 -[NSTextFieldCell drawInteriorWithFrame:inView:] 621 _NXDrawTextCell 619 textContainerForTextCell 616 -[NSStringDrawingTextStorage textContainerForAttributedString:] 615 -[NSConcreteMutableAttributedString replaceCharactersInRange:withAttributedString:] 615 -[NSConcreteNotifyingMutableAttributedString edited:range:changeInLength:] 615 -[NSTextStorage edited:range:changeInLength:] 615 -[NSTextStorage processEditing] 615 -[NSTextStorage invalidateAttributesInRange:] 615 -[NSMutableAttributedString(NSMutableAttributedStringKitAdditions) fixAttributesInRange:] 615 -[NSMutableAttributedString(NSMutableAttributedStringKitAdditions) fixFontAttributeInRange:] 615 -[NSGlyphGenerator characterSetCoveredByFont:language:] 615 -[NSCGSFont _usesNoRulebook] 615 +[NSRulebook glyphGeneratorForEncoding:language:font:] 615 +[NSRulebook glyphGeneratorForEncoding:language:font:makeSharable:] 615 _objc_msgForward 615 -[NSObject(NSForwardInvocation) forward::] 615 -[NSDistantObject forwardInvocation:] 614 -[NSConnection sendInvocation:target:] 614 -[NSConnection getReplyWithSequence:] 614 CFRunLoopRunInMode 614 CFRunLoopRunSpecific 614 __CFRunLoopRun 614 mach_msg 614 mach_msg_overwrite_trap 614 mach_msg_overwrite_trap [STACK TOP] On Wednesday, July 31, 2002, at 09:39 AM, Timothy J. Wood wrote: > >> Has anyone else experienced problems with the OAPreferenceController >> being slow to load? >> >> I have been testing my program on an iBook-600 / 384 MB RAM and it >> reliably takes more than 10 seconds for the preferences window to >> load, including an appearance by the beachball... > > Try running 'sample' on your application to see where the time is > going. Hopefully the solution will be obvious from that, but if it > isn't you might post a followup to the list with the relevant portion > of the sample log. > > -tim > -- Michael McCracken michael_mccracken@mac.com http://radio.weblogs.com/0101358 From nico at akwairc.net Thu Aug 1 01:58:08 2002 From: nico at akwairc.net (Nico) Date: Thu Nov 3 14:49:50 2005 Subject: Terminal In-Reply-To: <7B60CAE7-A492-11D6-8958-003065C23D12@ku.edu> Message-ID: The best way ? NSTask && NSPipe A good tut is at cocoadevcentral.com Nico On 7/31/02 4:33 PM, "Michael Martz" wrote: > Ok, what is the best way to perform terminal input and output... I want > to learn to make a terminal application. (of course mine will be unique, > but back to the subject at hand...) > Thanks for your help. > ...Michael Martz > Once lucky, twice confident, thrice dead. From esimcoe at mac.com Thu Aug 1 04:33:01 2002 From: esimcoe at mac.com (Graphite400) Date: Thu Nov 3 14:49:50 2005 Subject: NSImage Resolution In-Reply-To: Message-ID: <4D3D5665-A542-11D6-8F15-0050E450B45C@mac.com> I believe that changing the size of an image or rep (not the pixelsHigh or pixelsWide) is how one must change the display resolution of the image. I have done a lot of research that says the code I have below should work, but for some reason it doesn't... I guess this isn't so much a question of how to do it, but what is wrong with my code. When one sets the size of an NSBitmapImageRep, it tells the computer how many pixels represent one inch by doing the math ([image pixelsHigh] / [image size].height). This is stored as one of the tags in the TIFF specification as resolution, and my understanding is that it should be calculated and saved as a part of the flag. It is ridiculous if it is not, for it is such an easy thing to implement through low level data manipulation since the tag is required when you save the image anyway. I could always go in and edit the TIFF file after it has been saved, but that doesn't seem like a very cocoa-esq method. Thanks for any further replies. -Eliot Simcoe On Wednesday, July 31, 2002, at 08:14 PM, Cameron Hayne wrote: > On Wednesday, July 31, 2002, at 02:55 pm, Graphite400 wrote: >> I am trying to take an image that is at 72dpi and save it at 250 dpi. >> The code I am trying to use is below, but it doesn't work... why not? >> NOTE: buffer is a NSImage at 72dpi resolution and completePath is a >> string giving the absolute path to save the file to >> NSBitmapImageRep *tiffRep = [NSBitmapImageRep imageRepWithData:[buffer >> TIFFRepresentation]]; >> // adjust resolution to 250dpi (72/250 == .288) >> [tiffRep setSize:NSMakeSize([buffer size].width * .288, [buffer >> size].height * .288)]; >> [[tiffRep TIFFRepresentationUsingCompression:NSTIFFCompressionLZW >> factor:1.0] writeToFile:completePath atomically:YES]; > > I believe that setSize sets the size for rendering - i.e the size to be > used when this image is displayed - but does not change the actual data > format at all. Thus when you get the TIFF representation, it gives you > the data with the same pixelsWide & pixelsHigh as you gave it > originally. > In other words, I don't think you can do image format conversions using > the NSBitmapImageRep methods. From comments I have heard in this forum, > it seems that you need to use the QuickTime API to do image format > conversions. > > -- > Cameron Hayne (hayne@sympatico.ca) > Hayne of Tintagel > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From epeyton at epicware.com Thu Aug 1 06:01:02 2002 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:49:51 2005 Subject: Terminal In-Reply-To: Message-ID: <8ECF7E62-A54E-11D6-917E-003065CBD1E2@epicware.com> Well, not quite. If you are attempting to make a terminal application you will need to directly deal with ttys and the such. NSTask and NSPipe are probably way too high level for that kind of interaction. It would be better if you opened a tty directly and read and wrote to that tty. Of course, this will require that you write your own emulation interpreter (vt100, 102, 220, whatever) and is by no means a trivial task, but it is the only way you can write your own "terminal application". You can use much of the code for X11 based terminals as a guide post (xterm, rxvt, eterm, etc.) and a place to start, but to make a unique terminal application you may want to start someplace else entirely. Eric On Thursday, August 1, 2002, at 03:41 AM, Nico wrote: > The best way ? > NSTask && NSPipe > A good tut is at cocoadevcentral.com > > Nico > > On 7/31/02 4:33 PM, "Michael Martz" wrote: > >> Ok, what is the best way to perform terminal input and output... I >> want >> to learn to make a terminal application. (of course mine will be >> unique, >> but back to the subject at hand...) >> Thanks for your help. >> ...Michael Martz >> Once lucky, twice confident, thrice dead. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From sean at skti.org Thu Aug 1 14:36:01 2002 From: sean at skti.org (Sean Kelly) Date: Thu Nov 3 14:49:51 2005 Subject: arguments for NSTask Message-ID: <95FAD8AA-A596-11D6-82C1-0003931D82D2@skti.org> Hello, I am trying to set the argument list for an NSTask. Options that have a - in front of them work fine, but some options I need to set have -- and those do not work. The set of options works fine in the Terminal. Is there some special formatting I need to use? I've never used any flavor of UNIX before, so I don't really know what I'm doing. Thanks, Sean Kelly From jmdisher at student.math.uwaterloo.ca Thu Aug 1 15:11:01 2002 From: jmdisher at student.math.uwaterloo.ca (Jeffrey Michael Disher) Date: Thu Nov 3 14:49:51 2005 Subject: arguments for NSTask In-Reply-To: <95FAD8AA-A596-11D6-82C1-0003931D82D2@skti.org> Message-ID: As I recall, the arguments to NSTask are taken as an NSArray wherein each element is the equivalent of a space-delimited argument on the command line. With this in mine I would assume that you would do the following: In Terminal: % program --argument option In NSTask: [NSArray arrayWithObjects:@"--argument", @"option", nil]; If this is what you are doing and you are having problems, more discussion with this is definitely needed. Hope that helps, Jeff. On Thu, 1 Aug 2002, Sean Kelly wrote: > Hello, > > I am trying to set the argument list for an NSTask. Options that have > a - in front of them work fine, but some options I need to set have -- > and those do not work. The set of options works fine in the Terminal. Is > there some special formatting I need to use? I've never used any flavor > of UNIX before, so I don't really know what I'm doing. Thanks, > > Sean Kelly > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From sean at skti.org Thu Aug 1 15:34:01 2002 From: sean at skti.org (Sean Kelly) Date: Thu Nov 3 14:49:51 2005 Subject: arguments for NSTask In-Reply-To: Message-ID: Whoops! I was using an array like: [NSArray arrayWithObjects:@"--argument option", nil]; What you said to do works fine. Thanks, Sean Kelly On Thursday, August 1, 2002, at 06:10 PM, Jeffrey Michael Disher wrote: > As I recall, the arguments to NSTask are taken as an NSArray wherein > each > element is the equivalent of a space-delimited argument on the command > line. With this in mine I would assume that you would do the following: > In Terminal: > % program --argument option > > In NSTask: > [NSArray arrayWithObjects:@"--argument", @"option", nil]; > > If this is what you are doing and you are having problems, more > discussion > with this is definitely needed. > > Hope that helps, > Jeff. > > > On Thu, 1 Aug 2002, Sean Kelly wrote: > >> Hello, >> >> I am trying to set the argument list for an NSTask. Options that have >> a - in front of them work fine, but some options I need to set have -- >> and those do not work. The set of options works fine in the Terminal. >> Is >> there some special formatting I need to use? I've never used any flavor >> of UNIX before, so I don't really know what I'm doing. Thanks, >> >> Sean Kelly >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> > > From cparrish at adobe.com Thu Aug 1 16:11:01 2002 From: cparrish at adobe.com (Chris Parrish) Date: Thu Nov 3 14:49:51 2005 Subject: Font Smoothing Message-ID: Does anyone know if Apple has published any information on the technique used to anti-alias fonts in OS X? I'm looking for something like a white paper or tech-note that describes their algorithm. -- Chris From devdrvr at davis.com Thu Aug 1 16:33:02 2002 From: devdrvr at davis.com (devdrvr.net Multi-Platform SW) Date: Thu Nov 3 14:49:51 2005 Subject: Serial Numbers for My App Message-ID: Need serial number distribution system for a Cocoa app I want to sell (to prevent piracy). Is there a free one to use that works with OS X apps? What are other folks doing? Thanks, --Perry ======== 01 (530) 400-5692 [Davis, CA USA] mailto:perry_gregg@post.harvard.edu http://www.devdrvr.net/PerryCard.html ftp://www.devdrvr.net/ From stevenf at panic.com Thu Aug 1 17:24:02 2002 From: stevenf at panic.com (Steven Frank) Date: Thu Nov 3 14:49:51 2005 Subject: Subclassing NSImageView? Message-ID: <0C681273-A5AE-11D6-92BA-0003930A67E2@panic.com> Hi folks, I need a control that looks and works exactly like an NSImageView, but accepts ANY type of file dropped on it (not just image files), and displays that file's _icon_ as the image. What's the best approach? Subclass? Steven From nickzman at mac.com Thu Aug 1 18:52:01 2002 From: nickzman at mac.com (Nick Zitzmann) Date: Thu Nov 3 14:49:51 2005 Subject: Checking the user's OS version - a tutorial Message-ID: <5CCD7144-A5BA-11D6-AE16-0050E410B21A@mac.com> Thanks to everyone who commented on the tutorial I wrote. I made a few changes, and the final tutorial is now up on Cocoa Dev Central. The direct link: In this tutorial, I went over several different ways of figuring out the user's OS X version, which I'm sure will come in handy for some developers, especially when 10.2 is released. Nick Zitzmann ICQ: 22305512 Check out my software page: http://homepage.mac.com/nickzman/ From haasd at cae.wisc.edu Thu Aug 1 19:18:01 2002 From: haasd at cae.wisc.edu (David Haas) Date: Thu Nov 3 14:49:51 2005 Subject: NSTextView in an NSToolbarItem (sorta long) Message-ID: Hi. I've found the list archive very helpful, but after a good bit of searching I haven't figured out how to do what I want, so I thought I'd see if anyone can lend me a hand. Hopefully none of the experienced Cocoa gurus will cringe when I describe what we have so far . . . I have a subclass of NSTextView as the document view of a NSScrollView, which is a subview of yet another view, located in a toolbar item of a window. It works just fine in the toolbar, but I've got problems when trying to run the toolbar customization palette. In other words, the customization palette doesn't appear, and I get a console message telling me that I've got NSCoding problems. Since NSTextViews explicitly don't support NSCoding, I've got to make up my own initWithCoder & encodeWithCoder functions. As a first crack at this, I made these functions in my NSTextView subclass dirt simple . . . - (id)initWithCoder:(NSCoder *)coder { self = [super initWithFrame:NSMakeRect(0,0,100,16)]; [self setString:@"hello"]; } - (void)encodeWithCoder:(NSCoder *)coder { return; } So, this works - sort of. The customization palette appears, and I can reorder my toolbar at will. The problem is the NSTextView in the customization palette is not a subview of my scrollview. So then my scrollview (which had no color) looks like the window background (which looks funny in the view it's a subview of), and I've got a white square with the word "Hello" written in the bottom left corner of the palette. The subclass doesn't implement initWithFrame - it's just calling NSTextView's. When I check for the presence of a superview in initWithCoder, there isn't one (no surprise, I guess). If I try to setAutoresizingMask to make it autoscale to the width & height of it's superview, it doesn't show up at all. The only place this class was ever made a subview of the scroll view was in IB, so I've got no code written to correctly smush stuff together in the proper hierarchy. I've played around with the -replacementObjectForCoder and -awakeAfterUsingCoder, trying to replace the object with just a plain NSView for coding purposes & then reconstructing my TextView subclass after it's woken up - but the view wasn't ending up as a subview of the scrollview either, so that got me nowhere. I don't really care what actually appears in the customization palette for this item - if I could make an image & just substitute that for the actual view here, I'd be content (and I think I read that technique is used in omniweb, so I could probably dig up some example code, although I wouldn't mind a point in the right direction). But, for my own understanding, I'd like to figure out how this "should" be set up to make the NSTextView appear in the appropriate place of my toolbar item image. If someone could help me out, I'd really appreciate it. Thanks. David Haas From AitkenA at cbs.curtin.edu.au Fri Aug 2 04:50:02 2002 From: AitkenA at cbs.curtin.edu.au (Ashley Aitken) Date: Thu Nov 3 14:49:51 2005 Subject: Writing USB webcam driver. How difficult? Message-ID: Howdy All, I've got a digital video camera which supports PC-Cam mode that allows it to function as a Webcam on PCs. Of course, it doesn't work on OS X and I don't believe the manufacturers (FujiFilm) would be interested writing a driver just for me ... I've checked Version Tracker and the various free and $ USB webcam drivers that are being developed by various people, but they are all for particular Webcams (not my digital camera), and none of them worked with my camera anyway. My question is: How difficult is it to write a USB / webcam driver for Mac OS X? I have a CS degree and I am a WO/Cocoa developer, and don't mind technical coding but I have no experience with USB or video camera drivers. Apple makes a big thing about driver development being easy since we can start from their generic drivers etc etc. So, would it take me a weekend, a week, a month? What will be major stumbling blocks? Getting information from the manufacturers. Whether the camera actually can support OS X or not? My concentration span? I've given up waiting (and missing functionality over PC users) and want to write it myself. Any comments or suggestions welcome. Cheers, Ashley. PS FYI - The digital camera is a FujiFilm F601Z. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/20020802/1f7bf5d2/attachment.html From yanl1 at mac.com Fri Aug 2 04:58:01 2002 From: yanl1 at mac.com (Yan Laporte) Date: Thu Nov 3 14:49:51 2005 Subject: Serial Numbers for My App In-Reply-To: Message-ID: <30F8CA48-A60F-11D6-BB9D-00039370574A@mac.com> I know there something called licenserKit that exists, it's from stone design. I have never used it myself, I just remembered reading about it a while ago. Here's the URL: http://www.stone.com/Licenser/ Yan Laporte ylaporte@acm.org GDAC, UQAM LASIM, DMI, Universit? de Sherbrooke Le jeudi 1 ao?t 2002, ? 05:03 PM, devdrvr.net Multi-Platform SW a ?crit : > Need serial number distribution system for a Cocoa app I want to sell > (to > prevent piracy). Is there a free one to use that works with OS X apps? > What are other folks doing? > > Thanks, > --Perry > ======== > 01 (530) 400-5692 [Davis, CA USA] > mailto:perry_gregg@post.harvard.edu > http://www.devdrvr.net/PerryCard.html > ftp://www.devdrvr.net/ > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From alex at unive.it Fri Aug 2 08:25:03 2002 From: alex at unive.it (Perrone Alessandro) Date: Thu Nov 3 14:49:51 2005 Subject: Infos on Stream Server on OsX In-Reply-To: <200207291931.g6TJVK520425@slowbro.omnigroup.com> References: <200207291931.g6TJVK520425@slowbro.omnigroup.com> Message-ID: HI all Has anyone installed the Stream Server on OsX? And what are the performances? Regards. ALEX From andrew at zamler-carhart.com Fri Aug 2 09:11:01 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:51 2005 Subject: Reordering views in IB Message-ID: <58185F23-A632-11D6-AF59-000A277A6C34@zamler-carhart.com> Dear list, I have a window that I wanted to add tabs to. In Interface Builder, I dragged an NSTabView to the window, but I was unable to drag the window's contents onto the tabs so that they would be children of the NSTabView instead of the window's content view. I wound up cutting and pasting everything I wanted to move, which worked except it broke all the target/action connections and I had to rewire everything. I tried every key combination I could think of. Is there a better way? I noted the "Make subviews of" command, which groups the selected views onto a tab. But then, how do you move other views onto a different tab? Still the same problem. You would think that when viewing the contents of a nib file in list view, you could simply drag views around to reorder them, yet this doesn't seem to be possible (unless I'm missing something). Thanks! Andrew From estes at onscreen-sci.com Fri Aug 2 11:48:00 2002 From: estes at onscreen-sci.com (Robert Estes) Date: Thu Nov 3 14:49:51 2005 Subject: Reordering views in IB Message-ID: <7995D6A2-A648-11D6-8B19-003065CD914C@onscreen-sci.com> On Friday, August 2, 2002, at 12:10 PM, Andrew Zamler-Carhart wrote: You would think that when viewing the contents of a nib file in list view, you could simply drag views around to reorder them, yet this doesn't seem to be possible (unless I'm missing something). I was just about to post the very same question! In PowerPlant's Constructor you can do this. I would like to be able to get rid of a worthless NSView that I somehow created, but which has contains views that I need. Bob Estes -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 548 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020802/7f199682/attachment.bin From demarco at apple.com Fri Aug 2 12:09:32 2002 From: demarco at apple.com (Vince DeMarco) Date: Thu Nov 3 14:49:51 2005 Subject: Reordering views in IB In-Reply-To: <58185F23-A632-11D6-AF59-000A277A6C34@zamler-carhart.com> Message-ID: <2F6C360E-A64B-11D6-8179-0003936726FC@apple.com> On Friday, August 2, 2002, at 09:10 AM, Andrew Zamler-Carhart wrote: > Dear list, > > I have a window that I wanted to add tabs to. In Interface Builder, I > dragged an NSTabView to the window, but I was unable to drag the > window's contents onto the tabs so that they would be children of the > NSTabView instead of the window's content view. > > I wound up cutting and pasting everything I wanted to move, which > worked except it broke all the target/action connections and I had to > rewire everything. I tried every key combination I could think of. Is > there a better way? > > I noted the "Make subviews of" command, which groups the selected > views onto a tab. But then, how do you move other views onto a > different tab? Still the same problem. > > You would think that when viewing the contents of a nib file in list > view, you could simply drag views around to reorder them, yet this > doesn't seem to be possible (unless I'm missing something). > Read the Release notes in IB there is a section about click and drag. Here is the section Interface Builder 2.2 General Views and menus can be popped out and dragged, while preserving their connections Clicking and holding a view or menu will cause it to pop off its container. The selection can now be moved to a different subview or menu. If the selection lands within the same nib, all connections are preserved. From bwebster at mac.com Fri Aug 2 12:59:02 2002 From: bwebster at mac.com (Brian Webster) Date: Thu Nov 3 14:49:51 2005 Subject: Subclassing NSImageView? In-Reply-To: <200208021905.g72J5J509459@slowbro.omnigroup.com> Message-ID: <4295DDF3-A652-11D6-83DC-003065D61140@mac.com> On Friday, August 2, 2002, at 02:05 PM, macosx-dev- request@omnigroup.com wrote: > I need a control that looks and works exactly like an NSImageView, but > accepts ANY type of file dropped on it (not just image files), and > displays that file's _icon_ as the image. > > What's the best approach? Subclass? Yeah, that's how I'd do it. Subclass NSImageView, register for NSFilenamesPboardType, implement the NSDraggingDestination protocol, and then use -[NSWorkspace iconForFile:] to get the image. -- Brian Webster bwebster@mac.com http://homepage.mac.com/bwebster From estes at onscreen-sci.com Fri Aug 2 14:39:49 2002 From: estes at onscreen-sci.com (Robert Estes) Date: Thu Nov 3 14:49:51 2005 Subject: Reordering views in IB In-Reply-To: <2F6C360E-A64B-11D6-8179-0003936726FC@apple.com> Message-ID: On Friday, August 2, 2002, at 03:08 PM, Vince DeMarco wrote: > > On Friday, August 2, 2002, at 09:10 AM, Andrew Zamler-Carhart wrote: > ... >> >> You would think that when viewing the contents of a nib file in list >> view, you could simply drag views around to reorder them, yet this >> doesn't seem to be possible (unless I'm missing something). >> > ... > Views and menus can be popped out and dragged, while preserving their > connections > > Clicking and holding a view or menu will cause it to pop off its > container. The selection can now be moved to a different subview or > menu. If the selection lands within the same nib, all connections are > preserved. > This is good to know, but it appears to work only in the graphical view, not the list view. Bob Estes From jim.correia at pobox.com Fri Aug 2 15:15:03 2002 From: jim.correia at pobox.com (Jim Correia) Date: Thu Nov 3 14:49:51 2005 Subject: Distributed Objects passing structures? (punching holes in my data) Message-ID: <3F55F8DB-A665-11D6-AE40-000A27D7C068@pobox.com> I have a do client and a do server in another process. The client would like to do - (BOOL)getSomeInformation:(InformationStruct *)information; - (BOOL)setSomeInformation:(InformationStruct *)information; and pass a pointer to his own structure, have the server do a computation, return success or failure, and fill in the structure. I have the setSomeInformation side working. The problem I am seeing is that the structure is fairly large, and as it gets passed across the DO bridge, two bytes in the middle of the structure are being zeroed. (I haven't closely inspected the structure for other damage). Has anyone sen this before? Should I not pass structures? Is my protocol wrong? I can probably wrap the structure in a foundation type if necessary, but I need to use the structure because it is defined by a linked library and I cannot change it. Thanks, Jim From jcr at apple.com Fri Aug 2 15:37:01 2002 From: jcr at apple.com (John C. Randolph) Date: Thu Nov 3 14:49:51 2005 Subject: Distributed Objects passing structures? (punching holes in my data) In-Reply-To: <3F55F8DB-A665-11D6-AE40-000A27D7C068@pobox.com> Message-ID: <219603B7-A668-11D6-B5F2-003065F32C3C@apple.com> On Friday, August 2, 2002, at 03:14 PM, Jim Correia wrote: > I have a do client and a do server in another process. > > The client would like to do > > - (BOOL)getSomeInformation:(InformationStruct *)information; > - (BOOL)setSomeInformation:(InformationStruct *)information; > > and pass a pointer to his own structure, have the server do a > computation, return success or failure, and fill in the structure. > > I have the setSomeInformation side working. The problem I am seeing is > that the structure is fairly large, and as it gets passed across the > DO bridge, two bytes in the middle of the structure are being zeroed. > (I haven't closely inspected the structure for other damage). > > Has anyone sen this before? Should I not pass structures? Is my > protocol wrong? > > I can probably wrap the structure in a foundation type if necessary, > but I need to use the structure because it is defined by a linked > library and I cannot change it. That sounds like a DO bug to me. Can you submit this with a test case at bugreporter.apple.com? In the meantime, you might want to try wrapping up your InformationStruct in an NSData object. -jcr John C. Randolph (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html John C. Randolph (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html From jcr at idiom.com Fri Aug 2 15:37:19 2002 From: jcr at idiom.com (John C. Randolph) Date: Thu Nov 3 14:49:51 2005 Subject: Distributed Objects passing structures? (punching holes in my data) In-Reply-To: <3F55F8DB-A665-11D6-AE40-000A27D7C068@pobox.com> Message-ID: <3CDD22CA-A668-11D6-B5F2-003065F32C3C@idiom.com> On Friday, August 2, 2002, at 03:14 PM, Jim Correia wrote: > I have a do client and a do server in another process. > > The client would like to do > > - (BOOL)getSomeInformation:(InformationStruct *)information; > - (BOOL)setSomeInformation:(InformationStruct *)information; > > and pass a pointer to his own structure, have the server do a > computation, return success or failure, and fill in the structure. > > I have the setSomeInformation side working. The problem I am seeing is > that the structure is fairly large, and as it gets passed across the > DO bridge, two bytes in the middle of the structure are being zeroed. > (I haven't closely inspected the structure for other damage). > > Has anyone sen this before? Should I not pass structures? Is my > protocol wrong? > > I can probably wrap the structure in a foundation type if necessary, > but I need to use the structure because it is defined by a linked > library and I cannot change it. That sounds like a DO bug to me. Can you submit this with a test case at bugreporter.apple.com? In the meantime, you might want to try wrapping up your InformationStruct in an NSData object. -jcr John C. Randolph (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html John C. Randolph (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html From jim.correia at pobox.com Fri Aug 2 15:43:01 2002 From: jim.correia at pobox.com (Jim Correia) Date: Thu Nov 3 14:49:51 2005 Subject: Distributed Objects passing structures? (punching holes in my data) In-Reply-To: <3CDD22CA-A668-11D6-B5F2-003065F32C3C@idiom.com> Message-ID: <21CF9E16-A669-11D6-AE40-000A27D7C068@pobox.com> On Friday, August 2, 2002, at 06:36 PM, John C. Randolph wrote: > That sounds like a DO bug to me. Can you submit this with a test > case at bugreporter.apple.com? > > In the meantime, you might want to try wrapping up your > InformationStruct in an NSData object. I'll try that, or some other workaround. Do you know of any practical size limits for passing structures by pointer? I'm wondering if I'll run into this elsewhere. (What is very odd is that the get case is working and the original structure in the host app is unaltered by the call, but the copy the server gets is screwed up.) After I solve my immediate problem, I'll file a bug :-) Thanks, Jim From jcr at idiom.com Fri Aug 2 15:52:00 2002 From: jcr at idiom.com (John C. Randolph) Date: Thu Nov 3 14:49:51 2005 Subject: Distributed Objects passing structures? (punching holes in my data) In-Reply-To: <21CF9E16-A669-11D6-AE40-000A27D7C068@pobox.com> Message-ID: <52A43C39-A66A-11D6-B5F2-003065F32C3C@idiom.com> On Friday, August 2, 2002, at 03:42 PM, Jim Correia wrote: > > Do you know of any practical size limits for passing structures by > pointer? There shouldn't be, since a pointer is always the same size, no matter how big the thing it's pointing to may be. -jcr John C. Randolph (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html From jim.correia at pobox.com Fri Aug 2 19:13:01 2002 From: jim.correia at pobox.com (Jim Correia) Date: Thu Nov 3 14:49:51 2005 Subject: Distributed Objects passing structures? (punching holes in my data) In-Reply-To: <3CDD22CA-A668-11D6-B5F2-003065F32C3C@idiom.com> Message-ID: <83F53BAB-A686-11D6-AE40-000A27D7C068@pobox.com> On Friday, August 2, 2002, at 06:36 PM, John C. Randolph wrote: > On Friday, August 2, 2002, at 03:14 PM, Jim Correia wrote: > >> I have a do client and a do server in another process. >> >> The client would like to do >> >> - (BOOL)getSomeInformation:(InformationStruct *)information; >> - (BOOL)setSomeInformation:(InformationStruct *)information; >> >> and pass a pointer to his own structure, have the server do a >> computation, return success or failure, and fill in the structure. >> >> I have the setSomeInformation side working. The problem I am >> seeing is that the structure is fairly large, and as it gets >> passed across the DO bridge, two bytes in the middle of the >> structure are being zeroed. (I haven't closely inspected the >> structure for other damage). > That sounds like a DO bug to me. Can you submit this with a test > case at bugreporter.apple.com? Filed with sample code. > In the meantime, you might want to try wrapping up your > InformationStruct in an NSData object. It looks like the structure is mis-encoded for the invocation? The structure is fairly complex which lends credibility to that theory. (If I were really curious I'd try the same with NSArchiver, but now that I've got a workaround I've got to wrap up the problem I was trying to solve first.) If instead I do typedef struct { char hidden[sizeof(InformationStruct)]; } OpaqueInformationStruct; - (BOOL) setSomeInformation:(OpaqueInformationStruct *)information; InformationStruct aStruct; [proxy setSomeInformation: (OpaqueInformationStruct *)&aStruct]; things go across in tact. Jim From manfred at schubert-it.de Sat Aug 3 03:01:01 2002 From: manfred at schubert-it.de (Manfred Schubert) Date: Thu Nov 3 14:49:51 2005 Subject: Writing USB webcam driver. How difficult? In-Reply-To: Message-ID: Am Freitag den, 2. August 2002, um 13:49, schrieb Ashley Aitken: > How difficult is it to write a USB / webcam driver for Mac OS X? http://sourceforge.net/projects/webcam-osx/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 198 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020803/83281b62/attachment.bin From ekelund at mac.com Sat Aug 3 09:06:01 2002 From: ekelund at mac.com (Daniel Ekelund) Date: Thu Nov 3 14:49:51 2005 Subject: Network byte orderd int Message-ID: Hi I need help, Im trying to send a network byte orderd int to mIRC from my mac. I has writen this to send it: NSLog(@"Start sending the int to mIRC"); intbuffer = NSSwapBigIntToHost([myMutableData length]); [ircServer writeData:[NSData dataWithBytes:&intbuffer length:1]]; But mIRC stopes sending the file to me over DCC after that, hmm Is it the right way to use writeData on this way to send a network byte orderd int? Please help me. From andy at cocoadevcentral.com Sat Aug 3 09:23:01 2002 From: andy at cocoadevcentral.com (Andreas Monitzer) Date: Thu Nov 3 14:49:51 2005 Subject: Network byte orderd int In-Reply-To: Message-ID: <2B6010BB-A6FD-11D6-AD5B-00039306E362@cocoadevcentral.com> On Saturday, August 3, 2002, at 06:05 , Daniel Ekelund wrote: > Hi I need help, Im trying to send a network byte orderd int to mIRC > from my mac. > I has writen this to send it: > > NSLog(@"Start sending the int to mIRC"); > intbuffer = NSSwapBigIntToHost([myMutableData length]); > [ircServer writeData:[NSData dataWithBytes:&intbuffer length:1]]; > > But mIRC stopes sending the file to me over DCC after that, hmm Is it > the right way to use writeData on this way to send a network byte > orderd int? You did it the wrong way around, you're converting to host ordering, not from it ("SwapBigIntToHost"). andy -- DigiTunnel 1.0 released, offering full PPTP-support for Mac OS X! http://www.gracion.com/vpn/ From tjw at omnigroup.com Sat Aug 3 09:49:13 2002 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:49:51 2005 Subject: Network byte orderd int In-Reply-To: <2B6010BB-A6FD-11D6-AD5B-00039306E362@cocoadevcentral.com> Message-ID: Well, that and the length parameter should be sizeof(intbuffer) instead of 1. -tim On Saturday, August 3, 2002, at 09:22 AM, Andreas Monitzer wrote: > On Saturday, August 3, 2002, at 06:05 , Daniel Ekelund wrote: > >> Hi I need help, Im trying to send a network byte orderd int to mIRC >> from my mac. >> I has writen this to send it: >> >> NSLog(@"Start sending the int to mIRC"); >> intbuffer = NSSwapBigIntToHost([myMutableData length]); >> [ircServer writeData:[NSData dataWithBytes:&intbuffer length:1]]; >> >> But mIRC stopes sending the file to me over DCC after that, hmm Is it >> the right way to use writeData on this way to send a network byte >> orderd int? > > You did it the wrong way around, you're converting to host ordering, > not from it ("SwapBigIntToHost"). From hdiwan at mac.com Sat Aug 3 10:53:02 2002 From: hdiwan at mac.com (Hasan Diwan) Date: Thu Nov 3 14:49:51 2005 Subject: Network byte orderd int In-Reply-To: <2B6010BB-A6FD-11D6-AD5B-00039306E362@cocoadevcentral.com> Message-ID: <6ECC6732-A6F0-11D6-AC10-0003935B11EA@mac.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Since PPC is big-endian (uses network-byte-order by default), isn't htons() a no-op anyway? Therefore, you need not worry about byte order conversions unless you plan on running your application on some other architecture. Now, granted, this is not recommended practice and I realize & understand that =) On Saturday, August 3, 2002, at 12:22 PM, Andreas Monitzer wrote: > On Saturday, August 3, 2002, at 06:05 , Daniel Ekelund wrote: > >> Hi I need help, Im trying to send a network byte orderd int to mIRC >> from my mac. >> I has writen this to send it: >> >> NSLog(@"Start sending the int to mIRC"); >> intbuffer = NSSwapBigIntToHost([myMutableData length]); >> [ircServer writeData:[NSData dataWithBytes:&intbuffer length:1]]; >> >> But mIRC stopes sending the file to me over DCC after that, hmm Is it >> the right way to use writeData on this way to send a network byte >> orderd int? > > You did it the wrong way around, you're converting to host ordering, > not from it ("SwapBigIntToHost"). Hasan Diwan OpenPGP KeyID: 0xBE42DCA6 Fingerprint: 1CB0 47E3 0A24 DAC1 DCCA 4225 F166 40C2 BE42 DCA6 http://hasandiwan.net/~hdiwan/gpg.key -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (Darwin) iD8DBQE9S+3f8WZAwr5C3KYRAqocAKCC6dtTZxepCcpwr1hyA/HUYQHY1gCdHFWA VQz8cas5ycGC45jwQjUnMB8= =qAhz -----END PGP SIGNATURE----- From e_lists at mac.com Sat Aug 3 14:10:01 2002 From: e_lists at mac.com (Tony) Date: Thu Nov 3 14:49:51 2005 Subject: Partial selection in NSTextField Message-ID: Is there a way to partially select string in NSTextField? Thanks. Tony S. Wu From dc_salas at yahoo.com Sat Aug 3 15:21:01 2002 From: dc_salas at yahoo.com (Darryl Salas) Date: Thu Nov 3 14:49:51 2005 Subject: Sybase database on Mac OS X Message-ID: <20020803222045.52852.qmail@web12302.mail.yahoo.com> The Sybase database is now available on Mac OS X as a free download at www.sybase.com/mac. You also get an ODBC driver, JDBC driver, C SDK, and C++ wrapper. If there is anything else we can do to make your development experience better, please let me know. __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com From jalkut at red-sweater.com Sat Aug 3 16:06:01 2002 From: jalkut at red-sweater.com (Daniel Jalkut) Date: Thu Nov 3 14:49:51 2005 Subject: Partial selection in NSTextField In-Reply-To: Message-ID: <7ADE172C-A735-11D6-8EF0-0003930765AC@red-sweater.com> Hi Tony, I don't think there's a straight-forward way to do this directly with NSTextField. But you should be able to use the "selectWithFrame" method on the text field's Cell if you get all the required auxiliary objects required. See the "selectWithFrame" documentation in the NSCell help page. Daniel On Saturday, August 3, 2002, at 02:08 PM, Tony wrote: > Is there a way to partially select string in NSTextField? > Thanks. > > Tony S. Wu > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From sanguish at digifix.com Sun Aug 4 03:23:01 2002 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:49:51 2005 Subject: Partial selection in NSTextField In-Reply-To: <7ADE172C-A735-11D6-8EF0-0003930765AC@red-sweater.com> Message-ID: <283DD178-A794-11D6-A20E-0003938AF686@digifix.com> you mean just select a range of characters in an NSTextField? you'd need to get the field object for the specific NSTextField, and then select the subrange in that I'd think On Saturday, August 3, 2002, at 07:05 PM, Daniel Jalkut wrote: > Hi Tony, > > I don't think there's a straight-forward way to do this directly with > NSTextField. But you should be able to use the "selectWithFrame" > method on the text field's Cell if you get all the required auxiliary > objects required. See the "selectWithFrame" documentation in the > NSCell help page. > > Daniel > > On Saturday, August 3, 2002, at 02:08 PM, Tony wrote: > >> Is there a way to partially select string in NSTextField? >> Thanks. >> >> Tony S. Wu >> >> _______________________________________________ >> 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 fahrenba at mac.com Sun Aug 4 15:18:01 2002 From: fahrenba at mac.com (Matthew Fahrenbacher) Date: Thu Nov 3 14:49:51 2005 Subject: Partial selection in NSTextField Message-ID: <52650.1028499439399.JavaMail.fahrenba@mac.com> It would be nice if NSTextField had NSText as a superclass, like NSTextView, which has very straightforward text selection methods. What I think you'll have to do is use some of NSResponder's methods, like moveToBeginningOfDocument:, followed by several moveRight:'s to get to the beginning of the text you want selected, and then multiple moveForwardAndModifySelection:'s to select the amount of text you want. Of course, NSResponder doesn't implement these methods, and I'm assuming NSTextField does (although it might not). HTH, Matt Fahrenbacher On Saturday, Aug 03, 2002, at 02:08PM, Tony wrote: >Is there a way to partially select string in NSTextField? >Thanks. > >Tony S. Wu > >_______________________________________________ >MacOSX-dev mailing list >MacOSX-dev@omnigroup.com >http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From njriley at uiuc.edu Sun Aug 4 15:37:01 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:49:51 2005 Subject: Partial selection in NSTextField In-Reply-To: <52650.1028499439399.JavaMail.fahrenba@mac.com> References: <52650.1028499439399.JavaMail.fahrenba@mac.com> Message-ID: <20020804223623.GA2636918@uiuc.edu> On Sun, Aug 04, 2002 at 03:17:19PM -0700, Matthew Fahrenbacher wrote: > It would be nice if NSTextField had NSText as a superclass, like > NSTextView, which has very straightforward text selection methods. > What I think you'll have to do is use some of NSResponder's methods, > like moveToBeginningOfDocument:, followed by several moveRight:'s to > get to the beginning of the text you want selected, and then > multiple moveForwardAndModifySelection:'s to select the amount of > text you want. Of course, NSResponder doesn't implement these > methods, and I'm assuming NSTextField does (although it might not). Assuming the text field has focus, you can also manipulate the field editor (usually a NSTextView) directly; see -[NSWindow fieldEditor:forObject:]. Vermont Recipes has some good discussion of the field editor, IIRC. I can't wait for the book to be published... all these good questions Bill Cheeseman is asking on the list are making me drool ;-) -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From devdrvr at davis.com Sun Aug 4 15:49:01 2002 From: devdrvr at davis.com (devdrvr.net Multi-Platform SW) Date: Thu Nov 3 14:49:51 2005 Subject: "std::basic_string" link undefined syms? In-Reply-To: Message-ID: So I move over to X.2 and now have a project app that won't link. Included the 3.1 archive libstdc++.a (cause that was the problem before and noticed it got stripped when did the .pbproj open) but can't seem to get the following undefined symbols resolved. Does this look familiar; can someone tell me what to include as a lib to fix it? It was building fine under the latest with X.1.5. Thanks, --Perry ======== ld: Undefined symbols: std::basic_string, std::allocator >::size() const std::basic_string, std::allocator >::c_str() const std::allocator::allocator[in-charge]() std::allocator::~allocator [in-charge]() std::basic_string, std::allocator >::append(char const*) std::basic_string, std::allocator >::reserve(unsigned long) std::basic_string, std::allocator >::basic_string[in-charge](char const*, std::allocator const&) std::basic_string, std::allocator >::basic_string[in-charge](std::basic_string, std::allocator > const&) std::basic_string, std::allocator >::basic_string[in-charge]() std::basic_string, std::allocator >::~basic_string [in-charge]() std::basic_string, std::allocator >::operator=(char const*) std::basic_string, std::allocator >::operator+=(char const*) std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned long) std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned long) std::ios_base::Init::Init[in-charge]() std::ios_base::Init::~Init [in-charge]() std::bad_alloc::~bad_alloc [in-charge]() std::nothrow vtable for __cxxabiv1::__class_type_info vtable for __cxxabiv1::__si_class_type_info vtable for std::bad_alloc vtable for std::exception operator delete[](void*) operator delete(void*) operator delete(void*, std::nothrow_t const&) operator new[](unsigned long) operator new(unsigned long) operator new(unsigned long, std::nothrow_t const&) ___cxa_allocate_exception ___cxa_begin_catch ___cxa_call_unexpected ___cxa_end_catch ___cxa_rethrow ___cxa_throw ___gxx_personality_v0 From pinskia at physics.uc.edu Sun Aug 4 16:01:01 2002 From: pinskia at physics.uc.edu (Andrew Pinski) Date: Thu Nov 3 14:49:51 2005 Subject: "std::basic_string" link undefined syms? In-Reply-To: Message-ID: Use g++ as LD instead of gcc. Thanks, Andrew Pinski PS do not cross post, as some people are on all those lists, like me. From devdrvr at davis.com Sun Aug 4 16:28:02 2002 From: devdrvr at davis.com (devdrvr.net Multi-Platform SW) Date: Thu Nov 3 14:49:51 2005 Subject: "std::basic_string" link undefined syms? In-Reply-To: Message-ID: Nevermind. Copied a clean archive of the source project; removed the old libstdc++.a reference. Ranlib-ed and added the proper 3.1 (X.2) archive version before trying to build. Now it works. --Perry On 8/4/02 3:48 PM, "devdrvr.net Multi-Platform SW" wrote: > So I move over to X.2 and now have a project app that won't link. Included > the 3.1 archive libstdc++.a (cause that was the problem before and noticed it > got stripped when did the .pbproj open) but can't seem to get the following > undefined symbols resolved. Does this look familiar; can someone tell me what > to include as a lib to fix it? It was building fine under the latest with > X.1.5. > > Thanks, > --Perry From greg at omnigroup.com Sun Aug 4 17:13:00 2002 From: greg at omnigroup.com (Greg Titus) Date: Thu Nov 3 14:49:51 2005 Subject: Partial selection in NSTextField In-Reply-To: Message-ID: <0C315F7F-A808-11D6-8E4C-0003938E4E32@omnigroup.com> On Saturday, August 3, 2002, at 02:08 PM, Tony wrote: > Is there a way to partially select string in NSTextField? > Thanks. Sure... First, tell the text field to select its text. This will set up the window's field editor for the text field, begin editing, and select all: [theTextField selectText:self]; Second, tell the field editor the range that you actually want selected: [(NSText *)[[theTextField window] firstResponder] setSelectedRange:mySelectionRange]; Hope this helps, -- Greg From ebob at contracorner.com Mon Aug 5 09:55:01 2002 From: ebob at contracorner.com (Bob Peterson) Date: Thu Nov 3 14:49:51 2005 Subject: Strange hang/delay when contacting localhost Message-ID: <16F2CBA7-A894-11D6-B365-000502D783F0@contracorner.com> I have a pair of applications which use XML-RPC to communicate, but sometimes connections to locahost by HTTP will timeout in the client yet the server still gets a connect request. 99% of the time the two apps will be on the same system, so the client uses http://localhost:(port) to reach the server. Generally this works just fine. But we have two problem scenarios which give us headaches. We can always reproduce this case. If my iBook is running these apps, and it is physically connected to my LAN by ethernet wire, then the client times out after its own 60 second time limit and claims the server is not running. Yet at the precise moment it gives up, the server logs a message saying a request just came in. Disconnect the wire, or disable ethernet in the Network control panel, and there are no delays. Apart from this none of my other networking programs fail like this. The less reproducible case involves either of our desktop systems, each on its own home LAN. System One connects to the Internet via a second IPNetRouter system. System Two (mine) connects to the Internet directly via PPP. But being connected to the Internet doesn't seem to bear. Sometimes these systems get into a state where they exhibit the iBook-based behavior. It is extremely rare, though. And again, disconnecting the Ethernet wire seems to cure this. So does rebooting. In case it matters, the client is written in RealBasic and the server is purely Java. What's happening and how do I fix it? \bob From haasd at cae.wisc.edu Mon Aug 5 12:41:00 2002 From: haasd at cae.wisc.edu (David Haas) Date: Thu Nov 3 14:49:51 2005 Subject: SOLVED: NSTextView in NSToolbarItem Message-ID: <278EFA8C-A8AB-11D6-A180-00039316DB9A@cae.wisc.edu> Hi. I posted a message to the list earlier about problems I was having getting a toolbar item containing an NSTextView to work correctly. I fixed my problem, and so that others may benefit from the hours I wasted, I'll post my solution here. Recap: I have an NSToolbarItem containing a custom view, which happens to have in it an NSTextView inside an NSScrollView. Text from the text view was not appearing in the NSScrollView in my customization palette - it was floating off somewhere in the bottom of the window. The problem was this: when the NSScrollView was encoded, it kept a reference to the NSTextView it contained as it's documentView. Unfortunately, the NSClipView which sits between the NSScrollView & the NSTextView "forgot" what it was enclosing. So, to fix my problem, I added the method -awakeFromCoder to my custom view, and explicitly re-set the documentView of my NSClipView to the NSTextView. From niteowl69 at mac.com Mon Aug 5 14:49:01 2002 From: niteowl69 at mac.com (Power Mac User) Date: Thu Nov 3 14:49:51 2005 Subject: Drag & drop to get a file's absolute path Message-ID: How would I obtain the absolute path of a file or directory that I dropped onto my application's icon? [[NSProcessInfo processInfo] arguments] will return some process number but not the absolute path of the file. Also, is there a notification that I can intercept when I drop a file or directory onto my application to make it active? I want it to respond a certain way (by returning the file's path) if it's activated by dropping a file or directory onto it. Thanks in advance for any help -Jay niteowl69@mac.com From jmdisher at student.math.uwaterloo.ca Mon Aug 5 15:02:02 2002 From: jmdisher at student.math.uwaterloo.ca (Jeff Disher) Date: Thu Nov 3 14:49:51 2005 Subject: Drag & drop to get a file's absolute path In-Reply-To: Message-ID: <864B661E-A8BE-11D6-AD86-003065A9AD94@student.math.uwaterloo.ca> Implement the method: - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename in your application's delegate. Make sure that the type of file you want to accept is mentioned as a reader or editor in the project's target (not, use an OS type "fold" for directories). When someone drops something on the icon in the doc or in the finder, this method will be called with the complete path to what was dropped. To see if this made the application active, you will need to listen for the: - (void)applicationDidBecomeActive:(NSNotification *)aNotification notification in the delegate, as well. I am not sure which one of these is called first but a little tinkering would help you understand what to do with these. Both are documented in NSApplication: http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ ObjC_classic/Classes/NSApplication.html Hope that helps, Jeff. On Monday, August 5, 2002, at 05:53 PM, Power Mac User wrote: > How would I obtain the absolute path of a file or directory that I > dropped onto my application's icon? [[NSProcessInfo processInfo] > arguments] will return some process number but not the absolute path of > the file. > > Also, is there a notification that I can intercept when I drop a file > or directory onto my application to make it active? I want it to > respond a certain way (by returning the file's path) if it's activated > by dropping a file or directory onto it. > > Thanks in advance for any help > > -Jay > niteowl69@mac.com > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > Jeff Disher President and Lead Developer of Spectral Class Spectral Class: Shedding Light on Innovation http://www.spectralclass.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2195 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020805/34ed34ca/attachment.bin From dtlinker at u.washington.edu Mon Aug 5 15:04:01 2002 From: dtlinker at u.washington.edu (David Linker) Date: Thu Nov 3 14:49:51 2005 Subject: Source for libcurl binary? In-Reply-To: <187CA4FE-76FA-11D6-8E35-0050E410A817@ultraviolent.com> Message-ID: I would like to include libcurl in a project, and was wondering if there is a source for the library already compiled for Mac OS X. I know that curl is already included, but cannot find libcurl. I would like to avoid having to build it myself, if possible. I found binaries for other platforms, but not Mac OS X. Thanks in advance. David Linker From jamesp at silver-future.com Mon Aug 5 15:17:02 2002 From: jamesp at silver-future.com (James Powell) Date: Thu Nov 3 14:49:51 2005 Subject: Strange hang/delay when contacting localhost In-Reply-To: <16F2CBA7-A894-11D6-B365-000502D783F0@contracorner.com> Message-ID: Hi Bob, I can give you a few things to consider here. Classic has a hard time doing loopback connections to OS X servers. It only works in some cases. It doesn't sound like you are using Classic, but if by some chance the Java server is running in Classic, this could be the problem. Try using http://127.0.0.1:(port) to connect instead of localhost. It shouldn't matter, but it does take the name resolver out of the loop as a possible problem. You can use the Unix command line tools "sudo lsof -i" and "sudo netstat -a" to observe the state of the low-level network interfaces. These might shed some light. You can use "telnet localhost " to try connecting to your server on the iBook directly. If telnet is able to connect, then that suggests that you're looking at a RealBasic bug. I believe that Java threads on OS X are implemented as native threads (pthreads). This raises performance, but it is bleeding edge. Using sockets in a thread-safe manner involves a lot of fiddling to ensure that only thread-safe calls are made and that the appropriate locks are in place to prevent, for example, one thread from using a socket that has not yet been fully opened by another thread. This is the prime suspect from where I'm sitting. My guess is that when you open your connection from the client, the Java server freezes in the middle of connection handshaking because some part of the sockets interface is not thread-safe. Maybe someone here can confirm or deny this; a quick scan of "man accept" didn't give any indication of thread safety. Thread dead-locking and bugs involving non-thread-safe calls are highly timing-dependent which would explain why you see the problem occasionally on some platforms and always on another. There may be some way to run your server in a non-native threads environment. Check your Java docs. Good luck, James On Monday, August 5, 2002, at 10:55 AM, Bob Peterson wrote: > I have a pair of applications which use XML-RPC to communicate, but > sometimes connections to locahost by HTTP will timeout in the client > yet the server still gets a connect request. > > 99% of the time the two apps will be on the same system, so the client > uses http://localhost:(port) to reach the server. Generally this works > just fine. But we have two problem scenarios which give us headaches. > > We can always reproduce this case. If my iBook is running these apps, > and it is physically connected to my LAN by ethernet wire, then the > client times out after its own 60 second time limit and claims the > server is not running. Yet at the precise moment it gives up, the > server logs a message saying a request just came in. Disconnect the > wire, or disable ethernet in the Network control panel, and there are > no delays. Apart from this none of my other networking programs fail > like this. > > The less reproducible case involves either of our desktop systems, each > on its own home LAN. System One connects to the Internet via a second > IPNetRouter system. System Two (mine) connects to the Internet > directly via PPP. But being connected to the Internet doesn't seem to > bear. Sometimes these systems get into a state where they exhibit the > iBook-based behavior. It is extremely rare, though. And again, > disconnecting the Ethernet wire seems to cure this. So does rebooting. > > In case it matters, the client is written in RealBasic and the server > is purely Java. > > What's happening and how do I fix it? > > \bob > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From ebob at contracorner.com Mon Aug 5 15:35:02 2002 From: ebob at contracorner.com (Bob Peterson) Date: Thu Nov 3 14:49:51 2005 Subject: Strange hang/delay when contacting localhost In-Reply-To: Message-ID: <9ABDAE88-A8C3-11D6-8B5D-000502D783F0@contracorner.com> Thanks, James. Those debugging tips could help. On Monday, August 5, 2002, at 06:16 PM, James Powell wrote: > Classic has a hard time doing loopback connections to OS X servers. It > only works in Classic is not involved. RealBasic produces Carbon apps. > Try using http://127.0.0.1:(port) to connect instead of localhost. It > shouldn't matter, but it does take the name resolver out of the loop as > a possible problem. I though of that and tried both 127.0.0.1 and my LAN address, 10.1.1.11. > You can use the Unix command line tools "sudo lsof -i" and "sudo > netstat -a" to observe the state of the low-level network interfaces. > These might shed some light. Will do. > > You can use "telnet localhost " to try connecting to your server > on the iBook directly. If telnet is able to connect, then that > suggests that you're looking at a RealBasic bug. I suspect telnet will work, since I can use OmniWeb, but I'll do a sanity check. > I believe that Java threads on OS X are implemented as native threads > (pthreads). Huh. Seems a good suspect from my perspective, too. I'm using the Apache Project's XML-RPC server, a barely documented hack using threads heavily. I don't need to support threads at the connection level, yet. So I feel free to try your suggestion of using alternate threading support. I can also just plain rewrite their code to reduce its use of threads and be a bit more careful around synchronization. \bob From houou at mac.com Mon Aug 5 16:46:01 2002 From: houou at mac.com (Adam Atlas) Date: Thu Nov 3 14:49:51 2005 Subject: Loading windows from bundles into a main window Message-ID: <74752566-A8CD-11D6-A2EC-0003936C5048@mac.com> I need to be able to load a bundle, and then load the contents of the main window in the main Nib into the contents of my program's main window. Examples of programs that do what I'm referring to are System Preferences (Loading prefPane bundles), Sherlock 3, and Watson. (Of course, there's not much difference between Sherlock 3 and Watson. I already know how to load bundles and then instantiate their principal classes and/or load the main Nibs. I think I could accomplish what I want to do by getting the main window of the Nib, and then placing its content view in my main window, but I'm worried that might break certain Interface Builder connections between the window itself and other objects. Any suggestions? Thanks, Adam Atlas -- Adam Atlas "If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started." - Actual excerpt from a windows program help file! From sean at skti.org Mon Aug 5 18:29:02 2002 From: sean at skti.org (Sean Kelly) Date: Thu Nov 3 14:49:51 2005 Subject: NSTextView margins Message-ID: Hello, I would like to push the content of an NSTextView in from the left, but leave the other edges unaltered. I tried everything I could find in the documentation with no success. How could I do this? Thanks a lot, Sean Kelly www.skti.org From goMac at mac.com Mon Aug 5 19:03:02 2002 From: goMac at mac.com (Colin Cornaby) Date: Thu Nov 3 14:49:51 2005 Subject: Use of Apple's Aqua widgets, bad, or good? In-Reply-To: <200208051904.g75J4u514814@slowbro.omnigroup.com> Message-ID: <931D4D7A-A8E0-11D6-B64B-000502310321@mac.com> What's the deal with the use of Apple's widgets/graphics? I'm don't mean things such as the Mac OS logo, Apple's iApps icons, etc. Instead I mean smaller things such as the forward and back arrows you find in places like the help viewer, the lock icon Apple uses for authentication, etc. Is it a bad thing to use these in your program, or does Apple allow you to use these things. It seems Apple would let us use these things to preserve a united feel among apps, but as I am currently using some Apple made widgets in my programs, I just want to make sure its ok. Better safe then sorry. :) --------------------------------------- Colin Cornaby Official Cocoa Newbie for RBDeveloper Magazine Head Person, Conundrum Software, www.conundrumsoft.com From goMac at mac.com Mon Aug 5 20:39:02 2002 From: goMac at mac.com (Colin Cornaby) Date: Thu Nov 3 14:49:51 2005 Subject: Use of Apple's Aqua widgets, bad, or good? In-Reply-To: <310605E3-A8ED-11D6-A29E-000393434DD4@phat64.com> Message-ID: Well, of course now you are getting into stuff that Apple tells us to use. :) I just happen to notice a lot of developers are using that ugly grey lock instead of the sleek black one. Why? --------------------------------------- Colin Cornaby Official Cocoa Newbie for RBDeveloper Magazine Head Person, Conundrum Software, www.conundrumsoft.com On Monday, August 5, 2002, at 08:32 PM, Chaz wrote: > Indeed. And what about generic icons like files and CDs? Blizzard > used the generic CD icon with a WC3 logo on their new Warcraft III, and > I know many who add different things to the generic file icon. > > On Monday, August 5, 2002, at 08:02 PM, Colin Cornaby wrote: > >> What's the deal with the use of Apple's widgets/graphics? I'm don't >> mean things such as the Mac OS logo, Apple's iApps icons, etc. Instead >> I mean smaller things such as the forward and back arrows you find in >> places like the help viewer, the lock icon Apple uses for >> authentication, etc. Is it a bad thing to use these in your program, >> or does Apple allow you to use these things. It seems Apple would let >> us use these things to preserve a united feel among apps, but as I am >> currently using some Apple made widgets in my programs, I just want to >> make sure its ok. Better safe then sorry. :) >> > > =================================================================== > Chaz McGarvey chaz@phat64.com / mcgarvey@eng.utah.edu > http://www.phat64.com University of Utah > =================================================================== > From cpmueller at mac.com Mon Aug 5 21:55:10 2002 From: cpmueller at mac.com (Clark Mueller) Date: Thu Nov 3 14:49:51 2005 Subject: Fwd: Use of Apple's Aqua widgets, bad, or good? Message-ID: <925B673A-A8F8-11D6-ACE8-0030657D5228@mac.com> Personally, when it came to authentication, I used a plain-vanilla check box to do it with. I thought it looked better than either lock, and its height fit in with my interface much better. -c On Monday, August 5, 2002, at 09:38 PM, Colin Cornaby wrote: > Well, of course now you are getting into stuff that Apple tells us to > use. :) > > I just happen to notice a lot of developers are using that ugly grey > lock instead of the sleek black one. Why? > > --------------------------------------- > Colin Cornaby > Official Cocoa Newbie for RBDeveloper Magazine > Head Person, Conundrum Software, www.conundrumsoft.com > > On Monday, August 5, 2002, at 08:32 PM, Chaz wrote: > >> Indeed. And what about generic icons like files and CDs? Blizzard >> used the generic CD icon with a WC3 logo on their new Warcraft III, >> and I know many who add different things to the generic file icon. >> >> On Monday, August 5, 2002, at 08:02 PM, Colin Cornaby wrote: >> >>> What's the deal with the use of Apple's widgets/graphics? I'm don't >>> mean things such as the Mac OS logo, Apple's iApps icons, etc. >>> Instead I mean smaller things such as the forward and back arrows you >>> find in places like the help viewer, the lock icon Apple uses for >>> authentication, etc. Is it a bad thing to use these in your program, >>> or does Apple allow you to use these things. It seems Apple would let >>> us use these things to preserve a united feel among apps, but as I am >>> currently using some Apple made widgets in my programs, I just want >>> to make sure its ok. Better safe then sorry. :) >>> > >> >> =================================================================== >> Chaz McGarvey chaz@phat64.com / mcgarvey@eng.utah.edu >> http://www.phat64.com University of Utah >> =================================================================== >> > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From ssudre at intego.com Tue Aug 6 03:52:01 2002 From: ssudre at intego.com (=?ISO-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:49:51 2005 Subject: Use of Apple's Aqua widgets, bad, or good? In-Reply-To: Message-ID: <6904CFBA-A92A-11D6-BEDF-0030659046EE@intego.com> On Tuesday, August 6, 2002, at 05:38 AM, Colin Cornaby wrote: > Well, of course now you are getting into stuff that Apple tells us to > use. :) > > I just happen to notice a lot of developers are using that ugly grey > lock instead of the sleek black one. Why? One possible answer is that the drawing inside the round NSButton is buggy in Mac OS X. When you click in a NSButton small round button, the image is cut at its top and the top is then put at the bottom. So maybe the grey lock is not affected by this issue. From d.theisen at gmx.net Tue Aug 6 04:00:02 2002 From: d.theisen at gmx.net (Dirk Theisen) Date: Thu Nov 3 14:49:51 2005 Subject: Text System: NSRunStorage exception. Workaround Needed! Message-ID: Hello, I'm desparately seeking a solution or workaround for a problem with the cocoa text system in Mac OS 10.1.5: I've reduced the problem to just a few lines of the (slightly modified) TextViewConfig Apple example code which is available here: Whenever I create a new TextContainer (and view) and connect it to the existing one (sharing a TextStorage and a LayoutManager), I get the following Exception: 2002-08-05 18:13:35.169 TextViewConfig[5229] *** NSRunStorage, _NSBlockNumberForIndex(): index (39) beyond array bounds (0) The guts of the code looks like this (which is very similar to the one in TextEdit, which seems to work): - (void) addSlide { unsigned i = [[layoutManager textContainers] count]+1; NSTextContainer *textContainer = [[NSTextContainer alloc] initWithContainerSize:NSMakeSize(SLIDE_WIDTH, SLIDE_HEIGHT)]; NSTextView *textView = [[NSTextView alloc] initWithFrame:NSMakeRect(SLIDE_BORDER, SLIDE_BORDER + (NUM_SLIDES - i) * (SLIDE_HEIGHT + SLIDE_BORDER), SLIDE_WIDTH, SLIDE_HEIGHT) textContainer:textContainer]; [textView setHorizontallyResizable:NO]; [textView setVerticallyResizable:NO]; [layoutManager addTextContainer:textContainer]; [textContainer release]; [customView addSubview:textView]; [textView release]; } In order to provoke the exception, scroll to the only slide on the right, then enter enough text to fill the slide. The app now creates a second slide. The above exception occurs. After that, the system exhibits "funny" behaviour. Obviously the text system is left in a "confused" state. Has anybody had the same problem and a solution or workaround? Any help welcome! Greetings, Dirk From esimcoe at mac.com Tue Aug 6 06:21:02 2002 From: esimcoe at mac.com (Graphite400) Date: Thu Nov 3 14:49:51 2005 Subject: Memory and Debugging Questions Message-ID: <47ED7B49-A93F-11D6-97DD-0050E450B45C@mac.com> Greetings! I am a little fuzzy on the issue of memory management. I read the previous thread that came through on the subject and understand the rules to be "if you didn't allocate, copy, or retain it, don't release it"... If this is true, does allocation ONLY occur when you use [[NSMutableString alloc] init], or is it also considered an allocation if you use [NSMutableString string]? If one acquires an object from some other method than alloc, such as [@"teststring" substringWithRange:NSMakeRange(2, 1)] is it already autoreleased? Is it wrong to release an autoreleased object? If you are creating a threaded application and one of your threads contains an infinite loop, should the autorelease pool still be allocated and released outside of the while(1) statement, or should it be embedded like the following? while(1) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Do some stuff [pool release] } Is there a way to flush an NSFileHandle that was acquired through an NSPipe? I am receiving the data through the command NSData *data = [fileHandle availableData], but the data which is returned NEVER gets released... all it is doing is taking up memory... how can I remedy this? I am currently using OmniObjectMeter to keep track of my memory issues, but I have some questions. I see a lot of instances of objects that are created from the main application. Am I somehow responsible for cleaning up those allocations? I don't see how I could be, seeing as I didn't allocate that memory, but I am a bit of a novice (if you couldn't tell :-)). There is a Peak Memory Allocation... menu item in the Process menu. What does it do exactly? I couldn't find a reference to it in the documentation. Is there a way to only view objects in OmniObjectMeter that I am responsible for? In Project Builder's debugging pane my applications occasionally quit with a SIG**** error... what do they mean and how can I learn about them? I searched apples Project Builder docs for any reference to them and found none. Is this specific to gdb? Thanks for any light you can shed on my seemingly infinite chasm of naivety... Eliot Simcoe From nathan_day at mac.com Tue Aug 6 07:24:02 2002 From: nathan_day at mac.com (Nathan Day) Date: Thu Nov 3 14:49:51 2005 Subject: Memory and Debugging Questions In-Reply-To: <47ED7B49-A93F-11D6-97DD-0050E450B45C@mac.com> Message-ID: <00780758-A947-11D6-9BDA-0050E4E0EE30@mac.com> On Tuesday, August 6, 2002, at 10:50 PM, Graphite400 wrote: > I am a little fuzzy on the issue of memory management. I read the > previous thread that came through on the subject and understand the > rules to be "if you didn't allocate, copy, or retain it, don't release > it"... > > If this is true, does allocation ONLY occur when you use > [[NSMutableString alloc] init], or is it also considered an allocation > if you use [NSMutableString string]? No then someone else allocated it and it there responsibility to get rid of it. > > If one acquires an object from some other method than alloc, such as > [@"teststring" substringWithRange:NSMakeRange(2, 1)] is it already > autoreleased? > You are trying to think to much about what is going on under the bonnet, if you allocate it means you as opposed to someone else in in response to what you do. Any object that you do not create/retained/copy directly are the responsibility of someone else to get rid of, how they do that when they do that is there business. > Is it wrong to release an autoreleased object? > If you have retained it then you have to release it. If it's also autoreleased by someone else thats none of your concern as long as you balance your retains/copys/alloc with your release/autorelease's. If you retain an object 100 times then you need to release/autorelease 100 times. retain and release conceptually look something like this retain { retainCount++; } release { retainCount--; if( retainCount == 0 ) [self dealloc]; } > If you are creating a threaded application and one of your threads > contains an infinite loop, should the autorelease pool still be > allocated and released outside of the while(1) statement, or should it > be embedded like the following? > > while(1) { > NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; > > // Do some stuff > > [pool release] > } > Most likely otherwise all of the objects add to the autorelease pool will be never told to release. > Is there a way to flush an NSFileHandle that was acquired through an > NSPipe? I am receiving the data through the command NSData *data = > [fileHandle availableData], but the data which is returned NEVER gets > released... all it is doing is taking up memory... how can I remedy > this? > > I am currently using OmniObjectMeter to keep track of my memory issues, > but I have some questions. > > I see a lot of instances of objects that are created from the main > application. Am I somehow responsible for cleaning up those > allocations? I don't see how I could be, seeing as I didn't allocate > that memory, but I am a bit of a novice (if you couldn't tell :-)). Some objects are not released to speed up quitting of your app, memory leaks are only a problem if things are created continually like in some sort of loop. If there is fixed number of instance that are never released then it not a problem, an unreleased singletons for instance is not going to be a problem since there is only every one. This though can be a problem if you do something else in your dealloc method that has to happen, like close some file, it might not happen. You then have to use the Application will Terminate Notification. > > There is a Peak Memory Allocation... menu item in the Process menu. > What does it do exactly? I couldn't find a reference to it in the > documentation. > > Is there a way to only view objects in OmniObjectMeter that I am > responsible for? > > In Project Builder's debugging pane my applications occasionally quit > with a SIG**** error... what do they mean and how can I learn about > them? I searched apples Project Builder docs for any reference to them > and found none. Is this specific to gdb? type 'man signal' in the terminal this is a unix thing, usually it means you didn't balance your retains and release. > Thanks for any light you can shed on my seemingly infinite chasm of > naivety... If my bridge of enlightenment helps cross your infinite chasm of naivety then it's been a pleasure, I'm going to ride off into the sunset now. Nathan Day http://homepage.mac.com/nathan_day/ From bwebster at mac.com Tue Aug 6 07:29:04 2002 From: bwebster at mac.com (Brian Webster) Date: Thu Nov 3 14:49:51 2005 Subject: NSTextView margins In-Reply-To: <200208061105.g76B56500319@slowbro.omnigroup.com> Message-ID: <31798380-A946-11D6-AE48-003065D61140@mac.com> On Tuesday, August 6, 2002, at 06:05 AM, macosx-dev- request@omnigroup.com wrote: > I would like to push the content of an NSTextView in from the left, but > leave the other edges unaltered. I tried everything I could find in the > documentation with no success. How could I do this? Thanks a lot, Take a look at the doc page at /Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/TextStorageLayer/ Tasks/Region.html which explains how to set the size and inset of a text container. You should probably read all the docs on the text system to get feel of how it all works. -- Brian Webster bwebster@mac.com http://homepage.mac.com/bwebster From rcerny at dataline.cz Tue Aug 6 07:29:59 2002 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:49:51 2005 Subject: Exception handlers Message-ID: hi, I have a following method in my application: - (id)initWithServer:(NSString*)aServer port:(int)aPort errorWindow:(NSWindow*)aWindow { if ([self init]) { [lock lock]; //NSLock NS_DURING [socket connectToHost:[NSHost hostWithNameOrAddress:aServer] port:aPort]; [self setInitialized:YES]; return self; NS_HANDLER NSBeginCriticalAlertSheet(@"ICIS", @"OK", nil, nil, aWindow, self, NULL, NULL, nil, [localException description]); #ifdef DEBUG NSLog(@"ICISEngine closed by an error"); #endif NS_ENDHANDLER [lock unlock]; } return nil; } And I'm getting this error in console: 2002-08-06 16:21:39.499 ICIS[1108] *** Exception handlers were not properly removed. Some code has jumped or returned out of an NS_DURING...NS_HANDLER region without using the NS_VOIDRETURN or NS_VALUERETURN macros. i can't find any explanation on the web. Sorry if my question is stupid. How can I handle such a situation? Thanks Robert From shawn at freetimesw.com Tue Aug 6 07:57:54 2002 From: shawn at freetimesw.com (Shawn Erickson) Date: Thu Nov 3 14:49:51 2005 Subject: Memory and Debugging Questions In-Reply-To: <47ED7B49-A93F-11D6-97DD-0050E450B45C@mac.com> Message-ID: <0D933384-A94C-11D6-99A3-003065A895A4@freetimesw.com> On Tuesday, August 6, 2002, at 06:20 AM, Graphite400 wrote: > If this is true, does allocation ONLY occur when you use > [[NSMutableString alloc] init], or is it also considered an allocation > if you use [NSMutableString string]? No allocation will take place but it was done down in the "string" call provided by NSMutableString. This call allocated and inited the instance it returned to you. Since it allocated it has the responsibility to release it. It does so by autoreleasing it before returning it to you. > If one acquires an object from some other method than alloc, such as > [@"teststring" substringWithRange:NSMakeRange(2, 1)] is it already > autoreleased? Yes. It created it, it must insure it is released. > Is it wrong to release an autoreleased object? If you didn't retain it yourself first, then yes. Basically you need to balance each retain with a [auto]release (if you allocated/copied it then the object has a implicit retain against it). > If you are creating a threaded application and one of your threads > contains an infinite loop, should the autorelease pool still be > allocated and released outside of the while(1) statement, or should it > be embedded like the following? [snip] I would go with the later. Also if you have any loops down lower that allocate lots o' memory on every loop you may want to something similar. > [snip] > I see a lot of instances of objects that are created from the main > application. Am I somehow responsible for cleaning up those > allocations? I don't see how I could be, seeing as I didn't allocate > that memory, but I am a bit of a novice (if you couldn't tell :-)). If you didn't allocate it then you really don't need to worry about it. Somethings also exist for the life of the application or nib that you may have loaded. > [snip] > In Project Builder's debugging pane my applications occasionally quit > with a SIG**** error... what do they mean and how can I learn about > them? I searched apples Project Builder docs for any reference to them > and found none. Is this specific to gdb? Usually memory access related; for example accessing an already released object. The common causes are not retaining something that you need or not clearing an object pointer when the object it points to is released. In my code I usually do something like to following when releasing an object (at least for instance variables). [someObject release]; someObject = null; -Shawn From jlp at nerim.net Tue Aug 6 08:20:02 2002 From: jlp at nerim.net (Jean-Luc Peuriere) Date: Thu Nov 3 14:49:51 2005 Subject: NSTableview : selecting row help Message-ID: <6684582B-A950-11D6-9D9F-000A27DA3972@nerim.net> Hi, I have a NSTableView where I want the following behaviour : - when user click a row in a particular column, he toggles an attribute without selecting the row, - when user click in other column, normal behaviour of selecting (and extended) is done. The first part (toggling attribute) is easy,I just needed to wire an action in IB and check with clicked column we are in the good one. The second part (not selecting the row) is much more difficult (for me anyway). TableView clickedColumn is noted in apple doc as valid only in the action so I can't use it in tableDelegate shouldSelectRow: One solution would be to use tableDelegate shouldSelectRow: to return NO and doing all selection work in clicked action, but it's clumsy as I would need to mimic shift and cmd-click also, which is a lot of work, and I haven't any idea about how doing this properly. Other problem, this would break the work i do in selectionDidChange notification. Does someone has a better idea ? -- JL Peuriere |- There have been ... accidents. |- What kind of accidents ? |- The kind of accidents you prefer to call ... accidents. | (T. Pratchett, Maskerade) From mwatson at apple.com Tue Aug 6 10:38:23 2002 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:49:51 2005 Subject: Exception handlers In-Reply-To: Message-ID: On Tuesday, August 6, 2002, at 07:28 AM, Robert Cerny wrote: > hi, I have a following method in my application: > > - (id)initWithServer:(NSString*)aServer port:(int)aPort > errorWindow:(NSWindow*)aWindow > { > if ([self init]) > { > [lock lock]; //NSLock > NS_DURING > [socket connectToHost:[NSHost hostWithNameOrAddress:aServer] > port:aPort]; > [self setInitialized:YES]; > > return self; You can't just return from within an NS_DURING/NS_HANDLER block. See: http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ ProgrammingTopics/Exceptions/Tasks/HandlingExceptions.html I'd suggest moving: return self; to be immediately after: [lock unlock]; matt. From olivier at macdev.itg.ti.com Tue Aug 6 11:47:49 2002 From: olivier at macdev.itg.ti.com (Olivier Destrebecq) Date: Thu Nov 3 14:49:51 2005 Subject: threadworker Message-ID: <4DAB0D18-A96C-11D6-9A55-0003937C1CAC@macdev.itg.ti.com> i use thread worker to create a thread in my program. The problem that i have is that apparently the runloop that is created by thread worker never ends. I pin pointed the problem to the fact that the task that i want to perform in my thread is sending an appleevent and waiting for the answer. then when the answer comes back (supposedly with an image) i display the image in a window, using the endselector provided by Threadworker. Can anybody points me to a way of stop the run loop once it has done its job. Olivier From laurent.souef at free.fr Tue Aug 6 11:59:37 2002 From: laurent.souef at free.fr (Laurent Souef) Date: Thu Nov 3 14:49:51 2005 Subject: Building frameworks (for the dummies). Message-ID: Hi all, I am trying to build my own framework with all the re-usable objects I created. Could somebody tell me how to do this. I did not find anything on the docs I have. So far I created a New Project -> Cocoa Framework in Project Builder. Import all the headers and .m files of my objects and compiled. It said compile successfully, but when I look in the framework created I do not see any header, it looks like a void framework ? There is also a void main.c file in the class dir. What am I supposed to do with it ? So, if somebody is willing to give me some hints, that would be great. Thanks, Laurent. Laurent SOUEF 3 Hameau des Chaumettes 83440 Montauroux France Tel : (33) 4 94 39 88 69 From stury at mac.com Tue Aug 6 12:27:31 2002 From: stury at mac.com (J. Scott Tury) Date: Thu Nov 3 14:49:51 2005 Subject: Building frameworks (for the dummies). In-Reply-To: <200208061903.g76J3Qv04690@slowbro.omnigroup.com> Message-ID: If you want to have headers within your framework, you will need to open up the project settings. In the "Files and Build Phase" you will notice that all of your headers have a check box selection at the righthand side of the screen. Select the "Public" check-box if you want the header to be exposed within the framework. Don't worry about the "main.c" file. It probably isn't used. You can probably take it out and you shouldn't have a problem. One tricky thing in a framework though: Under "Build Settings: Install Location" be forewarned that whatever path you stick in here, is where the framework needs to be for your application to use it. For instance if you set it up to be "\Library\Frameworks" then the users machine MUST have your framework in "\Library\Frameworks" before the application will run. Scott Tury On 8/6/02 3:03 PM, "macosx-dev-request@omnigroup.com" wrote: > Subject: Building frameworks (for the dummies). > From: Laurent Souef > To: macosx-dev@omnigroup.com > > Hi all, > > I am trying to build my own framework with all the re-usable objects I > created. > Could somebody tell me how to do this. I did not find anything on the > docs I have. > So far I created a New Project -> Cocoa Framework in Project Builder. > Import all the headers and .m files of my objects and compiled. > It said compile successfully, but when I look in the framework created I > do not see any header, it looks like a void framework ? > There is also a void main.c file in the class dir. What am I supposed to > do with it ? From laurent.souef at free.fr Tue Aug 6 13:00:03 2002 From: laurent.souef at free.fr (Laurent Souef) Date: Thu Nov 3 14:49:51 2005 Subject: Building frameworks (for the dummies). In-Reply-To: Message-ID: <38CC5238-A976-11D6-B46C-00039340BCDA@free.fr> Thx it works great now ! Le mardi 6 ao?t 2002, ? 09:19 PM, J. Scott Tury a ?crit : > If you want to have headers within your framework, you will need to > open up > the project settings. In the "Files and Build Phase" you will notice > that > all of your headers have a check box selection at the righthand side of > the > screen. Select the "Public" check-box if you want the header to be > exposed > within the framework. > > Don't worry about the "main.c" file. It probably isn't used. You can > probably take it out and you shouldn't have a problem. > > One tricky thing in a framework though: Under "Build Settings: Install > Location" be forewarned that whatever path you stick in here, is where > the > framework needs to be for your application to use it. For instance if > you > set it up to be "\Library\Frameworks" then the users machine MUST have > your > framework in "\Library\Frameworks" before the application will run. > > Scott Tury > > > On 8/6/02 3:03 PM, "macosx-dev-request@omnigroup.com" > wrote: > >> Subject: Building frameworks (for the dummies). >> From: Laurent Souef >> To: macosx-dev@omnigroup.com >> >> Hi all, >> >> I am trying to build my own framework with all the re-usable objects I >> created. >> Could somebody tell me how to do this. I did not find anything on the >> docs I have. >> So far I created a New Project -> Cocoa Framework in Project Builder. >> Import all the headers and .m files of my objects and compiled. >> It said compile successfully, but when I look in the framework >> created I >> do not see any header, it looks like a void framework ? >> There is also a void main.c file in the class dir. What am I supposed >> to >> do with it ? > > > Laurent SOUEF 3 Hameau des Chaumettes 83440 Montauroux France Tel : (33) 4 94 39 88 69 From tuparev at mac.com Tue Aug 6 13:00:35 2002 From: tuparev at mac.com (Georg Tuparev) Date: Thu Nov 3 14:49:51 2005 Subject: Building frameworks (for the dummies). In-Reply-To: Message-ID: On Tuesday, August 6, 2002, at 09:19 PM, J. Scott Tury wrote: > Don't worry about the "main.c" file. It probably isn't used. You can > probably take it out and you shouldn't have a problem. BTW, did anyone had any use for main.c in the Framework template? I could not think on any reason having it around. Just wondering... Georg Tuparev Tuparev Technologies Klipper 13 1186 VR Amstelveen The Netherlands Mobile: +31-6-55798196 From me18 at wiredroads.com Tue Aug 6 13:07:25 2002 From: me18 at wiredroads.com (Mark) Date: Thu Nov 3 14:49:51 2005 Subject: Strange hang/delay when contacting localhost In-Reply-To: <16F2CBA7-A894-11D6-B365-000502D783F0@contracorner.com> Message-ID: <3D1656BC-A977-11D6-B2C1-000393B3CA04@wiredroads.com> A very common oversight when building transactional client/server TCP applications is the TCP_NODELAY tcp option. This option is often disabled by default, leaving the application at the whim of the OS (and/or runtime environment) as to when the data "sent" on a TCP connection actually makes it onto the wire. I cannot say that I know how to effect this in RealBasic. You might look for this option, or something similarly named, or some analog to the {get,set}sockopt() functions in RealBasic and JAVA. For more info about this option, see "man tcp" on your MacOS X box. However, certainly the connection itself should be put onto the wire immediately (if not at least within the timeout), so I might guess that something else may be going wrong as well. I would also echo Mr. Powell's recommendation to ensure that the socket i/o is handled in a thread-safe manner. I recall thread issues with sockets in JAVA projects past, but I haven't had to deal with it for some time so the current state may be different. On Monday, August 5, 2002, at 09:55 AM, Bob Peterson wrote: > I have a pair of applications which use XML-RPC to communicate, but > sometimes connections to locahost by HTTP will timeout in the client yet > the server still gets a connect request. > > 99% of the time the two apps will be on the same system, so the client > uses http://localhost:(port) to reach the server. Generally this works > just fine. But we have two problem scenarios which give us headaches. > > We can always reproduce this case. If my iBook is running these apps, and > it is physically connected to my LAN by ethernet wire, then the client > times out after its own 60 second time limit and claims the server is not > running. Yet at the precise moment it gives up, the server logs a message > saying a request just came in. Disconnect the wire, or disable ethernet > in the Network control panel, and there are no delays. Apart from this > none of my other networking programs fail like this. > > The less reproducible case involves either of our desktop systems, each > on its own home LAN. System One connects to the Internet via a second > IPNetRouter system. System Two (mine) connects to the Internet directly > via PPP. But being connected to the Internet doesn't seem to bear. > Sometimes these systems get into a state where they exhibit the > iBook-based behavior. It is extremely rare, though. And again, > disconnecting the Ethernet wire seems to cure this. So does rebooting. > > In case it matters, the client is written in RealBasic and the server is > purely Java. > > What's happening and how do I fix it? > > \bob > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From bmackin at mac.com Tue Aug 6 17:18:01 2002 From: bmackin at mac.com (Ben Mackin) Date: Thu Nov 3 14:49:51 2005 Subject: Problems with TIFFRepresentation Message-ID: I originally asked the following on another mailing list: >My question is this, is there some way to use quartz to render my pdf file to a >tiff-g3 file? I would rather not have to delve into printer driver writing if I >didn't have to (as I have no experience here yet). > >If someone could point me to some documentation, if this is even possible, >that would be great. And this is the reply I got back from Vince DeMarco : >That would be easy, write a small Cocoa Application that loads the PDF >into an NSImage and then tell that NSImage to get its > >- (NSData *)TIFFRepresentation; >- (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp >factor:(float)aFloat; > > >and save the resulting NSData to disk. Which is just what I needed. So I wrote my code, and used the compression of NSTIFFCompressionCCITTFAX3, and I outputted my NSData to disk. But I got a full color tiff file (definitely not what I should have). If you look at the description for NSTIFFCompressionCCITTFAX3 you see: NSTIFFCompressionCCITTFAX3 CCITT Fax Group 3 compression. It's for one-bit fax images sent over telephone lines. From hayne at sympatico.ca Tue Aug 6 18:06:04 2002 From: hayne at sympatico.ca (Cameron Hayne) Date: Thu Nov 3 14:49:52 2005 Subject: Problems with TIFFRepresentation In-Reply-To: Message-ID: <71D9DA66-A9A1-11D6-B491-0003931DFB14@sympatico.ca> On Tuesday, August 6, 2002, at 07:59 pm, Ben Mackin wrote: [about using NSImage's TIFFRepresentationUsingCompression method]: > I wrote my code, and used the compression of > NSTIFFCompressionCCITTFAX3, and I outputted my NSData to disk. But I > got a > full color tiff file (definitely not what I should have). If you look > at the > description for NSTIFFCompressionCCITTFAX3 you see: > NSTIFFCompressionCCITTFAX3 > CCITT Fax Group 3 compression. It's for one-bit fax images sent over > telephone lines. > From my understanding of that, and of tiff-f files, I should have > gotten a > 1-bit, black and white image. What went wrong? Did I read into this too > much, or am I not saving it with CCITT Fax Group 3 compression as it > should > be? > I need someone that knows something to shed some light. I tried to get > more > info on the Cocoa-Dev list (where I originally asked this), but no one > responded. I know this should work, as it is documented to work. Umm, there were in fact some responses on the cocoa-dev list and they said that you need to convert your full color image to a 1 bit TIFF format before asking TIFFRepresentationUsingCompression to compress it to the NSTIFFCompressionCCITTFAX3 format. It seems that the TIFFRepresentationUsingCompression just doesn't do what you want. I also have been disappointed that NSImage doesn't supply any methods for image-format conversion - but that seems to be the way it is. Apparently you need to use the QuickTime APIs to do image-format conversion. -- Cameron Hayne (hayne@sympatico.ca) Hayne of Tintagel From bmackin at mac.com Tue Aug 6 18:42:01 2002 From: bmackin at mac.com (Ben Mackin) Date: Thu Nov 3 14:49:52 2005 Subject: Problems with TIFFRepresentation In-Reply-To: <71D9DA66-A9A1-11D6-B491-0003931DFB14@sympatico.ca> Message-ID: On 8/6/02 6:03 PM, "Cameron Hayne" wrote: > Umm, there were in fact some responses on the cocoa-dev list and they > said that you need to convert your full color image to a 1 bit TIFF > format before asking TIFFRepresentationUsingCompression to compress it > to the NSTIFFCompressionCCITTFAX3 format. It seems that the > TIFFRepresentationUsingCompression just doesn't do what you want. Thinking back now I do remember this (I got one offlist message telling me this, and maybe there was an on list message as well). I then sent a reply back asking if there was any routines to convert to 1-bit, and got no response on that. So that is where I had gotten stuck. If I am correct in my thinking, writing a conversion routine to one-bit would require some algorithm, and be pretty hefty to go about, yes? > I also have been disappointed that NSImage doesn't supply any methods > for image-format conversion - but that seems to be the way it is. > Apparently you need to use the QuickTime APIs to do image-format > conversion. I will take a peek at the Quicktime stuff, and see if I cant find the routines I need to convert my image to 1-bit. I am hoping such a routine exists (and am guessing that one does). Thanks, Ben http://www.shayufilms.com From esimcoe at mac.com Wed Aug 7 04:14:02 2002 From: esimcoe at mac.com (Graphite400) Date: Thu Nov 3 14:49:52 2005 Subject: Problems with TIFFRepresentation In-Reply-To: Message-ID: <56C70AB2-A9F6-11D6-97DD-0050E450B45C@mac.com> After you get your TIFF representation, initialize a new NSBitmapImageRep using the data ([[NSBitmapImageRep alloc] initWithData:tiffData]), then use the -(NSData *)representationUsingType:properties: method of the newly created NSBitmapImageRep to save the image. The type you will want to use will be NSTIFFFileType and the properties will be a dictionary containing the following Key: NSImageCompressionMethod Value:NSTIFFCompressionCCITTFAX3 I just tackled such a problem and this will give you the solution you are looking for. The documentations of NSBitmapImageRep and NSImage are very misleading in that one understands the -(NSData *)TIFFRepresentationUsingCompression:factor: method to do exactly that, compress the image using the specified compression... it doesn't... in fact, I haven't found anything that it does do that is useful... Cheers Eliot Simcoe On Tuesday, August 6, 2002, at 09:41 PM, Ben Mackin wrote: > On 8/6/02 6:03 PM, "Cameron Hayne" wrote: > >> Umm, there were in fact some responses on the cocoa-dev list and they >> said that you need to convert your full color image to a 1 bit TIFF >> format before asking TIFFRepresentationUsingCompression to compress it >> to the NSTIFFCompressionCCITTFAX3 format. It seems that the >> TIFFRepresentationUsingCompression just doesn't do what you want. > > Thinking back now I do remember this (I got one offlist message telling > me > this, and maybe there was an on list message as well). I then sent a > reply > back asking if there was any routines to convert to 1-bit, and got no > response on that. So that is where I had gotten stuck. > > If I am correct in my thinking, writing a conversion routine to one-bit > would require some algorithm, and be pretty hefty to go about, yes? > >> I also have been disappointed that NSImage doesn't supply any methods >> for image-format conversion - but that seems to be the way it is. >> Apparently you need to use the QuickTime APIs to do image-format >> conversion. > > I will take a peek at the Quicktime stuff, and see if I cant find the > routines I need to convert my image to 1-bit. I am hoping such a routine > exists (and am guessing that one does). > > Thanks, > Ben > > http://www.shayufilms.com > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From weesh at mindspring.com Wed Aug 7 04:45:03 2002 From: weesh at mindspring.com (Ken Wieschhoff) Date: Thu Nov 3 14:49:52 2005 Subject: AppleScript help? Message-ID: Weeding through the documentation on scripting my Cocoa app, I've managed to create a rudimentary dictionary which appears much as I expect in the Script Editor. I've added accessor methods but apparently I need to add something since Script Editor keeps giving me the error message "NSReceiverEvaluationScriptError" and my accessor is never reached. Here's a sample script... tell application MyApp activate set transparencyAmount to transparency of MyWindow end tell Here's my scriptSuite and swcriptTerminology *********************************************************** MyApp.scriptSuite { "Name" = "MyApp"; "AppleEventCode" = "MYAP"; "Classes" = { "NSApplication" = { "AppleEventCode" = "capp"; "Superclass" = "NSCoreSuite.NSApplication"; "ToManyRelationships" = { "orderedWindows" = { "AppleEventCode" = "cwin"; "Type" = "MyWindow"; }; }; }; "MyWindow" = { "SuperClass" = "NSCoreSuite.NSWindow"; "AppleEventCode" = "cwin"; "Attributes" = { "country" = { "AppleEventCode" = "ctry"; "Type" = "NSString"; }; "transparency" = { "AppleEventCode" = "tran"; "Type" = "NSNumber"; }; }; }; }; } MyApp.scriptTerminology { "Description" = "MyApp specific classes."; "Name" = "MyWindow suite"; "Classes" = { "NSApplication" = { "Description" = "Top level scripting object"; "Name" = "application"; "PluralName" = "applications"; }; "MyWindow" = { "Description" = "Current Window"; "Name" = "MyWindow"; "PluralName" = "MyWindows"; "Attributes" = { "country" = { "Name" = "country"; "Description" = "The country the window is set to."; }; "transparency" = { "Name" = "transparency"; "Description" = "The transparency amount (alpha) of the window."; }; }; }; }; } What am I missing? -- - -- Ken Wieschhoff (770)813-0231 *************************** From esimcoe at mac.com Wed Aug 7 05:45:03 2002 From: esimcoe at mac.com (Eliot Simcoe) Date: Thu Nov 3 14:49:52 2005 Subject: More Memory Management Message-ID: <67B008C4-AA03-11D6-9A43-0050E450B45C@mac.com> Is one responsible for releasing the memory allocated for NSSize and other structures in cocoa? I would assume so, but how do you do it? Thanks Eliot Simcoe From esimcoe at mac.com Wed Aug 7 06:29:02 2002 From: esimcoe at mac.com (Eliot Simcoe) Date: Thu Nov 3 14:49:52 2005 Subject: Color Border around NSImageView Message-ID: <865FA692-AA09-11D6-9A43-0050E450B45C@mac.com> Hello all, I need to draw a colored border around an NSImageView, and I would really like it if it looked just like a colored version of the NSImageFrameGrayBezel. Is there an easy way to do this? If not, what is going to be the most efficient hack? Thanks for the help. Eliot Simcoe From nathan_day at mac.com Wed Aug 7 08:21:05 2002 From: nathan_day at mac.com (Nathan Day) Date: Thu Nov 3 14:49:52 2005 Subject: More Memory Management In-Reply-To: <67B008C4-AA03-11D6-9A43-0050E450B45C@mac.com> Message-ID: <945CE09E-AA17-11D6-93D3-0050E4E0EE30@mac.com> No, the memory for struct's is allocated the same way as other local variables and is released the same way when your method or function ends. It is possible to allocate the memory for struct's using c's malloc, in which case you would have to free it. On Wednesday, August 7, 2002, at 10:14 PM, Eliot Simcoe wrote: > Is one responsible for releasing the memory allocated for NSSize and > other structures in cocoa? I would assume so, but how do you do it? > Nathan Day http://homepage.mac.com/nathan_day/ From rcerny at dataline.cz Wed Aug 7 09:42:01 2002 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:49:52 2005 Subject: NSAscendingSortIndicator Message-ID: <878B790E-AA24-11D6-B6FD-0003935401DA@dataline.cz> Hi there, there is a note in the Release Notes of 6c115 that new constants were added to Appkit to help us with sort indicators in table columns (NSAscendingSortIndicator, NSDescendingSortIndicator) However, I cannot get my source to compile. Could anyone test if I'm right and should fill a bugreport? Thanks Robert From dlitwin at connectix.com Wed Aug 7 10:38:08 2002 From: dlitwin at connectix.com (David Litwin) Date: Thu Nov 3 14:49:52 2005 Subject: NSMenu and NSMenuView In-Reply-To: Message-ID: Unfortunately I never received any formal answer on this (although a few people helped out a bit privately). After working on some other code for awhile I've recently returned to this issue and here was my resolution: The first set of docs describing the high level "how menus work" are just plain wrong, and it is sad that they waste people's time. With no other explanation of a replacement, the only other menu customization functionality is in Carbon. In a similar set of confusing docs, don't get stuck going down the road of making an MDEF code resource. The newer Carbon APIs support direct callbacks through the CreateCustomMenu() call. Search for CarbonMDEF in the sample code for a starting point. The process of tracking this info down and being led on multiple dead ends has been a big waste of time and I'd hate for others to suffer the same fate. Hopefully one day the docs will be cleaned up enough to at least not actively mislead people. David Litwin Senior Software Engineer Connectix On Tuesday, June 11, 2002, at 01:56 PM, David Litwin wrote: > Hello, I'm looking to have a custom look for some menus and menu > items. I'm guessing this involves subclassing and overriding a draw > method somewhere, but this is where I need info. > > All of my searching through the Apple documentation and discussion > lists seems to point to two mutually exclusive descriptions of how > NSMenus work: > > One set describes how an NSMenu works with an NSMenuView > (http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/ > MenuList/index.html#//apple_ref/doc/uid/10000032i), and the other says > that NSMenuView is no longer used > (http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ > ObjC_classic/Classes/NSMenuView.html) > > My searches of discussion lists also reference NSMenuView as a class > working with NSMenu, and separately that it is no longer used for > drawing. > > Anyone know which is accurate? The references mentioning NSMenuView's > deprecation don't give any information about how things actually work > without it with regard to drawing, and I can't find any drawing related > methods to override in NSMenu. > > Thanks, > > David Litwin > Senior Software Engineer > Connectix > From mwalker at mac.com Wed Aug 7 11:14:06 2002 From: mwalker at mac.com (Mel Walker) Date: Thu Nov 3 14:49:52 2005 Subject: NSWorkspace for opening files: wrong? right? Message-ID: <5E98F8A0-AA31-11D6-A6D0-000393171F58@mac.com> I have a method that cycles through a list of files from an NSTableView, and tries to open them in the correct application (mostly QuickTime player and Preview). It seems like the following code should do the trick, but when I try to open a mix of movie types (including AVIs and MPEGs) and picture types (like JPEG), I get problems. QuickTime Player manages to open few of the files it should, but not all, while Preview opens 1 file and that's it. I get errors in my log like this: 2002-08-07 12:02:20.643 xyzzy[1420] LSOpenFromURLSpec() returned -10818 for application (null) path /Users/foobar/Desktop/TestDocs/dummy.AVI. 2002-08-07 12:02:22.628 xyzzy[1420] LSOpenFromURLSpec() returned -10818 for application (null) path /Users/foobar/Desktop/TestDocs/bothell_entry.jpg. I can't seem to find -10818 in the headers. I've also tried specifying the application with openFile:withApplication:, but that doesn't work any better. Am I just opening files too quickly? Should I be using Carbon AE calls instead, where I can open a group of files together instead of one-at-a-time? Does Cocoa have something that I'm overlooking (I hope!)? -(IBAction)displaySpecifiedFiles:(id)sender { NSEnumerator *selectedFiles; NSNumber *indexObject; selectedFiles = [myTable selectedRowEnumerator]; while(indexObject = [selectedFiles nextObject]) { int index = [indexObject intValue]; MyTableItem *vti = [myTableArray objectAtIndex:index]; if([[NSWorkspace sharedWorkspace] openFile:[vti getPath]] == NO) { NSLog(@"%@ didn't launch!!!!", [vti videoTitle]); } } } -- Mel Walker Software Engineer From dfeldman at designtheworld.com Wed Aug 7 11:26:05 2002 From: dfeldman at designtheworld.com (David Feldman) Date: Thu Nov 3 14:49:52 2005 Subject: Help! password storage and usage Message-ID: I'm stumped. My app needs to allow users to log onto remote AppleShare servers, including those for which the username is not their local username. Currently, it simply places a system() call to mount_afp. It looks as though this could also be done with NSTask (is that better?). The password is omitted from the call, so if the user has stored one in his Keychain it retrieves it there. This works fine except: (1) the user can't use my app to log onto a server for which he has not previously stored a password in his Keychain, and (2) the app needs to run in an automated mode sometimes, and won't be able to do that if the user has not previously given permission to unlock the Keychain for a particular server. So I guess what I'd like to do is provide a password field and use it to store the passwords in the user's data file. This leaves me with two problems, and I can't figure out how to solve them: 1. How do I store and retrieve passwords in a secure manner? The data file is a simple XML property list. 2. How do I pass them to mount_afp (or whatever I'm using) in a secure manner? Ideally, I think I'd like to leave this as a pure Cocoa app, partially because I'm unfamiliar with the Carbon environment, but also isn't Cocoa a better (and more forward-thinking) way to go? If anyone can help me out, I would be extremely grateful. My users are getting restless. Thanks, --Dave ---------------------------------------------------------------------- David A. Feldman User Interface Designer dfeldman@designtheworld.com http://designtheworld.com ---------------------------------------------------------------------- From bwebster at mac.com Wed Aug 7 12:27:07 2002 From: bwebster at mac.com (Brian Webster) Date: Thu Nov 3 14:49:52 2005 Subject: NSWorkspace for opening files: wrong? right? In-Reply-To: <200208071903.g77J3Pv06605@slowbro.omnigroup.com> Message-ID: On Wednesday, August 7, 2002, at 02:03 PM, macosx-dev- request@omnigroup.com wrote: > I can't seem to find -10818 in the headers. I've also tried > specifying the > application with openFile:withApplication:, but that doesn't work any > better. -10818 is defined in LaunchServices.h: kLSLaunchInProgressErr = -10818, /* e.g. opening an alreay opening application*/ So yeah, it looks like it doesn't like opening lots of files really quickly. You could try waiting a short bit and retrying the open call whenever an error occurs, but you would have to be wary about infinite loops and such. Using Launch Services directly might give you more control over things, since you get an error code back and can differentiate between different reasons for failure. You could go the Apple Event route if you want to get fancy, using Launch Services to get references for the application to open for each item, grouping the items by app, and then sending a single open event to each application. I think that Launch Services should give you sufficient results, at least for reasonable numbers of items. -- Brian Webster bwebster@mac.com http://homepage.mac.com/bwebster From andy at cocoadevcentral.com Wed Aug 7 12:45:01 2002 From: andy at cocoadevcentral.com (Andreas Monitzer) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List Message-ID: <14249ABA-AA3D-11D6-9F0B-00039306E362@cocoadevcentral.com> Hi folks, the signal to noise ratio here on cocoa-dev and macosx-dev has gotten quite bad lately, and many "good" questions are being ignored or simply smothered by a bunch of "how do I save a document?" type questions. It's getting annoying and frustrating, at least to many who have voiced their concerns to me. While I feel that cocoa-dev is a great place for newbies, and I applaud Apple for keeping the list open, I want to create a lower-traffic "pro" list as well, so perhaps good questions are not lost in the noise. I'm well aware that rarely have "-newbie" and "-pro" lists worked together in the past (too many newbies join the pro list, etc.), but I think it's worth a shot. Newbies will be warned and banned for asking silly questions. The burden of this "evildoing" will fall on Erik and Cocoa Dev Central. Please consider signing up. You can do so here: http://cocoadevcentral.com/mailman/listinfo/cocoa-pro Thank you. Sincerely, Andreas Monitzer Cocoa Dev Central (.com) PS: Please keep replies off-list to avoid lowering the signal-to-noise ratio even further From mwalker at mac.com Wed Aug 7 12:46:06 2002 From: mwalker at mac.com (Mel Walker) Date: Thu Nov 3 14:49:52 2005 Subject: NSWorkspace for opening files: wrong? right? In-Reply-To: Message-ID: <05E37452-AA3E-11D6-A6D0-000393171F58@mac.com> On Wednesday, August 7, 2002, at 01:27 PM, Brian Webster wrote: > -10818 is defined in LaunchServices.h: > > kLSLaunchInProgressErr = -10818, /* e.g. opening an alreay > opening application*/ > > So yeah, it looks like it doesn't like opening lots of files really > quickly. You could try waiting a short bit and retrying the open call > whenever an error occurs, but you would have to be wary about infinite > loops and such. Using Launch Services directly might give you more > control over things, since you get an error code back and can > differentiate between different reasons for failure. > > You could go the Apple Event route if you want to get fancy, using Launch > Services to get references for the application to open for each item, > grouping the items by app, and then sending a single open event to each > application. I think that Launch Services should give you sufficient > results, at least for reasonable numbers of items. I think that's what I will do. I was hoping for a "true" Cocoa way of doing things, but I guess I'm out of luck. What I need is a "-(BOOL)openFiles:withApplication:" method somewhere to handle this. -- Mel Walker Software Engineer Home phone: (801) 731-1105 Cell Phone: (801) 698-2501 Fax: (603) 507-8006 From bmackin at mac.com Wed Aug 7 13:57:03 2002 From: bmackin at mac.com (Ben Mackin) Date: Thu Nov 3 14:49:52 2005 Subject: [OSX]Re: Problems with TIFFRepresentation In-Reply-To: <56C70AB2-A9F6-11D6-97DD-0050E450B45C@mac.com> Message-ID: On 8/7/02 4:10 AM, "Graphite400" wrote: > After you get your TIFF representation, initialize a new > NSBitmapImageRep using the data ([[NSBitmapImageRep alloc] > initWithData:tiffData]), then use the -(NSData > *)representationUsingType:properties: method of the newly created > NSBitmapImageRep to save the image. The type you will want to use will > be NSTIFFFileType and the properties will be a dictionary containing the > following > > Key: NSImageCompressionMethod > Value:NSTIFFCompressionCCITTFAX3 Ok, thanks for the insight! I just went through, and made the changes to my code, but I am still getting full color tiff files on the output side of things. Maybe someone can spot something in my code that I have overlooked. myPDFasData = [[NSData alloc] initWithContentsOfFile:@"/tmp/send/fileToFax.pdf"]; myPDF = [[NSPDFImageRep alloc] initWithData:myPDFasData]; image1 = [[NSImage alloc] initWithSize:kUSLetterSize]; //a constant I made [image1 addRepresentation:myPDF]; [myPDF setCurrentPage:1]; myPDFasData = [myPDF PDFRepresentation]; data = [image1 TIFFRepresentation]; myDict = [NSDictionary dictionaryWithObjectsAndKeys:@"NSImageCompressionMethod", @"NSTIFFCompressionCCITTFAX3",nil]; myTIFFasBitMap = [[NSBitmapImageRep alloc] initWithData:data]; data = [myTIFFasBitMap representationUsingType:NSTIFFFileType properties:myDict]; [data writeToFile:temp3String atomically:YES]; > I just tackled such a problem and this will give you the solution you > are looking for. The documentations of NSBitmapImageRep and NSImage are > very misleading in that one understands the -(NSData > *)TIFFRepresentationUsingCompression:factor: method to do exactly that, > compress the image using the specified compression... it doesn't... in > fact, I haven't found anything that it does do that is useful... It does seem stupid that they would have this routine, that server no useful purpose. Hopefully someone at Apple will look at this and give us some insight. Thanks, Ben http://www.shayufilms.com From esimcoe at mac.com Wed Aug 7 14:14:30 2002 From: esimcoe at mac.com (Eliot Simcoe) Date: Thu Nov 3 14:49:52 2005 Subject: [OSX]Re: Problems with TIFFRepresentation In-Reply-To: Message-ID: Try changing your dictionary creation line to the one below: myDict = [NSDictionary dictionaryWithObject:NSTIFFCompressionCCITTFAX3 forKey:NSImageCompressionMethod]; I think you are creating the dictionary in reverse. Eliot Simcoe On Wednesday, August 7, 2002, at 04:56 PM, Ben Mackin wrote: > On 8/7/02 4:10 AM, "Graphite400" wrote: > >> After you get your TIFF representation, initialize a new >> NSBitmapImageRep using the data ([[NSBitmapImageRep alloc] >> initWithData:tiffData]), then use the -(NSData >> *)representationUsingType:properties: method of the newly created >> NSBitmapImageRep to save the image. The type you will want to use will >> be NSTIFFFileType and the properties will be a dictionary containing >> the >> following >> >> Key: NSImageCompressionMethod >> Value:NSTIFFCompressionCCITTFAX3 > > Ok, thanks for the insight! I just went through, and made the changes > to my > code, but I am still getting full color tiff files on the output side of > things. Maybe someone can spot something in my code that I have > overlooked. > > myPDFasData = [[NSData alloc] > initWithContentsOfFile:@"/tmp/send/fileToFax.pdf"]; > > myPDF = [[NSPDFImageRep alloc] initWithData:myPDFasData]; > > image1 = [[NSImage alloc] initWithSize:kUSLetterSize]; //a constant I > made > [image1 addRepresentation:myPDF]; > > [myPDF setCurrentPage:1]; > myPDFasData = [myPDF PDFRepresentation]; > > data = [image1 TIFFRepresentation]; > > myDict = [NSDictionary > dictionaryWithObjectsAndKeys:@"NSImageCompressionMethod", > @"NSTIFFCompressionCCITTFAX3",nil]; > > myTIFFasBitMap = [[NSBitmapImageRep alloc] initWithData:data]; > data = [myTIFFasBitMap representationUsingType:NSTIFFFileType > properties:myDict]; > [data writeToFile:temp3String atomically:YES]; > >> I just tackled such a problem and this will give you the solution you >> are looking for. The documentations of NSBitmapImageRep and NSImage are >> very misleading in that one understands the -(NSData >> *)TIFFRepresentationUsingCompression:factor: method to do exactly that, >> compress the image using the specified compression... it doesn't... in >> fact, I haven't found anything that it does do that is useful... > > It does seem stupid that they would have this routine, that server no > useful > purpose. Hopefully someone at Apple will look at this and give us some > insight. > > Thanks, > Ben > > http://www.shayufilms.com > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2604 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020807/b421f4ad/attachment.bin From sanguish at digifix.com Wed Aug 7 14:18:01 2002 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: <14249ABA-AA3D-11D6-9F0B-00039306E362@cocoadevcentral.com> Message-ID: <1D077B26-AA4B-11D6-A9B3-0003938AF686@digifix.com> I'm really not convinced that such a 'split' needs to take place... whats more, that makes three lists now, Omni's list, Apple's official list, and now this third alternative. in many cases, it makes it necessary to monitor all three, and cross-posts/repeated posts will happen. established folks who want to help others and work on their own projects will be on all three... On Wednesday, August 7, 2002, at 03:37 PM, Andreas Monitzer wrote: > Hi folks, > > the signal to noise ratio here on cocoa-dev and macosx-dev has gotten > quite bad lately, and many "good" questions are being ignored or > simply smothered by a bunch of "how do I save a document?" type > questions. It's getting annoying and frustrating, at least to many who > have voiced their concerns to me. > > While I feel that cocoa-dev is a great place for newbies, and I > applaud Apple for keeping the list open, I want to create a > lower-traffic "pro" list as well, so perhaps good questions are not > lost in the noise. I'm well aware that rarely have "-newbie" and > "-pro" lists worked together in the past (too many newbies join the > pro list, etc.), but I think it's worth a shot. Newbies will be warned > and banned for asking silly questions. The burden of this "evildoing" > will fall on Erik and Cocoa Dev Central. > > Please consider signing up. You can do so here: > http://cocoadevcentral.com/mailman/listinfo/cocoa-pro > > Thank you. > > Sincerely, > Andreas Monitzer > Cocoa Dev Central (.com) > PS: Please keep replies off-list to avoid lowering the signal-to-noise > ratio even further > _______________________________________________ > cocoa-dev mailing list | cocoa-dev@lists.apple.com > Help/Unsubscribe/Archives: > http://www.lists.apple.com/mailman/listinfo/cocoa-dev > Do not post admin requests to the list. They will be ignored. From iacas at mac.com Wed Aug 7 14:32:01 2002 From: iacas at mac.com (Erik J. Barzeski) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: <1D077B26-AA4B-11D6-A9B3-0003938AF686@digifix.com> Message-ID: Hi, I'm replying to the list(s) because Scott did. No future responses (from me) will go to the list(s). On 8/7/02 5:17pm, "Scott Anguish" wrote: > I'm really not convinced that such a 'split' needs to take place... With all due respect, you didn't see the need for a Cocoa Dev Central, or a cocoadev.com (etc), either. > whats more, that makes three lists now, Omni's list, Apple's official > list, and now this third alternative. Yep, three general lists. Except, while Apple has stated that they'll allow newbie questions and in fact encourages it (and that's good, and a main reason for the existence of CDC), this list will not allow newbie questions. > in many cases, it makes it necessary to monitor all three, and > cross-posts/repeated posts will happen. Perhaps they will. But I hardly think there's much effort involved in subscribing and then reading email. If mailman supports the ability to block cross-posts and it becomes a problem, I'll block cross-posted messages. Furthermore, most cross-posts are from newbies, I think, and I don't suspect it should be much of a problem. > established folks who want to help others and work on their own > projects will be on all three... Established folks who have sought help have not gotten as much as they otherwise could have due to a bunch of "How do I change the text in an NSTextField?" questions - good questions for newbies - waste of time for someone who knew that answer two years ago. Within an hour, 40 or more people signed up. We'll see where it goes. You're welcome to not sign up if you want. Perhaps the list isn't needed. But we'll see. -- Best wishes, Erik J. Barzeski Home is where you hang your @ ################################################################### Email: erik@(anything below) AIM: iacas http://iacas.org http://weims.net http://techstra.net http://barzeski.com http://cocoadevcentral.com http://soundsetcentral.com http://freshlysqueezedsoftware.com http://applescriptcentral.com ################################################################### From sanguish at digifix.com Wed Aug 7 14:43:02 2002 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: Message-ID: <90AD7DC0-AA4E-11D6-A9B3-0003938AF686@digifix.com> On Wednesday, August 7, 2002, at 05:31 PM, Erik J. Barzeski wrote: > > On 8/7/02 5:17pm, "Scott Anguish" wrote: >> I'm really not convinced that such a 'split' needs to take place... > > With all due respect, you didn't see the need for a Cocoa Dev Central, > or a > cocoadev.com (etc), either. > > This is not an accurate portrayal of my opinion or the events. It's tiring... and disillusioning that this myth continues to be propagated. From andrew at zamler-carhart.com Wed Aug 7 17:00:03 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:52 2005 Subject: PDO: can't connect to remote host Message-ID: Dear List, I've built a little app to figure out Portable Distributable Objects. Basically, my app just shares a common "model" object to synchronize state between multiple copies of itself. For example, if you drag a slider in one app the equivalent sliders move (in real time) in all running copies of the app. Pretty cool stuff, and all it takes is four lines of code! :-) But I can't get it to work over a network. Here's where the problem is occuring: NSConnection *remoteConnection = [NSConnection connectionWithRegisteredName: serverName host: hostName]; If I set hostName to nil, the above method returns a valid NSConnection and everything works great. If I set hostname to the IP name or IP address of either of my two computers, or even "localhost," it returns nil. The documentation says: > hostName is an Internet domain name (for example, "sales.anycorp.com"). > If hostName is nil or empty then only the local host is searched for > the named NSConnection. That seems pretty straightforward. Any ideas? Thanks, Andrew From jswitte at bloomington.in.us Wed Aug 7 23:01:27 2002 From: jswitte at bloomington.in.us (Jim Witte) Date: Thu Nov 3 14:49:52 2005 Subject: Making/Setting file preview icon In-Reply-To: <001f01c22d3a$cac42340$0101a8c0@karma> Message-ID: This is probably a silly question for which I just need a single method call.. How can I make and set a preview icon for a graphic (jpg, gif, bmp - basically anything that OmniWeb can handle) I notice that sometimes when I download an image with either IE or OmniWeb, it shows a preview icon, and sometimes it doesn't - seemingly randomly. Jim Witte jswitte@bloomington.in.us From rcerny at dataline.cz Thu Aug 8 00:03:04 2002 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: Message-ID: Well, I just don't know who and how will differentiate which question is a "newbie" and which the "pro". I'm afraid it could discourage new developers to ask questions at all and from my personal point of view I will really miss answers from real nerds like you, Scott, Andreas and others. It will definitely lead to a solution I just did - to subscribe another list and monitor it as well..... Robert On Wednesday, Aug 7, 2002, at 23:31 Europe/Prague, Erik J. Barzeski wrote: > Hi, > > I'm replying to the list(s) because Scott did. No future responses > (from me) > will go to the list(s). > > > On 8/7/02 5:17pm, "Scott Anguish" wrote: >> I'm really not convinced that such a 'split' needs to take place... > > With all due respect, you didn't see the need for a Cocoa Dev Central, > or a > cocoadev.com (etc), either. > >> whats more, that makes three lists now, Omni's list, Apple's official >> list, and now this third alternative. > > Yep, three general lists. Except, while Apple has stated that they'll > allow > newbie questions and in fact encourages it (and that's good, and a main > reason for the existence of CDC), this list will not allow newbie > questions. > >> in many cases, it makes it necessary to monitor all three, and >> cross-posts/repeated posts will happen. > > Perhaps they will. But I hardly think there's much effort involved in > subscribing and then reading email. If mailman supports the ability to > block > cross-posts and it becomes a problem, I'll block cross-posted messages. > Furthermore, most cross-posts are from newbies, I think, and I don't > suspect > it should be much of a problem. > >> established folks who want to help others and work on their own >> projects will be on all three... > > Established folks who have sought help have not gotten as much as they > otherwise could have due to a bunch of "How do I change the text in an > NSTextField?" questions - good questions for newbies - waste of time > for > someone who knew that answer two years ago. > > Within an hour, 40 or more people signed up. We'll see where it goes. > You're > welcome to not sign up if you want. Perhaps the list isn't needed. But > we'll > see. > > > -- > Best wishes, > Erik J. Barzeski > > Home is where you hang your @ > ################################################################### > Email: erik@(anything below) AIM: iacas > > http://iacas.org http://weims.net > http://techstra.net http://barzeski.com > http://cocoadevcentral.com http://soundsetcentral.com > http://freshlysqueezedsoftware.com http://applescriptcentral.com > ################################################################### > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From bradley.smith at artisansw.com Thu Aug 8 00:16:01 2002 From: bradley.smith at artisansw.com (Smith, Bradley) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List Message-ID: <292ACC51B379D242ABF9FCACD79E574F2386DA@pluto.artisansw.com> The problem with having seperate lists is this IMHO:- I'm a newbie trying to do something I haven't before and it doesn't work. So, I want to post a question. Now, i could post to the newbie list and hope some other newbie has a. tried to do what I'm doing and b. been successful. Or, I can increase the chances of it being seen by someone who knows what the problem is by posting to the pro list. You see the problem? There's no point in putting a bunch of newbies in a list and expecting them to figure everything out amongst themselves. They need mentoring from people who *know* how things should be done. Saying that the pros will monitor the newbie list is not a valid argument by the way. They can monitor the combined newbie / pro list right now. These "good" questions that are being ignored aren't (again IMHO) being ignored because of the "noise". They're being ignored because there's on one here that can help, yet. If you put a bunch of propellerheads in a list and a really, REALLY hard problem comes up you can bet your life they'll all want to be the one to solve it first and show off their prowess. It's human nature. Brad the newbie From stupidfish23 at mac.com Thu Aug 8 00:30:02 2002 From: stupidfish23 at mac.com (ben) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List Message-ID: I totally agree with Robert on this subject. Splitting the list into newbie-pro versions will descourage new developers. Don't any of you guys remember how it felt to be able to post a question that a lot of good developers would be able to answer-- sparing you the hours of research and headaches it would have taken you to find an easy solution. Back when you were all newbies. Now you have a way of thinking that helps you find what you want in the documented parts of cocoa. But newbies might first be confused with the documentation. Now there's a danger this all will change. If you split the group into two experienced developers may completely migrate to the pro-list and newbie questions - however trivial they may seem - might not get answered because developers who know the answers might not be checking the lists anymore. Another thing - I did what Robert did as well - I subscribed for the pro list. I might only be monitoring the list as I am afraid, that if I post a question, the nerds moderating the list might just decide that my question is too newbie-ish and remove me from the list. What exactly is a pro, and what is a newbie question? I really think that this pro-newbie list diversion is not a good thing. But we will all see how it turns out. I just don'T want to feel that I am left out of interesting questions and answers because my questions are considered too newbie-ish. Thanks for listening to me. Ben >Well, >I just don't know who and how will differentiate which question is a >"newbie" and which the "pro". I'm afraid it could discourage new >developers to ask questions at all and from my personal point of view I >will really miss answers from real nerds like you, Scott, Andreas and >others. It will definitely lead to a solution I just did - to subscribe >another list and monitor it as well..... > >Robert From rcerny at dataline.cz Thu Aug 8 01:17:44 2002 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:49:52 2005 Subject: Exception handlers In-Reply-To: Message-ID: <44E5C321-AAA6-11D6-B6FD-0003935401DA@dataline.cz> Hi Matt, ok, I tried your solution but it doesn't work as expected. Of course, I got rid off the error message about NS_VOIDRETURN but look what happens in case of wrong server address. The socket waits for a timeout and than it throws an exception. The error sheet is displayed and the init method returns self in all cases so I'm not able to test if I'm connected or not. Does it make a sense to you? I suppose i solve it wrong way, don't I? Robert On Tuesday, Aug 6, 2002, at 19:36 Europe/Prague, Matt Watson wrote: > > On Tuesday, August 6, 2002, at 07:28 AM, Robert Cerny wrote: > >> hi, I have a following method in my application: >> >> - (id)initWithServer:(NSString*)aServer port:(int)aPort >> errorWindow:(NSWindow*)aWindow >> { >> if ([self init]) >> { >> [lock lock]; //NSLock >> NS_DURING >> [socket connectToHost:[NSHost hostWithNameOrAddress:aServer] >> port:aPort]; >> [self setInitialized:YES]; >> >> return self; > > You can't just return from within an NS_DURING/NS_HANDLER block. See: > > http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ > ProgrammingTopics/Exceptions/Tasks/HandlingExceptions.html > > I'd suggest moving: > > return self; > > to be immediately after: > > [lock unlock]; > > matt. > From chmod007 at mac.com Thu Aug 8 02:25:03 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:49:52 2005 Subject: Making/Setting file preview icon In-Reply-To: Message-ID: > This is probably a silly question for which I just need a single > method call.. How can I make and set a preview icon for a graphic (jpg, > gif, bmp - basically anything that OmniWeb can handle) I notice that > sometimes when I download an image with either IE or OmniWeb, it shows a > preview icon, and sometimes it doesn't - seemingly randomly. > > Jim Witte > jswitte@bloomington.in.us If you would like to make a program yourself, then I suggest you check out the IconFamily class at this URL: http://homepage.mac.com/troy_stephens/software/objects/IconFamily/content.ht ml There is a simple example which does just that: create an icon preview. If that isn't enough, then you can have a look at the excellent pic2icon (http://www.sugarcubesoftware.com). It is free and very nice. Thirdly, there is automatic preview creation for images built into Jaguar. / David Remahl From marco at sente.ch Thu Aug 8 02:45:03 2002 From: marco at sente.ch (Marco Scheurer) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: <14249ABA-AA3D-11D6-9F0B-00039306E362@cocoadevcentral.com> Message-ID: <6F4616FE-AAB3-11D6-9B73-003065F99092@sente.ch> On Wednesday, August 7, 2002, at 09:37 pm, Andreas Monitzer wrote: > the signal to noise ratio here on cocoa-dev and macosx-dev has gotten > quite bad lately, and many "good" questions are being ignored or simply > smothered by a bunch of "how do I save a document?" type questions. > It's getting annoying and frustrating, at least to many who have voiced > their concerns to me. > > While I feel that cocoa-dev is a great place for newbies, and I applaud > Apple for keeping the list open, I want to create a lower-traffic "pro" > list as well, so perhaps good questions are not lost in the noise. I'm > well aware that rarely have "-newbie" and "-pro" lists worked together > in the past (too many newbies join the pro list, etc.), but I think > it's worth a shot. Newbies will be warned and banned for asking silly > questions. The burden of this "evildoing" will fall on Erik and Cocoa > Dev Central. > > Please consider signing up. You can do so here: > http://cocoadevcentral.com/mailman/listinfo/cocoa-pro > That's a really bad idea. I don't like the idea of an elitist club such as this. Marco Scheurer Sen:te, Lausanne, Switzerland http://www.sente.ch From oplusplus at cox.net Thu Aug 8 03:13:01 2002 From: oplusplus at cox.net (oplusplus@cox.net) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: <6F4616FE-AAB3-11D6-9B73-003065F99092@sente.ch> Message-ID: <43D0D7F5-AAB7-11D6-90BE-0030659B2A02@cox.net> I hate cross posting to put this but.... If the "problem" is noise on the list, maybe another approach would be to institute and enforce subject classification that would make the list more "filter" friendly. There are already some conventions (ANN etc). ANN : announcement NEWBIE : I am new PRO: fear me, or watch this OFFICIAL: apple BOOHOO: i could run apple better bitches etc etc. Or.... Maybe a news group would be more appropriate? On Thursday, August 8, 2002, at 05:44 AM, Marco Scheurer wrote: > On Wednesday, August 7, 2002, at 09:37 pm, Andreas Monitzer wrote: > >> the signal to noise ratio here on cocoa-dev and macosx-dev has gotten >> quite bad lately, and many "good" questions are being ignored or >> simply smothered by a bunch of "how do I save a document?" type >> questions. It's getting annoying and frustrating, at least to many who >> have voiced their concerns to me. >> >> While I feel that cocoa-dev is a great place for newbies, and I >> applaud Apple for keeping the list open, I want to create a >> lower-traffic "pro" list as well, so perhaps good questions are not >> lost in the noise. I'm well aware that rarely have "-newbie" and >> "-pro" lists worked together in the past (too many newbies join the >> pro list, etc.), but I think it's worth a shot. Newbies will be warned >> and banned for asking silly questions. The burden of this "evildoing" >> will fall on Erik and Cocoa Dev Central. >> >> Please consider signing up. You can do so here: >> http://cocoadevcentral.com/mailman/listinfo/cocoa-pro >> > > That's a really bad idea. I don't like the idea of an elitist club such > as this. > > > Marco Scheurer > Sen:te, Lausanne, Switzerland http://www.sente.ch > _______________________________________________ > cocoa-dev mailing list | cocoa-dev@lists.apple.com > Help/Unsubscribe/Archives: > http://www.lists.apple.com/mailman/listinfo/cocoa-dev > Do not post admin requests to the list. They will be ignored. > From joe_esch at mac.com Thu Aug 8 06:57:01 2002 From: joe_esch at mac.com (Joe Esch) Date: Thu Nov 3 14:49:52 2005 Subject: Unicode for modifier characters Message-ID: <8411C593-AAD6-11D6-BB86-0003933E9212@mac.com> When you assign a key equivalent to a menu item, Cocoa displays the key equivalent on the menu using special characters for the modifier keys. I would like to be able to do the same thing to show a key equivalent on the tooltip of a button on a tool palette. I assume that there must be some Unicode characters that represent the symbols for the modifier keys, but I haven't been able to find them anywhere. Can anyone tell me where to find this? From nickzman at mac.com Thu Aug 8 07:05:03 2002 From: nickzman at mac.com (Nick Zitzmann) Date: Thu Nov 3 14:49:52 2005 Subject: Authorization Services and file pipes Message-ID: Quick question here, hopefully someone knows the answer... I RTFM'd and didn't see anything about this in the Authorization Services reference on the Apple developer site. Say a program launches a command line program using AuthorizationExecuteWithPrivileges() and passed it a FILE to use as a pipe. Then it uses a command like fscanf("%s", string) to get the output from the task. If the task gets to a certain point and stops outputting something for a while, then reports sporadically, ie. "tail -f" on a file which is sometimes being modified by another task, what happens when it becomes silent? Does it... * block further execution until something comes in? * return an empty string until the program talks again? * return EOFs every time it's called and nothing's new? * or something else? Does anyone know for sure? Thanks... Nick Zitzmann ICQ: 22305512 Check out my software page: http://homepage.mac.com/nickzman/ From shubo at mac.com Thu Aug 8 07:32:15 2002 From: shubo at mac.com (shubo) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: <43D0D7F5-AAB7-11D6-90BE-0030659B2A02@cox.net> Message-ID: Just how are you going to decide who's a pro and who's not? Do we have to provide a resume? Pass some kind of test? Or is it based on how sophisticated your questions are? And where is the cutoff line? Are you going to boot out any newbies? Or just the ones who are so lazy they won't seek answer elsewhere before posting questions? Yong From stupidfish23 at mac.com Thu Aug 8 08:21:02 2002 From: stupidfish23 at mac.com (=?ISO-8859-1?Q?Sal=E1nki_Benj=E1min?=) Date: Thu Nov 3 14:49:52 2005 Subject: NSComboBox - simple example? Message-ID: <4CF5B4E8-AAE2-11D6-9763-003065BB04BA@mac.com> Hi! Does anyone have a basic example for NSComboBox usage to share with me? I want to use an NSMutableArray as the data source. Thanks. Ben From kkerekes at cox.net Thu Aug 8 09:40:02 2002 From: kkerekes at cox.net (Kirk Kerekes) Date: Thu Nov 3 14:49:52 2005 Subject: NSWorkspace for opening files: wrong? right -- untested suggestion In-Reply-To: <200208080704.g7874Cv23059@slowbro.omnigroup.com> Message-ID: <744666F4-AAED-11D6-B3BE-000A2791BD86@cox.net> > I was hoping for a "true" Cocoa way of > doing things, but I guess I'm out of luck. > > What I need is a "-(BOOL)openFiles:withApplication:" method somewhere to > handle this. For a more "pure cocoa" approach, consider creating a "file list opener" object, whose +convenience method ( [MWFileListOpener openerWithFiles:(NSArray *) files], perhaps) takes an NSArray of filepaths, and stores it _and_ a freshly-minted NSEnumerator for that array in its ivs. Then you invoke its other method: - (void) openAFile:(id) ignored Inside that method, you grab a filepath from the enumerator, and open it with NSWorkspace as ususal. Then you invoke: [self performSelector:@selector(openAFile:) withObject:self afterDelay:0]; --Which will cause openAFile: to be re-executed at the beginning of the _next_ event loop. By thus scheduling the file opens at 1/per event-loop pass, you will likely avoid whatever problem NSWorkspace has with bulk file-opens. Obviously, when the enumerator's nextObject method returns nil, you stop the process by just not invoking performSelector:withObject:afterDelay:. The object can also send a notification to the rest of the app that it is done, and/or release itself. Don't forget to put in a dealloc method to release the NSEnumerator and the NSArray ivs. If this seems to improve things, but just not quite enough, add some additional delay in the afterDelay: parameter. You could probably go to > 0.5 before it will actually change the perceived performance of the process -- and > 1.0 is probably a good match to human performance limits. Pacing things out also prevents consuming 100% of the machine bandwidth on opening files (which is often very bandwidth intensive), and leaves your app usable during the process. This general technique is very useful for pacing background processes so that they don't mire the app. It gives priority to user input, and avoids the difficulties of threads. For error reporting, use notifications back to the main app, or have the MWFileListOpener put up a progress panel that lists problems if they occur. From mwalker at mac.com Thu Aug 8 09:53:02 2002 From: mwalker at mac.com (Mel Walker) Date: Thu Nov 3 14:49:52 2005 Subject: NSWorkspace for opening files: wrong? right -- untested suggestion In-Reply-To: <744666F4-AAED-11D6-B3BE-000A2791BD86@cox.net> Message-ID: <41DDEA1F-AAEF-11D6-A05E-000393171F58@mac.com> On Thursday, August 8, 2002, at 10:39 AM, Kirk Kerekes wrote: > >> I was hoping for a "true" Cocoa way of >> doing things, but I guess I'm out of luck. >> >> What I need is a "-(BOOL)openFiles:withApplication:" method somewhere to >> handle this. > > For a more "pure cocoa" approach, consider creating a "file list opener" > object, whose +convenience method ( [MWFileListOpener > openerWithFiles:(NSArray *) files], perhaps) takes an NSArray of > filepaths, > and stores it _and_ a freshly-minted NSEnumerator for that array in its > ivs. Then you invoke its other method: > > - (void) openAFile:(id) ignored > > Inside that method, you grab a filepath from the enumerator, and open it > with NSWorkspace as usual. Then you invoke: > > [self performSelector:@selector(openAFile:) withObject:self afterDelay:0] > ; > > --Which will cause openAFile: to be re-executed at the beginning of the > _next_ event loop. By thus scheduling the file opens at 1/per event-loop > pass, you will likely avoid whatever problem NSWorkspace has with bulk > file-opens.[...] This is similar to what I did, without the custom class -- If the file can' t open, I do the performSelector:withObject:afterDelay:0 to call this function: -(void)delayedOpenFile:(NSString*)fullPath { int numTimesWaited = 0; while([[NSWorkspace sharedWorkspace] openFile:fullPath] == NO) { [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]; if(++numTimesWaited > 20) break; } } This seems to work just fine, and doesn't have any user-noticeable delays while opening the documents. Out of a whole list of files, only a very few even need this function, so I'm cluttering up the run loop or anything (I don't even know if that's important to consider, but it's moot anyway). Anyway, it works, that's all I wanted it to do. But, NSWorkspace still needs a plural version of openFile, IMHO. -- Mel Walker Software Engineer From paul at eisusa.com Thu Aug 8 10:11:13 2002 From: paul at eisusa.com (Paul Nicholson) Date: Thu Nov 3 14:49:52 2005 Subject: Interrupt Latency In-Reply-To: <9AB23936-3574-11D7-AF41-0030659046EE@intego.com> References: <9AB23936-3574-11D7-AF41-0030659046EE@intego.com> Message-ID: I connected a logic analyzer to the PCI INTA signal on a PCI SCSI card to see what sort of interrupt latencies OS-X was delivering. The analyzer showed that the interrupt line could be low for up to 20 ms before it was serviced. Twenty ms is a rather long time. Of course, disk interrupts are generally a lower priority item. I'm not sure how the MACH kernel works. Is it possible to get faster interrupt response times by establishing a higher priority for certain PCI devices? Paul From mwalker at mac.com Thu Aug 8 11:05:09 2002 From: mwalker at mac.com (Mel Walker) Date: Thu Nov 3 14:49:52 2005 Subject: Making sure I understand (was NSWorkspace for opening files: wrong? right -- untested suggestion) In-Reply-To: Message-ID: <3A188BC0-AAF9-11D6-A05E-000393171F58@mac.com> On Thursday, August 8, 2002, at 11:25 AM, Kirk Kerekes wrote: > 1. Glad you found something that worked for you. Following Aaron > Hillegass's advice, I now avoid subthreads unless _absolutely_ necessary. > [...] Is this in his book? I don't remember it, but there was a *lot* in there (I'm proud to say I went through every exercise -- it's great book!). I'm using threading in my app to "resolve" files dropped on a table view -- I need to get information about the files, using QT to open them, and doing that in the dropped method sometimes took too long, especially off of network volumes. So, I place the filename in the table view and in a queue for background processing. Then, the entries in the table view slowly resolve themselves. This is kind of like how the finder slowly determines folder sizes in the list view mode. A thread seemed like an obvious solution, since using an NSTimer would involve a lot more complicated programming on my part to (essentially) emulate a thread. > Inside an application, cooperative multitasking using the kind of > technique I noted tends to provide better user responsiveness. And it > avoids thread-hassles. No locks, no bizarre accessors, no mysterious > hard-to-replicate crashes. It just works. If it does, indeed, provide better responsiveness, I'm all for it. Plus, I used the old OS 9.x thread manager a number of times, and so I'm much more comfortable with cooperative multitasking. > 2. You can't "clutter up the run loop". It is there to handle user-paced > activity. It works. Okay. It's kind of weird for me to use Cocoa, because with PowerPlant I had the source code, and now I don't, so I can't see what each function is doing behind my back. :-) > 3. I went down a similar path once (having forgotten Aaron's sage advice) > when I needed to open large numbers of files in the background (not even > using NSWorkspace -- just using NSFileWrapper). Threaded, it was awful. > Beachballs-of-death everywhere. Using the threadless technique, it was > great -- and much more stable. And it automagically adapts to the user's > machine performance. Works just as smoothly on a 300mHz iBook as it does > on a G4. So, just so I understand, what you advise doing is something like this: // in the main code ... NSArray* files = [a whole bunch of files to process]; [self performSelector:@selector(processAFile:) withObject:files afterDelay: 0]; ... // process function -(void)processAFile:(NSArray*)myfiles { // Do something to the file, and then.... [self performSelector:@selector(processAFile:) withObject: myfiles afterDelay:0]; } So I basically process one file every time through the run loop? -- Mel Walker Software Engineer From tjw at omnigroup.com Thu Aug 8 11:31:03 2002 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:49:52 2005 Subject: Interrupt Latency In-Reply-To: Message-ID: The darwin-developers list is where almost all the kernel hackers live -- you can subscribe to this on lists.apple.com. -tim On Thursday, August 8, 2002, at 10:07 AM, Paul Nicholson wrote: > I connected a logic analyzer to the PCI INTA signal on a PCI SCSI card > to see what sort of interrupt latencies OS-X was delivering. The > analyzer showed that the interrupt line could be low for up to 20 ms > before it was serviced. > > Twenty ms is a rather long time. Of course, disk interrupts are > generally a lower priority item. I'm not sure how the MACH kernel > works. Is it possible to get faster interrupt response times by > establishing a higher priority for certain PCI devices? From iacas at mac.com Thu Aug 8 11:59:03 2002 From: iacas at mac.com (Erik J. Barzeski) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: <200208081810.g78IAwv08898@slowbro.omnigroup.com> Message-ID: I'm hoping that this can be the last post on this topic. It's not that I want the last word, but... It is off-topic. Email me off the list if you wish - I encourage it. On 8/8/02 2:10pm, "Smith, Bradley" wrote: > You see the problem? There's no point in putting a bunch of newbies in a > list and expecting them to figure everything out amongst themselves. They > need mentoring from people who *know* how things should be done. This decision was mine, and mine alone. I have absolutely no plans to stop "helping newbies" by moving to the Pro list only. In fact, I made a promise to myself to pay more attention to cocoa-dev than I have in the past few weeks. And CDC will continue to run, too... But anyway, the simple premise is this: "pro" questions are sometimes lost in the noise of this list and cocoa-dev. The pro list is simply geared towards having answers and questions at a higher level. Other than their (the "pro questions") removal from this list and cocoa-dev, there should be no effect. Please, continue to ask questions, and I'm sure you'll note that many people will continue to answer them. The pros have not all unsubscribed. I don't think any have. I haven't. Cocoa-Pro will probably be low-traffic, and is not designed in any way to compete or remove pros from this list or anything. > Saying that the pros will monitor the newbie list is not a valid argument by > the way. They can monitor the combined newbie / pro list right now. It's not working quite well enough. Again, many, many people have expressed ire in not getting a "good" question answered because it was lost in the noise of "how do I change the text in an NSTextView?" questions. Cocoa-Pro is, I hope, a place for those questions to not get lost in noise. > These > "good" questions that are being ignored aren't (again IMHO) being ignored > because of the "noise". They're being ignored because there's on one here > that can help, yet. If that's the truth, then the new list will fail, and I'm fine with it if that's the reason. However, if the people who've intimated to me that they fear the questions are lost because of the noise, then the list will serve its (small) intended purpose, I think. > If you put a bunch of propellerheads in a list and a > really, REALLY hard problem comes up you can bet your life they'll all want > to be the one to solve it first and show off their prowess. It's human > nature. Hmmmm, so? I'm not sure I get the point. > Brad the newbie Incidentally, "newbie" questions to me are ones that are easily answered by: A) a CDC tutorial, or one on Stepwise, or so on B) a google search C) TFM I'm pretty sure I asked a bunch of them when I was starting (though usually I asked a friend or two, not "the masses"). But if actual "advanced" real-world questions are getting lost, then I think it's valuable to give them a little sanctuary from the noise. We'll see what happens. If the list fails, well, I'll close it. I think Apple and Omni provide a wonderful service here with the two lists they run. I'm subscribed to both, an will continue to read both. I don't think anyone's leaving. ben wrote: > Splitting the list into newbie-pro versions will descourage new developers. How? > Don't any of you guys remember how it felt to be able to post a question > that a lot of good developers would be able to answer-- sparing you the > hours of research and headaches it would have taken you to find an easy > solution. I don't wish to restart the entire "RTFM" debate again, but my personal feeling is that if an answer is available through reasonable means (the three I listed above), then everyone should find the answer there first. A lot of programming is: A) trial and error B) reading the documentation C) learning how to find the answers to questions Too many people take the short, "easy" way out and simply waste the time of thousands of people when they could have found the answer themselves through reasonable means. > Back when you were all newbies. Now you have a way of thinking > that helps you find what you want in the documented parts of cocoa. But > newbies might first be confused with the documentation. They might. But I hardly see how starting a list to escape a bit of the noise helps or hinders newbies with this. > Now there's a danger this all will change. If you split the group into two > experienced developers may completely migrate to the pro-list I am 99% certain that this will not occur. Wasting time, as I admit I am doing, adding to the "noise" with posts like this, however, will not help. > and newbie > questions - however trivial they may seem - might not get answered because > developers who know the answers might not be checking the lists anymore. They will be checking the lists. Again, I don't think anyone's unsubscribed from anything. > Another thing - I did what Robert did as well - I subscribed for the pro > list. I might only be monitoring the list as I am afraid, that if I post a > question, the nerds moderating the list might just decide that my question > is too newbie-ish and remove me from the list. > What exactly is a pro, and what is a newbie question? There's a policy, which is quite amenable to change, at: http://www.cocoadevcentral.com/cocoa-pro.php My last post on this. I hope we can get back to answering questions, and asking questions, now...? -- Kindest regards, Erik J. Barzeski "Adults are obsolete children." - Dr. Seuss (1904-1991) ################################################################### Email: erik@(anything below) AIM: iacas http://iacas.org http://weims.net http://techstra.net http://barzeski.com http://cocoadevcentral.com http://soundsetcentral.com http://freshlysqueezedsoftware.com http://applescriptcentral.com ################################################################### From cjbehm at mac.com Thu Aug 8 12:04:00 2002 From: cjbehm at mac.com (Chris) Date: Thu Nov 3 14:49:52 2005 Subject: Exception handlers In-Reply-To: <44E5C321-AAA6-11D6-B6FD-0003935401DA@dataline.cz> Message-ID: [Note: the only bit of code I've seen of this is the fragment below so I could be missing something relevant in the code, but this should all still apply] Well, init's aren't supposed to return nil. AFAIK they are supposed to throw an exception if they fail. So if you put your NS_DURING handler around the relevant bit where init is being called FROM, then you'd know if it fails. Alternatively, add a simple method - (BOOL)isConnected that you call upon return (or a companion to the setInitialized in your code). Or if you _really_ want init to return nil add this: [self release]; self = nil; That will take care of releasing the alloc'ed memory and returning nil. Chris on 8/8/2002 4:10 AM, Robert Cerny at rcerny@dataline.cz wrote: > > Hi Matt, > ok, > I tried your solution but it doesn't work as expected. Of course, I got > rid off the error message about NS_VOIDRETURN but look what happens in > case of wrong server address. The socket waits for a timeout and than > it throws an exception. The error sheet is displayed and the init > method returns self in all cases so I'm not able to test if I'm > connected or not. Does it make a sense to you? I suppose i solve it > wrong way, don't I? > > Robert > > On Tuesday, Aug 6, 2002, at 19:36 Europe/Prague, Matt Watson wrote: > >> >> On Tuesday, August 6, 2002, at 07:28 AM, Robert Cerny wrote: >> >>> hi, I have a following method in my application: >>> >>> - (id)initWithServer:(NSString*)aServer port:(int)aPort >>> errorWindow:(NSWindow*)aWindow >>> { >>> if ([self init]) >>> { >>> [lock lock]; //NSLock >>> NS_DURING >>> [socket connectToHost:[NSHost hostWithNameOrAddress:aServer] >>> port:aPort]; >>> [self setInitialized:YES]; >>> >>> return self; >> >> You can't just return from within an NS_DURING/NS_HANDLER block. See: >> >> http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ >> ProgrammingTopics/Exceptions/Tasks/HandlingExceptions.html >> >> I'd suggest moving: >> >> return self; >> >> to be immediately after: >> >> [lock unlock]; >> >> matt. >> > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From iacas at mac.com Thu Aug 8 12:13:36 2002 From: iacas at mac.com (Erik J. Barzeski) Date: Thu Nov 3 14:49:52 2005 Subject: NSComboBox - simple example? In-Reply-To: <200208081810.g78IAwv08898@slowbro.omnigroup.com> Message-ID: Hi, On 8/8/02 2:10pm, Sal?nki Benj?min wrote: > Hi! > > Does anyone have a basic example for NSComboBox usage to share with me? > I want to use an NSMutableArray as the data source. > > Thanks. > > Ben I sent an "example" to you off-list. This question, easily answered by "TFM," simply involves about two whopping methods: // Combo Box Data Source Methods (a whopping two of them) - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox { return [myArray count]; } - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index { return [[myArray objectAtIndex:index] objectForKey:@"wheee"]; } Of course, the above uses an array of dictionaries. -- Kindest regards, Erik J. Barzeski "Adults are obsolete children." - Dr. Seuss (1904-1991) ################################################################### Email: erik@(anything below) AIM: iacas http://iacas.org http://weims.net http://techstra.net http://barzeski.com http://cocoadevcentral.com http://soundsetcentral.com http://freshlysqueezedsoftware.com http://applescriptcentral.com ################################################################### From cjbehm at mac.com Thu Aug 8 12:17:26 2002 From: cjbehm at mac.com (Chris) Date: Thu Nov 3 14:49:52 2005 Subject: PDO: can't connect to remote host In-Reply-To: Message-ID: Well, this all depends ;) If you need to connect to remote machines (be it over the 'net or just a LAN), I _think_ you need to go through some extra steps. I believe there's an example over at ADC that does exactly this. Also, its been mentioned a couple times on the list so a search should turn it up. Chris on 8/7/2002 7:59 PM, Andrew Zamler-Carhart at andrew@zamler-carhart.com wrote: > Dear List, > > I've built a little app to figure out Portable Distributable Objects. > Basically, my app just shares a common "model" object to synchronize > state between multiple copies of itself. For example, if you drag a > slider in one app the equivalent sliders move (in real time) in all > running copies of the app. Pretty cool stuff, and all it takes is four > lines of code! :-) > > But I can't get it to work over a network. Here's where the problem is > occuring: > > NSConnection *remoteConnection = > [NSConnection connectionWithRegisteredName: serverName > host: hostName]; > > If I set hostName to nil, the above method returns a valid NSConnection > and everything works great. If I set hostname to the IP name or IP > address of either of my two computers, or even "localhost," it returns > nil. > > The documentation says: > >> hostName is an Internet domain name (for example, "sales.anycorp.com"). >> If hostName is nil or empty then only the local host is searched for >> the named NSConnection. > > That seems pretty straightforward. Any ideas? > > Thanks, > Andrew > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From andrew at zamler-carhart.com Thu Aug 8 14:41:02 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:52 2005 Subject: PDO: can't unregister name from port name server In-Reply-To: Message-ID: <791D4F14-AB17-11D6-B560-000A277A6C34@zamler-carhart.com> Dear List, Thanks for helping me clean up my PDO code -- it works well now that I'm specifying the TCP/IP port to use. **Contrary** to the examples on ADC, just supplying a hostname is not sufficient. According to John H?rnkvist, > To make a long story short, changes in the kernel made the old > broadcast mechanism break, and Apple decided not to reimplement it... > The documentation is stale. I won't speculate on why Apple hasn't > updated it. (http://www.omnigroup.com/mailman/archive/macosx- dev/2001-November/021503.html) My current problem is that if I run my server, quit it, and run it again, calling [connection registerName: serverName] fails and returns NO. If I increment serverName ("server1", "server2", etc.) my server runs and clients can connect over TCP/IP just fine. This is the expected behavior if my server name is in use, but: - I am calling [connection registerName: nil] whenever I disconnect or quit my program, so the server name should be released. - [nameServer portForName: serverName] always returns nil -- no matter what, even if clients can connect to my server using that name. Perhaps this is a problem? - before I try to register a name, I call [nameServer removePortForName: serverName] (where nameServer is the systemDefaultPortNameServer), but it still fails. Also, whenever I register a server name that I haven't used before, the Console displays the following error: myhost mach_init[2]: couldn't add notification for server3: (os/kern) invalid argument myhost mach_init[2]: Unexpected notification: 71 Restarting the computer resets the registered name server, and then I can start again (using each name no more than once). Can someone help straighten me out? Thanks, Andrew On Thursday, August 8, 2002, at 12:01 PM, Chris wrote: > Well, this all depends ;) If you need to connect to remote machines (be > it > over the 'net or just a LAN), I _think_ you need to go through some > extra > steps. I believe there's an example over at ADC that does exactly this. > Also, its been mentioned a couple times on the list so a search should > turn > it up. > > Chris > > on 8/7/2002 7:59 PM, Andrew Zamler-Carhart at andrew@zamler-carhart.com > wrote: > >> Dear List, >> >> I've built a little app to figure out Portable Distributable Objects. >> Basically, my app just shares a common "model" object to synchronize >> state between multiple copies of itself. For example, if you drag a >> slider in one app the equivalent sliders move (in real time) in all >> running copies of the app. Pretty cool stuff, and all it takes is four >> lines of code! :-) >> >> But I can't get it to work over a network. Here's where the problem is >> occuring: >> >> NSConnection *remoteConnection = >> [NSConnection connectionWithRegisteredName: serverName >> host: hostName]; >> >> If I set hostName to nil, the above method returns a valid NSConnection >> and everything works great. If I set hostname to the IP name or IP >> address of either of my two computers, or even "localhost," it returns >> nil. >> >> The documentation says: >> >>> hostName is an Internet domain name (for example, >>> "sales.anycorp.com"). >>> If hostName is nil or empty then only the local host is searched for >>> the named NSConnection. >> >> That seems pretty straightforward. Any ideas? >> >> Thanks, >> Andrew >> >> _______________________________________________ >> 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 appsmore at theboss.net Thu Aug 8 20:06:06 2002 From: appsmore at theboss.net (Donald S. Hall) Date: Thu Nov 3 14:49:52 2005 Subject: NSComboBox - simple example? Message-ID: See the Simple ComboBox example in the sample code that comes with the developer tools. Don -- Donald S. Hall, Ph.D. Apps & More Software Design, Inc. http://www.theboss.net/appsmore appsmore@theboss.net From btr5290 at vmsmail.rit.edu Thu Aug 8 20:21:03 2002 From: btr5290 at vmsmail.rit.edu (Brandon Regard) Date: Thu Nov 3 14:49:52 2005 Subject: FTPClient Beta Released - Please test Message-ID: <1028854445.3d5312ad15719@webmail.rit.edu> Hi All, I'm getting ready to release my first Cocoa application. Its a freeware FTP client. If you are interested could you please test it for bugs and get back to me. I'd appreciate any help I can get testing. Also does anyone know a good place to post freeware? (not Open Source but still free). You can download at: http://masterblaster.bsd.st/FTPClient.dmg.sit.hqx Respectfully, Brandon Regard btr5290@rit.edu From djw_lists at pacbell.net Thu Aug 8 20:57:02 2002 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:49:52 2005 Subject: Unicode for modifier characters In-Reply-To: <8411C593-AAD6-11D6-BB86-0003933E9212@mac.com> Message-ID: I found this pointed to in the cocoa.mamasam.com archives: http://web.sabi.net/mockups/source/keychars.html On Thursday, August 8, 2002, at 06:55 AM, Joe Esch wrote: > When you assign a key equivalent to a menu item, Cocoa displays the > key equivalent on the menu using special characters for the modifier > keys. I would like to be able to do the same thing to show a key > equivalent on the tooltip of a button on a tool palette. I assume > that there must be some Unicode characters that represent the symbols > for the modifier keys, but I haven't been able to find them anywhere. > Can anyone tell me where to find this? > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > -- Dan Wood Karelia Software, LLC dwood@karelia.com http://www.karelia.com/ Watson for Mac OS X: http://www.karelia.com/watson/ From dave at difference.com.au Thu Aug 8 21:25:03 2002 From: dave at difference.com.au (David Cake) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List (and its problems with australians?) In-Reply-To: References: Message-ID: When I tried to confirm my subscription I got REJECT Mail is not accepted from your country Apparently, no Australian Cocoa Pros. Cheers David From dgomez at dkgomez.com Thu Aug 8 21:56:01 2002 From: dgomez at dkgomez.com (Dave Gomez) Date: Thu Nov 3 14:49:52 2005 Subject: FTPClient Beta Released - Please test In-Reply-To: <1028854445.3d5312ad15719@webmail.rit.edu> Message-ID: Brandon, 2 more notes, saving info for multiple accounts would be cool, and sadly the program hung for an excessive amount of time on quitting, had to force quit after about waiting a minute. Dg On 8/8/02 5:54 PM, "Brandon Regard" wrote: > Hi All, > > I'm getting ready to release my first Cocoa application. Its a freeware FTP > client. If you are interested could you please test it for bugs and get back > to me. I'd appreciate any help I can get testing. Also does anyone know a > good place to post freeware? (not Open Source but still free). > > You can download at: http://masterblaster.bsd.st/FTPClient.dmg.sit.hqx > > Respectfully, > > Brandon Regard > btr5290@rit.edu > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From ssen at apple.com Fri Aug 9 00:45:03 2002 From: ssen at apple.com (Shantonu Sen) Date: Thu Nov 3 14:49:52 2005 Subject: Source for libcurl binary? In-Reply-To: Message-ID: Check out the 'curl' project from Darwin Open Source CVS. The curl-5 tag corresponds to Mac OS X 10.2, and curl-1-1 for 10.1 Shantonu On Mon, 5 Aug 2002, it was written: > I would like to include libcurl in a project, and was wondering if there > is a source for the library already compiled for Mac OS X. I know that > curl is already included, but cannot find libcurl. I would like to avoid > having to build it myself, if possible. > > I found binaries for other platforms, but not Mac OS X. > > Thanks in advance. > > David Linker > > From individual at mi-mail.cl Fri Aug 9 01:02:02 2002 From: individual at mi-mail.cl (Individual . .) Date: Thu Nov 3 14:49:52 2005 Subject: New to the list, and need some clarifying info. Message-ID: <3B123018-AB6E-11D6-A666-003065DCDA98@mi-mail.cl> Hello. I have joined this list in hope of finding hints and help with my very basic amateur programming. I understand that some lists are very focused on a subject, or rather, some *people* on some lists are very focused on a subject and dislike any tangential questions or discussion. If this list is for advanced programmers who took on a part time job cleaning out stables and sold their grandmother to pay for their formal programming course, then tell me now, and I'll unsubscribe. If this list concerns itself only with things unique to OS X and looks down upon programming questions about things that other, non-mac users (gasp!) people deal with frequently, then tell me now, and I'll unsubscribe. Most probably I will only ask a question and request to be answered off-list. The questions will probably be basic and sporadic. I would probably not have to ask these basic questions if I had studied programming formally, but I'm self taught and my level is very basic. *** Here is my first question. I am trying to write a simple c++ class that will serve as a sort of "front-end" for libpng. I would ultimately use it as a plotting function, that plots to a png file instead of to screen. I already made one that works with PPM files (and I'm quite proud of that, simple though it is). I have read and re-read the libpng documentation, but (and this may be a misguided opinion) I find it is quite lousy, and have not been able to progress very far (read: at all). If anyone on this list would be willing to reply to me off list and give me some tips and pointers about the most simple, basic use of libpng, I would greatly appreciate it. If you are bothered by this post, then please take my honest advice and disregard it: you will do the list a better service by ignoring me! Thanks, and hoping for the best, Paul From rcerny at dataline.cz Fri Aug 9 01:39:02 2002 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:49:52 2005 Subject: Living with NSApp delegate Message-ID: <534A24EA-AB73-11D6-8042-0003935401DA@dataline.cz> Hi, I have a question with I hope has a very simple answer. I often use functions like [[NSApp delegate] doSomething] whitch leads to compiler warnings like: cannot find class (factory) method. Is there a way to disable/get rid off it? Thanks Robert From stupidfish23 at mac.com Fri Aug 9 02:49:02 2002 From: stupidfish23 at mac.com (ben) Date: Thu Nov 3 14:49:52 2005 Subject: changing the button style of an NSComboBox Message-ID: Hi everyone. I was just wondering.. Is there a way to change the button style of the button of an NSComboBox? I can change the attributes of its NSTextField cell part, but not the button. Any ideas? Ben From dave at difference.com.au Fri Aug 9 02:55:01 2002 From: dave at difference.com.au (David Cake) Date: Thu Nov 3 14:49:52 2005 Subject: New to the list, and need some clarifying info. In-Reply-To: <3B123018-AB6E-11D6-A666-003065DCDA98@mi-mail.cl> References: <3B123018-AB6E-11D6-A666-003065DCDA98@mi-mail.cl> Message-ID: At 4:01 AM -0400 9/8/02, Individual . . scribbled: >Hello. > >I have joined this list in hope of finding hints and help with my >very basic amateur programming. Probably not the best place. >If this list is for advanced programmers who took on a part time job >cleaning out stables and sold their grandmother to pay for their >formal programming course, then tell me now, and I'll unsubscribe. No, the list isn't for advanced programmers. >If this list concerns itself only with things unique to OS X and >looks down upon programming questions about things that other, >non-mac users (gasp!) people deal with frequently, then tell me now, >and I'll unsubscribe. It is, however, pretty much focused on Mac OS X. If you ask questions that have nothing to do with Mac OS X here, they may be answered - but this definitely isn't the best place to ask them, and the answers you get may not always be useful to you. Cheers David From njriley at uiuc.edu Fri Aug 9 02:56:03 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:49:52 2005 Subject: changing the button style of an NSComboBox In-Reply-To: References: Message-ID: <20020809095551.GC2648424@uiuc.edu> On Fri, Aug 09, 2002 at 11:48:28AM +0200, ben wrote: > I was just wondering.. Is there a way to change the button style of the > button of an NSComboBox? I can change the attributes of its NSTextField cell > part, but not the button. Because the down-arrow control isn't a button. Try using a text field and separate popup button next to it. There's plenty of precedent for that style of use (e.g. in Carbon apps which have no combo box control at all pre-Jaguar). -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From iacas at mac.com Fri Aug 9 07:06:38 2002 From: iacas at mac.com (Erik J. Barzeski) Date: Thu Nov 3 14:49:52 2005 Subject: FTPClient Beta Released - Please test In-Reply-To: <200208090957.g799vSv27944@slowbro.omnigroup.com> Message-ID: Hi, On 8/9/02 5:57am, Brandon Regard wrote: > You can download at: http://masterblaster.bsd.st/FTPClient.dmg.sit.hqx Perhaps you have a good reason... But why did you do that? Specifically, the ".sit.hqx" part? Why do either? -- Kindest regards, Erik J. Barzeski There are two great secrets to success in life. The first is to not tell everything you know. ################################################################### Email: erik@(anything below) AIM: iacas http://iacas.org http://weims.net http://techstra.net http://barzeski.com http://cocoadevcentral.com http://soundsetcentral.com http://freshlysqueezedsoftware.com http://applescriptcentral.com ################################################################### From marco at sente.ch Fri Aug 9 07:32:25 2002 From: marco at sente.ch (Marco Scheurer) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: Message-ID: <5864F274-ABA3-11D6-AC46-003065F99092@sente.ch> On Thursday, August 8, 2002, at 08:51 pm, Erik J. Barzeski wrote: > On 8/8/02 2:10pm, "Smith, Bradley" wrote: >> You see the problem? There's no point in putting a bunch of newbies >> in a >> list and expecting them to figure everything out amongst themselves. >> They >> need mentoring from people who *know* how things should be done. > > This decision was mine, and mine alone. > > I have absolutely no plans to stop "helping newbies" by moving to the > Pro > list only. In fact, I made a promise to myself to pay more attention to > cocoa-dev than I have in the past few weeks. And CDC will continue to > run, > too... What a relief! I'm sure that everybody is glad to know that this list and cocoa-dev will still be blessed with help from the judge(1) of what is worth asking on the "higher-level cocoa professionals" mailing list. (1) Who a year and a half ago was writing: > I'm a newbie - newbies can't "help" with the thing because they _want_ > the help, they don't _want_ to have to provide it, and they can't. http://www.omnigroup.com/mailman/archive/macosx- dev/2001-February/009487.html Thanks! Marco Scheurer Sen:te, Lausanne, Switzerland http://www.sente.ch From mike at marketocracy.com Fri Aug 9 08:28:35 2002 From: mike at marketocracy.com (Mike Laster) Date: Thu Nov 3 14:49:52 2005 Subject: threadworker In-Reply-To: <4DAB0D18-A96C-11D6-9A55-0003937C1CAC@macdev.itg.ti.com> Message-ID: On 8/6/02 2:42 PM, "Olivier Destrebecq" wrote: > i use thread worker to create a thread in my program. > > The problem that i have is that apparently the runloop that is created > by thread worker never ends. > > I pin pointed the problem to the fact that the task that i want to > perform in my thread is sending an appleevent and waiting for the > answer. then when the answer comes back (supposedly with an image) i > display the image in a window, using the endselector provided by > Threadworker. > > Can anybody points me to a way of stop the run loop once it has done its > job. As far as I can tell, there is no way other than explicitly doing it by managing the loop yourself like: - (void) run { NSRunLoop *rl = [NSRunLoop currentRunLoop]; NSDate *distantFuture = [NSDate distantFuture]; BOOL isRunning = YES; do { isRunning = [rl runMode:NSDefaultRunLoopMode beforeDate:distantFuture]; } while ( endRunLoop == NO && isRunning == YES); } Then if you set endRunLoop = YES in any of your callouts, then the run loop should terminate as soon as your callout completes. From iacas at mac.com Fri Aug 9 08:44:02 2002 From: iacas at mac.com (Erik J. Barzeski) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List In-Reply-To: <5864F274-ABA3-11D6-AC46-003065F99092@sente.ch> Message-ID: Hi, On 8/9/02 10:21am, "Marco Scheurer" wrote: > I'm sure that everybody is glad to know that this list and cocoa-dev > will still be blessed with help from the judge(1) of what is worth > asking on the "higher-level cocoa professionals" mailing list. > > (1) Who a year and a half ago was writing: > >> I'm a newbie - newbies can't "help" with the thing because they _want_ >> the help, they don't _want_ to have to provide it, and they can't. > > http://www.omnigroup.com/mailman/archive/macosx- > dev/2001-February/009487.html > > Thanks! Amazing what one can learn in a year and a half when they put their mind to it, isn't it? But hey, if anyone wants to go read the full context of the thread, instead of taking your very oddly chosen quote out of context, they are of course more than welcome to do so. That article is from a thread discussing the viability of Stepwise as a newbie resource: something I still believe it fails to do aside from a few articles. Cocoa Dev Central (.com) was created to help fill that hole. The simple truth is that I have progressed beyond the "newbie" (for Cocoa anyway) level at which I sat last February, and find the noise on cocoa-dev to be overwhelming. Many others agree, hence, the new list was begun as an experiment to see if such noise could be escaped for "higher level" questions and answers. It is not merely I who "judge" the list - but I do value my time, and I do value having a place in which a good question doesn't have to compete with "how do I make save my document?" type questions. Others do as well. If it were just me, I'd solve the problem for myself. As it was well over 20 people with whom I've spoken, I created a solution. It may fail, it may work. We shall see. So, what was your point again...? -- Best wishes, Erik J. Barzeski I don't have any regrets, just intelligent observations. ################################################################### Email: erik@(anything below) AIM: iacas http://iacas.org http://weims.net http://techstra.net http://barzeski.com http://cocoadevcentral.com http://soundsetcentral.com http://freshlysqueezedsoftware.com http://applescriptcentral.com ################################################################### From gadgetdon at mac.com Fri Aug 9 08:52:11 2002 From: gadgetdon at mac.com (Donald Brown) Date: Thu Nov 3 14:49:52 2005 Subject: NSRulerView and NSTextView problems Message-ID: I'm trying to implement a ruler in an NSTextView, and I'm having problems. Based on the documentation, and reading the TextEdit example, it looks like all I need to do is call [myTextView setUsesRuler:YES]; [myTextView setRulerVisible:YES]; The ruler does indeed appear, complete with tab stops and such. But when I click on a tab stop to move it, my cursor disappears, I don't get a tooltip giving the current location, I don't get a line going down myTextView to show the position. Is there some special programming necessary to support this? Donald -- Donald Brown gadgetdon@mac.com http://www.eamontales.com We have met the enemy and he is us - Pogo From jwnestor at earthlink.net Fri Aug 9 09:00:02 2002 From: jwnestor at earthlink.net (John Nestor) Date: Thu Nov 3 14:49:52 2005 Subject: Living with NSApp delegate References: <534A24EA-AB73-11D6-8042-0003935401DA@dataline.cz> Message-ID: <3D53E4DD.9030004@earthlink.net> I found that I had to be very careful to import all the required headers into the delegate class. So far this has silenced the warnings for me. Robert Cerny wrote: > Hi, > I have a question with I hope has a very simple answer. I often use > functions like > [[NSApp delegate] doSomething] > whitch leads to compiler warnings like: cannot find class (factory) > method. Is there a way to disable/get rid off it? > > Thanks > Robert > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From andrew at zamler-carhart.com Fri Aug 9 10:10:56 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:52 2005 Subject: Hide/show control Message-ID: Dear list, I don't know what it's called, but do you know that square control with the up/down arrow that expands/contracts save panels and address book (10.1) windows? Is that a standard control that we can incorporate into our programs? What's it called? I don't see it on any Interface Builder palette. I would hate to have to hack one together on my own if it already exists somewhere else. I tried opening the relevant nib file from Address Book, but it won't open in IB: /Applications/Address Book.app/Contents/Resources/English.lproj/PersonEditor.nib/ Are nibs in system apps engineered so that you can't open them? If so, is there a workaround for that? Thanks, Andrew From nathan_day at mac.com Fri Aug 9 11:03:56 2002 From: nathan_day at mac.com (Nathan Day) Date: Thu Nov 3 14:49:52 2005 Subject: NSWorkspace for opening files: wrong? right -- untested suggestion In-Reply-To: <41DDEA1F-AAEF-11D6-A05E-000393171F58@mac.com> Message-ID: <0D2AAD31-ABC0-11D6-9262-0050E4E0EE30@mac.com> Launch Services has a function which will let you pass a NSArray of NSURLs to open, on my .mac site I have a wrapper for Launch Services if you don't want to mess around with carbon. http://homepage.mac.com/nathan_day/ On Friday, August 9, 2002, at 02:22 AM, Mel Walker wrote: > On Thursday, August 8, 2002, at 10:39 AM, Kirk Kerekes wrote: >> >>> I was hoping for a "true" Cocoa way of >>> doing things, but I guess I'm out of luck. >>> >>> What I need is a "-(BOOL)openFiles:withApplication:" method somewhere >>> to >>> handle this. >> >> For a more "pure cocoa" approach, consider creating a "file list >> opener" object, whose +convenience method ( [MWFileListOpener >> openerWithFiles:(NSArray *) files], perhaps) takes an NSArray of >> filepaths, >> and stores it _and_ a freshly-minted NSEnumerator for that array in >> its ivs. Then you invoke its other method: >> >> - (void) openAFile:(id) ignored >> >> Inside that method, you grab a filepath from the enumerator, and open >> it with NSWorkspace as usual. Then you invoke: >> >> [self performSelector:@selector(openAFile:) withObject:self >> afterDelay:0] >> ; >> >> --Which will cause openAFile: to be re-executed at the beginning of >> the _next_ event loop. By thus scheduling the file opens at 1/per >> event-loop pass, you will likely avoid whatever problem NSWorkspace >> has with bulk file-opens.[...] > > This is similar to what I did, without the custom class -- If the file > can' > t open, I do the performSelector:withObject:afterDelay:0 to call this > function: > > -(void)delayedOpenFile:(NSString*)fullPath > { > int numTimesWaited = 0; > while([[NSWorkspace sharedWorkspace] openFile:fullPath] == NO) > { > [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]; > if(++numTimesWaited > 20) break; > } > } > > This seems to work just fine, and doesn't have any user-noticeable > delays while opening the documents. Out of a whole list of files, only > a very few even need this function, so I'm cluttering up the run loop > or anything (I don't even know if that's important to consider, but > it's moot anyway). > > Anyway, it works, that's all I wanted it to do. But, NSWorkspace still > needs a plural version of openFile, IMHO. > > -- > Mel Walker > Software Engineer > Nathan Day http://homepage.mac.com/nathan_day/ From michael_mccracken at mac.com Fri Aug 9 15:31:01 2002 From: michael_mccracken at mac.com (Michael McCracken) Date: Thu Nov 3 14:49:52 2005 Subject: any open source apps willing to be searchable? Message-ID: Hi again. A while back I suggested an idea for a website that would provide a search interface to the code base of various open source apps. I thought it'd be a great idea to be able to search and browse source code from one web interface. I didn't get any bites, though, so I decided to see how hard it'd be. I've discovered that using htdig, it isn't too hard to index the code, and present a search interface that works about as expected... I'm curious if anyone who's writing open-source (doesn't have to be any particular license, just as long as you don't mind people looking at the source) would be willing to let their projects be indexed and listed? If so, contact me off-list and I'll get a list together - I have a machine available to host such a site for a while (as long as it doesn't get huge, which seems unlikely considering the lack of interest previously) If anyone has comments about the idea, let's discuss on-list. I'm curious why no one replied earlier - do people think it wouldn't be useful? What does everyone else do when they want to look for code examples, just open all the PB projects you've downloaded and use batch find? -mike -- Michael McCracken mmc@acm.org From marco at sente.ch Fri Aug 9 15:35:28 2002 From: marco at sente.ch (Marco Scheurer) Date: Thu Nov 3 14:49:52 2005 Subject: OT, Apology (was Re: Cocoa-Pro List) Message-ID: <7549E330-ABE6-11D6-883E-003065F99092@sente.ch> I'm replying to the list because I did, but no further response on this topic will come from me... I wrote: > What a relief! > > I'm sure that everybody is glad to know that this list and cocoa-dev > will still be blessed with help from the judge(1) of what is worth > asking on the "higher-level cocoa professionals" mailing list. > > (1) Who a year and a half ago was writing: > > > I'm a newbie - newbies can't "help" with the thing because they _want_ > > the help, they don't _want_ to have to provide it, and they can't. I'm sorry I wasted bandwith and your time on this list with a personal attack on Erik Barzeski. In the future, despite the tons of supportive emails I've received, I shall resist the temptation of easy irony. Apologies to Erik and the list. "To knock a thing down, especially if it is cocked at an arrogant angle, is a deep delight of the blood." - George Santayana (1863 - 1952) Marco Scheurer Sen:te, Lausanne, Switzerland http://www.sente.ch From keybounce at mac.com Fri Aug 9 15:37:22 2002 From: keybounce at mac.com (Michael Gersten) Date: Thu Nov 3 14:49:52 2005 Subject: Cocoa-Pro List References: Message-ID: <3D52EDCE.F0EAACCA@mac.com> As someone who isn't a cocoa God, here's my two cents: > > whats more, that makes three lists now, Omni's list, Apple's official > > list, and now this third alternative. Lets not forget the EOF (very low traffic) and WOF (not so low traffic) lists as well > > in many cases, it makes it necessary to monitor all three, and > > cross-posts/repeated posts will happen. > > Perhaps they will. But I hardly think there's much effort involved in > subscribing and then reading email. Are you actually able to read even both Cocoa-dev and Mac-dev? That's more traffic than I can handle while at work. Even out of work, looking for a job, those two, plus EOF and WOF-dev, plus my job search are more than I can handle. Will there be much more traffic with another list? I don't know. It probably won't be that much more. Will it be easier to find good answers? Maybe. If the idea is really to stop the newbie "How do I do this" repeat questions, then maybe we just need a FAQ document for newbies to read. > If mailman supports the ability to block > cross-posts and it becomes a problem, I'll block cross-posted messages. Like this one was cross posted? What if a question starts as a non-cocoa mac question, and then through its answers becomes cocoa related? Can it never be cross posted at that point? What if a topic was started on the Apple Cocoa-dev list, and, after frustration with the Apple archive system, the main person responsible for that thead both A: switches to the Omni list because the archives are easier to work with, and deserve support, B: switches to the Omni list because of problems with the Apple moderation system (messages over the size limit never being posted nor bounced back to the sender), C: Comes up with a significant improvement on what they had previously come up with? Such a person might want to switch the topic to the better list, and also make sure that anyone that can only read one list, and has choosen Apple's, and that saw the first round still see's the second round. > Furthermore, most cross-posts are from newbies, I think, and I don't suspect > it should be much of a problem. Hmm... I'll start tracking that. Since I get cross-posts twice into the same mailbox (filter rules), and I see a lot of cross postings, I'll see if I get any sense of beginner/pro from the cross posts. > Home is where you hang your @ Newbie, home is where you hang your ! and %. (:-) -- I am a Mac OS X-Cocoa/WOF/EOF developer, and I'm available for hire. Please contact me at michael-job @ stb.nccom.com if interested. Resume at http://resumes.dice.com/keybounce From laurent.souef at free.fr Fri Aug 9 15:55:58 2002 From: laurent.souef at free.fr (Laurent Souef) Date: Thu Nov 3 14:49:52 2005 Subject: Simple Memory Allocation question Message-ID: <66C192AC-ABCD-11D6-9687-00039340BCDA@free.fr> Hi, When creating a new sub-class of NSObject (having a text string for instance). I override the init method this way. - (id) init { [super init]; text = [[NSMutableString alloc] init]; return self; } Should I override the dealloc function ? like this ? - (void) dealloc { [text release]; [super dealloc]; } Just to help me to feel more confident with my objects ... Thanks, Laurent. Laurent SOUEF 3 Hameau des Chaumettes 83440 Montauroux France Tel : (33) 4 94 39 88 69 From jalon at mac.com Fri Aug 9 16:11:11 2002 From: jalon at mac.com (Julien Jalon) Date: Thu Nov 3 14:49:52 2005 Subject: Simple Memory Allocation question In-Reply-To: <66C192AC-ABCD-11D6-9687-00039340BCDA@free.fr> Message-ID: <405132BA-ABED-11D6-BE31-0003937541FE@mac.com> Le vendredi 9 ao?t 2002, ? 09:22 , Laurent Souef a ?crit : > Hi, > > When creating a new sub-class of NSObject (having a text string for > instance). > I override the init method this way. > > - (id) init > { > [super init]; > text = [[NSMutableString alloc] init]; > return self; > } > First: don't try to subclass NSString that way. It's just a little advice: NSString and NSArray are class clusters and init like in [[NSString alloc] init] change the "self" from alloc to an other more appropriate private class instance. But you don't have to worry if you subclass "normal" classes. > Should I override the dealloc function ? like this ? > > - (void) dealloc > { > [text release]; > [super dealloc]; > } > Exactly: "text = [[NSMutable alloc] init]" means that your object "owns" the text object so it is its responsability to release it when it does not need it any more. -- Julien Jalon From gss+osxdev at cs.brown.edu Fri Aug 9 16:12:11 2002 From: gss+osxdev at cs.brown.edu (Gregory Seidman) Date: Thu Nov 3 14:49:52 2005 Subject: any open source apps willing to be searchable? In-Reply-To: References: Message-ID: <20020809231143.GA26327@cs.brown.edu> Michael McCracken sez: } A while back I suggested an idea for a website that would provide a } search interface to the code base of various open source apps. I thought } it'd be a great idea to be able to search and browse source code from } one web interface. Sounds great. } I didn't get any bites, though, so I decided to see how hard it'd be. } I've discovered that using htdig, it isn't too hard to index the code, } and present a search interface that works about as expected... Also good. } I'm curious if anyone who's writing open-source (doesn't have to be any } particular license, just as long as you don't mind people looking at the } source) would be willing to let their projects be indexed and listed? If it's open source, you can do whatever you want with it including indexing and listing. Go ahead and do it. If someone is unhappy with what you've done then they can contact you (and you should make it easy to do so). } If so, contact me off-list and I'll get a list together - I have a } machine available to host such a site for a while (as long as it doesn't } get huge, which seems unlikely considering the lack of interest } previously) I am involved in two open source MacOS X projects. I'm not going to submit either one by email, because I am lazy. Most people are lazy. Build something with whatever resources/projects you've found, then announce it and provide a web interface to submit other stuff. People are much more likely to submit information if they see something in which they want to be included, rather than something speculative that does not yet exist. } If anyone has comments about the idea, let's discuss on-list. I'm } curious why no one replied earlier - do people think it wouldn't be } useful? Sure, it would be useful. Do it, please. just don't expect the initial gruntwork to be done by us lazy developers. Find some high-profile projects, get a site together, then announce it. The open source way is to release *early* and often. } What does everyone else do when they want to look for code examples, } just open all the PB projects you've downloaded and use batch find? Or do my own searching on the net. Or dig through mailing list archives (either the gems that I have saved on my own account or the entire archive on the web). Or dig around Apple's site. Or ask a question on this list. Please, give me another resource and I'll be delighted. Incidentally, here are some attributes I think such an index needs to be able to search/filter by (which means there should be no write-in choice): 1. license; BSD, GPL, QPL, MPL, etc. 2. language; C, C++, Obj-C, Java, AppleScript, etc. 3. frameworks; Carbon, Cocoa, etc. 4. type; app, prefpane, dylib, framework, kext, etc. 5. LOC; probably ranges 6. intended platform; OSX 10.0, 10.1, 10.2, Darwin 5.x, 6.x, etc. Note that for any of these it may make sense to allow multiple values, e.g. a project composed of an app and a prefpane or a kext that works on all known OSX and Darwin versions. } -mike --Greg From djw_lists at pacbell.net Fri Aug 9 17:14:04 2002 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:49:52 2005 Subject: Hide/show control In-Reply-To: Message-ID: I don't think that it is standardized in HI guidelines (look at the variety of styles of them in Apple's applications) and there isn't a HI standard for them IIRC. One approach, that I just used, was to make a simple toggle button, with the title unicoe character U+25b6 and the alternate title U+25BC. From code, I changed that to a dark gray color. You could put that into a square or round button, possibly. Another approach is to make a custom bitmap, possibly in combination with Aquatint to give you the nice look. Dan On Friday, August 9, 2002, at 10:03 AM, Andrew Zamler-Carhart wrote: > Dear list, > > I don't know what it's called, but do you know that square control > with the up/down arrow that expands/contracts save panels and address > book (10.1) windows? Is that a standard control that we can > incorporate into our programs? What's it called? I don't see it on any > Interface Builder palette. I would hate to have to hack one together > on my own if it already exists somewhere else. > > I tried opening the relevant nib file from Address Book, but it won't > open in IB: > > /Applications/Address > Book.app/Contents/Resources/English.lproj/PersonEditor.nib/ > > Are nibs in system apps engineered so that you can't open them? If so, > is there a workaround for that? > > Thanks, > Andrew > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > -- Dan Wood Karelia Software, LLC dwood@karelia.com http://www.karelia.com/ Watson for Mac OS X: http://www.karelia.com/watson/ From jalon at mac.com Fri Aug 9 17:39:15 2002 From: jalon at mac.com (Julien Jalon) Date: Thu Nov 3 14:49:52 2005 Subject: any open source apps willing to be searchable? In-Reply-To: <20020809231143.GA26327@cs.brown.edu> Message-ID: <0843829B-ABF9-11D6-BE31-0003937541FE@mac.com> Le samedi 10 ao?t 2002, ? 01:11 , Gregory Seidman a ?crit : > } I'm curious if anyone who's writing open-source (doesn't have to be > any > } particular license, just as long as you don't mind people looking at > the > } source) would be willing to let their projects be indexed and listed? > > If it's open source, you can do whatever you want with it including > indexing and listing. Go ahead and do it. If someone is unhappy with > what > you've done then they can contact you (and you should make it easy to do > so). > Hm... that's not a very cool attitude. I think that project is a very good idea but I think you'll have to contact developpers first or make the developper submit their project some way. > } If anyone has comments about the idea, let's discuss on-list. I'm > } curious why no one replied earlier - do people think it wouldn't be > } useful? > > Sure, it would be useful. Do it, please. just don't expect the initial > gruntwork to be done by us lazy developers. Find some high-profile > projects, get a site together, then announce it. The open source way is > to > release *early* and often. > You're perfectly right... and I think I may have the (I hope) "perfect tool" for that: it's open-source, totally dedicated at "collaborative" "content" management and works with OS X. I was personnaly thinking of doing something like this for my personal projects (e.g.: DNSUpdate). But I have not many time to work on it because... I'm working developping this tool. Its name is "Nuxeo CPS" as "Collaborative Portal Server" and can be easily adapted to any type of content management. We're developping this project for many corporations and administrations, here in France and in Belgium. It's based on Zope (and CMF). The public release for this tool is fixed to early september and is only in French for now (because our main testers are French speaking people) but will be fully localized in English for this release (in fact it will support localization almost as Cocoa apps do :-). If some people are interested, we can try to start a project based on Nuxeo CPS. Essentially, we will have to: 1/ clearly defines document types (one tarball with metadatas (licence and co) can be a example of a document, but you can have FAQs, News, whatever you want), we are also developping a classic forum from which you can extract threads to turn them into published documents. 2/ do all the graphics (it is very easy to completly change the look and even the feel of the application). 3/ get a server with a good connexion to put our Nux CPS on it. There is currently no english documentation for Nux CPS but if some people are interested, I can provide additional help on this one. And if you're not afraid of French, I can help you try our current demo. For French speaking people: And our demo site: (the current layout is totally temporary, it is based on earlier prospects for some of our customers. Believe it or not, it is "optimized" for Macs [especially IE Mac but that's not my fault :-)]. We have hired a graphist to do the final layout of the official release but it's not a problem since it's very easy to change the look to something, maybe more... Aquaish :-). -- Julien Jalon From jerwin at ponymail.com Fri Aug 9 18:14:04 2002 From: jerwin at ponymail.com (Jeremy Erwin) Date: Thu Nov 3 14:49:52 2005 Subject: Hide/show control In-Reply-To: Message-ID: <6521819D-ABFE-11D6-A964-003065F24232@ponymail.com> On Friday, August 9, 2002, at 01:03 PM, Andrew Zamler-Carhart wrote: > I don't know what it's called, but do you know that square control with > the up/down arrow that expands/contracts save panels and address book > (10.1) windows? The control is sometimes called a "disclosure triangle". > I tried opening the relevant nib file from Address Book, but it won't > open in IB: > /Applications/Address > Book.app/Contents/Resources/English.lproj/PersonEditor.nib/ > Are nibs in system apps engineered so that you can't open them? If so, > is there a workaround for that? > I couldn't open the nib files for Address book either, while I was able to open then for some other Apple derived apps-- Iphoto, for one. /Applications/iPhoto.app/Contents/Resources/English.lproj/InfoPanel.nib consists of three nib files-- classes.nib, info.nib, and objects.nib /Applications/Address Book.app/Contents/Resources/English.lproj/PersonEditor.nib consists of only one file-- objects.nib I'm betting that Interface builder expects all three .nib components to be present. BTW, although both classes.nib and info.nib are XML files, objects.nib is a binary file. From smith at panix.com Fri Aug 9 18:46:00 2002 From: smith at panix.com (ber) Date: Thu Nov 3 14:49:52 2005 Subject: mac.com photo in mail - where? Message-ID: Can someone tell me about or point me to information about the photo that appears when I read mail from a mac.com account with Mail.app? Where's the photo? I can't seem to find where the bits are. It's not obvious like an X-Face header. Thanks, brian redman From demarco at apple.com Fri Aug 9 19:37:01 2002 From: demarco at apple.com (Vince DeMarco) Date: Thu Nov 3 14:49:52 2005 Subject: Reordering views in IB In-Reply-To: <58185F23-A632-11D6-AF59-000A277A6C34@zamler-carhart.com> Message-ID: On Friday, August 2, 2002, at 09:10 AM, Andrew Zamler-Carhart wrote: > Dear list, > > I have a window that I wanted to add tabs to. In Interface Builder, I > dragged an NSTabView to the window, but I was unable to drag the > window's contents onto the tabs so that they would be children of the > NSTabView instead of the window's content view. > > I wound up cutting and pasting everything I wanted to move, which > worked except it broke all the target/action connections and I had to > rewire everything. I tried every key combination I could think of. Is > there a better way? > > I noted the "Make subviews of" command, which groups the selected > views onto a tab. But then, how do you move other views onto a > different tab? Still the same problem. > > You would think that when viewing the contents of a nib file in list > view, you could simply drag views around to reorder them, yet this > doesn't seem to be possible (unless I'm missing something). > From the IB FAQ. ? I have a control in a container (e.g. tab view) and I want to move this control outside of the container but Cut and Paste break connections. How can I move a control between containers without breaking connections? This is a known limitation. The workaround is to Option-Drag the control to another window within the same nib file and then Option-drag it back to the original window (if you don't have a second window in your nib then create a temporary window). Option-drag within the same nib doesn't break connections. From the IB Release notes Views and menus can be popped out and dragged, while preserving their connections Clicking and holding a view or menu will cause it to pop off its container. The selection can now be moved to a different subview or menu. If the selection lands within the same nib, all connections are preserved. From jmerkel2 at mac.com Fri Aug 9 22:21:01 2002 From: jmerkel2 at mac.com (James J. Merkel) Date: Thu Nov 3 14:49:52 2005 Subject: Printing question Message-ID: <41331330-AC20-11D6-8399-003065F2AC38@mac.com> These boards have been very useful to me in learning Cocoa programming -- thanks to all who contribute. Everything was going along fine in my application until I tried to do printing. Basically I have a window with a thumbnail image and an NSScrollView which I would like to print. If I just use the contentView method for the NSWindow I get a copy of the window contents with the scroll bar: NSView *aPrintView = [[NSApp mainWindow] contentView]; Of course I don't want the scroll bar. However, I can separate the two subviews and send a documentView method to the NSScrollView and then print just the text: NSArray * viewsToPrint = [aPrintView subviews]; NSView *theTextView = [[viewsToPrint objectAtIndex:1] documentView]; Similarly, I can get the NSImageView and print it. What I can't do is combine the NSImageView and the text and print them together on one page. For example if I do something like: NSView * combinedView = [[NSView alloc] init ]; [combinedView addSubview:theTextView]; The text is removed from the window. Obviously I'm in the window drawing environment not the printer environment. In the NSView documentation there is the statement: "Printing an NSView uses the same description as for displaying on the screen, by simply changing the device". This sounds like the way it was done in OS9 i.e. you change the drawing port. However, I wasn't able to find any further reference to "changing the device" in the documentation. What i'm trying to do is simple, but the documentation seems to be dead end. Any help on this would be appreciated. Thanks in advance. Jim Merkel From smith at panix.com Sat Aug 10 14:37:01 2002 From: smith at panix.com (ber) Date: Thu Nov 3 14:49:52 2005 Subject: mac.com photo in mail - where? In-Reply-To: Message-ID: <393A926A-ACA9-11D6-87C6-0003931CFD4A@panix.com> Thanks! Although I have no Images folder in my Library: [tibook:~] ber% ls ~/Library/Images ls: /Users/ber/Library/Images: No such file or directory I followed up on the theme and searched for "mac.com": [tibook:~] ber% find . -name \*mac.com\* ... ./Library/Caches/com.apple.addressservices/Photos/dez@mac.com ./Library/Caches/com.apple.addressservices/Photos/galimore@mac.com ./Library/Caches/com.apple.addressservices/Photos/nickzman@mac.com ./Library/Caches/com.apple.addressservices/Photos/oogje@mac.com ./Library/Caches/com.apple.addressservices/Photos/rvanderen@mac.com ... I'm not using 10.1.x so that may explain the missing ~/Library/Images folder. Or not. But thanks, now I know where they are at least temporarily. brian On Saturday, August 10, 2002, at 10:28 AM, Thomas Deniau wrote: > Le 10/08/02 3:45, ??ber?? a ?crit?: > >> Can someone tell me about or point me to information about the photo >> that appears when I read >> mail from a mac.com account with Mail.app? Where's the photo? I >> can't seem to find where the >> bits are. It's not obvious like an X-Face header. > >> From the mac.com webmail, or from a picture in your ~/Library folder >> (for > example the photo for foo@bar.com is kept in > ~/Library/Images/People/foo@bar.com.tiff) > > > From michele.garoche at easyconnect.fr Sat Aug 10 23:44:01 2002 From: michele.garoche at easyconnect.fr (=?ISO-8859-1?Q?Mich=E8le_Garoche?=) Date: Thu Nov 3 14:49:52 2005 Subject: MacOSX-dev digest, Vol 1 #1899 - 12 msgs In-Reply-To: <200208100522.g7A5M5v02324@slowbro.omnigroup.com> Message-ID: <967001B6-ACF5-11D6-9F9F-00050205621D@easyconnect.fr> > I couldn't open the nib files for Address book either, while I was able > to open then for some other Apple derived apps-- Iphoto, for one. For what it's worth. Found this answer on Mac OS X Hints cannot open is because they are missing the property list that describes the classes within the NIB file. This file is not used at runtime, but is used by IB. The problem lies with the nibtool command line tool -- it has a bug that removes this file whenever it processes a NIB. Apple uses the command line tool to automate the localization process. Mich?le From mail at jensbaumeister.de Sun Aug 11 08:15:01 2002 From: mail at jensbaumeister.de (Jens Baumeister) Date: Thu Nov 3 14:49:52 2005 Subject: IB unexpectedly quits at startup Message-ID: <0C3DA1BC-AD3D-11D6-A2F4-000A277DEC18@jensbaumeister.de> Hi! Since my laptop's in repair, I have to revert to using my desktop machine for development purposes. (G4 400 / 10.1.5) PB works fine, but IB unexpectedly quits at startup with no message to the console. Rebboting didn't change that, deleting Prefs in ~/Library/Preferences/ didn't help, neither did upgrading to the April Beta of the Dev tools. (I first installed over the old version - when that didn't help I removed IB and re-installed it again from the Beta package.) Does anyone have any ideas what else I could try short of a complete clean system install. (I'd like to save that until next month when 10.2 is out.) Thanks. Jens ---------------------------------- Jens Baumeister, Bullex GmbH, Cologne ... If it walks out of your refrigerator, LET IT GO ! From mail at jensbaumeister.de Sun Aug 11 08:55:01 2002 From: mail at jensbaumeister.de (Jens Baumeister) Date: Thu Nov 3 14:49:52 2005 Subject: IB unexpectedly quits at startup In-Reply-To: <0C3DA1BC-AD3D-11D6-A2F4-000A277DEC18@jensbaumeister.de> Message-ID: <9DC508F8-AD42-11D6-A2F4-000A277DEC18@jensbaumeister.de> Am Sonntag den, 11. August 2002, um 17:14, schrieb Jens Baumeister: > PB works fine, but IB unexpectedly quits at startup with no message to > the console. Thanks to Eric Peyton I remebered to look at the Crash Log. Not very encouraging: Date/Time: 2002-08-11 17:38:16 +0200 OS Version: 10.1.5 (Build 5S66) Host: of044 Command: Interface Builder PID: 778 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbff7ffe8 Thread 0 Crashed: #0 0x7016153c in CFAllocatorAllocate #1 0x700042b8 in malloc_zone_malloc #2 0x701615c0 in CFAllocatorAllocate #3 0x700042b8 in malloc_zone_malloc [...] (Goes on like this until #503) Doesn't look like I can do much about that except for re-installing and possibly filing a bug report. :-( Jens ---------------------------------- Jens Baumeister, Bullex GmbH, Cologne Q: Why do programmers get Halloween and Christmas mixed up? A: Because OCT(31) = DEC(25) From wave at pixar.com Sun Aug 11 09:15:01 2002 From: wave at pixar.com (Michael B. Johnson) Date: Thu Nov 3 14:49:52 2005 Subject: IB unexpectedly quits at startup In-Reply-To: <9DC508F8-AD42-11D6-A2F4-000A277DEC18@jensbaumeister.de> Message-ID: <67CD657C-AD45-11D6-8A04-0003930F24E8@pixar.com> Sounds to me like you might be loading a bad palette. mv your ~/Preferences/com.apple.InterfaceBuilder.plist somewhere else and try again. On Sunday, August 11, 2002, at 08:54 AM, Jens Baumeister wrote: > > Am Sonntag den, 11. August 2002, um 17:14, schrieb Jens Baumeister: > >> PB works fine, but IB unexpectedly quits at startup with no message >> to the console. > > Thanks to Eric Peyton I remebered to look at the Crash Log. Not very > encouraging: > > Date/Time: 2002-08-11 17:38:16 +0200 > OS Version: 10.1.5 (Build 5S66) > Host: of044 > > Command: Interface Builder > PID: 778 > > Exception: EXC_BAD_ACCESS (0x0001) > Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbff7ffe8 > > Thread 0 Crashed: > #0 0x7016153c in CFAllocatorAllocate > #1 0x700042b8 in malloc_zone_malloc > #2 0x701615c0 in CFAllocatorAllocate > #3 0x700042b8 in malloc_zone_malloc > [...] > (Goes on like this until #503) > > Doesn't look like I can do much about that except for re-installing > and possibly filing a bug report. :-( > > Jens > > ---------------------------------- > Jens Baumeister, Bullex GmbH, Cologne > > Q: Why do programmers get Halloween and Christmas mixed up? > A: Because OCT(31) = DEC(25) > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > --> Michael B. Johnson, Ph.D. -- wave@pixar.com --> Studio Tools, Pixar Animation Studios --> http://xenia.media.mit.edu/~wave From mail at jensbaumeister.de Sun Aug 11 10:02:01 2002 From: mail at jensbaumeister.de (Jens Baumeister) Date: Thu Nov 3 14:49:52 2005 Subject: IB unexpectedly quits at startup In-Reply-To: <9DC508F8-AD42-11D6-A2F4-000A277DEC18@jensbaumeister.de> Message-ID: Hi! Michael B. Johnson wrote: > Sounds to me like you might be loading a bad palette. > > mv your ~/Preferences/com.apple.InterfaceBuilder.plist somewhere else > and try again. Thanks, that got me on the right track. I'd already tried removing the prefs, but I found a bad palette in /Developer/Palettes/ (Leftover from a trial install of Joy I did ages ago on that machine.) Thanks! Jens ---------------------------------- Jens Baumeister, Bullex GmbH, Cologne God is REAL... unless explicitly declared INTEGER. From individual at mi-mail.cl Sun Aug 11 10:32:01 2002 From: individual at mi-mail.cl (Individual . .) Date: Thu Nov 3 14:49:52 2005 Subject: A good c++ mailing list for beginners (slightly unix-oriented) Message-ID: <2DD787FA-AD50-11D6-89A1-003065DCDA98@mi-mail.cl> Hi. The subject says it all. Does anyone here know of one? Thanks. Paul From lxr at mac.com Sun Aug 11 12:08:20 2002 From: lxr at mac.com (System Administrator) Date: Thu Nov 3 14:49:52 2005 Subject: Can't make tableview double clickable - code included Message-ID: <2E5D732E-AD5D-11D6-8739-003065DA17A4@mac.com> Hi, I did this in about six apps, i.e. using a table view and making it double clickable. I used IB as well as doing it programmatically. Both fails, I can only receive the actions that I hardwired in IB from the tableview triggering a certain target action in my controller, but I can't use a double action. That's the way I did it before which worked then but no longer works now, why is not clear to me: - init { self = [super init]; NSLog(@"init"); [windMain setDelegate:self]; [Listbrowser setDelegate:self]; [tcID setEditable:NO]; [tcName setEditable:NO]; [tcContent setEditable:NO]; [windMain makeMainWindow]; [windMain makeKeyAndOrderFront:windMain]; [Listbrowser setAction:@selector(selectFList:)]; [Listbrowser setDoubleAction:@selector(doubleClickInFList:)]; return self; } Thanks Alex -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1411 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020811/f3a5dda3/attachment.bin From gss+osxdev at cs.brown.edu Sun Aug 11 12:45:05 2002 From: gss+osxdev at cs.brown.edu (Gregory Seidman) Date: Thu Nov 3 14:49:53 2005 Subject: Creating an IB palette Message-ID: <20020811194327.GA10756@cs.brown.edu> There are a few Cocoa GUI widgets I'd like to have in an IB palette, but I'm not sure how to go about it. One in particular is the NSSplitView. I'd also like to be able to have a palette of well-known buttons, such as the authentication lock or the expansion arrow in some save dialogs. I see that I can create an IB palette in IB, but I can't manage to add anything to it that isn't already in one of the existing palettes. I guess I can create an appropriate NSButton subclass for the well-known buttons, but even that doesn't seem right. How do I go about creating a palette with existing system classes? And is there somewhere to go looking for stuff that other people have put on palettes? --Greg From wsanchez at mit.edu Sun Aug 11 12:47:02 2002 From: wsanchez at mit.edu (Wilfredo Sanchez) Date: Thu Nov 3 14:49:53 2005 Subject: Launched by Services Message-ID: <16802A84-AD63-11D6-B59E-000393A5892E@mit.edu> Is is possible to detect that your application was launches via the Services menu? I have an app that detects when it was launched by dragging a file onto the app icon. In this case, it exits after processing the file. I'd like a similar effect for Services, but it seems that the service invocation happens after -applicationDidFinishLaunching and I don't see another way to figure that out. Any ideas? -wsv From chmod007 at mac.com Sun Aug 11 12:49:05 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:49:53 2005 Subject: Creating an IB palette In-Reply-To: <20020811194327.GA10756@cs.brown.edu> Message-ID: > There are a few Cocoa GUI widgets I'd like to have in an IB palette, but > I'm not sure how to go about it. One in particular is the NSSplitView. I'd > also like to be able to have a palette of well-known buttons, such as the > authentication lock or the expansion arrow in some save dialogs. > > I see that I can create an IB palette in IB, but I can't manage to add > anything to it that isn't already in one of the existing palettes. I guess > I can create an appropriate NSButton subclass for the well-known buttons, > but even that doesn't seem right. How do I go about creating a palette with > existing system classes? And is there somewhere to go looking for stuff > that other people have put on palettes? > > --Greg There are a few example projects in /Developer/Examples/InterfaceBuilder. AFAIK, there is no formal documentation, but this sample code will hopefully be enough. / Sincerely, David Remahl From wsanchez at mit.edu Sun Aug 11 12:50:02 2002 From: wsanchez at mit.edu (Wilfredo Sanchez) Date: Thu Nov 3 14:49:53 2005 Subject: [ANN] DropScript 0.5 Message-ID: <868E36C6-AD63-11D6-B59E-000393A5892E@mit.edu> I've just rolled another version (0.5) of DropScript. This version adds support for Services, which I think is rather spiffy. If means you can write a shell script and then use it from Finder. I noticed the version of SNAX I have installed (it's old, though), doesn't register for the file send type, so it doesn't work. But Finder works, and that's what I was shooting for. http://www.mit.edu/people/wsanchez/software/ I've also added a bit of documentation (gasp!) aside the example scripts in the form of a README. -wsv From wjtregaskis at students.latrobe.edu.au Sun Aug 11 17:17:01 2002 From: wjtregaskis at students.latrobe.edu.au (Wade Tregaskis) Date: Thu Nov 3 14:49:53 2005 Subject: "Tech support incident available" In-Reply-To: <65BF8DB2-AAD5-11D6-BF96-0030654DA12C@mac.com> Message-ID: There seem to be lots of these flying around lately, with small print like "expires tomorrow" and the like. If Apple really doesn't mind people transferring these, couldn't Apple [or some 3rd party?] set up a little lost-and-found system for people to claim these unwanted items? Just a thought. From djw_lists at pacbell.net Sun Aug 11 21:28:01 2002 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:49:53 2005 Subject: Can't make tableview double clickable - code included In-Reply-To: <2E5D732E-AD5D-11D6-8739-003065DA17A4@mac.com> Message-ID: Try [Listbrowser setTarget:self]; On Sunday, August 11, 2002, at 12:04 PM, System Administrator wrote: > Hi, > > I did this in about six apps, i.e. using a table view and making it > double clickable. I used IB as well as doing it programmatically. > Both fails, I can only receive the actions that I hardwired in IB from > the tableview triggering a certain target action in my controller, but > I can't use a double action. That's the way I did it before which > worked then but no longer works now, why is not clear to me: > > > - init > { > self = [super init]; > NSLog(@"init"); > [windMain setDelegate:self]; > [Listbrowser setDelegate:self]; > [tcID setEditable:NO]; > [tcName setEditable:NO]; > [tcContent setEditable:NO]; > [windMain makeMainWindow]; > [windMain makeKeyAndOrderFront:windMain]; > [Listbrowser setAction:@selector(selectFList:)]; > [Listbrowser setDoubleAction:@selector(doubleClickInFList:)]; > return self; > } > > Thanks > Alex -- Dan Wood Karelia Software, LLC dwood@karelia.com http://www.karelia.com/ Watson for Mac OS X: http://www.karelia.com/watson/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1785 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020811/2ebf214f/attachment.bin From lxr at mac.com Sun Aug 11 21:50:01 2002 From: lxr at mac.com (Alex R.) Date: Thu Nov 3 14:49:53 2005 Subject: Can't make tableview double clickable - code included In-Reply-To: Message-ID: <96F630AE-ADAE-11D6-A0D9-003065DA17A4@mac.com> I tried that but it didn't help. The earlier suggestion to move it all to awakeFromNib would have sovled it, but instead only moving the setDoubleAction:SELECTOR into an awakeFromNib was enough. Thanks Alex Am Sonntag, 11.08.02, um 21:27 Uhr (US/Pacific) schrieb Dan Wood: > Try [Listbrowser setTarget:self]; > > > On Sunday, August 11, 2002, at 12:04 PM, System Administrator wrote: > >> Hi, >> >> I did this in about six apps, i.e. using a table view and making it >> double clickable. I used IB as well as doing it programmatically. >> Both fails, I can only receive the actions that I hardwired in IB >> from the tableview triggering a certain target action in my >> controller, but I can't use a double action. That's the way I did it >> before which worked then but no longer works now, why is not clear to >> me: >> >> >> - init >> { >> self = [super init]; >> NSLog(@"init"); >> [windMain setDelegate:self]; >> [Listbrowser setDelegate:self]; >> [tcID setEditable:NO]; >> [tcName setEditable:NO]; >> [tcContent setEditable:NO]; >> [windMain makeMainWindow]; >> [windMain makeKeyAndOrderFront:windMain]; >> [Listbrowser setAction:@selector(selectFList:)]; >> [Listbrowser setDoubleAction:@selector(doubleClickInFList:)]; >> return self; >> } >> >> Thanks >> Alex > > -- > Dan Wood > Karelia Software, LLC > dwood@karelia.com > http://www.karelia.com/ > Watson for Mac OS X: http://www.karelia.com/watson/ > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2037 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020811/0af6b411/attachment.bin From dave at difference.com.au Mon Aug 12 00:42:01 2002 From: dave at difference.com.au (David Cake) Date: Thu Nov 3 14:49:53 2005 Subject: finding all sub-classes In-Reply-To: <868E36C6-AD63-11D6-B59E-000393A5892E@mit.edu> References: <868E36C6-AD63-11D6-B59E-000393A5892E@mit.edu> Message-ID: Is there a way to find all sub-classes of a class in ObjC? Cheers David From ghopson at mac.com Mon Aug 12 03:27:01 2002 From: ghopson at mac.com (Geoff Hopson) Date: Thu Nov 3 14:49:53 2005 Subject: mac.com photo in mail - where? In-Reply-To: Message-ID: I believe you can upload a photo in the webmail preferences for your mac.com account (according to a "little bee" that told me how a few weeks back) HTH, Geoff On 10/8/02 2:45 am, "ber" wrote: > Can someone tell me about or point me to information about the photo > that appears when I read > mail from a mac.com account with Mail.app? Where's the photo? I > can't seem to find where the > bits are. It's not obvious like an X-Face header. > > Thanks, > > brian redman > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev -- Geoff Hopson Objectology Ltd Maidenhead, UK http://www.objectology.co.uk/ From lists at mjtsai.com Mon Aug 12 08:48:01 2002 From: lists at mjtsai.com (Michael Tsai) Date: Thu Nov 3 14:49:53 2005 Subject: finding all sub-classes In-Reply-To: Message-ID: On 8/12/02 at 3:40 PM, David Cake wrote: > Is there a way to find all sub-classes of a class in ObjC? Yes, I believe there's code to do this in Sente's OCUnit. -- Michael Tsai From ddavidso at apple.com Mon Aug 12 10:39:23 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:49:53 2005 Subject: NSWorkspace for opening files: wrong? right? In-Reply-To: <05E37452-AA3E-11D6-A6D0-000393171F58@mac.com> Message-ID: <5F696778-AE1A-11D6-84EA-000393115062@apple.com> On Wednesday, August 7, 2002, at 12:44 PM, Mel Walker wrote: > On Wednesday, August 7, 2002, at 01:27 PM, Brian Webster wrote: >> -10818 is defined in LaunchServices.h: >> >> kLSLaunchInProgressErr = -10818, /* e.g. opening an alreay >> opening application*/ >> >> So yeah, it looks like it doesn't like opening lots of files really >> quickly. You could try waiting a short bit and retrying the open >> call whenever an error occurs, but you would have to be wary about >> infinite loops and such. Using Launch Services directly might give >> you more control over things, since you get an error code back and >> can differentiate between different reasons for failure. >> >> You could go the Apple Event route if you want to get fancy, using >> Launch Services to get references for the application to open for >> each item, grouping the items by app, and then sending a single open >> event to each application. I think that Launch Services should give >> you sufficient results, at least for reasonable numbers of items. > > I think that's what I will do. I was hoping for a "true" Cocoa way of > doing things, but I guess I'm out of luck. > > What I need is a "-(BOOL)openFiles:withApplication:" method somewhere > to handle this. For what it's worth, the problem should no longer be present in Jaguar. Douglas Davidson From dunham at mac.com Mon Aug 12 10:49:51 2002 From: dunham at mac.com (David Dunham) Date: Thu Nov 3 14:49:53 2005 Subject: Packaging for delivery In-Reply-To: Message-ID: <55096F64-AE1B-11D6-8FE5-0003938C646E@mac.com> I've been using .dmg format to deliver our games for Mac OS X. I'm in the process of bringing them to Mac OS 9, and was hoping to have a single download that could be handled by both. In theory, this could be a .img file, but I'm having trouble with that -- I use DMG Maker because it's the only way I know of to include the "click-wrap" license. In theory, it can make .img files (and they do in fact open under OS X), but they are reported as corrupted when I try to 2click them under OS 9. Obviously one alternative is just to create a .sit file and have the user unstuff it to a folder if necessary, but I know Apple prefers .dmg files and I agree. And it would seem like a .img file is almost as good. Unfortunately, we need the "click-wrap" license, so I might have to revert to using an installer if OS 9's Disk Copy can't handle them. David Dunham Macintosh Game Developer GameHouse, Inc. david@gamehouse.com 206 442 5881 x22 http://www.gamehouse.com From ddavidso at apple.com Mon Aug 12 10:51:01 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:49:53 2005 Subject: Launched by Services In-Reply-To: <16802A84-AD63-11D6-B59E-000393A5892E@mit.edu> Message-ID: <71517440-AE1B-11D6-84EA-000393115062@apple.com> On Sunday, August 11, 2002, at 12:46 PM, Wilfredo Sanchez wrote: > Is is possible to detect that your application was launches via the > Services menu? > > I have an app that detects when it was launched by dragging a file > onto the app icon. In this case, it exits after processing the file. > I'd like a similar effect for Services, but it seems that the service > invocation happens after -applicationDidFinishLaunching and I don't > see another way to figure that out. > > Any ideas? Currently an application launched to provide a service is not launched with any special indication of the fact. You might be able to arrange some criteria based on the timing of the service request, but that would not be entirely reliable. Douglas Davidson From wsanchez at mit.edu Mon Aug 12 10:58:01 2002 From: wsanchez at mit.edu (=?ISO-8859-1?Q?Wilfredo_S=E1nchez?=) Date: Thu Nov 3 14:49:53 2005 Subject: Launched by Services In-Reply-To: <71517440-AE1B-11D6-84EA-000393115062@apple.com> Message-ID: <0DB66C84-AE1D-11D6-A26A-000393A5892E@mit.edu> OK, I thought as much. Thanks. -wsv On Monday, August 12, 2002, at 01:46 PM, Douglas Davidson wrote: > Currently an application launched to provide a service is not launched > with any special indication of the fact. You might be able to arrange > some criteria based on the timing of the service request, but that > would not be entirely reliable. From robert.fischer at berlin.de Mon Aug 12 12:02:16 2002 From: robert.fischer at berlin.de (Robert Fischer) Date: Thu Nov 3 14:49:53 2005 Subject: Creating an IB palette In-Reply-To: <20020811194327.GA10756@cs.brown.edu> Message-ID: On Sunday, August 11, 2002, at 09:43 PM, Gregory Seidman wrote: > There are a few Cocoa GUI widgets I'd like to have in an IB palette, but > I'm not sure how to go about it. One in particular is the NSSplitView. I' > d > also like to be able to have a palette of well-known buttons, such as the > authentication lock or the expansion arrow in some save dialogs. You know that IB is has Split Views already built in, don't you? See menu Layout->Make Subviews Of->Split View. You have to select two views first. Hope that helps at least for this point. Cheers, Robert -- --- - .-. -- -- --- / \ ---- Robert Fischer .-. / \ --- .-. __o .-. @ / \ / \ / \ _`\<,_ / \ berlin.de / \ / \ / \ (*)/ (*) / `-------------- / `---' `-' `-----------' From robert.fischer at berlin.de Mon Aug 12 12:09:32 2002 From: robert.fischer at berlin.de (Robert Fischer) Date: Thu Nov 3 14:49:53 2005 Subject: Launched by Services In-Reply-To: <16802A84-AD63-11D6-B59E-000393A5892E@mit.edu> Message-ID: <8FC1B82A-AE26-11D6-A692-003065E61D62@berlin.de> On Sunday, August 11, 2002, at 09:46 PM, Wilfredo Sanchez wrote: > Is is possible to detect that your application was launches via the > Services menu? Because there is one explicit service entry point into your app, it seems trivial to know, that the app was called from a service. The one method which is specified in the NSServices array, key "NSMessage", is *the one*. Robert -- --- - .-. -- -- --- / \ ---- Robert Fischer .-. / \ --- .-. __o .-. @ / \ / \ / \ _`\<,_ / \ berlin.de / \ / \ / \ (*)/ (*) / `-------------- / `---' `-' `-----------' From wsanchez at mit.edu Mon Aug 12 12:16:00 2002 From: wsanchez at mit.edu (=?ISO-8859-1?Q?Wilfredo_S=E1nchez?=) Date: Thu Nov 3 14:49:53 2005 Subject: Launched by Services In-Reply-To: <8FC1B82A-AE26-11D6-A692-003065E61D62@berlin.de> Message-ID: <85ACD5A1-AE27-11D6-A26A-000393A5892E@mit.edu> Sure, I can tell I'm getting a services call. What I can't tell is that the reason my app got launched was because of a services call, and not because the user launched it explicitly. -wsv On Monday, August 12, 2002, at 03:06 PM, Robert Fischer wrote: > Because there is one explicit service entry point into your app, it > seems trivial to know, that the app was called from a service. The one > method which is specified in the NSServices array, key "NSMessage", is > *the one*. From kcall at mac.com Mon Aug 12 12:20:09 2002 From: kcall at mac.com (Kevin Callahan) Date: Thu Nov 3 14:49:53 2005 Subject: Launched by Services In-Reply-To: <0DB66C84-AE1D-11D6-A26A-000393A5892E@mit.edu> Message-ID: <2F9673DC-AE28-11D6-BBCC-00306574D7D4@mac.com> On Monday, August 12, 2002, at 10:58 AM, Wilfredo S?nchez wrote: > OK, I thought as much. > > Thanks. > > -wsv > > > On Monday, August 12, 2002, at 01:46 PM, Douglas Davidson wrote: > >> Currently an application launched to provide a service is not >> launched with any special indication of the fact. You might be able >> to arrange some criteria based on the timing of the service request, >> but that would not be entirely reliable. Couldn't you put some indicator in the method for the NSService's -> NSMessage that sets up your service? Kevin > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From lavoie at steltor.com Mon Aug 12 13:19:01 2002 From: lavoie at steltor.com (Martin-Gilles Lavoie) Date: Thu Nov 3 14:49:53 2005 Subject: detecting Quartz extreme Message-ID: <9912D6EE-AE30-11D6-AFDC-0003938E758A@steltor.com> Is there any way to know if Quartz is running accelerated on a given machine? We'd like to have some soft switches around some drawing that we do, based on accelerated graphics availability. This way, we could avoid more expensive drawing operations (like window transitions) if the machine is not "worthy" enough (!). ______________________________________________________________________ Martin-Gilles Lavoie Oracle Calendar for Macintosh http://www.oracle.com (steltor.com) From dunham at mac.com Mon Aug 12 14:09:01 2002 From: dunham at mac.com (David Dunham) Date: Thu Nov 3 14:49:53 2005 Subject: Checking in a .nib In-Reply-To: <55096F64-AE1B-11D6-8FE5-0003938C646E@mac.com> Message-ID: <8F852E15-AE36-11D6-8FE5-0003938C646E@mac.com> So if you're stuck using SourceSafe for version control, how do you check in a .nib file? (I actually do all my checkin and checkout on an NT box and copy the files back and forth -- hopefully this will get a little easier once Jaguar's out.) The problem, of course, being that a .nib isn't really a file. David Dunham Macintosh Game Developer GameHouse, Inc. david@gamehouse.com 206 442 5881 x22 http://www.gamehouse.com From kdyke at apple.com Mon Aug 12 14:15:01 2002 From: kdyke at apple.com (Kenneth Dyke) Date: Thu Nov 3 14:49:53 2005 Subject: detecting Quartz extreme In-Reply-To: <9912D6EE-AE30-11D6-AFDC-0003938E758A@steltor.com> Message-ID: <706B671F-AE38-11D6-8598-000393A037EC@> On Monday, August 12, 2002, at 01:18 PM, Martin-Gilles Lavoie wrote: > Is there any way to know if Quartz is running accelerated on a given > machine? > > We'd like to have some soft switches around some drawing that we do, > based on accelerated graphics availability. This way, we could avoid > more expensive drawing operations (like window transitions) if the > machine is not "worthy" enough (!). From CGDisplayConfiguration.h: /* True if the display is using OpenGL acceleration */ boolean_t CGDisplayUsesOpenGLAcceleration(CGDirectDisplayID display); This will tell you on a per-display basis whether Quartz Extreme is being used. Obviously this is 10.2 only. -Ken From gss+osxdev at cs.brown.edu Mon Aug 12 14:20:01 2002 From: gss+osxdev at cs.brown.edu (Gregory Seidman) Date: Thu Nov 3 14:49:53 2005 Subject: Creating an IB palette In-Reply-To: References: <20020811194327.GA10756@cs.brown.edu> Message-ID: <20020812211849.GB18673@cs.brown.edu> Robert Fischer sez: } } On Sunday, August 11, 2002, at 09:43 PM, Gregory Seidman wrote: } } >There are a few Cocoa GUI widgets I'd like to have in an IB palette, but } >I'm not sure how to go about it. One in particular is the NSSplitView. I' } >d } >also like to be able to have a palette of well-known buttons, such as the } >authentication lock or the expansion arrow in some save dialogs. } } You know that IB is has Split Views already built in, don't you? See menu } Layout->Make Subviews Of->Split View. You have to select two views first. } Hope that helps at least for this point. Someone else let me know in response to my message, but didn't send to the list. Thanks, though. } Cheers, } Robert --Greg From brian at classicalguitar.net Mon Aug 12 14:42:00 2002 From: brian at classicalguitar.net (Brian Bergstrand) Date: Thu Nov 3 14:49:53 2005 Subject: Debugging loadable bundles and threads Message-ID: <43D21A8E-AE3C-11D6-8EBA-0003930A674E@classicalguitar.net> Has anyone had any luck debugging a loadable bundle that spawns a thread? I'm using the July 2002 Dev Tools debugging within PB. Doing this, anytime I stop on a BP in the bundle's thread, gdb loses the stack frame and stops. If I then try to continue, my app crashes with a SIGTRAP signal. Has anyone seen this before, am I doing something wrong? Thanks. Brian Bergstrand PGP Key ID: 0xB6C7B6A2 There are two major products that came out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson From joe_esch at mac.com Mon Aug 12 15:27:33 2002 From: joe_esch at mac.com (Joe Esch) Date: Thu Nov 3 14:49:53 2005 Subject: Checking in a .nib In-Reply-To: <8F852E15-AE36-11D6-8FE5-0003938C646E@mac.com> Message-ID: <72F082CF-AE42-11D6-BD8E-0003933E9212@mac.com> For that matter, what do people recommend doing when using cvs? I seem to remember reading something at one time advising against using cvswrappers because either: a. It was not supported in the latest version of cvs b. it didn't work well c. it didn't work in a client/server environment d. all of the above. Are most people using cvswrappers, or is there a better way of working with nib files? On Monday, August 12, 2002, at 03:00 PM, David Dunham wrote: > So if you're stuck using SourceSafe for version control, how do you > check in a .nib file? (I actually do all my checkin and checkout on an > NT box and copy the files back and forth -- hopefully this will get a > little easier once Jaguar's out.) > > The problem, of course, being that a .nib isn't really a file. > > David Dunham Macintosh Game Developer GameHouse, Inc. > david@gamehouse.com 206 442 5881 x22 http://www.gamehouse.com > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From peciva at pharos.co.nz Mon Aug 12 15:38:00 2002 From: peciva at pharos.co.nz (Tobias Peciva) Date: Thu Nov 3 14:49:53 2005 Subject: Checking in a .nib Message-ID: <79218202D4B9D4118A290002A508E13BAAFD2E@PNZEXCHANGE> We simply treat .nibs as you would any other directory: Add it to SourceSafe with the 'recursive' box checked, then check in and out the entire .nib directory. The same goes for .pbproj files. This builds on the assumption that PB/IB won't add or remove any files inside the .nib or .pbproj directories; but it seems they don't. A .nib, for example, usually contains the files classes.nib, objects.nib and info.nib (and these are really files). What you can do to avoid all the copying is to mount an NT volume using AFP (enter "afp://address" in the Connect to Server... dialog - the NT server must be running Services for Macintosh) and open all your project files from there. Just make sure to set your Intermediate and Build Product directories to one of your local drives to avoid network overhead when building. Cheers, Tobias Peciva Pharos Systems > ---------- > From: David Dunham > Sent: Tuesday, August 13, 2002 9:00 AM > To: macosx-dev@omnigroup.com > Subject: Checking in a .nib > > So if you're stuck using SourceSafe for version control, how do you > check in a .nib file? (I actually do all my checkin and checkout on an NT > box and copy the files back and forth -- hopefully this will get a little > easier once Jaguar's out.) > > The problem, of course, being that a .nib isn't really a file. From yevbee at attbi.com Mon Aug 12 20:55:01 2002 From: yevbee at attbi.com (yevbee@attbi.com) Date: Thu Nov 3 14:49:53 2005 Subject: Optimizing the colors of an NSBitmapImageRep Message-ID: <4CC4A57E-AE70-11D6-8F5B-0050E460BF7B@attbi.com> I need to make a ColorTable record for an 8-bit-per-sample NSBitmapImageRep. Right now I'm going through each pixel in the bitmap data (obtained from [rep bitmapData]) and making an entry for each unique color used. But this doesn't work because my images typically contain over 1600 different colors, and CLUT records are limited to 256 entries for pixmaps (which is where I'm using them). So I need to downsample the image using the most important colors. I hoped the Palette Manager would have a function for making optimized color tables, but it doesn't seem to. None of the image-related Cocoa classes seem to have anything dealing with this, either. Is there a way to optimize the image to use 256 or fewer colors? Any help would be appreciated. Thanks, Yevgeny From chergr at bigpond.com Mon Aug 12 22:28:02 2002 From: chergr at bigpond.com (Richard) Date: Thu Nov 3 14:49:53 2005 Subject: Optimizing the colors of an NSBitmapImageRep References: <4CC4A57E-AE70-11D6-8F5B-0050E460BF7B@attbi.com> Message-ID: <3D5898BF.209FD976@bigpond.com> There was an article in Develop a few years back that used an Octree method to do this and there may be an API call to do the median cut method somewhere (Quicktime???). I believe it is Apple code. Xiaolin Wu has done some research in this area and I have used one of his source code fragments in an old program of mine. Try Google, especially Graphics Gems. yevbee@attbi.com wrote: > I need to make a ColorTable record for an 8-bit-per-sample > NSBitmapImageRep. Right now I'm going through each pixel in the bitmap > data (obtained from [rep bitmapData]) and making an entry for each > unique color used. But this doesn't work because my images typically > contain over 1600 different colors, and CLUT records are limited to 256 > entries for pixmaps (which is where I'm using them). So I need to > downsample the image using the most important colors. I hoped the > Palette Manager would have a function for making optimized color tables, > but it doesn't seem to. None of the image-related Cocoa classes seem to > have anything dealing with this, either. > > Is there a way to optimize the image to use 256 or fewer colors? Any > help would be appreciated. > > Thanks, > Yevgeny > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From tjw at omnigroup.com Mon Aug 12 22:42:01 2002 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:49:53 2005 Subject: Optimizing the colors of an NSBitmapImageRep In-Reply-To: <4CC4A57E-AE70-11D6-8F5B-0050E460BF7B@attbi.com> Message-ID: <507AE7CE-AE7F-11D6-9A47-0003933F3BC2@omnigroup.com> On Monday, August 12, 2002, at 08:54 PM, yevbee@attbi.com wrote: [...] > Is there a way to optimize the image to use 256 or fewer colors? Any > help would be appreciated. The netpbm toolset (available at http://netpbm.sourceforge.net) contains a tool called 'ppmquant' which does exactly this. The man page for this tool references: "Color Image Quantization for Frame Buffer Display" by Paul Heckbert, SIGGRAPH '82 Proceedings, page 297. You might also look at results returned from searching google for 'color palette quantization' -tim From chergr at bigpond.com Mon Aug 12 22:56:22 2002 From: chergr at bigpond.com (Richard) Date: Thu Nov 3 14:49:53 2005 Subject: Optimizing the colors of an NSBitmapImageRep References: <4CC4A57E-AE70-11D6-8F5B-0050E460BF7B@attbi.com> Message-ID: <3D589F04.DD50BA9C@bigpond.com> Do a search on MacTech for "palette optimization"and find this: http://www.mactech.com/articles/develop/issue_10/Good_Othmer_final.html From chergr at bigpond.com Mon Aug 12 23:08:02 2002 From: chergr at bigpond.com (Richard) Date: Thu Nov 3 14:49:53 2005 Subject: Optimizing the colors of an NSBitmapImageRep References: <4CC4A57E-AE70-11D6-8F5B-0050E460BF7B@attbi.com> Message-ID: <3D58A207.28AAD19B@bigpond.com> > Xiaolin Wu has done some research in this area and I have used one > of his source code fragments in an old program of mine. > Try Google, especially Graphics Gems. See here: http://www.csd.uwo.ca/faculty/wu/cq.c From bartramf at acm.org Tue Aug 13 06:51:02 2002 From: bartramf at acm.org (Frederick Bartram) Date: Thu Nov 3 14:49:53 2005 Subject: What is the proper way to terminate a thread? Message-ID: hi all.... I have a multithreaded app using remote object messaging. Server threads are using their own run loops to manage events. I've got the threads playing nicely with each other but I don't know how to shut them down. What is the 'proper' way to shutdown down a thread? I don't seem to be able to terminate a thread so that my 'thread' object's 'dealloc' is called. Calling 'exit' or removing the inputs from the run loop terminates the connection between the client and server but isn't very graceful. What's the protocol for thread termination? Thanks for any pointers. ...rick *--------------------------------------------------------------- * 25 years using the internet and I still don't have an interesting sig :( * * -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 765 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020813/622843aa/attachment.bin From frvince at jumpinternet.com Tue Aug 13 07:15:02 2002 From: frvince at jumpinternet.com (Fr. Vince Bork) Date: Thu Nov 3 14:49:53 2005 Subject: (no subject) Message-ID: <8DF46002-AEC7-11D6-881C-003065BA9696@jumpinternet.com> I'm having trouble compiling in Darwin. The package comes with Makefiles for several different machines, but not for the Mac. The compiled version works fine - but I need to change a parameter to make it work with international characters. I've had no luck with the user group for the program (glimpse, an indexing program). I'm no expert in Makefiles as it was a long time ago since I used them when I was in school - and even then I was not an expert. If anybody can think they could help me, I would appreciate a note. A couple of Makefiles for other architectures are included if you want to check out the scope of my problem. Thanks much. - Fr. Vince Bork -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.linux Type: application/octet-stream Size: 8844 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020813/f51d505e/Makefile.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.NeXT Type: application/octet-stream Size: 8480 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020813/f51d505e/Makefile-0001.obj From akinnie at mac.com Tue Aug 13 08:26:01 2002 From: akinnie at mac.com (Andrew Kinnie) Date: Thu Nov 3 14:49:53 2005 Subject: Strange Database Connectivity problem Message-ID: <3866343.1029252336583.JavaMail.akinnie@mac.com> Greetings: I tried to post a note on this earlier, but .Mac didn't give me a confirmation. In the event it's a duplicate, I apologize in advance. I have a website I am attempting to upgrade/unpdate. I am using WO 5.1.3, on OS X 10.1.5, with the April Developers Tools. The backend database in Openbase 7. Last week Thursday, my developer version worked fine, except for one minor issue getting to an ssl based store page. Everything else worked fine. However, I left town for a couple days, and came back to it on Sunday. Suddenly, after I built the project and attempted to run it, I got the following exception on the first page, apparently indicating an inability to connect to the database: [2002-08-13 10:04:46 EDT]
Waiting for requests... [2002-08-13 10:05:06 EDT] An exception occurred while trying to open a channel: com.webobjects.jdbcadaptor.JDBCAdaptorException: No suitable driver [2002-08-13 10:05:06 EDT] : Exception occurred while handling action named "default" on direct action class "null" :java.lang.IllegalStateException: _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext com.webobjects.eoaccess.EODatabaseContext@6c7100: failed to open database channel. Check your connection dictionary, and ensure your database is correctly configured. [2002-08-13 10:05:06 EDT] java.lang.IllegalStateException: _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext com.webobjects.eoaccess.EODatabaseContext@6c7100: failed to open database channel. Check your connection dictionary, and ensure your database is correctly configured. .... There are 5 EOModels in the site, all can browse the data from the database, yet the wo app cant't see it. I created a new WO project with nothing but a display group displaying the data, and it worked fine, with each model connecting and displaying the data. The problem remained on the site, not on the test project site. I rebuilt the site based on an original .tar file of the original (unmodified) site, same problem. I updated OpenBase, same problem. I deleted all of the OpenBaseJDBC drivers except the newest one, which I downloaded, same problem. It's clearly not openbase. I got a brand new .tar file of the existing site, same problem. This .tar file worked fine on fellow workers' machines. I reinstalled WebObjects, and the update.... same problem. Does anyone know of anything that could possibly cause this problem? Is there a configuration file somewhere that may have been corrupted? Will I need to back up impolrtant data, wipe the drive clean and reinstall the OS then WO??? Again??? Any help would be greatly appreciated. Andrew Kinnie From mwatson at apple.com Tue Aug 13 09:08:00 2002 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:49:53 2005 Subject: What is the proper way to terminate a thread? In-Reply-To: Message-ID: > What is the 'proper' way to shutdown down a thread? [NSThread exit] from within the thread you want shut down takes care of all the issues you mention. matt. From raphael_sebbe at mac.com Tue Aug 13 11:06:01 2002 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:49:53 2005 Subject: [OT] Looking for Aqua icons, anyone ? Message-ID: <4E13AA9F-AEE7-11D6-8804-000393448D9C@mac.com> Hi all, I know this is quite off topic, but I am looking for someone to design Aqua icons (toolbar buttons...) for Sphaera, our 3D content creator application. I can't give much but credit for that work. Anyway, if someone is interested, please contact me off list. Tips welcome too. Thanks, Raphael http://www.ex-cinder.com/sphaera.html From sruda at mac.com Tue Aug 13 13:05:02 2002 From: sruda at mac.com (Scott Ruda) Date: Thu Nov 3 14:49:53 2005 Subject: OS Install without a CD-R? In-Reply-To: <200208131420.g7DEK5v26203@slowbro.omnigroup.com> Message-ID: <9D69F620-AEF7-11D6-8776-0030657060E8@mac.com> Does anyone know a way of installing 10.2 without burning the .dmg to a CD? I have a DVD-RAM drive but the .dmg won't burn to that or any HD partition. I have tried using ditto to copy from the mounted .dmg to the DVD-RAM disk and even a HD partition, but neither of those work either. I've tried a few things with hdiutil, but haven't had any luck there either. It seems that the installer insists on the installation being from a true CD. This doesn't seem like it should be 'illegal' in any way. I legitimately have a 10.2 .dmg, I just don't have a CD-R at my current location. Scott From wsanchez at mit.edu Tue Aug 13 13:28:12 2002 From: wsanchez at mit.edu (=?ISO-8859-1?Q?Wilfredo_S=E1nchez?=) Date: Thu Nov 3 14:49:53 2005 Subject: file types and directories Message-ID: <7CAA26F5-AEFA-11D6-8AAB-000393A5892E@mit.edu> I've got an app that accepts directories, but not files. Is there a file type I can use for directories in CFBundleDocumentTypes? -wsv From zoldar256 at yahoo.com Tue Aug 13 14:26:01 2002 From: zoldar256 at yahoo.com (Corey O'Connor) Date: Thu Nov 3 14:49:53 2005 Subject: OS Install without a CD-R? In-Reply-To: <9D69F620-AEF7-11D6-8776-0030657060E8@mac.com> Message-ID: <20020813212505.74510.qmail@web11403.mail.yahoo.com> How I installed my developer copy: I took the image. Mounted it. dd'd it to another hd (Ipod works I think). Has to be another hd though. Not another partition since you dd the partition map and all. It might be possible to dd just the required partition to another partition but.... Then booted off the other hd! Installs in 2 minutes. -Corey O'Connor --- Scott Ruda wrote: > Does anyone know a way of installing 10.2 without > burning the .dmg to a > CD? I have a DVD-RAM drive but the .dmg won't burn > to that or any HD > partition. I have tried using ditto to copy from the > mounted .dmg to the > DVD-RAM disk and even a HD partition, but neither of > those work either. > I've tried a few things with hdiutil, but haven't > had any luck there > either. It seems that the installer insists on the > installation being > from a true CD. This doesn't seem like it should be > 'illegal' in any > way. I legitimately have a 10.2 .dmg, I just don't > have a CD-R at my > current location. > > Scott > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev ===== -Corey O'Connor Lead Programmer DogHeadBone Software oconnorc@dogheadbone.com 303-929-3517 www.dogheadbone.com __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com From shawn at freetimesw.com Tue Aug 13 14:46:01 2002 From: shawn at freetimesw.com (Shawn Erickson) Date: Thu Nov 3 14:49:53 2005 Subject: OS Install without a CD-R? In-Reply-To: <20020813212505.74510.qmail@web11403.mail.yahoo.com> Message-ID: On Tuesday, August 13, 2002, at 02:25 PM, Corey O'Connor wrote: > How I installed my developer copy: > I took the image. > Mounted it. > dd'd it to another hd (Ipod works I think). Has to be > another hd though. Not another partition since you dd > the partition map and all. It might be possible to dd > just the required partition to another partition I don't think an iPod would work... ok, it would but you would have to restore the iPod after doing this. Basically you would clobber the iPod firmware, etc. I have done this to my iPod on purpose before, restoring is not a big deal but be warned. -Shawn From alterego at dnai.com Tue Aug 13 14:49:01 2002 From: alterego at dnai.com (David Alter) Date: Thu Nov 3 14:49:53 2005 Subject: Controlling window zoom size In-Reply-To: <200208131901.g7DJ1Tv04329@slowbro.omnigroup.com> Message-ID: <5B1CC1B6-AF06-11D6-9A41-0003937AD81A@dnai.com> I'm working on a carbon application with a nib file. I would like to control the window size when the zoom button is pushed. This is the green button of the three button on the upper left. I thought I would be able to control this with SetWindowStandardState and SetWindowUserState After I create the window from the nib file I set the User and Standard state. If I do a GetWindowUserState or GetWindowStandardState they are set correctly. If I click on the zoom button, it overrides both states values, and sizes the window incorrectly. What do I need to do to control the window zooming? Any help is appreciated. Thanks -dave From joe_esch at mac.com Tue Aug 13 14:57:01 2002 From: joe_esch at mac.com (Joe Esch) Date: Thu Nov 3 14:49:53 2005 Subject: Controlling window zoom size In-Reply-To: <5B1CC1B6-AF06-11D6-9A41-0003937AD81A@dnai.com> Message-ID: <7D9BE197-AF07-11D6-8D65-0003933E9212@mac.com> You want to implement windowWillUseStandardFrame:defaultFrame: on the delegate for your window. See the documentation for NSWindow. On Tuesday, August 13, 2002, at 03:48 PM, David Alter wrote: > I'm working on a carbon application with a nib file. I would like to > control the window size when the zoom button is pushed. This is the > green button of the three button on the upper left. I thought I would > be able to control this with SetWindowStandardState and > SetWindowUserState > > After I create the window from the nib file I set the User and Standard > state. If I do a GetWindowUserState or GetWindowStandardState they are > set correctly. If I click on the zoom button, it overrides both states > values, and sizes the window incorrectly. > > What do I need to do to control the window zooming? > > Any help is appreciated. Thanks > -dave > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From wilsod3 at rpi.edu Tue Aug 13 15:02:01 2002 From: wilsod3 at rpi.edu (Dave Wilson) Date: Thu Nov 3 14:49:53 2005 Subject: Interface Builder Question Message-ID: I'd like to make a tabbed view like the one in project builder where if you click on it, it hides draws back into the side of the view. I can get a split view made, and the tab views, but I have no idea how to get a tab view to draw back into the side of the view like the files and targets tabs do in project builder. Does anyone know how to do this? --Dave From dunham at mac.com Tue Aug 13 16:26:01 2002 From: dunham at mac.com (David Dunham) Date: Thu Nov 3 14:49:53 2005 Subject: Controlling window zoom size In-Reply-To: <7D9BE197-AF07-11D6-8D65-0003933E9212@mac.com> Message-ID: On Tuesday, August 13, 2002, at 02:56 , Joe Esch wrote: > You want to implement windowWillUseStandardFrame:defaultFrame: on the > delegate for your window. See the documentation for NSWindow. > > On Tuesday, August 13, 2002, at 03:48 PM, David Alter wrote: > >> I'm working on a carbon application with a nib file. I would like to >> control the window size when the zoom button is pushed. This is the >> green button of the three button on the upper left. I thought I would >> be able to control this with SetWindowStandardState and >> SetWindowUserState Rather than looking up Cocoa documentation, you probably want to ask this on Apple's Carbon mailing list . (My guess is an even better approach is to respond to the appropriate Carbon Event with the desired sizes, but I've done all my zooming through PowerPlant -- which would be a place to look for samples of how to do it.) David Dunham A Sharp david@a-sharp.com Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From nigel at ind.tansu.com.au Tue Aug 13 22:26:02 2002 From: nigel at ind.tansu.com.au (Nigel Pearson) Date: Thu Nov 3 14:49:53 2005 Subject: GLIMPSE In-Reply-To: <200208131420.g7DEK3v26187@slowbro.omnigroup.com> Message-ID: <5841D074-AF46-11D6-8AC5-00039346A294@ind.tansu.com.au> Fr. Vince Bork wrote: > > I'm having trouble compiling in Darwin. > > The package comes with Makefiles for several different machines, but not > for the Mac. 1) I just downloaded GLIMPSE 4.16.2's tarball and had a look. The Makefile is generated by the script configure. This is fairly common with open-source software. This is also documented in README.install 2) The source code, as is, does not build on OS X. It will get to libtemplate/util, and fails to compile log.c Adding -D__STRICT_ANSI__ to CFLAGS in util's Makefile will get it past that, but then it fails with index/io.c, which required some dynamic library stuff > The compiled version works fine - but I need to change a parameter to > make it work with international characters. I've had no luck with the > user group for the program (glimpse, an indexing program). The compiled version must have been built by someone, so why not collaborate with him/her? If that is not possible, I can try to help you. -- | Nigel Pearson, nigel@ind.tansu.com.au | "In this city I confess | Telstra iDevelopments, Sydney Australia | god is mammon, more is less | Office: 9206 3468 Fax: 9212 6329 | off like lemmings at the gun | Mobile: 0408 664435 Home: 9792 6998 | I know better, still I run" From alexander at resnet.gatech.edu Wed Aug 14 00:25:02 2002 From: alexander at resnet.gatech.edu (Alexander Powell) Date: Thu Nov 3 14:49:53 2005 Subject: More NSScrollView/NSOpenGLView Problems Message-ID: <1029309877.3d5a05b50ca1b@webmail.mail.gatech.edu> Alright, I've searched and searched for an answer, and have tried just about anything to try and get this to work, but I still cannot. Here's what I want: A NSOpenGLView attached to a NSScrollView. The OpenGLView must be able to resize *with* the ScrollView horizontally (i.e. I only want vertical scrollbars, but I want to fill the space horizontally. I also need the ability to resize the OpenGLView vertically as more models are put into it, to make room. I've tried billions of hacks, but I just can't seem to get it to work. It seems that the problem lies in the update and reshape methods (duh). Based on suggestions from the list, I've gotten *some* of the view to work as expected and have put together a simple test project. On the test project, scrolling works, but resizing doesn't (you have to switch out and back to the same tab to get it to update correctly after a resize). *Please*, someone look at the project available here: http://www.prism.gatech.edu/~gte706p/OpenGLScrollTest.sit If you come up with a solution, I'll send you five dollars or something. -- Alexander Powell alexander@resnet.gatech.edu Georgia Institute of Technology - Studio 100 Audio Research From alexander at resnet.gatech.edu Wed Aug 14 00:35:01 2002 From: alexander at resnet.gatech.edu (Alexander Powell) Date: Thu Nov 3 14:49:53 2005 Subject: More NSScrollView/NSOpenGLView Problems In-Reply-To: <1029309877.3d5a05b50ca1b@webmail.mail.gatech.edu> References: <1029309877.3d5a05b50ca1b@webmail.mail.gatech.edu> Message-ID: <1029310474.3d5a080a7263a@webmail.mail.gatech.edu> Quoting Alexander Powell : > *Please*, someone look at the project available here: > > ? ? http://www.prism.gatech.edu/~gte706p/OpenGLScrollTest.sit > Or just the source for my test class, if you're a big shot and you don't need to see exactly what I'm talking about: http://www.prism.gatech.edu/~gte706p/TestOpenGLView.m -- Alexander Powell alexander@resnet.gatech.edu Georgia Institute of Technology - Studio 100 Audio Research From kpreid at attglobal.net Wed Aug 14 05:41:01 2002 From: kpreid at attglobal.net (Kevin Reid) Date: Thu Nov 3 14:49:53 2005 Subject: More NSScrollView/NSOpenGLView Problems In-Reply-To: <1029309877.3d5a05b50ca1b@webmail.mail.gatech.edu> Message-ID: <1fgwcqv.1jx67n11pk37jmM%kpreid@attglobal.net> Alexander Powell wrote: > Here's what I want: > > A NSOpenGLView attached to a NSScrollView. The OpenGLView must be > able to resize *with* the ScrollView horizontally (i.e. I only want > vertical scrollbars, but I want to fill the space horizontally. I > also need the ability to resize the OpenGLView vertically as more > models are put into it, to make room. > > I've tried billions of hacks, but I just can't seem to get it to work. It > seems that the problem lies in the update and reshape methods (duh). As an alternate approach, you could place the NSOpenGLView in the window next to a NSScroller, and implement the scrolling by changing projection, viewport, or translation values in OpenGL. -- Kevin Reid From lists at mjtsai.com Wed Aug 14 07:31:00 2002 From: lists at mjtsai.com (Michael Tsai) Date: Thu Nov 3 14:49:53 2005 Subject: file types and directories In-Reply-To: <7CAA26F5-AEFA-11D6-8AAB-000393A5892E@mit.edu> Message-ID: On 8/13/02 at 4:23 PM, Wilfredo S?nchez wrote: > I've got an app that accepts directories, but not files. Is there > a file type I can use for directories in CFBundleDocumentTypes? There's an OSType: 'fold'. You may also be interested in 'disk'. -- Michael Tsai From joe_esch at mac.com Wed Aug 14 07:42:01 2002 From: joe_esch at mac.com (Joe Esch) Date: Thu Nov 3 14:49:53 2005 Subject: Inkwell Message-ID: Does anyone know if there is any documentation for Inkwell from a developer's perspective? I would like to add Inkwell support to my application, but I don't know how the data gets into the application. I can use it to fill in text in standard controls like an NSTextField, but I would like to be able to enter text into a custom view when it is key. I would also like to know how an image gets inserted into a document. Is it using clipboard formats or something? From goMac at mac.com Wed Aug 14 08:56:01 2002 From: goMac at mac.com (Colin Cornaby) Date: Thu Nov 3 14:49:53 2005 Subject: Having trouble with Authenticated Tasks Message-ID: <5B64AF60-AF9E-11D6-BE2C-003065AC2B20@mac.com> As the title says, I'm having trouble with authentication. Sometimes when my program is running, weird stuff happens. I can no longer do anything in the terminal due to a "No more processes." error. My program returns a "(copyFile) Error -60031 in AuthorizationExecuteWithPrivileges". I am running the cp tool from /bin/cp. --Colin Cornaby From drewmccormack at mac.com Wed Aug 14 09:02:02 2002 From: drewmccormack at mac.com (Drew McCormack) Date: Thu Nov 3 14:49:53 2005 Subject: SSHAgentPlugin Message-ID: <17C341B2-AF9F-11D6-A002-000A278B1C74@mac.com> I was using a login plugin called "SSHAgentPlugin" (I think) with 10.1. It would startup an agent which could be used by any terminal or xterm. I just tried to use it in jaguar, but the agent doesn't start. I downloaded the source, recompiled, and reinstalled in /System/Library/LoginPlugins, but still no dice. Does anyone else use this plugin, and has anyone got it working on 10.2? Or does anyone know if the loginPlugin loading scheme has changed in jaguar? Drew ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... Dr. Drew McCormack Trade Strategist (www.trade-strategist.com) Trading simulation software for Mac OS X From goMac at mac.com Wed Aug 14 10:09:09 2002 From: goMac at mac.com (Colin Cornaby) Date: Thu Nov 3 14:49:53 2005 Subject: Having trouble with Authenticated Tasks In-Reply-To: Message-ID: <8D327D6A-AFA7-11D6-BE2C-003065AC2B20@mac.com> No trouble at all, heres the code: - (void)copyFileWithPrivs:(NSString*)fromVar destination:(NSString*)destVar { char* args[4]; OSStatus err = 0; //if(![self authenticate]) //return; //the arguments parameter to AuthorizationExecuteWithPrivileges is //a NULL terminated array of C string pointers. args[0]= "-f"; args[1]=(char*)[fromVar cString]; args[2]=(char*)[destVar cString]; args[3]=NULL; err = AuthorizationExecuteWithPrivileges(authorizationRef, "/bin/cp", 0, args, NULL); if(err!=0) { NSBeep(); NSLog(@"(copyFile) Error %d in AuthorizationExecuteWithPrivileges",err); } //while ([NSFileManager fileExistsAtPath:fromVar]==NO) //{ // } } On Wednesday, August 14, 2002, at 09:56 AM, Nick Zitzmann wrote: > > On Wednesday, August 14, 2002, at 08:56 AM, Colin Cornaby wrote: > >> As the title says, I'm having trouble with authentication. Sometimes >> when my program is running, weird stuff happens. I can no longer do >> anything in the terminal due to a "No more processes." error. My >> program returns a "(copyFile) Error -60031 in >> AuthorizationExecuteWithPrivileges". I am running the cp tool from >> /bin/cp. > > Can you share with the list exactly what you're doing with the security > framework? Source code really helps here. > > Nick Zitzmann > ICQ: 22305512 > > Check out my software page: http://homepage.mac.com/nickzman/ > From alterego at dnai.com Wed Aug 14 10:22:01 2002 From: alterego at dnai.com (David Alter) Date: Thu Nov 3 14:49:53 2005 Subject: Controlling window zoom size In-Reply-To: Message-ID: Thank you David. You where correct. I resolved the issue by registering for the kEventWindowZoom carbon event. enjoy -dave On Tuesday, August 13, 2002, at 04:25 PM, David Dunham wrote: > On Tuesday, August 13, 2002, at 02:56 , Joe Esch wrote: > >> You want to implement windowWillUseStandardFrame:defaultFrame: on the >> delegate for your window. See the documentation for NSWindow. >> >> On Tuesday, August 13, 2002, at 03:48 PM, David Alter wrote: >> >>> I'm working on a carbon application with a nib file. I would like to >>> control the window size when the zoom button is pushed. This is the >>> green button of the three button on the upper left. I thought I would >>> be able to control this with SetWindowStandardState and >>> SetWindowUserState > > Rather than looking up Cocoa documentation, you probably want to ask > this on Apple's Carbon mailing list > . > > (My guess is an even better approach is to respond to the appropriate > Carbon Event with the desired sizes, but I've done all my zooming > through PowerPlant -- which would be a place to look for samples of how > to do it.) > > David Dunham A Sharp david@a-sharp.com > Voice/Fax: 206 783 7404 http://a-sharp.com > Efficiency is intelligent laziness. > > From sruda at mac.com Wed Aug 14 11:22:56 2002 From: sruda at mac.com (Scott Ruda) Date: Thu Nov 3 14:49:53 2005 Subject: OS Install without a CD-R? In-Reply-To: <200208141726.g7EHQFv09643@slowbro.omnigroup.com> Message-ID: > --- Scott Ruda wrote: >> Does anyone know a way of installing 10.2 without >> burning the .dmg to a CD? > Corey O'Connor" wrote > > How I installed my developer copy: > I took the image. > Mounted it. > dd'd it to another hd (Ipod works I think). Has to be > another hd though. Not another partition since you dd > the partition map and all. It might be possible to dd > just the required partition to another partition > but.... > Then booted off the other hd! Installs in 2 minutes. Thanks, dd did the trick. Though it did take about 45 minutes for dd to complete, and it took more than a half hour to install the OS (G4 500DP). You must have something special going on if you got this to happen in 2 minutes. thanks again, scott From embassociates at qwest.net Wed Aug 14 13:30:02 2002 From: embassociates at qwest.net (Erik M. Buck) Date: Thu Nov 3 14:49:53 2005 Subject: More NSScrollView/NSOpenGLView Problems References: <1029309877.3d5a05b50ca1b@webmail.mail.gatech.edu> Message-ID: <001701c243d2$c52b2f10$0101a8c0@karma> I have not look at you code, but we do something almost exactly like you want in one of our produces. The scroll view bases the presence or absence of scroll bars and scroll position upon the frame of the scrollview's document view. This is true regardless of whether the document view is an NSOpenGLView. Take any old view, even a plain NSView and get it working the way you want as the document view of a scroll view. The only think you have to change to resize the document view is change its frame. Change the document view to an NSOpenGLView subclass. Each time the frame changes, change the view's bounds to whatever you want. In the -reshape method, setup whatever coordinate system you want with viewport and ortho. Then you are done and everything works correctly. > I've tried billions of hacks, but I just can't seem to get it to work. It > seems that the problem lies in the update and reshape methods (duh). > From joe_esch at mac.com Wed Aug 14 13:51:24 2002 From: joe_esch at mac.com (Joe Esch) Date: Thu Nov 3 14:49:53 2005 Subject: Inkwell In-Reply-To: <3445FCDA-AF9C-11D6-B6EA-000A277A6C34@zamler-carhart.com> Message-ID: <478C345A-AFC7-11D6-82B0-0003933E9212@mac.com> If a standard Cocoa control like NSTextField has focus in my application, it gets text OK. Normally though, when my document window is key its window controller is getting keyDown events and I handle the text myself. I tried implementing insertText on my window controller, but it doesn't seem to get anything from Inkwell. Does anyone know what kind of event or message the text comes in as? Also, I would like to be able to insert graphics that a user could create using the sketch pad in Inkwell. Does anyone know how the image gets sent to the application when the "Send" butotn is clicked? On Wednesday, August 14, 2002, at 09:40 AM, Andrew Zamler-Carhart wrote: > Joe, > > My understanding is that Inkwell is a standard text input method. If > users can type using the keyboard now, they can use Inkwell in your > app with Jaguar. > > Andrew > > On Wednesday, August 14, 2002, at 07:41 AM, Joe Esch wrote: > >> Does anyone know if there is any documentation for Inkwell from a >> developer's perspective? I would like to add Inkwell support to my >> application, but I don't know how the data gets into the application. >> I can use it to fill in text in standard controls like an >> NSTextField, but I would like to be able to enter text into a custom >> view when it is key. > From liyanage at access.ch Wed Aug 14 16:23:01 2002 From: liyanage at access.ch (Marc Liyanage) Date: Thu Nov 3 14:49:53 2005 Subject: Problems positioning windows on multiple screens programmatically In-Reply-To: <200206132128625.SM01024@skti.org> Message-ID: Hi there, I want to pop up several windows, one per attached screen on the machine. I first created the windows all programmatically and was able to get the results I wanted by using - initWithContentRect:styleMask:backing:defer:screen: I was passing a rect with a constant offset from the top left corner, and a screen parameter I got by looping through [NSScreen screens]. This worked, I got my windows near the upper left corners of my two screens. However, for other reasons I decided to create the windows from a .nib file instead of programmatically. The problem I seem to have now is that I cannot position a window onto the second screen. I am reading out screen coordinates with CGGetActiveDisplayList() and CGDisplayBounds() This gives me two rects for my two screens: Display 1 ({{0, 0}, {1280, 854}}) Display 2 ({{1280, 0}, {1024, 768}}) In another setup, the second display is to the left instead of to the right of my main screen and the second display's x origin is negative. The problem is that I cannot move the second window to the second screen with - setFrame:display:, it always stays on the main screen, near the other window. Ideally I would like to call the - center method, btw., to center the two windows on their respective screens... How can I do this? _________________________________________________________________ Marc Liyanage????????????????????????????????? liyanage@access.ch ??????????????????????????????????????????? http://www.entropy.ch ????????????????????????????????????????????????????? ICQ 5077985 ????????????????????????????????????? Yoda I am. Grammar I can't. _________________________________________________________________ From andrewdm at sonic.net Wed Aug 14 17:29:01 2002 From: andrewdm at sonic.net (Andrew Merenbach) Date: Thu Nov 3 14:49:53 2005 Subject: Setting a class' action Message-ID: I would like every one of about 109 different buttons in a periodic table of the elements to call the same action. Each button uses a custom subclass of NSButton, in a different color. I can assign the actions to all the buttons manually, but since there are several differently-colored periodic tables in my program, this could take hours. Is there a way to set an action of all buttons of a particular class in the class definition file? Take care, Andrew Merenbach From kcall at mac.com Wed Aug 14 17:41:03 2002 From: kcall at mac.com (Kevin Callahan) Date: Thu Nov 3 14:49:53 2005 Subject: Setting a class' action In-Reply-To: Message-ID: Have you tried using NSMatrix ? set the action for the matrix and then use the selectedCell's tag to know which button was pressed. Kevin On Wednesday, August 14, 2002, at 05:28 PM, Andrew Merenbach wrote: > I would like every one of about 109 different buttons in a periodic > table of the elements to call the same action. Each button uses a > custom subclass of NSButton, in a different color. I can assign the > actions to all the buttons manually, but since there are several > differently-colored periodic tables in my program, this could take > hours. Is there a way to set an action of all buttons of a particular > class in the class definition file? > > Take care, > Andrew Merenbach > _______________________________________________ > cocoa-dev mailing list | cocoa-dev@lists.apple.com > Help/Unsubscribe/Archives: > http://www.lists.apple.com/mailman/listinfo/cocoa-dev > Do not post admin requests to the list. They will be ignored. From embassociates at qwest.net Wed Aug 14 18:22:02 2002 From: embassociates at qwest.net (Erik M. Buck) Date: Thu Nov 3 14:49:53 2005 Subject: Setting a class' action References: Message-ID: <001201c243fb$965b3fd0$0101a8c0@karma> IN the class's designated initializer, call [self setAction:@selector(someAction)]; ----- Original Message ----- From: "Andrew Merenbach" To: Cc: Sent: Wednesday, August 14, 2002 7:28 PM Subject: Setting a class' action > I would like every one of about 109 different buttons in a periodic > table of the elements to call the same action. Each button uses a > custom subclass of NSButton, in a different color. I can assign the > actions to all the buttons manually, but since there are several > differently-colored periodic tables in my program, this could take > hours. Is there a way to set an action of all buttons of a particular > class in the class definition file? > > Take care, > Andrew Merenbach > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From andrewdm at sonic.net Wed Aug 14 18:28:30 2002 From: andrewdm at sonic.net (Andrew Merenbach) Date: Thu Nov 3 14:49:53 2005 Subject: Drawing antialiased text Message-ID: <2AB65B23-AFEE-11D6-AB96-000A277AE290@sonic.net> There's one last hurdle I need to overcome in my periodic table of the elements before it's fit to release: I need to finish tweaking the interface. The biggest problem is that I have drawn the atomic number of an element in addition to the button's title (which is the element's symbol), but it appears large and black, even though I have designated label-sized text, and would like it to be antialiased like the text on a text-only button--otherwise it draws attention away from the atomic symbol, making the chart hard to read. I received some help before about drawing an additional title, but I can't seem to make it look good. Any suggestions? Take care, Andrew Merenbach From jerwin at ponymail.com Wed Aug 14 18:31:03 2002 From: jerwin at ponymail.com (Jeremy Erwin) Date: Thu Nov 3 14:49:53 2005 Subject: Setting a class' action In-Reply-To: Message-ID: <8CE27EB8-AFEE-11D6-B4B8-003065F24232@ponymail.com> On Wednesday, August 14, 2002, at 08:28 PM, Andrew Merenbach wrote: > I would like every one of about 109 different buttons in a periodic > table of the elements to call the same action. Each button uses a > custom subclass of NSButton, in a different color. I can assign the > actions to all the buttons manually, but since there are several > differently-colored periodic tables in my program, this could take > hours. Is there a way to set an action of all buttons of a particular > class in the class definition file? > You could skip IB and assign the actions programmatically. [mybutton setTarget:IUPACdata]; [mybutton setAction:@selector(displayData:)] would have the same effect as control dragging from your button to the IUPACdata instance and selecting the "displayData:" action. You might be able to use an enumerator to cycle through all the buttons. Jeremy From ssen at apple.com Wed Aug 14 22:36:01 2002 From: ssen at apple.com (Shantonu Sen) Date: Thu Nov 3 14:49:53 2005 Subject: OS Install without a CD-R? In-Reply-To: Message-ID: > Thanks, dd did the trick. Though it did take about 45 minutes for dd to > complete, and it took more than a half hour to install the OS (G4 > 500DP). You must have something special going on if you got this to > happen in 2 minutes. 45 minutes sounds a bit long. I hope you explictly used "bs=128k" or greater to dd, otherwise your drive will thrash madly reading and writing 512 bytes at a time to different parts of the disk. You will see a similar slowdown during install. Shantonu From avi_drissman at baseview.com Thu Aug 15 08:17:03 2002 From: avi_drissman at baseview.com (Avi Drissman) Date: Thu Nov 3 14:49:53 2005 Subject: [Help] Turning Electric Fence into a dylib Message-ID: I'm trying to convert Bruce Perens's Electric Fence malloc library into a dylib so that I can insert it into my app like I do libMallocDebug. My code looks like: ----- void free(void *ptr) { efence_free(ptr); } void *malloc(size_t byteSize) { return efence_malloc(byteSize); } //... ----- and so on. I have two problems, perhaps related. First, when I compile, I get the errors: ----- ld: warning multiple definitions of symbol _free /.../master.o definition of _free in section (__TEXT,__text) /usr/lib/libSystem.dylib(malloc.o) definition of _free ld: warning multiple definitions of symbol _malloc /.../master.o definition of _malloc in section (__TEXT,__text) /usr/lib/libSystem.dylib(malloc.o) definition of _malloc ld: warning multiple definitions of symbol _calloc /.../master.o definition of _calloc in section (__TEXT,__text) /usr/lib/libSystem.dylib(malloc.o) definition of _calloc ld: warning multiple definitions of symbol _valloc /.../master.o definition of _valloc in section (__TEXT,__text) ----- I'm not linking against libSystem.dylib! How do I tell Project Builder that? Two, when I do the DYLD_INSERT_LIBRARIES / DYLD_FORCE_FLAT_NAMESPACE trick, I get: ----- dyld: /.../IQue Server multiple definitions of symbol _free /Volumes/Data/libElectricFence.dylib(master.o) definition of _free /usr/lib/libSystem.B.dylib(malloc.o) definition of _free ----- Well, duh! But I want my malloc/free to override the system's, just like it's done in libMallocDebug. Can anyone help? Thank you. Avi -- Avi Drissman avi_drissman@baseview.com Argh! This darn mail server is trunca From afonso at mac.com Thu Aug 15 08:50:12 2002 From: afonso at mac.com (Afonso Salcedo) Date: Thu Nov 3 14:49:53 2005 Subject: [newbie] Questions about NSTask and GUI/Shell (urgent help needed) Message-ID: I'm doing a GUI Cocoa application for Sicstus Prolog that runs in the shell on MacOS X, for my MSc. I managed to start Sicstus through my program, using NSTask and basing my code on Moriarty. But the way sicstus works means that I need to have some sort of interactive task working, in the sense that while sicstus is running i can use my GUI program to input prolog files to sicstus, perform queries, etc... As far as I know NSPipe is used to communicate between different tasks, but I dont think that would help me in my case. Do i have to use AppleScript to "simulate" everything for the user or can I do this easily using NSTask in Cocoa? I've been looking through the archives and other pages, but i havent found examples about how to do a gui frontend to a complete shell application such as sicstus... thanks for all your help, afonso From max at bigatti.it Thu Aug 15 09:00:01 2002 From: max at bigatti.it (Massimiliano Bigatti) Date: Thu Nov 3 14:49:53 2005 Subject: [newbie] Disclosure triangles Message-ID: Hello and sorry for the newbie question I searched the list for disclosure triangles but it seems that in the archives there isn't an answer accepted by everyone. The problem is how to create disclosure triangles with IB or programmatically. Someone was successful in using such a component? Regards, Massimiliano Bigatti http://www.bigatti.it SUN Certified Enterprise Architect for Java Platform 2 Enterprise Edition Technology -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 629 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020815/cdb34df7/attachment.bin From mwatson at apple.com Thu Aug 15 09:46:02 2002 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:49:53 2005 Subject: [Help] Turning Electric Fence into a dylib In-Reply-To: Message-ID: <5BCB1D28-B06E-11D6-BF3D-000393536FCA@apple.com> Try linking with -nostdlib -ldylib1.o -undefined warning -flat_namespace *.o matt. On Thursday, August 15, 2002, at 08:16 AM, Avi Drissman wrote: > I'm trying to convert Bruce Perens's Electric Fence malloc library > into a dylib so that I can insert it into my app like I do > libMallocDebug. My code looks like: > > ----- > void free(void *ptr) > { > efence_free(ptr); > } > > void *malloc(size_t byteSize) > { > return efence_malloc(byteSize); > } > //... > ----- > > and so on. I have two problems, perhaps related. > > First, when I compile, I get the errors: > > ----- > ld: warning multiple definitions of symbol _free > /.../master.o definition of _free in section (__TEXT,__text) > /usr/lib/libSystem.dylib(malloc.o) definition of _free > ld: warning multiple definitions of symbol _malloc > /.../master.o definition of _malloc in section (__TEXT,__text) > /usr/lib/libSystem.dylib(malloc.o) definition of _malloc > ld: warning multiple definitions of symbol _calloc > /.../master.o definition of _calloc in section (__TEXT,__text) > /usr/lib/libSystem.dylib(malloc.o) definition of _calloc > ld: warning multiple definitions of symbol _valloc > /.../master.o definition of _valloc in section (__TEXT,__text) > ----- > > I'm not linking against libSystem.dylib! How do I tell Project Builder > that? > > Two, when I do the DYLD_INSERT_LIBRARIES / DYLD_FORCE_FLAT_NAMESPACE > trick, I get: > > ----- > dyld: /.../IQue Server multiple definitions of symbol _free > /Volumes/Data/libElectricFence.dylib(master.o) definition of _free > /usr/lib/libSystem.B.dylib(malloc.o) definition of _free > ----- > > Well, duh! But I want my malloc/free to override the system's, just > like it's done in libMallocDebug. > > Can anyone help? Thank you. > > Avi > > -- > Avi Drissman > avi_drissman@baseview.com > Argh! This darn mail server is trunca > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From avi_drissman at baseview.com Thu Aug 15 10:02:01 2002 From: avi_drissman at baseview.com (Avi Drissman) Date: Thu Nov 3 14:49:53 2005 Subject: [Help] Turning Electric Fence into a dylib In-Reply-To: <5BCB1D28-B06E-11D6-BF3D-000393536FCA@apple.com> References: <5BCB1D28-B06E-11D6-BF3D-000393536FCA@apple.com> Message-ID: At 9:45 AM -0700 8/15/02, you wrote: >Try linking with -nostdlib -ldylib1.o -undefined warning -flat_namespace *.o I'm sorry; I'm new with Project Builder. Where do I put that? Avi -- Avi Drissman avi_drissman@baseview.com Argh! This darn mail server is trunca From mwatson at apple.com Thu Aug 15 10:08:01 2002 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:49:53 2005 Subject: [Help] Turning Electric Fence into a dylib In-Reply-To: Message-ID: <8061646C-B071-11D6-BF3D-000393536FCA@apple.com> On Thursday, August 15, 2002, at 10:01 AM, Avi Drissman wrote: > At 9:45 AM -0700 8/15/02, you wrote: > >> Try linking with -nostdlib -ldylib1.o -undefined warning >> -flat_namespace *.o > > I'm sorry; I'm new with Project Builder. Where do I put that? Sorry, I don't know how to do this in PB. -ldylib1.o needs to come before the -filelist argument at link time. I don't know how to make it do that. matt. From alannon at insomniaque.net Thu Aug 15 10:20:02 2002 From: alannon at insomniaque.net (Avi Cherry) Date: Thu Nov 3 14:49:53 2005 Subject: [Help] Turning Electric Fence into a dylib In-Reply-To: <8061646C-B071-11D6-BF3D-000393536FCA@apple.com> References: <8061646C-B071-11D6-BF3D-000393536FCA@apple.com> Message-ID: At 10:07 AM -0700 8/15/02, Matt Watson wrote: >On Thursday, August 15, 2002, at 10:01 AM, Avi Drissman wrote: > >>At 9:45 AM -0700 8/15/02, you wrote: >> >>>Try linking with -nostdlib -ldylib1.o -undefined warning -flat_namespace *.o >> >>I'm sorry; I'm new with Project Builder. Where do I put that? > >Sorry, I don't know how to do this in PB. -ldylib1.o needs to come >before the -filelist argument at link time. I don't know how to make >it do that. > >matt. I'm betting this would work if you go to your target in PB, look under "Build Settings" and add those flags to the "Other Linker Flags" spot under "Linker Settings" Avi (Cherry) From avi_drissman at baseview.com Thu Aug 15 10:27:03 2002 From: avi_drissman at baseview.com (Avi Drissman) Date: Thu Nov 3 14:49:53 2005 Subject: [Help] Turning Electric Fence into a dylib In-Reply-To: References: <8061646C-B071-11D6-BF3D-000393536FCA@apple.com> Message-ID: At 10:15 AM -0700 8/15/02, Avi Cherry wrote: >I'm betting this would work if you go to your target in PB, look >under "Build Settings" and add those flags to the "Other Linker >Flags" spot under "Linker Settings" Nope. Just tried that, and got a billion errors. Since Matt said the flags needed to precede the -filelist flag, and it doesn't do that, I wasn't surprised. But that -nostdlib one alone doesn't do the job either. PB still gives me that "duplicate symbols" error. Avi -- Avi Drissman avi_drissman@baseview.com Argh! This darn mail server is trunca From brock at bergdesign.com Thu Aug 15 10:38:01 2002 From: brock at bergdesign.com (Brock Brandenberg) Date: Thu Nov 3 14:49:53 2005 Subject: Drawing antialiased text In-Reply-To: <200208151726.g7FHQav06770@slowbro.omnigroup.com> Message-ID: Hi Andrew. > There's one last hurdle I need to overcome in my periodic table of the > elements before it's fit to release: I need to finish tweaking the > interface. The biggest problem is that I have drawn the atomic number > of an element in addition to the button's title (which is the element's > symbol), but it appears large and black, even though I have designated > label-sized text, and would like it to be antialiased like the text on a > text-only button--otherwise it draws attention away from the atomic > symbol, making the chart hard to read. I received some help before > about drawing an additional title, but I can't seem to make it look > good. Any suggestions? It's hard to grasp what your current drawing problem may be since any Cocoa text drawing will be anti-aliased by default. You have to go out of your way to make it not anti-aliased. Send me a screen snapshot of what something looks like now, and I'll try and decipher what may be happening. Bye. Brock Brandenberg P.S. Don't cross post :) We do watch both lists. ----- industrial design @ www.bergdesign.com ------ From mwatson at apple.com Thu Aug 15 10:42:01 2002 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:49:53 2005 Subject: [Help] Turning Electric Fence into a dylib In-Reply-To: Message-ID: <475ECADB-B076-11D6-BF3D-000393536FCA@apple.com> > I'm betting this would work if you go to your target in PB, look under > "Build Settings" and add those flags to the "Other Linker Flags" spot > under "Linker Settings" I'm pretty sure that you can't do this from within PB using the default PB settings. You could create a new Empty Project, then create a Legacy Makefile and add a makefile that builds all the sources and uses ld directly for the link. matt. From sruda at mac.com Thu Aug 15 11:02:01 2002 From: sruda at mac.com (Scott Ruda) Date: Thu Nov 3 14:49:53 2005 Subject: OS Install without a CD-R? In-Reply-To: <200208151726.g7FHQbv06778@slowbro.omnigroup.com> Message-ID: On Thursday, August 15, 2002, at 10:26 AM, Shantonu Sen wrote: >> Thanks, dd did the trick. Though it did take about 45 minutes for dd >> to >> complete, and it took more than a half hour to install the OS (G4 >> 500DP). You must have something special going on if you got this to >> happen in 2 minutes. > > 45 minutes sounds a bit long. I hope you explictly used "bs=128k" or > greater to dd, otherwise your drive will thrash madly reading and > writing > 512 bytes at a time to different parts of the disk. You will see a > similar > slowdown during install. I guess that was my problem since I did not specify an alternate bs setting. I guessed that it should be the default bs=512 thinking that was basic the block size of the source device (my HD experience comes from SCSI, and I thought that was the normal block size for a SCSI HD). I was thinking I might use bs=2048 since I think that is the basic block size on a CD, but I hadn't experimented with that setting yet. I was thinking that the bs setting needed to at least be an exact multiple of the source device image, otherwise it might fail on transferring the last block if it didn't match up. I will try bs=128K *the next time* I need to do this. Thanks, Scott From sruda at mac.com Thu Aug 15 11:09:00 2002 From: sruda at mac.com (Scott Ruda) Date: Thu Nov 3 14:49:53 2005 Subject: New Terminal window automatically running last command In-Reply-To: <200208151726.g7FHQbv06778@slowbro.omnigroup.com> Message-ID: Somehow I did something to my Terminal settings that I can't figure out how to clear. Now every time I launch a Terminal Shell, it automatically runs my last invoked CodeWarrior debug session. I.e. when CW Run is invoked, it pops up a terminal shell to launch the built application. Now that happens every time I try to open a new terminal shell window. Does anyone know how this got set like this, and how to clear it? It's quit annoying. Scott From mrmacman_g4 at mac.com Thu Aug 15 12:41:01 2002 From: mrmacman_g4 at mac.com (Kyle Moffett) Date: Thu Nov 3 14:49:53 2005 Subject: New Terminal window automatically running last command In-Reply-To: Message-ID: Just delete your com.apple.Terminal.plist file. You probably saved a terminal session and checked it to run every time you started Terminal HTH, Kyle Moffett On Thursday, August 15, 2002, at 02:08 PM, Scott Ruda wrote: > Somehow I did something to my Terminal settings that I can't figure out > how to clear. Now every time I launch a Terminal Shell, it > automatically runs my last invoked CodeWarrior debug session. I.e. when > CW Run is invoked, it pops up a terminal shell to launch the built > application. Now that happens every time I try to open a new terminal > shell window. Does anyone know how this got set like this, and how to > clear it? It's quit annoying. > > Scott > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From st962xmz at drexel.edu Thu Aug 15 13:54:01 2002 From: st962xmz at drexel.edu (Michael James) Date: Thu Nov 3 14:49:53 2005 Subject: SIGBUS errors when dragging from the Finder to an NSTableView Message-ID: I am trying to allow the user to drop a folder of .mp3 files onto the table in my application. When the user drops this folder onto the table, I will import the files that are in the folder. My application can currently import data by choosing Import from the File menu, but it would be more natural to allow the user to drag files onto the table. I have registered my table to accept files being dropped in it (NSFilenamesPboardType) and implemented the tableView:validateDrop:proposedRow:proposedDropOperation: and tableView:acceptDrop:row:dropOperation: methods in the table's data source class. In the first method, I look for an NSFilenamesPboardType and if one exists, I return NSDragOperationGeneric, otherwise I return NSDragOperationNone. In the second method, I get the property list (which is an array of strings) from the drag pasteboard, then I call my import method, then I return YES. The problem I am having occurs when I run the application. If I import data by choosing Import from the File menu, everything works as it did before, but if I drag the data onto the table it imports the data, I see the data in the table and then the application instantly crashes with a SIGBUS (signal 10) error. The only way I can keep the app from crashing is if I comment out the portion of my importing code that uses QuickTime to get the length of the .mp3 files. I thought that maybe my importing code was incorrect, but how can that be when this same code is being used when I import via the File menu, and that works with no problems. I was initially using the NSMovie class to get to the QuickTime Movie structure, then I rewrote it using Carbon and the QuickTime API, but that didn't change anything. When I ran the program through the debugger, the SIGBUS happens after it leaves my code. The stack trace is as follows: #0 -[myTableDataSource tableView:acceptDrop:row:dropOperation:] () #1 0x70c38698 in -[NSTableView performDragOperation:] () #2 0x70db54e8 in NSCopyBitsFromGraphicsContext () #3 0x73d73f64 in CoreAppearanceCountFontFallbacks () #4 0x73d7e890 in GetPasteboardFlavorType () #5 0x701a4880 in CFMessagePortSendRequest () #6 0x7018f39c in CFStringEncodingByteLengthForCharacters () #7 0x7017c1cc in CFRunLoopRunInMode () #8 0x701b70ec in CFRunLoopRunSpecific () #9 0x7017b8cc in CFRunLoopRunInMode () #10 0x7312d904 in InvokeThemeButtonDrawUPP () #11 0x731407a4 in GetNextWindow () #12 0x731715fc in BlockUntilNextEventMatchingListInMode () #13 0x70bd70b8 in _DPSNextEvent () #14 0x70bfe5d8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #15 0x70c23468 in -[NSApplication run] () #16 0x70c91ed0 in NSApplicationMain () #17 0x00003dc4 in main () #18 0x00003ce8 in _start () #19 0x00003b18 in start () But, when it crashes, the stack trace looks like this: #0 0x735f92a8 in AEGetDescDataSize () #1 0x735fc418 in AESizeOfFlattenedDesc () #2 0x73d75e60 in __initialize_Cplusplus () #3 0x73d7e92c in GetPasteboardFlavorType () #4 0x701a4880 in CFMessagePortSendRequest () #5 0x7018f39c in CFStringEncodingByteLengthForCharacters () #6 0x7017c1cc in CFRunLoopRunInMode () #7 0x701b70ec in CFRunLoopRunSpecific () #8 0x7017b8cc in CFRunLoopRunInMode () #9 0x7083e750 in -[NSRunLoop runMode:beforeDate:] () #10 0x70896398 in -[NSRunLoop runUntilDate:] () #11 0x70db5af0 in NSCopyBitsFromGraphicsContext () #12 0x73d7c2d4 in CoreScrapSetPromiseKeeper () #13 0x73d7e814 in GetPasteboardFlavorType () #14 0x701a4880 in CFMessagePortSendRequest () #15 0x7018f39c in CFStringEncodingByteLengthForCharacters () #16 0x7017c1cc in CFRunLoopRunInMode () #17 0x701b70ec in CFRunLoopRunSpecific () #18 0x7017b8cc in CFRunLoopRunInMode () #19 0x7312d904 in InvokeThemeButtonDrawUPP () #20 0x731407a4 in GetNextWindow () #21 0x731715fc in BlockUntilNextEventMatchingListInMode () #22 0x70bd70b8 in _DPSNextEvent () #23 0x70bfe5d8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #24 0x70c23468 in -[NSApplication run] () #25 0x70c91ed0 in NSApplicationMain () #26 0x00003dc4 in main () #27 0x00003ce8 in _start () #28 0x00003b18 in start () I understand that you normally get a SIGBUS as a result of trying to access memory in a way that you don't have permission to, such as writing to a read-only memory location. But I don't have anything like that in my code. I don't believe I have any retain/release/autorelease discrepancies. I can provide code snippets if needed. Any help on this, would be tremendously appreciated. Thanks. - Michael James umjames@mcs.drexel.edu From sruda at mac.com Thu Aug 15 16:58:02 2002 From: sruda at mac.com (Scott Ruda) Date: Thu Nov 3 14:49:53 2005 Subject: OS Install without a CD-R? In-Reply-To: <44A9A5E2-B080-11D6-AB6E-000A27D7A7EC@mac.com> Message-ID: on 8/15/02 11:53 AM, Carlos Weber at carlosweber@mac.com wrote: > > On Thursday, Aug 15, 2002, at 08:00 Pacific/Honolulu, Scott Ruda wrote: > >> >> On Thursday, August 15, 2002, at 10:26 AM, Shantonu Sen >> wrote: >> >>>> Thanks, dd did the trick. > > Could one or both of you guys please send me (or post to the list) the > sequence of terminal commands you used to accomplish this feat? (i.e., > transferring the mounted disk image to another hard disk.) The man page > for the dd command was not explicit enough to enlighten this Unix > newbie. If I remember right, this is what I did: I mounted the OS .dmg image by double-clicking on it. The target HD was originally formatted HFS+ and mounted, but it had to be unmounted (ejected) before doing the dd otherwise I got a 'device busy' message. I don't think the formatting/mounting has to be done, but I wanted to make sure it would show up in the device tables before proceeding. I got the unix device numbers for the source and dest devices (i.e. /dev/disk?) using df, but there are other ways. then: dd if=/dev/disk5 of=/dev/disk0 (WARNING - these disk numbers are probably not right for you!) You have to be logged in as root to do this (or you could use sudo). The added suggestion was to add a bs=128K option to the command line, which presumably will speed things up by copying using 128K chunks instead of the default 512 bytes. I hadn't done that because I was concerned of what would happen if the source material was not an exact multiple of 128K, but Shantonu implied that it would work fine with 128K chunks. Scott PS: *be very careful* to identify the correct devices. There are no "are you sures* in *nix land. I accidentally overwrote a drive somehow, presumably with one of my failed attempts. From monroe at criticalpath.com Thu Aug 15 19:00:01 2002 From: monroe at criticalpath.com (Monroe Williams) Date: Thu Nov 3 14:49:53 2005 Subject: How to access raw HID report data? Message-ID: I'm working on a "driver" (actually a shared library that connects using IOKitLib and the USB User Client Interface) for a composite USB device with several interfaces. One of these is a HID interface. I know the specific format of the HID report data, but unfortunately the HID descriptor in the device is not very useful. I'd _really_ like to be able to have the raw HID report data delivered to my driver. On Mac OS 9, I get the HID dispatch table from the Apple HID device driver and call pHIDInstallReportHandler to install a raw report handler, which works great. My callback gets called with the raw report data whenever it comes in, and I can do what I need to do. I haven't used the Mac OS X HID driver User Client Interface before, but after looking through the headers it appears that the interface is based around queueing events on particular HID Elements, not returning the raw report. Since the device's HID descriptor is bogus (something I unfortunately can't do anything about), there aren't any useful elements for me to use. It also appears that I can't open the User Client Interface for the HID interface (for direct access to the HID interface's interrupt pipe) since the Apple HID User Client driver has already attached to it. I really don't want to have to install a kext just to keep the Apple HID driver off my back. (So far I've been able to avoid installing any kexts at all, and I'd really like to keep it that way.) Am I missing something? This doesn't seem like it should be very hard to do, but I'm having a tough time figuring out how to do it. Any suggestions would be most appreciated. Thanks, -- monroe ------------------------------------------------------------------------ Monroe Williams monroe@criticalpath.com From developer at invisiblecomputer.com Thu Aug 15 20:38:01 2002 From: developer at invisiblecomputer.com (Developer) Date: Thu Nov 3 14:49:53 2005 Subject: [newbie] takeValue:forKey memory management In-Reply-To: Message-ID: <575C7854-B0C9-11D6-96F5-0003938F426A@invisiblecomputer.com> Hi there- I have a situation where I need to set member values for a class, but I don't know whether the class has implemented an accessor (basically I have an id and a identifier to use with takeValue:forKey). Is takeValue:forKey memory safe? In other words, if it finds there are no accessors for the given key, does it autorelease the old Value and retain the new one? What if there is an accessor in the class, does this mean there new object could be retained twice-- once by takeValue and once by the accessor? I'm assuming it does, and its safe to pass it an autoreleased object as value.... but that may not be a wise assumption. Thanks for any advice. Jay From developer at invisiblecomputer.com Thu Aug 15 20:43:02 2002 From: developer at invisiblecomputer.com (Developer) Date: Thu Nov 3 14:49:53 2005 Subject: [newbie] Disclosure triangles In-Reply-To: Message-ID: <0D42D854-B0CA-11D6-96F5-0003938F426A@invisiblecomputer.com> Try the second half of this article: http://www.stone.com/The_Cocoa_Files/More_or_Less.html On Thursday, August 15, 2002, at 08:58 am, Massimiliano Bigatti wrote: > Hello and sorry for the newbie question > I searched the list for disclosure triangles but it seems that in the > archives there isn't an answer accepted by everyone. > > The problem is how to create disclosure triangles with IB or > programmatically. > Someone was successful in using such a component? > > Regards, > > Massimiliano Bigatti > http://www.bigatti.it > SUN Certified Enterprise Architect for Java Platform 2 Enterprise > Edition Technology From jschrier at mac.com Fri Aug 16 01:03:00 2002 From: jschrier at mac.com (Joshua Schrier) Date: Thu Nov 3 14:49:53 2005 Subject: Inverse of NSDictionary descriptionInStringsFileFormat ? Message-ID: <74A4EC3F-B0EE-11D6-8A38-003065671344@mac.com> In NSDictionary there is a method (NSString *) descriptionInStringsFileFormat that will return the dictionary in a .strings file format (e.g., like Localizable.strings). Is there an easy way to do the inverse operation, i.e., given an NSString in .strings format to create an NSDictionary from it? For the record, NSDictionary dictionaryWithContentsOfFile accepts input in .plist (not .strings) format. Regards, --js From marcel at metaobject.com Fri Aug 16 02:30:34 2002 From: marcel at metaobject.com (Marcel Weiher) Date: Thu Nov 3 14:49:53 2005 Subject: [ANN] PdfCompress 0.6b Message-ID: Hi folks, apologies for the spam, but I am guessing that I am not the only one who's been irritated by the huge PDF files that Quartz produces whenever photographic images are involved. PdfCompress solves this by taking a PDF file and re-compressing all the contone images it finds using JPEG compression. PdfCompress works quickly and is easily accessed via the Finder or per drag'n'drop. It is available from the metaobject site and from version-tracker. Thanks, Marcel -- Marcel Weiher Metaobject Software Technologies marcel@metaobject.com http://www.metaobject.com Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc. From kpreid at attglobal.net Fri Aug 16 06:09:01 2002 From: kpreid at attglobal.net (Kevin Reid) Date: Thu Nov 3 14:49:53 2005 Subject: More NSScrollView/NSOpenGLView Problems In-Reply-To: <1029443337.3d5c0f099738b@webmail.mail.gatech.edu> Message-ID: <1fh03uv.1koridl3zm97eM%kpreid@attglobal.net> Alexander Powell wrote: > Quoting Kevin Reid : > > > As an alternate approach, you could place the NSOpenGLView in the window > > next to a NSScroller, and implement the scrolling by changing projection, > > viewport, or translation values in OpenGL. > > > > It looks like this solution will suffice, and for some reason seems easier > than getting the NSScrollView to work. Is the proper way to put an > NSScroller into IB simply to make add a CustomView and then set its class > to NSScroller? I'm not sure if this creates any problems down the line > (I'd prefer not to "hack" anything together for this project). I don't know of any problems with that method. -- Kevin Reid From st962xmz at drexel.edu Fri Aug 16 09:29:01 2002 From: st962xmz at drexel.edu (Michael James) Date: Thu Nov 3 14:49:53 2005 Subject: Drag and drop in NSTableView Message-ID: I am trying to allow the user to drop a folder of .mp3 files onto the table in my application. When the user drops this folder onto the table, I will import the files that are in the folder. My application can currently import data by choosing Import from the File menu, but it would be more natural to allow the user to drag files onto the table. I have registered my table to accept files being dropped in it (NSFilenamesPboardType) and implemented the tableView:validateDrop:proposedRow:proposedDropOperation: and tableView:acceptDrop:row:dropOperation: methods in the table's data source class. In the first method, I look for an NSFilenamesPboardType and if one exists, I return NSDragOperationGeneric, otherwise I return NSDragOperationNone. In the second method, I get the property list (which is an array of strings) from the drag pasteboard, then I call my import method, then I return YES. The problem I am having occurs when I run the application. If I import data by choosing Import from the File menu, everything works as it did before, but if I drag the data onto the table it imports the data, I see the data in the table and then the application instantly crashes with a SIGBUS (signal 10) error. The only way I can keep the app from crashing is if I comment out the portion of my importing code that uses QuickTime to get the length of the .mp3 files. I thought that maybe my importing code was incorrect, but how can that be when this same code is being used when I import via the File menu, and that works with no problems. I was initially using the NSMovie class to get to the QuickTime Movie structure, then I rewrote it using Carbon and the QuickTime API, but that didn't change anything. When I ran the program through the debugger, the SIGBUS happens after it leaves my code. The stack trace is as follows: #0 -[myTableDataSource tableView:acceptDrop:row:dropOperation:] () #1 0x70c38698 in -[NSTableView performDragOperation:] () #2 0x70db54e8 in NSCopyBitsFromGraphicsContext () #3 0x73d73f64 in CoreAppearanceCountFontFallbacks () #4 0x73d7e890 in GetPasteboardFlavorType () #5 0x701a4880 in CFMessagePortSendRequest () #6 0x7018f39c in CFStringEncodingByteLengthForCharacters () #7 0x7017c1cc in CFRunLoopRunInMode () #8 0x701b70ec in CFRunLoopRunSpecific () #9 0x7017b8cc in CFRunLoopRunInMode () #10 0x7312d904 in InvokeThemeButtonDrawUPP () #11 0x731407a4 in GetNextWindow () #12 0x731715fc in BlockUntilNextEventMatchingListInMode () #13 0x70bd70b8 in _DPSNextEvent () #14 0x70bfe5d8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #15 0x70c23468 in -[NSApplication run] () #16 0x70c91ed0 in NSApplicationMain () #17 0x00003dc4 in main () #18 0x00003ce8 in _start () #19 0x00003b18 in start () But, when it crashes, the stack trace looks like this: #0 0x735f92a8 in AEGetDescDataSize () #1 0x735fc418 in AESizeOfFlattenedDesc () #2 0x73d75e60 in __initialize_Cplusplus () #3 0x73d7e92c in GetPasteboardFlavorType () #4 0x701a4880 in CFMessagePortSendRequest () #5 0x7018f39c in CFStringEncodingByteLengthForCharacters () #6 0x7017c1cc in CFRunLoopRunInMode () #7 0x701b70ec in CFRunLoopRunSpecific () #8 0x7017b8cc in CFRunLoopRunInMode () #9 0x7083e750 in -[NSRunLoop runMode:beforeDate:] () #10 0x70896398 in -[NSRunLoop runUntilDate:] () #11 0x70db5af0 in NSCopyBitsFromGraphicsContext () #12 0x73d7c2d4 in CoreScrapSetPromiseKeeper () #13 0x73d7e814 in GetPasteboardFlavorType () #14 0x701a4880 in CFMessagePortSendRequest () #15 0x7018f39c in CFStringEncodingByteLengthForCharacters () #16 0x7017c1cc in CFRunLoopRunInMode () #17 0x701b70ec in CFRunLoopRunSpecific () #18 0x7017b8cc in CFRunLoopRunInMode () #19 0x7312d904 in InvokeThemeButtonDrawUPP () #20 0x731407a4 in GetNextWindow () #21 0x731715fc in BlockUntilNextEventMatchingListInMode () #22 0x70bd70b8 in _DPSNextEvent () #23 0x70bfe5d8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #24 0x70c23468 in -[NSApplication run] () #25 0x70c91ed0 in NSApplicationMain () #26 0x00003dc4 in main () #27 0x00003ce8 in _start () #28 0x00003b18 in start () I understand that you normally get a SIGBUS as a result of trying to access memory in a way that you don't have permission to, such as writing to a read-only memory location. But I don't have anything like that in my code. I don't believe I have any retain/release/autorelease discrepancies. I can provide code snippets if needed. Any help on this, would be tremendously appreciated. Thanks. - Michael James st962xmz@drexel.edu From johnc at haager.net Fri Aug 16 12:43:06 2002 From: johnc at haager.net (John Haager) Date: Thu Nov 3 14:49:53 2005 Subject: Including JNIlibs in Applications Message-ID: <8D61AF84-B14F-11D6-AF9B-000393583306@haager.net> I have an application which is written in both Java and ObjC. The java portion of the code has a JNI library which implements one of the native methods. I have bundled this library into the application, and when I run it from inside of Project Builder, the application runs fine. The JVM finds and loads the jniLib with no problems. However, when I ran the application from Finder, the program gives an UnsatisifiedLinkError when it tries to load the library. I have confirmed that the Library is, in fact, in the Application bundle. Any suggestions would be very much appreciated. -> John Haager <- From wsanchez at mit.edu Fri Aug 16 13:30:01 2002 From: wsanchez at mit.edu (Wilfredo Sanchez) Date: Thu Nov 3 14:49:53 2005 Subject: [ANN] terminal(.sh) Message-ID: <2C4CAF76-B155-11D6-A9E5-000393A5892E@mit.edu> Old timers recall there once was a terminal command which let you open new windows in Terminal.app with certain options, run commands, etc. Handy for shell scripts that want user input but don't necessary have a tty and so on. Along with Terminal Services, that spiffy but perhaps not very popular feature is gone. So I wrote a shell script which uses AppleScript to rectify this, attached in case people could find uses for it. This script will be in the next roll of DropScript, and combined with DropScript gets you back all of the functionality of Terminal Services, which I also miss. -wsv -------------- next part -------------- A non-text attachment was scrubbed... Name: terminal Type: application/octet-stream Size: 9660 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020816/bbaebddc/terminal.obj -------------- next part -------------- From jseanm at cablelynx.com Fri Aug 16 15:20:01 2002 From: jseanm at cablelynx.com (Sean Morrell) Date: Thu Nov 3 14:49:53 2005 Subject: Problem creating install packages Message-ID: <004001c24572$e65343c0$0300a8c0@duron650> I have created an install package using the native install/package facility of OS X. These packages are created with Package Maker or /usr/bin/package. Everything work fine during an installation except the installer shows a red exclamatory mark on each volume icon, as if the software cannot be installed on any volume. If I double click the root volume, the installer will then show the volume as selected and you can continue with the installation. Has anyone seen this problem? Does anyone have a solution or any suggestions? The software is very small in size and disk space is not an issue. Note that since the software being installed is a driver, I have set the flag indicating the user should only be allowed to install on the root volume. Any help would be greatly appreciated. Thanks, Sean From bmackin at mac.com Fri Aug 16 15:51:01 2002 From: bmackin at mac.com (Ben Mackin) Date: Thu Nov 3 14:49:54 2005 Subject: Useless function or possible BUG In-Reply-To: <9AB23936-3574-11D7-AF41-0030659046EE@intego.com> Message-ID: Running my code, with the following function: myNewData = [myTIFFasBitMap TIFFRepresentationUsingCompression: NSTIFFCompressionPackBits factor:0.0]; Produces a properly compressed tiff image (256k in size). However running my code with the following function instead: myNewData = [myTIFFasBitMap TIFFRepresentationUsingCompression: NSTIFFCompressionCCITTFAX3 factor:0.0]; Produces a raw tiff file (1.8MBs, definatly NOT what I wanted). This compression method is supported according to Apple documentation (the unsuppored ones say they are not supported). For a few more tests, I tried the following, as (suggested by someone on this list) to use in place of the TIFFRepresentationUsingCompression: myDict = [NSDictionary dictionaryWithObject:@"NSTIFFCompressionPackBits " forKey:@"NSImageCompressionMethod"]; myNewData = [myTIFFasBitMap representationUsingType:NSTIFFFileType properties:myDict]; And I just get a raw tiff file (1.8MBs, defiantly NOT what I wanted). Changing the compression type to anything else just gives me the same result, raw tiff file. So what have I learned. -(NSData *)representationUsingType:properties: does nothing useful at all. It just gives me raw tiff files, no matter what compression I ask it to use. I also learned that TIFFRepresentationUsingCompression doesn't allow all the compressions it says it does (it only works with 3 out of the 8 or so listed). So my question is now this. Are these not working because Apple has them set up for them not to work, or is something going wrong? I ask this because what I get from the documentation is that what is not working for me should work. I would really appreciate someone from Apple commenting on this, if they could. Thanks, Ben From epeyton at epicware.com Fri Aug 16 18:40:01 2002 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:49:54 2005 Subject: [ANN] terminal(.sh) In-Reply-To: <2C4CAF76-B155-11D6-A9E5-000393A5892E@mit.edu> Message-ID: <1BF90966-B182-11D6-B0F3-003065CBD1E2@epicware.com> On Friday, August 16, 2002, at 03:17 PM, Wilfredo Sanchez wrote: > Old timers recall there once was a terminal command which let you > open new windows in Terminal.app with certain options, run commands, > etc. Handy for shell scripts that want user input but don't necessary > have a tty and so on. You mean like .command files? Or .term files with the ExecutionString plist entry set? Those both still exist in terminal. > > Along with Terminal Services, that spiffy but perhaps not very > popular feature is gone. So I wrote a shell script which uses > AppleScript to rectify this, attached in case people could find uses > for it. > > This script will be in the next roll of DropScript, and combined > with DropScript gets you back all of the functionality of Terminal > Services, which I also miss. Woo hoo! Eric > > -wsv > > From lxr at mac.com Fri Aug 16 18:52:00 2002 From: lxr at mac.com (Alex Reichstadt) Date: Thu Nov 3 14:49:54 2005 Subject: NSOutlineView question Message-ID: <903E590D-B183-11D6-BC08-003065DA17A4@mac.com> Hi, I have downloaded and am looking at the DragNDrop OutlineView example as well as my own code. I have problems to figure out the concept of the delegate methods, specifically two of them. -(id)outlineView:(NSOutlineView *)ov child:(int)index ofItem:(id)item To get more insight into the matter I have simply added an NSLog that shows what would have been displayed according the the data-source I use. This works in that if I have an amount of x elements in my table each one of them is listed by NSLog. After having iterated over each item the following method is called and I have problems figuring out how it works and what it is supposed to do. -(id)outlineView:(NSOutlineView *)ov objectValueForTableColumn:(NSTableColumn *)tc byItem:(id)item The way I understand NSTableView with which I had no problem the first method would have been enough. I am not certain what I am supposed to do here. I tried to return, for all cases and to start somewhere, @"xyz". But when I do this it causes my app to crash as soon as I click on the NSOutlineView. The example, which by the way I got after having read through the list-archives, is not very clear on that, and by mere means of trying I haven't managed to figure out how it is supposed to work and why my app crashes. I also looked at the docu but that is not of much help neither at this stage. Apologies if this annoys many of you, but could someone give me a push in the right direction? Thank you Alex -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1712 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020816/415a39bb/attachment.bin From rpeskin at rlpcon.com Fri Aug 16 21:23:01 2002 From: rpeskin at rlpcon.com (Richard L. Peskin) Date: Thu Nov 3 14:49:54 2005 Subject: accessing instances from a nib file Message-ID: I have a window with some buttons in it (say a calculator). Assume the "clear" button is part of an NSArray of other buttons. The "clear" button is an "outlet" to a controller (calls a controller method when pressed). All of this is built with IB, so any explicit reference I have to this "clear" button is "hidden" in my .nib file. Now I want to use an awakeFromNib method to provide a custom key equivalent. That is use { myNSButton setKeyEquivalent: [NSString stringWithFormat: @"%x", 0xf739}. (0xf739 is the default Unicode key binding for the Num Lock/Clear key according to NSEvent.h.) How can I reference my "clear" button, i.e. what do I use for myNSButton above? Since instances from nib files are created at load time, how can I reference them in code? thanks. --dick peskin Richard L. Peskin, RLP Consulting, Londonderry, VT http://www.rlpcon.com http://www.caip.rutgers.edu/~peskin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 948 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020816/ddb07caa/attachment.bin From rpeskin at rlpcon.com Fri Aug 16 21:25:03 2002 From: rpeskin at rlpcon.com (Richard L. Peskin) Date: Thu Nov 3 14:49:54 2005 Subject: num lock/clear key LED control Message-ID: <2664ECE6-B199-11D6-8E27-000393639B02@rlpcon.com> Anyone know how to control the green LED in the num lock/clear key so it won't light up when I use that key for special purposes, such as for a calculator clear? thanks, --dick peskin Richard L. Peskin, RLP Consulting, Londonderry, VT http://www.rlpcon.com http://www.caip.rutgers.edu/~peskin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 346 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020816/d1a9e189/attachment.bin From jmdisher at student.math.uwaterloo.ca Fri Aug 16 21:32:01 2002 From: jmdisher at student.math.uwaterloo.ca (Jeff Disher) Date: Thu Nov 3 14:49:54 2005 Subject: accessing instances from a nib file In-Reply-To: Message-ID: I am not sure but doing something like that may be possible by making a category to implement the awakeFromNib method for all NSButton instances with a lookup of the title or tag to resolve which key should be used. That would work in that your code size would be very small (that is, one method that performs all you need to do). However, the more "newbie-ish" and conceptually simple way to do it is to create a controller object instance in the Nib that has an outlet to the buttons you need to set this information for. That way it could send instructions through the outlets when it awakes from the Nib. Does that help? Jeff. On Saturday, August 17, 2002, at 12:22 AM, Richard L. Peskin wrote: > I have a window with some buttons in it (say a calculator). Assume the > "clear" button is part of an NSArray of other buttons. The "clear" > button is an "outlet" to a controller (calls a controller method when > pressed). All of this is built with IB, so any explicit reference I > have to this "clear" button is "hidden" in my .nib file. Now I want to > use an awakeFromNib method to provide a custom key equivalent. That is > use { myNSButton setKeyEquivalent: [NSString stringWithFormat: @"%x", > 0xf739}. > (0xf739 is the default Unicode key binding for the Num Lock/Clear key > according to NSEvent.h.) How can I reference my "clear" button, i.e. > what do I use for myNSButton above? Since instances from nib files are > created at load time, how can I reference them in code? > > thanks. > --dick peskin > > > > Richard L. Peskin, RLP Consulting, Londonderry, VT > http://www.rlpcon.com > http://www.caip.rutgers.edu/~peskin Jeff Disher President and Lead Developer of Spectral Class Spectral Class: Shedding Light on Innovation http://www.spectralclass.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1816 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020816/23530101/attachment.bin From kubernan at 10191.com Sat Aug 17 01:48:02 2002 From: kubernan at 10191.com (kubernan) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology Message-ID: <53217EDF-B1BD-11D6-9F9A-003065BA6A54@10191.com> Hello all, Do you have any idea a about the technology used in the find function of the finder (in Jaguar). It's very fast. I think it uses the locate command. What do you think ? Thx. K. From njriley at uiuc.edu Sat Aug 17 03:08:02 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: <53217EDF-B1BD-11D6-9F9A-003065BA6A54@10191.com> References: <53217EDF-B1BD-11D6-9F9A-003065BA6A54@10191.com> Message-ID: <20020817100659.GB2756271@uiuc.edu> On Sat, Aug 17, 2002 at 10:42:55AM +0200, kubernan wrote: > Hello all, > > Do you have any idea a about the technology used in the find function > of the finder (in Jaguar). It's very fast. > I think it uses the locate command. Nope, my locate database is way out of date and it works fine. > What do you think ? It probably uses FSCatalogSearch or PBCatalogSearch; see Files.h. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From gss+osxdev at cs.brown.edu Sat Aug 17 06:54:01 2002 From: gss+osxdev at cs.brown.edu (Gregory Seidman) Date: Thu Nov 3 14:49:54 2005 Subject: accessing instances from a nib file In-Reply-To: References: Message-ID: <20020817135331.GA27710@cs.brown.edu> Jeff Disher sez: } I am not sure but doing something like that may be possible by making } a category to implement the awakeFromNib method for all NSButton } instances with a lookup of the title or tag to resolve which key should } be used. That would work in that your code size would be very small } (that is, one method that performs all you need to do). However, the } more "newbie-ish" and conceptually simple way to do it is to create a } controller object instance in the Nib that has an outlet to the buttons } you need to set this information for. That way it could send } instructions through the outlets when it awakes from the Nib. Doing it with a category is a nasty hack. Not what you want. IB will let you select the individual button and assign a key equivalent to it anyway. Is there any reason you don't want to do that? } Does that help? } Jeff. --Greg } On Saturday, August 17, 2002, at 12:22 AM, Richard L. Peskin wrote: } > I have a window with some buttons in it (say a calculator). Assume } > the "clear" button is part of an NSArray of other buttons. The } > "clear" button is an "outlet" to a controller (calls a controller } > method when pressed). All of this is built with IB, so any explicit } > reference I have to this "clear" button is "hidden" in my .nib } > file. Now I want to use an awakeFromNib method to provide a custom } > key equivalent. That is use { myNSButton setKeyEquivalent: } > [NSString stringWithFormat: @"%x", 0xf739}. } > (0xf739 is the default Unicode key binding for the Num Lock/Clear } > key according to NSEvent.h.) How can I reference my "clear" button, } > i.e. what do I use for myNSButton above? Since instances from nib } > files are created at load time, how can I reference them in code? } > } > thanks. } > --dick peskin } > } > } > } > Richard L. Peskin, RLP Consulting, Londonderry, VT } > http://www.rlpcon.com } > http://www.caip.rutgers.edu/~peskin } > } Jeff Disher } President and Lead Developer of Spectral Class } Spectral Class: Shedding Light on Innovation } http://www.spectralclass.com/ } From goMac at mac.com Sat Aug 17 11:36:01 2002 From: goMac at mac.com (Colin Cornaby) Date: Thu Nov 3 14:49:54 2005 Subject: Getting the OS Version? In-Reply-To: <200208170433.g7H4X7v01912@slowbro.omnigroup.com> Message-ID: <20549391-B210-11D6-967A-000502310321@mac.com> How do you get the OS version? Long ago I thought I saw it someplace on here, but I searched the list and I couldn't find it. --------------------------------------- Colin Cornaby Official Cocoa Newbie for RBDeveloper Magazine Head Person, Conundrum Software, www.conundrumsoft.com From jsaccente at mac.com Sat Aug 17 11:44:01 2002 From: jsaccente at mac.com (John Saccente) Date: Thu Nov 3 14:49:54 2005 Subject: Getting the OS Version? In-Reply-To: <20549391-B210-11D6-967A-000502310321@mac.com> Message-ID: On Saturday, August 17, 2002, at 01:35 PM, Colin Cornaby wrote: > How do you get the OS version? Long ago I thought I saw it someplace on > here, but I searched the list and I couldn't find it. > I think this is what was mentioned on the list a while back: http://www.cocoadevcentral.com/tutorials/showpage.php?show=00000057.php John From wsanchez at mit.edu Sat Aug 17 11:57:01 2002 From: wsanchez at mit.edu (=?ISO-8859-1?Q?Wilfredo_S=E1nchez?=) Date: Thu Nov 3 14:49:54 2005 Subject: [ANN] terminal(.sh) In-Reply-To: <1BF90966-B182-11D6-B0F3-003065CBD1E2@epicware.com> Message-ID: On Friday, August 16, 2002, at 09:39 PM, Eric Peyton wrote: > On Friday, August 16, 2002, at 03:17 PM, Wilfredo Sanchez wrote: > >> Old timers recall there once was a terminal command which let you >> open new windows in Terminal.app with certain options, run commands, >> etc. Handy for shell scripts that want user input but don't >> necessary have a tty and so on. > > You mean like .command files? Or .term files with the ExecutionString > plist entry set? Those both still exist in terminal. No, .command files don't let you tell terminal where to put a window, what color, how big, nor do they let you open a new window in the middle of a script. .term files do, but it's not exactly as easy to use in a script as a command. Nor can they do things like miniaturize the new window for you, I think: terminal --textsize 80x25 --title "The Doctor Is In" --miniaturize -e "emacs -f doctor" -wsv [pcp312907pcs:~] wsanchez% terminal --help terminal: usage: terminal [-options] [-e command args] options: --help print this help --version print Terminal's version number --isfrontmost print whether Terminal is the frontmost app --activate activate Terminal (bring to front) --size WxH set window size in pixels --textsize WxH set window size in characters --position XxY set window screen position relative to top left corner --origin XxY set window screen position relative to bottom left corner --miniaturized bool miniaturize window --title name set window title; implies "--showtitle true" --bgcolor color set window background color --textcolor color set window text color --boldcolor color set window bold text color --cursorcolor color set window cursor color --showdevice bool show device name in window title bar --showshell bool show shell in window title bar --showsize bool show size in window title bar --showfile bool show file in window title bar --showtitle bool show custom title in window title bar From rpeskin at rlpcon.com Sat Aug 17 12:17:02 2002 From: rpeskin at rlpcon.com (Richard L. Peskin) Date: Thu Nov 3 14:49:54 2005 Subject: accessing instances from a nib file In-Reply-To: <200208171901.g7HJ1kv12879@slowbro.omnigroup.com> Message-ID: IB will only accept chars (8 bit) in the key equivalent setting box (with modifiers of course). The num lock/clear key has a Unicode equiv. of 0x739. Thus we need a programmatic way to set. --dick peskin On Saturday, August 17, 2002, at 03:01 PM, macosx-dev- request@omnigroup.com wrote: > Doing it with a category is a nasty hack. Not what you want. IB will let > you select the individual button and assign a key equivalent to it > anyway. > Is there any reason you don't want to do that? > Richard L. Peskin, RLP Consulting, Londonderry, VT http://www.rlpcon.com http://www.caip.rutgers.edu/~peskin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 671 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020817/fc59903c/attachment.bin From mrmacman_g4 at mac.com Sat Aug 17 13:44:02 2002 From: mrmacman_g4 at mac.com (Kyle Moffett) Date: Thu Nov 3 14:49:54 2005 Subject: NSOutlineView question In-Reply-To: <903E590D-B183-11D6-BC08-003065DA17A4@mac.com> Message-ID: On Friday, August 16, 2002, at 09:49 PM, Alex Reichstadt wrote: > Hi, > > I have downloaded and am looking at the DragNDrop OutlineView example > as well as my own code. I have problems to figure out the concept of > the delegate methods, specifically two of them. > > -(id)outlineView:(NSOutlineView *)ov child:(int)index ofItem:(id)item > > To get more insight into the matter I have simply added an NSLog that > shows what would have been displayed according the the data-source I > use. This works in that if I have an amount of x elements in my table > each one of them is listed by NSLog. > > After having iterated over each item the following method is called and > I have problems figuring out how it works and what it is supposed to do. > > -(id)outlineView:(NSOutlineView *)ov > objectValueForTableColumn:(NSTableColumn *)tc byItem:(id)item > > The way I understand NSTableView with which I had no problem the first > method would have been enough. I am not certain what I am supposed to > do here. I tried to return, for all cases and to start somewhere, > @"xyz". But when I do this it causes my app to crash as soon as I click > on the NSOutlineView. > > The example, which by the way I got after having read through the > list-archives, is not very clear on that, and by mere means of trying I > haven't managed to figure out how it is supposed to work and why my app > crashes. I also looked at the docu but that is not of much help neither > at this stage. > > Apologies if this annoys many of you, but could someone give me a push > in the right direction? > > Thank you > Alex With NSOutline view you get something like this: -------------------------- | Name | Type | -------------------------- | > foo | Plain | | > bar | Plain | | \/ quux | Plain | | > barbar | Double | | \/ foofoo | Double | | Yay | Plain | | > quuxquux | Double | -------------------------- Pretend the internal datasource is something like this: (This is made up syntax) / = array { 0 = dictionary { "__MYNAME__" = "foo"; "__MYTYPE__" = "Plain"; "__MYKIDS__" = array {}; }; 1 = dictionary { "__MYNAME__" = "bar"; "__MYTYPE__" = "Plain"; "__MYKIDS__" = array {}; } 2 = dictionary { "__MYNAME__" = "quux"; "__MYTYPE__" = "Plain" "__MYKIDS__" = array { 0 = dictionary { "__MYNAME__" = "quux"; "__MYTYPE__" = "Double"; "__MYKIDS__" = array {}; }; 1 = dictionary { "__MYNAME__" = "quux"; "__MYTYPE__" = "Double"; "__MYKIDS__" = array { 0 = dictionary { "__MYNAME__" = "Yay"; "__MYTYPE__" = "Plain"; }; }; 2 = dictionary { "__MYNAME__" = "quux"; "__MYTYPE__" = "Double"; "__MYKIDS__" = array {}; }; }; }; }; There are several methods for NSOutline view, regarding children of objects, and whether they are expandable, etc. Those methods all deal with purely abstract objects, the outline view is just helping. I'll include sample implementations for this topic. The drag-n-drop methods are optional, just like NSTableView. # These methods take references to your abstract objects # They are called frequently, so they must be efficient - (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item { if (outlineView != myView) return nil; # This returns another dictionary, but it could be whatever you want return [[item objectForKey:@"__MYKIDS__"] objectAtIndex:index]; } - (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item { if (outlineView != myView) return NO; # Just if it has kids or not return [item objectForKey:@"__MYKIDS__"]; } - (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { if (outlineView != myView) return NO; # Count of __MYKIDS__ return [[item objectForKey:@"__MYKIDS__"] count]; } # Then it asks you for each column of each item: - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)col byItem:(id)item { # outlineView: Self explanatory # col: Same as in an ordinary table view # item: This is whatever abstract object you passed in for that row # You are expected to return an object the cell knows how to display (Usually NSString, NSNumber, etc.) # This object must NOT be autoreleased. You must retain this object yourself and only release it the next # time the tableView asks for it, or just return it again then. if (outlineView != myView) return nil; if ([[col identifier] isEqualToString:@"Name"]) return [item objectForKey:@"__MYNAME__"]; if ([[col identifier] isEqualToString:@"Type"]) return [item objectForKey:@"__MYTYPE__"]; return nil; } Again, you are expected to return an object that will NOT be autoreleased at the end of the run loop, as the NSOutlineView does not retain the stuff it's displaying (I consider that a bug, and it gave me great heartaches in my recent project to replace NetInfo Manager with something more robust and powerful) This makes it difficult to autogenerate values on the fly, but you must tie the value to a dictionary or array of some kind, then release it the next time around when you return the new value. If you need another, better example, email me and I'll send you my NetInfo database project (At the moment it can only read, not write) Hope That Helps, Kyle Moffett -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 5677 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020817/c7bb8e85/attachment.bin From lxr at mac.com Sat Aug 17 14:31:43 2002 From: lxr at mac.com (Alex Reichstadt) Date: Thu Nov 3 14:49:54 2005 Subject: NSOutlineView question In-Reply-To: Message-ID: This makes sense and I have understood that. Thank you very, very much, Kyle, for all your efforts, this is great Alex Am Samstag, 17.08.02, um 13:42 Uhr (US/Pacific) schrieb Kyle Moffett: > Von: Kyle Moffett > Datum: Sa, 17. Aug 2002 13:42:41 US/Pacific > An: Alex Reichstadt > Cc: macosx-dev@omnigroup.com > Betreff: Re: NSOutlineView question > > On Friday, August 16, 2002, at 09:49 PM, Alex Reichstadt wrote: >> Hi, >> >> I have downloaded and am looking at the DragNDrop OutlineView example >> as well as my own code. I have problems to figure out the concept of >> the delegate methods, specifically two of them. >> >> -(id)outlineView:(NSOutlineView *)ov child:(int)index ofItem:(id)item >> >> To get more insight into the matter I have simply added an NSLog that >> shows what would have been displayed according the the data-source I >> use. This works in that if I have an amount of x elements in my table >> each one of them is listed by NSLog. >> >> After having iterated over each item the following method is called >> and I have problems figuring out how it works and what it is supposed >> to do. >> >> -(id)outlineView:(NSOutlineView *)ov >> objectValueForTableColumn:(NSTableColumn *)tc byItem:(id)item >> >> The way I understand NSTableView with which I had no problem the >> first method would have been enough. I am not certain what I am >> supposed to do here. I tried to return, for all cases and to start >> somewhere, @"xyz". But when I do this it causes my app to crash as >> soon as I click on the NSOutlineView. >> >> The example, which by the way I got after having read through the >> list-archives, is not very clear on that, and by mere means of trying >> I haven't managed to figure out how it is supposed to work and why my >> app crashes. I also looked at the docu but that is not of much help >> neither at this stage. >> >> Apologies if this annoys many of you, but could someone give me a >> push in the right direction? >> >> Thank you >> Alex > > With NSOutline view you get something like this: > > -------------------------- > | Name | Type | > -------------------------- > | > foo | Plain | > | > bar | Plain | > | \/ quux | Plain | > | > barbar | Double | > | \/ foofoo | Double | > | Yay | Plain | > | > quuxquux | Double | > -------------------------- > > Pretend the internal datasource is something like this: (This is made > up syntax) > > / = array { > 0 = dictionary { > "__MYNAME__" = "foo"; > "__MYTYPE__" = "Plain"; > "__MYKIDS__" = array {}; > }; > > 1 = dictionary { > "__MYNAME__" = "bar"; > "__MYTYPE__" = "Plain"; > "__MYKIDS__" = array {}; > } > > 2 = dictionary { > "__MYNAME__" = "quux"; > "__MYTYPE__" = "Plain" > "__MYKIDS__" = array { > 0 = dictionary { > "__MYNAME__" = "quux"; > "__MYTYPE__" = "Double"; > "__MYKIDS__" = array {}; > }; > > 1 = dictionary { > "__MYNAME__" = "quux"; > "__MYTYPE__" = "Double"; > "__MYKIDS__" = array { > 0 = dictionary { > "__MYNAME__" = "Yay"; > "__MYTYPE__" = "Plain"; > }; > }; > > 2 = dictionary { > "__MYNAME__" = "quux"; > "__MYTYPE__" = "Double"; > "__MYKIDS__" = array {}; > }; > }; > }; > }; > > There are several methods for NSOutline view, regarding children of > objects, > and whether they are expandable, etc. Those methods all deal with > purely abstract > objects, the outline view is just helping. I'll include sample > implementations for > this topic. The drag-n-drop methods are optional, just like > NSTableView. > > # These methods take references to your abstract objects > # They are called frequently, so they must be efficient > > - (id)outlineView:(NSOutlineView *)outlineView child:(int)index > ofItem:(id)item { > if (outlineView != myView) return nil; > # This returns another dictionary, but it could be whatever you want > return [[item objectForKey:@"__MYKIDS__"] objectAtIndex:index]; > } > > - (BOOL)outlineView:(NSOutlineView *)outlineView > isItemExpandable:(id)item { > if (outlineView != myView) return NO; > # Just if it has kids or not > return [item objectForKey:@"__MYKIDS__"]; > } > > - (int)outlineView:(NSOutlineView *)outlineView > numberOfChildrenOfItem:(id)item { > if (outlineView != myView) return NO; > # Count of __MYKIDS__ > return [[item objectForKey:@"__MYKIDS__"] count]; > } > > # Then it asks you for each column of each item: > > - (id)outlineView:(NSOutlineView *)outlineView > objectValueForTableColumn:(NSTableColumn *)col byItem:(id)item { > # outlineView: Self explanatory > # col: Same as in an ordinary table view > # item: This is whatever abstract object you passed in for > that row > # You are expected to return an object the cell knows how to display > (Usually NSString, NSNumber, etc.) > # This object must NOT be autoreleased. You must retain this object > yourself and only release it the next > # time the tableView asks for it, or just return it again then. > if (outlineView != myView) return nil; > if ([[col identifier] isEqualToString:@"Name"]) return [item > objectForKey:@"__MYNAME__"]; > if ([[col identifier] isEqualToString:@"Type"]) return [item > objectForKey:@"__MYTYPE__"]; > return nil; > } > > Again, you are expected to return an object that will NOT be > autoreleased at the end of the run loop, > as the NSOutlineView does not retain the stuff it's displaying (I > consider that a bug, and it gave me > great heartaches in my recent project to replace NetInfo Manager with > something more robust and powerful) > This makes it difficult to autogenerate values on the fly, but you > must tie the value to a dictionary or > array of some kind, then release it the next time around when you > return the new value. > > If you need another, better example, email me and I'll send you my > NetInfo database project (At the moment it can only read, not write) > > Hope That Helps, > Kyle Moffett -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 6151 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020817/f52835ea/attachment.bin From demarco at apple.com Sat Aug 17 20:39:03 2002 From: demarco at apple.com (Vince DeMarco) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: <20020817100659.GB2756271@uiuc.edu> Message-ID: nope it uses VTwin indexing engine vince On Saturday, August 17, 2002, at 03:06 AM, Nicholas Riley wrote: > On Sat, Aug 17, 2002 at 10:42:55AM +0200, kubernan wrote: >> Hello all, >> >> Do you have any idea a about the technology used in the find function >> of the finder (in Jaguar). It's very fast. >> I think it uses the locate command. > > Nope, my locate database is way out of date and it works fine. > >> What do you think ? > > It probably uses FSCatalogSearch or PBCatalogSearch; see Files.h. > > -- > =Nicholas Riley | > > Pablo Research Group, Department of Computer Science and > Medical Scholars Program, University of Illinois at Urbana-Champaign > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From demarco at apple.com Sat Aug 17 20:40:02 2002 From: demarco at apple.com (Vince DeMarco) Date: Thu Nov 3 14:49:54 2005 Subject: accessing instances from a nib file In-Reply-To: Message-ID: <1D0BDB98-B25C-11D6-B5E6-0003930FDF98@apple.com> On Saturday, August 17, 2002, at 12:16 PM, Richard L. Peskin wrote: > IB will only accept chars (8 bit) in the key equivalent setting box > (with modifiers of course). The num lock/clear key has a Unicode > equiv. of 0x739. Thus we need a programmatic way to set. Please file a bug saying that you want this. IB really should do this for you having to write code to set the key equiv isn't really nice. vince > --dick peskin > On Saturday, August 17, 2002, at 03:01 PM, > macosx-dev-request@omnigroup.com wrote: > >> Doing it with a category is a nasty hack. Not what you want. IB will >> let >> you select the individual button and assign a key equivalent to it >> anyway. >> Is there any reason you don't want to do that? >> > > > > > Richard L. Peskin, RLP Consulting, Londonderry, VT > http://www.rlpcon.com > http://www.caip.rutgers.edu/~peskin From alex at mindlube.com Sat Aug 17 21:18:01 2002 From: alex at mindlube.com (Alex Rice) Date: Thu Nov 3 14:49:54 2005 Subject: Flash movie in Apple Help Viewer? Message-ID: <5CA5BB54-B261-11D6-A918-000393529642@mindlube.com> Flash player comes with OS X, but Apple Help Viewer cannot display flash movies. Is this correct? If anyone can provide a counter-example I would be happy to see it. Thanks, Alex Rice Mindlube Software http://www.mindlube.com/ From cmh at bDistributed.com Sat Aug 17 22:28:01 2002 From: cmh at bDistributed.com (Chris Hanson) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: <53217EDF-B1BD-11D6-9F9A-003065BA6A54@10191.com> References: <53217EDF-B1BD-11D6-9F9A-003065BA6A54@10191.com> Message-ID: At 10:42 AM +0200 8/17/02, kubernan wrote: >Do you have any idea a about the technology used in the find function >of the finder (in Jaguar). It's very fast. I think it just uses the HFS+ catalog search functions (FS/PBCatalogSearch). HFS/HFS+ keeps all catalog information in a couple of B*-trees. This makes it significantly more efficient to search the catalog information on an HFS+ volume than on (say) a UFS or NFS volume. I believe the AppleShare Filing Protocol also natively supports catalog searches, so one search command is sent across the wire and result sets are received rather than requiring the client to perform the search over the network on its own. Microsoft's NTFS also keeps catalog information separate from other data. In fact, it exceeds this HFS design trait, as internally it's structured similarly to the way relational databases are implemented under the hood. NTFS keeps all file and catalog information for a volume in a Master File Table with a fixed but large (512 byte to 4KB or 8KB) row size; attributes that overflow one row get stored in overflow blocks, and separate B*-tree indexes are maintained for indexed attributes like file name. (In the NTFS model, a file's forks are just named attributes like any others. An extremely small file on a volume with a large MFT row size may fit entirely inside the MFT row.) UFS keeps almost all information about the structure of a file in one place -- the inode table -- but all information about file names and directories is spread all over the disk. Directories in UFS are just a special kind file; their contents are a listing of what's in the directory. This means searching the catalog for a file name can wind up opening, reading, and closing *lots* of files (directories) and potentially lots of head thrashing. -- Chris -- who has spent way too much time learning about filesystem internals over the years -- Chris Hanson | Email: cmh@bDistributed.com bDistributed.com, Inc. | Phone: +1-847-372-3955 Making Business Distributed | Fax: +1-847-589-3738 http://bdistributed.com/ | Personal Email: cmh@mac.com From jgrosjean at gooeyball.com Sat Aug 17 22:38:01 2002 From: jgrosjean at gooeyball.com (Jesse Grosjean) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: <200208180342.g7I3gcv24071@slowbro.omnigroup.com> Message-ID: Is there a framework to access the VTwin indexing engine? Or will their be soon in Jaguar? Thanks, Jesse > Message: 4 > Date: Sat, 17 Aug 2002 20:38:30 -0700 > Subject: Re: Jaguar : fast search technology > Cc: kubernan , macosx-dev@omnigroup.com > To: Nicholas Riley > From: Vince DeMarco > > nope it uses VTwin indexing engine > > vince > > On Saturday, August 17, 2002, at 03:06 AM, Nicholas Riley wrote: > >> On Sat, Aug 17, 2002 at 10:42:55AM +0200, kubernan wrote: >>> Hello all, >>> >>> Do you have any idea a about the technology used in the find function >>> of the finder (in Jaguar). It's very fast. >>> I think it uses the locate command. >> >> Nope, my locate database is way out of date and it works fine. >> >>> What do you think ? >> >> It probably uses FSCatalogSearch or PBCatalogSearch; see Files.h. >> >> -- >> =Nicholas Riley | >> >> Pablo Research Group, Department of Computer Science and >> Medical Scholars Program, University of Illinois at Urbana-Champaign >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev From kubernan at 10191.com Sat Aug 17 23:02:01 2002 From: kubernan at 10191.com (kubernan) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: Message-ID: Le dimanche, 18 ao? 2002, ? 05:15 Europe/Paris, Chris Hanson a ?crit : > At 10:42 AM +0200 8/17/02, kubernan wrote: >> Do you have any idea a about the technology used in the find function >> of the finder (in Jaguar). It's very fast. > > I think it just uses the HFS+ catalog search functions > (FS/PBCatalogSearch). Well, it means there is no implementation in pure Cocoa... So, where is OmniAIAT ? I found only two entries in my own archive omni mailing list. Thx. K. From kubernan at 10191.com Sun Aug 18 01:38:02 2002 From: kubernan at 10191.com (kubernan) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : NSNetServices Message-ID: Hello, I'm looking for NSNetServices tutorial and sample code (other than the sample in developer package). Maybe i don't understand well the NSNetServices but it seems we can use it instead of Distributed Object. What do you think ? Thx. K. From joar at joar.com Sun Aug 18 01:45:02 2002 From: joar at joar.com (j o a r) Date: Thu Nov 3 14:49:54 2005 Subject: Flash movie in Apple Help Viewer? In-Reply-To: <5CA5BB54-B261-11D6-A918-000393529642@mindlube.com> Message-ID: What if you save the flash movie as a QuickTime ".mov" file first? QuickTime supports flash movie files up to the latest version -1, whatever that is right now. Help viewer displays HTML files, but isn't really a web browser which is why I wouldn't expect it to use the web browser plugins installed (and hence no direct support for flash movie files), but since it supports QT movies I think that would work. j o a r On Sunday, Aug 18, 2002, at 06:17 Europe/Stockholm, Alex Rice wrote: > Flash player comes with OS X, but Apple Help Viewer cannot display > flash movies. Is this correct? If anyone can provide a counter-example > I would be happy to see it. From chmod007 at mac.com Sun Aug 18 02:02:01 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : NSNetServices In-Reply-To: Message-ID: > Hello, > > I'm looking for NSNetServices tutorial and sample code (other than the > sample in > developer package). > > Maybe i don't understand well the NSNetServices but it seems we can use > it > instead of Distributed Object. > What do you think ? > > Thx. > K. NSNetServices is the Cocoa name for Rendezvous. It is used to publish and discover services on the network. You are then responsible for making the connection yourself, by DO or sockets, or whatever you like. / Sincerely, David Remahl From madsbakholt at mac.com Sun Aug 18 04:52:01 2002 From: madsbakholt at mac.com (Mads Bakholt) Date: Thu Nov 3 14:49:54 2005 Subject: OmniWeb Bookmarks behavior! Message-ID: Hi, I'm developing an application which is to provide bookmarks and then I looked at OmniWeb's way of presenting them: - If OmniWeb hasn't got any documents open, display the bookmarks in a window. - If OmniWeb has got one or more documents open, display the bookmarks in a drawer. Now... My application is a Cocoa Document Application, which of course involves from zero documents open to X documents, but my problem with this setup is as follows: - Bookmarks.nib is a complete bookmarks setup with NSWindow, NSOutlineView, etc. Bookmarks has its own controller, Bookmarks.h/m - Document.nib is the common document setup *incl.* the drawer for bookmarks Document has its own controller, Document.h/m - Menu.nib is the common menu setup incl. an item "Show Bookmarks..." from which the action "showBookmarks" is invoked Menu has its own controller, Controller.h/m Now... My problem is, that the actual method for displaying bookmarks is located in Menu's controller, but the outlet pointing to the Drawer in the document is located in Document.nib/h - how can I from the controller code of Menu.nib get access to Document.nib's outlet, drawerBookmarks in order to open the drawer, like the pseudo code below: if (no_documents_open){ Load_Nib_File @"Bookmarks.nib"; show_window; }else{ Get_Hands_On_NSDrawer_Outlet_In_Document.nib; Tell_It_To_OpenOnEdge:right; } Kind regards, Mads From clems at mac.com Sun Aug 18 05:42:01 2002 From: clems at mac.com (=?ISO-8859-1?Q?Cl=E9ment_Wehrung?=) Date: Thu Nov 3 14:49:54 2005 Subject: Backup software and NSFileManager Message-ID: Hello, I'm working on a Cocoa-Backup software, and i have two questions : - if someone want to work with me on it, you can contact me : clems@mac.com - to make a copy, i tried to use NSFileManager to copy, but the problem is, NSFileManager put the file i want to copy in memory and after past it on hard drive, it's cool but not for big files, when the file is bigger than 20 Mo it's really a problem. And imagin with a image of disc of 500 Mo.. how to copy directly from source to destination ? Thanks From epeyton at epicware.com Sun Aug 18 07:29:01 2002 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : NSNetServices In-Reply-To: Message-ID: On Sunday, August 18, 2002, at 03:37 AM, kubernan wrote: > Hello, > > I'm looking for NSNetServices tutorial and sample code (other than the > sample in > developer package). > > Maybe i don't understand well the NSNetServices but it seems we can > use it > instead of Distributed Object. > What do you think ? > I think you are wrong :-) Well partly. Okay - you are right :-) Seriously, NSNetServices is the Cocoa level of the Rendezvous API. Rendezvous is an enabling technology to allow machines and devices on a network to initially find each other (i.e. rendezvous). The technology you use from that point on is up to you (DO, any other network transport technology, etc.). NSNetServices cannot be used instead of DO, it would be used in conjunction with DO. I have a strong feeling that at some point Rendezvous will take the place of the older nameserver features that DO relied upon "back in the day", but that is not yet available and as such you will need to use Rendezvous to discover the devices and machines, and then you can use DO to communicate between the clients and the servers. Eric > Thx. > K. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From finlay at dobbie.net Sun Aug 18 09:06:00 2002 From: finlay at dobbie.net (Finlay Dobbie) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: Message-ID: <2D1A8B90-B2C4-11D6-83E4-000502319F17@dobbie.net> On Sunday, August 18, 2002, at 07:01 AM, kubernan wrote: > So, where is OmniAIAT ? I found only two entries in my own archive omni > mailing list. OmniAIAT depends on AIAT, which while ported from OS 8.x to Rhapsody never made its way to OS X. On Sunday, August 18, 2002, at 04:38 AM, Vince DeMarco wrote: > nope it uses VTwin indexing engine Isn't V-Twin only used in Find By Content? -- Finlay -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 489 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020818/083dfe29/attachment.bin From goMac at mac.com Sun Aug 18 09:11:01 2002 From: goMac at mac.com (Colin Cornaby) Date: Thu Nov 3 14:49:54 2005 Subject: Finding out what's on the other side of a NSOutlet In-Reply-To: <200208180342.g7I3gZv24051@slowbro.omnigroup.com> Message-ID: <02521A2C-B2C5-11D6-B281-000502310321@mac.com> Is there a way to find out what is on the other side of a outlet at runtime? I may be working with two builds with two nibs but I want to keep the same code (so I can use targets). --------------------------------------- Colin Cornaby Official Cocoa Newbie for RBDeveloper Magazine Head Person, Conundrum Software, www.conundrumsoft.com From thilo at itoast.de Sun Aug 18 09:13:01 2002 From: thilo at itoast.de (Thilo Ettelt) Date: Thu Nov 3 14:49:54 2005 Subject: Accepting all file types? Message-ID: <309BBBBC-B2C5-11D6-A645-000393077E40@itoast.de> Hi! How can I make my app accept all file types? Is there a special filetype? Cheers, Thilo From tuparev at mac.com Sun Aug 18 09:39:01 2002 From: tuparev at mac.com (Georg Tuparev) Date: Thu Nov 3 14:49:54 2005 Subject: Accepting all file types? In-Reply-To: <309BBBBC-B2C5-11D6-A645-000393077E40@itoast.de> Message-ID: <148F4832-B2C9-11D6-BB6D-0050E4CE9962@mac.com> How about putting "*" as a document type extension (PB->Target->Application Settings->Document Types)? cheers -- georg -- On Sunday, August 18, 2002, at 06:11 PM, Thilo Ettelt wrote: > Hi! How can I make my app accept all file types? Is there a special > filetype? > > Georg Tuparev Tuparev Technologies Klipper 13 1186 VR Amstelveen The Netherlands Mobile: +31-6-55798196 From rosyna at unsanity.com Sun Aug 18 11:02:01 2002 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: References: Message-ID: For the File Attribute searches as well? (Name, Date, File Size) Ack, at 8/17/02, Vince DeMarco said: >nope it uses VTwin indexing engine -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insanely Great People --- Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks. From rosyna at unsanity.com Sun Aug 18 11:08:01 2002 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:49:54 2005 Subject: Jaguar : fast search technology In-Reply-To: <2D1A8B90-B2C4-11D6-83E4-000502319F17@dobbie.net> References: <2D1A8B90-B2C4-11D6-83E4-000502319F17@dobbie.net> Message-ID: V-Twin is AIAT http://developer.apple.com/dev/aiat/ Ack, at 8/18/02, Finlay Dobbie said: >OmniAIAT depends on AIAT, which while ported from OS 8.x to Rhapsody >never made its way to OS X. > >On Sunday, August 18, 2002, at 04:38 AM, Vince DeMarco wrote: > >>nope it uses VTwin indexing engine > >Isn't V-Twin only used in Find By Content? -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insanely Great People --- Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/20020818/5a8df85f/attachment.html From thilo at itoast.de Sun Aug 18 11:16:01 2002 From: thilo at itoast.de (Thilo Ettelt) Date: Thu Nov 3 14:49:54 2005 Subject: Accepting all file types? In-Reply-To: <148F4832-B2C9-11D6-BB6D-0050E4CE9962@mac.com> Message-ID: <68A4F5A1-B2D6-11D6-89C9-000393077E40@itoast.de> Great, thx! What about folders? :) Cheers, Thilo Am Sonntag, 18.08.02 um 18:39 Uhr schrieb Georg Tuparev: > How about putting "*" as a document type extension > (PB->Target->Application Settings->Document Types)? > cheers > -- georg -- > On Sunday, August 18, 2002, at 06:11 PM, Thilo Ettelt wrote: > >> Hi! How can I make my app accept all file types? Is there a special >> filetype? >> >> > Georg Tuparev > Tuparev Technologies > Klipper 13 > 1186 VR Amstelveen > The Netherlands > Mobile: +31-6-55798196 > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From sean at skti.org Sun Aug 18 11:28:01 2002 From: sean at skti.org (Sean Kelly) Date: Thu Nov 3 14:49:55 2005 Subject: Accepting all file types? In-Reply-To: <68A4F5A1-B2D6-11D6-89C9-000393077E40@itoast.de> Message-ID: <110B0901-B2D8-11D6-BACC-0003931D82D2@skti.org> If you are creating your own NSOpenPanel, you would just set the attribute canChooseDirectories, like this: [openPanel setCanChooseDirectories:YES]; If you are using the built-in open document panel for a Document-based app, I'm not sure how to let you open folders. Sean Kelly On Sunday, August 18, 2002, at 02:15 PM, Thilo Ettelt wrote: > Great, thx! What about folders? :) > > > Cheers, Thilo > > Am Sonntag, 18.08.02 um 18:39 Uhr schrieb Georg Tuparev: > >> How about putting "*" as a document type extension >> (PB->Target->Application Settings->Document Types)? >> cheers >> -- georg -- >> On Sunday, August 18, 2002, at 06:11 PM, Thilo Ettelt wrote: >> >>> Hi! How can I make my app accept all file types? Is there a special >>> filetype? >>> >>> >> Georg Tuparev >> Tuparev Technologies >> Klipper 13 >> 1186 VR Amstelveen >> The Netherlands >> Mobile: +31-6-55798196 >> >> _______________________________________________ >> 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 robert.fischer at berlin.de Sun Aug 18 11:37:01 2002 From: robert.fischer at berlin.de (Robert Fischer) Date: Thu Nov 3 14:49:55 2005 Subject: Accepting all file types? In-Reply-To: <68A4F5A1-B2D6-11D6-89C9-000393077E40@itoast.de> Message-ID: <568B52A0-B2D9-11D6-8802-003065E61D62@berlin.de> On Sunday, August 18, 2002, at 08:15 PM, Thilo Ettelt wrote: > Great, thx! What about folders? :) See the TextEdit example in /Developer/Examples/AppKit. TextEdit accepts all kinds of files, alas it does not handle folders in a senseful manner. Maybe it is the Document Type entry with 'OS Types' == "****" and 'Extensions' "*". CU, Robert -- --- - .-. -- -- --- / \ ---- Robert Fischer .-. / \ --- .-. __o .-. @ / \ / \ / \ _`\<,_ / \ berlin.de / \ / \ / \ (*)/ (*) / `-------------- / `---' `-' `-----------' From finlay at dobbie.net Sun Aug 18 11:51:01 2002 From: finlay at dobbie.net (Finlay Dobbie) Date: Thu Nov 3 14:49:55 2005 Subject: Jaguar : fast search technology In-Reply-To: Message-ID: <4D8EC7DC-B2DB-11D6-83E4-000502319F17@dobbie.net> On Sunday, August 18, 2002, at 06:58 PM, Rosyna wrote: > V-Twin is AIAT Well, AIAT is an SDK for embedding V-Twin indexing and search technology in your applications, AFAIK (I'm not really all that familiar with it). AIAT is not available in OS X, but V-Twin is used under the hood of Find by Content, for which there is a public API. This was discussed in the past. -- Finlay From valdesl at wanadoo.fr Sun Aug 18 12:14:01 2002 From: valdesl at wanadoo.fr (Laurent Valdes) Date: Thu Nov 3 14:49:55 2005 Subject: MacOSX-dev digest, Vol 1 #1913 - 17 msgs Message-ID: <3D49FF790056B1AF@mel-rta8.wanadoo.fr> (added by postmaster@wanadoo.fr) ======================== Hello, You have just sent me an HTML message. Nevertheless, for technical reasons, I can't read them. I ask you so or to dismiss it in *Plain Text* or not to dismiss it more of the whole. Should the opposite occur you will *always* receive this message. Thank you in advance. ======================== Bonjour, Vous venez juste de m'envoyer un message HTML. Or, pour des raisons techniques, je ne peut les lire. Je vous demande donc soit de le renvoyer en Plain Text soit de ne plus le renvoyer du tout. Dans le cas contraire vous recevrez ce message. Merci d'avance. ======================== From thilo at itoast.de Sun Aug 18 12:36:01 2002 From: thilo at itoast.de (Thilo Ettelt) Date: Thu Nov 3 14:49:55 2005 Subject: Accepting all file types? In-Reply-To: <568B52A0-B2D9-11D6-8802-003065E61D62@berlin.de> Message-ID: <45430AD9-B2E1-11D6-B339-000393077E40@itoast.de> Thank you, that works wonderfully! Cheers, Thilo Am Sonntag, 18.08.02 um 20:35 Uhr schrieb Robert Fischer: > > On Sunday, August 18, 2002, at 08:15 PM, Thilo Ettelt wrote: > >> Great, thx! What about folders? :) > > See the TextEdit example in /Developer/Examples/AppKit. TextEdit > accepts all kinds of files, alas it does not handle folders in a > senseful manner. Maybe it is the Document Type entry with 'OS Types' > == "****" and 'Extensions' "*". > > > CU, > > Robert > > -- > --- - .-. -- -- > --- / \ ---- Robert Fischer > .-. / \ --- .-. __o .-. @ > / \ / \ / \ _`\<,_ / \ berlin.de > / \ / \ / \ (*)/ (*) / `-------------- > / `---' `-' `-----------' > From s.mecklenburg at t-online.de Sun Aug 18 12:38:03 2002 From: s.mecklenburg at t-online.de (Sebastian Mecklenburg) Date: Thu Nov 3 14:49:55 2005 Subject: OpenGL Shader Builder? Message-ID: hello, on jaguar there is the cool new tool called "OpenGL Shader Builder". does someone know if there is any documentation? also, i'd like to run the shader example programs from the nvidia sdk which use the same instruction set, but the access to the data (current matrix, vertex coords, lights in the scene etc) is different. has someone an idea if there is an easy way to convert them? regards s/m -- sebastian mecklenburg | Early to rise, early to bed, sebi@cyte.de | makes a man healthy, wealthy and dead. http://sebi.cyte.de | (Terry Pratchett, paraphrasing James Thurber) From rpeskin at rlpcon.com Sun Aug 18 14:04:01 2002 From: rpeskin at rlpcon.com (Richard L. Peskin) Date: Thu Nov 3 14:49:55 2005 Subject: Unicode help needed Message-ID: Any Unicode experts out there? I need to use a key equivalent that is assigned a Unicode number. To be specific the num lock/clear key is assigned 0xf739. I need to use the NSButtonCell method to set a key equivalent, i.e. NSButtonCell clearKey; [clearKey setKeyEquivalent: [NSString stringWithUTF8String: (char *)equiv]]; How do I specify "equiv" ? The documentation says the parameter for NSString stringWithUTF8String: (char *)bytes, but this doesn't seem to work. Anyone know how to use NSString stringWithUTF8String: (char *) bytes ? thanks, --dick peskin Richard L. Peskin, RLP Consulting, Londonderry, VT http://www.rlpcon.com http://www.caip.rutgers.edu/~peskin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 729 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020818/83b8ffac/attachment.bin From bwebster at mac.com Sun Aug 18 14:46:03 2002 From: bwebster at mac.com (Brian Webster) Date: Thu Nov 3 14:49:55 2005 Subject: Accepting all file types? In-Reply-To: <200208181817.g7IIH7v04607@slowbro.omnigroup.com> Message-ID: On Sunday, August 18, 2002, at 01:17 PM, macosx-dev- request@omnigroup.com wrote: > Great, thx! What about folders? :) An entry of 'fold' in the OS Types field should do it. -- Brian Webster bwebster@mac.com http://homepage.mac.com/bwebster From goMac at mac.com Sun Aug 18 16:11:01 2002 From: goMac at mac.com (Colin Cornaby) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: <200208181901.g7IJ1Cv05605@slowbro.omnigroup.com> Message-ID: I have code that will put each line of a text file in a array and then find a line and work with it. Here is a example: + (int)linetotal:(id)stringval{ NSArray *fileLines; fileLines = [stringval componentsSeparatedByString:@"\n"]; return [fileLines count]; } This works fine. However, it seems TextEdit has problems saving .txt files. Here is one example. This is how the text looks in TextEdit: 10.0 10.0.4 10.0.4 aquaoriginal /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/Resources/Extras.rsrc /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/Resources/HIToolbox.rsrc This is how it looks in Pico: 10.0^M10.0.4^M10.0.4^Maquaoriginal /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/Resources/Extras.rsrc /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/Resources/HIToolbox.rsrc My program will return that the file has 3 lines of text. It obviously has more. Are there any solutions to getting TextEdit files to read properly? --------------------------------------- Colin Cornaby Official Cocoa Newbie for RBDeveloper Magazine Head Person, Conundrum Software, www.conundrumsoft.com From pcoskren at mac.com Sun Aug 18 16:40:01 2002 From: pcoskren at mac.com (Patrick Coskren ) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: Message-ID: Hi, It looks to me like your source file is confused about line endings. Half the lines end in Mac line endings (\r), the other end in Unix (\n). TextEdit evidently understands both types, but Pico's confused, as is your code, which assumes \n line endings. In other words, the file got corrupted at some point, and without knowing the full pedigree of the file, I won't speculate as to why. (I'll note that when I save a file in TextEdit, it's all \n, like a good Unix citizen.) Possible responses: 1.) Upgrade your code so it separates based on \n, \r, and for extra credit, \n\r (Windows). 2.) Go and download BBEdit Lite from It's got a simple pulldown button that lets you set the line endings for your entire file. Switch everything to Unix line endings, then save. I hope that helps, -Patrick On Sunday, August 18, 2002, at 07:10 PM, Colin Cornaby wrote: > I have code that will put each line of a text file in a array and then > find a line and work with it. Here is a example: > > + (int)linetotal:(id)stringval{ > NSArray *fileLines; > fileLines = [stringval componentsSeparatedByString:@"\n"]; > return [fileLines count]; > } > > This works fine. However, it seems TextEdit has problems saving .txt > files. Here is one example. This is how the text looks in TextEdit: > > 10.0 > 10.0.4 > 10.0.4 > aquaoriginal > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/Extras.rsrc > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/HIToolbox.rsrc > > This is how it looks in Pico: > > 10.0^M10.0.4^M10.0.4^Maquaoriginal > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/Extras.rsrc > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/HIToolbox.rsrc > > My program will return that the file has 3 lines of text. It obviously > has more. > > Are there any solutions to getting TextEdit files to read properly? > > --------------------------------------- > Colin Cornaby > Official Cocoa Newbie for RBDeveloper Magazine > Head Person, Conundrum Software, www.conundrumsoft.com > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From lxr at mac.com Sun Aug 18 16:57:01 2002 From: lxr at mac.com (Alex Reichstadt) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: Message-ID: You have various options. > + (int)linetotal:(id)stringval{ > NSArray *fileLines; > fileLines = [stringval componentsSeparatedByString:@"\n"]; > return [fileLines count]; > } 1. In your code just separate it first splitting at \n, put it back together using \r, then separate everything using \r which should give you a file with one type of linebreak only. 2. You can just write a perl script that does the same, but this is only of advantage if you have use for it beyond your current needs. 3. You can use BBEdit, but make sure you use 6.5.2, not 6.5, the latter shows some very odd behavior that is very confusing with regard to this and other encoding aspects. 4. You can use "cyclone carbon" which is an encoding-converter that utilizes the Apple suite for that purpsoe and also standardizes linebreaks. I would recommend to check out this last option first. It's freeware, you can get it from versiontracker and it is very useful for many other things. Alex -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1018 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020818/73e69ec5/attachment.bin From jmdisher at student.math.uwaterloo.ca Sun Aug 18 17:31:01 2002 From: jmdisher at student.math.uwaterloo.ca (Jeffrey Michael Disher) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: Message-ID: Just one technicality that I thought I should clarify before anyone gets burned by it: "\n" doesn't actually mean anything. It is a sort of "macro" in the sense that your compiler replaces with your "native" line ending character(s). "\r" means "carriage return" which is the native line ending format for Mac OS (non Mach-o). "\f" means "form feed" which is the native line ending format for Unix-based systems (which includes Mac OS X Mach-o binaries). Thus you should be careful when using the "\n" as your newline character since you may produce non-portable code. I recently learned this lesson while working on a Flex-based tokenizer which worked perfectly when compiled with GCC but failed with CodeWarrior. Since I was using CodeWarrior to compile a CFM target (I assume it would do it properly for Mach-o) I needed to specify the "\f" new line character since it was parsing Unix files. The "^M" character you see when using and editor like Pico or Vi is how Unix sees the \r Mac OS line ending character. Hope that is useful, Jeff. On Sun, 18 Aug 2002, Patrick Coskren wrote: > Hi, > > It looks to me like your source file is confused about line endings. > Half the lines end in Mac line endings (\r), the other end in Unix > (\n). TextEdit evidently understands both types, but Pico's confused, > as is your code, which assumes \n line endings. In other words, the > file got corrupted at some point, and without knowing the full pedigree > of the file, I won't speculate as to why. (I'll note that when I save a > file in TextEdit, it's all \n, like a good Unix citizen.) > > Possible responses: > 1.) Upgrade your code so it separates based on \n, \r, and for extra > credit, \n\r (Windows). > 2.) Go and download BBEdit Lite from It's > got a simple pulldown button that lets you set the line endings for your > entire file. Switch everything to Unix line endings, then save. > > I hope that helps, > -Patrick > > On Sunday, August 18, 2002, at 07:10 PM, Colin Cornaby wrote: > > > I have code that will put each line of a text file in a array and then > > find a line and work with it. Here is a example: > > > > + (int)linetotal:(id)stringval{ > > NSArray *fileLines; > > fileLines = [stringval componentsSeparatedByString:@"\n"]; > > return [fileLines count]; > > } > > > > This works fine. However, it seems TextEdit has problems saving .txt > > files. Here is one example. This is how the text looks in TextEdit: > > > > 10.0 > > 10.0.4 > > 10.0.4 > > aquaoriginal > > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > > framework/Versions/A/Resources/Extras.rsrc > > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > > framework/Versions/A/Resources/HIToolbox.rsrc > > > > This is how it looks in Pico: > > > > 10.0^M10.0.4^M10.0.4^Maquaoriginal > > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > > framework/Versions/A/Resources/Extras.rsrc > > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > > framework/Versions/A/Resources/HIToolbox.rsrc > > > > My program will return that the file has 3 lines of text. It obviously > > has more. > > > > Are there any solutions to getting TextEdit files to read properly? > > > > --------------------------------------- > > Colin Cornaby > > Official Cocoa Newbie for RBDeveloper Magazine > > Head Person, Conundrum Software, www.conundrumsoft.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 pcoskren at mac.com Sun Aug 18 18:31:29 2002 From: pcoskren at mac.com (Patrick Coskren ) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: Message-ID: <52E3A6F8-B313-11D6-8D13-003065C198D4@verizon.net> On Sunday, August 18, 2002, at 08:30 PM, Jeffrey Michael Disher wrote: > Just one technicality that I thought I should clarify before anyone gets > burned by it: > > "\n" doesn't actually mean anything. It is a sort of "macro" in the > sense > that your compiler replaces with your "native" line ending character(s). > > "\r" means "carriage return" which is the native line ending format for > Mac OS (non Mach-o). > > "\f" means "form feed" which is the native line ending format for > Unix-based systems (which includes Mac OS X Mach-o binaries). I believe this is incorrect, or at least, may only be correct in certain contexts. "\n", "\r", and "\f" are syntactic shorthand in the sense that a compiler translates them into other characters, but at least in C on machines that use the ASCII character set, those characters are well-defined. In ASCII: \n = 012 (octal) (Unix line end character) \r = 015 (Mac line end character) \r\n = 015 012 (Windows line end sequence) \f = 014 See http://web.cs.mun.ca/~michael/c/ascii-table.html for a full ASCII table. As an example, I've hexdumped three versions of a test file saved to different platform formats: note the line end characters: bash-2.03$ hexdump -bc test.txt 0000000 124 150 151 163 040 012 151 163 040 012 141 040 012 164 145 163 0000000 T h i s \n i s \n a \n t e s 0000010 164 012 0000010 t \n 0000012 bash-2.03$ hexdump -bc testMacLines.txt 0000000 124 150 151 163 040 015 151 163 040 015 141 040 015 164 145 163 0000000 T h i s \r i s \r a \r t e s 0000010 164 015 0000010 t \r 0000012 bash-2.03$ hexdump -bc testDosLines.txt 0000000 124 150 151 163 040 015 012 151 163 040 015 012 141 040 015 012 0000000 T h i s \r \n i s \r \n a \r \n 0000010 164 145 163 164 015 012 0000010 t e s t \r \n 0000016 I suspect that certain systems that originally started on Unix might convert \n to the native line ending character as a compatibility measure, but in C the sequences are supposed to map to a specific character in the machine's character set. > Thus you should be careful when using the "\n" as your newline character > since you may produce non-portable code. I recently learned this lesson > while working on a Flex-based tokenizer which worked perfectly when > compiled with GCC but failed with CodeWarrior. Since I was using > CodeWarrior to compile a CFM target (I assume it would do it properly > for > Mach-o) I needed to specify the "\f" new line character since it was > parsing Unix files. Might this be a flex-ism? I don't know flex, but I've never seen or worried about \f in all my years of programming (well, all ten). > The "^M" character you see when using and editor like Pico or Vi is how > Unix sees the \r Mac OS line ending character. Check out the ASCII table, and you'll see why. Control characters are defined to be 32 less than the letter used to invoke them. So ^M is \r. ^D is EOT, which is why it stops line input. ^G is BEL, and so on. Just read right to left along the chart. -Patrick > On Sun, 18 Aug 2002, Patrick Coskren > wrote: > >> Hi, >> >> It looks to me like your source file is confused about line endings. >> Half the lines end in Mac line endings (\r), the other end in Unix >> (\n). TextEdit evidently understands both types, but Pico's confused, >> as is your code, which assumes \n line endings. In other words, the >> file got corrupted at some point, and without knowing the full pedigree >> of the file, I won't speculate as to why. (I'll note that when I >> save a >> file in TextEdit, it's all \n, like a good Unix citizen.) >> >> Possible responses: >> 1.) Upgrade your code so it separates based on \n, \r, and for extra >> credit, \n\r (Windows). >> 2.) Go and download BBEdit Lite from It's >> got a simple pulldown button that lets you set the line endings for >> your >> entire file. Switch everything to Unix line endings, then save. >> >> I hope that helps, >> -Patrick >> >> On Sunday, August 18, 2002, at 07:10 PM, Colin Cornaby wrote: >> >>> I have code that will put each line of a text file in a array and then >>> find a line and work with it. Here is a example: >>> >>> + (int)linetotal:(id)stringval{ >>> NSArray *fileLines; >>> fileLines = [stringval componentsSeparatedByString:@"\n"]; >>> return [fileLines count]; >>> } >>> >>> This works fine. However, it seems TextEdit has problems saving .txt >>> files. Here is one example. This is how the text looks in TextEdit: >>> >>> 10.0 >>> 10.0.4 >>> 10.0.4 >>> aquaoriginal >>> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. >>> framework/Versions/A/Resources/Extras.rsrc >>> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. >>> framework/Versions/A/Resources/HIToolbox.rsrc >>> >>> This is how it looks in Pico: >>> >>> 10.0^M10.0.4^M10.0.4^Maquaoriginal >>> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. >>> framework/Versions/A/Resources/Extras.rsrc >>> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. >>> framework/Versions/A/Resources/HIToolbox.rsrc >>> >>> My program will return that the file has 3 lines of text. It obviously >>> has more. >>> >>> Are there any solutions to getting TextEdit files to read properly? >>> >>> --------------------------------------- >>> Colin Cornaby >>> Official Cocoa Newbie for RBDeveloper Magazine >>> Head Person, Conundrum Software, www.conundrumsoft.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 mrmacman_g4 at mac.com Sun Aug 18 18:39:06 2002 From: mrmacman_g4 at mac.com (Kyle Moffett) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: Message-ID: On Sunday, August 18, 2002, at 07:53 PM, Alex Reichstadt wrote: > You have various options. > > 3. You can use BBEdit, but make sure you use 6.5.2, not 6.5, the latter > shows some very odd behavior that is very confusing with regard to this > and other encoding aspects. > > 4. You can use "cyclone carbon" which is an encoding-converter that > utilizes the Apple suite for that purpsoe and also standardizes > linebreaks. > I would recommend to check out this last option first. It's freeware, > you can get it from versiontracker and it is very useful for many other > things. Or you could open it in ProjectBuilder, with PB you can change the encoding and the linebreaks too. Kyle Moffett -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 714 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020818/a6d8c0ac/attachment.bin From kkerekes at cox.net Sun Aug 18 20:30:02 2002 From: kkerekes at cox.net (Kirk Kerekes) Date: Thu Nov 3 14:49:55 2005 Subject: having trouble with text files Message-ID: Use NSString's - (void)getLineStart:(unsigned *)startIndex end:(unsigned *)lineEndIndex contentsEnd:(unsigned *)contentsEndIndex forRange:(NSRange)aRange -- which correctly handle the following line terminators: ? U+000D (\r or CR) ? U+2028 (Unicode line separator) ? U+000A (\n or LF) ? U+2029 (Unicode paragraph separator) ? \r\n, in that order (also known as CRLF) The design of the method initially seems a little inside-out, but after you figure out how to use it to step through an NSString, plucking out the lines , suddenly it makes sense. From rpeskin at rlpcon.com Sun Aug 18 21:40:08 2002 From: rpeskin at rlpcon.com (Richard L. Peskin) Date: Thu Nov 3 14:49:55 2005 Subject: Unicode help needed In-Reply-To: <50AA771C-B329-11D6-B824-0003933E9212@mac.com> Message-ID: YES! That did it. Apparently the length parameter refers to the number of unicode chars, not the number of bytes. thanks, --dick peskin On Monday, August 19, 2002, at 12:08 AM, Joe Esch wrote: > I haven't tried this, but can't you use stringWithCharacters:length > instead? Something like: > > unichar c = 0x7f39; > NSString* s = [NSString stringWithCharacters:&c length:1]; > > On Sunday, August 18, 2002, at 03:03 PM, Richard L. Peskin wrote: > >> Any Unicode experts out there? I need to use a key equivalent that is >> assigned a Unicode number. To be specific the num lock/clear key is >> assigned 0xf739. I need to use the NSButtonCell method to set a key >> equivalent, i.e. >> NSButtonCell clearKey; >> [clearKey setKeyEquivalent: [NSString stringWithUTF8String: (char >> *)equiv]]; >> >> How do I specify "equiv" ? The documentation says the parameter for >> NSString stringWithUTF8String: (char *)bytes, but this doesn't seem to >> work. Anyone know how to use NSString stringWithUTF8String: (char *) >> bytes ? >> >> thanks, >> --dick peskin Richard L. Peskin, RLP Consulting, Londonderry, VT http://www.rlpcon.com http://www.caip.rutgers.edu/~peskin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1213 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020818/2034d83d/attachment.bin From stephane at sente.ch Mon Aug 19 00:09:00 2002 From: stephane at sente.ch (=?ISO-8859-1?Q?St=E9phane_Corth=E9sy?=) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: Message-ID: <66FD156C-B342-11D6-92D4-003065DA23F6@sente.ch> Install TextExtras on your machine, it will provide you additional text handling features in all Cocoa applications (it adds a menu TextExtras in the Format menu). One one the features is line-ending conversion. Thanks Mike Ferris for providing that (opensource) nifty utility! http://www.lorax.com/FreeStuff/TextExtras.html Now, in your code, you can add this category on NSString: // Thanks to Moritz Thomas for this code - (NSArray *) lines { NSRange range = NSMakeRange(0, 1); unsigned length = [self length], content, line; NSMutableArray *anArray = [NSMutableArray array]; while(range.location < length){ [self getLineStart:&range.location end:&line contentsEnd:&content forRange:range]; range.length = content - range.location; [anArray addObject:[self substringWithRange:range]]; range.location = line + 1; range.length = 1; } return anArray; } St?phane On Monday, August 19, 2002, at 01:10 , Colin Cornaby wrote: > I have code that will put each line of a text file in a array and then > find a line and work with it. Here is a example: > > + (int)linetotal:(id)stringval{ > NSArray *fileLines; > fileLines = [stringval componentsSeparatedByString:@"\n"]; > return [fileLines count]; > } > > This works fine. However, it seems TextEdit has problems saving .txt > files. Here is one example. This is how the text looks in TextEdit: > > 10.0 > 10.0.4 > 10.0.4 > aquaoriginal > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/Extras.rsrc > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/HIToolbox.rsrc > > This is how it looks in Pico: > > 10.0^M10.0.4^M10.0.4^Maquaoriginal > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/Extras.rsrc > /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. > framework/Versions/A/Resources/HIToolbox.rsrc > > My program will return that the file has 3 lines of text. It obviously > has more. > > Are there any solutions to getting TextEdit files to read properly? > > --------------------------------------- > Colin Cornaby > Official Cocoa Newbie for RBDeveloper Magazine > Head Person, Conundrum Software, www.conundrumsoft.com > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From thilo at itoast.de Mon Aug 19 03:53:01 2002 From: thilo at itoast.de (Thilo Ettelt) Date: Thu Nov 3 14:49:55 2005 Subject: Keyed archiving of NSArray? Message-ID: Hi! I have an Array with a bunch of "alloc-initialized" classes which of them contain array objects. How can I archive the NSArray Object using keyed archiving? Cheers, Thilo From Sherlock at rna.nl Mon Aug 19 04:21:01 2002 From: Sherlock at rna.nl (Gerben Wierda) Date: Thu Nov 3 14:49:55 2005 Subject: KINFO_PROC_PID Message-ID: <93F99D9C-B365-11D6-B22D-0003930AD8A4@rna.nl> It seems kvm.h is there but sys/kinfo*.h are missing. Can somebody with access to a real BSD box tell me what the value of KINFO_PROC_PID is so that I can try out if this works. Or can someone tell me how, when I have a numeric pid and nothing else, I can find out if a process is running? I was thinking about using the kvm interface. Thanks, G From wjcheeseman at earthlink.net Mon Aug 19 06:31:06 2002 From: wjcheeseman at earthlink.net (Bill Cheeseman) Date: Thu Nov 3 14:49:55 2005 Subject: Keyed archiving of NSArray? In-Reply-To: Message-ID: on 02-08-19 6:52 AM, Thilo Ettelt at thilo@itoast.de wrote: > Hi! I have an Array with a bunch of "alloc-initialized" classes which > of them contain array objects. How can I archive the NSArray Object > using keyed archiving? Watch the Stepwise site on August 24. www.stepwise.com. -- Bill Cheeseman - wjcheeseman@earthlink.net Quechee Software, Quechee, Vermont, USA http://www.quecheesoftware.com The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes Croquet Club of Vermont - http://members.valley.net/croquetvermont From ryanstevens at mac.com Mon Aug 19 09:01:01 2002 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:49:55 2005 Subject: KINFO_PROC_PID In-Reply-To: <93F99D9C-B365-11D6-B22D-0003930AD8A4@rna.nl> Message-ID: This should work.. BOOL processExistsForPID(int pid) { int killVal = kill(pid, 0); if (killVal == 0) return YES; return NO; } man 2 kill Not sure if you need to do extra sanity checking or not. From what I've observed on 10.1.x this seems to have the desired results. HTH! On Monday, August 19, 2002, at 04:19 AM, Gerben Wierda wrote: > It seems kvm.h is there but sys/kinfo*.h are missing. > > Can somebody with access to a real BSD box tell me what the value of > KINFO_PROC_PID is so that I can try out if this works. Or can someone > tell me how, when I have a numeric pid and nothing else, I can find out > if a process is running? I was thinking about using the kvm interface. > > Thanks, > > G > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From fredrikandersson at mac.com Mon Aug 19 10:00:09 2002 From: fredrikandersson at mac.com (Fredrik Andersson) Date: Thu Nov 3 14:49:55 2005 Subject: KINFO_PROC_PID In-Reply-To: <93F99D9C-B365-11D6-B22D-0003930AD8A4@rna.nl> Message-ID: On 02-08-19 13.19, "Gerben Wierda" wrote: Check out /usr/include/sys/sysctl.h It contains all you need to figure what you've asked for. /Fredrik > It seems kvm.h is there but sys/kinfo*.h are missing. > > Can somebody with access to a real BSD box tell me what the value of > KINFO_PROC_PID is so that I can try out if this works. Or can someone > tell me how, when I have a numeric pid and nothing else, I can find out > if a process is running? I was thinking about using the kvm interface. > > Thanks, > > G > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From ddavidso at apple.com Mon Aug 19 11:03:00 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:49:55 2005 Subject: Jaguar : NSNetServices In-Reply-To: Message-ID: On Sunday, August 18, 2002, at 07:28 AM, Eric Peyton wrote: > I have a strong feeling that at some point Rendezvous will take the > place of the older nameserver features that DO relied upon "back in > the day", but that is not yet available and as such you will need to > use Rendezvous to discover the devices and machines, and then you can > use DO to communicate between the clients and the servers. Actually, this has already taken place. See the Jaguar Foundation release notes. NSSocketPortNameServer will now use Rendezvous. The functionality is still somewhat limited--e.g. there are no additional controls available beyond the standard NSPortNameServer APIs--and the semantics are somewhat different from the old nmserver--for example, under Rendezvous it is not possible to register the same name on multiple hosts within the same domain--but it is there. For those who require more detailed control, it is of course also possible to use NSNetServices or other Rendezvous APIs directly. Douglas Davidson From ddavidso at apple.com Mon Aug 19 12:10:54 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:49:55 2005 Subject: Having trouble with text files... In-Reply-To: Message-ID: <0CB2DF2B-B3A6-11D6-85AD-000393115062@apple.com> On Sunday, August 18, 2002, at 04:10 PM, Colin Cornaby wrote: > I have code that will put each line of a text file in a array and then > find a line and work with it. Here is a example: > > + (int)linetotal:(id)stringval{ > NSArray *fileLines; > fileLines = [stringval componentsSeparatedByString:@"\n"]; > return [fileLines count]; > } > > This works fine. However, it seems TextEdit has problems saving .txt > files. Here is one example. This is how the text looks in TextEdit: Well, I'd say it's not TextEdit that's having the problem. TextEdit, like other good citizens at the app level of Mac OS X, is liberal about the line endings it accepts. This includes not only \n, \r, and \r\n, but also the Unicode line break characters. When you type a line break in TextEdit, it's a \n, but otherwise TextEdit doesn't go rewriting existing files it opens. (PB will do this, but only if you tell it to.) Probably the best thing would be to modify your code so that it uses the same standards that TextEdit does. Fortunately, there are Foundation methods for this on NSString, and they are probably going to be more efficient than componentsSeparatedByString: too. You can use - (NSRange)lineRangeForRange:(NSRange)range; for simple things, or - (void)getLineStart:(unsigned *)startPtr end:(unsigned *)lineEndPtr contentsEnd:(unsigned *)contentsEndPtr forRange:(NSRange)range; for situations where you need to distinguish the body of the line from the line break characters. So a naive version of counting the lines in a string might look something like unsigned length = [string length], idx = 0, count = 0; while (idx < length) { idx = NSMaxRange([string lineRangeForRange:NSMakeRange(idx, 0)]; count++; } but you'll notice that this gives different results from your original method for strings like @"" or @"foo\n". You'll have to decide for yourself what the correct results are in these cases; the implementation is left as an exercise. Douglas Davidson From Sherlock at rna.nl Mon Aug 19 14:52:01 2002 From: Sherlock at rna.nl (Gerben Wierda) Date: Thu Nov 3 14:49:55 2005 Subject: KINFO_PROC_PID In-Reply-To: Message-ID: On Monday, August 19, 2002, at 06:52 , Fredrik Andersson wrote: > On 02-08-19 13.19, "Gerben Wierda" wrote: > > Check out /usr/include/sys/sysctl.h > It contains all you need to figure what you've asked for. Yes that looks good. Thanks. I did the following (in case people are interested in the result, without having to find out exactly how it works). _pid is an instance member that holds the pid of a subprocess. - (BOOL) isRunning { if (_pid) { struct kinfo_proc *kpt; size_t size; int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, _pid }; kpt = malloc( sizeof(struct kinfo_proc)); // size is either 1 or 0 entries when we ask for a single pid sysctl( mib, 4, kpt, &size, NULL, 0); free( kpt); return (size == 1); } return NO; } I have checked, this works both when the process has been started with NSTask launch and with AEWP. Nice. G From joe_esch at mac.com Mon Aug 19 16:46:01 2002 From: joe_esch at mac.com (Joe Esch) Date: Thu Nov 3 14:49:55 2005 Subject: Viewport size limit for OpenGL Message-ID: Does anyone know if there is a limit on the maximum viewport size that you can set for the OS X implementation of OpenGL? I am using NSOpenGLView and I am rendering to either an off-screen window or a memory bitmap to export the image to a file or print. I can adjust the resolution that I want to output. With either method, if I set the viewport to larger than 2048, I get incorrect results. It looks like the dimensions are being clamped to 2048, and the portion of the image outside that range is either all black, or random garbage. Everything seems to work great when the resolution is set to less than 2048 in its maximum dimension. If there is a limit, I will probably change my code to render the image in sections, but before I do that, I would like to have a better idea if this is a limitation of the OpenGL implementation or a problem in my code. From kdyke at apple.com Mon Aug 19 16:56:01 2002 From: kdyke at apple.com (Kenneth Dyke) Date: Thu Nov 3 14:49:55 2005 Subject: Viewport size limit for OpenGL In-Reply-To: Message-ID: <14ECADD6-B3CF-11D6-B014-000393A037EC@> On Monday, August 19, 2002, at 04:44 PM, Joe Esch wrote: > Does anyone know if there is a limit on the maximum viewport size that > you can set for the OS X implementation of OpenGL? I am using > NSOpenGLView and I am rendering to either an off-screen window or a > memory bitmap to export the image to a file or print. I can adjust > the resolution that I want to output. With either method, if I set > the viewport to larger than 2048, I get incorrect results. It looks > like the dimensions are being clamped to 2048, and the portion of the > image outside that range is either all black, or random garbage. You'll want to query the current renderer using GL_MAX_VIEWPORT_DIMS to get the maximum viewport size. I do believe that 2048 is right around the limit for most of the current drivers. -Ken From Stefan.Johansson at orctradelab.com Tue Aug 20 01:30:01 2002 From: Stefan.Johansson at orctradelab.com (Stefan Johansson) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) Message-ID: Hi, I'm not familiar with the differences between Jaguar and 10.1.x, if it's only like a "service pack" or more like Windows NT - windows 2000 kind of difference... Since our software, compiled on 10.1.x breaks completely on Jaguar I was wondering if a recompile in Jaguar is necessary. Thanks /Stefan From timlenertz at mac.com Tue Aug 20 01:47:01 2002 From: timlenertz at mac.com (Tim Lenertz) Date: Thu Nov 3 14:49:55 2005 Subject: Switching the screen resolution Message-ID: <0E40DD70-B419-11D6-9A61-00039378F406@mac.com> Hi, how can I switch the screen resolution in cocoa, without using an NSOpenGLContext or Carbon (DrawSprocket) calls? thanks! From mrmacman_g4 at mac.com Tue Aug 20 07:43:00 2002 From: mrmacman_g4 at mac.com (Kyle Moffett) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: Message-ID: <15E428EC-B44B-11D6-91F2-0030659677A4@mac.com> On Tuesday, August 20, 2002, at 04:29 AM, Stefan Johansson wrote: > Hi, > > I'm not familiar with the differences between Jaguar and 10.1.x, if it's > only like a "service pack" or more like Windows NT - windows 2000 kind > of > difference... > Since our software, compiled on 10.1.x breaks completely on Jaguar I was > wondering if a recompile in Jaguar is necessary. > > Thanks > > /Stefan Apple switched all libraries and software over to being compiled by gcc3.1. gcc3 completely changed the C++ name mangling scheme, so any C++ software will need to be recompiled to be able to find the correct symbols. There will probably be other significant library changes, such as Apple added an ncurses library. All in all, some software will need to be compiled differently, in some apps, you may need to change the code to appease the new compiler. HTH, Kyle Moffett From clems at mac.com Tue Aug 20 07:51:01 2002 From: clems at mac.com (=?ISO-8859-1?Q?Cl=E9ment_Wehrung?=) Date: Thu Nov 3 14:49:55 2005 Subject: NSTableView Message-ID: <4B012E6D-B44C-11D6-834A-0003937318E6@mac.com> Hello, I want to have a white line, and a blue line, in my table view, like iTunes... How to do ? Thanks -- Cl?ment WEHRUNG Mel : clems@mac.com Web : www.rapidonet.org ICQ : 97112291 From shebs at apple.com Tue Aug 20 08:23:08 2002 From: shebs at apple.com (Stan Shebs) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) References: Message-ID: <3D625DEA.6080501@apple.com> Stefan Johansson wrote: >Hi, > >I'm not familiar with the differences between Jaguar and 10.1.x, if it's >only like a "service pack" or more like Windows NT - windows 2000 kind of >difference... >Since our software, compiled on 10.1.x breaks completely on Jaguar I was >wondering if a recompile in Jaguar is necessary. > Jaguar is supposed to be completely binary-compatible with 10.1.x. Although Jaguar is built with a different compiler, we've been careful to ensure that public frameworks never export C++ interfaces, and have made some additional compiler tweaks to guarantee compat. If you've found a binary incompatibility (and are not using private frameworks or undocumented function calls), then we'd like to know more details asap. Stan From epeyton at epicware.com Tue Aug 20 08:44:02 2002 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: <3D625DEA.6080501@apple.com> Message-ID: <38154FC8-B453-11D6-8EC4-003065CBD1E2@epicware.com> On Tuesday, August 20, 2002, at 10:19 AM, Stan Shebs wrote: > Stefan Johansson wrote: > >> Hi, >> >> I'm not familiar with the differences between Jaguar and 10.1.x, if >> it's >> only like a "service pack" or more like Windows NT - windows 2000 >> kind of >> difference... >> Since our software, compiled on 10.1.x breaks completely on Jaguar I >> was >> wondering if a recompile in Jaguar is necessary. >> > Jaguar is supposed to be completely binary-compatible with 10.1.x. > Although Jaguar is built with a different compiler, we've been > careful to ensure that public frameworks never export C++ interfaces, > and have made some additional compiler tweaks to guarantee compat. > > If you've found a binary incompatibility (and are not using > private frameworks or undocumented function calls), then we'd > like to know more details asap. Unless it is an ncurses compatibility issue (ncurses was removed from the System framework and moved into it's own library). Apple knows all about ncurses programs compiled on Puma that do not run on Jaguar. Eric > > Stan > > > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From sean at skti.org Tue Aug 20 08:51:02 2002 From: sean at skti.org (Sean Kelly) Date: Thu Nov 3 14:49:55 2005 Subject: iconForFileType: Message-ID: <9D5DF254-B454-11D6-821A-0003931D82D2@skti.org> Hello, I am trying to get the correct icon to display for a certain file type. The file is not on the local machine, so I just have the name of the file. However, no matter what file extension I put in, I always get the plain document icon. For example, I find the pathExtension of index.html and enter html. What do I enter as fileType for - (NSImage *)iconForFileType:(NSString *)fileType; in order for it to work correctly? Thanks, Sean Kelly www.skti.org From cpmueller at mac.com Tue Aug 20 09:30:02 2002 From: cpmueller at mac.com (Clark Mueller) Date: Thu Nov 3 14:49:55 2005 Subject: iconForFileType: In-Reply-To: <9D5DF254-B454-11D6-821A-0003931D82D2@skti.org> Message-ID: I don't think it's the file that's important. I believe that if you do not have the software that created the file installed locally, you will always get the generic document icon, because the application is where the machine gets the icon from in the first place. On Tuesday, August 20, 2002, at 09:50 AM, Sean Kelly wrote: > Hello, > > I am trying to get the correct icon to display for a certain file > type. The file is not on the local machine, so I just have the name of > the file. However, no matter what file extension I put in, I always > get the plain document icon. For example, I find the pathExtension of > index.html and enter html. What do I enter as fileType for - (NSImage > *)iconForFileType:(NSString *)fileType; in order for it to work > correctly? Thanks, > > Sean Kelly > www.skti.org From axel at objectpark.org Tue Aug 20 10:33:14 2002 From: axel at objectpark.org (Axel 'Mikesch' Katerbau) Date: Thu Nov 3 14:49:55 2005 Subject: How to access mail pictures from .mac? Message-ID: Hi, I'd like to know how to access mail pictures from .mac accounts. A first look at the iDisk's public folder was not successfull. Anyone in the know? Greetings, Axel From dunham at mac.com Tue Aug 20 11:11:12 2002 From: dunham at mac.com (David Dunham) Date: Thu Nov 3 14:49:55 2005 Subject: Switching the screen resolution In-Reply-To: <0E40DD70-B419-11D6-9A61-00039378F406@mac.com> Message-ID: <3C135538-B467-11D6-A3E7-0003938C646E@mac.com> On Tuesday, August 20, 2002, at 01:44 , Tim Lenertz wrote: > how can I switch the screen resolution in cocoa, without using an > NSOpenGLContext or Carbon (DrawSprocket) calls? I've only used it from a CFM app, so I won't give you my code (yours will be simpler), but you can use CGDisplayBestModeForParameters CGDisplaySwitchToMode and maybe CGDisplayCapture David Dunham Macintosh Game Developer GameHouse, Inc. david@gamehouse.com 206 442 5881 x22 http://www.gamehouse.com From andrewdm at sonic.net Tue Aug 20 12:04:42 2002 From: andrewdm at sonic.net (Andrew Merenbach) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question Message-ID: <27E272D6-B46F-11D6-AF19-000A277AE290@sonic.net> Does anyone know whether or not Apple eventually plans to make all applications in OS X with the "brushed metal" appearance? Take care, Andrew Merenbach From finlay at dobbie.net Tue Aug 20 12:31:45 2002 From: finlay at dobbie.net (Finlay Dobbie) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: <27E272D6-B46F-11D6-AF19-000A277AE290@sonic.net> Message-ID: On Tuesday, August 20, 2002, at 08:00 PM, Andrew Merenbach wrote: > Does anyone know whether or not Apple eventually plans to make all > applications in OS X with the "brushed metal" appearance? I severely doubt it. They have spent a lot of time and money on the Aqua brand. -- Finlay From njriley at uiuc.edu Tue Aug 20 12:32:47 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: <27E272D6-B46F-11D6-AF19-000A277AE290@sonic.net> References: <27E272D6-B46F-11D6-AF19-000A277AE290@sonic.net> Message-ID: <20020820191407.GA2842122@uiuc.edu> On Tue, Aug 20, 2002 at 12:00:55PM -0700, Andrew Merenbach wrote: > Does anyone know whether or not Apple eventually plans to make all > applications in OS X with the "brushed metal" appearance? No, they don't, at least not in any public communication I've seen. See the Jaguar Aqua HIG (which I think are downloadable now) - they discuss when you should and shouldn't use the brushed metal look. Note that even iTunes, iPhoto, etc. only use brushed metal for their 'main' window; preferences and other windows are still normal. I'm sure we'll see people overdoing it, but there are actually a couple of advantages that can benefit usability in certain cases, such as being able to drag a brushed metal window by any portion of its background. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From jim.correia at pobox.com Tue Aug 20 12:49:28 2002 From: jim.correia at pobox.com (Jim Correia) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: <27E272D6-B46F-11D6-AF19-000A277AE290@sonic.net> Message-ID: <26579AA4-B473-11D6-943A-003065B10AEA@pobox.com> On Tuesday, August 20, 2002, at 03:00 PM, Andrew Merenbach wrote: > Does anyone know whether or not Apple eventually plans to make all > applications in OS X with the "brushed metal" appearance? One would certainly hope not. Jim From njriley at uiuc.edu Tue Aug 20 13:04:40 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: <20020820191407.GA2842122@uiuc.edu> References: <27E272D6-B46F-11D6-AF19-000A277AE290@sonic.net> <20020820191407.GA2842122@uiuc.edu> Message-ID: <20020820194407.GA2828176@uiuc.edu> On Tue, Aug 20, 2002 at 02:14:07PM -0500, Nicholas Riley wrote: > I'm sure we'll see people overdoing it Well, that didn't take long. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From dunham at mac.com Tue Aug 20 13:14:11 2002 From: dunham at mac.com (David Dunham) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: <27E272D6-B46F-11D6-AF19-000A277AE290@sonic.net> Message-ID: <50DA6D66-B476-11D6-A3E7-0003938C646E@mac.com> On Tuesday, August 20, 2002, at 12:00 , Andrew Merenbach wrote: > Does anyone know whether or not Apple eventually plans to make all > applications in OS X with the "brushed metal" appearance? Not if they follow their own guidelines (which iChat does not...) David Dunham A Sharp Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From jesusdiaz at apinet.es Tue Aug 20 13:36:04 2002 From: jesusdiaz at apinet.es (=?ISO-8859-1?Q?Jes=FAs_D=EDaz_Blanco?=) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: <20020820194407.GA2828176@uiuc.edu> Message-ID: > Well, that didn't take long. > > Geezus. BTW, is the AIM network working for any of you, people? j. From kcall at mac.com Tue Aug 20 13:44:00 2002 From: kcall at mac.com (Kevin Callahan) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: Message-ID: <7EC05A19-B47D-11D6-BE36-00306574D7D4@mac.com> On Tuesday, August 20, 2002, at 01:31 PM, Jes?s D?az Blanco wrote: >> Well, that didn't take long. >> >> > > Geezus. > > BTW, is the AIM network working for any of you, people? If I log in using my former AIM account, I can chat with mac.com and non-mac.com AIM users. If I log in with my mac.com account, I can only chat with mac.com folks , and my non-mac.com buddies are grayed out. iChat tells me my non-mac.com buddies are offline, when in fact, they're online. Kevin > > j. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > - Kevin ? From fablosso at yahoo.com Tue Aug 20 15:18:00 2002 From: fablosso at yahoo.com (Fabio Lossotti) Date: Thu Nov 3 14:49:55 2005 Subject: Launched by Services In-Reply-To: <71517440-AE1B-11D6-84EA-000393115062@apple.com> Message-ID: <20020820220330.63722.qmail@web21203.mail.yahoo.com> What makes this somewhat difficult, and what Douglas Davidson is hinting at here, is the the Services event appears to be some flavor of an asynchronous event. You can see this by setting a backtrace on the NSMessage method - the backtrace is different each time the application is launched via Services. So you cannot count on any particular method being executed or completed when your NSMessage method is called. I found that -applicationWillFinishLaunching: was always called before the NSMessage, and that applicationDidFinishLaunching was called after the NSMessage 70% of the time. And I think this is what Douglas Davidson meant by "not be entirely reliable". I wanted to do some of my application setup differently upon a Services launch, and for now, I can do this 70% of the time. Fabio --- Douglas Davidson wrote: > > On Sunday, August 11, 2002, at 12:46 PM, Wilfredo Sanchez wrote: > > > Is is possible to detect that your application was launches via > the > > Services menu? > > > > I have an app that detects when it was launched by dragging a > file > > onto the app icon. In this case, it exits after processing the > file. > > I'd like a similar effect for Services, but it seems that the > service > > invocation happens after -applicationDidFinishLaunching and I don't > > > see another way to figure that out. > > > > Any ideas? > > Currently an application launched to provide a service is not > launched > with any special indication of the fact. You might be able to > arrange > some criteria based on the timing of the service request, but that > would not be entirely reliable. > > Douglas Davidson > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com From houou at mac.com Tue Aug 20 17:23:01 2002 From: houou at mac.com (Adam Atlas) Date: Thu Nov 3 14:49:55 2005 Subject: Getting a window's image Message-ID: Is it possible to get the image of a window (or its content view) and put it into a NSImage? Carbon or CG stuff is also OK, as long as it can be accessed from Cocoa. Thanks, Adam Atlas From mrmacman_g4 at mac.com Tue Aug 20 17:28:03 2002 From: mrmacman_g4 at mac.com (Kyle Moffett) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: <38154FC8-B453-11D6-8EC4-003065CBD1E2@epicware.com> Message-ID: On Tuesday, August 20, 2002, at 11:40 AM, Eric Peyton wrote: > > On Tuesday, August 20, 2002, at 10:19 AM, Stan Shebs wrote: > >> Stefan Johansson wrote: >> >>> Hi, >>> >>> I'm not familiar with the differences between Jaguar and 10.1.x, if >>> it's >>> only like a "service pack" or more like Windows NT - windows 2000 >>> kind of >>> difference... >>> Since our software, compiled on 10.1.x breaks completely on Jaguar I >>> was >>> wondering if a recompile in Jaguar is necessary. >>> >> Jaguar is supposed to be completely binary-compatible with 10.1.x. >> Although Jaguar is built with a different compiler, we've been >> careful to ensure that public frameworks never export C++ interfaces, >> and have made some additional compiler tweaks to guarantee compat. >> >> If you've found a binary incompatibility (and are not using >> private frameworks or undocumented function calls), then we'd >> like to know more details asap. > > Unless it is an ncurses compatibility issue (ncurses was removed from > the System framework and moved into it's own library). Apple knows all > about ncurses programs compiled on Puma that do not run on Jaguar. > > Eric All Obj-C++ and C++ programs will need to be recompiled on jaguar, different name mangling scheme, even the stdc++ lib falls victim to this. ncurses is vulnerable because it has c++ code (I think). KM From rosyna at unsanity.com Tue Aug 20 17:30:01 2002 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: <38154FC8-B453-11D6-8EC4-003065CBD1E2@epicware.com> References: <38154FC8-B453-11D6-8EC4-003065CBD1E2@epicware.com> Message-ID: Which is quite a few, like mysql client... Ack, at 8/20/02, Eric Peyton said: >Unless it is an ncurses compatibility issue (ncurses was removed >from the System framework and moved into it's own library). Apple >knows all about ncurses programs compiled on Puma that do not run on >Jaguar. -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insanely Great People --- Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks. From jmdisher at student.math.uwaterloo.ca Tue Aug 20 18:31:03 2002 From: jmdisher at student.math.uwaterloo.ca (Jeff Disher) Date: Thu Nov 3 14:49:55 2005 Subject: Getting a window's image In-Reply-To: Message-ID: <015CE71E-B4A5-11D6-A06F-003065A9AD94@student.math.uwaterloo.ca> I believe that the following will work (but I haven't tried it): NSView *content = [someWindow contentView]; NSImage *someImage = [[NSImage alloc] initWithSize:[content frame]]; [someImage lockFocus]; [content drawRect:[content frame]]; [someImage unlockFocus]; //someImage now holds the contentView data It seems like the theory is correct but it also seems too easy. Can someone verify it (I am a little busy right now)? Hope that helps, Jeff. On Tuesday, August 20, 2002, at 08:21 PM, Adam Atlas wrote: > Is it possible to get the image of a window (or its content view) and > put it into a NSImage? Carbon or CG stuff is also OK, as long as it can > be accessed from Cocoa. > > Thanks, > Adam Atlas > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > Jeff Disher President and Lead Developer of Spectral Class Spectral Class: Shedding Light on Innovation http://www.spectralclass.com/ From fahrenba at mac.com Tue Aug 20 18:54:01 2002 From: fahrenba at mac.com (Matthew Fahrenbacher) Date: Thu Nov 3 14:49:55 2005 Subject: Getting a window's image Message-ID: <1186338.1029894796491.JavaMail.fahrenba@mac.com> Wouldn't NSWindow's dataWithPDFInsideRect: be easier? Then you can init your NSImage from that data as so: NSImage *winImage = [[NSImage alloc] initWithData:[window dataWithPDFInsideRect:rect]]; Hope that helps, Matt Fahrenbacher Humongous Elephants and Tigers On Tuesday, Aug 20, 2002, at 06:26PM, Jeff Disher wrote: >I believe that the following will work (but I haven't tried it): > >NSView *content = [someWindow contentView]; >NSImage *someImage = [[NSImage alloc] initWithSize:[content frame]]; > >[someImage lockFocus]; >[content drawRect:[content frame]]; >[someImage unlockFocus]; > >//someImage now holds the contentView data > >It seems like the theory is correct but it also seems too easy. > >Can someone verify it (I am a little busy right now)? > >Hope that helps, >Jeff. > > >On Tuesday, August 20, 2002, at 08:21 PM, Adam Atlas wrote: > >> Is it possible to get the image of a window (or its content view) and >> put it into a NSImage? Carbon or CG stuff is also OK, as long as it can >> be accessed from Cocoa. >> >> Thanks, >> Adam Atlas >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> >> >Jeff Disher >President and Lead Developer of Spectral Class >Spectral Class: Shedding Light on Innovation >http://www.spectralclass.com/ > >_______________________________________________ >MacOSX-dev mailing list >MacOSX-dev@omnigroup.com >http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From tjw at omnigroup.com Tue Aug 20 19:41:03 2002 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: Message-ID: <5D026A1E-B4AB-11D6-84CD-0003933F3BC2@omnigroup.com> On Tuesday, August 20, 2002, at 05:27 PM, Kyle Moffett wrote: > All Obj-C++ and C++ programs will need to be recompiled > on jaguar, different name mangling scheme, even the stdc++ > lib falls victim to this. ncurses is vulnerable because it has > c++ code (I think). Is this actually true? I was under the impression that all your libraries and your main app had to be built on the same system, but other than that, it should be OK. libstdc++ is a statically linked library, so it shouldn't be an issue (I'm assuming, of course, that you aren't accessing any system supplied C++ dylibs or frameworks -- I don't actually know of any :) For what it's worth, I've built Freedom Force on 10.2 and run it on 10.1 after only having to make one change (it uses Python for scripting which will use strptime if present -- it's present on 10.2 and not on 10.1). -tim From shebs at apple.com Tue Aug 20 20:13:01 2002 From: shebs at apple.com (Stan Shebs) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) References: Message-ID: <3D63039E.2010504@apple.com> Kyle Moffett wrote: > > All Obj-C++ and C++ programs will need to be recompiled > on jaguar, different name mangling scheme, even the stdc++ > lib falls victim to this. ncurses is vulnerable because it has > c++ code (I think). No, this is not an issue. I'm running Netscape 6 (don't ask...) built for 10.1 on my Jaguar, and it's doing just fine (OK, as well as it does anywhere else :-) ), and it's nearly all C++. C++ would only ever be an issue if you took a 10.1 framework exporting C++ classes/methods and tried to call it from a C++ app built with GCC 3.1 on Jaguar. In other words, you have to really work at it! ncurses is a compat issue not because of C++ (it was written in C the last time I looked), but because it's been taken out of the System framework and made into its own dylib. Stan From mrmacman_g4 at mac.com Tue Aug 20 20:18:24 2002 From: mrmacman_g4 at mac.com (Kyle Moffett) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: <5D026A1E-B4AB-11D6-84CD-0003933F3BC2@omnigroup.com> Message-ID: On Tuesday, August 20, 2002, at 10:11 PM, Timothy J. Wood wrote: > > On Tuesday, August 20, 2002, at 05:27 PM, Kyle Moffett wrote: >> All Obj-C++ and C++ programs will need to be recompiled >> on jaguar, different name mangling scheme, even the stdc++ >> lib falls victim to this. ncurses is vulnerable because it has >> c++ code (I think). > > Is this actually true? I was under the impression that all your > libraries and your main app had to be built on the same system, but > other than that, it should be OK. libstdc++ is a statically linked > library, so it shouldn't be an issue (I'm assuming, of course, that you > aren't accessing any system supplied C++ dylibs or frameworks -- I > don't actually know of any :) Yes, the name mangling problem only affects C++ programs, but it does exist. Actually, this is not quite true. (oops!!!) Both 10.1 and 10.2 have copies of libstdc++ for each version of the compiler, 2.95.2 and 3.1, so a program linked to that lib will not have problems, however, any 3rd party C++ libs will need to be compiled using whatever version of gcc you are using. So if you 'gcc_select 2' or use the defaults for 10.1, the 3rd party lib needs to be compiled with the same environment (gcc2), and the other way around too. HTH, Kyle Moffett From mrmacman_g4 at mac.com Tue Aug 20 20:21:44 2002 From: mrmacman_g4 at mac.com (Kyle Moffett) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: <3D63039E.2010504@apple.com> Message-ID: On Tuesday, August 20, 2002, at 11:06 PM, Stan Shebs wrote: > Kyle Moffett wrote: > >> >> All Obj-C++ and C++ programs will need to be recompiled >> on jaguar, different name mangling scheme, even the stdc++ >> lib falls victim to this. ncurses is vulnerable because it has >> c++ code (I think). > > No, this is not an issue. I'm running Netscape 6 (don't ask...) > built for 10.1 on my Jaguar, and it's doing just fine (OK, as well > as it does anywhere else :-) ), and it's nearly all C++. > > C++ would only ever be an issue if you took a 10.1 framework > exporting C++ classes/methods and tried to call it from a C++ > app built with GCC 3.1 on Jaguar. In other words, you have to > really work at it! > > ncurses is a compat issue not because of C++ (it was written in C > the last time I looked), but because it's been taken out of the > System framework and made into its own dylib. > > Stan Yes, I corrected myself just before I read your email, but I have already had problems with one of my projects built locally, just because I had forgotten that I'd 'gcc_select'ed. Oops!!! ncurses must have some kind of c++ interface (Or maybe I'm really confusing it with something else) or else the Fink project (fink.sf.net) would not have to worry about that. I looked at the built libraries from Fink and found libncurses++.a, which I believe is the ncurses c++ interface. Sorry for confusing myself, Kyle Moffett From nickzman at mac.com Tue Aug 20 21:16:18 2002 From: nickzman at mac.com (Nick Zitzmann) Date: Thu Nov 3 14:49:55 2005 Subject: Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: Message-ID: On Tuesday, August 20, 2002, at 08:11 PM, Kyle Moffett wrote: > Yes, the name mangling problem only affects C++ programs, but > it does exist. Actually, this is not quite true. (oops!!!) > Both 10.1 and > 10.2 have copies of libstdc++ for each version of the compiler, > 2.95.2 and 3.1, so a program linked to that lib will not have problems, > however, any 3rd party C++ libs will need to be compiled using > whatever version of gcc you are using. So if you 'gcc_select 2' or > use the defaults for 10.1, the 3rd party lib needs to be compiled > with the same environment (gcc2), and the other way around too. And it's going to get worse, too. GCC 3.2, which was released recently, has a new C++ ABI that isn't compatible with the 3.1 ABI, meaning some C++ software will have to be recompiled again later on... Nick Zitzmann ICQ: 22305512 Check out my software page: http://homepage.mac.com/nickzman/ From costique at mac.com Tue Aug 20 23:04:00 2002 From: costique at mac.com (Costique) Date: Thu Nov 3 14:49:55 2005 Subject: NSTableView Message-ID: See this sample code: http://www.cocoadev.com/index.pl?AlternatingRowColors It's exactly what you need. >Hello, >I want to have a white line, and a blue line, in my table view, like >iTunes... From johnts at charter.net Tue Aug 20 23:11:01 2002 From: johnts at charter.net (John Tsombakos) Date: Thu Nov 3 14:49:55 2005 Subject: Jaguar and April Dev tools Message-ID: <9FA49B4A-B4CC-11D6-9AA7-003065D19EE8@charter.net> Hi, I had the latest (April) dev tool installed on my system. I updated the system to 10.2 and since then I cannot compile anything. It is claiming that it cannot find some headers and precompiled files. I tried rebuilding the precompiled headers (sudo fixPrecomps), but that also gives errors: /System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices. h:25 header file OT/OT.h not found and others (NSLCore/NSLCore.h, SecurityCore/SecurityCore.h). I know the files are there - for example: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OT. framework/Versions/A/Headers/OT.h I don't know what changed. As soon as I get my copy of Jag, with the dev tools and install it, maybe that will fix it(?) Thanks. From dstaudi at san.rr.com Tue Aug 20 23:32:45 2002 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:49:55 2005 Subject: Rendezvous? Message-ID: When/where can we see some Rendezvous demos other than the ones included? Daniel From clems at mac.com Wed Aug 21 00:11:01 2002 From: clems at mac.com (=?ISO-8859-1?Q?Cl=E9ment_Wehrung?=) Date: Thu Nov 3 14:49:55 2005 Subject: NSTableView In-Reply-To: Message-ID: <1B3F6E72-B4D5-11D6-9500-0003937318E6@mac.com> I've already read it. But anyone find a solution to have all the NSTableView with different colors, we find a solution to make one line white and one line blue but it works just if you have something in the line, if the line is nil, you couldn't set any color, the solution is to make a subview of NSTableView and to drew the background (drawRect:)... I attempt it, but it doesn't really run correctly... Have you a code for it ? Le mercredi, 21 ao? 2002, ? 08:03 Europe/Paris, Costique a ?crit : > See this sample code: > http://www.cocoadev.com/index.pl?AlternatingRowColors > > It's exactly what you need. > >> Hello, >> I want to have a white line, and a blue line, in my table view, like >> iTunes... > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > -- Cl?ment WEHRUNG Mel : clems@mac.com Web : www.rapidonet.org ICQ : 97112291 From Stefan.Johansson at orctradelab.com Wed Aug 21 00:26:31 2002 From: Stefan.Johansson at orctradelab.com (Stefan Johansson) Date: Thu Nov 3 14:49:55 2005 Subject: [updated] Binary 10.1.x files breaks on Jaguar (recompile needed?) In-Reply-To: Message-ID: Hi again, Here are some of my problems, when I run our 10.1.x compiled binary on Jaguar: Problem 1: The program doesn't redirect stderr anymore. I go about in the standard C way: descr=open(path,O_APPEND | O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); dup2(descr,2); Despite this, it prints out to the console and nothing is written to path. This works fine on every 10.1.x I've tried and even on other OS:es. Problem 2: Some substringFromIndex in NSString fails, excerpt from gdb: [Switching to process 1299 thread 0x1203] Program received signal EXC_BAD_ACCESS, Could not access memory. [Switching to process 1299 thread 0x1203] 0x90074e68 in memmove () (gdb) bt #0 0x90074e68 in memmove () #1 0x901ac76c in __CFStringCreateImmutableFunnel3 () #2 0x9013ca20 in CFStringCreateWithSubstring () #3 0x907f0014 in -[NSCFString substringWithRange:] () #4 0x90800c2c in -[NSString substringFromIndex:] () #5 0x00023944 in +[StringHandler getDataArray:] (self=0x2bf5e9, _cmd=0x2ab006, inString=0x0) at StringHandler.m:66 I was told that maybe I was doing a release/retain error, since Cocoa has become more and more intolerant to these errors. I've checked, and nothing is wrong with the code. Also, this code works 100% on 10.1.x, it has been tested for many, many hours and days. Maybe I have more errors, but since I don't get far in my program I can't tell. I hope however that a recompile will help. We've decided to wait until we get our hands on a final Jaguar release. Until then I'll just cross my fingers that we don't have to change code :) Furthermore, I use only NSFoundation classes, nothing else. It's a completely GUI less server software (I know, We should maybe have written it with the CF instead, but a rewrite is a later project). Cheers, Stefan On 02-08-21 06.15, "Nick Zitzmann" wrote: > > On Tuesday, August 20, 2002, at 08:11 PM, Kyle Moffett wrote: > >> Yes, the name mangling problem only affects C++ programs, but >> it does exist. Actually, this is not quite true. (oops!!!) >> Both 10.1 and >> 10.2 have copies of libstdc++ for each version of the compiler, >> 2.95.2 and 3.1, so a program linked to that lib will not have problems, >> however, any 3rd party C++ libs will need to be compiled using >> whatever version of gcc you are using. So if you 'gcc_select 2' or >> use the defaults for 10.1, the 3rd party lib needs to be compiled >> with the same environment (gcc2), and the other way around too. > > And it's going to get worse, too. GCC 3.2, which was released > recently, has a new C++ ABI that isn't compatible with the 3.1 > ABI, meaning some C++ software will have to be recompiled again > later on... > > > > Nick Zitzmann > ICQ: 22305512 > > Check out my software page: http://homepage.mac.com/nickzman/ > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From epeyton at epicware.com Wed Aug 21 06:07:01 2002 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:49:55 2005 Subject: Rendezvous? In-Reply-To: Message-ID: <811276B5-B506-11D6-B510-003065CBD1E2@epicware.com> On Wednesday, August 21, 2002, at 01:25 AM, Daniel Staudigel wrote: > When/where can we see some Rendezvous demos other than the ones > included? > I don't know of any Rendezvous demos other than the Picture Browser/Server included with the developer tools. What exactly are you looking for? Eric > Daniel > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From martin-gilles.lavoie at oracle.com Wed Aug 21 06:16:02 2002 From: martin-gilles.lavoie at oracle.com (Martin-Gilles Lavoie) Date: Thu Nov 3 14:49:55 2005 Subject: [OT] iChat chatting for real? (was Re: Brushed metal question) In-Reply-To: <7EC05A19-B47D-11D6-BE36-00306574D7D4@mac.com> Message-ID: On Mardi, ao?t 20, 2002, at 04:43 PM, Kevin Callahan wrote: > > If I log in using my former AIM account, I can chat with mac.com and > non-mac.com AIM users. > If I log in with my mac.com account, I can only chat with mac.com > folks , and my non-mac.com buddies are grayed out. > iChat tells me my non-mac.com buddies are offline, when in fact, > they're online. > > Kevin Perhaps a limitation for yet-unpaid memberships? I haven't paid myself yet (I hate being bullied around). I've had no confirmation of iChat working yet. I was wondering if it had anything to do with our proxy. I'm currently setup as available. Anyone wants to try reaching me? My account is "mouser@mac.com" (well, you'd have guessed the domain, but hey, clarity is king of communication). ______________________________________________________________________ Martin-Gilles Lavoie Oracle Calendar for Macintosh http://www.oracle.com (steltor.com) From dnanian at shirt-pocket.com Wed Aug 21 06:44:59 2002 From: dnanian at shirt-pocket.com (Dave Nanian) Date: Thu Nov 3 14:49:55 2005 Subject: Automatic contrasting color selection technique? Message-ID: Hi -- I'm working on trying to automatically select an appropriate text color given an arbitrary background color. This is being used in a table, where the background highlight color is specified somewhere else (and isn't always something useful), and using the selectedTextColor doesn't always give something that's visible! So, given an NSColor as a background, is there a good way to choose a foreground that will be visible to the user, and won't make them want to either a) scream in pain or b) vomit? Thanks for any suggestions! -- Dave Nanian From houou at mac.com Wed Aug 21 06:56:01 2002 From: houou at mac.com (Adam Atlas) Date: Thu Nov 3 14:49:55 2005 Subject: Brushed metal question In-Reply-To: <200208210321.g7L3L6v11170@slowbro.omnigroup.com> Message-ID: <9C40FD1C-B50D-11D6-8B4E-0003936C5048@mac.com> > Well, that didn't take long. > > http://www.atommic.com/software/ I had it long before Unsanity. But I was never able to release it because first I was working with libPatch, which I never got it to work with, and then the now-nonexistant Application Extensions, in which it worked great. Just a few days ago, I talked to Slava from Unsanity, and he said they were working on their own patching system. They released it yesterday- along with their own Metallifizer. I wanted the glory of finally finding the cure for the brushed metal virus. I DID find the cure. In fact, Slava from Unsanity KNEW I was developing Metal Controller. I talked to him on AIM, and he said that he didn't tell anyone else at Unsanity about my idea (which, even at that time, was more than an idea... it was in a working state, in Application Extensions), and that he had nothing to do with the development of Metallifizer. Actually, was this discussion (whether Apple would switch to brushed metal altogether) appropriate for this list at all? --Adam Atlas 13 year old hacker Found the cure for the common brushed metal virus several months before Unsanity From sean at skti.org Wed Aug 21 07:12:01 2002 From: sean at skti.org (Sean Kelly) Date: Thu Nov 3 14:49:55 2005 Subject: NSTableView In-Reply-To: <1B3F6E72-B4D5-11D6-9500-0003937318E6@mac.com> Message-ID: Try looking at the mp3 player sample (http://developer.apple.com/samplecode/Sample_Code/Cocoa/MP3_Player.htm) from apple. I'm pretty sure that has what you want. Sean Kelly On Wednesday, August 21, 2002, at 03:10 AM, Cl?ment Wehrung wrote: > I've already read it. But anyone find a solution to have all the > NSTableView with different colors, we find a solution to make one line > white and one line blue but it works just if you have something in the > line, if the line is nil, you couldn't set any color, the solution is > to make a subview of NSTableView and to drew the background > (drawRect:)... I attempt it, but it doesn't really run correctly... > Have you a code for it ? > > Le mercredi, 21 ao? 2002, ? 08:03 Europe/Paris, Costique a ?crit : > >> See this sample code: >> http://www.cocoadev.com/index.pl?AlternatingRowColors >> >> It's exactly what you need. >> >>> Hello, >>> I want to have a white line, and a blue line, in my table view, like >>> iTunes... >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> > -- > Cl?ment WEHRUNG > Mel : clems@mac.com > Web : www.rapidonet.org > ICQ : 97112291 > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From kcall at mac.com Wed Aug 21 07:43:05 2002 From: kcall at mac.com (Kevin Callahan) Date: Thu Nov 3 14:49:55 2005 Subject: [OT] iChat chatting for real? (was Re: Brushed metal question) In-Reply-To: Message-ID: <261C421C-B514-11D6-AFFD-00306574D7D4@mac.com> On Wednesday, August 21, 2002, at 06:14 AM, Martin-Gilles Lavoie wrote: > > On Mardi, ao?t 20, 2002, at 04:43 PM, Kevin Callahan wrote: > >> >> If I log in using my former AIM account, I can chat with mac.com and >> non-mac.com AIM users. >> If I log in with my mac.com account, I can only chat with mac.com >> folks , and my non-mac.com buddies are grayed out. >> iChat tells me my non-mac.com buddies are offline, when in fact, >> they're online. >> >> Kevin > > Perhaps a limitation for yet-unpaid memberships? I signed up/paid the day after the .Mac announcement. Kevin > > I haven't paid myself yet (I hate being bullied around). I've had no > confirmation of iChat working yet. I was wondering if it had anything > to do with our proxy. > > I'm currently setup as available. Anyone wants to try reaching me? My > account is "mouser@mac.com" (well, you'd have guessed the domain, but > hey, clarity is king of communication). > > ______________________________________________________________________ > Martin-Gilles Lavoie > Oracle Calendar for Macintosh > http://www.oracle.com > (steltor.com) > - Kevin ? From olivier at macdev.itg.ti.com Wed Aug 21 08:29:02 2002 From: olivier at macdev.itg.ti.com (Olivier) Date: Thu Nov 3 14:49:55 2005 Subject: Jaguar and April Dev tools In-Reply-To: <9FA49B4A-B4CC-11D6-9AA7-003065D19EE8@charter.net> Message-ID: <3E2A7EE8-B51A-11D6-BEFA-0003937C1CAC@macdev.itg.ti.com> get the jaguar developer tool. Olivier On Wednesday, August 21, 2002, at 01:09 AM, John Tsombakos wrote: > > > Hi, > > I had the latest (April) dev tool installed on my system. I updated > the system to 10.2 and since then I cannot compile anything. It is > claiming that it cannot find some headers and precompiled files. I > tried rebuilding the precompiled headers (sudo fixPrecomps), but that > also gives errors: > > /System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/ > CoreServices. > h:25 header file OT/OT.h not found > > and others (NSLCore/NSLCore.h, SecurityCore/SecurityCore.h). I know > the files are there - for example: > /System/Library/Frameworks/CoreServices.framework/Versions/A/ > Frameworks/OT. > framework/Versions/A/Headers/OT.h > > I don't know what changed. As soon as I get my copy of Jag, with the > dev tools and install it, maybe that will fix it(?) > > Thanks. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From ahoesch at advanced-science.com Wed Aug 21 09:00:01 2002 From: ahoesch at advanced-science.com (Andreas Hoeschler) Date: Thu Nov 3 14:49:55 2005 Subject: Jaguar and April Dev tools In-Reply-To: <3E2A7EE8-B51A-11D6-BEFA-0003937C1CAC@macdev.itg.ti.com> Message-ID: Hi all, > get the jaguar developer tool. Can anybody confirm that ProjectBuilderWO is still part of the jaguar dev tools? If not we will have to stick to 10.1. Regards, Andreas From alalani.list at marketcircle.com Wed Aug 21 09:01:01 2002 From: alalani.list at marketcircle.com (Ali Lalani (list)) Date: Thu Nov 3 14:49:55 2005 Subject: NSDateFormatter Message-ID: <2B3A7F3C-B51F-11D6-B7A5-003065590D32@marketcircle.com> I'm having a problem with NSDateFormatter. I'm wondering if it is possible to get it to parse dates entered(on textfields with dateformatters) with, say, Day/Month/Year configurations instead of Month/Day/Year. This is not to be confused with dateFormat which contains the format it turns dates entered into. When it reads in a date string from the textfield, it seems to expect the data a specific way, for instance if i type in: 09/06/02 it reads it as the 9th month, 6th day of 2002. I would like it to interpret that string as the 9th day, 6th month, but i can't seem to figure out how to instruct it to do so(my International preferences are set to Day/Month/Year but it doesn't seem to take that into consideration)...if anyone understands my babble and can help me out, let me know, and thanks in advance :) Ali Lalani e-mail: alalani@marketcircle.com From rcerny at dataline.cz Wed Aug 21 09:22:11 2002 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:49:55 2005 Subject: NSTableView grid problem Message-ID: <1257643E-B522-11D6-BEAE-0003935401DA@dataline.cz> Hi, I have a NSTableView in my window, which has setDrawsGrid:YES. Then I load data, the amount of rows is smaller than size of tableView. Problem: The last item doesn't have the bottom line and looks ugly. What's the trick? Thanks Robert From andrew at zamler-carhart.com Wed Aug 21 10:05:06 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:55 2005 Subject: Automatic contrasting color selection technique? In-Reply-To: Message-ID: <807A1302-B527-11D6-A7A7-000A277A6C34@zamler-carhart.com> Dave, I had the same problem as you -- I want to draw text on an arbitrary background color. Basically, I draw text in black unless the background color is "darker" than 30% lightness, in which case I draw in white. In the standard color palette, blue, purple, and of course black are "darker" than 30% and get white text. This winds up looking about right for most colors and shades of gray that I have tried, although you could vary the parameter. I have a category like this: @implementation NSColor (DarkColor) - (BOOL) isDarkerThan: (float) lightness { NSColor *monoColor = [self colorUsingColorSpaceName: @"NSCalibratedWhiteColorSpace"]; return ([monoColor whiteComponent] < lightness); } @end When the background color changes, I update the foreground color as such: [attributes takeValue: ([backgroundColor isDarkerThan: 0.30] ? [NSColor whiteColor] : [NSColor blackColor]) forKey: NSForegroundColorAttributeName]; Hope this helps, Andrew On Wednesday, August 21, 2002, at 06:28 AM, Dave Nanian wrote: > Hi -- I'm working on trying to automatically select an appropriate > text color given an arbitrary background color. This is being used in > a table, where the background highlight color is specified somewhere > else (and isn't always something useful), and using the > selectedTextColor doesn't always give something that's visible! > > So, given an NSColor as a background, is there a good way to choose a > foreground that will be visible to the user, and won't make them want > to either a) scream in pain or b) vomit? > > Thanks for any suggestions! > -- > Dave Nanian > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2178 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020821/ef7a0823/attachment.bin From sapphire at mac.com Wed Aug 21 10:06:23 2002 From: sapphire at mac.com (Bradford Brack) Date: Thu Nov 3 14:49:55 2005 Subject: NSTableView & Multiple row background colors In-Reply-To: <1B3F6E72-B4D5-11D6-9500-0003937318E6@mac.com> Message-ID: <99C12C4A-B527-11D6-A208-000393750DF6@mac.com> I've written a NSTableView subclass a while back that handles this - it lets you even override highlight colors for each row to make it as 'colorful' as you want. It's available at: http://homepage.mac.com/sapphire/FileSharing1.html A few features it includes: ? the simple 'iTunes-like' alternate row coloring (with row coloring even in the grid areas) with no pesky white spaces, plus settable highlight coloring for selected rows. ? the tricky column resizing & horizontal scrolling that could come up (that was a big pain in the butt - I had to subclass NSTableHeaderView and override the mouseDown). ? as a bonus, you can add the optional method to your dataSource - (NSColor *) tableView: (NSTableView *)tableView backgroundColorForRow: (int) row; which will let you set the background color for any specific row ? similarly, you can add the optional method to your dataSource - (NSColor *) tableView: (NSTableView *)tableView highlightColorForRow: (int) row; to set the highlight colors too, so you can make it real, um, artistic ? some preset colors This will also work with any kind of cells in your columns as long as they respond to setBackgroundColor: (which popup menus do, fortunately, in my case) To use this in your project, all you need to do is: ? add the ColoredRowTableView.h & ColoredRowTableView.m files to your project ? add the outlet variable to your controller of type ColoredRowTableView ? add the header file to your nib and set the NSTableViews custom class to ColoredRowTableView, set your dataSource to your controller, and put in the awakeFromNib: [coloredTV setOddRowColor:[ColoredRowTableView paleBlue]]; [coloredTV setHighlightColor:[ColoredRowTableView paleHighlightBlue]]; ? set your table view in the nib to be your new outlet variable I have noticed some limitations to it, e.g. if your table view is in a split view and you resize the split view, the bottom empty rows sometimes does not draw in colors. Best Regards, Bradford Brack On Wednesday, August 21, 2002, at 12:10 AM, Cl?ment Wehrung wrote: > I've already read it. But anyone find a solution to have all the > NSTableView with different colors, we find a solution to make one line > white and one line blue but it works just if you have something in the > line, if the line is nil, you couldn't set any color, the solution is > to make a subview of NSTableView and to drew the background > (drawRect:)... I attempt it, but it doesn't really run correctly... > Have you a code for it ? > > Le mercredi, 21 ao? 2002, ? 08:03 Europe/Paris, Costique a ?crit : > >> See this sample code: >> http://www.cocoadev.com/index.pl?AlternatingRowColors >> >> It's exactly what you need. >> >>> Hello, >>> I want to have a white line, and a blue line, in my table view, like >>> iTunes... >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> > -- > Cl?ment WEHRUNG > Mel : clems@mac.com > Web : www.rapidonet.org > ICQ : 97112291 > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 3362 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020821/ea2fc72f/attachment.bin From sean at skti.org Wed Aug 21 10:24:02 2002 From: sean at skti.org (Sean Kelly) Date: Thu Nov 3 14:49:55 2005 Subject: Drag and Drop to finder Message-ID: Hello, In my app, I have an NSOutlineView that represents and folder on the users machine. It displays all the files, folders, etc. I have implemented the ability to move files around inside the NSOutlineView using Drag and Drop. It can also accept drops from the finder and drop to the finder. However, when I drop into the finder, I need to know that so I can update the outlineVIew. What notification is posted here? Also, when I drag from the finder, it takes it about 5 seconds for the finder to notice that the file was moved and to delete the icon. Is there a way to speed that up? Thanks a lot, Sean Kelly www.skti.org From finlay at dobbie.net Wed Aug 21 11:00:43 2002 From: finlay at dobbie.net (Finlay Dobbie) Date: Thu Nov 3 14:49:55 2005 Subject: NSDateFormatter In-Reply-To: <2B3A7F3C-B51F-11D6-B7A5-003065590D32@marketcircle.com> Message-ID: <9FB21F6E-B52D-11D6-9798-000502319F17@dobbie.net> On Wednesday, August 21, 2002, at 05:00 PM, Ali Lalani (list) wrote: > I'm having a problem with NSDateFormatter. I'm wondering if it is > possible to get it to parse dates entered(on textfields with > dateformatters) with, say, Day/Month/Year configurations instead of > Month/Day/Year. This is not to be confused with dateFormat which > contains the format it turns dates entered into. When it reads in a > date string from the textfield, it seems to expect the data a specific > way, for instance if i type in: > 09/06/02 > it reads it as the 9th month, 6th day of 2002. I would like it to > interpret that string as the 9th day, 6th month, but i can't seem to > figure out how to instruct it to do so(my International preferences are > set to Day/Month/Year but it doesn't seem to take that into > consideration)...if anyone understands my babble and can help me out, > let me know, and thanks in advance :) Select your field and go to inspector->formatter. Set the "Custom Format" to: %d/%m/%y -- Finlay From finlay at dobbie.net Wed Aug 21 11:31:19 2002 From: finlay at dobbie.net (Finlay Dobbie) Date: Thu Nov 3 14:49:55 2005 Subject: NSDateFormatter In-Reply-To: <9FB21F6E-B52D-11D6-9798-000502319F17@dobbie.net> Message-ID: <4A5CC99D-B532-11D6-9798-000502319F17@dobbie.net> Please ignore me, I completely misread the question :-/ -- Finlay On Wednesday, August 21, 2002, at 06:44 PM, Finlay Dobbie wrote: > > On Wednesday, August 21, 2002, at 05:00 PM, Ali Lalani (list) wrote: > >> I'm having a problem with NSDateFormatter. I'm wondering if it is >> possible to get it to parse dates entered(on textfields with >> dateformatters) with, say, Day/Month/Year configurations instead of >> Month/Day/Year. This is not to be confused with dateFormat which >> contains the format it turns dates entered into. When it reads in a >> date string from the textfield, it seems to expect the data a specific >> way, for instance if i type in: >> 09/06/02 >> it reads it as the 9th month, 6th day of 2002. I would like it to >> interpret that string as the 9th day, 6th month, but i can't seem to >> figure out how to instruct it to do so(my International preferences >> are set to Day/Month/Year but it doesn't seem to take that into >> consideration)...if anyone understands my babble and can help me out, >> let me know, and thanks in advance :) > > Select your field and go to inspector->formatter. Set the "Custom > Format" to: > %d/%m/%y > > -- Finlay > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From andrew at zamler-carhart.com Wed Aug 21 11:46:07 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:55 2005 Subject: Rendezvous? In-Reply-To: <811276B5-B506-11D6-B510-003065CBD1E2@epicware.com> Message-ID: <250619B0-B536-11D6-A7A7-000A277A6C34@zamler-carhart.com> Folks, On Wednesday, August 21, 2002, at 06:04 AM, Eric Peyton wrote: > I don't know of any Rendezvous demos other than the Picture > Browser/Server included with the developer tools. What exactly are > you looking for? I would be interested in seeing a demo that uses Rendezvous with Distributed Objects. Andrew From ddavidso at apple.com Wed Aug 21 14:23:31 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:49:56 2005 Subject: Rendezvous? In-Reply-To: <250619B0-B536-11D6-A7A7-000A277A6C34@zamler-carhart.com> Message-ID: <7877497A-B54B-11D6-B5CC-000393115062@apple.com> On Wednesday, August 21, 2002, at 11:45 AM, Andrew Zamler-Carhart wrote: > On Wednesday, August 21, 2002, at 06:04 AM, Eric Peyton wrote: > >> I don't know of any Rendezvous demos other than the Picture >> Browser/Server included with the developer tools. What exactly are >> you looking for? > > I would be interested in seeing a demo that uses Rendezvous with > Distributed Objects. Not much to it. Just use [[NSSocketPortNameServer sharedInstance] registerPort:myNSSocketPort name:@"foo"]; on the server side and myNSSocketPort = [[NSSocketPortNameServer sharedInstance] portForName:@"foo" host:@"*"]; on the client side (the host can be * for any host, nil for local host, or the name or IP address of a specific host). Douglas Davidson From andrew at zamler-carhart.com Wed Aug 21 14:57:07 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:56 2005 Subject: Getting the OS Version? Message-ID: <2F4CB39C-B54F-11D6-A7A7-000A277A6C34@zamler-carhart.com> Dear List, I use this method to determine whether my app should try to use features that are only available in Jaguar (such as Rendezvous): + (BOOL) isRunningOnJaguarOrLater { if (NSAppKitVersionNumber < 663) { NSLog(@"This is earlier than Jaguar (%f)", NSAppKitVersionNumber); return NO; } else { NSLog(@"This is Jaguar or later (%f)", NSAppKitVersionNumber); return YES; } } On Mac OS X 10.1.5 (5S66), it outputs: This is earlier than Jaguar (620.000000) On Mac OS X 10.2 (6C115), it outputs: This is Jaguar or later (663.000000) My app successfully works with Rendezvous on 10.2, but doesn't crash (anymore!) when running under 10.1. It's not even August 24th yet, so it's a little early for my app to break under 10.1. :-) Of course, you would probably want to remove the debugging code: + (BOOL) isRunningOnJaguarOrLater { return (NSAppKitVersionNumber >= 663); } Andrew On Saturday, August 17, 2002, at 11:39 AM, John Saccente wrote: > On Saturday, August 17, 2002, at 01:35 PM, Colin Cornaby wrote: > >> How do you get the OS version? Long ago I thought I saw it someplace >> on here, but I searched the list and I couldn't find it. > > I think this is what was mentioned on the list a while back: > > http://www.cocoadevcentral.com/tutorials/showpage.php?show=00000057.php > > John From andrew at zamler-carhart.com Wed Aug 21 15:17:05 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:56 2005 Subject: Rendezvous? In-Reply-To: <7877497A-B54B-11D6-B5CC-000393115062@apple.com> Message-ID: Dear List, Okay, I got my app working with Rendezvous and Distributed Objects just fine. Read on for details. Actually, most of the code in the Picture Sharing examples (in /Developer/Examples/Foundation/PictureSharing) isn't Rendezvous-related per se -- there's a lot of low-level stuff that you don't need to use if you're using Distributed Objects. I have two requirements that Picture Sharing doesn't meet: - I need to be able to support clients on both local and remote subnets. - I need to be able to support clients/servers on any version of Mac OS X. Because I need to allow clients on remote subnets or 10.1 to connect without Rendezvous, my app runs on a fixed port. Therefore, only one server can run on a given host. This makes the client simpler as well. Basically, all I had to add on the server side to support Rendezvous is: // first vend the shared object using Distributed Objects on MY_PORT BOOL runningOnJaguar = NSAppKitVersionNumber >= 663; if (runningOnJaguar) { // otherwise this code would crash [self setNetService: [[NSNetService alloc] initWithDomain: @"local.arpa." type: @"_myapp._tcp." name: [NSString stringWithFormat: @"MyApp - %@", [[NSHost currentHost] name]] port: MY_PORT]]; [netService setDelegate: self]; } Before I added Rendezvous support, my client just had an NSComboBox for entering the IP name of the server (and it listed recently used servers). With Rendezvous support, there is now an NSTableView that displays the servers on the local subnet. For this, copying the code from the PictureSharingBrowser example worked fine. However, my serviceClicked: implementation is much simpler -- it just parses the name of the server and puts the result in the combo box. This is very similar to the way the "Connect to Server" dialog in the Finder works. Then the user clicks "Connect," and everything works just as well as if the user had typed in the server's address. - (IBAction) serviceClicked: (id) sender { int index = [sender selectedRow]; if (index > -1) { NSString *name = [[services objectAtIndex: index] name]; if ([name rangeOfString: @"MyApp - "].location == 0) { name = [name substringFromIndex: 8]; [addressComboBox setObjectValue: name]; } } } This solution sidesteps the complex procedure of getting the IP address from the remote NSNetService by tacking the server's IP name onto the net service's name. So, servers in the browser have names like "MyApp - myserver.local." which is fine. I'll probably do a little extra trickery to strip the ".local." bit from the browser. Another issue is that running the client on 10.1 would cause a crash. So I changed my ConnectToServerController's init method to load the old nib file if Rendezvous is not available, and I changed awakeFromNib: to not initialize the Rendezvous components. This provides a positive user experience that lets 10.1 users use the program without feeling like they're missing something, and lets 10.2 users take advantage of the additional features. Hope this proves useful. Andrew On Wednesday, August 21, 2002, at 02:18 PM, Douglas Davidson wrote: > > On Wednesday, August 21, 2002, at 11:45 AM, Andrew Zamler-Carhart > wrote: > >> On Wednesday, August 21, 2002, at 06:04 AM, Eric Peyton wrote: >> >>> I don't know of any Rendezvous demos other than the Picture >>> Browser/Server included with the developer tools. What exactly are >>> you looking for? >> >> I would be interested in seeing a demo that uses Rendezvous with >> Distributed Objects. > > Not much to it. Just use > > [[NSSocketPortNameServer sharedInstance] registerPort:myNSSocketPort > name:@"foo"]; > > on the server side and > > myNSSocketPort = [[NSSocketPortNameServer sharedInstance] > portForName:@"foo" host:@"*"]; > > on the client side (the host can be * for any host, nil for local > host, or the name or IP address of a specific host). > > Douglas Davidson > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From houou at mac.com Wed Aug 21 15:41:01 2002 From: houou at mac.com (Adam Atlas) Date: Thu Nov 3 14:49:56 2005 Subject: Brushed metal question In-Reply-To: <9C40FD1C-B50D-11D6-8B4E-0003936C5048@mac.com> Message-ID: On Wednesday, August 21, 2002, at 09:55 AM, I wrote (yeah, I'm replying to my own message): > I had it long before Unsanity. > But I was never able to release it because first I was working with > libPatch, which I never got it to work with, and then the > now-nonexistant Application Extensions, in which it worked great. Just > a few days ago, I talked to Slava from Unsanity, and he said they were > working on their own patching system. They released it yesterday- > along with their own Metallifizer. > > I wanted the glory of finally finding the cure for the brushed metal > virus. I DID find the cure. In fact, Slava from Unsanity KNEW I was > developing Metal Controller. I talked to him on AIM, and he said that > he didn't tell anyone else at Unsanity about my idea (which, even at > that time, was more than an idea... it was in a working state, in > Application Extensions), and that he had nothing to do with the > development of Metallifizer. Ok, ok, this post was just silly. I had it working first, but Unsanity got it out the door before me, and I admit it IS a pretty obvious idea. Forgive me for accusing you of stealing my idea, Unsanity... (Any replies about this should probably be off-list... this thread was already getting pretty off-topic.) --Adam Atlas From houou at mac.com Wed Aug 21 15:53:02 2002 From: houou at mac.com (Adam Atlas) Date: Thu Nov 3 14:49:56 2005 Subject: Getting a window's image In-Reply-To: <200208210321.g7L3L6v11170@slowbro.omnigroup.com> Message-ID: <4C992B3C-B558-11D6-8B4E-0003936C5048@mac.com> When I do that, I get a PDF that is the size of the window, but the picture of the window itself starts at x:-112 y:267 (in one test I did-- it varies whenever I move the window). I'm just passing [window frame] as the rect. Is the rect relative to the screen size or the location of the window? (Only getting the content view works fine, but that doesn't include the title bar or the background.) > Wouldn't NSWindow's dataWithPDFInsideRect: be easier? Then you can > init your NSImage from that data as so: > > NSImage *winImage = [[NSImage alloc] initWithData:[window > dataWithPDFInsideRect:rect]]; > > Hope that helps, > Matt Fahrenbacher > Humongous Elephants and Tigers > >>> Is it possible to get the image of a window (or its content view) and >>> put it into a NSImage? Carbon or CG stuff is also OK, as long as it >>> can >>> be accessed from Cocoa. >>> >>> Thanks, >>> Adam Atlas --Adam Atlas From ctp at apple.com Wed Aug 21 16:07:04 2002 From: ctp at apple.com (Chris Parker) Date: Thu Nov 3 14:49:56 2005 Subject: Rendezvous? In-Reply-To: Message-ID: Hi Andrew, Just a quick note: On Wednesday, August 21, 2002, at 03:11 PM, Andrew Zamler-Carhart wrote: > Basically, all I had to add on the server side to support Rendezvous > is: > > // first vend the shared object using Distributed Objects on MY_PORT > BOOL runningOnJaguar = NSAppKitVersionNumber >= 663; > if (runningOnJaguar) { // otherwise this code would crash > [self setNetService: [[NSNetService alloc] initWithDomain: > @"local.arpa." > type: @"_myapp._tcp." > name: [NSString stringWithFormat: @"MyApp - %@", [[NSHost > currentHost] name]] > port: MY_PORT]]; > [netService setDelegate: self]; > } After the example was done, some things changed which may affect what you're doing here (I think there's something that'll be explaining this coming up), and it was too late to change the example itself to reflect this: The default local registration domain changed - it's no longer @"local.arpa." but rather just @".local" the best/simplest thing to do if you want to register on all interfaces that you -can- register on is to just pass the empty string, and let Rendezvous take care of the rest. .chris -- Chris Parker Cocoa Frameworks Engineer Apple Computer, Inc. From andrew at zamler-carhart.com Wed Aug 21 16:50:02 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:56 2005 Subject: Rendezvous? In-Reply-To: Message-ID: Chris, Thanks for that. Yes, the documentation for NSNetService agrees with you: > It is generally preferred to use a NSNetServiceBrowser object to > obtain the local registration domain in which to publish your service. > To use this default domain, simply pass in an empty string (@"") for > the domain parameter. I ignored the docs because @"local.arpa." seemed to work fine (why is that?), but I'll take your advice and change it to @"" in both initWithDomain:type:name:port: and searchForServicesOfType:inDomain:. By the way, what is the significance of the dot that appears at the end of "myhost.local." or "local.arpa."? Thanks, Andrew On Wednesday, August 21, 2002, at 04:01 PM, Chris Parker wrote: > Hi Andrew, > > Just a quick note: > > On Wednesday, August 21, 2002, at 03:11 PM, Andrew Zamler-Carhart > wrote: > >> Basically, all I had to add on the server side to support Rendezvous >> is: >> >> // first vend the shared object using Distributed Objects on MY_PORT >> BOOL runningOnJaguar = NSAppKitVersionNumber >= 663; >> if (runningOnJaguar) { // otherwise this code would crash >> [self setNetService: [[NSNetService alloc] initWithDomain: >> @"local.arpa." >> type: @"_myapp._tcp." >> name: [NSString stringWithFormat: @"MyApp - %@", [[NSHost >> currentHost] name]] >> port: MY_PORT]]; >> [netService setDelegate: self]; >> } > > After the example was done, some things changed which may affect what > you're doing here (I think there's something that'll be explaining > this coming up), and it was too late to change the example itself to > reflect this: > > The default local registration domain changed - it's no longer > @"local.arpa." but rather just @".local" the best/simplest thing to do > if you want to register on all interfaces that you -can- register on > is to just pass the empty string, and let Rendezvous take care of the > rest. > > .chris > > -- > Chris Parker > Cocoa Frameworks Engineer > Apple Computer, Inc. > > From jamesp at silver-future.com Wed Aug 21 17:08:01 2002 From: jamesp at silver-future.com (James Powell) Date: Thu Nov 3 14:49:56 2005 Subject: beta testers Message-ID: I'm preparing a new experiment in distributed computing. The first release for Mac OS X looks great on my box, but I would like to get input from a wider group before releasing it. I'm looking for people who fit at least one of these categories: * Have a multiprocessor Mac. * Running a recent release of Jaguar. * Running a version of OS X other than 10.1.5. * Leave computer on 24/7 and can occupy the CPU during idle times. * Have prior experience with beta testing software. Others are encouraged to apply also. If you're interested, please respond to this email and tell me: - What kind of computer you have, including the number of CPUs and the CPU speed in mhz. - What version of OS X you are running. - What testing experience you have, if any. - Whether you leave your computer on 24/7. I will write to let you know whether you're in. Thank you, James From epeyton at epicware.com Wed Aug 21 17:44:02 2002 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:49:56 2005 Subject: Rendezvous? In-Reply-To: Message-ID: <096C41FA-B568-11D6-A01A-003065CBD1E2@epicware.com> > By the way, what is the significance of the dot that appears at the > end of "myhost.local." or "local.arpa."? > It signifies that the generated type address is fully qualified and therefore will not require further lookup. Eric > Thanks, > Andrew > > On Wednesday, August 21, 2002, at 04:01 PM, Chris Parker wrote: > >> Hi Andrew, >> >> Just a quick note: >> >> On Wednesday, August 21, 2002, at 03:11 PM, Andrew Zamler-Carhart >> wrote: >> >>> Basically, all I had to add on the server side to support Rendezvous >>> is: >>> >>> // first vend the shared object using Distributed Objects on MY_PORT >>> BOOL runningOnJaguar = NSAppKitVersionNumber >= 663; >>> if (runningOnJaguar) { // otherwise this code would crash >>> [self setNetService: [[NSNetService alloc] initWithDomain: >>> @"local.arpa." >>> type: @"_myapp._tcp." >>> name: [NSString stringWithFormat: @"MyApp - %@", [[NSHost >>> currentHost] name]] >>> port: MY_PORT]]; >>> [netService setDelegate: self]; >>> } >> >> After the example was done, some things changed which may affect what >> you're doing here (I think there's something that'll be explaining >> this coming up), and it was too late to change the example itself to >> reflect this: >> >> The default local registration domain changed - it's no longer >> @"local.arpa." but rather just @".local" the best/simplest thing to >> do if you want to register on all interfaces that you -can- register >> on is to just pass the empty string, and let Rendezvous take care of >> the rest. >> >> .chris >> >> -- >> Chris Parker >> Cocoa Frameworks Engineer >> Apple Computer, Inc. >> >> > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From peciva at pharos.co.nz Wed Aug 21 18:57:01 2002 From: peciva at pharos.co.nz (Tobias Peciva) Date: Thu Nov 3 14:49:56 2005 Subject: Login Item Install Location? Message-ID: <79218202D4B9D4118A290002A508E13BAAFD43@PNZEXCHANGE> Folks, A quick look in the Apple dox / list archives reveals a number of threads on how to launch an application at login time ... but none about where you should actually install the executable. We have a faceless background application that behaves like a daemon in most respects, but launches at login rather than startup. It's an .app bundle, but the user should never have to see or deal with it in Finder. Now, /Applications is reserved for user interface applications, /bin and /usr/bin for 'flat' command line tools and daemons and /Library/StartupItems for, well, startup items. /Library/Application Support is nice and generic, but not ideal. What gives? TIA, Tobias Peciva Pharos Systems From andrew at zamler-carhart.com Wed Aug 21 21:41:00 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:56 2005 Subject: Address Book: compatibility with 10.1 Message-ID: <4CA5F0CF-B589-11D6-A085-000A277A6C34@zamler-carhart.com> Dear List, I would like to take advantage of the Address Book framework in my application when running under 10.2, but have my app still run on 10.1. In order to use the Address Book, I have added a reference to /System/Library/Frameworks/AddressBook.framework to my project. Further, I include the headers by adding #import to the appropriate classes. So far, so good -- I can get the user's first name: if (isRunningOnJaguar) { ABPerson *me = [[ABAddressBook sharedAddressBook] me]; NSString *firstName = [me valueForProperty: kABFirstNameProperty]; [textField setStringValue: firstName]; } But when I run my app on 10.1, predictably I get an error: dyld: ...MyApp.app/Contents/MacOS/MyApp can't open library: /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook (No such file or directory, errno = 2) What should I do? As I've mentioned in previous posts, I am able to use Rendezvous code after I check the OS version, so this doesn't break my app under 10.1. But in that case I'm not using a new framework -- NSNetService has just been added to the main Cocoa framework. Thanks, Andrew From Stefan.Johansson at orctradelab.com Thu Aug 22 00:47:02 2002 From: Stefan.Johansson at orctradelab.com (Stefan Johansson) Date: Thu Nov 3 14:49:56 2005 Subject: PostgreSQL and Objective-C Message-ID: Hi, We are in the process of making our application use a database. We've decided to go for (or at least try out) PostgreSQL, since we need stored procedures. I heard however that MySQL supported stored procedures through innoDB, but after talking to some people, they discouraged me from using MySQL. The mainpoint here being that I should not go for MySQL just to get a tiny bit more performance and that PostgreSQL was somewhat more advanced. If someone has an opinion in this, by all means, feel free to comment on it :) Now to my main question. How could I access a PostreSQL database from Objective-C? Is there any ObjC libraries or something that I could use, or do I have to use pure C calls. Using pure C calls doesn't bother me, would be neater to use some ObjC library though... Cheers, Stefan From moetteli.bulk at bluewin.ch Thu Aug 22 02:16:02 2002 From: moetteli.bulk at bluewin.ch (=?ISO-8859-1?Q?Philip_M=F6tteli?=) Date: Thu Nov 3 14:49:56 2005 Subject: PostgreSQL and Objective-C In-Reply-To: Message-ID: <55DAFE50-B5AF-11D6-8634-0030654A657A@bluewin.ch> Hi Am Donnerstag den, 22. August 2002, um 09:46, schrieb Stefan Johansson: > We are in the process of making our application use a database. > We've decided to go for (or at least try out) PostgreSQL, since we need > stored procedures. I heard however that MySQL supported stored > procedures > through innoDB, but after talking to some people, they discouraged me > from > using MySQL. The mainpoint here being that I should not go for MySQL > just to > get a tiny bit more performance and that PostgreSQL was somewhat more > advanced. > If someone has an opinion in this, by all means, feel free to comment > on it > :) I do agree on that. > Now to my main question. > How could I access a PostreSQL database from Objective-C? > Is there any ObjC libraries or something that I could use, or do I have > to > use pure C calls. Using pure C calls doesn't bother me, would be neater > to > use some ObjC library though... There's an ObjC framework for PostgreSQL access. I don't have the address handy, but it's called 'NKDPostgreSQL'. Please look into the mailinglist archives. Re Phil From gss+osxdev at cs.brown.edu Thu Aug 22 02:20:01 2002 From: gss+osxdev at cs.brown.edu (Gregory Seidman) Date: Thu Nov 3 14:49:56 2005 Subject: PostgreSQL and Objective-C In-Reply-To: References: Message-ID: <20020822091931.GA26780@cs.brown.edu> Stefan Johansson sez: } We are in the process of making our application use a database. } We've decided to go for (or at least try out) PostgreSQL, since we need } stored procedures. I heard however that MySQL supported stored procedures } through innoDB, but after talking to some people, they discouraged me from } using MySQL. The mainpoint here being that I should not go for MySQL just to } get a tiny bit more performance and that PostgreSQL was somewhat more } advanced. } If someone has an opinion in this, by all means, feel free to comment on it } :) MySQL is a glorified datastore rather than a full-fledged database. If your application requires nothing more than a datastore, MySQL is a better performer. If, however, you will want your application to use a database for more complicated purposes (e.g. stored procedures, nested queries, data integrity constraints, etc.) then you are better off with PostgreSQL. Personally, I find MySQL painfully limited. } Now to my main question. } How could I access a PostgreSQL database from Objective-C? } Is there any ObjC libraries or something that I could use, or do I have to } use pure C calls. Using pure C calls doesn't bother me, would be neater to } use some ObjC library though... I recommend not only sticking to C, but using ODBC rather than a direct connection to the database. I don't know if Jaguar is shipping with ODBC as rumored (anyone know?), but it is certainly available and works well. It also gives you flexibility for the future -- using a commercial database instead of PostgreSQL should require a minimum of code changes. I would like to see an Obj-C library wrapped around ODBC, and I wouldn't be surprised if such a thing were being developed by someone, maybe even Apple. } Cheers, } Stefan --Greg From toastedmarshmallow at mac.com Thu Aug 22 04:15:01 2002 From: toastedmarshmallow at mac.com (=?ISO-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:49:56 2005 Subject: Address Book: compatibility with 10.1 In-Reply-To: <4CA5F0CF-B589-11D6-A085-000A277A6C34@zamler-carhart.com> Message-ID: <5223537D-B5BF-11D6-9966-0030654E84BA@mac.com> On Thursday, August 22, 2002, at 06:40 AM, Andrew Zamler-Carhart wrote: > But when I run my app on 10.1, predictably I get an error: > > dyld: ...MyApp.app/Contents/MacOS/MyApp can't open library: > /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook > (No such file or directory, errno = 2) > > What should I do? > I'd put the code that uses AddressBook.framework in a separate bundle. Load that bundle only if the OS version is right. Regards, John Hornkvist From paul at xceltech.net Thu Aug 22 04:31:01 2002 From: paul at xceltech.net (Paul Naro) Date: Thu Nov 3 14:49:56 2005 Subject: PostgreSQL and Objective-C In-Reply-To: Message-ID: <8121D7E4-B5C2-11D6-9CA8-000393452B6A@xceltech.net> On Thursday, August 22, 2002, at 01:46 AM, Stefan Johansson wrote: > Now to my main question. > How could I access a PostreSQL database from Objective-C? > Is there any ObjC libraries or something that I could use, or do I > have to > use pure C calls. Using pure C calls doesn't bother me, would be > neater to > I'm getting ready to release a native PostgreSQL query tool. It uses the native C library to connect to and query PostgreSQL. Email me privately if you are interested or having questions. It's a simple app that provides table and tab-delimited output. It's still a little rough (no syntax coloring, etc), but works well enough. Regards, Paul Naro Xcel Technologies, Inc. http://www.xceltech.com/ AOL IM: PaulNaro From esimcoe at mac.com Thu Aug 22 04:53:19 2002 From: esimcoe at mac.com (Eliot Simcoe) Date: Thu Nov 3 14:49:56 2005 Subject: Linking to C Libraries in Project Builder Message-ID: <8BB85E6F-B5C5-11D6-92AB-0003939C6FC8@mac.com> How can one setup Project Builder to link to C libraries? I am trying to use the ImageMagick API for an application I am writing, but I can't get it to compile. In the API documentation it says the compiler commands are: setenv LD_LIBRARY_PATH /usr/local/lib gcc `Magick-config --cflags --cppflags` demo.c `Magick-config --ldflags --libs` How does that translate into PB? I began programming in Objective-C and Cocoa, so I never fully grasped C. I would appreciate help from anyone who can offer. Thanks in advance. A lowly programmer, Eliot Simcoe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 622 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020822/39aac55e/attachment.bin From Nicolas.Normand at polytech.univ-nantes.fr Thu Aug 22 06:38:01 2002 From: Nicolas.Normand at polytech.univ-nantes.fr (Nicolas Normand) Date: Thu Nov 3 14:49:56 2005 Subject: Getting a window's image In-Reply-To: <200208220918.g7M9I1v20053@slowbro.omnigroup.com> Message-ID: > Is it possible to get the image of a window (or its content view) and > put it into a NSImage? Carbon or CG stuff is also OK, as long as it > can > be accessed from Cocoa. > > Thanks, > Adam Atlas I think you could try something like this (having locked focus on some view with graphics drawn onto) : NSImage *image; NSImageRep *imageRep; NSRect bounds; bounds = [[NSView focusView] bounds]; imageRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:bounds]; image = [[NSImage alloc] initWithSize:bounds.size]; [image addRepresentation:imageRep]; Unfortunately, imageRep doesn't have an alpha channel, which makes the thing useless for me... Hope this helps you anyway, Nicolas Normand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 810 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020822/8f0da2d2/attachment.bin From dnanian at shirt-pocket.com Thu Aug 22 06:43:31 2002 From: dnanian at shirt-pocket.com (Dave Nanian) Date: Thu Nov 3 14:49:56 2005 Subject: Automatic contrasting color selection technique? In-Reply-To: <807A1302-B527-11D6-A7A7-000A277A6C34@zamler-carhart.com> Message-ID: <04EE74B6-B5D5-11D6-BC4D-000393D74812@shirt-pocket.com> Andrew -- Thanks very much for this tip -- I was trying to figure out how to map HSV and/or RGB values to something that would give me reasonable "brightness" equivalents, and there was so much interaction between the various choices that I thought there must be a better way. Mapping to the NSCalibratedWhiteColorSpace is a great idea, and not something I would have thought to do. Thanks! On Wednesday, August 21, 2002, at 01:00 pm, Andrew Zamler-Carhart wrote: > Dave, > > I had the same problem as you -- I want to draw text on an arbitrary > background color. Basically, I draw text in black unless the > background color is "darker" than 30% lightness, in which case I draw > in white. > > In the standard color palette, blue, purple, and of course black are > "darker" than 30% and get white text. This winds up looking about > right for most colors and shades of gray that I have tried, although > you could vary the parameter. > > I have a category like this: > > @implementation NSColor (DarkColor) > > - (BOOL) isDarkerThan: (float) lightness { > NSColor *monoColor = [self colorUsingColorSpaceName: > @"NSCalibratedWhiteColorSpace"]; > return ([monoColor whiteComponent] < lightness); > } > > @end > > When the background color changes, I update the foreground color as > such: > > [attributes takeValue: ([backgroundColor isDarkerThan: 0.30] ? > [NSColor whiteColor] : [NSColor blackColor]) > forKey: NSForegroundColorAttributeName]; > > Hope this helps, > Andrew > > On Wednesday, August 21, 2002, at 06:28 AM, Dave Nanian wrote: > >> Hi -- I'm working on trying to automatically select an appropriate >> text color given an arbitrary background color. This is being used in >> a table, where the background highlight color is specified somewhere >> else (and isn't always something useful), and using the >> selectedTextColor doesn't always give something that's visible! >> >> So, given an NSColor as a background, is there a good way to choose a >> foreground that will be visible to the user, and won't make them want >> to either a) scream in pain or b) vomit? >> >> Thanks for any suggestions! >> -- >> Dave Nanian >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> >> -- Dave Nanian -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2689 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020822/3e432b34/attachment.bin From esimcoe at mac.com Thu Aug 22 07:02:00 2002 From: esimcoe at mac.com (Eliot Simcoe) Date: Thu Nov 3 14:49:56 2005 Subject: Linking to C Libraries in Project Builder In-Reply-To: <8BB85E6F-B5C5-11D6-92AB-0003939C6FC8@mac.com> Message-ID: I hate it when I pose a question then figure it out... At any rate, I have it working. My only gripe is that now I'm receiving the following compiler warning: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used I tried inserting the flag into the "Other Compiler Flags" and "Other Linker Flags", but neither of them extinguished the error. Where does this flag need to be entered? Thanks again. Eliot Simcoe On Thursday, August 22, 2002, at 07:51 AM, Eliot Simcoe wrote: > How can one setup Project Builder to link to C libraries? I am trying > to use the ImageMagick API for an application I am writing, but I can't > get it to compile. In the API documentation it says the compiler > commands are: > > setenv LD_LIBRARY_PATH /usr/local/lib > gcc `Magick-config --cflags --cppflags` demo.c `Magick-config --ldflags > --libs` > > How does that translate into PB? I began programming in Objective-C and > Cocoa, so I never fully grasped C. I would appreciate help from anyone > who can offer. Thanks in advance. > > A lowly programmer, > Eliot Simcoe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1214 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020822/656eefe8/attachment.bin From olivier at macdev.itg.ti.com Thu Aug 22 09:02:37 2002 From: olivier at macdev.itg.ti.com (Olivier) Date: Thu Nov 3 14:49:56 2005 Subject: Jaguar and April Dev tools In-Reply-To: Message-ID: <707B1752-B5E8-11D6-8A56-0003937C1CAC@macdev.itg.ti.com> It is in the package folder of the developer tools CD. olivier On Wednesday, August 21, 2002, at 10:59 AM, Andreas Hoeschler wrote: > Hi all, > >> get the jaguar developer tool. > > Can anybody confirm that ProjectBuilderWO is still part of the jaguar > dev tools? If not we will have to stick to 10.1. > > Regards, > > Andreas > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From olivier at macdev.itg.ti.com Thu Aug 22 09:05:07 2002 From: olivier at macdev.itg.ti.com (Olivier) Date: Thu Nov 3 14:49:56 2005 Subject: beta testers In-Reply-To: Message-ID: <979D0774-B5E8-11D6-8A56-0003937C1CAC@macdev.itg.ti.com> tell us what the software does. olivier On Wednesday, August 21, 2002, at 07:06 PM, James Powell wrote: > I'm preparing a new experiment in distributed computing. The first > release for Mac OS X looks great on my box, but I would like to get > input from a wider group before releasing it. I'm looking for people > who fit at least one of these categories: > > * Have a multiprocessor Mac. > * Running a recent release of Jaguar. > * Running a version of OS X other than 10.1.5. > * Leave computer on 24/7 and can occupy the CPU during idle times. > * Have prior experience with beta testing software. > > Others are encouraged to apply also. If you're interested, please > respond to this email and tell me: > > - What kind of computer you have, including the number of CPUs and the > CPU speed in mhz. > - What version of OS X you are running. > - What testing experience you have, if any. > - Whether you leave your computer on 24/7. > > I will write to let you know whether you're in. > > Thank you, > James > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From bdanube at mac.com Thu Aug 22 09:11:01 2002 From: bdanube at mac.com (Michael Grant) Date: Thu Nov 3 14:49:56 2005 Subject: PostgreSQL and Objective-C In-Reply-To: <55DAFE50-B5AF-11D6-8634-0030654A657A@bluewin.ch> Message-ID: On 8/22/02 4:12 AM, "Philip M?tteli" wrote: > There's an ObjC framework for PostgreSQL access. I don't have the > address handy, but it's called 'NKDPostgreSQL'. Please look into the > mailinglist archives. Can't find it, either in the list archive or on Google.... Michael -- If God had wanted us to be metric, Jesus would have had ten disciples! From spinel at inadd.com Thu Aug 22 11:26:17 2002 From: spinel at inadd.com (St=?ISO-8859-1?B?6Q==?=phane Pinel) Date: Thu Nov 3 14:49:56 2005 Subject: PostgreSQL and Objective-C In-Reply-To: Message-ID: Le 22/08/02 18:10, ??Michael Grant?? a ?crit?: > NKDPostgreSQL Check this: http://www.macupdate.com/info.php/id/8407 Regards. -- St?phane Pinel InAdd Paris spinel@inadd.com From steve at dekorte.com Thu Aug 22 12:57:25 2002 From: steve at dekorte.com (Steve Dekorte) Date: Thu Nov 3 14:49:56 2005 Subject: OSX OpenGL/GLUT memory leak? Message-ID: The following code leaks about 10k per second on my machine. Is there a memory leak in glut timers on OSX or am I doing something wrong? ---------------------------------------------------- #include void reshape(int w, int h) { glViewport(0, 0, w, h); glClear(GL_COLOR_BUFFER_BIT); glutPostRedisplay(); } void display(void) { glClearColor(0, 0, 1, 1); glFlush(); glutSwapBuffers(); } void timer(int v) { glutTimerFunc(100, timer, 0); } int main(int argc, char **argv) { glutInitWindowSize(512, 512); glutInit(&argc, argv); (void)glutCreateWindow("test glut memory leak"); glutDisplayFunc(display); glutReshapeFunc(reshape); glutTimerFunc(100, timer, 0); glutMainLoop(); return 0; } From bdanube at mac.com Thu Aug 22 14:25:15 2002 From: bdanube at mac.com (Michael Grant) Date: Thu Nov 3 14:49:56 2005 Subject: PostgreSQL and Objective-C In-Reply-To: Message-ID: On 8/22/02 1:16 PM, "St?phane Pinel" wrote: >> NKDPostgreSQL > > Check this: http://www.macupdate.com/info.php/id/8407 Verry innnterresting... Thanks! Michael -- "Sometimes, when I sleep at night, I think of 'Hop on Pop.'" - George W. Bush, in a speech about childhood education, AP, April 2, 2002 From marcel at metaobject.com Thu Aug 22 16:12:02 2002 From: marcel at metaobject.com (Marcel Weiher) Date: Thu Nov 3 14:49:56 2005 Subject: QuickTime 6 JPEG2000 export? Message-ID: <6C189F92-B624-11D6-A5A7-00039366F3C0@metaobject.com> Hi folks, anyone know how I can tell QuickTime 6 to expor/compress image data as JPEG2000? The capability is listed as one of the new features in 6.0, but I can't find anything in the headers, documentation or sample code, either on my (10.2) system or the web. Thanks, Marcel -- Marcel Weiher Metaobject Software Technologies marcel@metaobject.com www.metaobject.com Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc. From andrew at zamler-carhart.com Thu Aug 22 16:37:06 2002 From: andrew at zamler-carhart.com (Andrew Zamler-Carhart) Date: Thu Nov 3 14:49:56 2005 Subject: iChat API Message-ID: <18C14ECE-B627-11D6-B137-000A277A6C34@zamler-carhart.com> Dear list, I would like my app to integrate with iChat in way similar to Mail and Address Book. I would like to: 1) determine if a given buddy is online 2) get the list of buddies (online or all) 3) bring up a chat session with a buddy 4) programmatically send instant messages to a buddy (with text specified by my app rather than the user) Mail can, at the very least, do items 1) and 3), and Address Book can do item 3). That doesn't mean that the iChat API is public, but it does mean that it's possible if you know what to write. Would anyone in 95014 care to elucidate? :-) It's pretty straightforward to scan the Address Book for people with AIMInstant property values, so that's a step in the right direction but it's not the same per se as getting the list of iChat buddies. Thanks, Andrew From finlay at dobbie.net Thu Aug 22 16:52:01 2002 From: finlay at dobbie.net (Finlay Dobbie) Date: Thu Nov 3 14:49:56 2005 Subject: iChat API In-Reply-To: <18C14ECE-B627-11D6-B137-000A277A6C34@zamler-carhart.com> Message-ID: On Friday,