From rick at icons.cx Tue Jan 1 02:19:00 2002 From: rick at icons.cx (Rick Roe) Date: Thu Nov 3 14:48:08 2005 Subject: Any ideas for a cool app? In-Reply-To: Message-ID: This is a topic for macosx-talk. Thank you! -- Rick Roe icons.cx / The Omni Group From rick at icons.cx Tue Jan 1 02:34:01 2002 From: rick at icons.cx (Rick Roe) Date: Thu Nov 3 14:48:08 2005 Subject: Setting a file's icon In-Reply-To: <3D1D3C62-FD31-11D5-942A-003065BA6A54@10191.com> Message-ID: This has been discussed many times... You might want to search the archives more for details. First, you'll need to create the 'icns' data structure used for icons from one or more images. See Icons.h. Or look in the list archives -- I believe someone posted a utility class for creating icns data from NSImages. Next, you need to save this data as the file's custom icon. Icon Services or Icon Utilities may have functions for doing this... I'm not sure. If not, use the Resource Manager to save the data as an icns resource id -16455 in the file, and set the "has custom icon" bit in the file's finderInfo flags. If you're saving a custom icon for a folder or file-wrapper/package, save the icon resource in an invisible file named "Icon\r" (ends with a carriage return character) and set the custom icon bit on the folder, not the invisible file. -- Rick Roe icons.cx / The Omni Group From rosyna at unsanity.com Tue Jan 1 02:47:01 2002 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:48:08 2005 Subject: Setting a file's icon In-Reply-To: References: Message-ID: As an aside, you can't even add returns to files in the OS X finder anymore, not can you make aliases of files that contain them :( Ack, at 1/1/02, Rick Roe said: >If you're saving a custom icon for a folder or file-wrapper/package, save >the icon resource in an invisible file named "Icon\r" (ends with a carriage >return character) and set the custom icon bit on the folder, not the >invisible file. -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insane People From sanguish at digifix.com Tue Jan 1 05:59:00 2002 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:48:08 2005 Subject: Any Ideas for a cool app? In-Reply-To: <799B0C7B-FE56-11D5-A981-000393030CD8@mac.com> Message-ID: <8755FB91-FEBF-11D5-BBE5-000393120A7C@digifix.com> On Monday, December 31, 2001, at 08:25 PM, fabienlroy@mac.com wrote: > FWIW: Do a clone of Quicken using EOF with either MySQL, OpenBase for > the storage etc. > For the networking part: use SOAP for the display (the View part of the > MVC model). > Advantage: This would show to the big player that Cocoa + EOF can give > a real advantage to the development cycle. > Unfortunately, it'd be almost useless in the deployment aspect of things. EOF isn't licensable for distribution, and you'd have to have WebObjects to use it. And on top of that, you'd be stuck writing Cocoa/Java since EOF has been effective isolated from objective-C use From snoyes at execpc.com Tue Jan 1 07:45:59 2002 From: snoyes at execpc.com (snoyes@execpc.com) Date: Thu Nov 3 14:48:08 2005 Subject: Obj-C: Abstract methods and related problems Message-ID: As indicated you need to start from NSObject. You really do not want to re-invent the mother of all objects :-) so far, so good. Well almost. How can I _force_ derivations of BaseClass to implement the abstract methods if the protocol Abstract is ommitted? The next problem is the implementation of compareByName in the BaseClass. As BaseClass doesn't implement "name", the compiler complaints. How do I convince him to call the instance method in the derived class? Simply doing a: [self compareByname:[self name] withAlias:[self alias]] will just work. Even if your base class does not implement name or alias the run time will call the appropriate method when the code executes. To avoid a compiler warning, it is a good idea to put in shell implements of the desired protocol methods that log a fault if they are called. The children methods will then over-ride those methods as required. It is nice, even, to have you abstract class to define some default behavior in the event someone does not want to provide 100% of the functionality of the base class and just wants to use parts of it. Again, if you do not mind warnings, simply do nothing and the right methods will just get called. Sorry for asking that. By reading Apple's Obj-C-PDF I can't get any clues. It's a bit abstract (pun intended). Are there other sources for learning Obj-C? My book dealer sais no, "Learning Cocoa" helps a bit, but it only scratches the surface. There is a book by Brad Cox that is really very good. This is similar to the K&R book of 'C'. I do not know if it is still in print, but if you can find it, buy it. Object-Oriented Programming : An Evolutionary Approach by Brad Cox http://www.virtualschool.edu/lang/objectivec/ Steven Noyes Thanks and happy seasons, Nick ......................................... logic tools WebObjects // Web Authoring // Perl Nick Mueller // Muenchen // Germany _______________________________________________ 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: 2436 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020101/a67197b0/attachment.bin From finlay.dobbie at btinternet.com Tue Jan 1 10:27:00 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:08 2005 Subject: Calling a bsd program from a Cocoa Obj-C app In-Reply-To: <2ACD6C54-FE8C-11D5-9ECC-000A278D236E@richcreations.com> Message-ID: On Tuesday, January 1, 2002, at 07:50 am, RichCreations wrote: > Would I use a NSTextView, a NSBrowser, or a NSTextField, to display the > output? Depends what you're trying to do. > How do I run the cli app, and collect the output, to direct it into the > window? Please open your eyes. There are plenty of examples of how to do this on the web, for exaple the one on http://www.cocoadevcentral.com. > Can I have the cli app inside the bundle for the gui app, or do I need > to install it by itself? Either, as you choose. See the NSBundle documentation. > Would any of this work if the user did not install the bsd package? As long as you don't depend on any of the things in the BSD package, yes. To see what's installed by the BSD package, use this command: lsbom /Library/Receipts/BSD.pkg/Contents/Resources/BSD.bom -- Finlay From shubo at mac.com Tue Jan 1 16:53:00 2002 From: shubo at mac.com (Yong Lee) Date: Thu Nov 3 14:48:08 2005 Subject: That Cocoa Book... Message-ID: I'm having hard time with the table view challenge on page 268 and I can't find the solution on the website: http://www.bignerdranch.com/Book/Guide.html Am I suppose to look at someplace else? Yong Lee > From: "Michael F Brinkman" > Date: Tue Jan 01, 2002 07:37:31 AM US/Pacific > To: brinkma1@pilot.msu.edu (Michael F Brinkman) > Cc: cocoa-dev@lists.apple.com > Subject: Re: That Cocoa Book... > > I just got an e-mail from Aaron Hillegass stating that the challenge > examples > are now posted on the web site. That was quick! > > Thumbs up on the book, but it if you get the chance! > > Happy New Year! > Mike Brinkman > >> >> Over all, I've enjoyed the book (I got it yesterday and have gone >> through the >> first 100 pages), but I wish the web site had solutions to the >> challenge >> questions. You think it would, since I just dropped $45 on it and it >> didn't >> come with a CD. Am I being unreasonable, or have I simply overlooked >> something > ? > _______________________________________________ > 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 fabienlroy at mac.com Tue Jan 1 17:52:00 2002 From: fabienlroy at mac.com (fabienlroy@mac.com) Date: Thu Nov 3 14:48:08 2005 Subject: Any Ideas for a cool app? In-Reply-To: <8755FB91-FEBF-11D5-BBE5-000393120A7C@digifix.com> Message-ID: <4323141F-FF23-11D5-A981-000393030CD8@mac.com> I may be wrong but, there is a deployment license of WO with each version of OS X, isn't it? Also WO 4.5.1 and WO 5 deployment libraries are there also, so the ObjC version of EOF should be there. Fabien. On Tuesday, January 1, 2002, at 07:57 AM, Scott Anguish wrote: > Unfortunately, it'd be almost useless in the deployment aspect of > things. > > EOF isn't licensable for distribution, and you'd have to have > WebObjects to use it. > > And on top of that, you'd be stuck writing Cocoa/Java since EOF > has been effective isolated from objective-C use > > --- Fabien Roy Senior Software Engineer Tyrell Software Corporation 949 458-1911 ext 4 From luthier at ozemail.com.au Tue Jan 1 19:19:01 2002 From: luthier at ozemail.com.au (Peter Ferrett) Date: Thu Nov 3 14:48:08 2005 Subject: dbopen - file corruption Message-ID: I have been using dbopen() it to make a persistent version of an NSDictionary. The NSDictionary objects are shuffled to and from disc using the b-tree form of dbopen. I have been having some problems with file corruption. Keys and data will write correctly. However at some point a call to write a key data pair appears to corrupt the file (usually after several hundred key/value pairs has been inserted). The corruption is in the form of missing values for a range (10-15) of keys. - Default values are used for the btree variables. - keys are C strings (keythang.data = (char*) [aKey cString]; keythang.size = [aKey cStringLength]; ) - values are archived objects (data = [NSArchiver archivedDataWithRootObject: anObject]; valuethang.data = (char*) [data bytes]; valuethang.size = [data length]; ) - corruption is in the form of completely missing values for example, if the following was in the file key value a 1 b 2 c 3 ... ... ... ... z 26 and the following function is called: err = bt->put(bt, &keythang, &valuethang, 0); then a read of the file shows that some values are missing. eg key value a 1 b 2 c (nothing) d (nothing) e (nothing) f 6 g 7 ... ... z 26 It is ok for smaller files, but is generally corrupted when greater than 7-800 key/value pairs are inserted. I am extremely stumped by this and would appreciated any feedback. regards Peter Ferrett From mwatson at apple.com Tue Jan 1 20:52:03 2002 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:48:08 2005 Subject: dbopen - file corruption In-Reply-To: Message-ID: <6A7E839A-FF3C-11D5-9337-003065F22E4E@apple.com> Are you sure your data elements are all retained? The cString and bytes methods will return autoreleased objects. Could you show a self-contained example that shows the problem? matt. On Saturday, September 1, 2001, at 09:18 AM, Peter Ferrett wrote: > I have been using dbopen() it to make a persistent version of an > NSDictionary. The NSDictionary objects are shuffled to and from disc > using the b-tree form of dbopen. From sanguish at digifix.com Tue Jan 1 21:53:01 2002 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:48:08 2005 Subject: Any Ideas for a cool app? In-Reply-To: <4323141F-FF23-11D5-A981-000393030CD8@mac.com> Message-ID: On Tuesday, January 1, 2002, at 08:51 PM, fabienlroy@mac.com wrote: > I may be wrong but, there is a deployment license of WO with each > version of OS X, isn't it? Nope.. no deployment of WO included with OS X, just with OS X Server. > Also WO 4.5.1 and WO 5 deployment libraries are there also, so the ObjC > version of EOF should be there. This is a whole big convoluted, Apple screwed up, mess.. Obj-C EOF is royally screwed up on OS X... you can't create UI associations from IB because a palette is broken, and even then, things are apparently very iffy. And you still need to have WO deployment/developer installed to run the apps. Obj-C versions of apps won't run against the WO 5 stuff, because the EO Obj-C frameworks are only included with WO 4.5.1 (which is basically dead ended, and already pretty crippled on OS X)... From AitkenA at cbs.curtin.edu.au Tue Jan 1 22:10:01 2002 From: AitkenA at cbs.curtin.edu.au (Ashley Aitken) Date: Thu Nov 3 14:48:08 2005 Subject: Any Ideas for a cool app? Message-ID: Clearly this is rather strange behaviour from Apple (with regards to licensing of EOF), particularly since there was a session at WWDC directly discussing two-tier Cocoa/EOF applications. Any ideas as to why Apple is hiding EOF in WebObjects? Excluding astrological reasons. Could it be that they don't want people running off and using it with other Java Web application environments? Seeing it as icing (of sorts) on WebObjects. Just wondering ... Cheers and Happy New Year to all! Ashley. >>> Scott Anguish 01/02/02 01:51pm >>> On Tuesday, January 1, 2002, at 08:51 PM, fabienlroy@mac.com wrote: > I may be wrong but, there is a deployment license of WO with each > version of OS X, isn't it? Nope.. no deployment of WO included with OS X, just with OS X Server. > Also WO 4.5.1 and WO 5 deployment libraries are there also, so the ObjC > version of EOF should be there. This is a whole big convoluted, Apple screwed up, mess.. Obj-C EOF is royally screwed up on OS X... you can't create UI associations from IB because a palette is broken, and even then, things are apparently very iffy. And you still need to have WO deployment/developer installed to run the apps. Obj-C versions of apps won't run against the WO 5 stuff, because the EO Obj-C frameworks are only included with WO 4.5.1 (which is basically dead ended, and already pretty crippled on OS X)... _______________________________________________ MacOSX-dev mailing list MacOSX-dev@omnigroup.com http://www.omnigroup.com/mailman/listinfo/macosx-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/20020101/384fd9a6/attachment.html From osx-developer at www.com Tue Jan 1 22:58:01 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:08 2005 Subject: PDO Replacement Attempts and related problems in OSX (Version 10) Message-ID: <200201020656.g026uwY19530@mail14.bigmailbox.com> Are there any other attempts or existing solutions to replace PDO on OSX out there? Summation of following Bugg Description.- ________________________________________________ NSInvocation is not able to set the return value (setReturnValue:) in a usable way, or requires proper documentation. NSArchiver and NSUnarchiver both have problems when dealing with NSInvocations (and using them in Distant Object Message). NSArchiver seems to fail in fowrardInvocation: calls of an Application and errors on multiple argument method signatures in an Objective-Tool, while the Unarchiver seems unable to unarchive the return value of an NSInvocation (0x0 is all there is, so it's a separate problem the the setReturnValue issue, but could be related). [see detailed description below for more information about these problems, or at least my attempts to replace the reportedly no longer support yet critical PDO (Portable Distributed Objects) system. ________________________________________________ [The Replacement Classes will be called NEW_*Class* for this explanation.] After building an entire replacement for PDO (Portable Distributed Objects), I have discovered a few technical problems. [Needed has been a NEW_Connection to replace NSConnections, a NEW_DistantObject to replace NSDistantObject, and also I have couple of socket classes that NEW_Connection uses.] As far as programs I have (so far for now) a Hub Tool that allows Servers to register a name and the hub keeps track of a port number and the IP, this can be global [I believe the old system must have used the broadcast address, but for my needs a more global approach is needed (besides being an easier short cut for now) and therefor a central Hub process is required or at least a list to try in some order or to check all of. Then one might have a concept of a Master Hub and Slave Hubs etc.], and eventually a secure socket layer (SSL) would be included, if needed beyond the local network. Lots more is needed here only when and if the rest of it works right, and is otherwise still needed that is true PDO returns.) Next comes the Server Tool that connects to the Hub and Requests to Register a name, the hub returns the next port for that IP and the server starts a NEW_Connection which runs a NEW_socket that waits for a client to connect to it. Then the Client Tool asks the Hub for the IP and port of a server that is serving a NEW_Connection for the registered name. It gets this information and establishes a NEW_Connection with the server. (They confirm the connection to each other.) [Finally the magic part comes next, since this is built on and for Objective-C, and it is intended to replace the no longer working properly or suppose to be supported ever again PDO (that made NeXT useful, important, and of any value to me.) The replacement must follow the form of NSConnections, NSDistantObjects, etc. but most importantly it must use the NeXT (now seemingly unstably sketched and owned by Apple) Classes NSInvocation and NSArchiver (the archiver seems to need replacing and that might be basically possible in the case of NSInvocations at some point, but the NSInvocation is limited or appears buggy, hence this document or bugg inquiry it is eventually intended for.] The Client Tool has a proxy or NEW_DistantObject that has a/the Protocol of the Served Object (I have tried variations of 'inout' [default] etc. and other type declarations documented for protocols intended for just such a situation, to no avail so far.) Now the client sends a message to the Proxy(NEW_DistantObject) [This NEW_DistantObject is required because I have a NEW_Connection using a NEW_Socket, and NSDistantObject does not have a usable Connection otherwise.] Say like this ... [server takeStringAndReturnString:(NSString *)someString]; The Proxy must implement methodSignatureForSelector and for now I use a method called setRootObject: to make sure the method signature is of the correct type (I can see that this is slightly different then what was required with the original PDO but for now it's a good work-around [and not a/the problem].) - (void)setRootObject:(id)rootObject { rootObj = rootObject; } - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { return [rootObj methodSignatureForSelector:aSelector]; } This validated the method signature that the proxy does not handle other then to forward the invocation to the Distant Object via the NEW_Connection's NEW_socket estsablished as described before. Up next is the - (void)forwardInvocation:(NSInvocation *)anInvocation; method. Here now one would archive the invocation for transmitting as a Data Object. To do that I use NSArchiver something like this ... NSData *archivedInvocationAsData = [NSArchiver archivedDataWithRootObject:(id)anInvocation]; Okay now I writeData: and wow guess what the data actually shows up at the Server Tool, is Unarchived with ... NSInvocation *theInvocation = [NSUnarchiver unarchiveObjectWithData:invocationAsData]; Then it is invoked with ... [theInvocation invokeWithTarget:rootObj]; Awesome it actually works to trigger an Invocation remotely (so far, in this limited way.) Clearly the simplest next step is to re-archive the invocation with it's return values etc. and send it back via ... returnInvocation = [NSArchiver archivedDataWithRootObject:theInvocation]; through the NEW_Connection's NEW_Socket (writeData:). Back at the Client it waited via readData: for the return invocation (post invoke), it then Unarchives it and would likely just replace the original invocation with the return invocation. This does not work, the NSInvocation has a return value, and that value is readible as the getReturnValue:(void *)buffer via *(id *)buffer. Even if you use retainArguments at the server side, observe 'inout' [default] definitions in the Protocol description, etc. still nothing seems to work rightas far as returning or even setting the 'return value' or changing transported arguments Arguments. Now originally on the Server side I was able to use the extremely limited getReturnValue:(void *)buffer method to get the pointer (always with a length of four). Only from a Chinese Web page did I discover that to use this value one must use *(id *)buffer to reference the NSString/NSObject there. My problem mainly is when I try to set the return value (or unarchive the return values) in an invocation I run into problems. One is suppose to use the setReturnValue:(void *)buffer method. I can use it I can observer in the debugger value inspector the values setting (there is one of ever type pointing to the same thing or something, of course Objective-C limits the access of these inner values and provides only the setReturnValue:(void *)buffer. I have yet to try a subclass that would hopefully be able to access them as public values, but this is doubtful, and suggests that NSInvocation would need Class Extensions but basically this means it's buggy and there must be a better way. Now to try and explain all the problems that occur ... To start we must go back to the NSArchiver. You see ounce I discovered these problems (possibly bugs, lake of documentation or whatever), I realized I needed a simple Bugg Application to demonstrate and simplify the problems. Unfortunately even in an Application this is kind of complicated, because on must have a proxy that can override the forwardInvocation: method etc. to achieve the most basic simulation. Well at least I have it down to one application but I still have three objects. I further have run into more difficulties seemingly from within an application instead of the original objective tools. Now first I would like to explain that within an application, and the forwardInvocation: method of a proxy, if one attempts to do this ... crashedArchiverData = [NSArchiver archivedDataWithRootObject:(id)anInvocation]; The program will crash terminated with signal 11 (SIGSEGV), a segment violation. (For seemingly no reason I can do anything about ! Any thoughts there?) In the Tool this works fine. Finally if I try to do this like the tool which does invoke similar difficulties I do have to set the return value in the client via say this simple test without sending the invocation to a remote object (even though it's not actually invoked the problems are the same)... - (void)forwardInvocation:(NSInvocation *)anInvocation { void *buffer = malloc(5); [anInvocation setReturnValue:[NSString stringWithString:@"Invocation Return Value"]]; [anInvocation getReturnValue:(void *)buffer]; NSLog([NSString stringWithFormat:@"The Value IS ... (%@)", *(id *)buffer]); } I get an result like this ... SetValueInInvocation[5942] The Value IS ... (NSCFString) ... When I setStringValue with the return value, notice it's not the actual value of the String that was set there. Why? What's wrong is it me? The strange thing is I have set it to an NSString but I get something bogus!! What's UP ?? Now I have tried everything under the 'Apple' possible and I really thing that it should work fine with the simplest form or this is designed poorly and not documented properly. Mostly they say "You should never have to do this yourself!", but of course we have to finish the job of making PDO work properly (or better) again and this is critical to a messaging language Objective-C and the need for Network savvy system in this modern connected world or it ain't worth anything (If I ever get OSX to a usable state it will have to be called a susstem, or have required another 10 months of bug reporting and maybe a couple of more year/versions for the stability and function OpenStep provided.) Next I recall trying to us the passed arguments to return values. Even with retainArguments, etc. nothing seems to work. The Archiver in the tool complains if you send more then one argument, within the Archiving of an Invocation it complains that I do not understand what type an @@ idid is!? Clearly that has not been tested beyond a single argument, and is extremely buggy and unusable. So I can imagine replacing the functionality of the Archiver by sending my own Object in the DataStream that can reproduce the return values in an invocation since that does not survive Unarchiving at all, but without the key to set the return value in a usable state. Then a call like ... [NEWPDO_ReturnString setString:[sever takeStringAndReturnAString:[NSString stringWithFormat:@"Do this action for user#%d or something", nextUserInt]]]; ERROR MESSAGE: SetValueInInvocation[5942] *** +[NSCFString length]: selector not recognized without saying *** +[NSCFString length]: selector not recognized, as far as I can tell OSX remains unusable garbage for me, please HELP. Prove me wrong! I dare you to even try, since it is so extremely painful. Now I am resorting to begging for help from the OSX community, and Apple to actually repair the damage, complete the Port of OpenStep, possible document how to replace PDO if they refuse to bring forward the real value of NeXT they bought and as far as I can tell have fully bastardized, or at least failed so far to achieve properly. I can send you the Bugg Demo Application Source Code (for the SetValueInInvocation.app) if you request it, the other near replacement to PDO is a little less easy to send nor do I think it is required to demonstrate the problems, and any possible solutions to the finally problems with it that seem at this point to be more problems with Apple's version of the Foundation Classes required for implementing a replacement for PDO. From OSX Developer email: osx-developer@www.com ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From luthier at ozemail.com.au Wed Jan 2 02:07:00 2002 From: luthier at ozemail.com.au (Peter Ferrett) Date: Thu Nov 3 14:48:08 2005 Subject: dbopen - file corruption In-Reply-To: <6A7E839A-FF3C-11D5-9337-003065F22E4E@apple.com> Message-ID: Hi Matt The code assumed that because the cString and bytes methods, and all database access method (eg the bt->put() method) is performed in the same run loop, that autorelease of objects will be sufficient as these objects will be hanging around in memory until the end of the run loop. The code was modified as follows to see if memory was a problem but this has not resolved the original problem. ----------------------------------------------------------------------------------------- keythang.size = [aKey cStringLength]; // add null character keythang.data = memcpy( malloc( keythang.size), (char*) [aKey cString], keythang.size); data = [NSArchiver archivedDataWithRootObject: anObject]; valuethang.size = [data length]; valuethang.data = memcpy( malloc( valuethang.size), (char*) [data bytes], valuethang. size); ----------------------------------------------------------------------------------------- Not sure what you mean by a self contained example, but the code is fairly minimalist - the write code is as above. The code for reading is very similar (also modified to rule out any memory error problem) ----------------------------------------------------------------------------------------- //keys are stored in memory or obained by sequential search keythang.size = [aKey cStringLength]; keythang.data = memcpy( malloc( keythang.size), (char*) [aKey cString], keythang.size); err = bt->get(bt, &keythang, &valuethang, 0); if( err == RET_SUCCESS) { data = [[NSData dataWithBytes: valuethang.data length: valuethang.size] autorelease]; archiver = [[[Unarchiver alloc] initForReadingWithData: data ] autorelease]; obj = [archiver decodeObject]; } ----------------------------------------------------------------------------------------- file initialisation is as follows: ----------------------------------------------------------------------------------------- { int flags = O_RDWR + O_CREAT; int mode = S_IRUSR + S_IWUSR + S_IRGRP + S_IWGRP + S_IROTH + S_IWOTH; DBTYPE type = DB_BTREE; BTREEINFO btinfo; btinfo.flags = R_NOOVERWRITE; //doesn't work btinfo.flags = 0; btinfo.cachesize = 100000; btinfo.maxkeypage = 0; btinfo.minkeypage = 0; btinfo.psize = 0; btinfo.compare = btcompare; btinfo.prefix = 0; btinfo.lorder = 0; if( bt = dbopen( [dname cString], flags, // truncate if file exists mode, // other read write type, &btinfo) ) { return; } } ----------------------------------------------------------------------------------------- The way I have isolated the problem is by building two projects - one is the actual project, the other is a simple btree file viewer, which reads all keys sequentially from file and puts it into a tableview column, and then reads all values associated with the keys and puts it into a second column in the tableview. For a test file, then inserting key number 689, all keys were there, all data was there. When inserting key 690, data association with keys 8, 80, 81, 82 ... , 89 was gone (these keys are sequentially next to each other). Peter On Wednesday, January 2, 2002, at 03:51 PM, Matt Watson wrote: > Are you sure your data elements are all retained? The cString and bytes > methods will return autoreleased objects. > > Could you show a self-contained example that shows the problem? > > matt. > > On Saturday, September 1, 2001, at 09:18 AM, Peter Ferrett wrote: > >> I have been using dbopen() it to make a persistent version of an >> NSDictionary. The NSDictionary objects are shuffled to and from disc >> using the b-tree form of dbopen. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From raphael_sebbe at mac.com Wed Jan 2 02:46:00 2002 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:48:08 2005 Subject: Name of the current app ? Message-ID: Hi all, and have an happy new year ! My first question this year, how can I get the name of the active application, and, if possible, get the transitions (active app changed notifications) ? Thanks, Raphael From snoyes at execpc.com Wed Jan 2 05:59:01 2002 From: snoyes at execpc.com (snoyes@execpc.com) Date: Thu Nov 3 14:48:08 2005 Subject: Digital RAW file conversion class Message-ID: I have gotten hold of some code that transforms Canon EOS RAW file formats into basic bitmap type data. I have just finished flushing out a couple of small bugs and was starting to convert the basic routines from pure 'C' to Obj-C. Basic class wrappers. My orriginal thought was a simple conversion class that would except a file and return an NSImage with an NSBitMapImageRep. But is this the best option? Is there a way to "teach" NSImage how to just deal with the new format by teaching OS X about the representation of these files? Do I need to simply define a new NSCustomImageRep? But then I have to draw it and what I want out of this is a JPG or TIFF. It would be nice if this could then be used by all programs in the system. Thoughts on the best way to proceed. Steven Noyes From chris at mantis-design.com Wed Jan 2 10:50:01 2002 From: chris at mantis-design.com (Chris Ruzin) Date: Thu Nov 3 14:48:08 2005 Subject: TextField Cursor Placement Message-ID: <26A7769D-FFB1-11D5-A4A4-0030654327E0@mantis-design.com> Hello and Happy New Year!, I have a question about textfields. How can I control cursor placement in a textfield? Say I have an 8 letter word in the field itself, and I want to place the blinking cursor in between the last 2 characters. I'm most likely missing something obvious. And I also have a question about the new Cocoa book from the guy from Big Nerd Ranch. Is it any good for a beginner? Is it worth the money? I'm thinking of buying it, but I'd like to know if it's worth it or not. Thanks, Chris From jba at bullex.de Wed Jan 2 11:10:18 2002 From: jba at bullex.de (Jens Baumeister) Date: Thu Nov 3 14:48:08 2005 Subject: Book "Cocoa Programming for Mac OS X" (was: TextField Cursor Plac ement) Message-ID: > -----Original Message----- > From: Chris Ruzin [mailto:chris@mantis-design.com] > And I also have a question about the new Cocoa book from the guy from > Big Nerd Ranch. Is it any good for a beginner? Is it worth > the money? > I'm thinking of buying it, but I'd like to know if it's worth > it or not. This has been discussed just recently on this list. Look at the archives for Dec 2001 here: http://www.omnigroup.com/mailman/archive/macosx-dev/2001-December/date.html Any posting with the subject "buy that new book" deals with it. For some more opinions + other Cocoa programming books look here: http://www.cocoadev.com/index.pl?CocoaBooks _____________________________________ Jens Baumeister Bullex GmbH, Cologne, Germany She sells c-shells by the sea shore. From finlay.dobbie at btinternet.com Wed Jan 2 11:20:58 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:08 2005 Subject: Name of the current app ? In-Reply-To: Message-ID: <86D35DE2-FFB5-11D5-B428-000502319F17@btinternet.com> On Wednesday, January 2, 2002, at 10:45 am, Raphael Sebbe wrote: > My first question this year, how can I get the name of the active > application, and, if possible, get the transitions (active app changed > notifications) ? The API to do so is private. You can, however, look at the source to ASM (see www.vercruesse.de) to see how it is done. -- Finlay From kaelin at acm.org Wed Jan 2 12:10:59 2002 From: kaelin at acm.org (Kaelin Colclasure) Date: Thu Nov 3 14:48:08 2005 Subject: Frobbing the responder chain... In-Reply-To: <25DFBFB8-FDC5-11D5-AD31-0030657160F8@sympatico.ca> References: <25DFBFB8-FDC5-11D5-AD31-0030657160F8@sympatico.ca> Message-ID: <1010002159.27349.0.camel@cube.dev.resilience.com> On Mon, 2001-12-31 at 00:05, Guy English wrote: > Hi Kaelin, > > A little long winded and littered with code compiled directly in > Mail but here we go... > > Let me make sure I'm clear on what we're trying to accomplish: > - You have a menu item in the main menu. > - You want this menu item to change name ( and validate differently ) > depending on which view is the first responder. Mostly right -- I am working with the stock NSOutlineView and trying to have the delegate (my document class) do all the custom work here. The idea is, when the outline view's selection changes, it sends a notification (that gets routed) to the delegate. My document class maps that notification to the component object that the newly selected cell of the outline view actually represents. It then asks that component object if it has an associated ``actor'' (my own construct, a subclass of NSResponder). If the object does not, the document then checks the parent of the selected item, etc. until some object provides an actor for the current context of the selection. > - Your current approach involves jamming an object into the responder > chain. The object you insert is of a class specifically designed to > change the menu in one certain way. You add this object immediately > above the view with focus ( in your example the outlineView ) Once the proper actor is found, it's frobbed into the responder chain just *below* the NSOutlineView, which presumably is the current firstResponder. The idea of putting it here is to avoid battling with the framework every time the mouse is clicked as to who should be firstResponder... > The problem is that initially the menu item is disabled. Forcing a > menu validation doesn't seem to work.... Apart from this nit when the document is first open, this all seems to work beautifully. :-) > On Sunday, December 30, 2001, at 08:38 PM, Kaelin Colclasure wrote: > > On Sun, 30 Dec 2001, Guy English wrote: > >> After doing this you'll want to call [[NSApp mainMenu] update] > > Hmm, this did not seem to do the trick. > > Ok. Weird. I'd have to play with it to figure out what's going on here. > > [ meanwhile in the Apple docs ] > > And a bit further down, > > in another section, it says something to the effect that the > > nextResponder > > is set automatically to a view's parent, and you should never call > > setNextResponder on a view... Instead you should only add responders to > > the ``top'' of a window's chain, or as the window's nextResponder if it > > has no delegate or at the delegate if it does... > > Possibly your insertion is being clobbered during the init phase. You > could write a quick and dirty action tied to a button in your document > to move up the responder chain of each of the UI elements you're > interested in. If you don't find an instance of one of your classes then > something bad has happened. If thats the case find a later stage of the > init to place your responders. I took a slightly different tack, in that I simply commented out the code that frobs the responder chain after initialization, so that the only place I insert an actor is in the windowControllerDidLoadNib: method. I can tell the actor is there, because it does an NSLog when it's called to validate a menu action, and because the menu is doing what I expect after the outline view is clicked. SO it does not appear to be an issue with my frobbing being undone later in the initialization process. The more I think about it the more surprised I am that your original suggestion is not doing the trick... > > I presume ``top'' of the chain refers to firstResponder. But the > > framework > > tries to keep firstResponder tied to the view that was last clicked, and > > battling to keep a non-view object designated firstResponder seems > > pointless to me when I should be able to just tuck my actor somewhere > > lower in the chain and have it do the job just fine.. > > Top of of the responder chain refers to the last object to have a chance > to respond. Normally this is the NSWindow. This offers two possibilities: > - Subclass NSWindow for your document windows and handle the menu > validation there. > - The docs say that if an NSWindow doesn't respond then the action is > passed on to the windows delegate. In this case you're in luck because > your document class is most likely the document windows delegate. Add > your validation code there. This could certainly be made to work, but I believe I would either lose some of the flexibility that I was trying for with actors, or that it would become significantly more complicated to implement (and thus less useful as a general idiom). [Useful code suggestions snipped for brevity] > Answer a) > You're thinking too much. :) Your document class ( well technically its > the window delegate ) will get nil-targeted actions like any other > responder. Be happy and stick code in there. Ahh, but not *exactly* "like any other responder" -- because NSDocument is not a subclass of NSResponder, and the responder chain relies upon inheritance and not a protocol... > Answer b) > > I am mightily impressed by Cocoa and ObjC so far... But I sure miss > > having > > access to the source code in order to figure out issues like this. :-/ > > Here is ( vaguely ) what that code would look like inside NSWindow: [More code snipped for brevity] > >>> And from a larger perspective, is this a > >>> reasonable thing to be doing in Cocoa? > > I think Aaron mentions it in the book but if your having a hard time > doing something you're probably doing it wrong. Creating a ton of > special purpose classes to handle the menu validation feels a little > like too much work and it turns out it is. You could have gotten it > working that way ( I'm pretty sure the responder chain is getting > relinked after you've played with it somewhere ). The thing is you > probably don't want it working that way anymore. Actually I didn't find the actor idea difficult to implement at all. It's not more than a dozen lines of code, and it worked immediately except for the bit about needing a mouse click at initialization! As for needing "a ton of special purpose classes" it's really not as bad as all that. I have three right now. And they also do more than just handle menu validation. :-) I am also hoping to be able to use the same basic mechanism to implement direct manipulation UI features, like interactive drawing commands. This basic idiom is one I learned from MacApp many, many years ago... I think it was called TCommand there, although I am now very fuzzy on the specifics... > >> You may want to look at subclassing NSOutlineView and implementing its > >> menuForEvent method ( inherited from NSView ). If you need menus > >> context > >> sensitive to each cell of your outline view you can get at the NSCell > >> objects like this: > > [Nice example snipped] > > > > The menuItem that I want to be context sensitive actually lives in the > > mainMenu. I may eventually decide to add a pop-up menu like you describe > > too, but for the moment I am sticking to an old-school Mac user > > interface. :-) > > Yeah, I misunderstood the first time what you were doing with the main > menu. Well I'm still early in the Cocoa learning curve, so even when not 100% on target, your explanations of related concepts have been quite enlightening (and most appreciated)! :-) -- Kaelin From rickjarosh at lycos.com Wed Jan 2 12:30:03 2002 From: rickjarosh at lycos.com (Rick Jarosh) Date: Thu Nov 3 14:48:08 2005 Subject: Book "Cocoa Programming for Mac OS X" (was: TextField Cursor Placement) Message-ID: Just buy the book,it's the best one on Cocoa.Definitely worth the money. Rick On Wed, 2 Jan 2002 20:10:46 Jens Baumeister wrote: > > >> -----Original Message----- >> From: Chris Ruzin [mailto:chris@mantis-design.com] > > >> And I also have a question about the new Cocoa book from the guy from >> Big Nerd Ranch. Is it any good for a beginner? Is it worth >> the money? >> I'm thinking of buying it, but I'd like to know if it's worth >> it or not. > >This has been discussed just recently on this list. Look at the archives for >Dec 2001 here: > >http://www.omnigroup.com/mailman/archive/macosx-dev/2001-December/date.html > >Any posting with the subject "buy that new book" deals with it. > >For some more opinions + other Cocoa programming books look here: > >http://www.cocoadev.com/index.pl?CocoaBooks > >_____________________________________ >Jens Baumeister >Bullex GmbH, Cologne, Germany > >She sells c-shells by the sea shore. > > >_______________________________________________ >MacOSX-dev mailing list >MacOSX-dev@omnigroup.com >http://www.omnigroup.com/mailman/listinfo/macosx-dev > -- Click here for your very own create-a-date adventure from MatchMaker Go to http://ecard.matchmaker.com/dating.html From gweston at mac.com Wed Jan 2 13:32:04 2002 From: gweston at mac.com (Gregory Weston) Date: Thu Nov 3 14:48:08 2005 Subject: TextField Cursor Placement In-Reply-To: <200201022003.MAA25834@lists> Message-ID: <20020102163149-r01010800-21b5806a-0910-0109@192.168.0.4> On 1/2/02 at 12:03 PM, Chris Ruzin wrote: > I have a question about textfields. How can I control cursor placement > in a textfield? Say I have an 8 letter word in the field itself, and I > want to place the blinking cursor in between the last 2 characters. I'm > most likely missing something obvious. I would think the most obvious solution is to impose a zero-length selection at the offset where you want to insertion point. But you say TextField, which appears to be a bit nastier than TextView. Given that your second question is about a Cocoa book: NSRange theSelRange = NSMakeRange(i,0); NSWindow* theWindow = [mField window]; NSText* theEditor = [theWindow fieldEditor:YES forObject:]; [theText setSelectedRange:theSelRange]; This assumes the field you're interested in is the active one. G From kext at mac.com Wed Jan 2 15:12:02 2002 From: kext at mac.com (Andang Kustamsi) Date: Thu Nov 3 14:48:09 2005 Subject: New Cocoa book by Message-ID: <001101c193e2$bf10b640$d90f8a81@nmt.edu> Dear list, I just found a new Cocoa book http://vig.pearsoned.com/store/search_results/1,,2131,00.html The title is Cocoa Programming by Yacktman / Buck / Anguish ISBN: 0-672-32230-7 | Sams ? 2002 | Paper; 1000 pages Has it been released? Andang From chris at mantis-design.com Wed Jan 2 15:30:01 2002 From: chris at mantis-design.com (Chris Ruzin) Date: Thu Nov 3 14:48:09 2005 Subject: TextField Cursor Placement In-Reply-To: <20020102163149-r01010800-21b5806a-0910-0109@192.168.0.4> Message-ID: <2953583E-FFD8-11D5-85A6-0030654327E0@mantis-design.com> Thanks Gregory, I tried out what you suggested and it worked. I ended up doing this: NSString *myString = [[[NSString alloc] initWithString:[urlKindPopup titleOfSelectedItem]] autorelease]; NSText *theText = [entrySheet fieldEditor:YES forObject:urlField]; if ([urlKindPopup indexOfSelectedItem] > 0) { [urlField setStringValue:myString]; [theText setSelectedRange:NSMakeRange([myString length], 0)]; } else { [urlField setStringValue:@""]; } The part I was getting stuck on was the NSText object I needed to create. Now that I see how it works, it's obvious. It sucks being a newbie to Objective-C and Cocoa. Thanks again, Chris On Wednesday, January 2, 2002, at 03:31 PM, Gregory Weston wrote: > On 1/2/02 at 12:03 PM, Chris Ruzin wrote: > >> I have a question about textfields. How can I control cursor placement >> in a textfield? Say I have an 8 letter word in the field itself, and I >> want to place the blinking cursor in between the last 2 characters. >> I'm >> most likely missing something obvious. > > I would think the most obvious solution is to impose a zero-length > selection at > the offset where you want to insertion point. But you say TextField, > which > appears to be a bit nastier than TextView. Given that your second > question is > about a Cocoa book: > > NSRange theSelRange = NSMakeRange(i,0); > NSWindow* theWindow = [mField window]; > NSText* theEditor = [theWindow fieldEditor:YES forObject:]; > [theText setSelectedRange:theSelRange]; > > This assumes the field you're interested in is the active one. From john at nisus.com Wed Jan 2 18:40:00 2002 From: john at nisus.com (jgo) Date: Thu Nov 3 14:48:09 2005 Subject: Setting a file's icon In-Reply-To: References: <3D1D3C62-FD31-11D5-942A-003065BA6A54@10191.com> Message-ID: > Next, you need to save this data as the file's custom icon. > Icon Services or Icon Utilities may have functions for doing this... > I'm not sure. If not, use the Resource Manager to save the data > as an icns resource id -16455 in the file, and set the "has custom > icon" bit in the file's finderInfo flags. And if you have several kinds of documents which a single app can produce & work on, what do you do to avoid having several icns resources with the same id (-16455) that you mention? Or do you even need to make sure that the type & id (together) are unique? John G. Otto, Eagle Scout, Knight, Cybernetic Praxeologist Existence, Consciousness, Identity, Life, Liberty, Property, Privacy, Justice From aep at apple.com Wed Jan 2 18:48:00 2002 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:48:09 2005 Subject: Converting NSString to KeyCodes In-Reply-To: Message-ID: <3A2AC976-FFF4-11D5-AA2B-003065B939B6@apple.com> On Saturday, December 29, 2001, at 04:39 , Cliff McCollum wrote: > I have an NSText field where the user provides some input. Later in my > program I need to match this input against a sequence of Key Codes as > received from the keyboard. To make this efficient, I want to convert the > characters from the NSText field back to Key Codes a single time, so I do > not have to convert each Key Code into a character as it is received. > > Does anyone know the "best" way to convert an NSString into its source > Key Codes? You can't really without a lot of effort. While a key code is specific to a keyboard, the active keyboard mapping converts from the key code to a character. This mapping is not one-to-one and depends on which keyboard input is active. And some characters aren't generated by a single key code. You might try converting the string which is Unicode to MacRoman and then using Carbon. Just a guess. And of course it will fail if the character wasn't a single key press. You're better off capturing key press events as they come in and using [event keyCode]. Andrew __________________________________________________________________ A n d r e w P l a t z e r A p p l i c a t i o n F r a m e w o r k s A p p l e From igor at olg.com Wed Jan 2 19:25:02 2002 From: igor at olg.com (Daniel E. White) Date: Thu Nov 3 14:48:09 2005 Subject: New Cocoa book by In-Reply-To: <001101c193e2$bf10b640$d90f8a81@nmt.edu> References: <001101c193e2$bf10b640$d90f8a81@nmt.edu> Message-ID: At 4:11 PM -0700 1/2/02, Andang Kustamsi wrote: >Dear list, > >I just found a new Cocoa book >http://vig.pearsoned.com/store/search_results/1,,2131,00.html > >The title is Cocoa Programming by Yacktman / Buck / Anguish >ISBN: 0-672-32230-7 | Sams >? 2002 | Paper; 1000 pages > >Has it been released? > >Andang http://www.bestwebbuys.com/books/search?q=0-672-32230-7&t=ISBN&x=30&y=16 Publishing info says February 2002. Barnes & Noble's page says February 6, 2002. Amazon's web page says March. -- ------------------------------------------------------------------------ Dan White ------------------------------------------------------------------------ "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." Calvin (Bill Watterson) From rick at icons.cx Wed Jan 2 21:58:01 2002 From: rick at icons.cx (Rick Roe) Date: Thu Nov 3 14:48:09 2005 Subject: Setting a file's icon In-Reply-To: Message-ID: >> Next, you need to save this data as the file's custom icon. >> Icon Services or Icon Utilities may have functions for doing this... >> I'm not sure. If not, use the Resource Manager to save the data >> as an icns resource id -16455 in the file, and set the "has custom >> icon" bit in the file's finderInfo flags. > > And if you have several kinds of documents which a single app can > produce & work on, what do you do to avoid having several icns > resources with the same id (-16455) that you mention? > Or do you even need to make sure that the type & id (together) > are unique? ResourceManager resources must be unique by type and ID: you can have both an icns ID 128 and a ppob ID 128 in the same file, for example. That's not an issue here, though. A file has only one icon which is displayed in the Finder: either the icon of its document type, which comes from whichever application owns that document type, or a custom icon which is stored in the file. A file can have only one custom icon. -- Rick Roe icons.cx / The Omni Group From sanguish at digifix.com Wed Jan 2 22:04:02 2002 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:48:09 2005 Subject: New Cocoa book by In-Reply-To: <001101c193e2$bf10b640$d90f8a81@nmt.edu> Message-ID: <5D9E9FBE-000B-11D6-AAC3-000393120A7C@digifix.com> On Wednesday, January 2, 2002, at 06:11 PM, Andang Kustamsi wrote: > Dear list, > > I just found a new Cocoa book > http://vig.pearsoned.com/store/search_results/1,,2131,00.html > > The title is Cocoa Programming by Yacktman / Buck / Anguish > ISBN: 0-672-32230-7 | Sams > ? 2002 | Paper; 1000 pages > > Has it been released? > > Nope, not yet. Feb-Mar-Apr area. From guy.english at sympatico.ca Wed Jan 2 23:47:01 2002 From: guy.english at sympatico.ca (Guy English) Date: Thu Nov 3 14:48:09 2005 Subject: Frobbing the responder chain... In-Reply-To: <1010002159.27349.0.camel@cube.dev.resilience.com> Message-ID: Hi Kaelin, On Wednesday, January 2, 2002, at 03:09 PM, Kaelin Colclasure wrote: > Mostly right -- I am working with the stock NSOutlineView and trying to > have the delegate (my document class) do all the custom work here. The > idea is, when the outline view's selection changes, it sends a > notification (that gets routed) to the delegate. My document class maps > that notification to the component object that the newly selected cell > of the outline view actually represents. It then asks that component > object if it has an associated ``actor'' (my own construct, a subclass > of NSResponder). If the object does not, the document then checks the > parent of the selected item, etc. until some object provides an actor > for the current context of the selection. Cool. I can see why you'd like to do it your way now. >> - Your current approach involves jamming an object into the responder >> chain. The object you insert is of a class specifically designed to >> change the menu in one certain way. You add this object immediately >> above the view with focus ( in your example the outlineView ) > Once the proper actor is found, it's frobbed into the responder chain > just *below* the NSOutlineView, which presumably is the current > firstResponder. The idea of putting it here is to avoid battling with > the framework every time the mouse is clicked as to who should be > firstResponder... Ok. I've put together a test and this worked for me... @interface Actor : NSResponder { } - (void) myTestAction: (id) sender; - (void) myTestMenuItem: (id) sender; - (BOOL) validateMenuItem: (id ) menuItem; @end @implementation Actor - (void) myTestAction: (id) sender { NSLog( @"Test action triggered." ); } - (void) myTestMenuItem: (id) sender { NSLog( @"Test menu item triggered." ); } - (BOOL) validateMenuItem: (id ) menuItem { if ( [menuItem tag] == 100 ) { [menuItem setTitle: @"Validated by actor"]; } return YES; } @end - (void)windowControllerDidLoadNib:(NSWindowController *) aController { NSResponder *firstResponder; Actor *actor; firstResponder = [[aController window] initialFirstResponder]; actor = [[Actor alloc] init]; [actor setNextResponder: [firstResponder nextResponder]]; [firstResponder setNextResponder: actor]; // This line fixes your problem... [[aController window] makeFirstResponder: firstResponder]; // NOTE: The retain count for your actor here is 1. That means // that the window didn't retain it and you must keep it around // or you'll get a nasty crash. When you swap out this Actor for // a more specialized one later make sure you release it or // you'll leak memory in a really nasty way. NSLog( @"Actor Retain Count: %d", [actor retainCount] ); } My initial first responder for my window was an NSTextField. I placed a button on the Window and wired it to "myTestAction" of FirstResponder. When I click the button and "Test action triggered" is logged. I also added a new menu item called "Test Item" to my Main Menu nib and wired it to "myTestMenuItem" of FirstResponder. When I look at the menu item it is named "Validated by actor" indicating that it passed through the validation of of my responder. When I select the menu item the Actors myTestMenuItem method is called correctly. When I changed my initial first responder to an NSTableView I encountered the same problem you did in that my menu item was still called "Test Item" and was disabled. When I clicked on the NSTableView it worked as expected again. Hmm... Clearly something not right. [[aController window] makeFirstResponder: firstResponder]; This makes the view that is currently first responder the first responder again. I imagine it has some side effect regarding tossing out either a cached responder chain ( like you guessed at the beginning ) or sending resignFirstResponder, becomeFirstResponder, etc in the correct order that things work out. I'd be curious to hear from the AppKit guys ( or anyone with a good explanation ) what's going on. I have a feeling it has something to do with the windows field editor calling makeFirstResponder when it's being placed over my NSTextField that made my initial attempt work. > Well I'm still early in the Cocoa learning curve, so even when not 100% > on target, your explanations of related concepts have been quite > enlightening (and most appreciated)! :-) Glad to help. Good luck with your project, Guy From resistor at mac.com Thu Jan 3 06:38:00 2002 From: resistor at mac.com (Owen Andertson) Date: Thu Nov 3 14:48:09 2005 Subject: Screen Fade Out Message-ID: <555A6880-0057-11D6-B9BA-000A279431A2@mac.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! I am told that a while ago so information was posted here about using the CoreGraphics gamma functions to achieve a fade out effect, but I was unable to find it in the archives. Does anyone remember it? Thanks, Owen Anderson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE8NGyLSn3yKRPsTxoRAuRwAKDQeELIiYnnCyBiaV/M+tGxPyyQkgCgqvB6 xvdO/agSv+g6elllT9K8hUA= =fokx -----END PGP SIGNATURE----- From kirby132 at hotmail.com Thu Jan 3 07:33:01 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:09 2005 Subject: Using CFCopyLocalizedString from a daemon Message-ID: Hi, I have a daemon that uses CFUserNotification calls to present localized messages to the user when certain events occur (related to the status of hardware attached via USB). I have made my StartupItem a shell script that launches a daemon process from a bundled application. I've done this so that the daemon has easy access to the localized notifications messages in the bundle. My problem is that when I use CFCopyLocalizedString it always gets the english string, which my CFUserNotification subsequently displays, even if I log in as a non-english user. It seems to me that when the daemon starts on bootup, as the OS installation was in English and therefore the bootup is in English, the daemon runs as an english user. When I sudsequently log in as a german for example, the daemon is still running under root (who is english) and therefore notifications still appear in english. If this is correct, how can I change this behavior? If there is a way to determine that someone has logged in on the console from a daemon and to determine the UID of that user, would a solution be to set the daemon temporarily to that UID, call CFCopyLocalizedString and then set the UID back to root. Would that work? Will CFCopyLocalizedString return german strings if I do this? Kirby _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From raphael_sebbe at mac.com Thu Jan 3 07:55:59 2002 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:48:09 2005 Subject: Name of the current app ? In-Reply-To: <86D35DE2-FFB5-11D5-B428-000502319F17@btinternet.com> Message-ID: <54CA547C-0062-11D6-8391-000393448D9C@mac.com> Thanks, I see now. Still, it feels like a bit risky to use that... Raphael On Wednesday, January 2, 2002, at 08:18 PM, Finlay Dobbie wrote: > > On Wednesday, January 2, 2002, at 10:45 am, Raphael Sebbe wrote: > >> My first question this year, how can I get the name of the active >> application, and, if possible, get the transitions (active app changed >> notifications) ? > > The API to do so is private. You can, however, look at the source to > ASM (see www.vercruesse.de) to see how it is done. > > -- Finlay > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From wjcheeseman at earthlink.net Thu Jan 3 08:10:09 2002 From: wjcheeseman at earthlink.net (Bill Cheeseman) Date: Thu Nov 3 14:48:09 2005 Subject: New Cocoa book by In-Reply-To: <001101c193e2$bf10b640$d90f8a81@nmt.edu> Message-ID: Just to round this all out, Amazon.com says March. http://www.amazon.com/exec/obidos/ASIN/0672322307/qid=1010072916/sr=1-2/ref= sr_1_70_2/104-7979145-5441553 on 02-01-02 6:11 PM, Andang Kustamsi at kext@mac.com wrote: > Dear list, > > I just found a new Cocoa book > http://vig.pearsoned.com/store/search_results/1,,2131,00.html > > The title is Cocoa Programming by Yacktman / Buck / Anguish > ISBN: 0-672-32230-7 | Sams > ? 2002 | Paper; 1000 pages > > Has it been released? -- 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 jim.correia at pobox.com Thu Jan 3 08:20:58 2002 From: jim.correia at pobox.com (Jim Correia) Date: Thu Nov 3 14:48:09 2005 Subject: Name of the current app ? In-Reply-To: <54CA547C-0062-11D6-8391-000393448D9C@mac.com> Message-ID: On Thursday, January 3, 2002, at 10:55 AM, Raphael Sebbe wrote: > Thanks, I see now. Still, it feels like a bit risky to use that... >> On Wednesday, January 2, 2002, at 10:45 am, Raphael Sebbe wrote: >> >>> My first question this year, how can I get the name of the active >>> application, and, if possible, get the transitions (active app >>> changed notifications) ? You can get the name of the front process using the Carbon process manager. You can get app transitioned events using Carbon Events. Depending on your needs, this may work quite nicely (or rather inconveniently if you are building an AppKit application). Jim From ssudre at intego.com Thu Jan 3 08:55:00 2002 From: ssudre at intego.com (=?ISO-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:48:09 2005 Subject: Using CFCopyLocalizedString from a daemon In-Reply-To: Message-ID: <8526E2AB-006A-11D6-AA91-0030659046EE@intego.com> > I have a daemon that uses CFUserNotification calls to present localized > messages to the user when certain events occur (related to the status > of hardware attached via USB). > > I have made my StartupItem a shell script that launches a daemon > process from a bundled application. I've done this so that the daemon > has easy access to the localized notifications messages in the bundle. > > My problem is that when I use CFCopyLocalizedString it always gets the > english string, which my CFUserNotification subsequently displays, even > if I log in as a non-english user. > > It seems to me that when the daemon starts on bootup, as the OS > installation was in English and therefore the bootup is in English, the > daemon runs as an english user. When I sudsequently log in as a german > for example, the daemon is still running under root (who is english) > and therefore notifications still appear in english. If this is > correct, how can I change this behavior? > > If there is a way to determine that someone has logged in on the > console from a daemon and to determine the UID of that user, would a > solution be to set the daemon temporarily to that UID, call > CFCopyLocalizedString and then set the UID back to root. Would that > work? Will CFCopyLocalizedString return german strings if I do this? OK, this situation is clear. If you're using the CFCopyLocalizedString API to set the strings of your CFUserNotification, you will only be able to get the localization of the root user since it's the one running your daemon tool. To be informed that an user has logged in, you can use the SCDynamicStore API. But that won't work as you expect it to. The solution can be using the CFUserNotificationDisplayNotice call and not giving it the Localized String but the Localized Key and the Bundle Ref CFUserNotificationDisplayNotice(TDELAY, kCFUserNotificationNoteAlertLevel, NULL, NULL, tBundleURLRef, CFSTR("Localization Key"), CFSTR("Localization Key 2"), NULL); From ddavidso at apple.com Thu Jan 3 09:35:58 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:48:09 2005 Subject: Using CFCopyLocalizedString from a daemon In-Reply-To: Message-ID: On Thursday, January 3, 2002, at 07:31 AM, Kevin Bohan wrote: > I have a daemon that uses CFUserNotification calls to present localized > messages to the user when certain events occur (related to the status > of hardware attached via USB). > > I have made my StartupItem a shell script that launches a daemon > process from a bundled application. I've done this so that the daemon > has easy access to the localized notifications messages in the bundle. > > My problem is that when I use CFCopyLocalizedString it always gets the > english string, which my CFUserNotification subsequently displays, even > if I log in as a non-english user. It was for exactly this reason that we created means for you to have the User Notification Center server do the localization for you. Just specify a localization URL, either using the localizationURL argument to CFUserNotificationDisplayNotice/Alert, or with the kCFUserNotificationLocalizationURLKey in the dictionary passed in to CFUserNotificationCreate. The localization URL should be a file URL, and it should point to (the root directory of) a bundle that contains localizations for the strings of interest in its Localizable.strings files. Then pass in the keys as your header, message, button titles, etc., and they will be localized for you according to the preferences of the user to whom the notification is displayed. One interesting side point is that It should also be possible in this case to pass in an array of strings instead of a single string as the value for kCFUserNotificationAlertMessageKey, and have the strings localized individually and concatenated into the message that is displayed. Douglas Davidson From kirby132 at hotmail.com Thu Jan 3 09:46:00 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:09 2005 Subject: Using CFCopyLocalizedString from a daemon Message-ID: >From: Douglas Davidson >To: Kevin Bohan >CC: macosx-dev@omnigroup.com >Subject: Re: Using CFCopyLocalizedString from a daemon >Date: Thu, 3 Jan 2002 09:38:13 -0800 > > >On Thursday, January 3, 2002, at 07:31 AM, Kevin Bohan wrote: > >>I have a daemon that uses CFUserNotification calls to present localized >>messages to the user when certain events occur (related to the status >>of hardware attached via USB). >> >>I have made my StartupItem a shell script that launches a daemon >>process from a bundled application. I've done this so that the daemon >>has easy access to the localized notifications messages in the bundle. >> >>My problem is that when I use CFCopyLocalizedString it always gets the >>english string, which my CFUserNotification subsequently displays, even >>if I log in as a non-english user. > >It was for exactly this reason that we created means for you to have the >User Notification Center server do the localization for you. > >Just specify a localization URL, either using the localizationURL >argument to CFUserNotificationDisplayNotice/Alert, or with the >kCFUserNotificationLocalizationURLKey in the dictionary passed in to >CFUserNotificationCreate. The localization URL should be a file URL, >and it should point to (the root directory of) a bundle that contains >localizations for the strings of interest in its Localizable.strings >files. Then pass in the keys as your header, message, button titles, >etc., and they will be localized for you according to the preferences of >the user to whom the notification is displayed. > >One interesting side point is that It should also be possible in this >case to pass in an array of strings instead of a single string as the >value for kCFUserNotificationAlertMessageKey, and have the strings >localized individually and concatenated into the message that is >displayed. > >Douglas Davidson > My strings have inserts that I need to fill with values as well as get the correct localized version which is why I have been using CFStringCreateWithFormatAndArguments to insert data into the loaded string before passing it to the CFUserNotification function. Can I do this using the CFUserNotification localizable parameter? Kirby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From ddavidso at apple.com Thu Jan 3 09:51:00 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:48:09 2005 Subject: Using CFCopyLocalizedString from a daemon In-Reply-To: Message-ID: On Thursday, January 3, 2002, at 09:44 AM, Kevin Bohan wrote: > My strings have inserts that I need to fill with values as well as get > the correct localized version which is why I have been using > CFStringCreateWithFormatAndArguments to insert data into the loaded > string before passing it to the CFUserNotification function. Can I do > this using the CFUserNotification localizable parameter? There is no direct facility for doing this with server-side localization, but there is the concatenation that I mentioned; for strings other than the message, you may be able to rearrange your notification. What is your notification supposed to look like? Douglas Davidson From ssudre at intego.com Thu Jan 3 09:56:00 2002 From: ssudre at intego.com (=?ISO-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:48:09 2005 Subject: Using CFCopyLocalizedString from a daemon In-Reply-To: Message-ID: <09D0BC42-0073-11D6-8E9E-0030659046EE@intego.com> On Thursday, January 3, 2002, at 06:38 PM, Douglas Davidson wrote: > One interesting side point is that It should also be possible in this > case to pass in an array of strings instead of a single string as the > value for kCFUserNotificationAlertMessageKey, and have the strings > localized individually and concatenated into the message that is > displayed. An API call that is missing and which could be interesting is to be able to pass a formatted string to the CFUserNotificationDisplayNotice/Alert call CF_EXPORT SInt32 CFUserNotificationDisplayNoticeWithFormat(CFTimeInterval timeout, CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef localizationURL, CFStringRef alertHeader, CFStringRef alertFormattedMessage, CFStringRef defaultButtonTitle,...); The alertFormattedMessage would be localized before running the formatting. Currently, there is no easy way to handle this kind of call. An example could be a daemon monitoring login/logout which would do something like this: void myDynamicStoreCallBack(SCDynamicStoreRef store,CFArrayRef changedKeys,void * info) { CFStringRef tUserName; uid_t tUserID; gid_t tGroupID; tUserName=SCDynamicStoreCopyConsoleUser(dynamicStoreRef_,&tUserID,&tGroupID) ; if (tUserName!=NULL) { // Login char cStringBuffer[MAX_C_STRING_BUFFER_SIZE]; CFStringGetCString(tUserName, cStringBuffer,MAX_C_STRING_BUFFER_SIZE, kCFStringEncodingUTF8); CFUserNotificationDisplayNotice(SW_DIALOG_DELAY, kCFUserNotificationNoteAlertLevel, NULL, NULL, tBundleURLRef, CFSTR("Login notification"), CFSTR("I've been waiting for you %s, we meet again at last."),NULL, cStringBuffer); // Release Memory CFRelease(tUserName); } } From kubernan at 10191.com Thu Jan 3 12:42:18 2002 From: kubernan at 10191.com (kubernan) Date: Thu Nov 3 14:48:09 2005 Subject: Threads and GUI Message-ID: <6F97E1A7-008A-11D6-AE1D-003065BA6A54@10191.com> hello all and happy new year ! I have a problem with my multi-threaded application and its GUI. I have a window with a NSDrawer. The opening of this one depends on a flag used in a detached thread. Using a NSTimer i call a method that test this flag and open the NSDrawer if necessary. The problem is doing this my app becomes very slow. Here's a sample code : - (IBAction)launchAction:(id)sender { // some init tictac = [[NSTimer timerWithTimeInterval:0.0 // 0.0 for "real time" target:self selector:@selector(test) userInfo:nil repeats:YES] retain]; [[NSRunLoop currentRunLoop] addTimer:tictac forMode:NSDefaultRunLoopMode]; [NSThread detachNewThreadSelector:@selector(createLocalThread) toTarget:self withObject:nil]; } -(void)createLocalThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init ]; // do some work in a loop and under condition : theFlag = TRUE; // continue some work [pool release]; [NSThread exit]; } -(void)test { // some init if (theFlag) { [myDrawer open] [tictac invalidate]; } } It works but it's not a nice choice : test method is called even if i don't need to open the drawer (that's why i use a flag)....and it's very slow. Instead of using NSTimer i tried with NSNotificationCenter : -(void)createLocalThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init ]; // some init [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openTheDrawer:) name:@"openDrawer" object:nil]; // do some work in a loop and under condition : [[NSNotificationCenter defaultCenter] postNotificationName:@"openDrawer" object:nil]; // continue some work [pool release]; [NSThread exit]; } - (void)openTheDrawer:(NSNotification *)notification { [[NSNotificationCenter defaultCenter] removeObserver:self name:@"openDrawer" object:nil]; [myDrawer open]; NSLog(@"open the drawer); } Here it's really fast but even if if i have the text "open the drawer" in the log, myDrawer doesn't appear ! Trying to understand why, i put some resize window code in openTheDrawer function. I had strange results : the main window is resized but shadow effect of this one doesn't appear and if i place the open order of myDrawer before resizing the window, i can only see an blank opened drawer (the view is...somewhere). If i replace the postNotification (in createLocalThread) directly by [myDrawer open] then the drawer appears good. I tried to use NSLock and flushWindow for the shadow pb without success. Can you explain to me why i have these problems ? Do you have any solution for me ? Thx a lot. Kub. From iano at cco.caltech.edu Thu Jan 3 13:05:59 2002 From: iano at cco.caltech.edu (Ian Ollmann) Date: Thu Nov 3 14:48:09 2005 Subject: MacOSX-dev digest, Vol 1 #1335 - 10 msgs In-Reply-To: <200201032003.MAA15259@lists> Message-ID: Owen Andertson asked: > Hello! I am told that a while ago so information was posted here about > using the CoreGraphics gamma functions to achieve a fade out effect, but > I was unable to find it in the archives. Does anyone remember it? RezLib does this. It is for CFM Carbon, but due to the lack of an functional API for this under Carbon at the time it was written, it calls CoreGraphics on X. http://idisk.mac.com/rezlib/Public/RezLib.1.1.a8.sit RezLib is open source and free. No GPL's attached. Ian Ollmann From embassociates at qwest.net Thu Jan 3 13:13:02 2002 From: embassociates at qwest.net (Erik M. Buck) Date: Thu Nov 3 14:48:09 2005 Subject: Info on gamma and frame buffers etc. References: Message-ID: <002501c1949c$81cb7c10$0101a8c0@karma> See http://www.omnigroup.com/developer/gamedevelopment/gdc2001/ for ways of managing gamma and frame buffers etc. ----- Original Message ----- From: "Ian Ollmann" To: Sent: Thursday, January 03, 2002 3:05 PM Subject: Re: MacOSX-dev digest, Vol 1 #1335 - 10 msgs > > Owen Andertson asked: > > > Hello! I am told that a while ago so information was posted here about > > using the CoreGraphics gamma functions to achieve a fade out effect, but > > I was unable to find it in the archives. Does anyone remember it? > > RezLib does this. It is for CFM Carbon, but due to the lack of an > functional API for this under Carbon at the time it was written, it calls > CoreGraphics on X. > > http://idisk.mac.com/rezlib/Public/RezLib.1.1.a8.sit > > RezLib is open source and free. No GPL's attached. > > Ian Ollmann > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From finlay.dobbie at btinternet.com Thu Jan 3 13:43:15 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:09 2005 Subject: Screen Fade Out (was Re: MacOSX-dev digest, Vol 1 #1335 - 10 msgs) In-Reply-To: Message-ID: <88E1FE5E-0092-11D6-A665-000502319F17@btinternet.com> On Thursday, January 3, 2002, at 09:05 pm, Ian Ollmann wrote: > RezLib does this. It is for CFM Carbon, but due to the lack of an > functional API for this under Carbon at the time it was written, it > calls > CoreGraphics on X. > > http://idisk.mac.com/rezlib/Public/RezLib.1.1.a8.sit > > RezLib is open source and free. No GPL's attached. As I posted to cocoa-dev, there is actually an Objective-C framework to do this, called DisplayKit. You can get it from http://www.clarinets.de/bkc/software/ -- Finlay From iano at cco.caltech.edu Thu Jan 3 13:49:31 2002 From: iano at cco.caltech.edu (Ian Ollmann) Date: Thu Nov 3 14:48:09 2005 Subject: Screen Fade Out In-Reply-To: <88E1FE5E-0092-11D6-A665-000502319F17@btinternet.com> Message-ID: On Thu, 3 Jan 2002, Finlay Dobbie wrote: > > On Thursday, January 3, 2002, at 09:05 pm, Ian Ollmann wrote: > > > RezLib does this. It is for CFM Carbon, but due to the lack of an > > functional API for this under Carbon at the time it was written, it > > calls > > CoreGraphics on X. > > > > http://idisk.mac.com/rezlib/Public/RezLib.1.1.a8.sit > > > > RezLib is open source and free. No GPL's attached. > > As I posted to cocoa-dev, there is actually an Objective-C framework to > do this, called DisplayKit. You can get it from > http://www.clarinets.de/bkc/software/ Yep. Brian used the code out of RezLib for this. Ian --------------------------------------------------- Ian Ollmann, Ph.D. iano@cco.caltech.edu --------------------------------------------------- From tasselin at riskwise.com Thu Jan 3 14:04:01 2002 From: tasselin at riskwise.com (Terrence Asselin) Date: Thu Nov 3 14:48:09 2005 Subject: Threads and GUI In-Reply-To: <6F97E1A7-008A-11D6-AE1D-003065BA6A54@10191.com> References: <6F97E1A7-008A-11D6-AE1D-003065BA6A54@10191.com> Message-ID: <20020103220252.30696@mail.riskwise.com> >hello all and happy new year ! > >I have a problem with my multi-threaded application and its GUI. > >Instead of using NSTimer i tried with NSNotificationCenter : > >Can you explain to me why i have these problems ? Do you have any >solution for me ? I'm working on an app, and have encountered a similar situation. I think I have a solution, but I haven't tested it yet. My understanding of the Cocoa frameworks is still at a pretty basic level, but this is my hypothesis: I think the problem is that you are dispatching the notification to the same thread, but you aren't managing the Run Loop to allow for drawing. You could try posting a notification to the main thread using NSDistributedNotificationCenter. It works much the same way as NSNotificationCenter, but it can send notifications across threads. If anyone has better understanding please let me know where I went astray. --Terrence. - - - - - - - - - - - - - RiskWise LLC Terrence Asselin - - - - - - - - - - - - - From ddavidso at apple.com Thu Jan 3 15:12:01 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:48:09 2005 Subject: NSLayoutManager subclasses In-Reply-To: Message-ID: On Monday, December 31, 2001, at 03:34 PM, Andrew Salamon wrote: > Does anyone know of any sample code that has a subclass of > NSLayoutManager that supports custom attributes for text? Something > like an Outline style, or reverse-video (white text on black > background). Examples of different underlining styles would be nice, > too, although that seems to have an API all it's own (i.e. > setGlyphAttributeForGlyphAtIndex vs drawUnderlineForGlyphRange > ). > > Actually, there's still a lot I don't understand about how > NSTextStorage interacts with an NSLayoutManager. I can add any > arbitrary attribute to an NSTextStorage, but I'm not sure how that > relates to the glyph attributes (if it does). This is actually pretty simple, except that it's difficult to come up with an interesting example that requires this. White-on-black text can be achieved by manipulating the foreground and background color attributes. The first question is whether the styles that you are interested in affect layout, or whether they only affect rendering. Styles that do not affect layout should be fairly easy to implement with a custom NSLayoutManager subclass--provided that the custom rendering does not go outside the bounds of the line fragment. It might look something like this (untested, no guarantees) - (void)drawGlyphsForGlyphRange:(NSRange)glyphsToShow atPoint:(NSPoint)origin { NSRange glyphRange = glyphsToShow; while (glyphRange.length > 0) { NSRange charRange = [self characterRangeForGlyphRange:glyphRange actualGlyphRange:NULL], attributeCharRange, attributeGlyphRange; id attribute = [textStorage attribute:@"MyCustomAttribute" atIndex:charRange.location longestEffectiveRange:&attributeCharRange inRange:charRange]; attributeGlyphRange = [self glyphRangeForCharacterRange:attributeCharRange actualCharacterRange:NULL]; attributeGlyphRange = NSIntersectionRange(attributeGlyphRange, glyphRange); if (attribute is set) { [NSGraphicsContext saveGraphicsState]; // if necessary do something here to affect drawing, then probably call [super drawGlyphsForGlyphRange:attributeGlyphRange atPoint:origin]; [NSGraphicsContext restoreGraphicsState]; } else { [super drawGlyphsForGlyphRange:attributeGlyphRange atPoint:origin]; } glyphRange.length = NSMaxRange(glyphRange) - NSMaxRange(attributeGlyphRange); glyphRange.location = NSMaxRange(attributeGlyphRange); } } Underlining, as you say, has an API of its own. That's a little more complicated, because of the sorts of calculations you need to do to determine where the underlines should go, how thick they should be, etc. If you develop a custom underline style, then I think that sort of work just comes with the territory. Douglas Davidson From kaelin at acm.org Thu Jan 3 15:48:03 2002 From: kaelin at acm.org (Kaelin Colclasure) Date: Thu Nov 3 14:48:09 2005 Subject: Frobbing the responder chain... In-Reply-To: Message-ID: <11B7B49B-00A4-11D6-82D3-000393820B2C@acm.org> On Wednesday, January 2, 2002, at 10:55 PM, Guy English wrote: > Hi Kaelin, [Snip] > Ok. I've put together a test and this worked for me... Thanks very much! The indicated line below fixed the problem for me as well. > @interface Actor : NSResponder > { > } > - (void) myTestAction: (id) sender; > - (void) myTestMenuItem: (id) sender; > - (BOOL) validateMenuItem: (id ) menuItem; > @end > > @implementation Actor > > - (void) myTestAction: (id) sender > { > NSLog( @"Test action triggered." ); > } > > - (void) myTestMenuItem: (id) sender > { > NSLog( @"Test menu item triggered." ); > } > > - (BOOL) validateMenuItem: (id ) menuItem > { > if ( [menuItem tag] == 100 ) > { > [menuItem setTitle: @"Validated by actor"]; > } > > return YES; > } > > @end > > - (void)windowControllerDidLoadNib:(NSWindowController *) aController > { > NSResponder *firstResponder; > Actor *actor; > > firstResponder = [[aController window] initialFirstResponder]; > > actor = [[Actor alloc] init]; > [actor setNextResponder: [firstResponder nextResponder]]; > [firstResponder setNextResponder: actor]; > > // This line fixes your problem... > [[aController window] makeFirstResponder: firstResponder]; > > // NOTE: The retain count for your actor here is 1. That means > // that the window didn't retain it and you must keep it around > // or you'll get a nasty crash. When you swap out this Actor for > // a more specialized one later make sure you release it or > // you'll leak memory in a really nasty way. > NSLog( @"Actor Retain Count: %d", [actor retainCount] ); > } > > My initial first responder for my window was an NSTextField. > > I placed a button on the Window and wired it to "myTestAction" of > FirstResponder. > When I click the button and "Test action triggered" is logged. I also > added a new menu item called "Test Item" to my Main Menu nib and wired > it to "myTestMenuItem" of FirstResponder. When I look at the menu item > it is named "Validated by actor" indicating that it passed through the > validation of of my responder. When I select the menu item the Actors > myTestMenuItem method is called correctly. > > When I changed my initial first responder to an NSTableView I > encountered the same problem you did in that my menu item was still > called "Test Item" and was disabled. When I clicked on the NSTableView > it worked as expected again. Hmm... Clearly something not right. > > [[aController window] makeFirstResponder: firstResponder]; > > This makes the view that is currently first responder the first > responder again. I imagine it has some side effect regarding tossing > out either a cached responder chain ( like you guessed at the > beginning ) or sending resignFirstResponder, becomeFirstResponder, etc > in the correct order that things work out. I'd be curious to hear from > the AppKit guys ( or anyone with a good explanation ) what's going on. > I have a feeling it has something to do with the windows field editor > calling makeFirstResponder when it's being placed over my NSTextField > that made my initial attempt work. I too would be very interested in understanding exactly how all this works. What tipped you to try resetting the firstResponder? I doubt that it would ever have occurred to me to try this... >> Well I'm still early in the Cocoa learning curve, so even when not 100% >> on target, your explanations of related concepts have been quite >> enlightening (and most appreciated)! :-) > > Glad to help. > > Good luck with your project, > Guy Thanks Guy! -- Kaelin From john at nisus.com Thu Jan 3 16:52:00 2002 From: john at nisus.com (jgo) Date: Thu Nov 3 14:48:09 2005 Subject: Setting a file's icon In-Reply-To: References: Message-ID: >>> Next, you need to save this data as the file's custom icon. >>> Icon Services or Icon Utilities may have functions for doing this... >>> I'm not sure. If not, use the Resource Manager to save the data >>> as an icns resource id -16455 in the file, and set the "has custom >>> icon" bit in the file's finderInfo flags. >> >> And if you have several kinds of documents which a single app can >> produce & work on, what do you do to avoid having several icns >> resources with the same id (-16455) that you mention? >> Or do you even need to make sure that the type & id (together) >> are unique? > > ResourceManager resources must be unique by type and ID: you can have both > an icns ID 128 and a ppob ID 128 in the same file, for example. > > That's not an issue here, though. A file has only one icon which is > displayed in the Finder: either the icon of its document type, which comes > from whichever application owns that document type, or a custom icon which > is stored in the file. A file can have only one custom icon. Which icon is picked up from the icns resource(s) of the application which created it? Since each application can create any number of types of files, then it must needs have any number of icns resources, so, they cannot all have the ID -16455. If those icns resources come from elsewhere, then where is that elsewhere? John G. Otto, Eagle Scout, Knight, Cybernetic Praxeologist Existence, Consciousness, Identity, Life, Liberty, Property, Privacy, Justice From kirby132 at hotmail.com Fri Jan 4 01:00:01 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:09 2005 Subject: Using CFCopyLocalizedString from a daemon Message-ID: >From: Douglas Davidson >To: Kevin Bohan >CC: macosx-dev@omnigroup.com >Subject: Re: Using CFCopyLocalizedString from a daemon >Date: Thu, 3 Jan 2002 09:53:18 -0800 > > >On Thursday, January 3, 2002, at 09:44 AM, Kevin Bohan wrote: > >>My strings have inserts that I need to fill with values as well as get >>the correct localized version which is why I have been using >>CFStringCreateWithFormatAndArguments to insert data into the loaded >>string before passing it to the CFUserNotification function. Can I do >>this using the CFUserNotification localizable parameter? > >There is no direct facility for doing this with server-side >localization, but there is the concatenation that I mentioned; for >strings other than the message, you may be able to rearrange your >notification. What is your notification supposed to look like? > >Douglas Davidson > The user sees a notification containing something like: "...Your system will shut down in 10 minutes..." The nofication string is actually: "...Your system will shut down in %1$ld $2$@..." as the number of minutes can vary and unit of time can vary, ie could be hours, minutes or seconds. Also to allow for localization reordering of these words I have used the n$ form. I cannot see how I could get the same thing using cancatenation given that the order and/or the position of the clauses can vary across different locales. Any ideas? Kirby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From freak at richcreations.com Fri Jan 4 02:27:01 2002 From: freak at richcreations.com (RichCreations) Date: Thu Nov 3 14:48:09 2005 Subject: Calling a bsd program from a Cocoa Obj-C app In-Reply-To: Message-ID: <6292AEE2-00FD-11D6-8535-000A278D236E@richcreations.com> Thanks, That was what I needed, check out my first cocoa app if you like... "MacFortune" It is free to anyone, is mildly entertaining and only took 30 lines of code, get it on stepwise's softrak. It seems to be stable (works fine) on my iMac DV400 running OSX 10.1.2 It is a cocoa wrapper for fortune-mod, meant to be a login item.(I have had fortune in my .cshrc on my netbsd box and osx, and wanted a gui version for Aqua for my self. The only problem is, I bundled the bsd app inside my app, "I used absolute paths when I compiled the bsd app, to its data files, and from the cocoa app to the bsd app, so if it is not in /Applications it won't work, but this seemed the only way I could make work it at all, other then installing the bsd fortune somewhere like /usr/bin/fortune and setting that as the launch path in the cocoa app. any Ideas? On Tuesday, January 1, 2002, at 03:09 AM, Thomas Deniau wrote: > Le 1/01/02 8:50, RichCreations disait : > >> I am trying to write a cocoa gui app, that runs a cli app, and displays >> the output in a window, > > See http://cocoadevcentral.com/tutorials/showpage.php?show=00000024.php > and > http://cocoadevcentral.com/tutorials/showpage.php?show=00000017.php > > -- > Thomas Deniau > From s.mecklenburg at t-online.de Fri Jan 4 07:33:01 2002 From: s.mecklenburg at t-online.de (Sebastian Mecklenburg) Date: Thu Nov 3 14:48:09 2005 Subject: numeric_limits? In-Reply-To: Message-ID: <3D31E302-0128-11D6-A0EE-0030656368A8@t-online.de> hello all, happy new year to everybody! (first things first ;-) but now to the darker sides of life: i need std::numeric_limits but is not included in the standard installation of the devtools. i haven't installed the new version of the devtools, but i assume it's not there too. or is it? what else can i do? regards sebastian mecklenburg From CBreak at gmx.net Fri Jan 4 08:00:57 2002 From: CBreak at gmx.net (Gerhard Roethlin) Date: Thu Nov 3 14:48:09 2005 Subject: numeric_limits? In-Reply-To: <3D31E302-0128-11D6-A0EE-0030656368A8@t-online.de> Message-ID: <087E917E-012C-11D6-9937-003065C384DA@gmx.net> I fount limits.h in /usr/include. I don't know if this file is from the December DevTools, but i don't think so. (Date of last change: 10.9.2001) cbreak Am Freitag den, 4. Januar 2002, um 16:32, schrieb Sebastian Mecklenburg: > hello all, > > happy new year to everybody! (first things first ;-) > > but now to the darker sides of life: i need std::numeric_limits but > is not included in the standard installation of the devtools. i > haven't installed the new version of the devtools, but i assume it's not > there too. or is it? what else can i do? > > regards > sebastian mecklenburg From s.mecklenburg at t-online.de Fri Jan 4 10:14:00 2002 From: s.mecklenburg at t-online.de (Sebastian Mecklenburg) Date: Thu Nov 3 14:48:09 2005 Subject: numeric_limits? In-Reply-To: <087E917E-012C-11D6-9937-003065C384DA@gmx.net> Message-ID: hello, thanks for the reply, but "limits" is a file from the c++ standard library and is different from "limits.h". the advantage of the c++ version is that it allows the following construct: template T DataSet2D::max() const { //initialize the first value T min = std::numeric_limits::min(); //find and return the maximum } without having to write a lot of different versions for the different numeric types. regards sebastian mecklenburg On Friday, January 4, 2002, at 04:59 PM, Gerhard Roethlin wrote: > I fount limits.h in /usr/include. I don't know if this file is from the > December DevTools, but i don't think so. (Date of last change: > 10.9.2001) > > cbreak > > Am Freitag den, 4. Januar 2002, um 16:32, schrieb Sebastian Mecklenburg: > >> hello all, >> >> happy new year to everybody! (first things first ;-) >> >> but now to the darker sides of life: i need std::numeric_limits but >> is not included in the standard installation of the devtools. >> i haven't installed the new version of the devtools, but i assume it's >> not there too. or is it? what else can i do? >> >> regards >> sebastian mecklenburg > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From dimitry.markman at verizon.net Fri Jan 4 10:26:59 2002 From: dimitry.markman at verizon.net (Dmitry Markman) Date: Thu Nov 3 14:48:09 2005 Subject: numeric_limits? In-Reply-To: Message-ID: <8299A3CD-0140-11D6-B744-00039303FDBE@verizon.net> Apple doesn't have STL implementation use CodeWarrior, if you can. it has full STL implementation and you can build Mach-O binaries or download STL sources (www.stlport.org) Dmitry Markman On Friday, January 4, 2002, at 01:13 PM, Sebastian Mecklenburg wrote: > hello, > > thanks for the reply, but "limits" is a file from the c++ standard > library and is different from "limits.h". the advantage of the c++ > version is that it allows the following construct: > > template T > DataSet2D::max() const { > //initialize the first value > T min = std::numeric_limits::min(); > > //find and return the maximum > } > > without having to write a lot of different versions for the different > numeric types. > > regards > sebastian mecklenburg > > > On Friday, January 4, 2002, at 04:59 PM, Gerhard Roethlin wrote: > >> I fount limits.h in /usr/include. I don't know if this file is from >> the December DevTools, but i don't think so. (Date of last change: >> 10.9.2001) >> >> cbreak >> >> Am Freitag den, 4. Januar 2002, um 16:32, schrieb Sebastian >> Mecklenburg: >> >>> hello all, >>> >>> happy new year to everybody! (first things first ;-) >>> >>> but now to the darker sides of life: i need std::numeric_limits but >>> is not included in the standard installation of the >>> devtools. i haven't installed the new version of the devtools, but i >>> assume it's not there too. or is it? what else can i do? >>> >>> regards >>> sebastian mecklenburg >> >> _______________________________________________ >> 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 rainer at brockerhoff.net Fri Jan 4 10:58:02 2002 From: rainer at brockerhoff.net (Rainer Brockerhoff) Date: Thu Nov 3 14:48:09 2005 Subject: Setting a file's icon In-Reply-To: <200201041604.IAA20374@lists> References: <200201041604.IAA20374@lists> Message-ID: >Date: Thu, 3 Jan 2002 16:48:54 -0800 >From: jgo >Which icon is picked up from the icns resource(s) of the application >which created it? Since each application can create any number of >types of files, then it must needs have any number of icns resources, >so, they cannot all have the ID -16455. If those icns resources >come from elsewhere, then where is that elsewhere? -16455 is used ONLY for custom icons. For icns declared by the application (I'm assuming an old-style, or Carbon, application) there can be any number of icns resources, the numbers are listed in the BNDL resource, and usually are from 128 on up. Just open any application in ResEdit or Resorcerer and look at the BNDL resource... -- Rainer Brockerhoff Belo Horizonte, Brazil "Originality is the art of concealing your sources." http://www.brockerhoff.net/ (updated Dec. 2001) From bwebster at owlnet.rice.edu Fri Jan 4 12:45:59 2002 From: bwebster at owlnet.rice.edu (Brian Webster) Date: Thu Nov 3 14:48:09 2005 Subject: Key event handling theory Message-ID: <17EFACE6-0154-11D6-85DC-003065D61140@owlnet.rice.edu> I'm trying to get a handle on what the intended design patterns are in Cocoa when it comes to handling key down events. That is, I'd like to know what way people think is "best" for dispatching keypresses in custom views. A simple example would be having a table view that allows the user to press delete to delete the selected rows, or other additions like that. The most straightforward method is to override keyDown: in your NSView subclass and have a big switch statement that tells what it should do depending on what character is pressed. This works, but it seems very un-Cocoa. Then of course, there is the whole NSResponder system, which deals with interpretKeyEvents:, doCommandBySelector:, insertText:, and so on. It seems like this mechanism would be the preferred way of doing things, but I can't really figure out how to go about it in the way it's intended to be used. The way that seems along the right tracks is to override the keyDown: method in your view and then pass the event along to interpretKeyEvents:. You would then just have to bind whatever keys you want to the appropriate selectors and they will just get called automatically. However, I can't figure out how to go about the binding process, since it seems to me that key binding affects the whole app, and not just one view class or instance. It also seems like most of the binding stuff is geared towards text views specifically, so I don't know if it's meant to be used for non-text views. I guess I just feel like I'm missing something, so if anyone has an idea of what I've been rambling on about, please let me know. :) -- Brian Webster bwebster@owlnet.rice.edu http://homepage.mac.com/bwebster From greg at omnigroup.com Fri Jan 4 13:13:01 2002 From: greg at omnigroup.com (Greg Titus) Date: Thu Nov 3 14:48:09 2005 Subject: Key event handling theory In-Reply-To: <17EFACE6-0154-11D6-85DC-003065D61140@owlnet.rice.edu> Message-ID: On Friday, January 4, 2002, at 12:46 PM, Brian Webster wrote: > I'm trying to get a handle on what the intended design patterns are in > Cocoa when it comes to handling key down events. That is, I'd like to > know what way people think is "best" for dispatching keypresses in > custom views. A simple example would be having a table view that > allows the user to press delete to delete the selected rows, or other > additions like that. > The way that seems along the right tracks is to override the keyDown: > method in your view and then pass the event along to > interpretKeyEvents:. You would then just have to bind whatever keys > you want to the appropriate selectors and they will just get called > automatically. However, I can't figure out how to go about the binding > process, since it seems to me that key binding affects the whole app, > and not just one view class or instance. It also seems like most of > the binding stuff is geared towards text views specifically, so I don't > know if it's meant to be used for non-text views. NSResponder already implements -keyDown: to pass along the key events to -interpretKeyEvents: so all of that is basically done for you. To implement your simple example, all you really have to do is implement a method called -deleteBackwards:. The NSResponder machinery will: 1) In -keyDown: pass the event to -interpretKeyEvents: 2) In -interpretKeyEvents: it will do the binding to the deleteBackwards command and call -doCommandBySelector: 3) In -doCommandBySelector: the default implementation just sees if self responds to the selector and calls it so 4) Your -deleteBackwards: method is invoked. The way I'd recommend hooking into this is: * If there is already a command for the keyboard event you are interested in (like in this example) just implement the command method (-deleteBackwards:) and leave everything else alone. * Only override -doCommandBySelector: if you want to add your own 'chain' of possible handlers, like NSTextView calls its delegate with -textView:doCommandBySelector:. * Only override -interpretKeyEvents: if you have some other key that you want to do something special that isn't currently defined (for example, making control-alt-tilde be the -frob: command) * Only override -keyDown: directly if you want to handle typing instead of key commands (if you see what I mean...). Be sure to call the superclass implementation for any key that you don't explicitly handle so the rest of the machinery still happens. Hope this helps, --Greg From ncrocker at ferp.ucsd.edu Fri Jan 4 13:14:00 2002 From: ncrocker at ferp.ucsd.edu (Neal A. Crocker) Date: Thu Nov 3 14:48:09 2005 Subject: Applescript & Cocoa problems Message-ID: >Date: Sun, 30 Dec 2001 02:05:07 +0100 >Subject: Applescript & Cocoa problems >From: =?ISO-8859-1?Q?R=E9mi_Zara?= >To: macosx-dev@omnigroup.com > > * The other problem I have (for the moment :-) is with an attribute >that does not work on one of my classes. >In this class, I have roughly 10 attributes, 2 of them correspond to >NSStrings. They are implemented exactly the same way (besides the name) >in my Objective C class and in the script suite. >One works, the other does not (I got NSReceiverEvaluationScriptError 3). >The one that works is email (code Mail) >The one that doesn't is path (code Path, PAth does not work either) "path" is a term used by one of Apples scripting addition. During the parsing phase, when scripts are compiled, scripting addtion terms get precedence (I believe) over application defined terms, so I'm guessing that any script which tries to use the "path" term you've defined won't be compiled to the raw code that you've defined for "path". Neal. From ncrocker at ferp.ucsd.edu Fri Jan 4 13:14:27 2002 From: ncrocker at ferp.ucsd.edu (Neal A. Crocker) Date: Thu Nov 3 14:48:09 2005 Subject: Adding AppleScript to my App Message-ID: >Date: Mon, 31 Dec 2001 10:10:37 -0500 >Subject: Adding AppleScript to my App >From: "Erik J. Barzeski" >To: Mac OS X Dev > >Hi, > >I want to add AppleScripting to my application. I want other people to say: > >tell application "Erik's App" > return item named Foo >end tell This script is very non-standard. What scripters will actually write is: tell application "Erik's App" get item "Foo" end tell or tell application "Erik's App" get item whose name is "Foo" end tell To insure that a scripter can get at the cocoa object whose name is "Foo", use key-value coding. Key-value coding involves giving your cocoa object fields and methods with certain common sense names according to conventions described in the documentation. Look at /Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/Scriptability/ as John C. Warner suggets. Neal. From mmurrett at vanteon.com Fri Jan 4 13:42:04 2002 From: mmurrett at vanteon.com (Mac Murrett) Date: Thu Nov 3 14:48:09 2005 Subject: numeric_limits? In-Reply-To: <8299A3CD-0140-11D6-B744-00039303FDBE@verizon.net> Message-ID: Alternatively, you can use Boost (http://www.boost.org/), which replaces numeric_limits on systems that don't have it. Boost compiles with Mac OS X dev tools. Mac Murrett, C++ Booster. On 1/4/02 1:26 PM, "Dmitry Markman" wrote: > Apple doesn't have STL implementation > use CodeWarrior, if you can. it has full STL implementation > and you can build Mach-O binaries > > or download STL sources (www.stlport.org) > Dmitry Markman > > > On Friday, January 4, 2002, at 01:13 PM, Sebastian Mecklenburg wrote: > >> hello, >> >> thanks for the reply, but "limits" is a file from the c++ standard >> library and is different from "limits.h". the advantage of the c++ >> version is that it allows the following construct: >> >> template T >> DataSet2D::max() const { >> //initialize the first value >> T min = std::numeric_limits::min(); >> >> //find and return the maximum >> } >> >> without having to write a lot of different versions for the different >> numeric types. >> >> regards >> sebastian mecklenburg >> >> >> On Friday, January 4, 2002, at 04:59 PM, Gerhard Roethlin wrote: >> >>> I fount limits.h in /usr/include. I don't know if this file is from >>> the December DevTools, but i don't think so. (Date of last change: >>> 10.9.2001) >>> >>> cbreak >>> >>> Am Freitag den, 4. Januar 2002, um 16:32, schrieb Sebastian >>> Mecklenburg: >>> >>>> hello all, >>>> >>>> happy new year to everybody! (first things first ;-) >>>> >>>> but now to the darker sides of life: i need std::numeric_limits but >>>> is not included in the standard installation of the >>>> devtools. i haven't installed the new version of the devtools, but i > >>>> assume it's not there too. or is it? what else can i do? >>>> >>>> regards >>>> sebastian mecklenburg >>> >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From wjcheeseman at earthlink.net Fri Jan 4 14:33:00 2002 From: wjcheeseman at earthlink.net (Bill Cheeseman) Date: Thu Nov 3 14:48:09 2005 Subject: Adding AppleScript to my App In-Reply-To: Message-ID: on 02-01-04 4:13 PM, Neal A. Crocker at ncrocker@ferp.ucsd.edu wrote: >> I want to add AppleScripting to my application. I want other people to say: >> >> tell application "Erik's App" >> return item named Foo >> end tell > > This script is very non-standard. What scripters will actually write is: > > tell application "Erik's App" > get item "Foo" > end tell > > or > > tell application "Erik's App" > get item whose name is "Foo" > end tell Actually, "named" isn't "non-standard," although it does seem to be relatively little used. The "named" syntax is standard AppleScript ("named" is a reserved word), and in my view it is one of the gems of the "plain English" aspirations of AppleScript. (However, there should have been quotation remarks around "Foo" in the example given, to wit, 'return item named "Foo"'. See pages 134 and 295 of the AppleScript Language Guide (1993). -- 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 djw_lists at pacbell.net Fri Jan 4 15:40:58 2002 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:48:09 2005 Subject: App Dock Menu; can't get sender context Message-ID: <69BF5310-016C-11D6-BDCD-00039315D3C2@pacbell.net> Hi, I have an application dock menu, created by returning my menu in this method: - (NSMenu *)applicationDockMenu:(NSApplication *)sender; This works fine -- except that my dock menu has a dynamically generated list of items to choose from, rather than "commands" as you see in iTunes. Normally, to respond to this kind of menu in an application, you can get information about the "sender" -- e.g. its representedObject. But in this case, the sender in my handler turns out to be a NSApplication, and *not* a menu item. This means, it looks like there's no way to get context information. Am I up a creek without a paddle here? Any way to overcome this? Thanks, Dan Wood -- Dan Wood 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: 1001 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020104/805e7fd2/attachment.bin From chmod007 at mac.com Fri Jan 4 15:54:02 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:48:09 2005 Subject: App Dock Menu; can't get sender context In-Reply-To: <69BF5310-016C-11D6-BDCD-00039315D3C2@pacbell.net> Message-ID: This is a bug. Search the archives (of this list and cocoa-dev @ apple) for possible solutions. / david remahl > Hi, > > I have an application dock menu, created by returning my menu in > this method: > > - (NSMenu *)applicationDockMenu:(NSApplication *)sender; > > This works fine -- except that my dock menu has a dynamically > generated list of items to choose from, rather than "commands" > as you see in iTunes. Normally, to respond to this kind of menu > in an application, you can get information about the "sender" -- > e.g. its representedObject. But in this case, the sender in my > handler turns out to be a NSApplication, and *not* a menu item. > This means, it looks like there's no way to get context > information. > > Am I up a creek without a paddle here? Any way to overcome this? > > Thanks, > > Dan Wood From aep at apple.com Fri Jan 4 16:00:58 2002 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:48:09 2005 Subject: App Dock Menu; can't get sender context In-Reply-To: <69BF5310-016C-11D6-BDCD-00039315D3C2@pacbell.net> Message-ID: <464FD8DD-016F-11D6-9EA2-003065B939B6@apple.com> On Friday, January 4, 2002, at 03:40 , Dan Wood wrote: > This works fine -- except that my dock menu has a dynamically generated > list of items to choose from, rather than "commands" as you see in iTunes. > Normally, to respond to this kind of menu in an application, you can > get information about the "sender" -- e.g. its representedObject. But in > this case, the sender in my handler turns out to be a NSApplication, and > *not* a menu item. This means, it looks like there's no way to get > context information. > Am I up a creek without a paddle here? Any way to overcome this? Nope. We are planning on fixing this. To be safe, ignore the sender completely and, as a workaround, assign each item a unique action. Andrew __________________________________________________________________ A n d r e w P l a t z e r A p p l i c a t i o n F r a m e w o r k s A p p l e -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1028 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020104/92447b07/attachment.bin From njriley at uiuc.edu Fri Jan 4 17:53:00 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:48:09 2005 Subject: App Dock Menu; can't get sender context In-Reply-To: <69BF5310-016C-11D6-BDCD-00039315D3C2@pacbell.net>; from djw_lists@pacbell.net on Fri, Jan 04, 2002 at 03:40:19PM -0800 References: <69BF5310-016C-11D6-BDCD-00039315D3C2@pacbell.net> Message-ID: <20020104195215.A1046186@uiuc.edu> On Fri, Jan 04, 2002 at 03:40:19PM -0800, Dan Wood wrote: > Am I up a creek without a paddle here? Any way to overcome this? It's a reported, acknowledged, to-be-fixed (perhaps already fixed? :) bug. Here's how I get around it: by using an NSInvocation to store the real context. You can see the "correct" way commented out, and the workaround uncommented. I pulled this right out of my code, so just ignore the context... menuItem = [dockMenu addItemWithTitle: [@" " stringByAppendingString: [[[cItem label] asAttributedStringTruncatedToWidth: 300] string]] action: @selector(invoke) keyEquivalent: @""]; // action: @selector(connectFromDockMenuItem:) keyEquivalent: @""]; // [menuItem setTarget: self]; // XXX doesn't work [menuItem setRepresentedObject: cItem]; inv = [NSInvocation invocationWithMethodSignature: sig]; [inv setSelector: @selector(connectFromDockMenuItem:)]; [inv setTarget: self]; [inv setArgument: &menuItem atIndex: 2]; [menuItem setTarget: [inv retain]]; [menuItem setTag: TAG_CONNECT_ITEM]; As you see, I use the target for storage of the invocation. That way, when I need to delete items from the menu, I can release it: int items = [dockMenu numberOfItems]; while (items--) { // assume this should be OK [[[dockMenu itemAtIndex: 0] target] release]; // XXX kludge for NSInvocation, remove when done [dockMenu removeItemAtIndex: 0]; } There are a number of other deficiencies in dock menus that you might discover; for example, you can't add marks (which you can even do in Carbon - see iTunes!) or icons. What I really wish is that the standard Window menus in Cocoa and Carbon apps, as well as the dock popup, would show the icons corresponding to windows' represented filenames, or the Carbon equivalent (proxy icons). Some applications do this themselves, and I find it extremely useful when picking out items of different kinds. Project Builder also does something similar with its "history" popup menu. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From kaelin at acm.org Fri Jan 4 17:58:00 2002 From: kaelin at acm.org (Kaelin Colclasure) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? Message-ID: <1010195789.9261.8.camel@cube.dev.resilience.com> Could anyone be so kind as to point me at the source to a simple network daemon written using the Foundation classes? I am quite familiar with BSD socket APIs, and with writing daemons in general, but am only beginning to explore the Foundation classes. I can see that I'll want an NSRunLoop doing event dispatching, where I'd "normally" use select or poll. But NSFileHandle appears to have the methods for listening for incoming connections, while NSSocketPort would seem to be the socket wrapper class I'm looking for. How are these classes used together? And yes, I am aware that I could just use plain old BSD APIs... I'm trying to expand my horizons a bit here... :-) -- Kaelin From fabienlroy at mac.com Fri Jan 4 18:16:03 2002 From: fabienlroy at mac.com (fabienlroy@mac.com) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: <1010195789.9261.8.camel@cube.dev.resilience.com> Message-ID: <143F8375-0182-11D6-B84F-000393030CD8@mac.com> Take a look at the OmniNetwork framework. Hope that helps. Fabien On Friday, January 4, 2002, at 05:56 PM, Kaelin Colclasure wrote: > Could anyone be so kind as to point me at the source to a simple network > daemon written using the Foundation classes? I am quite familiar with > BSD socket APIs, and with writing daemons in general, but am only > beginning to explore the Foundation classes. > > I can see that I'll want an NSRunLoop doing event dispatching, where I'd > "normally" use select or poll. But NSFileHandle appears to have the > methods for listening for incoming connections, while NSSocketPort would > seem to be the socket wrapper class I'm looking for. How are these > classes used together? > > And yes, I am aware that I could just use plain old BSD APIs... I'm > trying to expand my horizons a bit here... :-) > > -- Kaelin > --- Fabien Roy Senior Software Engineer Tyrell Software Corporation 949 458-1911 ext 4 From guy.english at sympatico.ca Fri Jan 4 18:28:02 2002 From: guy.english at sympatico.ca (Guy English) Date: Thu Nov 3 14:48:09 2005 Subject: Frobbing the responder chain... In-Reply-To: <11B7B49B-00A4-11D6-82D3-000393820B2C@acm.org> Message-ID: On Thursday, January 3, 2002, at 06:46 PM, Kaelin Colclasure wrote: > On Wednesday, January 2, 2002, at 10:55 PM, Guy English wrote: >> Ok. I've put together a test and this worked for me... > Thanks very much! The indicated line below fixed the problem for me as > well. Good. > I too would be very interested in understanding exactly how all this > works. What tipped you to try resetting the firstResponder? I doubt > that it would ever have occurred to me to try this... When you click on a view it gets asked to become first responder. Since clicking on the view made everything work as expected I just faked it. Take care, Guy From kaelin at acm.org Fri Jan 4 19:02:00 2002 From: kaelin at acm.org (Kaelin Colclasure) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: <143F8375-0182-11D6-B84F-000393030CD8@mac.com> References: <143F8375-0182-11D6-B84F-000393030CD8@mac.com> Message-ID: <1010199640.9261.12.camel@cube.dev.resilience.com> On Fri, 2002-01-04 at 18:15, fabienlroy@mac.com wrote: > Take a look at the OmniNetwork framework. > Hmmm. I downloaded the framework and had a quick browse through the provided examples. They all use an imperative (e.g. non-event-driven) style that doesn't make use of the NSRunLoop. I realize that they're supposed to be minimal examples, so I also had a quick look through the header files of ONSocket, ONTCPSocket, etc. Either I am missing something (which is quite possible) or these classes aren't really designed to be used with a Foundation-style event loop... What I'd like to see is a daemon coded using NSRunLoop as it's core event dispatcher... I am beginning to figure out what goes where (I think). My initial confusion was in thinking that NSSocketPort was a generic socket wrapper. I now understand it to be a special class of endpoint that the DO system (which looks extremely cool) uses. So it appears that I'm supposed to used regular old BSD-style calls to get a socket created and bound, and then tuck the fd into a NSFileHandle... -- Kaelin From keirstwc at mac.com Fri Jan 4 19:27:05 2002 From: keirstwc at mac.com (Bill Keirstead) Date: Thu Nov 3 14:48:09 2005 Subject: KeyChain (KCAddItem) and Cocoa Message-ID: Hello, I am trying to use the KeyChain's KCAddItem function from within a Cocoa application, but the function seems to be missing from the headers and declaring it myself leads to link errors. Is there some other way that I should be adding new items to the KeyChain using Cocoa? Note: I am including CoreServices/CoreServices.h and using the CoreServices.framework. The retrieval APIs seem to work fine for me. Thanks in advance, Bill Keirstead keirstwc@mac.com From rgrant at mac.com Fri Jan 4 19:51:00 2002 From: rgrant at mac.com (rgrant@mac.com) Date: Thu Nov 3 14:48:09 2005 Subject: Encoding/decoding XML Message-ID: <5067B350-018F-11D6-B933-00039381760A@mac.com> Hi, I've got an app in mind that needs to encode documents to and from XML. I've got Aaron's book but the encoding example in that is a standard object encoding in binary (I guess). I have an XML standard (SVG) that I'm trying to work with. Any clues, pointers? Thanks, Robert. From dunham at mac.com Fri Jan 4 22:20:59 2002 From: dunham at mac.com (David Dunham) Date: Thu Nov 3 14:48:09 2005 Subject: Encoding/decoding XML In-Reply-To: <5067B350-018F-11D6-B933-00039381760A@mac.com> Message-ID: <53BD0DF0-01A4-11D6-98B9-003065C13422@mac.com> On Friday, January 4, 2002, at 07:50 , rgrant@mac.com wrote: > I've got an app in mind that needs to encode documents to and > from XML. Have you looked at Core Foundation's XML Services? David Dunham A Sharp david@a-sharp.com Voice/Fax: 206 783 7404 http://a-sharp.com Efficiency is intelligent laziness. From luthier at ozemail.com.au Fri Jan 4 23:54:01 2002 From: luthier at ozemail.com.au (Peter Ferrett) Date: Thu Nov 3 14:48:09 2005 Subject: dbopen - file corruption (solved) Message-ID: I have tracked down the problem to the BTREEINFO variable passed in the DBOpen() during initialisation. Passing nil as the last argument to DBOpen() results in the data functioning properly in an intact manner. I haven't really figured out why this is yet, but will keep looking. Meanwhile using default values and compare() function by passing nil in DBOpen() suits my purpose fine for now. thanks for those who have offered assistance with this. From andy at cocoadevcentral.com Sat Jan 5 01:47:00 2002 From: andy at cocoadevcentral.com (Andreas Monitzer) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: <1010199640.9261.12.camel@cube.dev.resilience.com> Message-ID: <258BCC9E-01C1-11D6-AF9A-00039306E362@cocoadevcentral.com> On Saturday, January 5, 2002, at 04:00 , Kaelin Colclasure wrote: > What I'd like to see is a daemon coded using NSRunLoop as it's core > event dispatcher... > > I am beginning to figure out what goes where (I think). My initial > confusion was in thinking that NSSocketPort was a generic socket > wrapper. I now understand it to be a special class of endpoint that the > DO system (which looks extremely cool) uses. So it appears that I'm > supposed to used regular old BSD-style calls to get a socket created and > bound, and then tuck the fd into a NSFileHandle... Take a look at CFSocket (which is part of CoreFoundation), it does all you want. And it integrates fine into an NSRunLoop. The following page includes an example on how to insert a CFSocket into the current runloop (and read the rest of it, too): http://www.cocoadevcentral.com/tutorials/showpage.php?show=00000034.php andy From markus.schneider at s.netic.de Sat Jan 5 02:22:00 2002 From: markus.schneider at s.netic.de (markus.schneider@s.netic.de) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: <1010199640.9261.12.camel@cube.dev.resilience.com> Message-ID: Am Samstag den, 5. Januar 2002, um 04:00, schrieb Kaelin Colclasure: > I am beginning to figure out what goes where (I think). My initial > confusion was in thinking that NSSocketPort was a generic socket > wrapper. I now understand it to be a special class of endpoint that the > DO system (which looks extremely cool) uses. So it appears that I'm > supposed to used regular old BSD-style calls to get a socket created and > bound, and then tuck the fd into a NSFileHandle... > > I had the same problem here. I solved it by using the ONSocket class to setup the socket connection and retrieving the filedescriptor from the open socket. Then I created a NSFileHandle with that fd and used it for asynchronous communication. There is another way by using the CoreFoundation which is described here: http://www.cocoadevcentral.com/ Regards, Markus From cmh at bDistributed.com Sat Jan 5 09:19:01 2002 From: cmh at bDistributed.com (Chris Hanson) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: <1010195789.9261.8.camel@cube.dev.resilience.com> References: <1010195789.9261.8.camel@cube.dev.resilience.com> Message-ID: At 5:56 PM -0800 1/4/02, Kaelin Colclasure wrote: >But NSFileHandle appears to have the >methods for listening for incoming connections, while NSSocketPort would >seem to be the socket wrapper class I'm looking for. How are these >classes used together? They aren't. You might think NSSocketPort is a BSD socket abstraction thanks to Apple's poor choice of names, but it's not -- it's actually a type of NSPort that lets you do distributed objects over TCP. You can use the BSD socket() call to create an endpoint and then hand it to an NSFileHandle to manage. It'd be nice if Apple would just add a couple more class methods and initializers so you could create an NSFileHandle configured to listen on a particular local port, or configured to connect to a remote port, and so on given how common a request this is. (Perhaps it's time to file a feature request in the bug tracking system.) -- Chris -- 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 greg at omnigroup.com Sat Jan 5 11:22:00 2002 From: greg at omnigroup.com (Greg Titus) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: <1010199640.9261.12.camel@cube.dev.resilience.com> Message-ID: <6AD2A396-0211-11D6-8534-003065B22C50@omnigroup.com> On Friday, January 4, 2002, at 07:00 PM, Kaelin Colclasure wrote: > On Fri, 2002-01-04 at 18:15, fabienlroy@mac.com wrote: >> Take a look at the OmniNetwork framework. >> > > Hmmm. I downloaded the framework and had a quick browse through the > provided examples. They all use an imperative (e.g. non-event-driven) > style that doesn't make use of the NSRunLoop. I realize that they're > supposed to be minimal examples, so I also had a quick look through the > header files of ONSocket, ONTCPSocket, etc. Either I am missing > something (which is quite possible) or these classes aren't really > designed to be used with a Foundation-style event loop... Nope. OmniNetworking is meant to be used synchronously via multiple threads instead of with an asynchronous event loop. There's a minimal but functional (and expandable) FTP server tool here: ... that demonstrates this. There is one thread for the main socket which waits for incoming connections and then spawns off an additional socket and thread to handle each of those connections. If you are at all familiar with the FTP protocol it makes a pretty decent example. But of course, it isn't terribly useful if you want to use the event dispatching approach. Hope this helps, --Greg From djw_lists at pacbell.net Sat Jan 5 14:00:59 2002 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:48:09 2005 Subject: Why would makeKeyAndOrderFront not be activating the application? Message-ID: <939EB8B4-0227-11D6-8F8E-00039315D3C2@pacbell.net> Hi, I have a dock menu that is supposed to do something and then activate my application, bringing its window(s) to front. I'm calling [NSApp arrangeInFront:] and I'm calling [NSWindow makeKeyAndOrderFront:] So the application windows are coming to the front layer, but the actual frontmost window is not activated -- in other words, it is behaving as if it is behind other windows, with a translucent title bar and gray title bar controls. My guess is that this is happening because the application was not the frontmost, so I'm missing one more call to handle this. Any suggestions? Dan -- Dan Wood 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: 820 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020105/5450e0d2/attachment.bin From chris at mantis-design.com Sat Jan 5 14:12:02 2002 From: chris at mantis-design.com (Chris Ruzin) Date: Thu Nov 3 14:48:09 2005 Subject: Why would makeKeyAndOrderFront not be activating the application? In-Reply-To: <939EB8B4-0227-11D6-8F8E-00039315D3C2@pacbell.net> Message-ID: I used the following line of code to bring my app to the front and activate it: [NSApp activateIgnoringOtherApps:YES]; It seems to work for me. Chris On Saturday, January 5, 2002, at 04:00 PM, Dan Wood wrote: > Hi, > > I have a dock menu that is supposed to do something and then activate > my application, bringing its window(s) to front. I'm calling [NSApp > arrangeInFront:] and I'm calling [NSWindow makeKeyAndOrderFront:] > > So the application windows are coming to the front layer, but the > actual frontmost window is not activated -- in other words, it is > behaving as if it is behind other windows, with a translucent title bar > and gray title bar controls. > > My guess is that this is happening because the application was not the > frontmost, so I'm missing one more call to handle this. Any > suggestions? > > Dan > > > -- > Dan Wood > 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: 1059 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020105/9fd11302/attachment.bin From djw_lists at pacbell.net Sat Jan 5 14:33:03 2002 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:48:09 2005 Subject: HTML-built Attributed String's Default Font? Message-ID: <227FC2E1-022C-11D6-8F8E-00039315D3C2@pacbell.net> I'm building up an attributed string from HTML with the following method: NSData *theData = [inHTML dataUsingEncoding:NSMacOSRomanStringEncoding]; NSAttributedString *text = [[[NSAttributedString alloc] initWithHTML:theData documentAttributes:nil] autorelease]; [[oTextView textStorage] setAttributedString:text]; ... But I've noticed that the text is always Times Roman unless I override the font with a tag. Is there any way to specify the "default" font (and size, for that matter) of text instantiated from HTML? Dan -- Dan Wood 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: 771 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020105/579851ab/attachment.bin From gjbetzel at pressenter.com Sat Jan 5 20:22:00 2002 From: gjbetzel at pressenter.com (Greg Betzel) Date: Thu Nov 3 14:48:09 2005 Subject: Using Image Capture framework? Message-ID: I'm looking for a "how-to" to use the Image Capture framework in OS X. Any pointers? I'm trying to get program access to a camera, and it'd make things a LOT easier if there was a way to leverage off the built-in Image Capture Architecture (ICA). Using the Image Capture app & Apple Events is an option, but I'd like to avoid that route if possible. Thanks. :) Greg Betzel From osx-developer at www.com Sun Jan 6 00:02:01 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:09 2005 Subject: PDO Replacement Attempts, or How to setReturnValue: in an NSInvocation? Message-ID: <200201060801.g06814F28836@mail8.bigmailbox.com> Summation of following Bugg Description.- ________________________________________________ NSInvocation is not able to set the return value (setReturnValue:) in a usable way, or requires proper documentation. NSArchiver and NSUnarchiver both have problems when dealing with NSInvocations (and using them in Distant Object Message). NSArchiver seems to fail in fowrardInvocation: calls of an Application and errors on multiple argument method signatures in an Objective-Tool, while the Unarchiver seems unable to unarchive the return value of an NSInvocation (0x0 is all there is, so it's a separate problem the the setReturnValue issue, but could be related). [see detailed description below for more information about these problems, or at least my attempts to replace the reportedly no longer support yet critical PDO (Portable Distributed Objects) system. ________________________________________________ [The Replacement Classes will be called NEW_*Class* for this explanation.] After building an entire replacement for PDO (Portable Distributed Objects), I have discovered a few technical problems. [Needed has been a NEW_Connection to replace NSConnections, a NEW_DistantObject to replace NSDistantObject, and also I have couple of socket classes that NEW_Connection uses.] As far as programs I have (so far for now) a Hub Tool that allows Servers to register a name and the hub keeps track of a port number and the IP, this can be global [I believe the old system must have used the broadcast address, but for my needs a more global approach is needed (besides being an easier short cut for now) and therefor a central Hub process is required or at least a list to try in some order or to check all of. Then one might have a concept of a Master Hub and Slave Hubs etc.], and eventually a secure socket layer (SSL) would be included, if needed beyond the local network. Lots more is needed here only when and if the rest of it works right, and is otherwise still needed that is true PDO returns.) Next comes the Server Tool that connects to the Hub and Requests to Register a name, the hub returns the next port for that IP and the server starts a NEW_Connection which runs a NEW_socket that waits for a client to connect to it. Then the Client Tool asks the Hub for the IP and port of a server that is serving a NEW_Connection for the registered name. It gets this information and establishes a NEW_Connection with the server. (They confirm the connection to each other.) [Finally the magic part comes next, since this is built on and for Objective-C, and it is intended to replace the no longer working properly or suppose to be supported ever again PDO (that made NeXT useful, important, and of any value to me.) The replacement must follow the form of NSConnections, NSDistantObjects, etc. but most importantly it must use the NeXT (now seemingly unstably sketched and owned by Apple) Classes NSInvocation and NSArchiver (the archiver seems to need replacing and that might be basically possible in the case of NSInvocations at some point, but the NSInvocation is limited or appears buggy, hence this document or bugg inquiry it is eventually intended for.] The Client Tool has a proxy or NEW_DistantObject that has a/the Protocol of the Served Object (I have tried variations of 'inout' [default] etc. and other type declarations documented for protocols intended for just such a situation, to no avail so far.) Now the client sends a message to the Proxy(NEW_DistantObject) [This NEW_DistantObject is required because I have a NEW_Connection using a NEW_Socket, and NSDistantObject does not have a usable Connection otherwise.] Say like this ... [server takeStringAndReturnString:(NSString *)someString]; The Proxy must implement methodSignatureForSelector and for now I use a method called setRootObject: to make sure the method signature is of the correct type (I can see that this is slightly different then what was required with the original PDO but for now it's a good work-around [and not a/the problem].) - (void)setRootObject:(id)rootObject { rootObj = rootObject; } - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { return [rootObj methodSignatureForSelector:aSelector]; } This validated the method signature that the proxy does not handle other then to forward the invocation to the Distant Object via the NEW_Connection's NEW_socket estsablished as described before. Up next is the - (void)forwardInvocation:(NSInvocation *)anInvocation; method. Here now one would archive the invocation for transmitting as a Data Object. To do that I use NSArchiver something like this ... NSData *archivedInvocationAsData = [NSArchiver archivedDataWithRootObject:(id)anInvocation]; Okay now I writeData: and wow guess what the data actually shows up at the Server Tool, is Unarchived with ... NSInvocation *theInvocation = [NSUnarchiver unarchiveObjectWithData:invocationAsData]; Then it is invoked with ... [theInvocation invokeWithTarget:rootObj]; Awesome it actually works to trigger an Invocation remotely (so far, in this limited way.) Clearly the simplest next step is to re-archive the invocation with it's return values etc. and send it back via ... returnInvocation = [NSArchiver archivedDataWithRootObject:theInvocation]; through the NEW_Connection's NEW_Socket (writeData:). Back at the Client it waited via readData: for the return invocation (post invoke), it then Unarchives it and would likely just replace the original invocation with the return invocation. This does not work, the NSInvocation has a return value, and that value is readible as the getReturnValue:(void *)buffer via *(id *)buffer. Even if you use retainArguments at the server side, observe 'inout' [default] definitions in the Protocol description, etc. still nothing seems to work rightas far as returning or even setting the 'return value' or changing transported arguments Arguments. Now originally on the Server side I was able to use the extremely limited getReturnValue:(void *)buffer method to get the pointer (always with a length of four). Only from a Chinese Web page did I discover that to use this value one must use *(id *)buffer to reference the NSString/NSObject there. My problem mainly is when I try to set the return value (or unarchive the return values) in an invocation I run into problems. One is suppose to use the setReturnValue:(void *)buffer method. I can use it I can observer in the debugger value inspector the values setting (there is one of ever type pointing to the same thing or something, of course Objective-C limits the access of these inner values and provides only the setReturnValue:(void *)buffer. I have yet to try a subclass that would hopefully be able to access them as public values, but this is doubtful, and suggests that NSInvocation would need Class Extensions but basically this means it's buggy and there must be a better way. Now to try and explain all the problems that occur ... To start we must go back to the NSArchiver. You see ounce I discovered these problems (possibly bugs, lake of documentation or whatever), I realized I needed a simple Bugg Application to demonstrate and simplify the problems. Unfortunately even in an Application this is kind of complicated, because on must have a proxy that can override the forwardInvocation: method etc. to achieve the most basic simulation. Well at least I have it down to one application but I still have three objects. I further have run into more difficulties seemingly from within an application instead of the original objective tools. Now first I would like to explain that within an application, and the forwardInvocation: method of a proxy, if one attempts to do this ... crashedArchiverData = [NSArchiver archivedDataWithRootObject:(id)anInvocation]; The program will crash terminated with signal 11 (SIGSEGV), a segment violation. (For seemingly no reason I can do anything about ! Any thoughts there?) In the Tool this works fine. Finally if I try to do this like the tool which does invoke similar difficulties I do have to set the return value in the client via say this simple test without sending the invocation to a remote object (even though it's not actually invoked the problems are the same)... - (void)forwardInvocation:(NSInvocation *)anInvocation { void *buffer = malloc(5); [anInvocation setReturnValue:[NSString stringWithString:@"Invocation Return Value"]]; [anInvocation getReturnValue:(void *)buffer]; NSLog([NSString stringWithFormat:@"The Value IS ... (%@)", *(id *)buffer]); } I get an result like this ... SetValueInInvocation[5942] The Value IS ... (NSCFString) ... When I setStringValue with the return value, notice it's not the actual value of the String that was set there. Why? What's wrong is it me? The strange thing is I have set it to an NSString but I get something bogus!! What's UP ?? Now I have tried everything under the 'Apple' possible and I really thing that it should work fine with the simplest form or this is designed poorly and not documented properly. Mostly they say "You should never have to do this yourself!", but of course we have to finish the job of making PDO work properly (or better) again and this is critical to a messaging language Objective-C and the need for Network savvy system in this modern connected world or it ain't worth anything (If I ever get OSX to a usable state it will have to be called a susstem, or have required another 10 months of bug reporting and maybe a couple of more year/versions for the stability and function OpenStep provided.) Next I recall trying to us the passed arguments to return values. Even with retainArguments, etc. nothing seems to work. The Archiver in the tool complains if you send more then one argument, within the Archiving of an Invocation it complains that I do not understand what type an @@ idid is!? Clearly that has not been tested beyond a single argument, and is extremely buggy and unusable. So I can imagine replacing the functionality of the Archiver by sending my own Object in the DataStream that can reproduce the return values in an invocation since that does not survive Unarchiving at all, but without the key to set the return value in a usable state. Then a call like ... [NEWPDO_ReturnString setString:[sever takeStringAndReturnAString:[NSString stringWithFormat:@"Do this action for user#%d or something", nextUserInt]]]; ERROR MESSAGE: SetValueInInvocation[5942] *** +[NSCFString length]: selector not recognized without saying *** +[NSCFString length]: selector not recognized, as far as I can tell OSX remains unusable for me, please HELP. I can send you the Bugg Demo Application Source Code (for the SetValueInInvocation.app) if you request it, the other near replacement to PDO is a little less easy to send nor do I think it is required to demonstrate the problems, and any possible solutions to the finally problems with it that seem at this point to be more problems with Apple's version of the Foundation Classes required for implementing a replacement for PDO. From OSX Developer email: osx-developer@www.com ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From finlay.dobbie at btinternet.com Sun Jan 6 04:25:03 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:09 2005 Subject: Using Image Capture framework? In-Reply-To: Message-ID: <2BDFA8CA-02A0-11D6-9080-000502319F17@btinternet.com> On Sunday, January 6, 2002, at 04:21 am, Greg Betzel wrote: > I'm looking for a "how-to" to use the Image Capture framework in OS X. > Any pointers? > > I'm trying to get program access to a camera, and it'd make things a > LOT easier if there was a way to leverage off the built-in Image > Capture Architecture (ICA). Using the Image Capture app & Apple Events > is an option, but I'd like to avoid that route if possible. Only thing I've seen is http://www.stepwise.com/SpecialCoverage/WWDC2001/403.html You might like to try the Apple USB Mailing list, I think they discuss ICA there: We are pleased to announce that we have set up a mailing list to handle Mac OS USB development questions. To subscribe to the USB mailing list, please send an email with the word "subscribe usb" as the subject field, to requests@isg.apple.com. To unsubscribe from the listserver, send an email with the word "unsubscribe usb" as the subject field to the above address. A digest option is also available. Once you have subscribed, send questions to usb@isg.apple.com. (from http://developer.apple.com/hardware/usb/devinfo.htm) -- Finlay From itrat at modeless.com Sun Jan 6 06:46:00 2002 From: itrat at modeless.com (Itrat Khan) Date: Thu Nov 3 14:48:09 2005 Subject: Can NSNotificationCenter handle 1000s of observers? Message-ID: <45CF574A-02B4-11D6-9796-000502BD88DD@modeless.com> I'm trying to understand why NSNotificationCenter's addObserver: method is taking up so much of my application's execution time. addObserver: takes considerably longer to execute as I add new observers, and Sampler says _reloadTables is where all the activity is. Does addObserver: reload the entire observer table instead of just inserting the new observer? Seems like it. Are there any tips for improving NSNotificationCenter's efficiency with large observer lists? Thanks, Itrat. .................................................................. Itrat Khan Modeless Software, Inc. http://www.modeless.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 634 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020106/388b7546/attachment.bin From stephane at sente.ch Sun Jan 6 07:09:03 2002 From: stephane at sente.ch (=?ISO-8859-1?Q?St=E9phane_Corth=E9sy?=) Date: Thu Nov 3 14:48:09 2005 Subject: Setting a folder's icon (was: Setting a file's icon) Message-ID: <57E27F12-02B7-11D6-94E9-000502AE251A@sente.ch> Hi, I wrote some time ago a little shell script to automatize setting a bundle folder's icon during the building of the bundle in PB. Copy the following script in ~/bin/, sets its executable bits (chmod a+x ~/bin/SetFolderIcon.sh), add a Shell Script build phase to your project, and invoke the script like this: Shell: /bin/sh Script: ~/bin/SetFolderIcon.sh $DSTROOT$SYMROOT/$PRODUCT_NAME.$WRAPPER_EXTENSION $SRCROOT/myIcon.icns St?phane ************* #!/bin/sh # SetFolderIcon.sh # Copyright 2002 Stephane Corthesy, stephane @ sente.ch # Usage: # SetFolderIcon.sh folder icon # where icon must be a .icns file myRez=/tmp/Icon.r format1='" $@"' format2='"%04X "' format3='"@\n"' myDest=$1 directoryImageFile=`echo Iconr | tr r "\r"` rm -rf $myRez echo "data 'icns' (-16455) {" > $myRez hexdump -v -e " $format1 8/2 $format2 $format3" $2 | tr '@' '"' >> $myRez echo '};' >> $myRez /Developer/Tools/Rez $myRez -o $myDest/$directoryImageFile /Developer/Tools/SetFile -c "MACS" -t "icon" -a V $myDest/$directoryImageFile /Developer/Tools/SetFile -a C $myDest rm -rf $myRez From s.mecklenburg at t-online.de Sun Jan 6 11:53:01 2002 From: s.mecklenburg at t-online.de (Sebastian Mecklenburg) Date: Thu Nov 3 14:48:09 2005 Subject: profiling? In-Reply-To: <8C959AD2-DAC1-11D5-A983-0050E4400131@jumpgate.com> Message-ID: hello, where does the gmon.out file go when i enable profiling? i checked the checkbox in the target options, ran the application but no gmon.out file can be found. the funny thing is, i did it once and it was easy, but it slipped my mind how i did it ;-) what do i miss? regards sebastian mecklenburg From chris at mantis-design.com Sun Jan 6 13:50:02 2002 From: chris at mantis-design.com (Chris Ruzin) Date: Thu Nov 3 14:48:09 2005 Subject: Creating an HTML or RTF file Message-ID: In my application, the user has a choice of exporting either as an RTF or HTML file. How would I go about creating an HTML or RTF file from data stored in an NSTableView in my app? Thanks, Chris From sanguish at digifix.com Sun Jan 6 16:39:00 2002 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:48:09 2005 Subject: Creating an HTML or RTF file In-Reply-To: Message-ID: On Sunday, January 6, 2002, at 04:47 PM, Chris Ruzin wrote: > In my application, the user has a choice of exporting either as an RTF > or HTML file. How would I go about creating an HTML or RTF file from > data stored in an NSTableView in my app? > > Well, in the case of RTF, you would write some code that would output your NSTableView data into an NSAttributedString, and then there are methods on that which can save the output as RTF In the case of HTML, you'll likely have to generate your own HTML, appending everything onto an NSMutableString, and then writing that out to a file. :-( From davidjclark at home.com Sun Jan 6 17:26:00 2002 From: davidjclark at home.com (davidjclark) Date: Thu Nov 3 14:48:09 2005 Subject: GetURL Apple Event Sample Code Message-ID: <6D203EFA-030D-11D6-BD08-003065C770DE@home.com> Hello, Anyone have any sample code for adding support to a cocoa app for the GetURL apple event ? TIA, David From njriley at uiuc.edu Sun Jan 6 17:44:00 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:48:09 2005 Subject: GetURL Apple Event Sample Code In-Reply-To: <6D203EFA-030D-11D6-BD08-003065C770DE@home.com>; from davidjclark@home.com on Sun, Jan 06, 2002 at 08:25:25PM -0500 References: <6D203EFA-030D-11D6-BD08-003065C770DE@home.com> Message-ID: <20020106194307.A1058824@uiuc.edu> On Sun, Jan 06, 2002 at 08:25:25PM -0500, davidjclark wrote: > Anyone have any sample code for adding support to a cocoa app for the > GetURL apple event ? Yup, just did it last week. Here it is. Get rid of the parts that mention HostLauncher (which should be coming out, one of these days...) // HostLauncher.scriptSuite: { Name = HostLauncher; AppleEventCode = "HoLS"; Commands = { "GetURL" = { CommandClass = HLGetURLScriptCommand; AppleEventCode = GURL; AppleEventClassCode = GURL; // XXX this is syntactically correct, but will produce the wrong dictionary: // getURL reference -- the object for the command // international text -- the fully-qualified URL to open // two direct objects? oops. // Arguments = { // "URL" = { AppleEventCode = "----"; Type = "NSString"; }; // }; }; "OpenURL" = { // Arguments = { // URL = { AppleEventCode = "----"; Type = NSString; }; // }; CommandClass = "HLGetURLScriptCommand"; AppleEventCode = "OURL"; AppleEventClassCode = "WWW!"; }; }; } // HostLauncher.scriptTerminology: { Name = "HostLauncher commands"; Description = "Commands to control HostLauncher"; Commands = { "GetURL" = { // XXX doesn't work, see explanation in script suite // Arguments = { // URL = { Name = URL; Description = "the fully-qualified URL to open"; }; // }; "Name" = "get URL"; "Description" = "Open a URL"; }; "OpenURL" = { // Arguments = { // URL = { Name = URL; Description = "the fully-qualified URL to open"; }; // }; "Name" = "open URL"; "Description" = "Open a URL (Internet Explorer form)"; }; }; } // // HLGetURLScriptCommand.m // HostLauncher // // Created by Nicholas Riley on Thu Dec 27 2001. // Copyright (c) 2001 Nicholas Riley. All rights reserved. // #import "HLGetURLScriptCommand.h" #import "HLCommand.h" #import "HLConnectionMethod.h" #define HLSAssert(condition, errno, desc) \ if (!(condition)) return [self scriptError: (errno) description: (desc)]; #define HLSAssert1(condition, errno, desc, arg1) \ if (!(condition)) return [self scriptError: (errno) description: \ [NSString stringWithFormat: (desc), (arg1)]]; @implementation HLGetURLScriptCommand - (id)scriptError:(int)errorNumber description:(NSString *)description { [self setScriptErrorNumber: errorNumber]; [self setScriptErrorString: description]; return nil; } // Perform somewhat redundant checks here. // The NSScriptClassDescription should do this as well, but there may be // pathological cases where it is unable to do so, someone has modified // the script suite, etc. - (id)performDefaultImplementation { NSString *command = [[self commandDescription] commandName]; NSString *verb; NSString *urlString = [self directParameter]; NSURL *url; HLConnectionMethod *method; // XXX should be read from .scriptTerminology, but Cocoa provides no way to do this if ([command isEqualToString: @"GetURL"]) { verb = @"get URL"; } else if ([command isEqualToString: @"OpenURL"]) { verb = @"open URL"; } HLSAssert1(verb != nil, errAEEventNotHandled, @"HostLauncher does not respond to R%@S.", command); // XXX should ignore arguments instead, if the GURL/OURL is coming from a Web browser? HLSAssert1([self arguments] == nil || [[self arguments] count] == 0, errAEParamMissed, @"CanUt handle arguments for %@", verb); HLSAssert(urlString != nil, errAEParamMissed, @"No URL to open was specified."); url = [NSURL URLWithString: urlString]; // XXX CFURLCreateStringByAddingPercentEscapes is more permissive // wrt URL formats; may want to use it instead (see release notes) HLSAssert(url != nil, kURLInvalidURLError, @"URL format is invalid; must be fully qualified (scheme://host...)."); method = [HLConnectionMethod methodForURL: url]; HLSAssert1(method != nil, kURLUnsupportedSchemeError, @"URL scheme '%@' not supported", [url scheme]); HLSAssert1([method invoke], kURLExtensionFailureError, @"Unable to connect with URL R%@S", url); return nil; } @end -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From chamlin at optonline.net Sun Jan 6 18:47:59 2002 From: chamlin at optonline.net (Christopher B Hamlin) Date: Thu Nov 3 14:48:09 2005 Subject: NSClipView's -setBoundsSize changing the origin too? Message-ID: <7E35F230-0318-11D6-97BA-003065F52526@optonline.net> Hi, I'm trying to do zooming on a view that is in an NSScrollView. I think I've got a decent idea: scale the content view's bounds. But . . . In the NSView documentation, it says: ==== You can also set the parts of the bounds rectangle independently, using setBoundsOrigin: and setBoundsSize:. ==== So in my zooming-up action (where theScrollView is an outlet to the NSScrollView) I did this: ==== -(IBAction)magUp:(id)sender { NSRect myBounds; myBounds = [[theScrollView contentView] bounds]; if (1) NSLog (@"In magUp: content bounds is (%f,%f), %f wide, %f high)\n", myBounds.origin.x, myBounds.origin.y, myBounds.size.width, myBounds.size.height); [[theScrollView contentView] setBoundsSize:NSMakeSize(0.8*myBounds.size.width, 0.8*myBounds.size.height)]; myBounds = [[theScrollView contentView] bounds]; if (1) NSLog (@"Out magUp: content bounds is (%f,%f), %f wide, %f high)\n", myBounds.origin.x, myBounds.origin.y, myBounds.size.width, myBounds.size.height); [theView setNeedsDisplay:YES]; return; } ===== and got this: ===== 2002-01-06 13:29:53.583 viewer[358] In magUp: content bounds is (-670.000000,0.000000), 530.000000 wide, 405.000000 high) 2002-01-06 13:29:53.583 viewer[358] Out magUp: content bounds is (-536.000000,0.000000), 424.000000 wide, 324.000000 high) ==== which seems to say that the origin has moved as well (by the same factor). The y coordinate changes too when it is non-zero. What I see when I run the application is a moving origin. NSClipView doesn't say anything about setBoundsSize being different from NSView. If I save and reset the origin after the zoom then it works as I expected. The view is zoomed out or in with the upper-left corner point staying put. I feel I'm missing something easy, but have no idea what it could be. Shouldn't I be able to open up (or close down) the content view to zoom? Or if not, what's the best way to do this? Thanks for any ideas, Chris Hamlin From kaelin at acm.org Sun Jan 6 19:22:01 2002 From: kaelin at acm.org (Kaelin Colclasure) Date: Thu Nov 3 14:48:09 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: Message-ID: On 1/5/02 9:17 AM, "Chris Hanson" wrote: > At 5:56 PM -0800 1/4/02, Kaelin Colclasure wrote: >> But NSFileHandle appears to have the >> methods for listening for incoming connections, while NSSocketPort would >> seem to be the socket wrapper class I'm looking for. How are these >> classes used together? > > They aren't. You might think NSSocketPort is a BSD socket > abstraction thanks to Apple's poor choice of names, but it's not -- > it's actually a type of NSPort that lets you do distributed objects > over TCP. Speaking of... What precisely is the status of the distributed objects system anyway? At least one poster here has asserted that it's broken under Mac OS X and that Apple doesn't plan to support it... > You can use the BSD socket() call to create an endpoint and then hand > it to an NSFileHandle to manage. It'd be nice if Apple would just > add a couple more class methods and initializers so you could create > an NSFileHandle configured to listen on a particular local port, or > configured to connect to a remote port, and so on given how common a > request this is. (Perhaps it's time to file a feature request in the > bug tracking system.) Ah, well a category seems not to do too bad a job of providing the needed methods: @interface NSFileHandle (Socket) + (id) socketWithHost: (NSString *) host service: (NSString *) service type: (int) type; - (void) listen: (int) backlog; @end Initially I thought of subclassing NSFileHandle, but this didn't work at all. Then I figured out that there is some undocumented class that gets created when you ask for an NSFileHandle. It would be nice to know why, exactly, since I can readily imagine wanting to add some state to implement a more complete socket wrapper class, and categories cannot (readily) add state to the class they extend. Another "mystery of the Foundation" is the NSRunLoop method -configureAsServer. The documentation on this one is just wonderful. :-) Any one have a little more insightful description they could offer? Overall, I really like how Foundation event handling is put together. There do seem to be a few methods missing though. Most significantly, I did not see any provision for getting a notification when a file descriptor was ready for writing. This omission is no big deal for most client-side code (unless you want to do a non-blocking connect of course), but it's a real handicap for daemon/server stuff. And since there's no documentation of the Foundation class internals, I don't see any easy way to fix an issue like this with a category, or even by substituting my own run loop class... -- Kaelin From resistor at mac.com Sun Jan 6 19:30:58 2002 From: resistor at mac.com (Owen Andertson) Date: Thu Nov 3 14:48:09 2005 Subject: Random Number Generation Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I need to generate a random number between 0 and 6. The rand() function does not offer any options for setting the range. Is there any alternative method? Owen Anderson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE8ORZFSn3yKRPsTxoRAgSGAKC0oIwsGvs/URfjyeeEO0l11et3CgCgkY03 Q1P/xeJIWEX/L7i5NvBz7jo= =NLLJ -----END PGP SIGNATURE----- From timmy at wunderbear.com Sun Jan 6 19:35:02 2002 From: timmy at wunderbear.com (Timothy Wayper) Date: Thu Nov 3 14:48:09 2005 Subject: Random Number Generation In-Reply-To: Message-ID: <5.1.0.14.0.20020107163708.02f3eb00@mail.wunderbear.com> At 10:30 PM 1/6/2002 -0500, Owen Andertson wrote: >I need to generate a random number between 0 and 6. The rand() function >does not offer any options for setting the range. Is there any >alternative method? rand() % 7 ______________________________________________________________________ Timothy Wayper Wunderbear Software From osx-developer at www.com Sun Jan 6 22:02:01 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:09 2005 Subject: PDO Replacement Attempts, or How to setReturnValue: in an Message-ID: <200201070600.g0760fj12231@mail18.bigmailbox.com> For the record I have figured out at least enough of this problem to get to the next set of problems. The solution is fairly complicated and due to the difficulty I went through (so far) in partly replacing PDO I am not going to bore you with it here now. Private inquiries as to the partial solution are welcome, if desired. Thanks for listening. My next post comtinues the problems to do with prebinding the framework with the NEW_PDO and it's related errors, and failed execution! (So the solution is still not totally viable, yet.) ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From osx-developer at www.com Sun Jan 6 23:30:02 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:10 2005 Subject: NEW_PDO Framework prebinding errors, and execution failure from inside a cgi-bin Message-ID: <200201070728.g077SaO08912@mail24.bigmailbox.com> These are the warnings, relating to the prebinding of my replacement PDO (Portable Distributed Objects) System. /usr/bin/ld: warning prebinding disabled because (__PAGEZERO segment (address = 0x0 size = 0x1000) of /var/root/Development/NEW_PDO_Zone/NEW_PDO_System/NEW_PDO_Hub/build/NEW_PDO_Hub overlaps with __TEXT segment (address = 0x0 size = 0x4000) of /private/var/root/Library/Frameworks/MD_PDO.framework/Versions/A/MD_PDO /usr/bin/ld: warning prebinding disabled because (__TEXT segment (address = 0x1000 size = 0x4000) of /var/root/Development/NEW_PDO_Zone/NEW_PDO_System/NEW_PDO_Hub/build/NEW_PDO_Hub overlaps with __TEXT segment (address = 0x0 size = 0x4000) of /private/var/root/Library/Frameworks/MD_PDO.framework/Versions/A/MD_PDO /usr/bin/ld: warning prebinding disabled because (__TEXT segment (address = 0x1000 size = 0x4000) of /var/root/Development/NEW_PDO_Zone/NEW_PDO_System/NEW_PDO_Hub/build/NEW_PDO_Hub overlaps with __DATA segment (address = 0x4000 size = 0x1000) of /private/var/root/Library/Frameworks/MD_PDO.framework/Versions/A/MD_PDO /usr/bin/ld: warning prebinding disabled because (__DATA segment (address = 0x5000 size = 0x1000) of /var/root/Development/NEW_PDO_Zone/NEW_PDO_System/NEW_PDO_Hub/build/NEW_PDO_Hub overlaps with __OBJC segment (address = 0x5000 size = 0x1000) of /private/var/root/Library/Frameworks/MD_PDO.framework/Versions/A/MD_PDO /usr/bin/ld: warning prebinding disabled because (__OBJC segment (address = 0x6000 size = 0x1000) of /var/root/Development/NEW_PDO_Zone/NEW_PDO_System/NEW_PDO_Hub/build/NEW_PDO_Hub overlaps with __LINKEDIT segment (address = 0x6000 size = 0x26000) of /private/var/root/Library/Frameworks/MD_PDO.framework/Versions/A/MD_PDO /usr/bin/ld: warning prebinding disabled because (__LINKEDIT segment (address = 0x7000 size = 0xe000) of /var/root/Development/NEW_PDO_Zone/NEW_PDO_System/NEW_PDO_Hub/build/NEW_PDO_Hub overlaps with __LINKEDIT segment (address = 0x6000 size = 0x26000) of /private/var/root/Library/Frameworks/MD_PDO.framework/Versions/A/MD_PDO What is the problem now? I have done the 'update_prebinding -root /' command twice no difference when compiling, to the framework put into the /Library/Frameworks folder. I have tried -prebind linker flag but that seems to have a switch now, even though I never see it in the ProjectBuilder output. The update_prebinding results are shown below, I ran it twice. It seems 3 items needed to be re-prebound. This does not seemed to help with the later problem, but suggests some other ones exist. Is this normal results or is there some problems. I noticed something with OpenBase but that I will have to ask them I suppose. [SCROLL to the next line of stars, maybe I should have omitted this part sorry.] *********************************************************************** [machine_name:/tmp] root# ; update_prebinding -root / 2002-01-06 20:43:21.382 update_prebinding[1171] Start of update_prebinding 2002-01-06 20:43:21.386 update_prebinding[1171] Search system for executables/libraries that also need changing 2002-01-06 20:43:24.153 update_prebinding[1171] Scanning disk 2002-01-06 20:43:27.472 update_prebinding[1171] Scanning disk 2002-01-06 20:43:30.103 update_prebinding[1171] Scanning disk 2002-01-06 20:43:32.932 update_prebinding[1171] Scanning disk 2002-01-06 20:43:36.939 update_prebinding[1171] Scanning disk 2002-01-06 20:43:40.799 update_prebinding[1171] Scanning disk 2002-01-06 20:43:43.437 update_prebinding[1171] Scanning disk 2002-01-06 20:43:45.399 update_prebinding[1171] Scanning disk 2002-01-06 20:43:46.844 update_prebinding[1171] Scanning disk 2002-01-06 20:43:47.546 update_prebinding[1171] Scanning disk 2002-01-06 20:43:51.157 update_prebinding[1171] Scanning disk 2002-01-06 20:43:51.987 update_prebinding[1171] Scanning disk 2002-01-06 20:43:52.830 update_prebinding[1171] Scanning disk 2002-01-06 20:43:55.714 update_prebinding[1171] Scanning disk 2002-01-06 20:43:57.967 update_prebinding[1171] Scanning disk 2002-01-06 20:43:59.129 update_prebinding[1171] Scanning disk 2002-01-06 20:44:03.209 update_prebinding[1171] Scanning disk 2002-01-06 20:44:04.315 update_prebinding[1171] Scanning disk update_prebinding (finding dependent libraries for /Library/OpenBase/Developer/Interfaces/OpenBaseAPI/Mach-OLib/OpenBaseLib/OpenBaseAPI-C.Mach-O.Lib): string table not at the end of the file (can't be processed) in file: /Library/OpenBase/Developer/Interfaces/OpenBaseAPI/Mach-OLib/OpenBaseLib/OpenBaseAPI-C.Mach-O.Lib(<nfs -1000>:Network:Developer:OpenBase:Interfaces:OpenBase Mach-O:OpenBase Mach-O:OpenBaseClient Source:CommAPI.c) 2002-01-06 20:44:06.554 update_prebinding[1171] Scanning disk 2002-01-06 20:44:09.622 update_prebinding[1171] Scanning disk 2002-01-06 20:44:12.284 update_prebinding[1171] Scanning disk 2002-01-06 20:44:14.659 update_prebinding[1171] Scanning disk 2002-01-06 20:44:17.576 update_prebinding[1171] Scanning disk 2002-01-06 20:44:19.778 update_prebinding[1171] Scanning disk 2002-01-06 20:44:21.236 update_prebinding[1171] Scanning disk 2002-01-06 20:44:22.781 update_prebinding[1171] Scanning disk 2002-01-06 20:44:24.302 update_prebinding[1171] Scanning disk 2002-01-06 20:44:25.901 update_prebinding[1171] Scanning disk 2002-01-06 20:44:27.691 update_prebinding[1171] Scanning disk 2002-01-06 20:44:31.229 update_prebinding[1171] Scanning disk 2002-01-06 20:44:33.836 update_prebinding[1171] Scanning disk 2002-01-06 20:44:37.098 update_prebinding[1171] Scanning disk 2002-01-06 20:44:41.338 update_prebinding[1171] Scanning disk 2002-01-06 20:44:43.348 update_prebinding[1171] Scanning disk 2002-01-06 20:44:45.778 update_prebinding[1171] Scanning disk 2002-01-06 20:44:47.786 update_prebinding[1171] Scanning disk 2002-01-06 20:44:50.443 update_prebinding[1171] Scanning disk 2002-01-06 20:44:52.687 update_prebinding[1171] Scanning disk 2002-01-06 20:44:54.445 update_prebinding[1171] Scanning disk 2002-01-06 20:44:56.975 update_prebinding[1171] Scanning disk 2002-01-06 20:44:59.721 update_prebinding[1171] Scanning disk 2002-01-06 20:45:01.783 update_prebinding[1171] Scanning disk 2002-01-06 20:45:04.016 update_prebinding[1171] Scanning disk 2002-01-06 20:45:06.260 update_prebinding[1171] Scanning disk 2002-01-06 20:45:10.694 update_prebinding[1171] Scanning disk 2002-01-06 20:45:12.767 update_prebinding[1171] Scanning disk 2002-01-06 20:45:14.488 update_prebinding[1171] Scanning disk 2002-01-06 20:45:16.519 update_prebinding[1171] Scanning disk 2002-01-06 20:45:19.637 update_prebinding[1171] Scanning disk 2002-01-06 20:45:22.455 update_prebinding[1171] Scanning disk 2002-01-06 20:45:25.403 update_prebinding[1171] Scanning disk 2002-01-06 20:45:27.937 update_prebinding[1171] Scanning disk 2002-01-06 20:45:33.098 update_prebinding[1171] Scanning disk 2002-01-06 20:45:37.428 update_prebinding[1171] Scanning disk 2002-01-06 20:45:41.167 update_prebinding[1171] Scanning disk 2002-01-06 20:45:44.267 update_prebinding[1171] Scanning disk 2002-01-06 20:45:46.411 update_prebinding[1171] Scanning disk 2002-01-06 20:45:48.324 update_prebinding[1171] Scanning disk 2002-01-06 20:45:49.280 update_prebinding[1171] Scanning disk 2002-01-06 20:45:50.856 update_prebinding[1171] Scanning disk 2002-01-06 20:45:51.834 update_prebinding[1171] Scanning disk 2002-01-06 20:45:52.013 update_prebinding[1171] end search 2002-01-06 20:45:52.180 update_prebinding[1171] Prebinding files There are 1972 total files that may need to be re-prebound. 2002-01-06 20:45:53.108 update_prebinding[1171] Prebinding files (20 of 1972) 2002-01-06 20:45:57.295 update_prebinding[1171] Prebinding files (40 of 1972) 2002-01-06 20:46:03.443 update_prebinding[1171] Prebinding files (60 of 1972) 2002-01-06 20:46:04.559 update_prebinding[1171] Prebinding files (80 of 1972) 2002-01-06 20:46:06.511 update_prebinding[1171] Prebinding files (100 of 1972) 2002-01-06 20:46:17.491 update_prebinding[1171] Prebinding files (120 of 1972) 2002-01-06 20:46:23.864 update_prebinding[1171] Prebinding files (140 of 1972) update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos4.framework/Versions/A/Kerberos4:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosWrappers.framework/Versions/A/KerberosWrappers:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. 2002-01-06 20:46:25.339 update_prebinding[1171] Prebinding files (160 of 1972) 2002-01-06 20:46:27.997 update_prebinding[1171] Prebinding files (180 of 1972) 2002-01-06 20:46:31.322 update_prebinding[1171] Prebinding files (200 of 1972) 2002-01-06 20:46:43.227 update_prebinding[1171] Prebinding files (220 of 1972) update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_strncmp defined in: /System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty and in //usr/lib/libSystem.B.dylib(strncmp.o)) (for architecture ppc). update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd:library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/mmalloc.framework/Versions/A/mmalloc. update_prebinding: redo_prebinding on /usr/libexec/binutils/size:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 20:46:47.545 update_prebinding[1171] Prebinding files (240 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Sherlock.app/Contents/MacOS/Sherlock:can't open file: //System/Library/PrivateFrameworks/CFNetwork.framework/Versions/A/CFNetwork (No such file or directory). 2002-01-06 20:46:51.147 update_prebinding[1171] Prebinding files (260 of 1972) update_prebinding: redo_prebinding on /usr/bin/testprns:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/testprns and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:46:57.766 update_prebinding[1171] Prebinding files (280 of 1972) 2002-01-06 20:47:06.836 update_prebinding[1171] Prebinding files (300 of 1972) update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClient.framework/Versions/A/KClient:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos4.framework/Versions/A/Kerberos4 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/CredentialsCache.framework/Versions/A/CredentialsCache. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClientDeprecated.framework/Versions/A/KClientDeprecated:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos4.framework/Versions/A/Kerberos4 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/CredentialsCache.framework/Versions/A/CredentialsCache. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClientCompat.framework/Versions/A/KClientCompat:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClient.framework/Versions/A/KClient (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosDES.framework/Versions/A/KerberosDES. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/GSS.framework/Versions/A/GSS:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLoginServer.framework/Versions/A/KerberosLoginServer:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /usr/lib/libkrb4.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:47:16.419 update_prebinding[1171] Prebinding files (320 of 1972) 2002-01-06 20:47:17.336 update_prebinding[1171] Prebinding files (340 of 1972) 2002-01-06 20:47:20.832 update_prebinding[1171] Prebinding files (360 of 1972) 2002-01-06 20:47:22.314 update_prebinding[1171] Prebinding files (380 of 1972) 2002-01-06 20:47:24.250 update_prebinding[1171] Prebinding files (400 of 1972) 2002-01-06 20:47:45.641 update_prebinding[1171] Prebinding files (420 of 1972) 2002-01-06 20:47:48.575 update_prebinding[1171] Prebinding files (440 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Disk Utility.app/Contents/MacOS/Disk Utility:can't open file: //System/Library/PrivateFrameworks/DiskManager.framework/Versions/A/DiskManager (No such file or directory). 2002-01-06 20:47:51.004 update_prebinding[1171] Prebinding files (460 of 1972) 2002-01-06 20:47:53.826 update_prebinding[1171] Prebinding files (480 of 1972) update_prebinding: redo_prebinding on /usr/bin/nmblookup:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/nmblookup and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:47:55.975 update_prebinding[1171] Prebinding files (500 of 1972) 2002-01-06 20:48:05.223 update_prebinding[1171] Prebinding files (520 of 1972) update_prebinding: redo_prebinding on /usr/bin/myisamchk:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/myisamchk and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:48:10.090 update_prebinding[1171] Prebinding files (540 of 1972) 2002-01-06 20:48:13.289 update_prebinding[1171] Prebinding files (560 of 1972) 2002-01-06 20:48:15.646 update_prebinding[1171] Prebinding files (580 of 1972) 2002-01-06 20:48:18.707 update_prebinding[1171] Prebinding files (600 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/addr2line:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 20:48:28.212 update_prebinding[1171] Prebinding files (620 of 1972) 2002-01-06 20:48:32.246 update_prebinding[1171] Prebinding files (640 of 1972) 2002-01-06 20:48:36.462 update_prebinding[1171] Prebinding files (660 of 1972) 2002-01-06 20:48:41.402 update_prebinding[1171] Prebinding files (680 of 1972) 2002-01-06 20:48:45.278 update_prebinding[1171] Prebinding files (700 of 1972) update_prebinding: redo_prebinding on /sbin/rrestore:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_panic defined in: /sbin/rrestore and in //usr/lib/libSystem.B.dylib(panic.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/make_unicodemap:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/make_unicodemap and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:48:55.333 update_prebinding[1171] Prebinding files (720 of 1972) 2002-01-06 20:48:56.857 update_prebinding[1171] Prebinding files (740 of 1972) update_prebinding: redo_prebinding on /usr/libexec/mysqld:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/libexec/mysqld and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:49:00.176 update_prebinding[1171] Prebinding files (760 of 1972) update_prebinding: redo_prebinding on /usr/bin/myisamlog:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/myisamlog and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/myisampack:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/myisampack and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/resolve_stack_dump:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/resolve_stack_dump and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:49:01.756 update_prebinding[1171] Prebinding files (780 of 1972) 2002-01-06 20:49:02.883 update_prebinding[1171] Prebinding files (800 of 1972) 2002-01-06 20:49:18.184 update_prebinding[1171] Prebinding files (820 of 1972) update_prebinding: redo_prebinding on /usr/bin/make_printerdef:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/make_printerdef and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:49:21.376 update_prebinding[1171] Prebinding files (840 of 1972) update_prebinding: redo_prebinding on /usr/sbin/smbd:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/sbin/smbd and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:49:24.548 update_prebinding[1171] Prebinding files (860 of 1972) update_prebinding: redo_prebinding on /usr/bin/isamlog:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/isamlog and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/lib/libcom_err.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:49:29.010 update_prebinding[1171] Prebinding files (880 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/ColorSync Utility.app/Contents/MacOS/ColorSync Utility:prebinding can't be redone for: /Applications_10-0-4/Utilities/ColorSync Utility.app/Contents/MacOS/ColorSync Utility (for architecture ppc) because larger updated load commands do not fit (the program must be relinked). 2002-01-06 20:49:30.446 update_prebinding[1171] Prebinding files (900 of 1972) 2002-01-06 20:49:42.241 update_prebinding[1171] Prebinding files (920 of 1972) 2002-01-06 20:49:48.507 update_prebinding[1171] Prebinding files (940 of 1972) 2002-01-06 20:49:51.346 update_prebinding[1171] Prebinding files (960 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Directory Setup.app/Contents/MacOS/Directory Setup:can't open file: //System/Library/PrivateFrameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (No such file or directory). update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/NetInfo Manager.app/Contents/MacOS/NetInfo Manager:prebinding can't be redone for: /Applications_10-0-4/Utilities/NetInfo Manager.app/Contents/MacOS/NetInfo Manager (for architecture ppc) because larger updated load commands do not fit (the program must be relinked). 2002-01-06 20:49:57.628 update_prebinding[1171] Prebinding files (980 of 1972) update_prebinding: redo_prebinding on /Developer/Applications/MRJAppBuilder.app/Contents/MacOS/MRJAppBuilder:library: //System/Library/Frameworks/JavaVM.framework/Versions/1.3/Libraries/libappshell.dylib (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM. update_prebinding: redo_prebinding on /usr/libexec/binutils/nm:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 20:50:02.166 update_prebinding[1171] Prebinding files (1000 of 1972) update_prebinding: redo_prebinding on /usr/bin/klist:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /Applications_10-0-4/Address Book.app/Contents/MacOS/Address Book:can't open file: //System/Library/PrivateFrameworks/Mail.framework/Versions/B/Mail (No such file or directory). update_prebinding: redo_prebinding on /usr/bin/smbpasswd:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbpasswd and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:50:12.946 update_prebinding[1171] Prebinding files (1020 of 1972) 2002-01-06 20:50:16.000 update_prebinding[1171] Prebinding files (1040 of 1972) 2002-01-06 20:50:20.214 update_prebinding[1171] Prebinding files (1060 of 1972) update_prebinding: redo_prebinding on /usr/lib/libkrb5.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /usr/lib/libgssapi_krb5.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:50:23.813 update_prebinding[1171] Prebinding files (1080 of 1972) update_prebinding: redo_prebinding on /usr/bin/my_print_defaults:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/my_print_defaults and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:50:27.033 update_prebinding[1171] Prebinding files (1100 of 1972) 2002-01-06 20:50:42.831 update_prebinding[1171] Prebinding files (1120 of 1972) update_prebinding: redo_prebinding on /usr/bin/make_smbcodepage:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/make_smbcodepage and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:50:46.443 update_prebinding[1171] Prebinding files (1140 of 1972) update_prebinding: redo_prebinding on /usr/lib/libdes524.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:50:47.585 update_prebinding[1171] Prebinding files (1160 of 1972) 2002-01-06 20:50:52.287 update_prebinding[1171] Prebinding files (1180 of 1972) 2002-01-06 20:50:52.957 update_prebinding[1171] Prebinding files (1200 of 1972) update_prebinding: redo_prebinding on /System/Library/Assistants/Setup.assistant/Resources/Security.bundle/Resources/regressAPIs:prebinding can't be redone for: /System/Library/Assistants/Setup.assistant/Resources/Security.bundle/Resources/regressAPIs (for architecture ppc) because of undefined symbols: _CFArrayCreate _CFDataGetBytePtr _CFDataGetLength _CFDictionaryCreateMutable _CFDictionarySetValue _CFPropertyListCreateXMLData _CFRelease _CFStringCreateWithCString ___CFStringMakeConstantString _kCFCopyStringDictionaryKeyCallBacks _kCFTypeArrayCallBacks _kCFTypeDictionaryValueCallBacks . 2002-01-06 20:51:03.481 update_prebinding[1171] Prebinding files (1220 of 1972) update_prebinding: redo_prebinding on /usr/bin/smbcontrol:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbcontrol and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:51:07.433 update_prebinding[1171] Prebinding files (1240 of 1972) update_prebinding: redo_prebinding on /Applications/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs:prebinding can't be redone for: /Applications/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs (for architecture ppc) because of undefined symbols: _CFArrayCreate _CFDataGetBytePtr _CFDataGetLength _CFDictionaryCreateMutable _CFDictionarySetValue _CFPropertyListCreateXMLData _CFRelease _CFStringCreateWithCString ___CFStringMakeConstantString _kCFCopyStringDictionaryKeyCallBacks _kCFTypeArrayCallBacks _kCFTypeDictionaryValueCallBacks . update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs:prebinding can't be redone for: /Applications_10-0-4/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs (for architecture ppc) because of undefined symbols: _CFArrayCreate _CFDataGetBytePtr _CFDataGetLength _CFDictionaryCreateMutable _CFDictionarySetValue _CFPropertyListCreateXMLData _CFRelease _CFStringCreateWithCString ___CFStringMakeConstantString _kCFCopyStringDictionaryKeyCallBacks _kCFTypeArrayCallBacks _kCFTypeDictionaryValueCallBacks . 2002-01-06 20:51:12.114 update_prebinding[1171] Prebinding files (1260 of 1972) update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/readline.framework/Versions/A/readline:library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/mmalloc.framework/Versions/A/mmalloc. 2002-01-06 20:51:14.566 update_prebinding[1171] Prebinding files (1280 of 1972) update_prebinding: redo_prebinding on /usr/bin/config:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_connect defined in: /usr/bin/config and in //usr/lib/libSystem.B.dylib(connect.o)) (for architecture ppc). update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/opcodes.framework/Versions/A/opcodes:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. update_prebinding: redo_prebinding on /usr/libexec/gdb/gdb-i386-apple-macos10:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 20:51:18.042 update_prebinding[1171] Prebinding files (1300 of 1972) 2002-01-06 20:51:32.883 update_prebinding[1171] Prebinding files (1320 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Internet Connect.app/Contents/MacOS/Internet Connect:can't open file: //System/Library/PrivateFrameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (No such file or directory). 2002-01-06 20:51:34.018 update_prebinding[1171] Prebinding files (1340 of 1972) update_prebinding: redo_prebinding on /usr/bin/compileHelp:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_errors defined in: /usr/bin/compileHelp and in //usr/lib/libSystem.B.dylib(error_codes.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/lib/libMallocDebug.A.dylib:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_NXDefaultMallocZone defined in: /usr/lib/libMallocDebug.A.dylib and in //usr/lib/libSystem.B.dylib(zone.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/rpcclient:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/rpcclient and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/testparm:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/testparm and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:51:35.977 update_prebinding[1171] Prebinding files (1360 of 1972) 2002-01-06 20:51:41.322 update_prebinding[1171] Prebinding files (1380 of 1972) 2002-01-06 20:51:45.565 update_prebinding[1171] Prebinding files (1400 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/objdump:library: //System/Library/PrivateFrameworks/opcodes.framework/Versions/A/opcodes (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd. 2002-01-06 20:51:55.132 update_prebinding[1171] Prebinding files (1420 of 1972) update_prebinding: redo_prebinding on /usr/lib/libk5crypto.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:52:00.881 update_prebinding[1171] Prebinding files (1440 of 1972) update_prebinding: redo_prebinding on /usr/bin/kpasswd:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:52:03.953 update_prebinding[1171] Prebinding files (1460 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/objcopy:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. update_prebinding: redo_prebinding on /usr/bin/resolveip:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/resolveip and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:52:05.175 update_prebinding[1171] Prebinding files (1480 of 1972) 2002-01-06 20:52:07.158 update_prebinding[1171] Prebinding files (1500 of 1972) update_prebinding: redo_prebinding on /usr/sbin/nmbd:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/sbin/nmbd and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:52:18.148 update_prebinding[1171] Prebinding files (1520 of 1972) 2002-01-06 20:52:20.629 update_prebinding[1171] Prebinding files (1540 of 1972) 2002-01-06 20:52:23.619 update_prebinding[1171] Prebinding files (1560 of 1972) update_prebinding: redo_prebinding on /var/root/Development/OpenUp-2.2-source/zip:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_errors defined in: /var/root/Development/OpenUp-2.2-source/zip and in //System/Library/Frameworks/System.framework/Versions/B/System(error_codes.o)) (for architecture ppc). 2002-01-06 20:52:25.202 update_prebinding[1171] Prebinding files (1580 of 1972) update_prebinding: redo_prebinding on /usr/bin/smbspool:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbspool and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/smbstatus:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbstatus and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:52:28.693 update_prebinding[1171] Prebinding files (1600 of 1972) update_prebinding: redo_prebinding on /Library/Receipts/InstallerUpdate1.0.pkg/Contents/Resources/GestaltTool:dynamic shared library: //System/Library/Frameworks/Carbon.framework/Versions/A/Carbon has the wrong CPU type for: /Library/Receipts/InstallerUpdate1.0.pkg/Contents/Resources/GestaltTool (architecture i386). update_prebinding: redo_prebinding on /usr/bin/pack_isam:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/pack_isam and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:52:43.304 update_prebinding[1171] Prebinding files (1620 of 1972) update_prebinding: redo_prebinding on /usr/bin/perror:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/perror and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/smbcacls:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbcacls and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:52:48.151 update_prebinding[1171] Prebinding files (1640 of 1972) update_prebinding: redo_prebinding on /usr/bin/replace:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/replace and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/isamchk:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/isamchk and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:52:52.551 update_prebinding[1171] Prebinding files (1660 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/cxxfilt:library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/mmalloc.framework/Versions/A/mmalloc. 2002-01-06 20:52:57.951 update_prebinding[1171] Prebinding files (1680 of 1972) 2002-01-06 20:52:59.940 update_prebinding[1171] Prebinding files (1700 of 1972) 2002-01-06 20:53:12.232 update_prebinding[1171] Prebinding files (1720 of 1972) update_prebinding: redo_prebinding on /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool:dynamic shared library: //System/Library/Frameworks/Carbon.framework/Versions/A/Carbon has the wrong CPU type for: /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool (architecture i386). update_prebinding: redo_prebinding on /usr/libexec/binutils/strings:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 20:53:15.984 update_prebinding[1171] Prebinding files (1740 of 1972) 2002-01-06 20:53:17.887 update_prebinding[1171] Prebinding files (1760 of 1972) update_prebinding: redo_prebinding on /sbin/restore:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_panic defined in: /sbin/restore and in //usr/lib/libSystem.B.dylib(panic.o)) (for architecture ppc). 2002-01-06 20:53:20.750 update_prebinding[1171] Prebinding files (1780 of 1972) update_prebinding: redo_prebinding on /usr/bin/kinit:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:53:25.144 update_prebinding[1171] Prebinding files (1800 of 1972) 2002-01-06 20:53:37.339 update_prebinding[1171] Prebinding files (1820 of 1972) 2002-01-06 20:53:40.031 update_prebinding[1171] Prebinding files (1840 of 1972) 2002-01-06 20:53:42.418 update_prebinding[1171] Prebinding files (1860 of 1972) 2002-01-06 20:53:43.850 update_prebinding[1171] Prebinding files (1880 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access:prebinding can't be redone for: /Applications_10-0-4/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access (for architecture ppc) because of undefined symbols: _KCDispatch _locate__Q28Security12HandleObjectUlQ38Security12HandleObject10LocateModel . update_prebinding: redo_prebinding on /usr/sbin/swat:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/sbin/swat and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:53:50.602 update_prebinding[1171] Prebinding files (1900 of 1972) update_prebinding: redo_prebinding on /usr/bin/smbclient:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbclient and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/comp_err:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/comp_err and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 20:54:00.514 update_prebinding[1171] Prebinding files (1920 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Applet Launcher.app/Contents/MacOS/Applet Launcher:library: //System/Library/Frameworks/JavaVM.framework/Versions/1.3/Libraries/libappshell.dylib (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM. update_prebinding: redo_prebinding on /usr/bin/kdestroy:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:54:05.760 update_prebinding[1171] Prebinding files (1940 of 1972) update_prebinding: redo_prebinding on /usr/libexec/gdb/gdb-powerpc-apple-macos10:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 20:54:12.619 update_prebinding[1171] Prebinding files (1960 of 1972) Number of non-prebound files: ; 0 Number of files that may need to be re-prebound : ; 1972 Number of files re-prebound: 3 Number of files unsuccessfully prebound: ; 83 2002-01-06 20:54:22.845 update_prebinding[1171] update_prebinding done. 2002-01-06 20:54:22.846 update_prebinding[1171] End of update_prebinding [machine_name:/tmp] root# !! update_prebinding -root / 2002-01-06 20:55:34.790 update_prebinding[1244] Start of update_prebinding 2002-01-06 20:55:34.794 update_prebinding[1244] Search system for executables/libraries that also need changing 2002-01-06 20:55:37.195 update_prebinding[1244] Scanning disk 2002-01-06 20:55:39.800 update_prebinding[1244] Scanning disk 2002-01-06 20:55:41.623 update_prebinding[1244] Scanning disk 2002-01-06 20:55:43.773 update_prebinding[1244] Scanning disk 2002-01-06 20:55:47.311 update_prebinding[1244] Scanning disk 2002-01-06 20:55:50.675 update_prebinding[1244] Scanning disk 2002-01-06 20:55:53.677 update_prebinding[1244] Scanning disk 2002-01-06 20:55:55.886 update_prebinding[1244] Scanning disk 2002-01-06 20:55:57.505 update_prebinding[1244] Scanning disk 2002-01-06 20:55:58.524 update_prebinding[1244] Scanning disk 2002-01-06 20:56:01.545 update_prebinding[1244] Scanning disk 2002-01-06 20:56:02.413 update_prebinding[1244] Scanning disk 2002-01-06 20:56:03.292 update_prebinding[1244] Scanning disk 2002-01-06 20:56:06.143 update_prebinding[1244] Scanning disk 2002-01-06 20:56:08.991 update_prebinding[1244] Scanning disk 2002-01-06 20:56:10.194 update_prebinding[1244] Scanning disk 2002-01-06 20:56:14.134 update_prebinding[1244] Scanning disk 2002-01-06 20:56:15.301 update_prebinding[1244] Scanning disk update_prebinding (finding dependent libraries for /Library/OpenBase/Developer/Interfaces/OpenBaseAPI/Mach-OLib/OpenBaseLib/OpenBaseAPI-C.Mach-O.Lib): string table not at the end of the file (can't be processed) in file: /Library/OpenBase/Developer/Interfaces/OpenBaseAPI/Mach-OLib/OpenBaseLib/OpenBaseAPI-C.Mach-O.Lib(<nfs -1000>:Network:Developer:OpenBase:Interfaces:OpenBase Mach-O:OpenBase Mach-O:OpenBaseClient Source:CommAPI.c) 2002-01-06 20:56:17.407 update_prebinding[1244] Scanning disk 2002-01-06 20:56:19.680 update_prebinding[1244] Scanning disk 2002-01-06 20:56:22.300 update_prebinding[1244] Scanning disk 2002-01-06 20:56:24.725 update_prebinding[1244] Scanning disk 2002-01-06 20:56:27.691 update_prebinding[1244] Scanning disk 2002-01-06 20:56:29.984 update_prebinding[1244] Scanning disk 2002-01-06 20:56:31.508 update_prebinding[1244] Scanning disk 2002-01-06 20:56:33.104 update_prebinding[1244] Scanning disk 2002-01-06 20:56:34.705 update_prebinding[1244] Scanning disk 2002-01-06 20:56:36.430 update_prebinding[1244] Scanning disk 2002-01-06 20:56:39.857 update_prebinding[1244] Scanning disk 2002-01-06 20:56:43.304 update_prebinding[1244] Scanning disk 2002-01-06 20:56:45.902 update_prebinding[1244] Scanning disk 2002-01-06 20:56:48.891 update_prebinding[1244] Scanning disk 2002-01-06 20:56:51.520 update_prebinding[1244] Scanning disk 2002-01-06 20:56:53.560 update_prebinding[1244] Scanning disk 2002-01-06 20:56:56.001 update_prebinding[1244] Scanning disk 2002-01-06 20:56:58.134 update_prebinding[1244] Scanning disk 2002-01-06 20:57:00.898 update_prebinding[1244] Scanning disk 2002-01-06 20:57:03.084 update_prebinding[1244] Scanning disk 2002-01-06 20:57:05.180 update_prebinding[1244] Scanning disk 2002-01-06 20:57:10.522 update_prebinding[1244] Scanning disk 2002-01-06 20:57:13.227 update_prebinding[1244] Scanning disk 2002-01-06 20:57:15.271 update_prebinding[1244] Scanning disk 2002-01-06 20:57:17.243 update_prebinding[1244] Scanning disk 2002-01-06 20:57:19.254 update_prebinding[1244] Scanning disk 2002-01-06 20:57:21.181 update_prebinding[1244] Scanning disk 2002-01-06 20:57:23.255 update_prebinding[1244] Scanning disk 2002-01-06 20:57:25.022 update_prebinding[1244] Scanning disk 2002-01-06 20:57:27.147 update_prebinding[1244] Scanning disk 2002-01-06 20:57:30.249 update_prebinding[1244] Scanning disk 2002-01-06 20:57:32.984 update_prebinding[1244] Scanning disk 2002-01-06 20:57:35.957 update_prebinding[1244] Scanning disk 2002-01-06 20:57:40.376 update_prebinding[1244] Scanning disk 2002-01-06 20:57:45.571 update_prebinding[1244] Scanning disk 2002-01-06 20:57:50.224 update_prebinding[1244] Scanning disk 2002-01-06 20:57:52.366 update_prebinding[1244] Scanning disk 2002-01-06 20:57:55.499 update_prebinding[1244] Scanning disk 2002-01-06 20:57:57.619 update_prebinding[1244] Scanning disk 2002-01-06 20:57:59.543 update_prebinding[1244] Scanning disk 2002-01-06 20:58:00.635 update_prebinding[1244] Scanning disk 2002-01-06 20:58:02.256 update_prebinding[1244] Scanning disk 2002-01-06 20:58:03.206 update_prebinding[1244] Scanning disk 2002-01-06 20:58:03.386 update_prebinding[1244] end search 2002-01-06 20:58:03.551 update_prebinding[1244] Prebinding files There are 1972 total files that may need to be re-prebound. 2002-01-06 20:58:04.382 update_prebinding[1244] Prebinding files (20 of 1972) 2002-01-06 20:58:09.148 update_prebinding[1244] Prebinding files (40 of 1972) 2002-01-06 20:58:15.272 update_prebinding[1244] Prebinding files (60 of 1972) 2002-01-06 20:58:16.397 update_prebinding[1244] Prebinding files (80 of 1972) 2002-01-06 20:58:18.355 update_prebinding[1244] Prebinding files (100 of 1972) 2002-01-06 20:58:28.773 update_prebinding[1244] Prebinding files (120 of 1972) 2002-01-06 20:58:34.947 update_prebinding[1244] Prebinding files (140 of 1972) update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos4.framework/Versions/A/Kerberos4:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosWrappers.framework/Versions/A/KerberosWrappers:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. 2002-01-06 20:58:36.493 update_prebinding[1244] Prebinding files (160 of 1972) 2002-01-06 20:58:40.462 update_prebinding[1244] Prebinding files (180 of 1972) 2002-01-06 20:58:43.671 update_prebinding[1244] Prebinding files (200 of 1972) 2002-01-06 20:58:53.004 update_prebinding[1244] Prebinding files (220 of 1972) update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_strncmp defined in: /System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty and in //usr/lib/libSystem.B.dylib(strncmp.o)) (for architecture ppc). update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd:library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/mmalloc.framework/Versions/A/mmalloc. update_prebinding: redo_prebinding on /usr/libexec/binutils/size:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 20:58:56.958 update_prebinding[1244] Prebinding files (240 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Sherlock.app/Contents/MacOS/Sherlock:can't open file: //System/Library/PrivateFrameworks/CFNetwork.framework/Versions/A/CFNetwork (No such file or directory). 2002-01-06 20:59:00.711 update_prebinding[1244] Prebinding files (260 of 1972) update_prebinding: redo_prebinding on /usr/bin/testprns:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/testprns and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 20:59:07.966 update_prebinding[1244] Prebinding files (280 of 1972) 2002-01-06 20:59:18.725 update_prebinding[1244] Prebinding files (300 of 1972) update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClient.framework/Versions/A/KClient:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos4.framework/Versions/A/Kerberos4 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/CredentialsCache.framework/Versions/A/CredentialsCache. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClientDeprecated.framework/Versions/A/KClientDeprecated:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos4.framework/Versions/A/Kerberos4 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/CredentialsCache.framework/Versions/A/CredentialsCache. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClientCompat.framework/Versions/A/KClientCompat:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KClient.framework/Versions/A/KClient (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosDES.framework/Versions/A/KerberosDES. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/GSS.framework/Versions/A/GSS:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLoginServer.framework/Versions/A/KerberosLoginServer:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/Kerberos5.framework/Versions/A/Kerberos5 (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosComErr.framework/Versions/A/KerberosComErr. update_prebinding: redo_prebinding on /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosLogin.framework/Versions/A/KerberosLogin (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /usr/lib/libkrb4.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 20:59:27.677 update_prebinding[1244] Prebinding files (320 of 1972) 2002-01-06 20:59:28.610 update_prebinding[1244] Prebinding files (340 of 1972) 2002-01-06 20:59:32.115 update_prebinding[1244] Prebinding files (360 of 1972) 2002-01-06 20:59:33.589 update_prebinding[1244] Prebinding files (380 of 1972) 2002-01-06 20:59:35.657 update_prebinding[1244] Prebinding files (400 of 1972) 2002-01-06 20:59:51.177 update_prebinding[1244] Prebinding files (420 of 1972) 2002-01-06 20:59:54.368 update_prebinding[1244] Prebinding files (440 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Disk Utility.app/Contents/MacOS/Disk Utility:can't open file: //System/Library/PrivateFrameworks/DiskManager.framework/Versions/A/DiskManager (No such file or directory). 2002-01-06 20:59:56.845 update_prebinding[1244] Prebinding files (460 of 1972) 2002-01-06 20:59:59.503 update_prebinding[1244] Prebinding files (480 of 1972) update_prebinding: redo_prebinding on /usr/bin/nmblookup:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/nmblookup and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:00:01.726 update_prebinding[1244] Prebinding files (500 of 1972) 2002-01-06 21:00:13.794 update_prebinding[1244] Prebinding files (520 of 1972) update_prebinding: redo_prebinding on /usr/bin/myisamchk:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/myisamchk and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:00:16.792 update_prebinding[1244] Prebinding files (540 of 1972) 2002-01-06 21:00:20.074 update_prebinding[1244] Prebinding files (560 of 1972) 2002-01-06 21:00:22.365 update_prebinding[1244] Prebinding files (580 of 1972) 2002-01-06 21:00:25.306 update_prebinding[1244] Prebinding files (600 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/addr2line:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 21:00:35.129 update_prebinding[1244] Prebinding files (620 of 1972) 2002-01-06 21:00:40.718 update_prebinding[1244] Prebinding files (640 of 1972) 2002-01-06 21:00:44.942 update_prebinding[1244] Prebinding files (660 of 1972) 2002-01-06 21:00:48.088 update_prebinding[1244] Prebinding files (680 of 1972) 2002-01-06 21:00:51.838 update_prebinding[1244] Prebinding files (700 of 1972) update_prebinding: redo_prebinding on /sbin/rrestore:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_panic defined in: /sbin/rrestore and in //usr/lib/libSystem.B.dylib(panic.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/make_unicodemap:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/make_unicodemap and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:01:01.730 update_prebinding[1244] Prebinding files (720 of 1972) 2002-01-06 21:01:03.334 update_prebinding[1244] Prebinding files (740 of 1972) update_prebinding: redo_prebinding on /usr/libexec/mysqld:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/libexec/mysqld and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:01:06.662 update_prebinding[1244] Prebinding files (760 of 1972) update_prebinding: redo_prebinding on /usr/bin/myisamlog:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/myisamlog and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/myisampack:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/myisampack and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/resolve_stack_dump:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/resolve_stack_dump and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:01:09.814 update_prebinding[1244] Prebinding files (780 of 1972) 2002-01-06 21:01:10.851 update_prebinding[1244] Prebinding files (800 of 1972) 2002-01-06 21:01:23.621 update_prebinding[1244] Prebinding files (820 of 1972) update_prebinding: redo_prebinding on /usr/bin/make_printerdef:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/make_printerdef and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:01:26.892 update_prebinding[1244] Prebinding files (840 of 1972) update_prebinding: redo_prebinding on /usr/sbin/smbd:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/sbin/smbd and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:01:29.928 update_prebinding[1244] Prebinding files (860 of 1972) update_prebinding: redo_prebinding on /usr/bin/isamlog:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/isamlog and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/lib/libcom_err.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 21:01:34.365 update_prebinding[1244] Prebinding files (880 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/ColorSync Utility.app/Contents/MacOS/ColorSync Utility:prebinding can't be redone for: /Applications_10-0-4/Utilities/ColorSync Utility.app/Contents/MacOS/ColorSync Utility (for architecture ppc) because larger updated load commands do not fit (the program must be relinked). 2002-01-06 21:01:36.000 update_prebinding[1244] Prebinding files (900 of 1972) 2002-01-06 21:01:47.555 update_prebinding[1244] Prebinding files (920 of 1972) 2002-01-06 21:01:53.426 update_prebinding[1244] Prebinding files (940 of 1972) 2002-01-06 21:01:56.054 update_prebinding[1244] Prebinding files (960 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Directory Setup.app/Contents/MacOS/Directory Setup:can't open file: //System/Library/PrivateFrameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (No such file or directory). update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/NetInfo Manager.app/Contents/MacOS/NetInfo Manager:prebinding can't be redone for: /Applications_10-0-4/Utilities/NetInfo Manager.app/Contents/MacOS/NetInfo Manager (for architecture ppc) because larger updated load commands do not fit (the program must be relinked). 2002-01-06 21:02:02.348 update_prebinding[1244] Prebinding files (980 of 1972) update_prebinding: redo_prebinding on /Developer/Applications/MRJAppBuilder.app/Contents/MacOS/MRJAppBuilder:library: //System/Library/Frameworks/JavaVM.framework/Versions/1.3/Libraries/libappshell.dylib (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM. update_prebinding: redo_prebinding on /usr/libexec/binutils/nm:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 21:02:06.743 update_prebinding[1244] Prebinding files (1000 of 1972) update_prebinding: redo_prebinding on /usr/bin/klist:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /Applications_10-0-4/Address Book.app/Contents/MacOS/Address Book:can't open file: //System/Library/PrivateFrameworks/Mail.framework/Versions/B/Mail (No such file or directory). update_prebinding: redo_prebinding on /usr/bin/smbpasswd:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbpasswd and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:02:17.573 update_prebinding[1244] Prebinding files (1020 of 1972) 2002-01-06 21:02:19.959 update_prebinding[1244] Prebinding files (1040 of 1972) 2002-01-06 21:02:23.941 update_prebinding[1244] Prebinding files (1060 of 1972) update_prebinding: redo_prebinding on /usr/lib/libkrb5.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. update_prebinding: redo_prebinding on /usr/lib/libgssapi_krb5.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 21:02:27.738 update_prebinding[1244] Prebinding files (1080 of 1972) update_prebinding: redo_prebinding on /usr/bin/my_print_defaults:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/my_print_defaults and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:02:31.139 update_prebinding[1244] Prebinding files (1100 of 1972) 2002-01-06 21:02:47.459 update_prebinding[1244] Prebinding files (1120 of 1972) update_prebinding: redo_prebinding on /usr/bin/make_smbcodepage:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/make_smbcodepage and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:02:51.001 update_prebinding[1244] Prebinding files (1140 of 1972) update_prebinding: redo_prebinding on /usr/lib/libdes524.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 21:02:52.080 update_prebinding[1244] Prebinding files (1160 of 1972) 2002-01-06 21:02:56.947 update_prebinding[1244] Prebinding files (1180 of 1972) 2002-01-06 21:02:57.593 update_prebinding[1244] Prebinding files (1200 of 1972) update_prebinding: redo_prebinding on /System/Library/Assistants/Setup.assistant/Resources/Security.bundle/Resources/regressAPIs:prebinding can't be redone for: /System/Library/Assistants/Setup.assistant/Resources/Security.bundle/Resources/regressAPIs (for architecture ppc) because of undefined symbols: _CFArrayCreate _CFDataGetBytePtr _CFDataGetLength _CFDictionaryCreateMutable _CFDictionarySetValue _CFPropertyListCreateXMLData _CFRelease _CFStringCreateWithCString ___CFStringMakeConstantString _kCFCopyStringDictionaryKeyCallBacks _kCFTypeArrayCallBacks _kCFTypeDictionaryValueCallBacks . 2002-01-06 21:03:10.839 update_prebinding[1244] Prebinding files (1220 of 1972) update_prebinding: redo_prebinding on /usr/bin/smbcontrol:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbcontrol and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:03:14.574 update_prebinding[1244] Prebinding files (1240 of 1972) update_prebinding: redo_prebinding on /Applications/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs:prebinding can't be redone for: /Applications/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs (for architecture ppc) because of undefined symbols: _CFArrayCreate _CFDataGetBytePtr _CFDataGetLength _CFDictionaryCreateMutable _CFDictionarySetValue _CFPropertyListCreateXMLData _CFRelease _CFStringCreateWithCString ___CFStringMakeConstantString _kCFCopyStringDictionaryKeyCallBacks _kCFTypeArrayCallBacks _kCFTypeDictionaryValueCallBacks . update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs:prebinding can't be redone for: /Applications_10-0-4/Utilities/NetInfo Domain Setup.app/Contents/Resources/regressAPIs (for architecture ppc) because of undefined symbols: _CFArrayCreate _CFDataGetBytePtr _CFDataGetLength _CFDictionaryCreateMutable _CFDictionarySetValue _CFPropertyListCreateXMLData _CFRelease _CFStringCreateWithCString ___CFStringMakeConstantString _kCFCopyStringDictionaryKeyCallBacks _kCFTypeArrayCallBacks _kCFTypeDictionaryValueCallBacks . 2002-01-06 21:03:17.527 update_prebinding[1244] Prebinding files (1260 of 1972) update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/readline.framework/Versions/A/readline:library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/mmalloc.framework/Versions/A/mmalloc. 2002-01-06 21:03:20.021 update_prebinding[1244] Prebinding files (1280 of 1972) update_prebinding: redo_prebinding on /usr/bin/config:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_connect defined in: /usr/bin/config and in //usr/lib/libSystem.B.dylib(connect.o)) (for architecture ppc). update_prebinding: redo_prebinding on /System/Library/PrivateFrameworks/opcodes.framework/Versions/A/opcodes:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. update_prebinding: redo_prebinding on /usr/libexec/gdb/gdb-i386-apple-macos10:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 21:03:23.416 update_prebinding[1244] Prebinding files (1300 of 1972) 2002-01-06 21:03:39.545 update_prebinding[1244] Prebinding files (1320 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Internet Connect.app/Contents/MacOS/Internet Connect:can't open file: //System/Library/PrivateFrameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (No such file or directory). 2002-01-06 21:03:40.705 update_prebinding[1244] Prebinding files (1340 of 1972) update_prebinding: redo_prebinding on /usr/bin/compileHelp:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_errors defined in: /usr/bin/compileHelp and in //usr/lib/libSystem.B.dylib(error_codes.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/lib/libMallocDebug.A.dylib:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_NXDefaultMallocZone defined in: /usr/lib/libMallocDebug.A.dylib and in //usr/lib/libSystem.B.dylib(zone.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/rpcclient:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/rpcclient and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/testparm:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/testparm and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:03:42.730 update_prebinding[1244] Prebinding files (1360 of 1972) 2002-01-06 21:03:46.810 update_prebinding[1244] Prebinding files (1380 of 1972) 2002-01-06 21:03:51.152 update_prebinding[1244] Prebinding files (1400 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/objdump:library: //System/Library/PrivateFrameworks/opcodes.framework/Versions/A/opcodes (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd. 2002-01-06 21:04:01.001 update_prebinding[1244] Prebinding files (1420 of 1972) update_prebinding: redo_prebinding on /usr/lib/libk5crypto.dylib:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 21:04:06.783 update_prebinding[1244] Prebinding files (1440 of 1972) update_prebinding: redo_prebinding on /usr/bin/kpasswd:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 21:04:11.119 update_prebinding[1244] Prebinding files (1460 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/objcopy:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. update_prebinding: redo_prebinding on /usr/bin/resolveip:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/resolveip and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:04:12.209 update_prebinding[1244] Prebinding files (1480 of 1972) 2002-01-06 21:04:14.135 update_prebinding[1244] Prebinding files (1500 of 1972) update_prebinding: redo_prebinding on /usr/sbin/nmbd:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/sbin/nmbd and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:04:23.288 update_prebinding[1244] Prebinding files (1520 of 1972) 2002-01-06 21:04:25.902 update_prebinding[1244] Prebinding files (1540 of 1972) 2002-01-06 21:04:29.058 update_prebinding[1244] Prebinding files (1560 of 1972) update_prebinding: redo_prebinding on /var/root/Development/OpenUp-2.2-source/zip:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_errors defined in: /var/root/Development/OpenUp-2.2-source/zip and in //System/Library/Frameworks/System.framework/Versions/B/System(error_codes.o)) (for architecture ppc). 2002-01-06 21:04:30.641 update_prebinding[1244] Prebinding files (1580 of 1972) update_prebinding: redo_prebinding on /usr/bin/smbspool:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbspool and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/smbstatus:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbstatus and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:04:34.264 update_prebinding[1244] Prebinding files (1600 of 1972) update_prebinding: redo_prebinding on /Library/Receipts/InstallerUpdate1.0.pkg/Contents/Resources/GestaltTool:dynamic shared library: //System/Library/Frameworks/Carbon.framework/Versions/A/Carbon has the wrong CPU type for: /Library/Receipts/InstallerUpdate1.0.pkg/Contents/Resources/GestaltTool (architecture i386). update_prebinding: redo_prebinding on /usr/bin/pack_isam:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/pack_isam and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:04:47.930 update_prebinding[1244] Prebinding files (1620 of 1972) update_prebinding: redo_prebinding on /usr/bin/perror:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/perror and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/smbcacls:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbcacls and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:04:52.928 update_prebinding[1244] Prebinding files (1640 of 1972) update_prebinding: redo_prebinding on /usr/bin/replace:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/replace and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/isamchk:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/isamchk and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:04:57.220 update_prebinding[1244] Prebinding files (1660 of 1972) update_prebinding: redo_prebinding on /usr/libexec/binutils/cxxfilt:library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/mmalloc.framework/Versions/A/mmalloc. 2002-01-06 21:05:02.497 update_prebinding[1244] Prebinding files (1680 of 1972) 2002-01-06 21:05:04.570 update_prebinding[1244] Prebinding files (1700 of 1972) 2002-01-06 21:05:16.728 update_prebinding[1244] Prebinding files (1720 of 1972) update_prebinding: redo_prebinding on /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool:dynamic shared library: //System/Library/Frameworks/Carbon.framework/Versions/A/Carbon has the wrong CPU type for: /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool (architecture i386). update_prebinding: redo_prebinding on /usr/libexec/binutils/strings:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 21:05:20.298 update_prebinding[1244] Prebinding files (1740 of 1972) 2002-01-06 21:05:22.135 update_prebinding[1244] Prebinding files (1760 of 1972) update_prebinding: redo_prebinding on /sbin/restore:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_panic defined in: /sbin/restore and in //usr/lib/libSystem.B.dylib(panic.o)) (for architecture ppc). 2002-01-06 21:05:25.114 update_prebinding[1244] Prebinding files (1780 of 1972) update_prebinding: redo_prebinding on /usr/bin/kinit:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 21:05:29.751 update_prebinding[1244] Prebinding files (1800 of 1972) 2002-01-06 21:05:44.161 update_prebinding[1244] Prebinding files (1820 of 1972) 2002-01-06 21:05:44.966 update_prebinding[1244] Prebinding files (1840 of 1972) 2002-01-06 21:05:47.369 update_prebinding[1244] Prebinding files (1860 of 1972) 2002-01-06 21:05:48.801 update_prebinding[1244] Prebinding files (1880 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access:prebinding can't be redone for: /Applications_10-0-4/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access (for architecture ppc) because of undefined symbols: _KCDispatch _locate__Q28Security12HandleObjectUlQ38Security12HandleObject10LocateModel . update_prebinding: redo_prebinding on /usr/sbin/swat:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/sbin/swat and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). 2002-01-06 21:05:55.622 update_prebinding[1244] Prebinding files (1900 of 1972) update_prebinding: redo_prebinding on /usr/bin/smbclient:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_snprintf defined in: /usr/bin/smbclient and in //usr/lib/libSystem.B.dylib(snprintf.o)) (for architecture ppc). update_prebinding: redo_prebinding on /usr/bin/comp_err:prebinding can't be redone because of symbols overridded in dependent dynamic shared libraries (_qsort defined in: /usr/bin/comp_err and in //usr/lib/libSystem.B.dylib(qsort.o)) (for architecture ppc). 2002-01-06 21:06:06.092 update_prebinding[1244] Prebinding files (1920 of 1972) update_prebinding: redo_prebinding on /Applications_10-0-4/Utilities/Applet Launcher.app/Contents/MacOS/Applet Launcher:library: //System/Library/Frameworks/JavaVM.framework/Versions/1.3/Libraries/libappshell.dylib (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM. update_prebinding: redo_prebinding on /usr/bin/kdestroy:library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/Frameworks/Kerberos.framework/Versions/A/Frameworks/KerberosSupport.framework/Versions/A/KerberosSupport. 2002-01-06 21:06:12.415 update_prebinding[1244] Prebinding files (1940 of 1972) update_prebinding: redo_prebinding on /usr/libexec/gdb/gdb-powerpc-apple-macos10:library: //System/Library/PrivateFrameworks/bfd.framework/Versions/A/bfd (architecture ppc) prebinding not up to date with dependent dynamic shared library: //System/Library/PrivateFrameworks/liberty.framework/Versions/A/liberty. 2002-01-06 21:06:18.314 update_prebinding[1244] Prebinding files (1960 of 1972) Number of non-prebound files: ; 0 Number of files that may need to be re-prebound : ; 1972 Number of files re-prebound: 0 Number of files unsuccessfully prebound: ; 83 2002-01-06 21:06:28.758 update_prebinding[1244] update_prebinding done. 2002-01-06 21:06:28.759 update_prebinding[1244] End of update_prebinding [machine_name:/tmp] root# *********************************************************************** If I update_prebinding -root /the/compiled/program/folder on the compiled program folder that has the linker warnings it still does not help (I do not think). I can run the program, but if I put the program into the cgi-bin of a web server (apache 1.3.20 customized), the program crashes and the console gets this Jan ; 6 21:35:44 ns1 WindowServer[66]: _CGXGetDisplayShmem: Unauthorized user Jan ; 6 21:35:44 ns1 NEW_PDO_Client: kCGErrorFailure : initCGDisplayState: No display interlock Jan ; 6 21:35:44 ns1 /usr/libexec/CrashReporter: Succeeded writing crash report: /var/root/Library/Logs/NEW_PDO_Client.crash.log The crash.log gets this appended to it. Date/Time: ; 2002-01-06 21:35:44 -0800 OS Version: 10.1.2 (Build 5P48) Command: ; NEW_PDO_Client PID: ; 729 Exception: ; EXC_BAD_ACCESS (0x0001) Codes: ; KERN_PROTECTION_FAILURE (0x0002) at 0x00000000 Thread 0: #0 0x772d9798 in initCGDisplayMappings #1 0x771ddb2c in _CGSDisplayInitialize #2 0x771e1038 in CGSInitialize #3 0x771d4c78 in _CGSDefaultConnection #4 0x731c1c6c in RegisterProcess #5 0x7319d698 in INIT_Processes #6 0x7319a9d8 in _InitHLTB #7 0x41108ac0 in call_image_init_routines #8 0x41112b0c in _dyld_make_delayed_module_initializer_calls #9 0x00004018 in _call_mod_init_funcs #10 ; 0x00003e98 in _start #11 ; 0x00003e0c in start PPC Thread State: ; srr0: 0x772d9798 srr1: 0x0000f030 ; vrsave: 0x00000000 xer: 0x00000020 lr: 0x772d9770 ; ctr: 0x70497044 mq: 0x00000000 ; r0: 0x00000000 r1: 0xbffff400 r2: 0xbfffd625 r3: 0x00000000 ; r4: 0x00000020 r5: 0x0000005d r6: 0x00000000 r7: 0x00000000 ; r8: 0x00000000 r9: 0x00000000 ; r10: 0x00000000 ; r11: 0x8717347c r12: 0x70497044 ; r13: 0x00000000 ; r14: 0x00000036 ; r15: 0x00058490 r16: 0x00058490 ; r17: 0xbfffee90 ; r18: 0x005880a8 ; r19: 0x0000130b r20: 0x00000000 ; r21: 0x0000001c ; r22: 0x70004234 ; r23: 0x700042c8 r24: 0x00000004 ; r25: 0x000006eb ; r26: 0x8081ab5c ; r27: 0x000743d0 r28: 0x00000000 ; r29: 0xbfffef00 ; r30: 0x00000000 ; r31: 0x00000001 ********** Questions: Is this related to the prebinding warning? What is going on here also? ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From jhoward at ups.edu Mon Jan 7 03:13:00 2002 From: jhoward at ups.edu (Joe Howard) Date: Thu Nov 3 14:48:10 2005 Subject: #if target directive Message-ID: <719E6E76-035F-11D6-904B-0003930AB3E8@ups.edu> I have an app which has a stand alone app version and a preference pane version. These two versions have some differences due to the preference pane. My current method of creating program is to create the stand alone version (it's easier to debug an app than a pref pane) and then merge the code into the duplicated source for the pref pane. I would like to be able to have only one set of the code and then just switch the target. Is there an easy way to do this with a directive, like #if target Pref_Pane .... #endif? Any other ideas to make it so I can have two versions of the app without two copies of the source? Joe Howard From markus at ruggiero.ch Mon Jan 7 04:50:58 2002 From: markus at ruggiero.ch (Markus Ruggiero) Date: Thu Nov 3 14:48:10 2005 Subject: Requirement Tracking Message-ID: This may be slightly off-topic but the answers may be of interest to many of you. I am looking for some good MacOSX based (or even better X-platform) tools for requirements, feature, and bug tracking and management. Price does matter as we are a small company doing primarily WebObjects and some Cocoa Programming (and that other-platform stuff for a living). Any recommendations? Thanks in advance ---markus--- PS !!Happy New Year!! -- Markus Ruggiero Kreuznagelweg 20 phone +41 (0)61 462 06 30 CH-4132 Muttenz mobile/GSM +41 (0)79 508 47 01 Switzerland From gweston at mac.com Mon Jan 7 05:40:00 2002 From: gweston at mac.com (Gregory Weston) Date: Thu Nov 3 14:48:10 2005 Subject: Random Number Generation In-Reply-To: <200201070734.XAA26758@lists> Message-ID: <20020107084018-r01010800-92dd2793-0910-0109@192.168.0.4> On 1/6/02 at 11:34 PM, Timothy Wayper wrote: > At 10:30 PM 1/6/2002 -0500, Owen Andertson wrote: > >I need to generate a random number between 0 and 6. The rand() function > >does not offer any options for setting the range. Is there any > >alternative method? > > rand() % 7 Terrible. Destroys the distribution of the returned value. If it was really really random you might just be biasing toward a subset of numbers depending on the second operand. As it happens, many PRNGs seem to be rather predictable in the low bits which makes this even worse. To scale a PRNG result to a specific range without either effect, you do this: int range = max_allowable - min_allowable + 1; float temp = raw_random_number(); temp = temp / (max_possible_random_result + 1); int scaled_result = (temp * range) + min_allowable; G From pekeler at codefab.com Mon Jan 7 08:02:50 2002 From: pekeler at codefab.com (Christian Pekeler) Date: Thu Nov 3 14:48:10 2005 Subject: Requirement Tracking In-Reply-To: Message-ID: > I am looking for some good MacOSX based (or even better X-platform) > tools for requirements, feature, and bug tracking and management. Price > does matter as we are a small company doing primarily WebObjects and > some Cocoa Programming (and that other-platform stuff for a living). > > Any recommendations? Thanks in advance Index cards work best (and are very cheap). Christian From andy at cocoadevcentral.com Mon Jan 7 08:52:54 2002 From: andy at cocoadevcentral.com (Andreas Monitzer) Date: Thu Nov 3 14:48:10 2005 Subject: Requirement Tracking In-Reply-To: Message-ID: On Monday, January 7, 2002, at 01:52 , Markus Ruggiero wrote: > This may be slightly off-topic but the answers may be of interest to > many of you. > > I am looking for some good MacOSX based (or even better X-platform) > tools for requirements, feature, and bug tracking and management. Price > does matter as we are a small company doing primarily WebObjects and > some Cocoa Programming (and that other-platform stuff for a living). > > Any recommendations? Thanks in advance Bugzilla: Free mysql/perl-based solution, very sophisticated http://www.mozilla.org/bugs/ andy From samani_sanjay at yahoo.co.uk Mon Jan 7 08:57:00 2002 From: samani_sanjay at yahoo.co.uk (Sanjay Samani) Date: Thu Nov 3 14:48:10 2005 Subject: Problems with NSUndoManager Message-ID: <200201071656.IAA18641@omnigroup.com> I have been having crashes with the NSUndoManager created in my NSDocument subclass. When loading a file from File / Open Recent menu, the file loads fine. If you try to close the window created the app crashes. There are no problems on a new document in which very similar actions happen. I have checked the call stack in the debugger and the crash seems to come when the NSUndoManager is deallocated. It calls -removeAllItems and crashes within in its own code, and not within any of my I thought I may have done something wrong within the code to load from the file (using XML plist format from an NSDictionary writeToFile:), so I put disableUndoRegistration / enableUndoRegistration around the code that loads from the file, but now the app crashes on the call to -enableUndoRegistration. I am assuming that it is a problem in my code, but I do not retain or release the undoManager anywhere in my code, always referring to it from the NSDocument's -undoManager method. I am beginning to think the bug is inside NSUndoManager itself. I am using Mac OS X 10.0.4 and May Dev Tools. Any ideas if this is an Apple bug and whether it is fixed in 10.1.x? Thanks, Sanjay _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From samani_sanjay at yahoo.co.uk Mon Jan 7 08:57:12 2002 From: samani_sanjay at yahoo.co.uk (Sanjay Samani) Date: Thu Nov 3 14:48:10 2005 Subject: Adding File Menu items for document based project Message-ID: <200201071656.IAA18649@omnigroup.com> I sent the following message to the mailing list during the holidays, but didn't get a response, perhaps cos everyone was too busy having fun. Any ideas? Thanks, Sanjay > I am creating a multiple document based application and I would like to > add an "Import..." item to the File Menu. This should create a new > document object, prompt for a file to import and populate the model > object with the contents of the file chosen. > > To implement this, I have created a custom controller which creates the > new document and calls a method from the document (VS_doc_StringsEditor > is my NSDocument subclass): > > - (IBAction)import:(id)sender > { > VS_doc_StringsEditor *doc = (VS_doc_StringsEditor > *)[[NSDocumentController sharedDocumentController] > openUntitledDocumentOfType:VSStringsEditorDocumentType display:YES]; > > [doc setUndoManager:[[NSUndoManager alloc] init]]; > [doc importStringsFile]; > > [[self docArray] addObject:doc]; > } > > I've found two problems, that I have hacked in this method: > 1. As per the documentation [NSDocumentController > openUntitledDocumentOfType:display:] does not retain the document > created, so I need to keep a hold of it in my own array within my custom > controller. Hence the last line of code. > > 2. Also this method does not create an Undo manager for the NSDocument > it creates, which was leading to some crashes, so I have had to do this > by hand. > > My question is, is this the best way to do this? Is the second problem > a bug or am I using the wrong DocumentController method? > > I considered just implementing this code in my NSDocument subclass' > readFromFile:ofType method so that File/Open... will do the same thing, > but this isn't really the UI I wanted to present to the user. > > Generally speaking, what is the best way to extend the actions available > from the menu of a document based app? All the other actions are > handled by the FirstResponder in MainMenu.nib, but this doesn't have a > delegate outlet that I could set to extend it. Do you create a custom > FirstResponder object and delegate the actions to the default one? If > so, how do you avoid having to re-connect all the actions in IB? > > In particular I am keen to avoid just looking at the reference docs, > picking out methods and circumventing the document architecture. > > Thanks > Sanjay > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From ddavidso at apple.com Mon Jan 7 11:33:23 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:48:10 2005 Subject: Example of a network daemon using the Foundation? In-Reply-To: <1010199640.9261.12.camel@cube.dev.resilience.com> Message-ID: On Friday, January 4, 2002, at 07:00 PM, Kaelin Colclasure wrote: > What I'd like to see is a daemon coded using NSRunLoop as it's core > event dispatcher... > > I am beginning to figure out what goes where (I think). My initial > confusion was in thinking that NSSocketPort was a generic socket > wrapper. I now understand it to be a special class of endpoint that the > DO system (which looks extremely cool) uses. So it appears that I'm > supposed to used regular old BSD-style calls to get a socket created and > bound, and then tuck the fd into a NSFileHandle... I apologize for the confusion about NSSocketPort; that name comes about because it is a subclass of NSPort that is built using sockets. It can be used for networked communications, but only with another NSSocketPort, i.e. between two Cocoa-based processes. For a generic server, you need something else. That something else exists today at the CoreFoundation level, in CFSocket. CFSocket was designed to do exactly what you speak of--allow a socket to serve as a run loop event source. Currently CFSocket provides notifications for connect, accept, and read; in the future it will support write notifications as well. The reason that this lives at the CoreFoundation level is that we are building a networking infrastructure, CFNetwork, that needs to be accessible from more than just Cocoa clients. Search for CFNetwork on developer.apple.com for documentation on the first parts of this. The fact that CFSocket et al. are currently exposed only at the CoreFoundation and not at the Foundation level means a little extra work for Cocoa developers, but not much; CoreFoundation is designed to work well with Foundation. There are a number of alternatives, of course; you can use NSFileHandle for background reads, but CFSocket is likely to be somewhat more efficient for building a network server. There are also a number of third-party Foundation-level wrapper classes for sockets. Using CFSocket should be fairly straightforward once you understand the run loop and run loop sources in general, but feel free to post even the simplest questions on this list--I realize that documentation in this area is still sparse, and I will do what I can to help. Douglas Davidson From sdm7g at minsky.med.virginia.edu Mon Jan 7 13:46:02 2002 From: sdm7g at minsky.med.virginia.edu (Steven D. Majewski) Date: Thu Nov 3 14:48:10 2005 Subject: iPhoto plugins Message-ID: I see iPhoto has a plugins directory. Are there any docs yet on how to write a plugin ? What classes of Plugins are supported ? ( Import, Export, Filter ... ) -- Steve Majewski From benbargagliotti at yahoo.com Mon Jan 7 13:53:40 2002 From: benbargagliotti at yahoo.com (Ben Bargagliott) Date: Thu Nov 3 14:48:10 2005 Subject: NSTask setArguments and SIGSEGV In-Reply-To: <200201072004.MAA18412@lists> Message-ID: <20020107215237.12832.qmail@web20304.mail.yahoo.com> I know that Signal 11(SIGSEGV) is trying to access something that doesn't exist right? well, i'm running this NSTask and it crashes every time when i try to call the setArguments method. here's the code. what's wrong??? - (void)decode:(NSArray *)theFile { lame = [[NSTask alloc] init]; lame setLaunchPath:@"/usr/local/bin/lame"]; [lame setArguments: [NSArray arrayWithObjects:@"--decode", [theFile objectAtIndex:0], @"decoder.aiff"]]; [lame launch]; } lame was defined as an NSTask in the .h file. anything?? ben __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ From pinskia at physics.uc.edu Mon Jan 7 14:00:58 2002 From: pinskia at physics.uc.edu (Andrew Pinski) Date: Thu Nov 3 14:48:10 2005 Subject: NSTask setArguments and SIGSEGV In-Reply-To: from "Ben Bargagliott" at Jan 07, 2002 01:52:36 PM Message-ID: <200201072159.g07LxhX13449@earth.phy.uc.edu> You forgot to end arrayWithObjects with a nil. - (void)decode:(NSArray *)theFile { lame = [[NSTask alloc] init]; lame setLaunchPath:@"/usr/local/bin/lame"]; [lame setArguments: [NSArray arrayWithObjects:@"--decode", [theFile objectAtIndex:0], @"decoder.aiff",nil]]; [lame launch]; } > > I know that Signal 11(SIGSEGV) is trying to access > something that doesn't exist right? well, i'm running > this NSTask and it crashes every time when i try to > call the setArguments method. here's the code. what's > wrong??? > - (void)decode:(NSArray *)theFile > { > lame = [[NSTask alloc] init]; > lame setLaunchPath:@"/usr/local/bin/lame"]; > [lame setArguments: [NSArray > arrayWithObjects:@"--decode", [theFile > objectAtIndex:0], @"decoder.aiff"]]; > [lame launch]; > } > > lame was defined as an NSTask in the .h file. > anything?? > > ben > > __________________________________________________ > Do You Yahoo!? > Send FREE video emails in Yahoo! Mail! > http://promo.yahoo.com/videomail/ > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From devlists at enigmarelle.com Mon Jan 7 14:03:02 2002 From: devlists at enigmarelle.com (Enigmarelle Development) Date: Thu Nov 3 14:48:10 2005 Subject: NSTask setArguments and SIGSEGV In-Reply-To: <20020107215237.12832.qmail@web20304.mail.yahoo.com> Message-ID: <34526CFE-03BA-11D6-99AF-0030654E281C@enigmarelle.com> On Monday, January 7, 2002, at 04:52 PM, Ben Bargagliott wrote: > I know that Signal 11(SIGSEGV) is trying to access > something that doesn't exist right? well, i'm running > this NSTask and it crashes every time when i try to > call the setArguments method. here's the code. what's > wrong??? > - (void)decode:(NSArray *)theFile > { > lame = [[NSTask alloc] init]; > lame setLaunchPath:@"/usr/local/bin/lame"]; I'm assuming you have a open bracket in your actual code here? > [lame setArguments: [NSArray > arrayWithObjects:@"--decode", [theFile > objectAtIndex:0], @"decoder.aiff"]]; You have to terminate this with a nil - [lame setArguments: [NSArray arrayWithObjects:@"--decode", [theFile objectAtIndex:0], @"decoder.aiff", nil]]; > [lame launch]; > } > > lame was defined as an NSTask in the .h file. > anything?? > > ben From kubernan at 10191.com Mon Jan 7 14:50:02 2002 From: kubernan at 10191.com (kubernan) Date: Thu Nov 3 14:48:10 2005 Subject: C++ compilation : pb with multiple definitions Message-ID: Hello, Just a little problem : the C++ compilation failed when : I have two ObjC++ files : File1.mm File2.mm with : ----------- File1.mm : ----------------- #import "File1.h" extern "Objective-C" { #import } #include"myClass.h" // C++ @implementation File1 - (id)init { some Code } return self; } -(void)aMethod { // call of the myClass (in C++) } ----------- File2.mm : ----------------- #import "File2.h" extern "Objective-C" { #import } #include"myClass.h" // C++ (the same as File1.h) @implementation File2 - (id)init { some Code } return self; } -(void)aMethod { // call of the myClass (in C++) } ------------------------------- The building phase returns these errors : /usr/bin/ld: multiple definitions of symbol ___vt_7BP_Foo /Users/kubernan/Projects/Think_Factory/GUI/Neural Network Kitchen/Neural Network Kitchen 3.0/build/intermediates/Neural Network Kitchen 3.0.build/Objects/ppc/File1.o definition of ___vt_7BP_Foo in section (__DATA,__const) /Users/kubernan/Projects/Think_Factory/GUI/Neural Network Kitchen/Neural Network Kitchen 3.0/build/intermediates/Neural Network Kitchen 3.0.build/Objects/ppc/File2.o definition of ___vt_7BP_Foo in section (__DATA,__const) Multiple definitions. I think this is because of the fact the same C++ header is in my two .mm files (Foo is a C++ method). How to fix it ? Thx for your help ! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1511 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020107/53825910/attachment.bin From darland at thursby.com Mon Jan 7 15:01:35 2002 From: darland at thursby.com (Matt Darland) Date: Thu Nov 3 14:48:10 2005 Subject: Using CFCopyLocalizedString from a daemon Message-ID: <612C3CED-03C2-11D6-9F50-0050E4C50B63@thursby.com> >On Thursday, January 3, 2002, at 06:38 PM, Douglas Davidson wrote: > >>One interesting side point is that It should also be possible in this >>case to pass in an array of strings instead of a single string as the >>value for kCFUserNotificationAlertMessageKey, and have the strings >>localized individually and concatenated into the message that is >>displayed. > >An API call that is missing and which could be interesting is to be able >to pass a formatted string to the CFUserNotificationDisplayNotice/Alert >call > >CF_EXPORT >SInt32 CFUserNotificationDisplayNoticeWithFormat(CFTimeInterval timeout, >CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef >localizationURL, CFStringRef alertHeader, CFStringRef >alertFormattedMessage, CFStringRef defaultButtonTitle,...); > >The alertFormattedMessage would be localized before running the >formatting. > >Currently, there is no easy way to handle this kind of call. Don't mean to butt into the conversation... I have this same problem with a daemon I am writing, but in addition to user notifications I also need to be able to write localized strings to files, logs, etc. A more general solution would be to have a CFCopyLocalizedStringXXX() call that took a URL to explicitly get the localization from. Or, alternatively, when I create a CFBundle instance to be able to specify the localization I want to use. I could then detect when the user has logged in, release the old bundle and re-create a new instance with the user's localization setting( retrieved via CFPreferences API ). To the original poster: If you remove all localizations except the one you're interested in( you can do this via 'Inspecting' the bundle with the Finder ) and restarting your daemon, the bundle API will default to the last remaining bundle. It's imperfect, but will allow you to test/debug localized code. ---- Matt Darland From ddavidso at apple.com Mon Jan 7 15:15:01 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:48:10 2005 Subject: Using CFCopyLocalizedString from a daemon In-Reply-To: <612C3CED-03C2-11D6-9F50-0050E4C50B63@thursby.com> Message-ID: On Monday, January 7, 2002, at 03:00 PM, Matt Darland wrote: > A more general solution would be to have a > CFCopyLocalizedStringXXX() call that took a URL to explicitly get the > localization from. Or, alternatively, when I create a CFBundle > instance to be able to specify the localization I want to use. I could > then detect when the user has logged in, release the old bundle and > re-create a new instance with the user's localization setting > ( retrieved via CFPreferences API ). To get the localized version for some particular localization, use CFBundleCopyResourceURLForLocalization. True, it doesn't get you localized strings directly, but it only takes a few more calls to do that--CFURLCreateDataAndPropertiesFromResourceURL to get the contents of the .strings file, CFPropertyListCreateFromXMLData to parse it, and CFDictionaryGetValue to look up a particular key. Any caching is then up to you. Douglas Davidson From ckane at apple.com Mon Jan 7 15:28:00 2002 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:48:10 2005 Subject: Can NSNotificationCenter handle 1000s of observers? In-Reply-To: <45CF574A-02B4-11D6-9796-000502BD88DD@modeless.com> Message-ID: <115260C1-03C6-11D6-BEDF-003065E6D674@apple.com> It can handle 1000s of observers, but operations will scale with the number of observers. The add, remove, and post operations should be assumed to be O(n). Since post operations account for >85% of the three add/remove/post operations on a notification center, the notification center is pushing some work onto the add operation in order to speed up the post operation, in the current implementation. Past and future implementations may have somewhat different characteristics. Chris Kane Cocoa Frameworks, Apple On Sunday, January 6, 2002, at 06:47 AM, Itrat Khan wrote: > I'm trying to understand why NSNotificationCenter's addObserver: method > is taking up so much of my application's execution time. addObserver: > takes considerably longer to execute as I add new observers, and > Sampler says _reloadTables is where all the activity is. > > Does addObserver: reload the entire observer table instead of just > inserting the new observer? Seems like it. Are there any tips for > improving NSNotificationCenter's efficiency with large observer lists? > > Thanks, > Itrat. > > .................................................................. > Itrat Khan > Modeless Software, Inc. > http://www.modeless.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1236 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020107/29b80d42/attachment.bin From ckane at apple.com Mon Jan 7 15:33:01 2002 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:48:10 2005 Subject: Can NSNotificationCenter handle 1000s of observers? In-Reply-To: <115260C1-03C6-11D6-BEDF-003065E6D674@apple.com> Message-ID: On Monday, January 7, 2002, at 03:27 PM, Chris Kane wrote: > Since post operations account for >85% of the three add/remove/post > operations on a notification center I should have added: ", in typical usage patterns,". > the notification center is pushing some work onto the add operation in > order to speed up the post operation, in the current implementation. > Past and future implementations may have somewhat different > characteristics. Usage patterns may of course be atypical in some cases. For example, loading nib files with deep and complex view hierarchies will cause (in the existing OS releases) an atypical burst of observer adding. Chris Kane Cocoa Framework, Apple From aep at apple.com Mon Jan 7 16:58:00 2002 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:48:10 2005 Subject: KeyChain (KCAddItem) and Cocoa In-Reply-To: Message-ID: On Friday, January 4, 2002, at 07:25 , Bill Keirstead wrote: > I am trying to use the KeyChain's KCAddItem function from within a Cocoa > application, but the function seems to be missing from the headers and > declaring it myself leads to link errors. > > Is there some other way that I should be adding new items to the KeyChain > using Cocoa? > > Note: I am including CoreServices/CoreServices.h and using the > CoreServices.framework. The retrieval APIs seem to work fine for me. CoreServices.framework only defines KCAddItemNoUI. You need to include Carbon.framework to get KCAddItem. Andrew __________________________________________________________________ A n d r e w P l a t z e r A p p l i c a t i o n F r a m e w o r k s A p p l e From itrat at modeless.com Mon Jan 7 17:30:58 2002 From: itrat at modeless.com (Itrat Khan) Date: Thu Nov 3 14:48:10 2005 Subject: Can NSNotificationCenter handle 1000s of observers? In-Reply-To: <115260C1-03C6-11D6-BEDF-003065E6D674@apple.com> Message-ID: <7808217A-03D7-11D6-B8B0-000502BD88DD@modeless.com> On Monday, January 7, 2002, at 06:27 PM, Chris Kane wrote: > It can handle 1000s of observers, but operations will scale with the > number of observers. The add, remove, and post operations should be > assumed to be O(n). > > Since post operations account for >85% of the three add/remove/post > operations on a notification center, the notification center is pushing > some work onto the add operation I figured as much, and I agree with that approach. I've addressed the performance issue by creating n notification centers instead of a single center for n objects. Insertions are effectively O(1) and responsiveness is excellent. Any idea how much memory an empty notification center requires? I expect it to be insignificant. Regards, Itrat. .................................................................. Itrat Khan Modeless Software, Inc. http://www.modeless.com From itrat at modeless.com Mon Jan 7 17:57:00 2002 From: itrat at modeless.com (Itrat Khan) Date: Thu Nov 3 14:48:10 2005 Subject: Problems with NSUndoManager In-Reply-To: <200201071656.IAA18641@omnigroup.com> Message-ID: <188A441E-03DB-11D6-B8B0-000502BD88DD@modeless.com> On Monday, January 7, 2002, at 11:53 AM, Sanjay Samani wrote: > I have been having crashes with the NSUndoManager created in my > NSDocument subclass. When loading a file from File / Open Recent menu, > the file loads fine. If you try to close the window created the app > crashes. There are no problems on a new document in which very similar > actions happen. Take a look at ?Cleaning the Undo Stack? in the NSUndoManager class documentation. When you close your document (which deallocs your objects), you must tell the undo manager to removeAllActionsWithTarget:. The undo manager will likely crash if you try to undo an action with a freed target. As for the new document working but the import not, you might be leaking memory in the first scenario, so objects aren't actually dealloc'ing. You can run ObjectAlloc to see if any objects are still around after you've closed your document. Hope that helps, Itrat. .................................................................. Itrat Khan Modeless Software, Inc. http://www.modeless.com From ckane at apple.com Mon Jan 7 18:26:00 2002 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:48:10 2005 Subject: Can NSNotificationCenter handle 1000s of observers? In-Reply-To: <7808217A-03D7-11D6-B8B0-000502BD88DD@modeless.com> Message-ID: On Monday, January 7, 2002, at 05:31 PM, Itrat Khan wrote: > On Monday, January 7, 2002, at 06:27 PM, Chris Kane wrote: > I've addressed the performance issue by creating n notification centers > instead of a single center for n objects. Insertions are effectively > O(1) and responsiveness is excellent. Any idea how much memory an empty > notification center requires? I expect it to be insignificant. Insignificant unless you are counting bytes instead of KB or MB. Maybe ~100 bytes. Chris Kane Cocoa Frameworks, Apple From Alec.Bartsch at disney.com Mon Jan 7 18:27:01 2002 From: Alec.Bartsch at disney.com (Bartsch, Alec) Date: Thu Nov 3 14:48:10 2005 Subject: Random Number Generation References: <20020107084018-r01010800-92dd2793-0910-0109@192.168.0.4> Message-ID: <3C3A58CC.A807DC15@fa.disney.com> Gregory Weston wrote: > > On 1/6/02 at 11:34 PM, Timothy Wayper wrote: > > > At 10:30 PM 1/6/2002 -0500, Owen Andertson wrote: > > >I need to generate a random number between 0 and 6. The rand() function > > >does not offer any options for setting the range. Is there any > > >alternative method? > > > > rand() % 7 > > Terrible. Destroys the distribution of the returned value. If it was really > really random you might just be biasing toward a subset of numbers depending on > the second operand. As it happens, many PRNGs seem to be rather predictable in > the low bits which makes this even worse. > > To scale a PRNG result to a specific range without either effect, you do this: > > int range = max_allowable - min_allowable + 1; > float temp = raw_random_number(); > temp = temp / (max_possible_random_result + 1); > int scaled_result = (temp * range) + min_allowable; The Mersenne Twister is another interesting alternative that avoids those problems: http://www.math.keio.ac.jp/~matumoto/emt.html Perhaps overkill when all you need is a number between 0 and 6... ;) -------------------------------------------------------------------- Alec Bartsch / Walt Disney Feature Animation: The Secret Lab / x3227 From steveg at echo-sol.com Mon Jan 7 20:00:59 2002 From: steveg at echo-sol.com (Steve Green) Date: Thu Nov 3 14:48:10 2005 Subject: Thread communications.. one more time. Message-ID: <43C1BD4C-03EC-11D6-87E3-0003934475F4@echo-sol.com> Experts, I think I am trying to do something quite simple, but my previous request to the list left me a bit frustrated. Suppose a have a cocoa app happily doing it's thing, when via some user input, I need to spawn a thread to perform some lengthy calculation. The main app will return to it's event loop (NSRunLoop?) while spawned thread chugs away. When the calculation is complete, I need to signal the main app to collect the results, and clean up. It seems that there are multiple ways I could perform the notification, but it's not clear to me which will work, and be thread safe, etc.. Thought 1: Start a timer with zero timeout in the main app thread. Seems like a hack, and I am not sure it's thread safe. Thought 2: NSRunLoop performSelector:target:argument:order:modes:. Will it work? What do I pass for modes:? Thought 3: NSApplication postEvent:atStart:. The documentation suggests this but it does not suggest what event to send or how to sign up to receive it. If it turns out that this is the best way to solve my problem, then I am sure I can figure that out the rest, but I imagine that there must be a simpler way. After all, maybe I am writing an app that does not use NSApplication. Thought 4: NSConnection. Seems like overkill? Thought 5: Use a unix pipe with the socket class (I forget the name). This didn't 'feel' like the right solution in this environment. Thought 6: Ask the experts. Any advice? From osx-developer at www.com Mon Jan 7 20:56:00 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:10 2005 Subject: NEW_PDO Framework prebinding errors, and execution failure from inside a cgi Message-ID: <200201080454.g084sYb18336@mail11.bigmailbox.com> Okay I have discovered how to get around the last part of these seemingly related problems. It seems a framework automatically includes AppKit!? That is something that the developer should only add if required (now I know I have to remove it or it causes mysterious crashing problems). I will append this as a suggestion for a configuration change, to the Crashing Error part of my bugreport about prebinding errors. The prebinding errors themselves though ?!... I still have no idea what the solution (or bug) is there. Thanks for listening It does help me to solve my problems by generating detailed explanations, and maybe others can benefit from the archive. I also like to include them in the Apple bugreports so they get the idea that at least somebody is actually trying to get OSX to the same level that OpenStep was (and where the confusion and dificulties are in this now Developer Unfriendly environment) In this case my New PDO system is only limited by other Apple problems, bugs, limited documentation (in areas that say you should never have to do this yourself. but you do!) and possible poor design (or the implimentation thereof), that too need rebuilding (yet now my New PDO has global reach, once an SSLayer is included it will be even better). (An Example of this is- NSArchiving of NSInvocations with multiple arguments, for transmission to remote objects for invocation and therefore implementation of a replacement PDO. I figure when they fix NSArchiving you will see PDO return properly, but you never know, they just are not focused on the true value that Objective-C stands for, a robust portable messaging system, and more interested in Final Cut Pro, iTunes etc., all things that did not really need OpenStep anyway.) ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From greg at omnigroup.com Mon Jan 7 21:05:59 2002 From: greg at omnigroup.com (Greg Titus) Date: Thu Nov 3 14:48:10 2005 Subject: iPhoto plugins In-Reply-To: Message-ID: <5DB04FF6-03F5-11D6-BDF6-003065B22C50@omnigroup.com> On Monday, January 7, 2002, at 01:45 PM, Steven D. Majewski wrote: > I see iPhoto has a plugins directory. > Are there any docs yet on how to write a plugin ? > > What classes of Plugins are supported ? > ( Import, Export, Filter ... ) > Well, I spent the day reverse engineering iPhoto's plugin stuff. iPhoto is indeed a Cocoa app and it does load exporter plugins, print formatter plugins, and image filter plugins. (There aren't actually any of the latter included, so I'm not sure whether the support for them is real or vestigial.) As a little teaser, here is an iPhoto plugin to export Albums to OmniGraffle: Unpack and put GraffleExport.iPhotoExporter into your iPhoto.app/Contents/PlugIns folder. Then when you go to export, there will be an additional "OmniGraffle" tab with some controls for choosing number of rows and columns per page, click on export, and voila... I haven't discovered yet whether iPhoto looks for plugins anywhere besides inside its own application bundle (a couple obvious guesses for other placements didn't work). I also haven't fully figured out the progress indicator stuff in the exporter protocol -- right now the OmniGraffle exporter just shows the indeterminate "barber's pole" look until it is finished. It sure would be keen if Apple would document this, or at least slip us some hints. :-) --Greg From samani_sanjay at yahoo.co.uk Mon Jan 7 21:36:00 2002 From: samani_sanjay at yahoo.co.uk (Sanjay Samani) Date: Thu Nov 3 14:48:10 2005 Subject: Problems with NSUndoManager Message-ID: <200201080535.VAA21552@omnigroup.com> Itrat Khan wrote: > On Monday, January 7, 2002, at 11:53 AM, Sanjay Samani wrote: > >> I have been having crashes with the NSUndoManager created in my >> NSDocument subclass. When loading a file from File / Open Recent menu, >> the file loads fine. If you try to close the window created the app >> crashes. There are no problems on a new document in which very similar >> actions happen. > > Take a look at ?Cleaning the Undo Stack? in the NSUndoManager class > documentation. When you close your document (which deallocs your > objects), you must tell the undo manager to removeAllActionsWithTarget:. > The undo manager will likely crash if you try to undo an action with a > freed target. I was calling removeAllActions, but that was crashing too. When I removed it and looked in the call stack the NSDocument dealloc calls this method in any case and its in this routine that I am seeing it crash. > As for the new document working but the import not, you might be leaking > memory in the first scenario, so objects aren't actually dealloc'ing. > You can run ObjectAlloc to see if any objects are still around after > you've closed your document. I guessed that I was releasing objects too often that the NSUndoManager was retaining and subsequently releasing in the removeAllActions method. However I then got stuck when I used -disableUndoRegistration. Why would the NSUndoManager retain any objects in this instance? I am still looking through the code to work out whether I am releasiong objects when I should not. Any ideas why it would crash if I have used disableUndoRegistration? Thanks, Sanj -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1763 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020107/78894048/attachment.bin From nickzman at eskimo.com Tue Jan 8 01:38:42 2002 From: nickzman at eskimo.com (Nick Zitzmann) Date: Thu Nov 3 14:48:10 2005 Subject: Question about retrieving the names of system sounds... Message-ID: <4B3D4AF3-041B-11D6-8CDD-0050E410B21A@eskimo.com> I've got a program where I'd like to get an NSArray containing all the names of sound effects recognized directly by the system, ie. sound effects that are stored in /System/Library/Sounds, /Library/Sounds, and ~/Library/Sounds. I don't see anything in Cocoa that allows me to do this without retrieving lists of files in each directory. I was thinking maybe try getting the returning value of [[NSFileManager defaultManager] directoryContentsAtPath:@"/System/Library/Sounds"], etc. but then I'd have to manually go into each array and manually remove the file name extensions off each entry. (It's got to be presentable to the user, you know.) There's got to be an easier way of doing this... Is there? Nick Zitzmann ICQ: 22305512 "Democracy is a very delicate tool, and if you try to impose democracy without the basic civil society that supports it, you get yourself into a serious problem." - Edward Walker, former US Assistant Secretary of State for Near Eastern Affairs (2000-2001) From ghulands at bigpond.net.au Tue Jan 8 02:30:02 2002 From: ghulands at bigpond.net.au (Greg Hulands) Date: Thu Nov 3 14:48:10 2005 Subject: NSTableView possible defect Message-ID: Hi, I have an NSTableView that displays a list of images for the user to click a button to transfer them to the local machine. I have set the controller to be the target, delegate and datasource of the table. In the action method for the table I get the selectedRowEnumerator and get the images. Then when the user clicks the transfer button I then get the enumerator again, but it seems to be empty, thus not allowing me to transfer the file. Is this a problem with NSTableView "loosing" what is selected or am I causing the problem? Below are code snippets. Any help is greatly appreciated. Regards, Greg - (void)getImage:(id)sender { if (!preview) return; else { NSEnumerator *e = [imagesTable selectedRowEnumerator]; NSNumber *cur; int i = 0; [statusMessage setStringValue:@"Previewing Image"]; [statusMessage setNeedsDisplay:YES]; while (cur = [e nextObject]) { if (i==0) //preview the first image { NSString *surl = [self getImageData:[cur intValue]]; NSURL *url = [NSURL URLWithString:surl]; NSData *data = [NSData dataWithContentsOfURL:url]; NSImage *imageData = [[NSImage alloc] initWithData:data]; [imagePreview setImage:imageData]; } i++; } [statusMessage setStringValue:@""]; } } - (IBAction)transfer:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; NSEnumerator *e; NSNumber *cur; [panel setCanChooseFiles:NO]; [panel setCanChooseDirectories:YES]; [panel setAllowsMultipleSelection:NO]; if ([panel runModalForDirectory:@"~/Pictures/" file:@"Select Directory to Save" types:nil] != NSOKButton) return; e = [imagesTable selectedRowEnumerator]; [progress setMinValue:0]; [progress setMaxValue:[[e allObjects] count]]; while (cur = (NSNumber *)[e nextObject]) { NSString *filename = [self parseFileName:[images objectAtIndex:[cur intValue]]]; NSString *fileWithExt = [filename stringByAppendingString:@".jpg"]; NSString *fullDir = [NSString stringWithFormat:@"%@%@", [[panel filenames] objectAtIndex:0], fileWithExt]; NSString *surl = [self getImageData:[cur intValue]]; NSURL *url = [NSURL URLWithString:surl]; NSData *data = [NSData dataWithContentsOfURL:url]; [data writeToFile:fullDir atomically:NO]; [progress incrementBy:1.0]; } } From kirby132 at hotmail.com Tue Jan 8 04:05:01 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:10 2005 Subject: Installing a Preference Pane Message-ID: Hi, I have written a preference pane and I have an Apple installer package as the installation medium. However, I have noted that on some systems, following install, when the user open the "System Preferences" application my pref pane doesn't appear. I have checked that the pref pane is installed correctly and it is. I am able to fix the problem by doing a "cp -R myPref.prefPane/ myPref1.prefPane/" and then removing the original folder and then copying everything back and deleting the myPref1 copy. Effectively touching the original. Once I do this I notice that "System Preferences" takes a lot longer to load and loads my pref pane successfully. I built the pref pane and created the install yesterday. When I install the dates and times are preserved as yesterday's date and time of the original files, not the time of install. The OS was installed today. I wonder if this is significant. Any feedback/workarounds would be appreciated. kirby _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From lizardo at urbi.com.br Tue Jan 8 08:33:59 2002 From: lizardo at urbi.com.br (Lizardo H. C. M. Nunes) Date: Thu Nov 3 14:48:10 2005 Subject: ATLAS usage Message-ID: <25BA1C34-0462-11D6-B0A3-0030656ED03C@urbi.com.br> Hi, I've just compiled ATLAS following the instructions during configuration step. Several hours later, It created libraries at " ./lib// ". So far, I'm experiencing some warnings during compilation. For instance, compiling using % cc test.c -L//lib/ -lcblas -latlas -lm I get /usr/bin/ld: warning table of contents of library: ../lib/OSX_PPCG4AltiVec//libatlas.a not sorted slower link editing will result (use the ranlib(1) -s option) I tried % ranlib -s libatlas.a and I got: ranlib: same symbol defined in more than one member in: libatlas.a (table of contents will not be sorted) ranlib: file: libatlas.a(ATL_cgemvN_bXI0.o) defines symbol: _ATL_cgemvN_a1_x1_bXi0_y1 ranlib: file: libatlas.a(ATL_cgemvS_bXI0.o) defines symbol: _ATL_cgemvN_a1_x1_bXi0_y1 ranlib: file: libatlas.a(ATL_dger1u_a1_x1_yX.o) defines symbol: _ATL_dger1_a1_x1_yX ranlib: file: libatlas.a(ATL_dger1c_a1_x1_yX.o) defines symbol: _ATL_dger1_a1_x1_yX ranlib: file: libatlas.a(ATL_sger1u_a1_x1_yX.o) defines symbol: _ATL_sger1_a1_x1_yX ranlib: file: libatlas.a(ATL_sger1c_a1_x1_yX.o) defines symbol: _ATL_sger1_a1_x1_yX ranlib: file: libatlas.a(ATL_zgemvS_bXI0.o) defines symbol: _ATL_zgemvN_a1_x1_bXi0_y1 ranlib: file: libatlas.a(ATL_zgemvN_bXI0.o) defines symbol: _ATL_zgemvN_a1_x1_bXi0_y1 I'm quite new to libraries usage and couldn't gather much documentation about ATLAS. I'd really appreciate if somebody could share his experience and help me somehow. TIA, Lizardo H. C. M. Nunes ...But we preach Christ crucified, to the Jews a stumbling block, and to the Greeks foolishness;(...)but God has chosen the foolish things of the world to confound the wise, and God has chosen the weak things of the world to confound the things which are strong;(I Cor.1:23&27 From nick at logictools.de Tue Jan 8 08:40:47 2002 From: nick at logictools.de (Nick =?iso-8859-1?Q?M=FCller?=) Date: Thu Nov 3 14:48:10 2005 Subject: NSTableView possible defect In-Reply-To: Message-ID: <20020108173940-r01010800-3920e2fd-0922-0108@192.168.0.2> On 08.01.2002 at 20:28 Uhr, Greg Hulands wrote: > while (cur = [e nextObject]) ~ ~ correct: while ((cur = [e nextObject])) HTH, Nick ......................................... logic tools WebObjects // Web Authoring // Perl Nick Mueller // Muenchen // Germany From bdanube at mac.com Tue Jan 8 08:41:01 2002 From: bdanube at mac.com (Michael Grant) Date: Thu Nov 3 14:48:10 2005 Subject: iPhoto plugins In-Reply-To: <5DB04FF6-03F5-11D6-BDF6-003065B22C50@omnigroup.com> Message-ID: On 1/7/02 11:05 PM, "Greg Titus" wrote: > iPhoto > is indeed a Cocoa app But not scriptable. What happened to "free" scriptability for Cocoa apps? Michael -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When you?re paranoid, everything makes sense. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From jba at bullex.de Tue Jan 8 08:58:01 2002 From: jba at bullex.de (Jens Baumeister) Date: Thu Nov 3 14:48:10 2005 Subject: NSTableView possible defect Message-ID: > -----Original Message----- > From: Nick M?ller [mailto:nick@logictools.de] > On 08.01.2002 at 20:28 Uhr, Greg Hulands wrote: > > > while (cur = [e nextObject]) > ~ ~ > correct: > while ((cur = [e nextObject])) > Huh? I don't doubt that it's correct, but what excatly is it that makes the second pair of parens necessary? _____________________________________ Jens Baumeister Bullex GmbH, Cologne, Germany She sells c-shells by the sea shore. From chmod007 at mac.com Tue Jan 8 09:03:02 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:48:10 2005 Subject: NSTableView possible defect In-Reply-To: Message-ID: >>> while (cur = [e nextObject]) >> ~ ~ >> correct: >> while ((cur = [e nextObject])) >> > > Huh? > > I don't doubt that it's correct, but what excatly is it that makes the > second pair of parens necessary? This was discussed on (i believe) cocoa-dev a month ago or something like that. The first example will generate a warning if strict syntax checking is enabled, while the other will pass. Some prefer the warning to be on so that they don't assign values instead of compare. / david From frank.vercruesse at gmx.de Tue Jan 8 09:05:03 2002 From: frank.vercruesse at gmx.de (Frank Vercruesse) Date: Thu Nov 3 14:48:10 2005 Subject: Installing a Preference Pane In-Reply-To: Message-ID: Hello. I have never experienced this kind of behaviour on my own machine, but I got a few reports about that issue from users having problems with installing my tool's preference pane. Though the pref pane was installed at the correct path, it never showed up in System Preferences. It turned out that removing a hidden file named ".ApplePrefPanesCache" at path "~/Library/Caches" solved the problem. Hope this helps. Regards, Frank -- http://www.vercruesse.de (rm ~/Library/Caches/.ApplePrefPanesCache) On Dienstag, Januar 8, 2002, at 01:04 Uhr, Kevin Bohan wrote: > Hi, > > I have written a preference pane and I have an Apple installer package as > the installation medium. However, I have noted that on some systems, > following install, when the user open the "System Preferences" > application my pref pane doesn't appear. > > I have checked that the pref pane is installed correctly and it is. I am > able to fix the problem by doing a "cp -R myPref.prefPane/ > myPref1.prefPane/" and then removing the original folder and then copying > everything back and deleting the myPref1 copy. Effectively touching the > original. Once I do this I notice that "System Preferences" takes a lot > longer to load and loads my pref pane successfully. > > I built the pref pane and created the install yesterday. When I install > the dates and times are preserved as yesterday's date and time of the > original files, not the time of install. The OS was installed today. I > wonder if this is significant. > > Any feedback/workarounds would be appreciated. > > kirby From devlists at enigmarelle.com Tue Jan 8 09:24:00 2002 From: devlists at enigmarelle.com (Enigmarelle Development) Date: Thu Nov 3 14:48:10 2005 Subject: iPhoto plugins In-Reply-To: <5DB04FF6-03F5-11D6-BDF6-003065B22C50@omnigroup.com> Message-ID: <6C982F0C-045C-11D6-93D3-0030654E281C@enigmarelle.com> On Tuesday, January 8, 2002, at 12:05 AM, Greg Titus wrote: > iPhoto is indeed a Cocoa app Obj-C too.. Right on! ;) -john c. warner enigmarelle development http://www.enigmarelle.com/ From nick at logictools.de Tue Jan 8 09:27:45 2002 From: nick at logictools.de (Nick =?iso-8859-1?Q?M=FCller?=) Date: Thu Nov 3 14:48:10 2005 Subject: NSTableView possible defect In-Reply-To: Message-ID: <20020108182552-r01010800-1078d3a1-0922-0108@192.168.0.2> On 08.01.2002 at 17:58 Uhr, Jens Baumeister wrote: > I don't doubt that it's correct, but what excatly is it that makes the > second pair of parens necessary? But you are right in doubting my answer. I just checked*) (sorry for doing this after my reply) and there is _no_ difference. On the other hand, I remember that this was the cause for exactly the same kind of error I had. >8-/ I had an explanation for this, but I won't publish it. :-) *) int a; if (a = 0) NSLog(@"1"); if ((a = 0)) NSLog(@"2"); if (a = 1) NSLog(@"3"); if ((a = 2)) NSLog(@"4"); prints: 3 4 Nick, sorry again for any confusion! From tlr at mac.com Tue Jan 8 10:34:00 2002 From: tlr at mac.com (Thomas Lachand-Robert) Date: Thu Nov 3 14:48:10 2005 Subject: C++ compilation : pb with multiple definitions In-Reply-To: <200201080231.SAA09698@lists> Message-ID: <276072FC-0466-11D6-8DD9-003065ABED76@mac.com> Le mardi 8 janvier 2002, ? 03:31 , kubernan a ?crit : > Just a little problem : the C++ compilation failed when : > > I have two ObjC++ files : File1.mm File2.mm with : > > ----------- File1.mm : ----------------- > > #import "File1.h" > extern "Objective-C" > { > #import > } > #include"myClass.h" // C++ > > Why do you use this extern "Objective-C" construct? I type #import in my Obj-C++ files with no problem at all (even #import is ok). I don't know if extern "Objective-C" makes sense in C++ by the way, it should probably be extern "C" in case of need. Note that you should also use #import "myClass.h" for the last header, C++ or not. This removes the need of guards for the header. This is probably your problem here because it says: > /usr/bin/ld: multiple definitions of symbol ___vt_7BP_Foo That is, a function named 'Foo' is duplicated. There is no such function in Foundation, but probably there is one in your "MyClass.h", or in the .mm files otherwise. So my advice is to search for 'Foo' in the specific case, and always use #import in general. Thomas Lachand-Robert ********************** tlr@mac.com << Et le chemin est long du projet ? la chose. >> Moli?re, Tartuffe. From kirby132 at hotmail.com Tue Jan 8 10:34:15 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:10 2005 Subject: Installing a Preference Pane Message-ID: >From: Frank Vercruesse >To: "Kevin Bohan" >CC: macosx-dev@omnigroup.com >Subject: Re: Installing a Preference Pane >Date: Tue, 8 Jan 2002 18:04:04 +0100 > >Hello. > >I have never experienced this kind of behaviour on my own machine, but I >got a few reports about that issue from users having problems with >installing my tool's preference pane. Though the pref pane was installed >at the correct path, it never showed up in System Preferences. It turned >out that removing a hidden file named ".ApplePrefPanesCache" at path >"~/Library/Caches" solved the problem. > >Hope this helps. > >Regards, > >Frank > >-- >http://www.vercruesse.de > > >(rm ~/Library/Caches/.ApplePrefPanesCache) > >On Dienstag, Januar 8, 2002, at 01:04 Uhr, Kevin Bohan wrote: > Thanks, that did the trick!. I wonder is there a way to automate this as part of the install (Apple Installer)? I tried using a post_install shell script, but I thought it didn't work. Has anyone used these? My install authenticates, will the post_script run as the current user or root? I am concerned that I won't be able to do "rm -f ~/Library/Caches/.ApplePrefPanesCache" in the script, because it won't launch in the User's home directory. Anyone know what the pitfalls might be? Kirby _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From devlists at enigmarelle.com Tue Jan 8 10:42:04 2002 From: devlists at enigmarelle.com (Enigmarelle Development) Date: Thu Nov 3 14:48:10 2005 Subject: Question about retrieving the names of system sounds... In-Reply-To: <4B3D4AF3-041B-11D6-8CDD-0050E410B21A@eskimo.com> Message-ID: <41A5A5F8-0467-11D6-93D3-0030654E281C@enigmarelle.com> On Tuesday, January 8, 2002, at 04:37 AM, Nick Zitzmann wrote: > I've got a program where I'd like to get an NSArray containing all the > names of sound effects recognized directly by the system, ie. sound > effects that are stored in /System/Library/Sounds, /Library/Sounds, and > ~/Library/Sounds. You can use [NSSound soundUnfilteredFileTypes], then get those types from the directories using [NSString pathExtension] or HFS types. You should also use the NSSearchPathDirectory functions in Foundation Types & Constants to get the Library directories "just to be safe." > > I don't see anything in Cocoa that allows me to do this without > retrieving lists of files in each directory. I was thinking maybe try > getting the returning value of [[NSFileManager defaultManager] > directoryContentsAtPath:@"/System/Library/Sounds"], etc. but then I'd > have to manually go into each array and manually remove the file name > extensions off each entry. (It's got to be presentable to the user, you > know.) Use [NSFileManager displayNameAtPath:(NSString *)path]. This will return the name with or without the extension, according to the user's preference. > There's got to be an easier way of doing this... Is there? A (NSSound *)[NSSound availableSounds] would be nice, but this isn't *that* much work IMO. -john c. warner enigmarelle development http://www.enigmarelle.com/ From finlay.dobbie at btinternet.com Tue Jan 8 10:48:03 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:10 2005 Subject: #if target directive In-Reply-To: <719E6E76-035F-11D6-904B-0003930AB3E8@ups.edu> Message-ID: <5BBF104E-0433-11D6-AB1C-000502319F17@btinternet.com> On Monday, January 7, 2002, at 11:12 am, Joe Howard wrote: > I have an app which has a stand alone app version and a preference pane > version. These two versions have some differences due to the > preference pane. My current method of creating program is to create > the stand alone version (it's easier to debug an app than a pref pane) > and then merge the code into the duplicated source for the pref pane. > I would like to be able to have only one set of the code and then just > switch the target. Is there an easy way to do this with a directive, > like #if target Pref_Pane .... #endif? Any other ideas to make it so I > can have two versions of the app without two copies of the source? Go to your preference pane Target Settings -> Build Settings and scroll down to the Build Settings area. Set OTHER_CFLAGS to -DTARGET_PREFPANE. Then in your source, you can do #ifdef TARGET_PREFPANE // prefpane #else //app #end or #ifndef TARGET_PREFPANE // app #end or whtatever. -- Finlay From gcoffey at wmotion.com Tue Jan 8 11:00:01 2002 From: gcoffey at wmotion.com (Geoff Coffey) Date: Thu Nov 3 14:48:10 2005 Subject: Getting started with cocoa Message-ID: Hi everyone... I?m just getting started with cocoa now. I?ve finished the first 10 chapters of the O?Reilly book and feeling good but I have a few questions I?m hoping someone can answer... 1: In my first app, I have a ?detail window? concept, and I?ll need to display multiple detail windows simultaneously. They are not document windows per se (no saving or loading from documents). If I create a NIB file with an NSWindow and a controller, can I simply [NSBundle loadNib:...] multiple times? Is this the correct way to obtain multiple instantiations of a window? 2: How do you replace the content view of an NSWindow with a custom view in IB? 3: In the Travel Advisor example, I created a model class ?Country? with several instance variables which were pointers to various objects. In it?s init method, I call the setters for each instance variable to initialize them to relevant empty values. The setters for object variables all take the form: [whatever autorelease]; whatever = [something copy]; --or-- whatever = [something retain]; My confusion is that initially (when init is received) each instance variable has not yet been initialized, so why don?t I get a runtime error when I send the autorelease message to this invalid object? As a test, I tried to message a nil object directly in a sample app and the process seemed to hang. I haven?t looked at this closely, but it seems confusing to me. Can someone explain what I?m missing? (for the record, it works fine in practice, I just don?t understand why it works.) Thanks! Geoff -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/20020108/f790e163/attachment.html From ryan at frontbase.com Tue Jan 8 11:09:00 2002 From: ryan at frontbase.com (Ryan Dingman) Date: Thu Nov 3 14:48:10 2005 Subject: NSTableView possible defect In-Reply-To: Message-ID: <114E125A-046B-11D6-8FA3-00306549BA84@frontbase.com> Hi Greg, Your problem is with the following lines of code in the -transfer: method. e = [imagesTable selectedRowEnumerator]; [progress setMinValue:0]; [progress setMaxValue:[[e allObjects] count]]; Calling -allObjects on an enumerator will move the position of that enumerator to the end of its list of objects. I do not know of any way of "resetting" an enumerator. So, to correct this problem you should ask the table view directly for the number of selected rows rather than asking the enumerator for its count. This will prevent the enumerator from being advanced to the end. Rewrite the code as follows: e = [imagesTable selectedRowEnumerator]; [progress setMinValue:0]; [progress setMaxValue:[imagesTable numberOfSelectedRows]]; Hope this helps. ryan -- Ryan Dingman FrontBase, Inc. ryan@frontbase.com On Tuesday, January 8, 2002, at 02:28 AM, Greg Hulands wrote: > Hi, > I have an NSTableView that displays a list of images for the user to > click a > button to transfer them to the local machine. I have set the controller > to > be the target, delegate and datasource of the table. In the action > method > for the table I get the selectedRowEnumerator and get the images. Then > when > the user clicks the transfer button I then get the enumerator again, > but it > seems to be empty, thus not allowing me to transfer the file. > > Is this a problem with NSTableView "loosing" what is selected or am I > causing the problem? Below are code snippets. > > Any help is greatly appreciated. > > Regards, > Greg > > - (void)getImage:(id)sender > { > if (!preview) > return; > else > { > NSEnumerator *e = [imagesTable selectedRowEnumerator]; > NSNumber *cur; > int i = 0; > > [statusMessage setStringValue:@"Previewing Image"]; > [statusMessage setNeedsDisplay:YES]; > while (cur = [e nextObject]) > { > if (i==0) //preview the first image > { > NSString *surl = [self getImageData:[cur intValue]]; > NSURL *url = [NSURL URLWithString:surl]; > NSData *data = [NSData dataWithContentsOfURL:url]; > NSImage *imageData = [[NSImage alloc] > initWithData:data]; > [imagePreview setImage:imageData]; > } > i++; > } > [statusMessage setStringValue:@""]; > } > } > > - (IBAction)transfer:(id)sender > { > NSOpenPanel *panel = [NSOpenPanel openPanel]; > NSEnumerator *e; > NSNumber *cur; > > [panel setCanChooseFiles:NO]; > [panel setCanChooseDirectories:YES]; > [panel setAllowsMultipleSelection:NO]; > if ([panel runModalForDirectory:@"~/Pictures/" file:@"Select > Directory > to Save" types:nil] != NSOKButton) > return; > > e = [imagesTable selectedRowEnumerator]; > [progress setMinValue:0]; > [progress setMaxValue:[[e allObjects] count]]; > > while (cur = (NSNumber *)[e nextObject]) > { > NSString *filename = [self parseFileName:[images > objectAtIndex:[cur > intValue]]]; > NSString *fileWithExt = [filename > stringByAppendingString:@".jpg"]; > NSString *fullDir = [NSString stringWithFormat:@"%@%@", [[panel > filenames] objectAtIndex:0], fileWithExt]; > NSString *surl = [self getImageData:[cur intValue]]; > NSURL *url = [NSURL URLWithString:surl]; > NSData *data = [NSData dataWithContentsOfURL:url]; > [data writeToFile:fullDir atomically:NO]; > [progress incrementBy:1.0]; > } > } > > > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From jon-osx at nanocrew.net Tue Jan 8 12:12:04 2002 From: jon-osx at nanocrew.net (Jon Lech Johansen) Date: Thu Nov 3 14:48:10 2005 Subject: Multithreading and NSApplication Message-ID: <20020108210037.A19674@nanocrew.net> Is it possible to create and do event handling for a NSWindow in two seperate threads that are not aware of eachother? Doesn't seem like it, considering only one NSApplication is allowed per process. I need to create two modules for an application. These modules execute inside seperate threads. I want both of them to display their own NSWindow. Is this possible at all with Cocoa? The module support in the application will most likely be redesigned to allow these two module types to communicate, but I'd still like to know if it's possible. -- Jon Johansen nanocrew.net From kubernan at 10191.com Tue Jan 8 12:55:02 2002 From: kubernan at 10191.com (kubernan) Date: Thu Nov 3 14:48:10 2005 Subject: C++ compilation : pb with multiple definitions In-Reply-To: <276072FC-0466-11D6-8DD9-003065ABED76@mac.com> Message-ID: Le mardi 8 janvier 2002, ? 07:33 PM, Thomas Lachand-Robert a ?crit : > > Le mardi 8 janvier 2002, ? 03:31 , kubernan a ?crit : > >> Just a little problem : the C++ compilation failed when : >> >> I have two ObjC++ files : File1.mm File2.mm with : >> >> ----------- File1.mm : ----------------- >> >> #import "File1.h" >> extern "Objective-C" >> { >> #import >> } >> #include"myClass.h" // C++ >> >> > Why do you use this extern "Objective-C" construct? Really good question. This is an old code i used under the DP4...or before ;-). It works. > I type #import in my Obj-C++ files with no > problem at all (even #import is ok). I don't know if > extern "Objective-C" makes sense in C++ by the way, it should probably > be extern "C" in case of need. > > Note that you should also use #import "myClass.h" for the last header, > C++ or not. This removes the need of guards for the header. This is > probably your problem here because it says: >> /usr/bin/ld: multiple definitions of symbol ___vt_7BP_Foo > That is, a function named 'Foo' is duplicated. There is no such > function in Foundation, but probably there is one in your "MyClass.h", > or in the .mm files otherwise. > > So my advice is to search for 'Foo' in the specific case, and always > use #import in general. > Of course, Foo in in my C++ class. Yep...I read this advice making research on the Internet. I also found a linker directive for the "multiple definitions" pb...lost the url. I'll try with #import. Thx for your help. > Thomas Lachand-Robert > ********************** tlr@mac.com > << Et le chemin est long du projet ? la chose. >> Moli?re, Tartuffe. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From tjw at omnigroup.com Tue Jan 8 13:10:59 2002 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:48:10 2005 Subject: Multithreading and NSApplication In-Reply-To: <20020108210037.A19674@nanocrew.net> Message-ID: <1DE9A87C-047C-11D6-B998-0030657CEB62@omnigroup.com> On Tuesday, January 8, 2002, at 12:00 PM, Jon Lech Johansen wrote: > Is it possible to create and do event handling for a NSWindow in two > seperate threads that are not aware of eachother? Doesn't seem like it, > considering only one NSApplication is allowed per process. No. Trying to process events in anything other than the main thread will result in bad magic in my experience. This is even true if you still only have one thread dispatching events. The problem seems to be that the mach port over which events get delivered is hard wired to the main thread's runloop. > I need to create two modules for an application. These modules execute > inside seperate threads. I want both of them to display their own > NSWindow. Is this possible at all with Cocoa? Yes, but you need to split up your UI into a more model-view-controller paradigm. You can write your model code to be free to execute in any thread. The view code (at least as far as event handling) needs to stay in the main thread. Your controller code can dispatch actions to your model code after getting events from the view. Note that you probably can't just pass NSEvent objects around to other threads (at least I'd be very wary of that). -tim From bbum at codefab.com Tue Jan 8 13:24:18 2002 From: bbum at codefab.com (Bill Bumgarner) Date: Thu Nov 3 14:48:10 2005 Subject: The best CVS In-Reply-To: <200201082004.MAA17415@lists> Message-ID: [Crossposting as this subject comes up about once every six months or so... The original thread was asking what the best configuration of CVS was for use with WebObjects.] Pserver: Unless you are explicitly setting up CVS for anonymous access or have isolated CVS behind a firewall, you should avoid using pserver at all costs. It is grossly insecure-- it uses encryption about as strong as ROT13 to 'protect' the password data and, as such, takes about 5 minutes for a script kiddie with a packet sniffer to grab passwords. In any other context than those mentioned, you are far better off going with a CVS configuration that uses SSH to control authentication to the server. Also: avoid file wrappers as much as possible. There is no need to use file wrappers with EOModel files, WO Components or-- as of OS X-- NIB files. It is still critical to mark the appropriate file types as binary, however. I have written a number of articles regarding CVS, WebObjects, and OS X. Some links to the archives -- should give you some links into the threads, as well: http://www.omnigroup.com/mailman/archive/webobjects- dev/2001-February/006876.html http://www.omnigroup.com/mailman/archive/webobjects- dev/2001-February/006925.html http://www.omnigroup.com/mailman/archive/webobjects- dev/2001-June/011402.html http://www.omnigroup.com/mailman/archive/webobjects- dev/2001-June/011457.html http://www.omnigroup.com/mailman/archive/webobjects- dev/2001-June/011503.html Also, for anyone using ssh+CVS w/PBX in a situation where ssh wants to ask for a password, you might want to grab SSHPassKey -- see the announce message I posted to the lists earlier today -- it provides a solution that allows PBX/cvs to communicate via ssh even when ssh needs to ask for a password (personally, I try to avoid using public key authorization as much as possible-- it opens trust dependencies between machines that I'm not 100% comfortable with). b.bum From fabienlroy at mac.com Tue Jan 8 13:40:02 2002 From: fabienlroy at mac.com (fabienlroy@mac.com) Date: Thu Nov 3 14:48:10 2005 Subject: The best CVS In-Reply-To: Message-ID: <99DA3B40-047F-11D6-AA42-000393030CD8@mac.com> May I add that SSHPassKey also enable CVL to work with ssh. Great job! Thanks. Fabien On Tuesday, January 8, 2002, at 01:22 PM, Bill Bumgarner wrote: > Also, for anyone using ssh+CVS w/PBX in a situation where ssh wants to > ask for a password, you might want to grab SSHPassKey -- see the > announce message I posted to the lists earlier today -- it provides a > solution that allows PBX/cvs to communicate via ssh even when ssh needs > to ask for a password (personally, I try to avoid using public key > authorization as much as possible-- it opens trust dependencies between > machines that I'm not 100% comfortable with). > > b.bum > --- Fabien Roy Senior Software Engineer Tyrell Software Corporation 949 458-1911 ext 4 From marcel at metaobject.com Tue Jan 8 13:58:01 2002 From: marcel at metaobject.com (Marcel Weiher) Date: Thu Nov 3 14:48:10 2005 Subject: Question about retrieving the names of system sounds... In-Reply-To: <4B3D4AF3-041B-11D6-8CDD-0050E410B21A@eskimo.com> Message-ID: On Dienstag, Januar 8, 2002, at 10:37 Uhr, Nick Zitzmann wrote: > I don't see anything in Cocoa that allows me to do this without > retrieving lists of files in each directory. I was thinking maybe try > getting the returning value of [[NSFileManager defaultManager] > directoryContentsAtPath:@"/System/Library/Sounds"], etc. but then I'd > have to manually go into each array and manually remove the file name > extensions off each entry. (It's got to be presentable to the user, you > know.) Use HOM to implement your idea (code just typed into Mail, untested): id fileManager = [NSFileManager defaultManager]; id libraries = [[[NSArray arrayWithObjects:@"/System/",@"",@"~/",nil] collect] stringByAppendingPathComponent:@"Library/Sounds"]; id pathLists,soundNames=[NSMutableArray array]; pathLists = [[fileManager collect] directoryContentsAtPath:[libraries each]]; [[soundNames do] addObjectsFromArray:[pathLists each]]; soundNames = [[soundNames collect] stringByDeletingPathExtension]; Some of the intermediate values could easily be eliminated, but this keeps the expressions somewhat more manageable. You would probably want to separate this out into a couple of methods. Marcel -- Marcel Weiher Metaobject Software Technologies marcel@metaobject.com www.metaobject.com Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc. From jim.correia at pobox.com Tue Jan 8 13:59:00 2002 From: jim.correia at pobox.com (Jim Correia) Date: Thu Nov 3 14:48:10 2005 Subject: The best CVS In-Reply-To: Message-ID: I asked bill to share his CVS wrappers scars. This is what he said (and said it was ok to share with the list). > The biggest problem with wrappers is the implementation-- it is a 12 > year old hack that was never properly architected/integrated and has > never been supported by the CVS maintainers (they actually have tried > to eliminate it on a regular basis). It suffers from numerous prblems > related to filesystem issues-- different filesystems have different > file lifespan semantics that can cause problems. > > It adds some extreme sensitivity to local configuration-- the > cvswrappers stuff is not entirely controlled out of CVSROOT like > everything else. Local configuration data can negatively impact the > configuration obtained from CVSROOT. > > For EOModels and WOComponents, the biggest reason-- beyond the above-- > is that it completely destroys developer accountability. In > particular, all of the files within a component or model are text > files. If managed as text files within CVS, it means that any change > can be quickly be quantified in terms of who changed it and the last > time it was touched. You can also easily quantify the differences > between versions quite easily -- not so with tar wrappers (or binary > files, for that matter). > > There are also situations within which one can actually lose data or > render a workarea fairly unusable with wrappers-- in particular, > accidentally working with a repository from a client that ignores the > wrappers stuff (or is misconfigured locally) can cause the workarea to > get into a very unhappy state. It is also possible to do the same to > the repository. There is nothing quite so miserable as having to edit > the CVS repository directly when you are on a deadline and it is > holding up a team of developers because of an intermittent failure that > lead to a repository explosion. Been there. Have scars. Do not want > to go back. From solidsun at solidsun.com Tue Jan 8 14:33:02 2002 From: solidsun at solidsun.com (James Callender) Date: Thu Nov 3 14:48:10 2005 Subject: Enabling Spell checking programmatically Message-ID: Hey, been having some trouble with enabling auto-spellchecking programmatically for NSTextField. There is a method available for text views, but NSTextField seems to be missing some of this stuff but I know it must be possible because you can enable auto-spellchecking from the menu after the program has run. Any ideas? From s.mecklenburg at t-online.de Tue Jan 8 14:36:00 2002 From: s.mecklenburg at t-online.de (Sebastian Mecklenburg) Date: Thu Nov 3 14:48:10 2005 Subject: anonymous struct In-Reply-To: Message-ID: hello, i want to create a struct in cpp this way: struct Vector3D { union { struct { double x,y,z; }; double a[3]; }; } and i want to use it this way: Vector3D vector; vector.x = 1.0; vector.a[1] = 2.0; it must be legal c++ because in the nvidia api they do it this way. unfortunately it won't compile with project builder because i got an "warning: anonymous class type not used to declare any objects" compiler error. someone gave me the hint to set the -fpermissive compiler flag to turn the error into a warning; now it compiles the struct, but when i want to access one of the attributes i get an "'x' undeclared" compiler error. is it possible to get this to work on mac os x? regards sebastian mecklenburg From finlay.dobbie at btinternet.com Tue Jan 8 14:37:01 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:10 2005 Subject: Installing a Preference Pane In-Reply-To: Message-ID: <5E54B472-0471-11D6-BFAE-000502319F17@btinternet.com> On Tuesday, January 8, 2002, at 06:33 pm, Kevin Bohan wrote: > Thanks, that did the trick!. I wonder is there a way to automate this > as part of the install (Apple Installer)? I tried using a post_install > shell script, but I thought it didn't work. Has anyone used these? My > install authenticates, will the post_script run as the current user or > root? I am concerned that I won't be able to do "rm -f > ~/Library/Caches/.ApplePrefPanesCache" in the script, because it won't > launch in the User's home directory. Anyone know what the pitfalls > might be? Just wondering, why does your install authenticate? Seems a bit pointless to me, considering the prefpane could be installed into /Library/PreferencePanes as admin (not root, any admin user) or ~/Library/PreferencePanes as any user. You could do for user in /Users; do rm -f $user/Library/Caches/.ApplePrefPanesCache done but that assumes that the user's home directory is in the standard place. -- Finlay From jon-osx at nanocrew.net Tue Jan 8 14:54:04 2002 From: jon-osx at nanocrew.net (Jon Lech Johansen) Date: Thu Nov 3 14:48:10 2005 Subject: Multithreading and NSApplication In-Reply-To: <1DE9A87C-047C-11D6-B998-0030657CEB62@omnigroup.com>; from tjw@omnigroup.com on Tue, Jan 08, 2002 at 01:10:17PM -0800 References: <20020108210037.A19674@nanocrew.net> <1DE9A87C-047C-11D6-B998-0030657CEB62@omnigroup.com> Message-ID: <20020108234252.A1386@nanocrew.net> On Tue, Jan 08, 2002 at 01:10:17PM -0800, Timothy J. Wood (tjw@omnigroup.com) wrote: > > > I need to create two modules for an application. These modules execute > > inside seperate threads. I want both of them to display their own > > NSWindow. Is this possible at all with Cocoa? > > Yes, but you need to split up your UI into a more > model-view-controller paradigm. You can write your model code to be > free to execute in any thread. The view code (at least as far as event > handling) needs to stay in the main thread. Your controller code can > dispatch actions to your model code after getting events from the view. > Note that you probably can't just pass NSEvent objects around to other > threads (at least I'd be very wary of that). The problem is that only modules of one specific type are executed inside the main thread. One of the two modules I'm writing is of this type, but I can't depend on it being loaded (the user can select different modules to load). Anyway, thanks for the info. -- Jon Johansen nanocrew.net From drehring at home.com Tue Jan 8 14:57:00 2002 From: drehring at home.com (David Rehring) Date: Thu Nov 3 14:48:10 2005 Subject: anonymous struct In-Reply-To: Message-ID: On 1/8/02 2:34 PM, Sebastian Mecklenburg at s.mecklenburg@t-online.de wrote: > it must be legal c++ because in the nvidia api they do it this way. > unfortunately it won't compile with project builder because i got an > "warning: anonymous class type not used to declare any objects" compiler > error. someone gave me the hint to set the -fpermissive compiler flag to > turn the error into a warning; now it compiles the struct, but when i > want to access one of the attributes i get an "'x' undeclared" compiler > error. > is it possible to get this to work on mac os x? Umm...just because some vendor's API happens to do this does NOT mean it is legal C++ syntax. I believe that this is a MS VC++ extension. However, I don't know how to make this work without naming the structs/unions explicitly. Later, -- David Rehring Psychos do not explode when light hits Senior Software Engineer them, no matter how crazy they are... Atimi Software, Inc. www.atimi.com And totally insane guy! From steveg at echo-sol.com Tue Jan 8 15:03:02 2002 From: steveg at echo-sol.com (Steve Green) Date: Thu Nov 3 14:48:10 2005 Subject: anonymous struct In-Reply-To: References: Message-ID: <1010530917.30097.12.camel@batgirl.aymanllc.com> On Tue, 2002-01-08 at 17:34, Sebastian Mecklenburg wrote: > hello, > i want to create a struct in cpp this way: > > struct Vector3D { > union { > struct { > double x,y,z; > }; > double a[3]; > }; > } > > and i want to use it this way: > > Vector3D vector; > vector.x = 1.0; > vector.a[1] = 2.0; I am not in front of my Mac right now, but try this.. It's not anonymous anymore, but do you really need it to be anonymous, or do you just need the data structure to work? struct Vector3D { union { struct { double x,y,z; } b; double a[3]; }; }; Vector3D vector; vector.b.x = 1.0; vector.a[1] = 2.0; From yanl1 at mac.com Tue Jan 8 15:09:02 2002 From: yanl1 at mac.com (Yan Laporte) Date: Thu Nov 3 14:48:10 2005 Subject: anonymous struct In-Reply-To: <1010530917.30097.12.camel@batgirl.aymanllc.com> Message-ID: <836DC767-048C-11D6-8870-000393026036@mac.com> I had the same problem not so long ago and that was the only way to fix it that I have found (after a day of searching). Hopefully there was not too too much code to change. It's annoying gcc won't let us do it like that because it is something I have encountered a few times. I have seen gcc patches to allow this but I am unable to tell if these are in good shape or if they work with Mac OSX Yan Laporte ylaporte@acm.org > I am not in front of my Mac right now, but try this.. > It's not anonymous anymore, but do you really need > it to be anonymous, or do you just need the data > structure to work? > > struct Vector3D { > union { > struct { > double x,y,z; > } b; > double a[3]; > }; > }; > > > Vector3D vector; > vector.b.x = 1.0; > vector.a[1] = 2.0; > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From steveg at echo-sol.com Tue Jan 8 15:15:59 2002 From: steveg at echo-sol.com (Steve Green) Date: Thu Nov 3 14:48:10 2005 Subject: anonymous struct In-Reply-To: <836DC767-048C-11D6-8870-000393026036@mac.com> References: <836DC767-048C-11D6-8870-000393026036@mac.com> Message-ID: <1010531669.29924.18.camel@batgirl.aymanllc.com> On Tue, 2002-01-08 at 18:07, Yan Laporte wrote: > I had the same problem not so long ago and that was the only way to fix > it that I have found (after a day of searching). Hopefully there was > not too too much code to change. > > It's annoying gcc won't let us do it like that because it is something I > have encountered a few times. > I have seen gcc patches to allow this but I am unable to tell if these > are in good shape or if they work with Mac OSX Just for fun, I tried it with gcc 2.96-98 and gcc 3.0.2 and it works. From embassociates at qwest.net Tue Jan 8 15:35:02 2002 From: embassociates at qwest.net (Erik M. Buck) Date: Thu Nov 3 14:48:10 2005 Subject: anonymous struct References: <836DC767-048C-11D6-8870-000393026036@mac.com> Message-ID: <002101c1989e$42994440$0101a8c0@karma> I may be wrong, but I don't think many compilers guarantee the order and size of structure elements. The code requested is the worst sort of code. With or without anonymous structs, there is no reason to think this code would work correctly from compiler to compiler or platform to platform. The C++ spec does not require that structure elements are stored in memory in any particular order and without padding etc. struct {double x,y,z;} may use a different amount of storage than double a[3]; given struct {double x,y,z;}, the structure elements may be stored in memory as (z,y,x) or (y,z,x), or (x, pad, y, pad, z, pad) or whatever. The following union may be larger than sizeof(double) * 3: union {struct {double x,y,z;} b; double a[3];}; Any attempt to use vector.a[1] interchangeably with vector.b.y is futile unless you know for sure how your compiler behaves and you do not care about portability or other compilers or platforms. If you want to do this type of thing portably in C++, consider the following: class Vector { public: double a[3]; double &X() {return a[0];}; double &Y() {return a[1];}; double &Z() {return a[2];}; }; or something like it. In C, use either inline functions or macros. #define X(vector) (vector.a[0]) #define Y(vector) (vector.a[1]) #define Z(vector) (vector.a[2]) ----- Original Message ----- From: "Yan Laporte" To: "Steve Green" Cc: "Sebastian Mecklenburg" ; Sent: Tuesday, January 08, 2002 5:07 PM Subject: Re: anonymous struct > I had the same problem not so long ago and that was the only way to fix > it that I have found (after a day of searching). Hopefully there was > not too too much code to change. > > It's annoying gcc won't let us do it like that because it is something I > have encountered a few times. > I have seen gcc patches to allow this but I am unable to tell if these > are in good shape or if they work with Mac OSX > > Yan Laporte > ylaporte@acm.org > > > > > I am not in front of my Mac right now, but try this.. > > It's not anonymous anymore, but do you really need > > it to be anonymous, or do you just need the data > > structure to work? > > > > struct Vector3D { > > union { > > struct { > > double x,y,z; > > } b; > > double a[3]; > > }; > > }; > > > > > > Vector3D vector; > > vector.b.x = 1.0; > > vector.a[1] = 2.0; > > > > _______________________________________________ > > 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 ddavidso at apple.com Tue Jan 8 15:57:03 2002 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:48:10 2005 Subject: Enabling Spell checking programmatically In-Reply-To: Message-ID: On Tuesday, January 8, 2002, at 02:26 PM, James Callender wrote: > Hey, been having some trouble with enabling auto-spellchecking > programmatically for NSTextField. There is a method available for text > views, but NSTextField seems to be missing some of this stuff but I > know it must be possible because you can enable auto-spellchecking from > the menu after the program has run. Any ideas? As-you-type spellchecking is a function of NSTextView; in this case, that would be the field editor. Douglas Davidson From tdavis at emware.com Tue Jan 8 16:08:01 2002 From: tdavis at emware.com (Terrance Davis) Date: Thu Nov 3 14:48:10 2005 Subject: how do I scroll to end of a NSTextView Message-ID: how do I scroll to end of a NSTextView? I'm adding to the text in the NSTextView and want it to scroll to the end of the text after I've updated it. I don't want anyone wasting time on a long explanation, just point me in the general direction. Thanks Terrance From nickzman at eskimo.com Tue Jan 8 16:28:00 2002 From: nickzman at eskimo.com (Nick Zitzmann) Date: Thu Nov 3 14:48:10 2005 Subject: how do I scroll to end of a NSTextView In-Reply-To: Message-ID: <8CBB5322-0497-11D6-A8F6-0050E410B21A@eskimo.com> On Tuesday, January 8, 2002, at 04:07 PM, Terrance Davis wrote: > how do I scroll to end of a NSTextView? > > I'm adding to the text in the NSTextView and want it to scroll > to the end of > the text after I've updated it. Try this: (Replace "txtOutput" with the name of your NSTextView) NSRange txtOutputRange; // declaration txtOutputRange.location = [[txtOutput textStorage] length]; txtOutputRange.length = [[txtOutput textStorage] length]; [txtOutput setEditable:YES]; // delete this if your NSTextView is always editable [txtOutput setSelectedRange:txtOutputRange]; // txtOutputRange contains the end point; set the insertion point there [txtOutput setEditable:NO]; // delete this if your NSTextView is always editable Nick Zitzmann ICQ: 22305512 "Democracy is a very delicate tool, and if you try to impose democracy without the basic civil society that supports it, you get yourself into a serious problem." - Edward Walker, former US Assistant Secretary of State for Near Eastern Affairs (2000-2001) From kpreid at attglobal.net Tue Jan 8 17:17:02 2002 From: kpreid at attglobal.net (Kevin Reid) Date: Thu Nov 3 14:48:10 2005 Subject: Keeping a NSTextView/NSScrollView scrolled to the bottom? Message-ID: <1f5pinz.iaqw581rh3vv1M%kpreid@attglobal.net> How do I scroll a NSScrollView containing a NSTextView to the bottom to display the new text? NSText's scrollRangeToVisible: isn't suitable as it apparently runs in O(N) time for the length of the text. I tried: [scrollView scrollClipView:[scrollView contentView] toPoint:[[self contentView] constrainScrollPoint:NSMakePoint(0,[[scrollView documentView] bounds].size.height)]]; but that doesn't work because the NSTextView doesn't re-layout (and resize) until my application returns to the run loop. To make this work, I tried: [[textView layoutManager] setBackgroundLayoutEnabled:NO]; but then layout was done only as the text was drawn, which was worse. My current solution is to set a NSTimer for 0 seconds to scroll the NSClipView. This works, but causes the scroll bar to jump around as the text view resizes, then later gets scrolled down. The only Cocoa application I can remember doing this is Project Builder (which the source isn't available for) and Console (which seems to have the same layout problem I encountered (!)). I've looked at the documentation for all the text system classes and haven't found anything suitable. -- Kevin Reid From hyperzoanoid at mac.com Tue Jan 8 19:40:02 2002 From: hyperzoanoid at mac.com (hyperzoanoid@mac.com) Date: Thu Nov 3 14:48:10 2005 Subject: MouseMoved Problems Message-ID: i have a mouseMoved method that adds the point to a dictionary after the mouse is moved. Also an image is composited to where it last was for feedback. Problem is, when setNeedsDisplay: is called the view is cleared, bad because i need to move the mouse around and then connect it back to where it started(this is for an animation program.) I think it has something to do with the window because to get mouse moved you have to set the window to watch for them. Does anybody know how to make it not clear the screen? P.S.- i also tried gathering the points and then using a loop to show feedback in the drawRect: method but it doesnt work either. Thanx In Advance -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 732 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020108/db49b6ac/attachment.bin From emoy at apple.com Tue Jan 8 22:27:00 2002 From: emoy at apple.com (emoy@apple.com) Date: Thu Nov 3 14:48:10 2005 Subject: MouseMoved Problems In-Reply-To: Message-ID: On Tuesday, January 8, 2002, at 07:49 PM, hyperzoanoid@mac.com wrote: > i have a mouseMoved method that adds the point to a dictionary after > the mouse is moved. Also an image is composited to where it last was > for feedback. Problem is, when setNeedsDisplay: is called the view is > cleared, bad because i need to move the mouse around and then connect > it back to where it started(this is for an animation program.) I think > it has something to do with the window because to get mouse moved you > have to set the window to watch for them. Does anybody know how to make > it not clear the screen? I recently had a similar problem, where I wanted to resize/reposition several views depending on the position of the mouse. I was get severe flickering, and when I single-stepped though the debugger, it turned out that one of the views was being cleared. I thought I had read somewhere about the key view getting cleared when setNeedsDisplay: is called, but when I looked, I couldn't seem to find it. So I stopped using setNeedsDisplay: and called the drawing routines directly, and my flickering went away. A word of caution is to remember to call lockFocus (and subsequently, unlockFocus) to set up the correct environment before calling drawRect:. -------------------------------------------------------------------------- Edward Moy Apple Computer, Inc. emoy@apple.com (This message is from me as a reader of this list, and not a statement from Apple.) From pr1 at club-internet.fr Wed Jan 9 00:29:00 2002 From: pr1 at club-internet.fr (Philippe de Rochambeau) Date: Thu Nov 3 14:48:10 2005 Subject: Custom GUI API Message-ID: <11F2DB43-04DB-11D6-B1A9-003065D64D74@club-internet.fr> Hello, does anyone know what would be involved in developing custom GUI API for MacOSX (for MacOSX Perl for instance)? Legally, can you develop non-Apple GUI API on MacOS X? Many thanks. Philippe de Rochambeau From kirby132 at hotmail.com Wed Jan 9 01:28:07 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:10 2005 Subject: Installing a Preference Pane Message-ID: >From: Finlay Dobbie >To: "Kevin Bohan" >CC: frank.vercruesse@gmx.de, macosx-dev@omnigroup.com >Subject: Re: Installing a Preference Pane >Date: Tue, 8 Jan 2002 19:53:21 +0000 > > > >Just wondering, why does your install authenticate? Seems a bit >pointless to me, considering the prefpane could be installed into >/Library/PreferencePanes as admin (not root, any admin user) or >~/Library/PreferencePanes as any user. > >You could do >for user in /Users; do >rm -f $user/Library/Caches/.ApplePrefPanesCache >done > >but that assumes that the user's home directory is in the standard place. > > -- Finlay > I install a daemon and a prefPane to set preferences associated with that daemon, that's why I authenticate. I also have to make the install reboot (which I would really prefer not to have to do, but I don't know of any way around it). Kirby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From osx-developer at www.com Wed Jan 9 03:04:00 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:10 2005 Subject: Compositing via the command line, How to do it now days? Message-ID: <200201091103.g09B36X20647@mail1.bigmailbox.com> Can anybody tell me what they do or what they suggest is the solution to compositing from the command line in OSX Server 10.1.2 ? Am I missing someway to make an Application run from the command line? Am I missing some way to make NSView Composite from a Cocoa Command Line Tool ? [EXPLAINATION] Originally in the OpenStep days even though one had to build an application still, you could from the command line execute the binary inside the application bundle and have it run and perform an NSView operation for image compositing as an example. I can have tools that convert formats, but when it comes to NSView and compositing there is no longer anyway to make it happen from the command line. I tried open myCommandLineCompositing.app source.tiff cmposite.tiff xPos Ypos operation Output.tiff, but it only tries to open all the files. I tried it with quotes open “myCommandLineCompositing.app source.tiff cmposite.tiff xPos Ypos operation Output.tiff” and it is an unknown file. If I do what worked before with OpenStep etc. by referencing the actual executable inside the application bundle something like this myCommandLineCompositing.app/myCommandLineCompositing source.tiff cmposite.tiff xPos Ypos operation Output.tiff, I get some warning about a .plist file not found. In the first place one would expect to be able to build a (Cocoa) command line tool, yet import the AppKit.framework and call the program do things like compositing NSView without any difficulties, so it seems instead of moving forward and making your classes useful/work in tools as well as application, we have made one step backwards and now the only chance of making it work is via PDO (which is also one step back instead of SSLayers and global access etc. lucky I have manage to build such a thing despite limited documentation and other bugs.). Okay so basically the reality is in OpenStep I could composite with NSViews from the command line, but in OSX this is now virtually impossible, but I would like to see it work from a real command line tool and not have to run it as an application. Even if I use this NSApp detachDrawingThread it does not work, so it seems something is in need of changing or fixing. I really think it’s likely both, the call to the binary of an application deep inside the application bundle should not error and fail, it should find the .plist files and other resources automatically even if run that way, and you should make NSViews usable from a command line tool. Now I found a thing you link to called ImageMagick but of course it fails to work with missing libraries, even if you add the libraries via make install source code, and take a source version of ImageMagick, etc. so ultimately what I am saying is you (Apple) should include your own set of image-processing tools for compositing etc. that shuffle bytes etc. If you did and tried to use your AppKit.framework you would find the same problems and that is actual unusable for command line operations, do the fixes I suggest and include image-manipulation tool set like convert, composite, etc. Thanks for listening *************************************** [FUSTRATION] My frustration is the fact that the wise developers at NeXT understood what was needed, and even if done in a round-about way (an Application as a tool) it was possible due to their wisdom, but with OSX I find nothing works anymore and the focus is so user oriented the power is diminished. Yet I foolishly continue to muster faith that somebody will listen to those who know how it was and how it should be. I also in OpenStep had used SDSC (Sandiego Super-Computing Center) tools for this yet only about 25% of that worked right at the time. NOTE: QuickDarw and OpenGL are basically bogus and not part of my UNIX OpenStep way of thinking, they are therefore not viable solutions it would seem to me, but whatever, as long as a full set of image-manipulation tools for the command-line are provided I really do not care how you (or Apple) make it happen. At this point I have done some pixel info extraction and will likely move forward on building this myself also. It is sad I need and love Objective-C in a profitable populated modern Operating System, yet I find repeatedly the real value of NeXT’s OpenStep has been over looked by Apple, while I hope and pray that history (and the path of discovery) will repeat itself eventually. Meanwhile new releases fix some things and break seeming more of other things then the number of things it fixes. *********************************** Can anybody tell me what they do or what they suggest is the solution to compositing from the command line in OSX Server 10.1.2 ? Am I missing someway to make an Application run from the command line? Am I missing some way to make NSView Composite from a Cocoa Command Line Tool ? ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From nathan_day at mac.com Wed Jan 9 03:48:00 2002 From: nathan_day at mac.com (Nathan Day) Date: Thu Nov 3 14:48:10 2005 Subject: Question about retrieving the names of system sounds... In-Reply-To: <4B3D4AF3-041B-11D6-8CDD-0050E410B21A@eskimo.com> Message-ID: This is some code I wrote to do the exact same thing. NSArray * pathsForLibraryResourcesOfType( NSSet * aTypes, NSString * aSubDirectory) { NSEnumerator * theLibrarysEnumerator; NSString * theLibraryPath; NSMutableArray * theFoundPaths; theFoundPaths = [NSMutableArray new]; theLibrarysEnumerator = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSAllDomainsMask, YES) objectEnumerator]; while( (theLibraryPath = [theLibrarysEnumerator nextObject]) ) { NSDirectoryEnumerator * theDirectoryEnumerator; NSString * theFilePath, * theSearchPath; theSearchPath = [theLibraryPath stringByAppendingFormat:@"/%@", aSubDirectory]; theDirectoryEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:theSearchPath]; while( (theFilePath = [theDirectoryEnumerator nextObject]) ) { if( [aTypes containsObject: [theFilePath pathExtension]] ) { [theFoundPaths addObject:[theSearchPath stringByAppendingFormat:@"/%@", theFilePath]]; } } } return theFoundPaths; } On Tuesday, January 8, 2002, at 08:07 PM, Nick Zitzmann wrote: > I've got a program where I'd like to get an NSArray containing all the > names of sound effects recognized directly by the system, ie. sound > effects that are stored in /System/Library/Sounds, /Library/Sounds, and > ~/Library/Sounds. > > I don't see anything in Cocoa that allows me to do this without > retrieving lists of files in each directory. I was thinking maybe try > getting the returning value of [[NSFileManager defaultManager] > directoryContentsAtPath:@"/System/Library/Sounds"], etc. but then I'd > have to manually go into each array and manually remove the file name > extensions off each entry. (It's got to be presentable to the user, you > know.) > > There's got to be an easier way of doing this... Is there? > > Nick Zitzmann > ICQ: 22305512 > > "Democracy is a very delicate tool, and if you try to impose democracy > without the basic civil society that supports it, you get yourself into > a serious problem." - Edward Walker, former US Assistant Secretary of > State for Near Eastern Affairs (2000-2001) > From dweebert at shaw.ca Wed Jan 9 06:40:00 2002 From: dweebert at shaw.ca (Graeme Hiebert) Date: Thu Nov 3 14:48:10 2005 Subject: Custom GUI API In-Reply-To: <11F2DB43-04DB-11D6-B1A9-003065D64D74@club-internet.fr> Message-ID: <94502AC0-050E-11D6-A1A3-003065C2675E@shaw.ca> On Wednesday, January 9, 2002, at 12:29 , Philippe de Rochambeau wrote: > does anyone know what would be involved in developing custom GUI API > for MacOSX (for MacOSX Perl for instance)? Legally, can you develop > non-Apple GUI API on MacOS X? Forgive me for sounding dumb, but what legality could possibly prevent you from developing a particular kind of software on your computer? When I finally get a mandate to port my employer's Windows software to Mac OS X, I intend of developing a scripting interface to the user interface, which will be portable (through writing of a small set of driver classes) to just about user interface API's, but still provide a fair amount direct control of the user interface elements. My goal is to fit things like dialogs (modal or nonmodal) into an end-user's existing application -- no matter what GUI API they have chosen to use -- even allowing small Tcl scripts or what have you manipulate the contents of, and respond to the actions of a subview of an existing onscreen window. This is in direct contrast to the common goal of providing a framework for building whole applications; I figure there are already enough such frameworks for people to choose from, and besides, I'm too lazy to implement such a thing. -g From fablosso at yahoo.com Wed Jan 9 07:17:00 2002 From: fablosso at yahoo.com (Fabio Losso) Date: Thu Nov 3 14:48:10 2005 Subject: NSHighlightRect() ?? Message-ID: <20020109151638.52793.qmail@web21206.mail.yahoo.com> There is a function called NSHighlightRect() that was a part of OPENSTEP, and had originally been a part of MacOSX. The release notes indicate that it's now obfiscated. It's function was to turn white to gray and gray to white in the designated rect - great for cell highlighting and unhighlighting. Without it, it seems the only option is to redraw the cell with the alternative colors, which is much more expensive. Are there still other options that I'm not aware of?? __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ From john at jcart.net Wed Jan 9 07:20:04 2002 From: john at jcart.net (John Carter) Date: Thu Nov 3 14:48:10 2005 Subject: Want to be define a NIB view which can be reused In-Reply-To: <200201082320.PAA28669@lists> Message-ID: <354DD782-0514-11D6-974C-003065F9B700@jcart.net> Hi, Can anyone tell me if it is possible to instantiate the same NIB NSView many times, each one referencing it's own controller? I would like to set something up where I have a NSScrollView of my own custom views, each being formatted similarly but identifying a different line of data. Or must each one of the custom views be coded programmatically? NIB files seem to be only linked to a single instance which seems a bit silly to me. regards. John Carter ---------------- http://www.jcart.net Tel : +33 (0)1 45 56 93 98 Tel : +33 (0)6 63 55 76 79 From bbum at codefab.com Wed Jan 9 07:25:57 2002 From: bbum at codefab.com (Bill Bumgarner) Date: Thu Nov 3 14:48:10 2005 Subject: [ANN] SSHPassKey 1.0 Message-ID: <8629B454-050D-11D6-8656-003065BA6C28@codefab.com> (Since originally announcing this on a couple of other lists, someone mentioned that the environment.plist configuration outlined below also enables use of ssh via cvs within CVL in contexts where ssh asks for a password.) I was getting tired of having to (a) deal w/ssh public key authorization and (b) effectively making my cvs servers trust everyone (in that PBX's SCM integration requires no password authentication). The enclosed app is working well for me with several different repositories (including sourceforge). It includes keychain support, so you only have to type in the password once per *server* (not just project/workarea). Easy to install-- double click the app and click the 'configure' button. Lots of details in the README. Source is available from mosxland.sourceforge.net: cvs -d :pserver:anonymous@cvs.mosxland.sourceforge.net:/cvsroot/mosxland login << no password >> cvs -d :pserver:anonymous@cvs.mosxland.sourceforge.net:/cvsroot/mosxland -z6 -q co SSHPassKey Or you can grab the binary: http://www.codefab.com/unsupported/SSHPassKey.app.sit Please let me know if you have any problems (or requests). You shouldn't, but testing wasn't exactly extensive (though it has been working well for others, too). The app DOES overwrite the 'PBXExtraPlugInFolders' preference in the com.apple.ProjectBuilder domain-- it is extremely unlikely that anyone outside of Apple uses that default. If someone can explain to me how to make the array form of that default work, the code is all there to make it preserve any prior value. If you aren't sure whether or not you use that default, do this prior to configuring the app: defaults read com.apple.ProjectBuilder PBXExtraPlugInFolders If it comes back with "(null)", then there is nothing to be overwritten. Now I'm just tired.... b.bum --- From the README: SSHPassKey is a simple application that can be used by ssh to ask for a password when not running ssh in a unix shell window. SSHPassKey can optionally store the passwords into the user's keychain. When stored in the keychain, any subsequent request for that password will be automatically handled by SSHPassKey. SSHPassKey includes a Project Builder plugin inside the app wrapper that can automatically configure Project Builder's CVS module to use SSHPassKey to for any password requests from ssh. The bundle can be automatically installed and configured by running SSHPassKey from the finder and clicking the Configure Project Builder to use SSH Ask Key found at the bottom of the README window. The button simply writes some defaults into the com.apple.ProjectBuilder defaults domain; the plugin provides UI for viewing the defaults. If the SSHPassKey app is moved, simply launch from the Finder and click the configure button again and the app will update the defaults to reflect the new location (otherwise, the CVS module's behavior will revert back to whatever it was prior to the installation of SSHPassKey). Simply click the Revert Project Builder to Default CVS Behavior to remove the four defaults from Project Builder's defaults domain to uninstall the pluging and disable the use of SSHPassKey. SSHPassKey cannot validate passwords or detect when a password changes. If a password stored in the keychain is incorrect or changes, the entry can be deleted using the Keychain Access application provided with OS X. Passwords are stored in the keychain by server name. If multiple accounts are used with a single server, the account can be viewed in Keychain Access by using the Get Info feature. If more than one SSHPassKey application is asking for the same password, the user only needs to type the password in once. Each instance of SSHPassKey monitors the keychain for changes and automatically rechecks for password availability any time a password has been added to or modified within a keychain. SSHPassKey makes no attempt to hide its app icon on the dock. The dock icon ensures that the password entry window is always just a click away -- handy when it becomes buried under numerous PB windows. Using SSHPassKey Universally By setting a couple of environment variables, SSHPassKey is automatically used by ssh whenever it needs a password, but is running without connection to TTY (i.e. running somewhere other than a shell window). This includes contexts outside of Project Builder (and, due to a bug in the Finder/Dock, will not always apply to PB anyway). OS X provides a mechanism for setting environment variables across all applications. Simply write the file ~/.MacOSX/environment.plist to contain the environment variables you need to have set. An example: { CVS_RSH=ssh; DISPLAY=localhost; SSH_ASKPASS="/Applications/SSHPassKey.app/Contents/MacOS/SSHPassKey"; } This assumes that SSHPassKey is installed in /Applications. The DISPLAY variable [likely -- it used to] must be set to a value; the actual value doesn't matter.Normally, it would be set to the X11 display to be used. In this context, the value is simply used to signal to ssh that a display device is available. The CVS_RSHsetting simply ensures that cvswill use sshfor all client/server communications. ?It willnot affect communication with local or pserver based repositories.SSH_ASKPASSmust be the absolute path to the actual binary within the application wrapper. Unfortunately, the above mechanism is broken for applications that are launched directly from the Finder or Dock. To launch Project Builder, for example, such that it picks up the above environment variables, go to a Terminal window and use the open command to open a project. From greg at afstrade.com Wed Jan 9 07:40:01 2002 From: greg at afstrade.com (Greg Anderson) Date: Thu Nov 3 14:48:10 2005 Subject: NSHighlightRect() ?? References: <200201091521.HAA26270@lists> Message-ID: <005701c19923$bd625dd0$6f20a8c0@VWBEETLE> You're right, NSHighlightRect() doesn't seem to work anymore. I was trying to figure this out a few weeks ago myself. I found a message from Drew Davidson in the macosx-dev archive indicating that even the AppKit now uses the technique you described: Redraw the text in an alternate set of colors (the user's desired colors can be requested through methods of NSColor). This is the only option I have found. And in my case, it was a bitch to reimplement. Greg Anderson From joel_berry at mac.com Wed Jan 9 07:57:01 2002 From: joel_berry at mac.com (Joel Berry) Date: Thu Nov 3 14:48:10 2005 Subject: Getting image files into the Image Buttons Message-ID: Forgive me, I am knew to Mac development, and especially Cocoa development (I come from the PC background)... anyway, I have experience in C and C++, so... My question is: what format do I use (PICT, TIFF, etc.) and do I use an Alpha Channel for transparency for the Image Buttons (the rounded corner buttons, etc.) I put in my app in the Interface Builder application? And also, how do I add these PICT/TIFF files to these Image Buttons and maintain the transparency? Do I need to make them the same size as the button, can I scale them later, do I import them? Like I said, I am knew to this environment, but the docs and books seem to be very slim on this particular issue... if you could guide me to articles, books, websites, etc., I would appreciate it, and of course, any help you could provide here would be very appreciated... Thanks! jdb joel_berry@mac.com From pr1 at club-internet.fr Wed Jan 9 08:00:02 2002 From: pr1 at club-internet.fr (pr1@club-internet.fr) Date: Thu Nov 3 14:48:10 2005 Subject: Custom GUI API Message-ID: I was thinking that perhaps Apple would not allow competing GUIs running on its system (I have never developed a GUI before). But you are right, in principle, there is no reason why you could not develop a proprietary GUI on MacOSX. I was just wondering how would go about developing a small proprietary GUI; are there any books available on the subject? Would you be obliged to use Objective-C or assembly rather than C/C++? Philippe de Rochambeau ----Message d'origine---- >Sujet: Re: Custom GUI API >De: Graeme Hiebert >A: Mac OS X Dev >Date: Wed, 9 Jan 2002 06:38:42 -0800 > >On Wednesday, January 9, 2002, at 12:29 , Philippe de Rochambeau wrote: > >> does anyone know what would be involved in developing custom GUI API >> for MacOSX (for MacOSX Perl for instance)? Legally, can you develop >> non-Apple GUI API on MacOS X? > >Forgive me for sounding dumb, but what legality could possibly prevent >you from developing a particular kind of software on your computer? > >When I finally get a mandate to port my employer's Windows software to >Mac OS X, I intend of developing a scripting interface to the user >interface, which will be portable (through writing of a small set of >driver classes) to just about user interface API's, but still provide a >fair amount direct control of the user interface elements. My goal is >to fit things like dialogs (modal or nonmodal) into an end-user's >existing application -- no matter what GUI API they have chosen to >use -- even allowing small Tcl scripts or what have you manipulate the >contents of, and respond to the actions of a subview of an existing >onscreen window. > >This is in direct contrast to the common goal of providing a framework >for building whole applications; I figure there are already enough such >frameworks for people to choose from, and besides, I'm too lazy to >implement such a thing. > > -g > >_____________________________________________ __ >MacOSX-dev mailing list >MacOSX-dev@omnigroup.com >http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From mlist at moensterchen.de Wed Jan 9 08:18:02 2002 From: mlist at moensterchen.de (Sebastian Duevel) Date: Thu Nov 3 14:48:10 2005 Subject: Getting path of file beeing dragged on a Java Cocoa-app? Message-ID: <13AC8C36-051C-11D6-86B5-0050E4E0C430@moensterchen.de> Hi, how do I get the path (as plain text, because it will be forwarded to a shell app) of a file that is dragged on my application icon in the Dock or Finder? It's for a Java Cocoa app. Cee Uhh! :o) ..::sebid::.. -- http://www.jumpingfish.de | http://www.deutsch-mac-dev.de From osx-developer at www.com Wed Jan 9 08:34:02 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:10 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore Message-ID: <200201091632.g09GWPR10159@mail15.bigmailbox.com> If you use stringWithContentsOfFile: [webHeaderedReadyForImageDataString appendString:[NSString stringWithContentsOfFile:@”/tmp/SomeImageFile.jpeg”]]; To append an image files data to a string that has been pre loaded with the appropriate headers for displaying via a web script. The method has been changed (since the wisdom of OpenStep) to interpret the data as Unicode characters. This damages the data and is not a true representation of what the bytes in the file are anymore or at least not directly displayable anymore. What do I do in light of this new wisdom now? Rebuild and redesign the string class method stringWithContentsOfFile: should this not be called stringWithContentsOfFile: andInterpretAsUnicodedIfPossible:(BOOL)botherWithTheNewWay !?! [NO] From Mystified and our new leaders thought processes. I got a thousand lines of code to find and change now otherwise, a virtually impossible and quite disabling situation. ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From aozer at apple.com Wed Jan 9 08:39:03 2002 From: aozer at apple.com (Ali Ozer) Date: Thu Nov 3 14:48:10 2005 Subject: NSHighlightRect() ?? In-Reply-To: <20020109151638.52793.qmail@web21206.mail.yahoo.com> Message-ID: <3BB85816-051F-11D6-AC52-003065D642EC@apple.com> > There is a function called NSHighlightRect() that was > a part of OPENSTEP, and had originally been a part of > MacOSX. The release notes indicate that it's now > obfiscated. > > It's function was to turn white to gray and gray to > white in the designated rect - great for cell > highlighting and unhighlighting. > > Without it, it seems the only option is to redraw the > cell with the alternative colors, which is much more > expensive. This worked great when all we had were four color choices, but swapping white and gray no longer does the trick in many situations. Also, these kind of operations (swapping colors, general xor, etc) don't work too well in the presence of anti-aliasing. So redrawing is a better approach. Ali -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 796 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020109/c2f61313/attachment.bin From tritchey at vacuumgenesis.com Wed Jan 9 09:19:00 2002 From: tritchey at vacuumgenesis.com (Timothy Ritchey) Date: Thu Nov 3 14:48:10 2005 Subject: Want to be define a NIB view which can be reused In-Reply-To: <354DD782-0514-11D6-974C-003065F9B700@jcart.net> Message-ID: I am interested in something very similar. I want to display forms for data objects, where each line could be: title: NSTextFieldCell (basically NSFormCell), or title: NSComboBox, etc. In other words, I would love something exactly like NSForm, but where I could alter each NSFormCell to use a different field control (text, combobox, popup, etc). So, "Use NSMatrix" is the proper thing to use I would think, but I can't figure out how to create my own NSFormCell-like objects. I would like to create my own NSCell objects, but I have no idea where to begin. NSCell is an enormous class - do I have to implement all of those functions (or NSActionCell for that matter)? I think I could do it pretty easily with views, but that doesn't seem the "proper" way to do it. I wish I could see the code for the NSFormCell class to see how it should be done. I have looked around the archives, but haven't found anything yet. Any pointers would be appreciated. tim On Wednesday, January 9, 2002, at 10:19 AM, John Carter wrote: > Hi, > Can anyone tell me if it is possible to instantiate the same NIB NSView > many times, each one referencing it's own controller? I would like to > set something up where I have a NSScrollView of my own custom views, > each being formatted similarly but identifying a different line of > data. Or must each one of the custom views be coded programmatically? > > NIB files seem to be only linked to a single instance which seems a bit > silly to me. > regards. > John Carter > ---------------- > http://www.jcart.net > Tel : +33 (0)1 45 56 93 98 > Tel : +33 (0)6 63 55 76 79 > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From embassociates at qwest.net Wed Jan 9 10:04:01 2002 From: embassociates at qwest.net (Erik M. Buck) Date: Thu Nov 3 14:48:11 2005 Subject: Want to be define a NIB view which can be reused References: Message-ID: <004001c19938$1fb10e00$11146441@bc7440b> http://www.google.com/search?as_q=NSCell+custom+&num=100&btnG=Google+Search& as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt= i&as_sitesearch=&safe=off Here is my favorite: http://www.stepwise.com/Articles/Technical/NSCell.html ----- Original Message ----- From: "Timothy Ritchey" To: Sent: Wednesday, January 09, 2002 11:18 AM Subject: Re: Want to be define a NIB view which can be reused > I am interested in something very similar. I want to display forms for > data objects, where each line could be: title: NSTextFieldCell > (basically NSFormCell), or title: NSComboBox, etc. In other words, I > would love something exactly like NSForm, but where I could alter each > NSFormCell to use a different field control (text, combobox, popup, > etc). So, "Use NSMatrix" is the proper thing to use I would think, but I > can't figure out how to create my own NSFormCell-like objects. I would > like to create my own NSCell objects, but I have no idea where to begin. > NSCell is an enormous class - do I have to implement all of those > functions (or NSActionCell for that matter)? I think I could do it > pretty easily with views, but that doesn't seem the "proper" way to do > it. I wish I could see the code for the NSFormCell class to see how it > should be done. I have looked around the archives, but haven't found > anything yet. Any pointers would be appreciated. > > tim > > On Wednesday, January 9, 2002, at 10:19 AM, John Carter wrote: > > > Hi, > > Can anyone tell me if it is possible to instantiate the same NIB NSView > > many times, each one referencing it's own controller? I would like to > > set something up where I have a NSScrollView of my own custom views, > > each being formatted similarly but identifying a different line of > > data. Or must each one of the custom views be coded programmatically? > > > > NIB files seem to be only linked to a single instance which seems a bit > > silly to me. > > regards. > > John Carter > > ---------------- > > http://www.jcart.net > > Tel : +33 (0)1 45 56 93 98 > > Tel : +33 (0)6 63 55 76 79 > > > > _______________________________________________ > > 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 finlay.dobbie at btinternet.com Wed Jan 9 10:40:02 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:11 2005 Subject: Getting path of file beeing dragged on a Java Cocoa-app? In-Reply-To: <13AC8C36-051C-11D6-86B5-0050E4E0C430@moensterchen.de> Message-ID: On Wednesday, January 9, 2002, at 04:15 pm, Sebastian Duevel wrote: > how do I get the path (as plain text, because it will be forwarded to a > shell app) of a file that is dragged on my application icon in the Dock > or Finder? > > It's for a Java Cocoa app. - (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename; NSApplication delegate method in Obj-C, hopefully you have some idea of what this would be in Java. -- Finlay From finlay.dobbie at btinternet.com Wed Jan 9 10:40:58 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:11 2005 Subject: Custom GUI API In-Reply-To: Message-ID: <41D13046-052F-11D6-8564-000502319F17@btinternet.com> On Wednesday, January 9, 2002, at 03:58 pm, pr1@club-internet.fr wrote: > I was thinking that perhaps Apple would not allow > competing GUIs running on its system (I have never > developed a GUI before). But you are right, in principle, there > is no reason why you could not develop a proprietary GUI on > MacOSX. I was just wondering how would go about > developing a small proprietary GUI; are there any books > available on the subject? Would you be obliged to use > Objective-C or assembly rather than C/C++? See XFree86, which is an "alternative" GUI for Mac OS X and Darwin. It is written in C. You can write in any language just so long as you have the compiler. The question is WHY you would want to develop a GUI, because it would undoubtedly be a lot of work and it's unlikely that you will get much third party support. -- Finlay From mlist at moensterchen.de Wed Jan 9 12:24:12 2002 From: mlist at moensterchen.de (Sebastian Duevel) Date: Thu Nov 3 14:48:11 2005 Subject: Getting path of file beeing dragged on a Java Cocoa-app? In-Reply-To: Message-ID: Am Mittwoch den, 9. Januar 2002, um 19:37, schrieb Finlay Dobbie: > - (BOOL)application:(NSApplication *)sender openFile:(NSString > *)filename; > NSApplication delegate method in Obj-C, hopefully you have some idea of > what this would be in Java. Thank you. In Java it's public abstract boolean applicationOpenFile( NSApplication theApplication, String filename) Cee Uhh! :o) ..::sebid::.. -- http://www.jumpingfish.de | http://www.deutsch-mac-dev.de From ryanstevens at mac.com Wed Jan 9 20:09:10 2002 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:48:11 2005 Subject: Getting path of file beeing dragged on a Java Cocoa-app? In-Reply-To: Message-ID: .../Developer/Applications/JavaBrowser.app goto: com.apple.cocoa.application.NSApplication Click on themthar books and scroll down to The Delegate and Notifications section. "You can assign a delegate to NSApplication.sharedApplication(). The delegate responds to certain messages on behalf of NSApplication.sharedApplication(). Some of these messages, such as applicationOpenFile, ask the delegate to perform an action." .... HTH :-) On Wednesday, January 9, 2002, at 10:37 AM, Finlay Dobbie wrote: > > On Wednesday, January 9, 2002, at 04:15 pm, Sebastian Duevel wrote: > >> how do I get the path (as plain text, because it will be forwarded to >> a shell app) of a file that is dragged on my application icon in the >> Dock or Finder? >> >> It's for a Java Cocoa app. > > - (BOOL)application:(NSApplication *)sender openFile:(NSString > *)filename; > NSApplication delegate method in Obj-C, hopefully you have some idea of > what this would be in Java. > > -- Finlay > > _______________________________________________ > 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: 1452 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020109/1e05ca94/attachment.bin From p.thibault at bigfoot.com Thu Jan 10 12:29:04 2002 From: p.thibault at bigfoot.com (Pierre Thibault) Date: Thu Nov 3 14:48:11 2005 Subject: NXTypesPair Message-ID: Hi folks, Do you know where NXTypesPair is defined? My application, Self Introspector, is having problems decoding the types of the member variables of this class from the runtime information. I have the character '%' to decode and I don't know what is the meaning of this character. Regards. -------------------------- Pierre From aozer at apple.com Thu Jan 10 12:34:16 2002 From: aozer at apple.com (Ali Ozer) Date: Thu Nov 3 14:48:11 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore In-Reply-To: <200201091632.g09GWPR10159@mail15.bigmailbox.com> Message-ID: <636BDCF4-056A-11D6-B785-003065D642EC@apple.com> > If you use stringWithContentsOfFile: > [webHeaderedReadyForImageDataString appendString:[NSString > stringWithContentsOfFile:@?/tmp/SomeImageFile.jpeg?]]; > > To append an image files data to a string that has been pre loaded with > the appropriate headers for displaying via a web script. > The method has been changed (since the wisdom of OpenStep) to interpret > the data as Unicode characters. > This damages the data and is not a true representation of what the > bytes in the file are anymore or at least not directly displayable > anymore. This method has not been changed, it works as before and as documented. If the file looks like Unicode (starts off with FEFF or FFEF), it will load as Unicode; otherwise it will use the default system encoding (which has changed from NextStep to MacRoman). Perhaps in the past the NextStep encoding was working better for jpeg images, or perhaps webHeaderedReadyForImageDataString string which you are appending to had an 8-bit backing store which allowed the append to just work. To load bytes without interpretation, you can use something like [NSData dataWithContentsOfFile:]. To append it as a string to another string, explicitly convert it to an NSString (either through custom code, or by using NSString initWithData:encoding: using whatever appropriate conversion/encoding you need to do for the web script). Ali -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1426 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020110/fb774fac/attachment.bin From stewer at mac.com Thu Jan 10 12:35:11 2002 From: stewer at mac.com (Stefan Werner) Date: Thu Nov 3 14:48:11 2005 Subject: intercepting input events Message-ID: <227D0F50-056D-11D6-B5C8-00039357A9D4@mac.com> Hi, I am looking for a way to tap the OS X event chain. If anyone ever had contact with BeOS' input_server and it's filter plugins, you know what I'm talking about. I want to recieve and eventually modify keyboard and mouse events in the background, thus sitting somewhere in between the driver and the application. All I could find so far on that subject is a program called iJect (and uControl, which is based on iJect), but that one operates in the kernel space. However, there are programs like Unsanity's "haxies" (Windowshade X, Xounds) that apparently operate in user space. However, I could not find any documented API that allowed me to intercept keyboard events. Is there an inofficial documentation for the window server? TIA, Stefan -- Make love, not Linux. From djw_lists at pacbell.net Thu Jan 10 12:51:17 2002 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:48:11 2005 Subject: Lack of Scriptability, was Re: iPhoto plugins In-Reply-To: Message-ID: <77441B35-058F-11D6-9993-00039315D3C2@pacbell.net> It appears that there is a lot of resistance within Apple to make their Apps scriptable -- and Apple needs to hear this. People should file bug reports (bugreport.apple.com) about this, so that Apple will hear you! Requests like this mean much more coming from outside of Apple than from Inside Apple, from what I hear. The Applescript people are frustrated that Apple's apps aren't very scriptable, so it clearly needs outside support! Dan Wood On Tuesday, January 8, 2002, at 08:40 AM, Michael Grant wrote: > On 1/7/02 11:05 PM, "Greg Titus" wrote: > >> iPhoto >> is indeed a Cocoa app > > But not scriptable. What happened to "free" scriptability for > Cocoa apps? > Michael > -- > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > When you?re paranoid, everything makes sense. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > -- Dan Wood dwood@karelia.com http://www.karelia.com/ Watson for Mac OS X: http://www.karelia.com/watson/ From emoy at apple.com Thu Jan 10 12:57:51 2002 From: emoy at apple.com (emoy@apple.com) Date: Thu Nov 3 14:48:11 2005 Subject: Getting path of file beeing dragged on a Java Cocoa-app? In-Reply-To: <13AC8C36-051C-11D6-86B5-0050E4E0C430@moensterchen.de> Message-ID: <43D001A6-0596-11D6-B1A9-0003930AAF98@apple.com> On Wednesday, January 9, 2002, at 08:15 AM, Sebastian Duevel wrote: > how do I get the path (as plain text, because it will be forwarded to a > shell app) of a file that is dragged on my application icon in the Dock > or Finder? > > It's for a Java Cocoa app. I'm assuming it works the same in Java as in Objective C, so all you do is register NSFilenamesPboardType as one type you respond to (this assumes you are already working with pasteboards in your code). Then when the user drags a Finder icon, you can get the NSFilenamesPboardType, which will be an array of paths. -------------------------------------------------------------------------- Edward Moy Apple Computer, Inc. emoy@apple.com (This message is from me as a reader of this list, and not a statement From pr1 at club-internet.fr Thu Jan 10 13:01:50 2002 From: pr1 at club-internet.fr (Philippe de Rochambeau) Date: Thu Nov 3 14:48:11 2005 Subject: Custom GUI API In-Reply-To: <41D13046-052F-11D6-8564-000502319F17@btinternet.com> Message-ID: Hello, Perl for MacOSX has no GUI and the Apple developer in charge of Tk does not seem to have time to port it to MacOSX: >> >> I have put Wish in ~/MyApps (I created the folder myself since an >> Application folder did not already exist). and the frameworks in >> ~/Library/Frameworks (I created the Frameworks folder myself since it >> did not already exist). >> >> Furthemore, I would like to use it with Perl. Any hints? >> >A couple of people have expressed interest in this, but it is a lot of work >to make this happen. The biggest problem is that TkPerl is using a pretty >old version of Tk, and so someone will have to do the TkPerl magic to update >the code base to 8.4. This seems not to be entirely trivial, and last I >heard no one was actively working on it. >Jim Ingham so I was thinking of developing my own GUI. I will have a look at XFree86 though. Many thanks. Philippe de Rochambeau Le mercredi 9 janvier 2002, ? 07:32 , Finlay Dobbie a ?crit : > > On Wednesday, January 9, 2002, at 03:58 pm, pr1@club-internet.fr wrote: > >> I was thinking that perhaps Apple would not allow >> competing GUIs running on its system (I have never >> developed a GUI before). But you are right, in principle, there >> is no reason why you could not develop a proprietary GUI on >> MacOSX. I was just wondering how would go about >> developing a small proprietary GUI; are there any books >> available on the subject? Would you be obliged to use >> Objective-C or assembly rather than C/C++? > > See XFree86, which is an "alternative" GUI for Mac OS X and Darwin. It > is written in C. You can write in any language just so long as you have > the compiler. The question is WHY you would want to develop a GUI, > because it would undoubtedly be a lot of work and it's unlikely that > you will get much third party support. > > -- Finlay > > _______________________________________________ > 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: 2135 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020110/f37fef6c/attachment.bin From osx-developer at www.com Thu Jan 10 13:04:56 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:11 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore Message-ID: <200201101011.g0AAB2332738@mail21.bigmailbox.com> Thanks for your response. I have tried doing as you say and a lot of the EncodingTypes Fail and crash the system (sounds like they should error nil to me buggy). In the end I cannot even pass this data to any other NSString without it corrupting from what I can tell. Then putting it back to NSData via dataWithBytes:[webImageString cString] length:[webImageString length] causes the program to crash yet again. The cascading rippling crashing/errors that occur because of this change make the NSString unusable in yet another way for me. Is there a way? What should I do? How can/should I form the bug report? What should be the best solution for Apple to make the NSString class useful to me again (one day)? Maybe I should create my own string class that overrides [NSString new] and all other +(id)creator methods to make NSNEXTSTEPEncodingStrings, maybe only then I could use that NEW/OLD_STYLE_String class to undo the damage that has been done to the NSString class. Then I could do a global replace of NSString and NSMutableString with ORIGINALNSString and ORIGINALNSMutableString, without having to replace the stringWithContentsOfFile though I can see the need to replace that method since it is a +(id)creation method also, hopefully I would not need to replace the actual loading of the data if NSASCIIStringEncoding or NSNEXTSTEPStringEncoding returns the functionality of the original wiser string class. Maybe setString: and appendString need to check the different encoding types and act appropriately, but then maybe I should be able to setEncoding: or something but I would still need to replace the class since that would be easier. I really do not understand what must be done to undo this mistake, maybe Apple should consider restoring the original NSString class as NSNEXTSTEPString and NSNEXTSTEPMutableString, or better yet just leave them as they were and if they make such a fundamental change they should call it MOSString (for MacOS String) or some other thing because what is in the place of NSString is not a NextStepString which NS stands for !?! Again I see history repeating itself, clearly this Class is not as useful to me as in was with OpenStep. Something intelligent needs to be done. The question is what? How about I be able to change (or toggle) the Encoding for the Application via messages to NSApplication. This would only affect operations on strings leaving existing strings with their current encoding, unless acted on? Of course the conversions should/would not cause crashes, from any type to any type as they currently do (most types to most types). ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From cjbehm at mac.com Thu Jan 10 13:05:19 2002 From: cjbehm at mac.com (Chris Behm) Date: Thu Nov 3 14:48:11 2005 Subject: Want to be define a NIB view which can be reused In-Reply-To: <354DD782-0514-11D6-974C-003065F9B700@jcart.net> Message-ID: <0241FA64-05B5-11D6-8207-00050251E667@mac.com> Apologies if I'm mis-reading, but I'm not entirely sure that I know what you're asking for. What it seems like your asking about is using more than one instance of an object (in this case a view) from the same nib file. This is certainly doable, every time you load the nib file (say with [NSBundle loadNibNamed:@"name" owner:owner]) you get new instances of the objects it contains. So for each instance of your view that you want, load the nib file. It sounds like you'll want a nib file that contains only your custom nsview. Then you load that nib file using the object you want to act as controller as the owner. When the nib file is loaded, all the outlet and action connections are made to the object passed in as the owner. Each nib file is a collection of objects intended to be instantiated and connected together, so it makes sense to me that each time the nib file is loaded it unarchives all the objects within. Sorry if I'm not entirely coherent sounding, it's 5:30 am and I just happened to be checking my mail. Chris On Wednesday, January 9, 2002, at 10:19 AM, John Carter wrote: > Hi, > Can anyone tell me if it is possible to instantiate the same NIB NSView > many times, each one referencing it's own controller? I would like to > set something up where I have a NSScrollView of my own custom views, > each being formatted similarly but identifying a different line of > data. Or must each one of the custom views be coded programmatically? > > NIB files seem to be only linked to a single instance which seems a bit > silly to me. > regards. > John Carter > ---------------- > http://www.jcart.net > Tel : +33 (0)1 45 56 93 98 > Tel : +33 (0)6 63 55 76 79 > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From drehring at home.com Thu Jan 10 13:27:04 2002 From: drehring at home.com (David Rehring) Date: Thu Nov 3 14:48:11 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore In-Reply-To: <200201101011.g0AAB2332738@mail21.bigmailbox.com> Message-ID: From drehring at home.com Thu Jan 10 13:41:59 2002 From: drehring at home.com (David Rehring) Date: Thu Nov 3 14:48:11 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore In-Reply-To: Message-ID: On 1/10/02 1:24 PM, David Rehring at drehring@home.com wrote: > From your previous message >> If you use stringWithContentsOfFile: >> [webHeaderedReadyForImageDataString appendString:[NSString >> >stringWithContentsOfFile:@?/tmp/SomeImageFile.jpeg?]]; > > On 1/10/02 2:11 AM, OSX Developer at osx-developer@www.com wrote: > >> I have tried doing as you say and a lot of the EncodingTypes Fail and crash >> the system (sounds like they should error nil to me buggy). >> In the end I cannot even pass this data to any other NSString without it >> corrupting from what I can tell. >> Then putting it back to NSData via dataWithBytes:[webImageString cString] >> length:[webImageString length] causes the program to crash yet again. >> The cascading rippling crashing/errors that occur because of this change make >> the NSString unusable in yet another way for me. >> >> Is there a way? What should I do? How can/should I form the bug report? What >> should be the best solution for Apple to make the NSString class useful to me >> again (one day)? > > Why are you loading a binary image into an NSString? It seems to me that it > would be more appropriate to directly load it into an NSData object... > > If for some reason I had to store a binary object [which isn't a text string > using some encoding]in an NSString object, I would expect to have to binhex > the data or convert it to a stream of hex bytes before storing it in the > NSString object. Oops...I skipped rereading this part of his original message: >To append an image files data to a string that has been pre loaded with the >appropriate headers for displaying via a web script. >The method has been changed (since the wisdom of OpenStep) to interpret the >data as Unicode characters. >This damages the data and is not a true representation of what the bytes in the >file are anymore or at least not directly displayable anymore. I would still use NSData instead of NSString. Try building up your html as-is [in an NSString], then copy it to an NSData object, then append the image data to the NSData object, followed by any other HTML you need to add. Later, -- David Rehring Psychos do not explode when light hits Senior Software Engineer them, no matter how crazy they are... Atimi Software, Inc. www.atimi.com And totally insane guy! From aulwes at jiiva.com Thu Jan 10 13:50:26 2002 From: aulwes at jiiva.com (Rob Aulwes) Date: Thu Nov 3 14:48:11 2005 Subject: problems using MallocDebug Message-ID: Hi All, I'm trying to use MallocDebug to track down memory leaks, but I'm unable to launch my C tool. When I click on "Launch", MallocDebug hangs and then displays an error panel: Unable to read malloc information from (null) I read through the latest release notes and did add the linker option -flat_namespace. My program links to another C-based framework, and the framework performs initialization when it's loaded (using API from mach-o/dyld.h). I also tried to statically link the MallocDebug library in order to run from Terminal, but MallocDebug complains that the program is attempting to read an address deemed unreadable, and MallocDebug terminates the program (the program does run when not linked against MallocDebug). Thanks for the help, Rob Aulwes From alex at raftis.net Thu Jan 10 13:54:00 2002 From: alex at raftis.net (Alex Raftis) Date: Thu Nov 3 14:48:11 2005 Subject: Compositing via the command line, How to do it now days? In-Reply-To: <200201091103.g09B36X20647@mail1.bigmailbox.com> Message-ID: <4EB573CA-05EF-11D6-80B1-000393196340@raftis.net> On Wednesday, January 9, 2002, at 05:03 AM, OSX Developer wrote: > Can anybody tell me what they do or what they suggest is the solution > to compositing from the command line in OSX Server 10.1.2 ? > Am I missing someway to make an Application run from the command line? > Am I missing some way to make NSView Composite from a Cocoa Command > Line Tool ? I do this a lot, if I understand what you're getting at. Basically, NSView won't work without an NSApplication running. So, at the top of you main(), but after the instantiation of an autorelease pool, call: [[NSApplication alloc] init]; Now, you can create NSWindows, lock focus on NSViews, or, most importantly, lock focus on an NSImage, which does the two previous. However, there's a couple of extra caveats here with Mac OS X. Most importantly, you'll almost certainly have to be logged into the console. This is because portions of AppKit will try to access certain shared servers. Some of these are always running and others are only running when you're logged in. Regardless, many of these cannot be contacted unless the command line tool and the user on the console are the same person. The later can be partially over-come if you run the tools suid root (or presumably make use of the authentication manager). Still, you may encounter problems with the font servers. I haven't researched all the issues completely, mostly because I've been able to get things to run "well enough", which if the tool is just for you, is probably good enough. Now, a brief rant: Unfortunately, Apple and the AppKit engineers don't seem to understand the usefulness of command lines tools for accessing AppKit classes. However, there's a number of really useful classes in AppKit, like NSImage and NSAttributedString (the AppKit portions) that are really useful as command line tools. Thus, it would be really nice if AppKit could deal with running when a user was not logged into the console, even if they were still prevented from creating on screen windows. So, as fuel for the fire, here's a couple of projects I have that run on the command line, yet make use of AppKit: 1. An automatic news reader. This program scans news groups in the background and pulls out articles and information I may be interested in reading. Since many news articles are MIME encoded, my tool makes extensive use of NSAttributedString, but suffers from the problems above which require I be logged into the computer. It'll throw exceptions if I'm not. 2. Small tools for creating web buttons. I'm not the type who enjoys repetitive work, so I hate using tools like PhotoShop for creating buttons. However, I have extensive scripts and command line tools for doing this for me. These make use of NSImage for all the compositing. But, once again, I must be logged into the console to make use of these tools. In this case, this isn't a problem, since I've yet to need to use these tools remotely. Anyways, just some thoughts, ideas, and hopefully a little help. Alex Raftis --- alex@raftis.net From alex at raftis.net Thu Jan 10 13:54:22 2002 From: alex at raftis.net (Alex Raftis) Date: Thu Nov 3 14:48:11 2005 Subject: Getting image files into the Image Buttons In-Reply-To: Message-ID: <567A3EF6-05F0-11D6-80B1-000393196340@raftis.net> On Wednesday, January 9, 2002, at 09:58 AM, Joel Berry wrote: > Forgive me, I am knew to Mac development, and especially Cocoa > development (I come from the PC background)... anyway, I have > experience in C and C++, so... > > My question is: what format do I use (PICT, TIFF, etc.) and do I use an > Alpha Channel for transparency for the Image Buttons (the rounded > corner buttons, etc.) I put in my app in the Interface Builder > application? You can use any image format supported by NSImage. Currently, that includes, but is not limited to, PICT, TIFF, PNG, GIF, BMP, ICO, ICNS, TARGA, PhotoShop, RGB, etc... However, for good alpha channel support, I'd suggest TIFF or PNG. As a little more detail, NSImage natively supports TIFF, PNG, GIF, and BMP for reading and writing. However, it also supports QuickTime for reading other formats. Thus, if QuickTime can view the picture, NSImage can load it. > And also, how do I add these PICT/TIFF files to these Image Buttons and > maintain the transparency? Do I need to make them the same size as the > button, can I scale them later, do I import them? Images won't scale when added to a button, so make sure it's the correct size. Also, images in buttons will use the source over compositing mode, so make sure they'll look good when composited in this manner. Generally speaking, they will. > Like I said, I am knew to this environment, but the docs and books seem > to be very slim on this particular issue... if you could guide me to > articles, books, websites, etc., I would appreciate it, and of course, > any help you could provide here would be very appreciated... Finally, as a last note, be careful using PhotoShop to produce TIFF's for use with AppKit. There are still some lingering issues on how PhotoShop and Apple interpret the alpha channel, and you may get some funky looking results. If you're going to use PhotoShop to edit images for use in AppKit, I'd suggest exporting them to PNG. I hope this helps, Alex Raftis --- alex@raftis.net From chris at mantis-design.com Thu Jan 10 14:01:28 2002 From: chris at mantis-design.com (Chris Ruzin) Date: Thu Nov 3 14:48:11 2005 Subject: Finding substrings Message-ID: <41845BE4-0614-11D6-95E4-0030654327E0@mantis-design.com> I know I'm having a brain fart on this one, but what's the best way to find a substring? Say I've got a string like this: Quotations I only want http://www.quotationspage.com/ out of it. How do I do this? Thanks, Chris From aozer at apple.com Thu Jan 10 14:05:35 2002 From: aozer at apple.com (Ali Ozer) Date: Thu Nov 3 14:48:11 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore In-Reply-To: <200201101011.g0AAB2332738@mail21.bigmailbox.com> Message-ID: <5E538C0B-05F9-11D6-8521-003065D642EC@apple.com> The fact that in your app using the code you showed NSString worked for you at some point with NextStep encoding is luck. Trying to fix the problem by using NextStep encoding is not the right answer. You really want to load the JPEG in as NSData, then convert that NSData to a format that is appropriate for the string you are appending to. What format do you need? If something like Base64, you can just process the bytes in the NSData and generate your own NSString. Or do you just need the raw bytes appended to your string? If that, then you will need to get more tricky; the most correct solution is to take your string (the one you are appending to), convert it to the appropriate encoding you eventually will need, then append the NSData to that, as is. BTW, no matter what the data you feed in, NSString conversion failures should return nil or BOOL (depending on the function) --- if you are seeing otherwise, you should report a bug; if possible, include part of the original data and the encoding that is causing the crash. Ali On Thursday, January 10, 2002, at 02:11 AM, OSX Developer wrote: > Thanks for your response. > I have tried doing as you say and a lot of the EncodingTypes Fail and > crash the system (sounds like they should error nil to me buggy). > In the end I cannot even pass this data to any other NSString without > it corrupting from what I can tell. > Then putting it back to NSData via dataWithBytes:[webImageString > cString] length:[webImageString length] causes the program to crash yet > again. > The cascading rippling crashing/errors that occur because of this > change make the NSString unusable in yet another way for me. > > Is there a way? What should I do? How can/should I form the bug report? > What should be the best solution for Apple to make the NSString class > useful to me again (one day)? > > Maybe I should create my own string class that overrides [NSString new] > and all other +(id)creator methods to make NSNEXTSTEPEncodingStrings, > maybe only then I could use that NEW/OLD_STYLE_String class to undo the > damage that has been done to the NSString class. > Then I could do a global replace of NSString and NSMutableString with > ORIGINALNSString and ORIGINALNSMutableString, without having to replace > the stringWithContentsOfFile though I can see the need to replace that > method since it is a +(id)creation method also, hopefully I would not > need to replace the actual loading of the data if NSASCIIStringEncoding > or NSNEXTSTEPStringEncoding returns the functionality of the original > wiser string class. > Maybe setString: and appendString need to check the different encoding > types and act appropriately, but then maybe I should be able to > setEncoding: or something but I would still need to replace the class > since that would be easier. > I really do not understand what must be done to undo this mistake, > maybe Apple should consider restoring the original NSString class as > NSNEXTSTEPString and NSNEXTSTEPMutableString, or better yet just leave > them as they were and if they make such a fundamental change they > should call it MOSString (for MacOS String) or some other thing because > what is in the place of NSString is not a NextStepString which NS > stands for !?! > Again I see history repeating itself, clearly this Class is not as > useful to me as in was with OpenStep. Something intelligent needs to be > done. The question is what? > How about I be able to change (or toggle) the Encoding for the > Application via messages to NSApplication. This would only affect > operations on strings leaving existing strings with their current > encoding, unless acted on? Of course the conversions should/would not > cause crashes, from any type to any type as they currently do (most > types to most types). > > > > > > > ------------------------------------------------------------ > WWW.COM - Where the Web Begins! http://www.www.com From sdm7g at minsky.med.virginia.edu Thu Jan 10 14:09:24 2002 From: sdm7g at minsky.med.virginia.edu (Steven D. Majewski) Date: Thu Nov 3 14:48:11 2005 Subject: iPhoto plugins In-Reply-To: Message-ID: On Tue, 8 Jan 2002, Michael Grant wrote: > On 1/7/02 11:05 PM, "Greg Titus" wrote: > > > iPhoto > > is indeed a Cocoa app > > But not scriptable. What happened to "free" scriptability for Cocoa apps? > Michael It is scriptable -- see: -- sdm From dimitry.markman at verizon.net Thu Jan 10 14:21:31 2002 From: dimitry.markman at verizon.net (Dmitry Markman) Date: Thu Nov 3 14:48:11 2005 Subject: iPhoto plugins In-Reply-To: Message-ID: <0E46A7BE-0618-11D6-AE25-00039303FDBE@verizon.net> > > It is scriptable -- see: > > > it's not scriptable it doesn't have any dictionary all iPhoto scripts deal with Finder or other applications (iTunes, QuickTime Player) iPhoto itself isn't sciptable so far Dmitry Markman From andy at cocoadevcentral.com Thu Jan 10 14:24:04 2002 From: andy at cocoadevcentral.com (Andreas Monitzer) Date: Thu Nov 3 14:48:11 2005 Subject: Finding substrings In-Reply-To: <41845BE4-0614-11D6-95E4-0030654327E0@mantis-design.com> Message-ID: On Thursday, January 10, 2002, at 10:51 , Chris Ruzin wrote: > I know I'm having a brain fart on this one, but what's the best way to > find a substring? Say I've got a string like this: > > Quotations > > I only want http://www.quotationspage.com/ out of it. How do I do this? Use regexps (search list archive) or NSScanner. andy From embassociates at qwest.net Thu Jan 10 14:32:02 2002 From: embassociates at qwest.net (Erik M. Buck) Date: Thu Nov 3 14:48:11 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore References: <200201101011.g0AAB2332738@mail21.bigmailbox.com> Message-ID: <008501c19a27$849c1c70$0101a8c0@karma> Why would you expect a string to sensibly store binary image data ? Why not just use NSData for image data ? NSData is a much better container for arbitrary bytes than NSString. Strings have implied encoding etc. ----- Original Message ----- From: "OSX Developer" To: Cc: Sent: Thursday, January 10, 2002 4:11 AM Subject: Re: stringWithContentsOfFile not loading image files correctly anymore > Thanks for your response. > I have tried doing as you say and a lot of the EncodingTypes Fail and crash the system (sounds like they should error nil to me buggy). > In the end I cannot even pass this data to any other NSString without it corrupting from what I can tell. > Then putting it back to NSData via dataWithBytes:[webImageString cString] length:[webImageString length] causes the program to crash yet again. > The cascading rippling crashing/errors that occur because of this change make the NSString unusable in yet another way for me. > > Is there a way? What should I do? How can/should I form the bug report? What should be the best solution for Apple to make the NSString class useful to me again (one day)? > > Maybe I should create my own string class that overrides [NSString new] and all other +(id)creator methods to make NSNEXTSTEPEncodingStrings, maybe only then I could use that NEW/OLD_STYLE_String class to undo the damage that has been done to the NSString class. > Then I could do a global replace of NSString and NSMutableString with ORIGINALNSString and ORIGINALNSMutableString, without having to replace the stringWithContentsOfFile though I can see the need to replace that method since it is a +(id)creation method also, hopefully I would not need to replace the actual loading of the data if NSASCIIStringEncoding or NSNEXTSTEPStringEncoding returns the functionality of the original wiser string class. > Maybe setString: and appendString need to check the different encoding types and act appropriately, but then maybe I should be able to setEncoding: or something but I would still need to replace the class since that would be easier. > I really do not understand what must be done to undo this mistake, maybe Apple should consider restoring the original NSString class as NSNEXTSTEPString and NSNEXTSTEPMutableString, or better yet just leave them as they were and if they make such a fundamental change they should call it MOSString (for MacOS String) or some other thing because what is in the place of NSString is not a NextStepString which NS stands for !?! > Again I see history repeating itself, clearly this Class is not as useful to me as in was with OpenStep. Something intelligent needs to be done. The question is what? > How about I be able to change (or toggle) the Encoding for the Application via messages to NSApplication. This would only affect operations on strings leaving existing strings with their current encoding, unless acted on? Of course the conversions should/would not cause crashes, from any type to any type as they currently do (most types to most types). > > > > > > > ------------------------------------------------------------ > WWW.COM - Where the Web Begins! http://www.www.com > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From rgrant at mac.com Thu Jan 10 17:19:01 2002 From: rgrant at mac.com (rgrant@mac.com) Date: Thu Nov 3 14:48:11 2005 Subject: tar and AppleScript applications In-Reply-To: <53BD0DF0-01A4-11D6-98B9-003065C13422@mac.com> Message-ID: <253371F4-0631-11D6-AEC2-00039381760A@mac.com> OK, I'm doing something dumb here. I've written a little AppleScript and saved it as an Application. It works fine on my box but when I tar it up for distribution and then untar it to test it out I get a blank icon even though the permissions and the file itself are identical. I don't get it... How does OS X know the difference?? Confused and needing help.... Robert. From chmod007 at mac.com Thu Jan 10 17:26:05 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:48:11 2005 Subject: tar and AppleScript applications In-Reply-To: <253371F4-0631-11D6-AEC2-00039381760A@mac.com> Message-ID: > OK, > > I'm doing something dumb here. I've written a little AppleScript and > saved it as an Application. It works fine on my box but when I tar it up > for > distribution and then untar it to test it out I get a blank icon even > though the > permissions and the file itself are identical. I don't get it... How > does OS X > know the difference?? > > Confused and needing help.... Do not tar it. The tar format does not preserve the Macintosh resource fork. Use .sit or .dmg to preserve this data when passing the file over the internet. / sincerely, david From wriddick at usa.net Thu Jan 10 18:27:02 2002 From: wriddick at usa.net (Wade Riddick) Date: Thu Nov 3 14:48:11 2005 Subject: Custom GUI API In-Reply-To: <94502AC0-050E-11D6-A1A3-003065C2675E@shaw.ca> References: <11F2DB43-04DB-11D6-B1A9-003065D64D74@club-internet.fr> Message-ID: >> does anyone know what would be involved in developing custom GUI API >> for MacOSX (for MacOSX Perl for instance)? Legally, can you develop >> non-Apple GUI API on MacOS X? > >Forgive me for sounding dumb, but what legality could possibly prevent >you from developing a particular kind of software on your computer? You'd be surprised. There's a fairly long history of GUI litigation, dating from the _Apple vs. Microsoft_ and _Lotus vs. Borland_ days. Apple and Microsoft and other large companies are typically covered by cross-licensing regimes. Small developers aren't. Second, even if there is no legal basis, that doesn't prevent you from getting sued by a large corporation with deep pockets who's only interest in obstructing the competition. The only way to answer either of these questions is to consult a lawyer with knowledge of this area of the industry. From macserv at attbi.com Thu Jan 10 18:57:00 2002 From: macserv at attbi.com (Matt Judy) Date: Thu Nov 3 14:48:11 2005 Subject: Adjusting NSTableView row height for custom fonts Message-ID: <3C3E5459.4060508@attbi.com> Hello, I'm allowing the user to select the font for browsing a list in an NSTableView. I'm setting the font in the tableView's dataSource: - (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { if ([aCell respondsToSelector:@selector(setFont:)]) { NSFont *font = [preferences browseTableFont]; [aCell setFont:font]; } ... } When I do this, I have 2 problems. 1-) Even if I use the default font (Lucida Grande 13pt), it is drawn in the cell below middle. NSCell doesn't seem to have a method for setting vertical alignment. 2-) The cell height is too small to display large fonts. I can use setRowHeight: to adjust the height of the cells, but the centering thing is still a problem. I'm assuming there's a nice implementation already in use out there... How have you guys been doing this? Thanks. --Matt Judy From ryanstevens at mac.com Thu Jan 10 19:05:03 2002 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:48:11 2005 Subject: Adjusting NSTableView row height for custom fonts In-Reply-To: <3C3E5459.4060508@attbi.com> Message-ID: <91E3C85C-063D-11D6-9750-000502E1087E@mac.com> - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { return someAttributedString; } Other than that...uh, beats me! ;-) On Thursday, January 10, 2002, at 06:56 PM, Matt Judy wrote: > Hello, > > I'm allowing the user to select the font for browsing a list in an > NSTableView. I'm setting the font in the tableView's dataSource: > > - (void)tableView:(NSTableView *)aTableView > willDisplayCell:(id)aCell > forTableColumn:(NSTableColumn *)aTableColumn > row:(int)rowIndex > { > if ([aCell respondsToSelector:@selector(setFont:)]) { > NSFont *font = [preferences browseTableFont]; > [aCell setFont:font]; > } > > ... > } > > When I do this, I have 2 problems. > > 1-) Even if I use the default font (Lucida Grande 13pt), it is drawn in > the cell below middle. NSCell doesn't seem to have a method for setting > vertical alignment. > > 2-) The cell height is too small to display large fonts. I can use > setRowHeight: to adjust the height of the cells, but the centering thing > is still a problem. > > I'm assuming there's a nice implementation already in use out there... > How have you guys been doing this? > > Thanks. > --Matt Judy > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From Alec.Bartsch at disney.com Thu Jan 10 19:34:00 2002 From: Alec.Bartsch at disney.com (Bartsch, Alec) Date: Thu Nov 3 14:48:11 2005 Subject: Adjusting NSTableView row height for custom fonts References: <3C3E5459.4060508@attbi.com> Message-ID: <3C3E5CEA.1A867E41@fa.disney.com> Matt Judy wrote: > > Hello, > > I'm allowing the user to select the font for browsing a list in an > NSTableView. I'm setting the font in the tableView's dataSource: > Since you're using one font for the whole table, you could also set it just once whenever the user changes for font, for example in the changeFont: action method of your NSDocument. Something like this (no guarantees, typing from memory): -(void)changeFont:(id)sender { NSFont* newFont = [sender convertFont: [sender selectedFont]]; NSEnumerator* columns = [[myTableView tableColumns] objectEnumerator]; NSTableColumn* column; while (column = [columns nextObject]) [[column dataCell] setFont: newFont]; [myTableView setRowHeight: [newFont defaultLineHeightForFont] + 2]; } Not sure about your vertical centering problem... I haven't seen that. -------------------------------------------------------------------- Alec Bartsch / Walt Disney Feature Animation: The Secret Lab / x3227 From phil at tcp.net.au Thu Jan 10 19:52:01 2002 From: phil at tcp.net.au (Phil Blake) Date: Thu Nov 3 14:48:11 2005 Subject: Custom Target in PB Message-ID: <766DC042-0646-11D6-B15D-003065A85E10@tcp.net.au> Hi everyone. I want to create a target in ProjectBuilder that allows me to run a custom script when I press the build button and NOTHING ELSE. ie. I have a script in the top level of my project directory called fullBuild.sh. When I click the build button in PB, I want it to exec that script. Do you know how to do this? I've been playing around with different targets but can't find one that includes what I want. Thanks in advance, Phil From benbargagliotti at yahoo.com Thu Jan 10 20:43:01 2002 From: benbargagliotti at yahoo.com (Ben Bargagliott) Date: Thu Nov 3 14:48:11 2005 Subject: does my program need GPL In-Reply-To: <200201110241.SAA08536@lists.omnigroup.com> Message-ID: <20020111044101.16511.qmail@web20310.mail.yahoo.com> I just wrote a GUI wrapper for LAME, the mp3 encoder/decoder. since LAME is GPL, does my program need to be under GPL? i'm going to release it and the source for free regardless, but i was just wondering if i am obligated. also, how would i go about releasing it under GPL? thanks ben __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ From jkh at apple.com Thu Jan 10 20:57:00 2002 From: jkh at apple.com (Jordan Hubbard) Date: Thu Nov 3 14:48:11 2005 Subject: does my program need GPL In-Reply-To: <20020111044101.16511.qmail@web20310.mail.yahoo.com> Message-ID: <6386C96B-064F-11D6-BBB4-003065590F94@apple.com> If it's a wrapper which crosses a fork/exec boundry to exec lame then you can use whatever license you want to use for your program. It's only if you link with LAME itself (e.g. you added a -gui option to the lame binary and had it be responsible for putting up the UI) that your work falls under the GPL. On Thursday, January 10, 2002, at 08:41 , Ben Bargagliott wrote: > I just wrote a GUI wrapper for LAME, the mp3 > encoder/decoder. since LAME is GPL, does my program > need to be under GPL? i'm going to release it and the > source for free regardless, but i was just wondering > if i am obligated. also, how would i go about > releasing it under GPL? thanks > > ben > > __________________________________________________ > Do You Yahoo!? > Send FREE video emails in Yahoo! Mail! > http://promo.yahoo.com/videomail/ > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > -- Jordan K. Hubbard Engineering Manager, BSD technology group Apple Computer From njriley at uiuc.edu Thu Jan 10 22:04:02 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:48:11 2005 Subject: NSPopUpButton displaying custom title Message-ID: <20020111000350.A1101027@uiuc.edu> Hi, I would like to have a NSPopUpButton display something other than the selected menu item text, or nothing, as appear to be the only choices. (I would like it to display an abbreviated version of the selected item, actually, minus some spacing and explanatory text that is part of the menu item text). I can think of two ways to possibly to do this. I haven't implemented either, so I don't know whether they're possible in exactly the fashion I mention, but I was hoping that someone would suggest an easier method... 1. Use setUsesItemFromMenu: NO and place a NSTextField over the top of the button, then set the button text when an item is selected. 2. When an item is selected, change the menu item text. When the menu is popped up, change the text back to what it was before. What I don't understand is why I can't just use setTitle: when setUsesItemFromMenu is NO; it just has no effect. Any advice appreciated. Thanks, -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From jflow at mac.com Thu Jan 10 22:38:02 2002 From: jflow at mac.com (Jon) Date: Thu Nov 3 14:48:11 2005 Subject: NSToolbar problem Message-ID: Am having a problem getting a NSToolbar to show up on a window. I have implimented the three required delegates in my WindowController, have connected the window to the File's Owner in IB. Have also setup the toolbar when the window is created and setToolbar:toolbar. Not sure where I went wrong but any and all help would be appreciated. I have looked at example code and even working code from some open source projects. I seem to be following them and doing what they do, but it just doesn't want to work for me.... Thanks again... Jon -- From joar at joar.com Thu Jan 10 22:41:02 2002 From: joar at joar.com (j o a r) Date: Thu Nov 3 14:48:11 2005 Subject: tar and AppleScript applications In-Reply-To: Message-ID: <254D39DE-065E-11D6-A25C-003065683BC2@joar.com> On Friday, January 11, 2002, at 02:23 , David Remahl wrote: > Do not tar it. The tar format does not preserve the Macintosh resource > fork. > Use .sit or .dmg to preserve this data when passing the file over the > internet. ...and don't use .sit if you have any filenames longer then 31 characters (and those could be "hidden" inside the application wrapper mind you). j o a r From andreas0330 at home.com Thu Jan 10 23:37:08 2002 From: andreas0330 at home.com (Andreas Schwarz) Date: Thu Nov 3 14:48:11 2005 Subject: NSScrollView and NSMenu problems Message-ID: I've got two questions today. First is a problem I'm having with an NSScrollView. I've set the NSClipView's setCopiesOnScroll: to YES. This works wonderfully, exactly as expected, when I'm scrolling downwards. The document view (a custom view of mine) gets passed an appropriate rectangle in the drawRect: method that describes only the newly exposed part of the frame. However, when I scroll upwards it doesn't work. The drawRect: method gets passed a rect equal to the view's visible frame as if setCopiesOnScroll: were set to NO. Does anyone have any ideas on why this is happening? I've tried, but I can't figure it out. Second, I'm experiencing a problem with my app's main menu. At times I add or remove menu items from it (depending on what type of window is key). Removing them isn't a problem; I call [[NSApp mainMenu] removeItem:theMenuItem] and the menu item disappears from the main menu. Adding the menu item, however, doesn't work quite so smoothly. I call [[NSApp mainMenu] insertItem:theMenuItem atIndex:theIndex] and while it DOES add the menu item to the menu, the menu display does not get updated until the user clicks on the menu, at which point the added menu will suddenly show up. I have tried calling various methods like [[NSApp mainMenu] update] and [[NSApp mainMenu] sizeToFit] in the hopes that it would update the menu's display, but to no avail. What am I doing wrong? Thanks in advance, Andreas Schwarz From macserv at attbi.com Thu Jan 10 23:59:13 2002 From: macserv at attbi.com (Matt Judy) Date: Thu Nov 3 14:48:12 2005 Subject: Adjusting NSTableView row height for custom fonts References: Message-ID: <3C3E9AEE.3000409@attbi.com> I tried the approach of using an NSAttributedString, and it does exactly the same thing... I've attached a partial screenshot. Any ideas? --Matt Judy -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 7.tiff Type: image/tiff Size: 95207 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020110/4b8bf7f2/Picture7.tiff From rohith at robosoftin.com Fri Jan 11 00:33:23 2002 From: rohith at robosoftin.com (Rohith Bhat) Date: Thu Nov 3 14:48:12 2005 Subject: CVS and Mac OS 10.1 Message-ID: Hi there We have our project set up to use CVS for SCM. This CVS Server is basically an iMac running Mac OS X 10.1 server. Till recently all the client machines were running Mac OS X 10.0.4 clients with 10.0.4 Developer tools and we did not have any problems checking in, checking out, committing, updating files between the clients and the server. We used to mount the "CVS Server's" volume on the client machine using AppleTalk and used to give the full path while performing the CVS operations from the Terminal application Recently we made the move to Mac OS X 10.1 on the client side and also to the Mac OS X 10.1 Developer tools (*not* the December developer tools). After moving to 10.1 on the client side, the CVS 'commit' fails, although other CVS operations like 'Restore', 'Check Out', work. The error that we are getting is: cvs [commit aborted]: could not open lock file `/Volumes/Shared/CVS/project/,file1.java,': Permission denied I tried using the 'SCM' menu item under Project Builder and I get a similar error message. The Privileges are all set fine and this does not seems to be the problem. Full privilege is given to the repository files and also to the sandbox(local copy) files. For testing purpose, I tried creating a test repository on my local hard drive and tried to commit files on to it. This worked fine. So I guess that the problem has something to do with mounting the CVS Server volume over a network. Has anything with respect to mounting volumes, changed from Mac OS 10.0.4 to 10.1 ? Did anyone experience similar problems ? Does anyone have any inputs for me ? Thanks in advance Regards Rohith Bhat Robosoft Technologies -------------------------------------------------------------- Robosoft Technologies, Mangalore, India From marcel at metaobject.com Fri Jan 11 01:10:31 2002 From: marcel at metaobject.com (Marcel Weiher) Date: Thu Nov 3 14:48:12 2005 Subject: Compositing via the command line, How to do it now days? In-Reply-To: <4EB573CA-05EF-11D6-80B1-000393196340@raftis.net> Message-ID: On Donnerstag, Januar 10, 2002, at 06:27 Uhr, Alex Raftis wrote: > On Wednesday, January 9, 2002, at 05:03 AM, OSX Developer wrote: >> Can anybody tell me what they do or what they suggest is the solution >> to compositing from the command line in OSX Server 10.1.2 ? >> Am I missing someway to make an Application run from the command line? >> Am I missing some way to make NSView Composite from a Cocoa Command >> Line Tool ? > > I do this a lot, if I understand what you're getting at. Basically, > NSView won't work without an NSApplication running. So, at the top of > you main(), but after the instantiation of an autorelease pool, call: > > [[NSApplication alloc] init]; > > Now, you can create NSWindows, lock focus on NSViews, or, most > importantly, lock focus on an NSImage, which does the two previous. Minor nit: I'd prefer to use [NSApplication sharedApplication], which ensures you're only ever allocating one application object. Marcel -- Marcel Weiher Metaobject Software Technologies marcel@metaobject.com www.metaobject.com Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc. From marcel at metaobject.com Fri Jan 11 01:18:38 2002 From: marcel at metaobject.com (Marcel Weiher) Date: Thu Nov 3 14:48:12 2005 Subject: tar and AppleScript applications In-Reply-To: <254D39DE-065E-11D6-A25C-003065683BC2@joar.com> Message-ID: <70BE98FE-0673-11D6-AC67-0005025E227F@metaobject.com> On Freitag, Januar 11, 2002, at 07:40 Uhr, j o a r wrote: > > On Friday, January 11, 2002, at 02:23 , David Remahl wrote: > >> Do not tar it. The tar format does not preserve the Macintosh resource >> fork. >> Use .sit or .dmg to preserve this data when passing the file over the >> internet. > > ...and don't use .sit if you have any filenames longer then 31 > characters (and those could be "hidden" inside the application wrapper > mind you). So you might use hfstar or hfspax, both of which extend their respective base-programs to deal with HFS+ info (meta-data, resource forks). Marcel -- Marcel Weiher Metaobject Software Technologies marcel@metaobject.com www.metaobject.com Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc. From osx-developer at www.com Fri Jan 11 02:39:09 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:12 2005 Subject: Compositing via the command line, How to do it now days? Message-ID: <200201111037.g0BAb4631226@mail18.bigmailbox.com> And a Double Amen to all that which you said, I have thought this for years. I am only sorry I did not have the wisdom to try [[NSApplication alloc] init] in a tool to access NSView etc., it is working again. You saved me a lot of hassle, this is a critical feature. I believe initializing an NSApplication object should launch application server proccesses etc. as needed, so they work without someone logged in also. I wonder if its possible to do it manually anyway? I will add that computers are ment to do work for you, not to have you slave in an interface, I also automated graphic proccess saving me years of work. I can generate 1000's of images in minutes, while with a GUI you would be spending months. Then add the redo redo redo minus human error and you have the meaning of computerization, and quite an advantage, one less employee needed. I am glad to see there are some people that think like I do still around, you would think we should be running the world with this kind of time saving advantages !!! (please stand by...) >Date: Thu, 10 Jan 2002 11:27:22 -0600 > Re: Compositing via the command line, How to do it now days?Cc: macosx-dev@omnigroup.com > "OSX Developer" Alex Raftis > >On Wednesday, January 9, 2002, at 05:03 AM, OSX Developer wrote: > >> Can anybody tell me what they do or what they suggest is the solution >> to compositing from the command line in OSX Server 10.1.2 ? >> Am I missing someway to make an Application run from the command line? >> Am I missing some way to make NSView Composite from a Cocoa Command >> Line Tool ? > >I do this a lot, if I understand what you're getting at. Basically, >NSView won't work without an NSApplication running. So, at the top of >you main(), but after the instantiation of an autorelease pool, call: > > [[NSApplication alloc] init]; > >Now, you can create NSWindows, lock focus on NSViews, or, most >importantly, lock focus on an NSImage, which does the two previous. > >However, there's a couple of extra caveats here with Mac OS X. Most >importantly, you'll almost certainly have to be logged into the console. >This is because portions of AppKit will try to access certain shared >servers. Some of these are always running and others are only running >when you're logged in. Regardless, many of these cannot be contacted >unless the command line tool and the user on the console are the same >person. > >The later can be partially over-come if you run the tools suid root (or >presumably make use of the authentication manager). Still, you may >encounter problems with the font servers. > >I haven't researched all the issues completely, mostly because I've been >able to get things to run "well enough", which if the tool is just for >you, is probably good enough. > >Now, a brief rant: Unfortunately, Apple and the AppKit engineers don't >seem to understand the usefulness of command lines tools for accessing >AppKit classes. However, there's a number of really useful classes in >AppKit, like NSImage and NSAttributedString (the AppKit portions) that >are really useful as command line tools. Thus, it would be really nice >if AppKit could deal with running when a user was not logged into the >console, even if they were still prevented from creating on screen >windows. > >So, as fuel for the fire, here's a couple of projects I have that run on >the command line, yet make use of AppKit: > >1. An automatic news reader. This program scans news groups in the >background and pulls out articles and information I may be interested in >reading. Since many news articles are MIME encoded, my tool makes >extensive use of NSAttributedString, but suffers from the problems above >which require I be logged into the computer. It'll throw exceptions if >I'm not. > >2. Small tools for creating web buttons. I'm not the type who enjoys >repetitive work, so I hate using tools like PhotoShop for creating >buttons. However, I have extensive scripts and command line tools for >doing this for me. These make use of NSImage for all the compositing. >But, once again, I must be logged into the console to make use of these >tools. In this case, this isn't a problem, since I've yet to need to use >these tools remotely. > >Anyways, just some thoughts, ideas, and hopefully a little help. > >Alex Raftis >--- >alex@raftis.net ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From osx-developer at www.com Fri Jan 11 02:49:15 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:12 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore Message-ID: <200201111047.g0BAl4B31903@mail18.bigmailbox.com> Thanks for your help. I am beginning the process of rebuilding everything to pass things via NSData. I figure it is a good thing that I did all this work before Apple entered my world, because to see what's going on inside an NSData object as in the String contents, is not as easy. I figure therefore a newbie is less likely to do it as fast as I originally was able to do. (OSX=less useful, again.) [On the subject of value inpection] I also feel the in the ProjectBuilder, one would expect to see the value inspector display the [anObject description] for any *objectPointers all I see is *<0xhexed>, then I have to manually enter 'po objectPointer' in the PB-debug-console and there is not even a button for this it is a cut and paste hassle. Thanks again for your assistance/feedback. ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From jba at bullex.de Fri Jan 11 02:55:17 2002 From: jba at bullex.de (Jens Baumeister) Date: Thu Nov 3 14:48:12 2005 Subject: does my program need GPL Message-ID: > -----Original Message----- > From: Jordan Hubbard [mailto:jkh@apple.com] > > If it's a wrapper which crosses a fork/exec boundry to exec lame then > you can use whatever license you want to use for your program. It's > only if you link with LAME itself (e.g. you added a -gui > option to the > lame binary and had it be responsible for putting up the UI) > that your > work falls under the GPL. I'm no expert on this (and the wording on the GNU site is a bit vague), so I may very well be wrong, but I researched a similar problem a couple of days ago and it seemed like the general consenus was that as long as at runtime your app depends on a GPL program in any way to perform its functionality, it would need to be GPL'd. (One example case was this: A frontend for multiple FTP-apps - some GPL, some not - would not need to be under the GPL. A frontend for one specific GPL FTP application however would need to be under the GPL because it depens upon the GPL application just as it would depend upon a GPL lib. Not sure if that's common consenus, though.) Related question: If I don't link to the GPL app but include it in my app's bundle, I'll probably have to GPL the whole thing, because the GPL application is part of my executable, right? _____________________________________ Jens Baumeister Bullex GmbH, Cologne, Germany She sells c-shells by the sea shore. From osx-developer at www.com Fri Jan 11 02:55:27 2002 From: osx-developer at www.com (OSX Developer) Date: Thu Nov 3 14:48:12 2005 Subject: Compositing via the command line, How to do it now days? Message-ID: <200201111051.g0BApwN32205@mail18.bigmailbox.com> >>Minor nit: I'd prefer to use [NSApplication sharedApplication], which >ensures you're only ever allocating one application object. > >Marcel > > >-- >Marcel Weiher Metaobject Software Technologies >marcel@metaobject.com www.metaobject.com >Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc. Minor Nit?!? No way this is further critical brilliance !!! A BIG Thank you to you also metadude, from me and any of the other archive readers. ------------------------------------------------------------ WWW.COM - Where the Web Begins! http://www.www.com From nickzman at eskimo.com Fri Jan 11 03:21:23 2002 From: nickzman at eskimo.com (Nick Zitzmann) Date: Thu Nov 3 14:48:12 2005 Subject: Retrieving an NSString from an NSArray...? Message-ID: I've got another problem that is giving me trouble in my quest to get a list of sound effects installed on the system. Now I have the list in NSStrings stored in an NSArray, but if I try accessing them in any way, such as this: NSString *teststring = [array objectAtIndex:0]; The program mysteriously crashes at this point. I can't send the object to any other object that accepts NSStrings or it will crash as well. How am I supposed to properly get the item out of the array? If it helps, this is what the array looks like inside courtesy of NSLog: {type = immutable, count = 13, values = ( 0 : Basso 1 : Bonk 2 : Frog 3 : Funk 4 : Glass 5 : Ping 6 : Pong2003 7 : Pop 8 : Purr 9 : Sosumi 10 : Submarine 11 : Temple 12 : Tink )} Nick Zitzmann ICQ: 22305512 "Democracy is a very delicate tool, and if you try to impose democracy without the basic civil society that supports it, you get yourself into a serious problem." - Edward Walker, former US Assistant Secretary of State for Near Eastern Affairs (2000-2001) From oplusplus at home.com Fri Jan 11 03:44:44 2002 From: oplusplus at home.com (oplusplus@home.com) Date: Thu Nov 3 14:48:12 2005 Subject: iPhoto plugins In-Reply-To: Message-ID: <0CF17581-0688-11D6-86A2-0030659B2A02@home.com> All of those scripts involve dragging from IPhoto onto the target script, as such it doesn't seem that you are scripting iphoto, Just using scripts with the clipboard. Also it doesn't have a dictionary. P On Thursday, January 10, 2002, at 02:43 PM, Steven D. Majewski wrote: > On Tue, 8 Jan 2002, Michael Grant wrote: > >> On 1/7/02 11:05 PM, "Greg Titus" wrote: >> >>> iPhoto >>> is indeed a Cocoa app >> >> But not scriptable. What happened to "free" scriptability for Cocoa >> apps? >> Michael > > It is scriptable -- see: > > > -- sdm > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From kirby132 at hotmail.com Fri Jan 11 04:10:31 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:12 2005 Subject: AppleScript and tar, and what is .DS_Store? Message-ID: Hi, Someone had posted a message about a saved AppleScript Application losing its icon when tar'ed and then untared. I would like to also note that if you open a Terminal window and use cp to copy the saved Applescript application to a different folder, the icon is also lost. If you use mv to move it around the icon is preserved. I also noted that a file called .DS_Store keeps being created automatically. Anyone know what this is for? You seem to be able to delete it without any repercussions. What does it contain? Should I worry about there being instances in a build of software I am planning to release? Does .DS_Store bear any relation to the preservation of the application icon, or is the loss of the icon a resource fork thing? Kirby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From joel_berry at mac.com Fri Jan 11 06:18:07 2002 From: joel_berry at mac.com (Joel Berry) Date: Thu Nov 3 14:48:12 2005 Subject: BUG? Is it me... Message-ID: <88B656B6-069D-11D6-9A63-0050E420F527@mac.com> Or is the "size" option in the Show Info window (Interface Builder) non-functional? I am using v1.1.1 of the Project Builder and v2.2 of the Interface Builder (12/01 Dev Tools)... I can't get the size "panel" to come up for windows, buttons, etc., and I have been trying to follow along in the Learning Cocoa book... am I doing something wrong? Is it a bug? Also, it seems that PB and IB have changed quite a bit since this book was published... right? Thanks, jdb joel_berry@mac.com From kirby132 at hotmail.com Fri Jan 11 08:35:37 2002 From: kirby132 at hotmail.com (Kevin Bohan) Date: Thu Nov 3 14:48:12 2005 Subject: CFUserNotification. Can I make it appear off center? Message-ID: Hi, I have a daemon that may need to present a CFUserNotification even at the login screen. When it does the notification appear under the login window (Z-order), and so if I have set up the list-style login window, I cannot see it. If I have the non-list type then I can just see the title bar of the nofification. I cannot see any way of making the notification appear anywhere other than the center of the screen, or a way of making it assume the top Z-order. Are either of these possible? Kirby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From robboa at extensis.com Fri Jan 11 10:23:59 2002 From: robboa at extensis.com (Olsen-Albright, Robb) Date: Thu Nov 3 14:48:12 2005 Subject: Using Cocoa and Carbon together... In-Reply-To: <200201110241.SAA08548@lists.omnigroup.com> Message-ID: <9560DC18-06BF-11D6-B11E-003065B61754@extensis.com> Sorry if this is a really newbie question: I'm working on getting some carbon database code to work inside of a Cocoa app. I've seen comments around the web about people doing this, so I'm pretty sure it can be done. However, I haven't found any references to the starting points, i.e. which headers do you use and where do you include them? I've seemed to have gotten really close, but I always run into problems with overlapping types, undefined symbols, etc. I've even tried putting a lot of the carbon code into a framework, but still problems. So, can anyone point me to a quick HOWTO type starting point for using carbon code in a cocoa app? thanks, robb olsen-albright From andy at cocoadevcentral.com Fri Jan 11 12:04:39 2002 From: andy at cocoadevcentral.com (Andreas Monitzer) Date: Thu Nov 3 14:48:12 2005 Subject: Custom GUI API In-Reply-To: Message-ID: On Thursday, January 10, 2002, at 09:19 , Philippe de Rochambeau wrote: > Perl for MacOSX has no GUI and the Apple developer in charge of Tk does > not seem to have time to port it to MacOSX: huh? http://publicsource.apple.com/news/index.html 16 October 2001 - Tk ported to Mac OS X v10.1 Apple announces a native port of Tk version 8.4a4 for Mac OS X 10.1. Tk is a rapid application GUI toolkit used by Tcl, Perl, and Python. The Tk release allows script developers to run existing GUI applications with a native Aqua look and feel directly on Mac OS X v10.1. As part of Apple's ongoing commitment to Open Source, this port has been released under a BSD-style license. Apple's changes have been and will continue to be submitted to the main Tcl/Tk CVS repository at tcl.sourceforge.net. From ethorteran at mac.com Fri Jan 11 12:22:22 2002 From: ethorteran at mac.com (Erik Thorteran) Date: Thu Nov 3 14:48:12 2005 Subject: Using non-local CVS projects in PB? Message-ID: <7D954A36-06CF-11D6-85B9-003065CCD2F4@mac.com> Whenever i try to use a CVS folder that i got form my home computer on this computer, it has to disable it, because (i assume) the RSH isn't set to SSH. Is that it? How do i fix that? Erik From pr1 at club-internet.fr Fri Jan 11 13:15:03 2002 From: pr1 at club-internet.fr (Philippe de Rochambeau) Date: Thu Nov 3 14:48:12 2005 Subject: Custom GUI API In-Reply-To: Message-ID: <6420A14C-06D8-11D6-A63E-003065D64D74@club-internet.fr> Here is the off-the-record announcement: De : Jim Ingham Date : Jeu 10 jan 2002 02:54:45 Europe/Paris ? : Philippe de Rochambeau , Objet : R?p : [MACTCL] MacOSX Tk On 1/9/02 1:30 AM, "Philippe de Rochambeau" wrote: Hello, has anyone managed to make MacOSX Tk, which is available at SourceForge, to work? Typing ' puts stdout {Hello, World!}' in the console yields the following message: can not find channel named "stdout" This is just a bug. It is fixed in the current top of the macosx branch. Look back in the archives of this list for the Announcement of the port for instructions on how to get & build this. It is really quite easy... I have put Wish in ~/MyApps (I created the folder myself since an Application folder did not already exist). and the frameworks in ~/Library/Frameworks (I created the Frameworks folder myself since it did not already exist). Furthemore, I would like to use it with Perl. Any hints? A couple of people have expressed interest in this, but it is a lot of work to make this happen. The biggest problem is that TkPerl is using a pretty old version of Tk, and so someone will have to do the TkPerl magic to update the code base to 8.4. This seems not to be entirely trivial, and last I heard no one was actively working on it. Jim -- ++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++= Jim Ingham jingham@apple.com Developer Tools - gdb Philippe de Rochambeau Le vendredi 11 janvier 2002, ? 08:58 , Andreas Monitzer a ?crit : > On Thursday, January 10, 2002, at 09:19 , Philippe de Rochambeau wrote: > >> Perl for MacOSX has no GUI and the Apple developer in charge of Tk >> does not seem to have time to port it to MacOSX: > > huh? > > http://publicsource.apple.com/news/index.html > > 16 October 2001 - Tk ported to Mac OS X v10.1 > Apple announces a native port of Tk version 8.4a4 for Mac OS X 10.1. Tk > is a rapid application GUI toolkit used by Tcl, Perl, and Python. The > Tk release allows script developers to run existing GUI applications > with a native Aqua look and feel directly on Mac OS X v10.1. As part of > Apple's ongoing commitment to Open Source, this port has been released > under a BSD-style license. Apple's changes have been and will continue > to be submitted to the main Tcl/Tk CVS repository at > tcl.sourceforge.net. > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2714 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020111/8a3a17c3/attachment.bin From njriley at uiuc.edu Fri Jan 11 13:17:41 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:48:12 2005 Subject: stringWithContentsOfFile not loading image files correctly anymore In-Reply-To: <200201111047.g0BAl4B31903@mail18.bigmailbox.com>; from osx-developer@www.com on Fri, Jan 11, 2002 at 02:47:04AM -0800 References: <200201111047.g0BAl4B31903@mail18.bigmailbox.com> Message-ID: <20020111151523.A1097917@uiuc.edu> On Fri, Jan 11, 2002 at 02:47:04AM -0800, OSX Developer wrote: > I also feel the in the ProjectBuilder, one would expect to see the > value inspector display the [anObject description] for any > *objectPointers all I see is *<0xhexed>, then I have to manually enter > 'po objectPointer' in the PB-debug-console and there is not even a > button for this it is a cut and paste hassle. You can right-click or control-click on the item and there will be an option to print the description. I believe the reason why this doesn't happen automatically is that sending description to an object can crash your program, and that's not such a good idea. :) -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From drehring at home.com Fri Jan 11 13:21:01 2002 From: drehring at home.com (David Rehring) Date: Thu Nov 3 14:48:12 2005 Subject: CVS and Mac OS 10.1 In-Reply-To: Message-ID: On 1/10/02 10:48 AM, Rohith Bhat at rohith@robosoftin.com wrote: > Hi there > > We have our project set up to use CVS for SCM. This CVS Server is basically > an iMac running Mac OS X 10.1 server. Till recently all the client > machines were running Mac OS X 10.0.4 clients with 10.0.4 Developer tools > and we did not have any problems checking in, checking out, committing, > updating files between the clients and the server. We used to mount the > "CVS Server's" volume on the client machine using AppleTalk and used to give > the full path while performing the CVS operations from the Terminal > application > > Recently we made the move to Mac OS X 10.1 on the client side and also to > the Mac OS X 10.1 Developer tools (*not* the December developer tools). > After moving to 10.1 on the client side, the CVS 'commit' fails, although > other CVS operations like 'Restore', 'Check Out', work. The error that we > are getting is: > > cvs [commit aborted]: could not open lock file > `/Volumes/Shared/CVS/project/,file1.java,': Permission denied > > I tried using the 'SCM' menu item under Project Builder and I get a similar > error message. The Privileges are all set fine and this does not seems to be > the problem. Full privilege is given to the repository files and also to the > sandbox(local copy) files. > > For testing purpose, I tried creating a test repository on my local hard > drive and tried to commit files on to it. This worked fine. So I guess that > the problem has something to do with mounting the CVS Server volume over a > network. Has anything with respect to mounting volumes, changed from Mac OS > 10.0.4 to 10.1 ? > > Did anyone experience similar problems ? Does anyone have any inputs for me > ? I think it would be better for you to setup CVS to work as a client/server, rather than using AFP for accessing the files directly. I believe that the method you use will result in corruption of the CVS repository if two developers have it 'mounted' and modify it at the same time. Offhand, I don't have a URL with instructions how to do this for OS X [as it's done differently than under a 'normal' UNIX], try searching for 'pserver'? The end-result is that you would no longer have to 'mount' the CVS server volume via AFP [you would access via a specific TCP/IP port instead], and all your developers would be able to access it both via the command line and from ProjectBuilder. I believe that CVS would even track who checked-in what revision using this method [I'm not sure if it does using your method]. Later, -- David Rehring Psychos do not explode when light hits Senior Software Engineer them, no matter how crazy they are... Atimi Software, Inc. www.atimi.com And totally insane guy! From phillipm at truespectra.com Fri Jan 11 13:28:08 2002 From: phillipm at truespectra.com (Phillip Mills) Date: Thu Nov 3 14:48:12 2005 Subject: Alternate bug reporting In-Reply-To: <200201111047.g0BAl4B31903@mail18.bigmailbox.com> Message-ID: <00D54DCC-06DA-11D6-AC0B-0030656F82FE@truespectra.com> Is there an alternative to bugreport.apple.com as a way of submitting problems to Apple? I'm getting so tired of all the error messages and error "non-messages" generated by that site, that my tolerance has been overwhelmed. "No reason provided. For more details on the error, click this link Error Detail" "Detail: java/lang/NullPointerException: Exception while evaluating takeValue:forKeyPath:'selComponent', on target:: No reason provided." "The attempt to load 'Accessing URL:https://bugreport.apple.com/cgi- bin/WebObjects/RadarWeb.woa/7/wo/u25ZZrU6zhXDttw79M1gOIH4QU/4.32' failed." (Wow, don't those just clarify how to proceed/recover?) From mc3999 at topicbox.com Fri Jan 11 13:37:01 2002 From: mc3999 at topicbox.com (Mike Cohen) Date: Thu Nov 3 14:48:12 2005 Subject: CVS and Mac OS 10.1 In-Reply-To: Message-ID: On 1/11/02 4:21 PM, "David Rehring" wrote: > > I think it would be better for you to setup CVS to work as a client/server, > rather than using AFP for accessing the files directly. I believe that the > method you use will result in corruption of the CVS repository if two > developers have it 'mounted' and modify it at the same time. > > Offhand, I don't have a URL with instructions how to do this for OS X [as > it's done differently than under a 'normal' UNIX], try searching for > 'pserver'? The end-result is that you would no longer have to 'mount' the > CVS server volume via AFP [you would access via a specific TCP/IP port > instead], and all your developers would be able to access it both via the > command line and from ProjectBuilder. I believe that CVS would even track > who checked-in what revision using this method [I'm not sure if it does > using your method]. Here are the instructions I found. I don't remember the URL this came from, though: Configuring A CVS Server On Mac OS X ? 2001 Digital Specter. Do not reproduce or distribute for commercial use without written consent of the author. Please report problems, suggestions for enhancement, and inaccuracies to support@digitalspecter.com. Digital Specter make no warranties regarding the information or processes contained in this document and specifically disclaims the implied warranties of merchantability, fitness for a particular purpose, and non-infringement of third party rights. Digital Specter does not warrant that this information will meet your requirements. In no event will Digital Specter be liable for any damages relating to this process or information contained herein. I. Scope This document covers setting up a CVS server on Mac OS X. It assumes you are already comfortable with the administrator tools, including Terminal, vi, and NetInfo Manager. If you are not familiar with those tools or are unsure about your ability to use them, we recommend following the instructions in our more detailed version of this file. II. Required software You need to have the following installed on the server machine: (1) Mac OS X (2) All recent Mac OS X updates (recommended but not really required) (3) Mac OS X Developer Tools III. Configuration To set up a CVS server on Mac OS X for pserver access with the CVS repository at "/cvs": 1) Login as root. 2) Set up CVS repository (we put ours at /cvs): cvs -d /cvs init 3) Create an empty "passwd" file in the "/cvs" directory. Apparently, this tells CVS to use the user account info from the system. You can also set up user/password stuff in that file, but we haven't tried it. 4) Add a line to /etc/services with the following: cvs 2401/tcp 5) Add an entry to /etc/inetd.conf with the following (all one line): cvs stream tcp nowait root /usr/bin/cvs cvs --allow-root=/cvs pserver 6) Add an entry for cvs port 2401 in /services in the NetInfoManager app: Run NetInfoManager. Go to /services. Make an folder named "cvs", and use these properties: name cvs port 2401 protocol tcp It is easier to just duplicate an existing entry like 'finger' and change it to be named "cvs" and use port 2401. 7) Restart 8) You should then be able to do stuff from the client such as cvs login (it'll ask you for the password): cvs -d ":pserver:user@host.com:/cvs" login If you're running the MPW CVS tool, you'll need to set up your password before doing the login: set -e CVS_GETPASS "password" Then you can use cvs import to get your sources into the repository: cd /MyDisk/MySources/MyProject cvs -d ":pserver:user@host.com:/cvs" import -m "first checked in" MyProject user start Then to checkout (renames old sources first then checks out a new copy): mv MyProject MyProjectOld cvs -d ":pserver:user@host.com:/cvs" checkout MyProject That should be all you need to get started. I?m running pserver on my B&W G3 to share code with the other programmer working on my project. -- [ Mike Cohen | http://www.macmegasite.com/ ] [ mc3999@topicbox.com | http://www.worldbeatplanet.com/ ] Sound is the same for all the world - Youssou N'dour, "Eyes Open" -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/20020111/9328f705/attachment.html From klevn at mac.com Fri Jan 11 14:01:09 2002 From: klevn at mac.com (Marc Bookmeyer) Date: Thu Nov 3 14:48:12 2005 Subject: Background Internet Connection Message-ID: <8D07F8EA-06DE-11D6-AC46-0050E4E0D811@mac.com> I've got EdInternet and OmniNetworking frameworks compiled, and I would like to use one of them to connect to the internet in the background and have it update a window and perhaps a list of users upon reason info from the port. I was using RealBasic but was frustrated with the limitations (and cost) .. How do I get constant network connection? I would like to be able to send info to the port and receive info and use that info to update the gui. I'm trying to rewrite my battle.net bot. From thomasdeniau at mac.com Fri Jan 11 14:17:01 2002 From: thomasdeniau at mac.com (Thomas Deniau) Date: Thu Nov 3 14:48:12 2005 Subject: OWViewMatrix and OmniAppKit ? Message-ID: Will OWViewMatrix (the "stack" of views used in OW's download panel) be available in OmniAppKit someday ? Otherwise, does OAGridView do the same thing ? According to its header and name, it seems ... But I haven't tried it yet. TIA, -- Thomas Deniau From chris at mantis-design.com Fri Jan 11 14:20:59 2002 From: chris at mantis-design.com (Chris Ruzin) Date: Thu Nov 3 14:48:12 2005 Subject: Finding substrings In-Reply-To: Message-ID: <0A6A678A-06E1-11D6-93EE-0030654327E0@mantis-design.com> Yep, I knew it was a brain fart. Thanks Andreas for the help. I used NSScanner and it works like a charm. Chris On Thursday, January 10, 2002, at 04:23 PM, Andreas Monitzer wrote: > On Thursday, January 10, 2002, at 10:51 , Chris Ruzin wrote: > >> I know I'm having a brain fart on this one, but what's the best way to >> find a substring? Say I've got a string like this: >> >> Quotations >> >> I only want http://www.quotationspage.com/ out of it. How do I do >> this? > > Use regexps (search list archive) or NSScanner. > > andy > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From chamlin at optonline.net Fri Jan 11 17:17:01 2002 From: chamlin at optonline.net (Christopher B Hamlin) Date: Thu Nov 3 14:48:12 2005 Subject: Alternate bug reporting In-Reply-To: <00D54DCC-06DA-11D6-AC0B-0030656F82FE@truespectra.com> Message-ID: <863CAC63-06F9-11D6-B900-003065F52526@optonline.net> On Friday, January 11, 2002, at 04:27 PM, Phillip Mills wrote: > Is there an alternative to bugreport.apple.com as a way of submitting > problems to Apple? I'm getting so tired of all the error messages and > error "non-messages" generated by that site, that my tolerance has > been overwhelmed. > > "No reason provided. > For more details on the error, click this link > Error Detail" > > "Detail: > java/lang/NullPointerException: Exception while evaluating > takeValue:forKeyPath:'selComponent', on target: 0x628ae40>: No reason provided." > > "The attempt to load 'Accessing URL:https://bugreport.apple.com/cgi- > bin/WebObjects/RadarWeb.woa/7/wo/u25ZZrU6zhXDttw79M1gOIH4QU/4.32' > failed." > > (Wow, don't those just clarify how to proceed/recover?) > > I sent in a few, including a complaint on the bug reporter. I always used to get "you don't have access to this". Like I couldn't tell. Anyway, look at the answer to the question "Problems connecting to the Bug Reporter?" at this URL: http://developer.apple.com/bugreporter/ Chris Hamlin From nickzman at eskimo.com Fri Jan 11 17:22:02 2002 From: nickzman at eskimo.com (Nick Zitzmann) Date: Thu Nov 3 14:48:12 2005 Subject: Retrieving an NSString from an NSArray...? Message-ID: (Note: This is a repost. I tried this once already and the message didn't go through for some reason, so I'm trying this again. If you see this twice, please ignore and accept my apologies.) I've got another problem that is giving me trouble in my quest to get a list of sound effects installed on the system. Now I have the list in NSStrings stored in an NSArray, but if I try accessing them in any way, such as this: NSString *teststring = [array objectAtIndex:0]; The program mysteriously crashes at this point. I can't send the object to any other object that accepts NSStrings or it will crash as well. How am I supposed to properly get the item out of the array? If it helps, this is what the array looks like inside courtesy of NSLog: {type = immutable, count = 13, values = ( 0 : Basso 1 : Bonk 2 : Frog 3 : Funk 4 : Glass 5 : Ping 6 : Pong2003 7 : Pop 8 : Purr 9 : Sosumi 10 : Submarine 11 : Temple 12 : Tink )} Nick Zitzmann ICQ: 22305512 "Democracy is a very delicate tool, and if you try to impose democracy without the basic civil society that supports it, you get yourself into a serious problem." - Edward Walker, former US Assistant Secretary of State for Near Eastern Affairs (2000-2001) From samgoldman at mac.com Fri Jan 11 17:55:59 2002 From: samgoldman at mac.com (Sam Goldman) Date: Thu Nov 3 14:48:12 2005 Subject: Retrieving an NSString from an NSArray...? In-Reply-To: Message-ID: On 1/11/02 5:21 PM, "Nick Zitzmann" wrote: > I've got another problem that is giving me trouble in my quest > to get a list of sound effects installed on the system. > > Now I have the list in NSStrings stored in an NSArray, but if I > try accessing them in any way, such as this: > > NSString *teststring = [array objectAtIndex:0]; > > The program mysteriously crashes at this point. I can't send the > object to any other object that accepts NSStrings or it will > crash as well. What kind of crash? SIGBUS or SIGSEGV? That would mean you have problems with your retain count. Maybe you are trying to access something that isn't there. - Sam From mikevannorsdel at pgtv.net Fri Jan 11 20:27:00 2002 From: mikevannorsdel at pgtv.net (Mike Vannorsdel) Date: Thu Nov 3 14:48:12 2005 Subject: NSConnection registration problems Message-ID: I created a Foundation tool which will run as a background daemon. This tool also uses NSConnection for listening and receiving messages over DO. I want this Daemon to start at system startup, so I created a startupitem for it. The problem is, when the Daemon is launched this way the NSConnections sometimes fail to work (either fail to register or create other connections). If I launch it manually, everything is fine. I believe this is because the daemon is starting before services it depends on are not yet available. What I want to know is what does my tool depend on for the NSConnections and when is the right time for the daemon to launch? From ryanstevens at mac.com Fri Jan 11 22:37:02 2002 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:48:12 2005 Subject: Adjusting NSTableView row height for custom fonts In-Reply-To: <3C3E9AEE.3000409@attbi.com> Message-ID: <3A66A6E6-0724-11D6-A0D6-000502E1087E@mac.com> int textHeight = [yourAttributedString size].height; [yourTableView setRowHeight: textHeight]; This seems to produce pretty reasonable (and consistent) results. HTH! :-) On Thursday, January 10, 2002, at 11:57 PM, Matt Judy wrote: > I tried the approach of using an NSAttributedString, and it does > exactly the same thing... I've attached a partial screenshot. Any > ideas? > > --Matt Judy > From j.zorko at att.net Sat Jan 12 00:34:08 2002 From: j.zorko at att.net (John Michael Zorko) Date: Thu Nov 3 14:48:12 2005 Subject: Audio sampling Message-ID: Hello, all ... I've looked in the archives, and couldn't find anything on how to do this, so I ask thee: How does one sample audio from an audio input device (i.e. sound input, CD player) on Mac OS X? I'm familiar with the Win32 way of doing it (set up the sampling format, create an event and call an API, telling it to trigger the event when the sample buffer is full), but i'm trying to also make this thing work on Linux and OS X. Any ideas? For starters, i'd like to enumerate through the audio input devices, then choose one, set up the sampling parameters, and start sampling ... Regards, John Falling You - exploring the beauty of voice and sound http://www.mp3.com/fallingyou From kubernan at 10191.com Sat Jan 12 03:39:23 2002 From: kubernan at 10191.com (kubernan) Date: Thu Nov 3 14:48:12 2005 Subject: [Compiler bug ?] : C++ compilation : pb with multiple definitions Message-ID: <1619EA7E-0751-11D6-AE42-003065BA6A54@10191.com> Hello, Still having same problem. Just recall the problem : i have one .h file which contains a template C++ class definition. When this file is imported (or included) in my two .mm (ObjC++) files the build phase returns : ---- a part of the errors --- /usr/bin/ld: multiple definitions of symbol ___vt_7BP_Foo /Users/kubernan/Projects/Think_Factory/GUI/Neural Network Kitchen/Neural Network Kitchen 3.0/build/intermediates/Neural Network Kitchen 3.0.build/Objects/ppc/File1.o definition of ___vt_7BP_Foo in section (__DATA,__const) /Users/kubernan/Projects/Think_Factory/GUI/Neural Network Kitchen/Neural Network Kitchen 3.0/build/intermediates/Neural Network Kitchen 3.0.build/Objects/ppc/File2.o definition of ___vt_7BP_Foo in section (__DATA,__const) On the Web i found some threads about this kind of error. Some of threads (C++ discussion) explain this pb appears with an earlier release of gcc (?!). Doing "man ld" i found this : Apple Computer, Inc. July 28, 2001 LD(1) -multiply_defined treatment Specifies how multiply defined symbols in dynamic libraries when -twolevel_namespace is in effect are to be treated. treatment can be: error, warning, or suppress. Which cause the treatment of multiply defined symbols in dynamic libraries as either, errors, warnings, or suppresses the checking of multiply symbols from dynamic libraries when -twolevel_namespace is in effect. The default is to treat multiply defined symbols in dynamic libraries as warnings when -twolevel_namespace is in effect. I tried -multiply_defined and -twolevel_namespace but it has no effect. Still have linker pb. So, do you think it's a compiler bug ? Here a sample pseudo code : ------------ File1.h -------------------- #ifndef _FILE1_H_ #define _FILE1_H_ #include #include #include #include #include #include #include"backprop.h" #include"common.h" #include #include template class aClass : public aClass_def { // code } @endif ----------- File1.mm : ----------------- #import "File1.h" #include"myClass.h" // C++ with template class @implementation File1 - (id)init { some Code } return self; } -(void)aMethod { // call of the myClass (in C++) } ----------- File2.mm : ----------------- #import "File2.h" #include"myClass.h" // C++ (the same as File1.h) @implementation File2 - (id)init { some Code } return self; } -(void)aMethod { // call of the myClass (in C++) } -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2788 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20020112/c6238c44/attachment.bin From nickzman at eskimo.com Sat Jan 12 05:21:33 2002 From: nickzman at eskimo.com (Nick Zitzmann) Date: Thu Nov 3 14:48:12 2005 Subject: Frameworks and storage locations... Message-ID: <1AC9C0B7-075F-11D6-A016-0050E410B21A@eskimo.com> Hi again, everyone. Thanks to those of you who helped me with my last problem with the NSArray; I tracked it down and fixed it. Hope I'm not annoying anyone... One more question: I use two frameworks in an application which I built on my end. Since I can't rely on the end user having these frameworks, I added a copy phase to my application build to copy the two frameworks into the application bundle. Now, here's the problem. I don't know why exactly I did this, but with one of the frameworks I built, I dropped it into my Mac's /Library/Frameworks folder and added it to my project from there. Later I decided that I wanted to rebuild the framework, and I didn't want to keep it in /Library/Frameworks anymore. So I deleted it from there, kept the rebuilt framework in its original build directory, and then updated the framework link in my project to reflect the change. The application compiles fine. But now when I try to run the application, it expects the framework to be in /Library/Frameworks and not its own Frameworks directory. So, when I try to run the app, I get a console message that looks like this: dyld: /Users/nickzman/Application/build/Application.app/Contents/MacOS/Application can't open library: /Library/Frameworks/Framework.framework/Versions/A/Framework (No such file or directory, errno = 2) Application.app has exited with status 60. I checked the project again and again, looking for references to the old style file paths, and couldn't find any. Yet, the dynamic linker seems to insist on looking for the framework in /Library/Frameworks and is ignoring the framework that is now bundled in with the application. There must be something really simple that I'm overlooking. Does anyone know how I can fix this? Nick Zitzmann ICQ: 22305512 "Democracy is a very delicate tool, and if you try to impose democracy without the basic civil society that supports it, you get yourself into a serious problem." - Edward Walker, former US Assistant Secretary of State for Near Eastern Affairs (2000-2001) From chmod007 at mac.com Sat Jan 12 05:33:36 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:48:12 2005 Subject: AppleScript and tar, and what is .DS_Store? In-Reply-To: Message-ID: > Hi, > > Someone had posted a message about a saved AppleScript Application losing > its icon when tar'ed and then untared. I would like to also note that if you > open a Terminal window and use cp to copy the saved Applescript application > to a different folder, the icon is also lost. If you use mv to move it > around the icon is preserved. That is correct. Cp and mv are not aware of the res fork either. Use CpMac and MvMac in /Developer/Tools instead for copying mac files. > I also noted that a file called .DS_Store keeps being created automatically. > Anyone know what this is for? You seem to be able to delete it without any > repercussions. What does it contain? Should I worry about there being > instances in a build of software I am planning to release? This file contains finder information. It is not portable to other machines, or so I hear. > Does .DS_Store bear any relation to the preservation of the application > icon, or is the loss of the icon a resource fork thing? No, you do not need to preserve it. > Kirby / david From finlay.dobbie at btinternet.com Sat Jan 12 05:40:41 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:12 2005 Subject: AppleScript and tar, and what is .DS_Store? In-Reply-To: Message-ID: <7F36DE04-0761-11D6-82AF-000502319F17@btinternet.com> On Friday, January 11, 2002, at 12:06 pm, Kevin Bohan wrote: > Someone had posted a message about a saved AppleScript Application > losing its icon when tar'ed and then untared. I would like to also note > that if you open a Terminal window and use cp to copy the saved > Applescript application to a different folder, the icon is also lost. > If you use mv to move it around the icon is preserved. tar and cp are not fork-aware on HFS+. mv doesn't need to be, so it works. > I also noted that a file called .DS_Store keeps being created > automatically. Anyone know what this is for? Storing information like icon positions in a window, etc. > You seem to be able to delete it without any repercussions. > What does it contain? Should I worry about there being instances in a > build of software I am planning to release? No. It's perfectly normal. > Does .DS_Store bear any relation to the preservation of the application > icon, or is the loss of the icon a resource fork thing? The latter. From bbum at codefab.com Sat Jan 12 07:47:53 2002 From: bbum at codefab.com (Bill Bumgarner) Date: Thu Nov 3 14:48:12 2005 Subject: SMART hard drive queries? Message-ID: <7ACED003-0773-11D6-A34C-003065BA6C28@codefab.com> Hash anyone figured out how to query the SMART stuff in modern hard drives from Darwin/X? (SMART is Self Monitoring Analysis and Reporting Technology -- basically, a chip in the drive monitors drive performance and if it starts to degrade, it can detect and warn when the drive is about to go bad. Works rather well, apparently. Pretty much ever drive shipped in the last 3 years has it built in.) It would be useful to have a tool that could query it and even more useful to be able to automatically monitor it from the system (but only when awake and the drive is already powered up). b.bum From finlay.dobbie at btinternet.com Sat Jan 12 07:59:05 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:12 2005 Subject: tar and AppleScript applications In-Reply-To: <70BE98FE-0673-11D6-AC67-0005025E227F@metaobject.com> Message-ID: On Friday, January 11, 2002, at 09:13 am, Marcel Weiher wrote: >> On Friday, January 11, 2002, at 02:23 , David Remahl wrote: >> >>> Do not tar it. The tar format does not preserve the Macintosh >>> resource fork. >>> Use .sit or .dmg to preserve this data when passing the file over the >>> internet. >> >> ...and don't use .sit if you have any filenames longer then 31 >> characters (and those could be "hidden" inside the application wrapper >> mind you). > > So you might use hfstar or hfspax, both of which extend their > respective base-programs to deal with HFS+ info (meta-data, resource > forks). And both of which have extremely low user bases. You can hardly rely on them being installed for the distribution of an application. -- Finlay From finlay.dobbie at btinternet.com Sat Jan 12 08:35:09 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:12 2005 Subject: Retrieving an NSString from an NSArray...? In-Reply-To: Message-ID: On Friday, January 11, 2002, at 11:17 am, Nick Zitzmann wrote: > Now I have the list in NSStrings stored in an NSArray, but if I try > accessing them in any way, such as this: > > NSString *teststring = [array objectAtIndex:0]; > > The program mysteriously crashes at this point. I can't send the object > to any other object that accepts NSStrings or it will crash as well. You are obviously doing something wrong, perhaps you are releasing your array when you shouldn't be, or not retaining it at the right place, or something, because this does work under normal circumstances. -- Finlay From ryanstevens at mac.com Sat Jan 12 08:37:16 2002 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:48:12 2005 Subject: BUG? Is it me... In-Reply-To: <88B656B6-069D-11D6-9A63-0050E420F527@mac.com> Message-ID: It's just you! ;-) Make sure you have the window/panel/custom view highlighted in the instances tab for windows/panels/custom views. For other widgets makes sure you have them selected in their window/panel/custom view. Also, after changing x/y/w/h switch to one of the other fields. I just type the new value then hit tab to see it take effect. HTH On Friday, January 11, 2002, at 06:14 AM, Joel Berry wrote: > Or is the "size" option in the Show Info window (Interface Builder) > non-functional? I am using v1.1.1 of the Project Builder and v2.2 of > the Interface Builder (12/01 Dev Tools)... I can't get the size "panel" > to come up for windows, buttons, etc., and I have been trying to follow > along in the Learning Cocoa book... am I doing something wrong? Is it a > bug? Also, it seems that PB and IB have changed quite a bit since this > book was published... right? > > Thanks, > > jdb > joel_berry@mac.com > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From finlay.dobbie at btinternet.com Sat Jan 12 09:00:19 2002 From: finlay.dobbie at btinternet.com (Finlay Dobbie) Date: Thu Nov 3 14:48:12 2005 Subject: does my program need GPL In-Reply-To: Message-ID: <208683AC-077D-11D6-BCF6-000502319F17@btinternet.com> On Friday, January 11, 2002, at 10:52 am, Jens Baumeister wrote: > Related question: If I don't link to the GPL app but include it in my > app's > bundle, I'll probably have to GPL the whole thing, because the GPL > application is part of my executable, right? No, your application bundle is not an executable. You don't have to GPL your project if it only communicates with a GPL project via pipes and fork()/exec() or popen() or whatever (which includes NSTask if you use Cocoa). -- Finlay From andy at cocoadevcentral.com Sat Jan 12 10:17:44 2002 From: andy at cocoadevcentral.com (Andreas Monitzer) Date: Thu Nov 3 14:48:12 2005 Subject: does my program need GPL In-Reply-To: Message-ID: <2D4DC5CB-0788-11D6-BA1B-00039306E362@cocoadevcentral.com> On Friday, January 11, 2002, at 11:52 , Jens Baumeister wrote: > I'm no expert on this (and the wording on the GNU site is a bit vague), > so I > may very well be wrong, but I researched a similar problem a couple of > days > ago and it seemed like the general consenus was that as long as at > runtime > your app depends on a GPL program in any way to perform its > functionality, > it would need to be GPL'd. > > (One example case was this: A frontend for multiple FTP-apps - some GPL, > some not - would not need to be under the GPL. A frontend for one > specific > GPL FTP application however would need to be under the GPL because it > depens > upon the GPL application just as it would depend upon a GPL lib. Not > sure if > that's common consenus, though.) > > Related question: If I don't link to the GPL app but include it in my > app's > bundle, I'll probably have to GPL the whole thing, because the GPL > application is part of my executable, right? I've released a freeware app that depends on a GPL-tool, pptp-gui (http://pptp.monitzer.com), the binary is included in the wrapper. Until now nobody has complained about it, even though this fact is written in big letters on the main page. AFAIK (from reading Slashdot mainly), it's ok to bundle GPL-code and non-GPL-code as long as they don't link with each other (link-time or runtime). Otherwise, SuSE Linux's yast tool would need to be GPL'd (which it isn't), since it depends on rpm and other GPL tools. But nobody really knows, the courts might think different. andy From dave.pl at ping.at Sat Jan 12 10:44:51 2002 From: dave.pl at ping.at (Dietmar Planitzer) Date: Thu Nov 3 14:48:12 2005 Subject: [ANN] RenderMall Alpha.1 Message-ID: I'm pleased to annouce the availability of the first public developer version of the RenderMall framework for Apple's MacOS X 10.1. Note: This version is of alpha quality and may only be of interest to developers. A number of things are not fully implemented yet or are not completely tested. I.e. the 'Preview Renderer' is currently only accessible from the Cocoa application environment but not Carbon. The complete package contains: *) The RenderMall.framework which provides a renderer independent implementation of Pixar's RenderMan Interface Specification v3.2/3.1 together with many additional APIs for working with multiple contexts, plug-in renderers, resources and shaders. *) A 'Preview Renderer' plug-in renderer which is based on OpenGL for real-time display of RIB data/files. *) A 'RIBViewer' application for viewing multiple RIB files at once. *) The 'ribcat' and 'ribinfo' CLI tools. RenderMall is the first renderer independent RenderMan Interface implementation. This makes it easy to write 3D applications on-top of the familiar Ri calls without limiting the application to a particular renderer. Such an application can take advantage of any RenderMan renderer as long as this renderer implements the renderer plug-in interface defined by RenderMall. Conversely, a RenderMall plug-in renderer can work with any application as long as it is implemented on top of the RenderMall framework. The RenderMall framework gives application developers a number of additional APIs over the standard Ri calls: *) The context manager allows the easy construction and management of multiple RI contexts. Contexts may be created for the sole purpose of reading/writing ASCII and binary RIB files but also for the purpose of rendering a 3D scene to a Cocoa NSView, a Carbon GrafPort, an off-screen area or just full-screen. *) The renderer manager allows an application to enumerate all plug-in renderers available at a host, inquire its capabilities, specific attributes, options or shaders. It also makes the life of renderer plug-in writers easier by offering default implementations for tasks like parsing RIB files, declaration management or default implementations of the various standard procedurals. *) The resource manager provides a way for applications to define memory based resources like RIB archives, images or shaders. It also gives a renderer plug-in writer tools at its hand to make the creation, discovering and processing of both disk- and memory-based resources simpler. *) The shader manager may be used by applications to find out the actual type of a shader, how many arguments a shader has or what the exact declaration of each shader argument is. RenderMall is distributed as open source and free software under a BSD style license. It can be found at . -------------------------------------------- RenderMan is a registered trademark of Pixar Regards, Dietmar Planitzer From njriley at uiuc.edu Sat Jan 12 13:30:37 2002 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 3 14:48:12 2005 Subject: Custom GUI API In-Reply-To: ; from andy@cocoadevcentral.com on Fri, Jan 11, 2002 at 08:58:52PM +0100 References: Message-ID: <20020112152120.A1110094@uiuc.edu> On Fri, Jan 11, 2002 at 08:58:52PM +0100, Andreas Monitzer wrote: > On Thursday, January 10, 2002, at 09:19 , Philippe de Rochambeau wrote: > > > Perl for MacOSX has no GUI and the Apple developer in charge of Tk does > > not seem to have time to port it to MacOSX: > > huh? Tcl/Tk is ported to run under the Carbonized Tk. Perl/Tk (and I assume Python's Tkinter, though I haven't checked recently) are not ported, except under X11. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From nickzman at eskimo.com Sat Jan 12 16:30:27 2002 From: nickzman at eskimo.com (Nick Zitzmann) Date: Thu Nov 3 14:48:12 2005 Subject: Frameworks and storage locations... Message-ID: (Again, this is another repost. I wonder why my messages aren't making it out or are being delayed?) Hi again, everyone. Thanks to those of you who helped me with my last problem with the NSArray; I tracked it down and fixed it. Hope I'm not annoying anyone... One more question: I use two frameworks in an application which I built on my end. Since I can't rely on the end user having these frameworks, I added a copy phase to my application build to copy the two frameworks into the application bundle. Now, here's the problem. I don't know why exactly I did this, but with one of the frameworks I built, I dropped it into my Mac's /Library/Frameworks folder and added it to my project from there. Later I decided that I wanted to rebuild the framework, and I didn't want to keep it in /Library/Frameworks anymore. So I deleted it from there, kept the rebuilt framework in its original build directory, and then updated the framework link in my project to reflect the change. The application compiles fine. But now when I try to run the application, it expects the framework to be in /Library/Frameworks and not its own Frameworks directory. So, when I try to run the app, I get a console message that looks like this: dyld: /Users/nickzman/Application/build/Application.app/Contents/MacOS/Application can't open library: /Library/Frameworks/Framework.framework/Versions/A/Framework (No such file or directory, errno = 2) Application.app has exited with status 60. I checked the project again and again, looking for references to the old style file paths, and couldn't find any. Yet, the dynamic linker seems to insist on looking for the framework in /Library/Frameworks and is ignoring the framework that is now bundled in with the application. There must be something really simple that I'm overlooking. Does anyone know how I can fix this? Nick Zitzmann ICQ: 22305512 "Democracy is a very delicate tool, and if you try to impose democracy without the basic civil society that supports it, you get yourself into a serious problem." - Edward Walker, former US Assistant Secretary of State for Near Eastern Affairs (2000-2001) From antonio at mac.ps100.net Sat Jan 12 17:43:35 2002 From: antonio at mac.ps100.net (Antonio Rodriguez) Date: Thu Nov 3 14:48:12 2005 Subject: Cocoa plugins framework/ iPhoto Style Message-ID: <1401855.1010883673082.JavaMail.upgradewebapp@mac.ps100.net> Hello all, Very cool hack on the iPhoto plugin: http://www.omnigroup.com/mailman/archive/macosx-dev/2002-January/022416.html particularly given the quick time to market on it. Here is a more general question: where is there info on how to code a plugin like this one up in a general cocoa way. I presume from looking at the package that this is built by PB, but for the life of me I can't find any docs. that detail that interface which must be implemented to write an Exporter plugin for iPhoto or for that matter for any other app built with cocoa. Since Apple is less that great on its scriptability promises, I think the plugin route is the way to go, but alas I can't find any documentation on it anywhere. Thanks and keep up the great work at Omni guys! Antonio From cvlt at club-internet.fr Sat Jan 12 18:40:17 2002 From: cvlt at club-internet.fr (c v) Date: Thu Nov 3 14:48:12 2005 Subject: transparent region for Cocoa window Message-ID: <95520E44-07CC-11D6-8970-000A27B19514@club-internet.fr> Hi, and happy new year ! Programming with Cocoa, I would like to set the transparency factor of some part of the same window. The "setAlphaValue" do this for all pixels of the window. Is there a way to do the same with just some part of the window ? A function , NSDrawWindowBackground function seems (according to its name..) to help to do that but it's not supported. Thanks, Charles Charles Valat From mwatson at apple.com Sat Jan 12 19:25:01 2002 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:48:12 2005 Subject: Frameworks and storage locations... In-Reply-To: <1AC9C0B7-075F-11D6-A016-0050E410B21A@eskimo.com> Message-ID: <005D52AA-07D5-11D6-ADCE-003065F22E4E@apple.com> You should use the @executable_path prefix when setting the install name for your framework. This is documented in the Compiler Tools release note. Something like @executable_path/../Resources/Foo.framework/Versions/A/Foo would probably do the trick. The linker embeds the install name of all linked frameworks and shared libraries in the executable. When the dynamic linker runs as your program starts up, if it sees @executable_path, it replaces that with the full path to the executable when searching for dependent libraries/frameworks. What does otool -L say when run on the executable and the framework? matt. From sys123 at dingoblue.net.au Sat Jan 12 19:25:21 2002 From: sys123 at dingoblue.net.au (Wade Tregaskis) Date: Thu Nov 3 14:48:12 2005 Subject: Transparent patches Message-ID: Is it possible to adjust the transparency of individual areas of a window separately? E.g. if I have a text label or field, can I make the majority of the window transparent, but the text field opaque? I ask because I'd like to use transparency only on areas that aren't textual, so that my app remains fully functional while offering back some screen space... From ckane at apple.com Sat Jan 12 19:37:01 2002 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:48:12 2005 Subject: Thread communications.. one more time. In-Reply-To: <43C1BD4C-03EC-11D6-87E3-0003934475F4@echo-sol.com> Message-ID: On Monday, January 7, 2002, at 08:00 PM, Steve Green wrote: > Suppose a have a cocoa app happily doing it's thing, when via some user > input, I need to spawn a thread to perform some lengthy calculation. > The main app will return to it's event loop (NSRunLoop?) while spawned > thread chugs away. When the calculation is complete, I need to signal > the main app to collect the results, and clean up. > > It seems that there are multiple ways I could perform the notification, > but it's not clear to me which will work, and be thread safe, etc.. > > Thought 1: Start a timer with zero timeout in the main app thread. > Seems like a hack, and I am not sure it's thread safe. > > Thought 2: NSRunLoop performSelector:target:argument:order:modes:. > Will it work? What do I pass for modes:? > > Thought 3: NSApplication postEvent:atStart:. The documentation > suggests this but it does not suggest what event to send or how to sign > up to receive it. If it turns out that this is the best way to solve > my problem, then I am sure I can figure that out the rest, but I > imagine that there must be a simpler way. After all, maybe I am > writing an app that does not use NSApplication. > > Thought 4: NSConnection. Seems like overkill? > > Thought 5: Use a unix pipe with the socket class (I forget the name). > This didn't 'feel' like the right solution in this environment. Here's another one I'll bet nobody has tried yet, and might or might not work: wrap the Mach port for the background thread in a CFMachPort, register an invalidation callback for it, and put it in the run loop of the main thread. When the invalidation callback function is called, the thread is done and the main thread can pick up its results from memory (or wherever the thread has put them). This probably won't work, because it depends on the pthreads library getting the Mach thread object destroyed right away when the thread exits -- which is very implementation dependent (the pthread might be cached for later reuse, rather than destroyed, since it is "relatively expensive" to create them, for example). This sort of thing is done by several bits of software I know of for tasks, to watch for task death via the run loop; tantalizing but probably impractical for threads. #1 and #4 will work. #2 won't, since that won't schedule the work in the main thread. #5 probably overkill as well. I don't think I'd risk the thread-safety of #3. If the Cocoa group would get off its collective butt and implement -performSelectorInMainThread:blah:blah:blah:, you'd just use that. But disagreements over semantics and behavior, and higher priority items, always seem to get in the way. This is an example of getting a thread to do some work. A lighter-weight approach than DO is to use NSPortMessage, send a trivial message to an NSPort in the main thread (previously registered, probably before the thread was spawned off, to make sure it exists by the time the thread dies). CFMessagePort can be used for the same, at the CF level. If you add a timer to the main thread's run loop (which presumably you've squirreled away somewhere), be sure to use CFRunLoopWakeUp() on the CFRunLoopRef of the NSRunLoop. Cocoa won't do that for you currently (and it's not clear it should -- might degrade the performance unnecessarily). Finally, another solution is to create a little custom "version 0" CFRunLoopSourceRef using the CF API, add that to the CFRunLoop (in the main thread), then CFRunLoopSourceSignal() it in the side thread when the thread is done (and CFRunLoopWakeUp()). The perform callback for the source will be invoked in the main thread. Chris Kane Cocoa Frameworks, Apple From mithrandir99 at mac.com Sat Jan 12 20:05:59 2002 From: mithrandir99 at mac.com (Josh M. Hurd) Date: Thu Nov 3 14:48:12 2005 Subject: Pref Panes and Instance Variables? Message-ID: Hello list, I am having trouble with instance variables in my PrefPane. I declare my variables in the header of my Principal Class like this: @private NSMutableArray *theAppList; CFStringRef appID; Then initialize them in initWithBundle like this: - (id)initWithBundle:(NSBundle *)bundle { if ( ( self = [super initWithBundle:bundle] ) != nil ) { appID = CFSTR("myPrefPaneBundleIdentifier"); theAppList = [NSMutableArray array]; } return self; } Which is how Apple explains it in their PrefPane docs. So far everything is OK. I then fill my instance variable theAppList in mainViewDidLoad. This too works fine but when I return out of this method all my variables are killed. I set up a button which triggers a dump of these variables via NSLog which confirm they are NULL or empty. I can't imagine that this is a limitation to the PrefPane framework so would someone kindly let me know what I am doing wrong? Thanks! M From greg at omnigroup.com Sat Jan 12 20:50:59 2002 From: greg at omnigroup.com (Greg Titus) Date: Thu Nov 3 14:48:12 2005 Subject: Thread communications.. one more time. In-Reply-To: Message-ID: <11058EA8-07E1-11D6-B3B2-003065B22C50@omnigroup.com> On Saturday, January 12, 2002, at 07:36 PM, Chris Kane wrote: > > If the Cocoa group would get off its collective butt and implement > -performSelectorInMainThread:blah:blah:blah:, you'd just use that. But > disagreements over semantics and behavior, and higher priority items, > always seem to get in the way. > Until Apple gets around to it, you could use the implementation in OmniFoundation. But we call it -mainThreadPerformSelector:blah:blah:blah:. --Greg From embassociates at qwest.net Sat Jan 12 21:00:58 2002 From: embassociates at qwest.net (Erik M. Buck) Date: Thu Nov 3 14:48:12 2005 Subject: NSScrollView and NSMenu problems References: Message-ID: <002101c19bef$5f354460$39146441@bc7440b> Your problem with copy on scroll seems like a bug to me. You should file a bug report. Regarding adding and removing menu items based on the user's current selection: Please don't. All menu items that are ever available should always be available but disabled if not pertinent. Adding and removing menu items is likely to astonish and confuse users. Users may never notice that a new menu item is available in some situations. Users may be annoyed when a menu item that they remember is missing. Users may not be able to anticipate how and why a menu item appears or disappears. Users are not able to form muscle memory for changing menus... > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From nathan_day at mac.com Sat Jan 12 21:05:59 2002 From: nathan_day at mac.com (Nathan Day) Date: Thu Nov 3 14:48:12 2005 Subject: Transparent patches In-Reply-To: Message-ID: <0BBC6D43-07E3-11D6-9339-0050E4E0EE30@mac.com> You could try substituting the windows content view with your own (the content view is responsible for the window background pattern) and then override- [NSView drawRect:(NSRect)aRect] method and use NSRectFill(const NSRect aRect) to paint in you color containing an alpha channel. You will probable have to call - [NSWindow setOpaque:(BOOL)isOpaque] too. You can try using - [NSWindow setBackgroundColor:(NSColor *)aColor] but my brief experiments with it have not produced any results. On Sunday, January 13, 2002, at 01:52 PM, Wade Tregaskis wrote: > Is it possible to adjust the transparency of individual areas of a > window separately? E.g. if I have a text label or field, can I make > the majority of the window transparent, but the text field opaque? I > ask because I'd like to use transparency only on areas that aren't > textual, so that my app remains fully functional while offering back > some screen space... > From andrelipinski at mac.com Sat Jan 12 22:12:00 2002 From: andrelipinski at mac.com (Andre Lipinski) Date: Thu Nov 3 14:48:12 2005 Subject: Transparent patches In-Reply-To: Message-ID: <6229E3A3-07EC-11D6-BA99-000A277B4230@mac.com> On Saturday, January 12, 2002, at 10:22 PM, Wade Tregaskis wrote: > Is it possible to adjust the transparency of individual areas of a window > separately? E.g. if I have a text label or field, can I make the > majority of the window transparent, but the text field opaque? I ask > because I'd like to use transparency only on areas that aren't textual, > so that my app remains fully functional while offering back some screen > space... > Hi, If you want text fields and etc. floating in space, that's real easy, just make a completely transparent window and fill it with the controls you want (use NSWindow setOpaque:). I'm betting you want a translucent window where the controls are opaque and the window background is only partly opaque. I don't know about getting a standard Aqua window that's partly opaque, but you could use a custom design of your own in the form of a tiff image with lots of translucency. Put that image in a window as the background in IB drop your controls on top of it and set its opacity. Otherwise you can go with setAlphaValue:, which sounds like what you've already tried right? Andre. From mithrandir99 at mac.com Sun Jan 13 00:35:01 2002 From: mithrandir99 at mac.com (Josh M. Hurd) Date: Thu Nov 3 14:48:12 2005 Subject: Pref Panes and Instance Variables? In-Reply-To: Message-ID: <5958E2E8-0800-11D6-A2BD-000502631BF4@mac.com> OK I figured out what was wrong. I had instantiated my subclass of NSPrefPane in Interface Builder making my connections to that instance. This caused a second instance of my subclass to be created when the Nib loaded. Who knows which one had control, I think they both had a little here and there... I thought this was how the Apple docs explained it but I must have mis-read something... The correct answer is change the class of the File's Owner to my subclass of NSPrefPane then make connections to that. Thanks list... M On Saturday, January 12, 2002, at 08:05 PM, Josh M. Hurd wrote: > Hello list, > > I am having trouble with instance variables in my PrefPane. > > I declare my variables in the header of my Principal Class like this: > > @private > NSMutableArray *theAppList; > CFStringRef appID; > > Then initialize them in initWithBundle like this: > > - (id)initWithBundle:(NSBundle *)bundle > { > if ( ( self = [super initWithBundle:bundle] ) != nil ) > { > appID = CFSTR("myPrefPaneBundleIdentifier"); > theAppList = [NSMutableArray array]; > } > > return self; > } > > Which is how Apple explains it in their PrefPane docs. > So far everything is OK. > > I then fill my instance variable theAppList in mainViewDidLoad. This > too works fine but when I return out of this method all my variables > are killed. I set up a button which triggers a dump of these variables > via NSLog which confirm they are NULL or empty. > > I can't imagine that this is a limitation to the PrefPane framework so > would someone kindly let me know what I am doing wrong? > > Thanks! > > M > _______________________________________________ > 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 john at toastedmarshmallow.com Sun Jan 13 01:55:59 2002 From: john at toastedmarshmallow.com (=?ISO-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:48:12 2005 Subject: Cocoa plugins framework/ iPhoto Style In-Reply-To: <1401855.1010883673082.JavaMail.upgradewebapp@mac.ps100.net> Message-ID: <58AA8788-080B-11D6-BF10-0030654E84BA@toastedmarshmallow.com> On s?ndag, januari 13, 2002, at 02:01 , Antonio Rodriguez wrote: > > Hello all, > > > Very cool hack on the iPhoto plugin: > > http://www.omnigroup.com/mailman/archive/macosx- > dev/2002-January/022416.html > > particularly given the quick time to market on it. From my own experience (I've written plugins for MarshmallowDraw and the GraphicKit) writing an iPhoto plugin takes a few hours, including reverse engineering the plugin protocol. The only thing that is moderately tricky is getting the progress bar to be deterministic. > Here is a more general question: where is there info on how to code a > plugin like this one up in a general cocoa way. I presume from looking > at the package that this is built by PB, but for the life of me I can't > find any docs. that detail that interface which must be implemented to > write an Exporter plugin for iPhoto or for that matter for any other > app built with cocoa. Create a "Bundle" project. Use class-dump or otool on the existing plugins and on iPhoto. That tells you what the other plugins are doing. With iPhoto it's rather obvious that you need to implement its ExportPluginProtocol. > Since Apple is less that great on its scriptability promises, I think > the plugin route is the way to go, but alas I can't find any > documentation on it anywhere. Well, you usually want to feel confident that a plugin architecture is well designed before you encourage third parties to write plugins. Regards, John Hornkvist -- ToastedMarshmallow, the perfect Cocoa companion http://www.toastedmarshmallow.com From andreas0330 at home.com Sun Jan 13 02:04:04 2002 From: andreas0330 at home.com (Andreas Schwarz) Date: Thu Nov 3 14:48:12 2005 Subject: NSScrollView and NSMenu problems In-Reply-To: <002101c19bef$5f354460$39146441@bc7440b> Message-ID: > Your problem with copy on scroll seems like a bug to me. You should > file a > bug report. Actually, I just figured it out. I had setUsesBackground: set to NO which apparently confused the scroll view. Why it still worked half the time, though, I don't know. > Regarding adding and removing menu items based on the user's current > selection: > Please don't. ... I was afraid someone would say that. Probably because I knew it was true ;-). I guess I won't do it, though I'm still puzzled as to why it wouldn't update. Thanks, Andreas From jim.correia at pobox.com Sun Jan 13 03:27:01 2002 From: jim.correia at pobox.com (Jim Correia) Date: Thu Nov 3 14:48:12 2005 Subject: NSScrollView and NSMenu problems In-Reply-To: <002101c19bef$5f354460$39146441@bc7440b> Message-ID: <5E85D872-0818-11D6-A70B-000A27D7C068@pobox.com> On Sunday, January 13, 2002, at 12:01 AM, Erik M. Buck wrote: > Regarding adding and removing menu items based on the user's current > selection: > Please don't. All menu items that are ever available should always be > available but disabled if not pertinent. Adding and removing menu > items is > likely to astonish and confuse users. Users may never notice that a new > menu item is available in some situations. Users may be annoyed when a > menu > item that they remember is missing. Users may not be able to > anticipate how > and why a menu item appears or disappears. Users are not able to form > muscle memory for changing menus... Except in the case of context menus, where it is inappropriate to include disabled items, since they cannot operate on the current context. The aqua hig (which is surprisingly short in places) doesn't address the issue. The Mac OS 8 HIG did (but also made the exception for a disabled help item). From chmod007 at mac.com Sun Jan 13 03:47:00 2002 From: chmod007 at mac.com (David Remahl) Date: Thu Nov 3 14:48:12 2005 Subject: does my program need GPL In-Reply-To: <2D4DC5CB-0788-11D6-BA1B-00039306E362@cocoadevcentral.com> Message-ID: > On Friday, January 11, 2002, at 11:52 , Jens Baumeister wrote: > >> I'm no expert on this (and the wording on the GNU site is a bit vague), >> so I >> may very well be wrong, but I researched a similar problem a couple of >> days >> ago and it seemed like the general consenus was that as long as at >> runtime >> your app depends on a GPL program in any way to perform its >> functionality, >> it would need to be GPL'd. >> >> (One example case was this: A frontend for multiple FTP-apps - some GPL, >> some not - would not need to be under the GPL. A frontend for one >> specific >> GPL FTP application however would need to be under the GPL because it >> depens >> upon the GPL application just as it would depend upon a GPL lib. Not >> sure if >> that's common consenus, though.) >> >> Related question: If I don't link to the GPL app but include it in my >> app's >> bundle, I'll probably have to GPL the whole thing, because the GPL >> application is part of my executable, right? > > I've released a freeware app that depends on a GPL-tool, pptp-gui > (http://pptp.monitzer.com), the binary is included in the wrapper. > Until now nobody has complained about it, even though this fact is > written in big letters on the main page. > AFAIK (from reading Slashdot mainly), it's ok to bundle GPL-code and > non-GPL-code as long as they don't link with each other (link-time or > runtime). Otherwise, SuSE Linux's yast tool would need to be GPL'd > (which it isn't), since it depends on rpm and other GPL tools. Not to mention PB... And Cocoa Chess.app...Even the About Box points out that it is GPLled, and contains the license agreement...That program definitely links to the gnuchess code...I believe it is integrated into the same binary. I find it odd that apple has not released the source code of it... / david > But nobody really knows, the courts might think different. From nickzman at eskimo.com Sun Jan 13 04:49:02 2002 From: nickzman at eskimo.com (Nick Zitzmann) Date: Thu Nov 3 14:48:12 2005 Subject: Frameworks and storage locations... In-Reply-To: <005D52AA-07D5-11D6-ADCE-003065F22E4E@apple.com> Message-ID: On Saturday, January 12, 2002, at 07:24 PM, Matt Watson wrote: > You should use the @executable_path prefix when setting the > install name for your framework. This is documented in the > Compiler Tools release note. Something like > @executable_path/../Resources/Foo.framework/Versions/A/Foo > would probably do the trick. The linker embeds the install name > of all linked frameworks and shared libraries in the > executable. When the dynamic linker runs as your program starts > up, if it sees @executable_path, it replaces that with the full > path to the executable when searching for dependent > libraries/frameworks. Ah; I didn't know that the "install" path when building a framework made the dynamic linker expect to find the library at that path, or make it expect to find it from where it was originally referenced if it wasn't installed. Thanks; I used the @executable_path prefix and now the framework's loading fine. Nick Zitzmann ICQ: 22305512 "Democracy is a very delicate tool, and if you try to impose democracy without the basic civil society that supports it, you get yourself into a serious problem." - Edward Walker, former US Assistant Secretary of State for Near Eastern Affairs (2000-2001) From rgrant at mac.com Sun Jan 13 05:42:20 2002 From: rgrant at mac.com (rgrant@mac.com) Date: Thu Nov 3 14:48:12 2005 Subject: NSImage rendering problems in a CustomView In-Reply-To: <5E85D872-0818-11D6-A70B-000A27D7C068@pobox.com> Message-ID: <3A143D61-082B-11D6-B9F9-00039381760A@mac.com> Sorry about all the questions - but I'm quite excited about Cocoa and Mac OS X and I'm trying out various ideas and running into trouble. I scanned the archive before posting this but couldn't find an answer.... My images are unreliably rendered in my CustomView. Occasionally they'll show up the first time they're added but after that never - even though the calls are being made (NSLog is writing output). I used to have this view inside a scroll view which exhibited similar problems except that I could get the images to partially show up if they were scrolled off and then on again. As you can see in the code below I've tried both -drawInRect and -dissolveToPoint. A separate observation about scroll view interaction - I thought that the drawRect (when scrolling) would show the visible portion of my view but it seems to just indicate the bit that has just been made visible by the scrolling action - is that correct? Thanks for any help - I'm pulling my hair out on this image problem... Robert. My drawRect: method: - (void)drawRect: (NSRect) rect { int i = 0; int c = [m_slideImages count]; NSRect r = [self bounds]; NSPoint p = r.origin; NSRect bounds = [self bounds]; if (highlighted) [[NSColor yellowColor] set]; else [bgColor set]; NSLog(@"drawRect: x = %f y = %f w = %f h = %f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height); [NSBezierPath fillRect: r]; for (i = 0; i < c; i++) { NSRect drawingRect = NSMakeRect(0, i*100, 100, 75); NSLog(@"drawingRect: x = %f y = %f w = %f h = %f", drawingRect.origin.x, drawingRect.origin.y, drawingRect.size.width, drawingRect.size.height); // if ( NSIntersectsRect(rect, drawingRect)) { NSImage* image = [m_slideImages objectAtIndex: i]; NSRect imageRect; imageRect.size = [image size]; /* [image drawInRect: drawingRect fromRect: imageRect operation: NSCompositeSourceOver fraction: 1.0]; */ [image dissolveToPoint: drawingRect.origin fraction: 1.0]; NSLog(@"Drew image: %@", image); } } } From rgrant at mac.com Sun Jan 13 05:46:18 2002 From: rgrant at mac.com (rgrant@mac.com) Date: Thu Nov 3 14:48:12 2005 Subject: tar and AppleScript applications In-Reply-To: Message-ID: Thanks for everyone's input. David gave me a method of producing small dmg images which I really like and will use from now on - included below for the archives: ------------- Use Disk Copy to create a multi-megabyte dmg. Mount it. Copy your file(s) to it. Eject it. Go back to Disk Copy. Select Convert. Select Compressed as output format and save under a new name. Unused space will now be compressed, and the image will be marked read-only. ------------- Thanks again, Robert. On Saturday, January 12, 2002, at 10:54 AM, Finlay Dobbie wrote: > > On Friday, January 11, 2002, at 09:13 am, Marcel Weiher wrote: > >>> On Friday, January 11, 2002, at 02:23 , David Remahl wrote: >>> >>>> Do not tar it. The tar format does not preserve the Macintosh >>>> resource fork. >>>> Use .sit or .dmg to preserve this data when passing the file over the >>>> internet. >>> >>> ...and don't use .sit if you have any filenames longer then 31 >>> characters (and those could be "hidden" inside the application >>> wrapper mind you). >> >> So you might use hfstar or hfspax, both of which extend their >> respective base-programs to deal with HFS+ info (meta-data, resource >> forks). > > And both of which have extremely low user bases. You can hardly rely on > them being installed for the distribution of an application. > > -- Finlay > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From tritchey at vacuumgenesis.com Sun Jan 13 07:05:31 2002 From: tritchey at vacuumgenesis.com (Timothy Ritchey) Date: Thu Nov 3 14:48:12 2005 Subject: does my program need GPL In-Reply-To: Message-ID: > I'm no expert on this (and the wording on the GNU site is a bit vague), so I > may very well be wrong, but I researched a similar problem a couple of days > ago and it seemed like the general consenus was that as long as at runtime > your app depends on a GPL program in any way to perform its functionality, > it would need to be GPL'd. This is certainly not the case. For example, Aqua depends upon the Darwin OS at runtime, and you certainly don't see Apple open-sourcing THAT. Many programs include OS-level headers that are open source, and expect open-source APIs, and those programs to do not have to be open source. The real determination is what happens at COMPILE TIME. The general consensus - at least in the Linux community, which has been dealing with GPL for a while - is that as long as your object code does not include the GPL'ed material in question you are okay. That is, you cannot STATICALLY link GPL code into your program. As long as you are able to dynamically link with the GPL'ed code at RUNTIME only, you do not have to GPL your code. Many times, this means writing a wrapper around the GPL'ed code in such a way that it can be dynamically linked. This wrapper code is then required to be GPL'ed, but not your main program. If you either use a dylib or NSBundle service to load the GPL'ed module, you are okay. Now, as people have mentioned, GPL has not been tested in court, and there are many interpretations, so I could obviously be completely wrong. Cheers, tim From ahoesch at advanced-science.com Sun Jan 13 07:08:34 2002 From: ahoesch at advanced-science.com (Andreas Hoeschler) Date: Thu Nov 3 14:48:12 2005 Subject: European characters in Localizable.strings Message-ID: <1D58B4CE-0837-11D6-9826-003065CCA582@advanced-science.com> Hi all, I have started to localize an application for different european countries. I have removed the Localizable.strings file from /Resources and have now one in /Resources/English.lproj, one in /Resources/German.lproj and so on. It works, I get the localized strings in my dialogs. However, german ?,?,?,.. do not appear in alert panels. I get the german string but these special characters simply do not appear. What am I doing wrong here? Thanks in advance, Andreas From rainer at brockerhoff.net Sun Jan 13 07:26:35 2002 From: rainer at brockerhoff.net (Rainer Brockerhoff) Date: Thu Nov 3 14:48:12 2005 Subject: Thread communications.. one more time. In-Reply-To: <200201130932.BAA03157@lists.omnigroup.com> References: <200201130932.BAA03157@lists.omnigroup.com> Message-ID: >Date: Sat, 12 Jan 2002 19:36:14 -0800 >From: Chris Kane > >On Monday, January 7, 2002, at 08:00 PM, Steve Green wrote: >> Suppose a have a cocoa app happily doing it's thin