From gideon at gurgle.demon.co.uk Tue May 1 00:27:51 2001 From: gideon at gurgle.demon.co.uk (Gideon Tearle) Date: Thu Nov 3 14:46:10 2005 Subject: NSPopUpButtonCells in TableViews In-Reply-To: <200105010112.f411CiV16380@smtp3.san.rr.com> Message-ID: Hi Daniel You need to set the cell for the column where you want the popups to appear. So, something like: checkCell = [[NSPopUpButtonCell alloc] initTextCell:@"yes" pullsDown:NO]; [checkCell addItemsWithTitles:[NSArray arrayWithObjects:@"no", @"yes", nil]]; [checkCell setBordered:NO]; [checkCell setBezeled:NO]; [[table tableColumnWithIdentifier:@"Something"] setDataCell:checkCell]; [[table tableColumnWithIdentifier:@"Use"] setDataCell:checkCell]; [checkCell release]; [table reloadData]; In an NSDocument-based app you can do this in windowControllerDidLoadNib: Best wishes -- Gideon On Tuesday, May 1, 2001, at 02:11 , Daniel Staudigel wrote: > How does one put NSPopUpButtonCells into a NSTableView, if you return > them from the table view data source methods, it displays what they > return for description. What's up? > > Daniel Staudigel > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From gideon at gurgle.demon.co.uk Tue May 1 00:35:32 2001 From: gideon at gurgle.demon.co.uk (Gideon Tearle) Date: Thu Nov 3 14:46:11 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200104291737.NAA12032@pellns.alleg.edu> Message-ID: On Sunday, April 29, 2001, at 06:34 , Chris Behm wrote: > Actually, I'm not sure that you are seeing infinite loops. I'm curious > to know if anyone else is experiencing the same thing I am and this may > explain why you see the rainbow. > > You go to do something (say save a doc in Project Builder). Up comes > the cursor (wait, where'd that come from?). Then a few seconds > stretches on into more than a minute (sometimes many). Other > applications "refuse" to launch (though you can still quit > applications). Any of this sound familiar to anyone? > I mailed the projectbuilder list about this back in March and got the hopeful sounding reply of > I've seen this several times, both on my machine and others. I've spent > some time investigating it, and the current theory is that Project > Builder is hanging due to a kernel bug triggered by trying to swap in a > VM page. I think a fix is in the works, but I'm not sure how it will be > delivered. > > Anders from Anders Bertelrud but I've seen similar posts and no other 'official' Apple responses since then. It's a difficult bug to file as it's almost always possible to sample the process as it seems to be waiting for a lock to come free. Any other process that might touch it (like ps) also hangs. I wonder whether it really has been fixed? -- Gideon From steflsts at objectfarm.org Tue May 1 02:00:44 2001 From: steflsts at objectfarm.org (Stefan Kreutter) Date: Thu Nov 3 14:46:11 2005 Subject: Cocoa: Keybindings.dict and keyboard macros a la OPENSTEP Message-ID: <200105010900.CAA16793@omnigroup.com> I remember that in the old days of NEXTSTEP/OPENSTEP one could record keyboard macros with Keyboard.app. I had a macro bound to some key that inserted 'NSLog(@"");' and moved the cursor three characters back between the quotes. This macro could be created with Keyboard.app without editing some KeyBinding.dict. Now, with Mac OS X Keyboard.app is gone and on Mac OS X Server 1.x this macro recording didn't work. In the KeyBinding.dict one assigns method selectors to character/key-codes, maybe there is a way to assign a string to be inserted? I didn't find anything in the documentation. Any ideas? If this is no longer possible what about adding this feature to TextExtras, Mike Ferris? -Stefan From nils at catchysoftware.com Tue May 1 02:34:40 2001 From: nils at catchysoftware.com (Nils Svangard) Date: Thu Nov 3 14:46:11 2005 Subject: Getting text of current document with AppleScript Message-ID: <200105010934.LAA01155@www8.aname.net> Hello, I (urgently) need a simple script that should retrieve the text of the current active document of whatever application is beeing used at that time. It will only be activated while the user edits text, so I can be sure that there is a active document and that it contains text. Is this possible? And in that case, how can I do this? Thanks! -- Nils Svang?rd Catchy Software - http://www.catchysoftware.com From remi_zara at mac.com Tue May 1 03:17:58 2001 From: remi_zara at mac.com (=?iso-8859-1?Q?R=E9mi_Zara?=) Date: Thu Nov 3 14:46:11 2005 Subject: Docklings questions In-Reply-To: <200105010140.f411eRa17991@scv3.apple.com> Message-ID: <20010501101729.83EA0B6A8@smtp1.mail.easynet.fr> Le mardi 1 mai 2001, ? 03:40, Ali Ozer a ?crit : >> By the way, where should I ask for a method in NSWorkspace like '- >> openURL:' which would open any type of URL with the default app >> (http:// with web browser, ftp:// with ftp client, file:// with the >> appropriate app, etc.) ? I think this would be so much better... > > NSWorkspace has an openURL: method, and it does all this! > > You don't need an app signature unless your app is going to appear in > places where an app signature is needed to reference the app. (For > instance, the Internet Config database). Thanks ! I think I should now teach myself to look for documentation in the header files rather than in the Cocoa help ! R?mi -- R?mi Zara web: http://remi.zara.free.fr/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 816 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010501/99e67a9d/attachment.bin From max at quendi.de Tue May 1 03:30:56 2001 From: max at quendi.de (Max Horn) Date: Thu Nov 3 14:46:11 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: References: Message-ID: At 20:51 Uhr -0500 30.04.2001, Ryan McGann wrote: >More than anything, I think OS X in its current incarnation is too >much of a resource piggy. I have 256MB of RAM and OS X still pages >quite a bit without Classic open; I could open up Photoshop in OS 9 >and have it page hardly at all. Once Apple gets the size of the >frameworks down, people start fine-tuning their code and all the >memory leaks get plugged, things will get better. Actually, they can >only get better.... I wish that was true. But if it really happened this way, it would be the first time in Computer history for such a thing to occur, I believe. :( But I hope your dream comes true anyway. Prepare for the possibility that things don?t get better at all... unless of course you buy a new G4/1000 with 1 GB ram. Then it might run at good speed, with few disk trashing (did I mention the RAID array?). Max -- ----------------------------------------------- Max Horn C++/ObjC/Java Developer email: phone: (+49) 6151-494890 From remi_zara at mac.com Tue May 1 03:33:21 2001 From: remi_zara at mac.com (=?iso-8859-1?Q?R=E9mi_Zara?=) Date: Thu Nov 3 14:46:11 2005 Subject: Docklings question In-Reply-To: <200105010215.f412Fh606302@marsh.owlnet.rice.edu> Message-ID: <20010501103315.6D61DB6A6@smtp1.mail.easynet.fr> Le mardi 1 mai 2001, ? 04:15, Brian Webster a ?crit : >> Next, I tried to put some progress indicators in my dockling's view. >> This works, but they appear in light grey insteas of blue (disabled). I >> did not find where to tell them to display in blue. Can someone help me >> there ? > > I believe that NSProgressIndicator tracks when the window it's in is > made active and inactive to determine its color. Since dockling > windows aren't real NSWindows, I don't believe they have an active > state, so the progress indicator displays itself as inactive. You > might try setControlTint to see if that has any effect. Since the > indicator probably registers itself to receive notifications of the > window being made key/main to do this, you might be able to work some > sort of subclass that overrides viewDidMoveToWindow:, which I'm > guessing is where the registration takes place, to block it from > changing color. None of these are really pretty solutions, since the > dockling API isn't officially supported by Apple yet. Or, since the > dock icon is really quite small, you could just draw your own blue bar, > and it would look fine. I tried setControlTint but that did not work. Well all that seems a little complicated ! But who wants some more CPU cycles consuming eyecandies :-) (on my G4 450 MP, progress bars make the DocklingServer consume several percent of CPU, varying from 1-2 to 16 in the time !) By the way, I wonder if Docklings are really released by the DocklingServer. In fact, my dealloc method seems to be never called. This leads to : * my timer never gets invalidated, and when I remove my dockling and put it back, my updateWindow method gets called twice as often * When I remove my Dockling and put it back, the dockling server tells me that it already has an implementation (but it uses the right one) : May 1 12:25:23 localhost /System/Library/CoreServices/DocklingServer.app/Contents/MacOS/DocklingServer: objc: Both /Users/rzara/Documents/Projets/SetiDockling/build/SetiDockling.dock/Contents/ MacOS/SetiDockling and /Users/rzara/Documents/Projets/SetiDockling/build/SetiDockling.dock/Contents/ MacOS/SetiDockling have implementations of class Dockling. May 1 12:25:23 localhost /System/Library/CoreServices/DocklingServer.app/Contents/MacOS/DocklingServer: objc: Using implementation from /Users/rzara/Documents/Projets/SetiDockling/build/SetiDockling.dock/Contents/ MacOS/SetiDockling. I'm not sure that's the desired behavior. Thanks having answered all my questions, R?mi -- R?mi Zara web: http://remi.zara.free.fr/ From rosyna at unsanity.com Tue May 1 04:08:55 2001 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:46:11 2005 Subject: I can't remove my menu. In-Reply-To: <200104301225.FAA29891@smtpout.mac.com> References: <200104301225.FAA29891@smtpout.mac.com> Message-ID: I use the below code to install and remove a global menu. When I try to remove the menu, the Log shows the Remove string, but it's never removed. if i install it again, it installs over the exact same place as the other menu. What am I missing here? -(void)installMenu { blahMenu = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; [blahMenu setTitle:@"LameMenu"]; [blahMenu setMenu:blahMenuItem]; NSLog(@"Installed"); } -(void)removeMenu { [[NSStatusBar systemStatusBar] removeStatusItem:blahMenu]; [blahMenuItem release]; blahMenuItem = nil; NSLog(@"Removed"); } -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insane People From nils at catchysoftware.com Tue May 1 04:11:20 2001 From: nils at catchysoftware.com (Nils Svangard) Date: Thu Nov 3 14:46:11 2005 Subject: Setting AppleScript variables from C? Message-ID: <200105011111.f41BBD531755@raven.levonline.com> Hello, I'm working on an application that has the ability to execute AppleScripts, but I would also like to be able to pass 'arguments' (or setting variables) from my application. Is there an easy way to do this? Thanks! -- Nils Svang?rd Catchy Software - http://www.catchysoftware.com From kristoffer-lists at codedivision.com Tue May 1 04:56:14 2001 From: kristoffer-lists at codedivision.com (=?iso-8859-1?Q?Kristoffer_Peterh=E4nsel?=) Date: Thu Nov 3 14:46:11 2005 Subject: EO Frameworks in OSX In-Reply-To: <200104300949.CAA03657@smtpout.mac.com> Message-ID: On Monday, April 30, 2001, at 11:50 AM, ghulands@mac.com wrote: > Hi, > I have an EO based app in MACOSXS and want to move it to OSX. I know > that the EO frameworks are not with OSX so I was wondering: > 1. Is Apple going to release them in the near future or As stated in the Mac OS X Release notes EOF has become part of WO. So it you need to get WO to get EOF. > 2. Is there an alternative to EO but offers the same features. Well... JDBC would be an alternative if there is one I guess. Best thing about it is there is a standard for it. And most DB's have a driver for JDBC. /Kristoffer Peterh?nsel From nathand at senet.com.au Tue May 1 07:11:42 2001 From: nathand at senet.com.au (Nathan Day) Date: Thu Nov 3 14:46:11 2005 Subject: Thread Question... In-Reply-To: Message-ID: <200105011412.f41ECx178349@pluto.senet.com.au> On Saturday, April 28, 2001, at 05:22 AM, jeff_lamarche@peoplesoft.com wrote: > Using the method detachNewThreadSelector:toTarget:withObject:, you are > given one argument that will be provided to your method. I'd like to use > this argument to pass the selector for the method that should be called > when the thread is done and ready to exit. Can this passed argument be a > selector, or would there be problems casting from an id to a SEL in my > method? A NSThreadWillExitNotification is posted by NSThread when it receives the exit message, could you use this to do want you want to do? From jklein at ivy.artificial.com Tue May 1 08:22:24 2001 From: jklein at ivy.artificial.com (jk) Date: Thu Nov 3 14:46:11 2005 Subject: NSText scrollRangeToViable hanging program Message-ID: hi there, i've got a program in which one of the threads updates a log window at every iteration, potentially several times a second. after updating the log text, i call the NSText method scrollRangeToVisible to scroll down to the most recent message. when a good deal of text is coming through, the program freezes quite predictably. in the iterating thread i'm frozen in scrollRangeToVisible (which is stuck in [NSViewHierarchyLock lockForWriting], and ultimately semaphore_wait_signal_trap ()), while in the main thread i'm stuck in [NSView displayIfNeeded] and ultimately again semaphore_wait_signal_trap. am i doing something wrong here by trying to scroll the view from this other thread? does anybody know of a better way to do this? thanks, jon klein -- this is a .sig about a superhero named jonny, it's called jonny's .sig! From chuck at apple.com Tue May 1 09:18:51 2001 From: chuck at apple.com (Chuck Pisula) Date: Thu Nov 3 14:46:11 2005 Subject: NSPopUpButtonCells in TableViews In-Reply-To: <200105010112.f411CiV16380@smtp3.san.rr.com> Message-ID: <200105011618.f41GIkw07869@scv1.apple.com> You need to do a: NSPopUpButtonCell *popUpCell = // get this by alloc int, or via [popUp cell] to a view in IB, or otherwise... NSTableColumn *popUpColumn = [[myTableView tableColumns] objectAtIndex: indexOfColumnWantingPopUps] [popUpColumn setDataCell: popUpCell]; Or you could: make a subclass of NSTableColumn that returns popup cells from dataCellForRow: -chuck On Monday, April 30, 2001, at 06:11 PM, Daniel Staudigel wrote: > How does one put NSPopUpButtonCells into a NSTableView, if you return > them from the table view data source methods, it displays what they > return for description. What's up? > > Daniel Staudigel > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From lucsky at mac.com Tue May 1 09:34:41 2001 From: lucsky at mac.com (Luc Heinrich) Date: Thu Nov 3 14:46:11 2005 Subject: Disabling NSToolbarItems Message-ID: <200105011634.JAA28758@omnigroup.com> Yo, I just can't seem to be able to disable my toolbar Items, the 'setEnabled:NO' message simply does nothing. I've tried to send it from various places in the code, with no luck. My toolbar items are standard ones, just an icon set with 'setImage'. What do I miss ? PS: I also tried the different validation methods on NSToolbarItem and NSToolbar, still with no luck. -- Luc - lucsky@mac.com From tom_waters at mac.com Tue May 1 09:55:46 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:11 2005 Subject: keyboard input during drags In-Reply-To: <200104302312.QAA23055@smtpout.mac.com> Message-ID: <200105011654.JAA28482@smtpout.mac.com> Well, as much as I didn't want to link with Carbon, until I hear about some solution in Cocoa, I'm going with this, because at least it works! I'm a little concerned with the 512 however, on MY machine, that's what the spacebar produced, but I don't know how portable it is, or how to translate the KeyMap long's into some abstract key name. - (NSDragOperation)draggingUpdated:(id )info; { long KeyMap[4]; GetKeys(KeyMap); if (KeyMap[1] == 512 && drag_target_row != NODRAGTARGET) [self springLoad: drag_target_row]; ... On Monday, April 30, 2001, at 09:50 PM, Gerard Iglesias wrote: > On Tuesday, May 1, 2001, at 01:26 , Tom Waters wrote: > >> No, I'm not looking to see what modifiers were pressed. I want to get >> the keyboard event when the user presses the SpaceBar while they are >> dragging over my app. > > I don't think that there is Cocoa way to do that for now, it is a valid > request from my point of view but for noew I think that you would be > forced to use the Carbon function GetKeys : > > { > long KeyMap[4]; > GetKeys(KeyMap); > NSLog(@"%d, %d, %d, %d", KeyMap[0], KeyMap[1], KeyMap[2], > KeyMap[3]); > } From eric at levenez.com Tue May 1 11:02:29 2001 From: eric at levenez.com (Eric Levenez) Date: Thu Nov 3 14:46:11 2005 Subject: enumerating directory content in C References: <200104301429.HAA02372@smtpout.mac.com> Message-ID: <200105011802.AA00485@levenez.com.wanadoo.fr> On Mon, 30 Apr 2001 at 16:32:56, Raphael Sebbe wrote: > I need to enumerate directory content using C. I picked some unix code > from Kernighan&Ritchie using low-level apis, but it does not work. It > refuses to read directory information in : Of course, this code works only on s5 filesystem where file lenght are fixed at 14 caracters. On any other file system you need to use posix api : opendir, readdir... Here is a code that works on NeXTSTEP and on any Posix system (not tested on MacOS X) : #include #include #ifdef NeXT #include #else #include #endif #include #include void list_rep (char *); int main(void) { list_rep("."); return 0; } void list_rep(char *Rep_Name) { DIR *Rep; #ifdef NeXT struct direct *EntreeRep; #else struct dirent *EntreeRep; #endif struct stat etatFich; char *NomFicEntier; if ((Rep = opendir(Rep_Name)) == NULL) return; while ((EntreeRep = readdir(Rep)) != NULL) { if (!strcmp(EntreeRep->d_name, ".") || !strcmp (EntreeRep->d_name, "..")) continue; NomFicEntier = malloc(strlen(Rep_Name)+strlen(EntreeRep->d_name) +2); if (!NomFicEntier) continue; sprintf(NomFicEntier, "%s/%s", Rep_Name, EntreeRep->d_name); if (stat(NomFicEntier, &etatFich) < 0) { perror(NomFicEntier); continue; } if (etatFich.st_mode & S_IFDIR) { printf("%s/\n", NomFicEntier); list_rep(NomFicEntier); } else printf("%s\n", NomFicEntier); free(NomFicEntier); } (void)closedir(Rep); } -- Eric Levenez Unix is not only an OS, it's a way of life. From kjessup at blueworld.com Tue May 1 11:08:08 2001 From: kjessup at blueworld.com (Kyle Jessup) Date: Thu Nov 3 14:46:11 2005 Subject: make gcc stop stripping... Message-ID: <01dd01c0d26a$63a26f90$5b3f8c3f@aqua.blueworld.com> This is more of a gcc question I guess, but: I have an executable that loads dlls manually from a special folder we have. These dlls need to call back into the executable to do their business. This mostly works fine except in the cases where the functions which are inside the executable are never called FROM inside the executable. In these cases gcc seems to be stripping the functions when it links. This results in undefined symbol errors (which kills the app) as soon as a dll tries to call one of them. If I put, in the executable, a dummy call to one of these functions then gcc stops stripping it out but this is no way to solve the problem (since I can never be sure I got them all, plus it's a big nasty hack). I do not yet know if this is part of the problem but so far the stripped functions I have found have been (supposed to be) linked into the exe from a static lib. Also, I have no optimizations on. Does anyone know how to stop gcc from doing this? I don't want it to strip any of my functions since they're all da bomb. I want them all. - Kyle From igor at olg.com Tue May 1 11:34:32 2001 From: igor at olg.com (Daniel E. White) Date: Thu Nov 3 14:46:11 2005 Subject: enumerating directory content in C In-Reply-To: <200104301429.HAA02372@smtpout.mac.com> References: <200104301429.HAA02372@smtpout.mac.com> Message-ID: The "C" answer is : man opendir and look for a header file called "dirent.h" It is in there, I can see it in my OS X install, but I am running in OS 9 right now so I cannot verify it. I have done this kind of thing in C -- you need to use opendir and readdir >Hi all, > >I need to enumerate directory content using C. I picked some unix code from Kernighan&Ritchie using low-level apis, but it does not work. It refuses to read directory information in : > >while((size = read(dir->fd, (char*)&tamp_dir, sizeof(tamp_dir))) == sizeof(tamp_dir)) > { > if(tamp_dir.d_ino == 0) continue; > r.inode = tamp_dir.d_ino; > strncpy(r.name, tamp_dir.d_name, MAX_STRLEN); > r.name[MAX_STRLEN] = '\0'; > return &r; > } > >size always being -1, perror() tells "Is a directory". Is this a bug or is it specific to HFS filesystem ? > >Anyway, I need a C api for that, is Carbon the only solution (I don't want pascal strings or : separators...). Or perhaps an ObjC backend implemetation... Did anyone run into this before ? > -- ------------------------------------------------------------------------ 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 Waterson) From wmwhite at udallas.edu Tue May 1 13:46:32 2001 From: wmwhite at udallas.edu (wmwhite@udallas.edu) Date: Thu Nov 3 14:46:11 2005 Subject: Compiling sc-6.21 for BSD on OS X Message-ID: <200105012045.PAA14932@acad.udallas.edu> Maybe this belongs in the Darwin mailing lists, but I can only subscribe to so many lists. I want to compile sc-6.21 for Mac OS X. This is a fairly old ncurses/terminal spreadsheet program for Unix. While I am pretty modern in my use of technology, I still use sc for my gradebooks. This is because I can access it securely through an ssh connection from any computer on campus. No GUI spreadsheet out there gives me this ability. Unfortunately, Mac OS X seems to be missing a key library, or else has named it something else. When I set the build flags for BSD (The most recent BSD in the Makefile is 4.3), I get the following error: /usr/bin/ld: Undefined symbols: _regcmp _regex For System V Unices, these are in -lPW or -lgen. I have no idea where these are in a BSD system. Any ideas? -Walker From ez4 at mac.com Tue May 1 14:09:14 2001 From: ez4 at mac.com (Edwin Zacharias) Date: Thu Nov 3 14:46:11 2005 Subject: Fixed height drawers In-Reply-To: <200104300806.BAA23302@pixar.pixar.com> Message-ID: <200105012108.OAA05711@smtpout.mac.com> How do I make a drawer that has a fixed height, just like to tool pallets of Create and OmniGraffle? Setting the height of the drawer doesn't seem to work, and attempts at overriding windowShouldResize or drawerShouldResize resulted in my drawer shaking every time I resize the window. - Edwin From wwilliam at cisco.com Tue May 1 14:10:12 2001 From: wwilliam at cisco.com (Wade Williams) Date: Thu Nov 3 14:46:11 2005 Subject: Waking programmatically? Message-ID: Anyone found a way to wake the computer from sleep programmatically? Thanks, Wade From pa44 at cornell.edu Tue May 1 14:12:29 2001 From: pa44 at cornell.edu (Peter Ammon) Date: Thu Nov 3 14:46:11 2005 Subject: capturing content of NSOpenGLView In-Reply-To: <200105010345.f413jodQ013681@texlog2.texas.rr.com> Message-ID: <200105012112.RAA18570@postoffice2.mail.cornell.edu> On Monday, April 30, 2001, at 11:45 PM, Brian Nenninger wrote: > I have a Mac OS X app that needs to copy the contents of its windows as > bitmaps. I do this using -[NSImageView initWithFocusedViewRect:] and in > most cases it works fine. But if the source window has an NSOpenGLView > drawing its content, then that method doesn't work (it returns a solid > white bitmap). Apparently the NSOpenGLView is drawing in a way that > bypasses AppKit; anybody know of any way I can capture the image? > Grab.app can do it, but my understanding was that it uses undocumented > CoreGraphics functions. Thanks in advance for any advice, > This may not be what you want, but you can grab the contents of the OpenGL frame buffer using glReadPixels and put that in memory. Then you can create an NSBitmapImageRep from that, and then create an NSImage from that. Here's some COMPLETELY UNTESTED code: NSImage* imageFromOpenGLView:(NSOpenGLView*)myOpenGLView { int height=NSHeight([myOpenGLView bounds]); int width=NSHeight([myOpenGLView bounds]); NSBitmapImageRep* imageRep; NSImage* finalImage; imageRep=[[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:width pixelsHigh:height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:0 bitsPerPixel:0 ] autorelease]; [[myOpenGLView openGLContext] makeCurrentContext]; glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, [imageRep bitmapData]); [NSOpenGLContext clearCurrentContext] finalImage=[[[NSImage alloc] initWithSize:NSMakeSize(width, height)] autorelease]; [finalImage addRepresentation:imageRep]; return finalImage; } From contact at nickshanks.com Tue May 1 14:35:52 2001 From: contact at nickshanks.com (Nicholas Shanks) Date: Thu Nov 3 14:46:11 2005 Subject: Newsflash 4 newsreader - now open sourced too In-Reply-To: Message-ID: i'm in OS 9 right now so I can't check, but did you get Rick to do you another cool icon? I checked the code out a few days ago, but have yet to look into it deeply. What i'd like to know is the current development time, i.e. how long have you spent on it so far? Nicholas Shanks -- http://nickshanks.com/ From jeff_lamarche at peoplesoft.com Tue May 1 14:37:42 2001 From: jeff_lamarche at peoplesoft.com (jeff_lamarche@peoplesoft.com) Date: Thu Nov 3 14:46:11 2005 Subject: WebObjects 4.5.1 Released Message-ID: Good news - Objective-C is supported, and EO Framework is included. Bad news: They made a rather ominous comment: This update will also convert WebObjects 4.5 Java applications to run on WebObjects 5 for Java. It will also help you bring Objective-C applications forward to Java. So, it does look like the rumours of Objective-C going away in WO5 are true. From anarkhos at mac.com Tue May 1 14:51:03 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:11 2005 Subject: Java3d on OSX In-Reply-To: <0GCM00JRM74R2O@mta7.pltn13.pbi.net> References: <0GCM00JRM74R2O@mta7.pltn13.pbi.net> Message-ID: Why not use GL4Java which works on more platforms, and is usually faster to boot. From anarkhos at mac.com Tue May 1 14:54:09 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:11 2005 Subject: simple sheets solution Message-ID: sheets are modal and should always have a 'cancel' button so I don't think this is a major issue, but if people find that it obscures information they want to enter into a sheet then why not have the sheet optionally show itself above the title bar instead of below it? It could even follow the cursor, although an arrow button would be clearer. From mcguirk at incompleteness.net Tue May 1 16:25:09 2001 From: mcguirk at incompleteness.net (Dan McGuirk) Date: Thu Nov 3 14:46:11 2005 Subject: DMSetAVPowerState()? Message-ID: Does anyone understand how to use the DMSetAVPowerState() call? I'm trying to wake the monitor from sleep. It looks like this call will let me do that, but the Display Manager API is extremely convoluted and almost completely undocumented, and I can't make heads or tails of it. -- Dan McGuirk mcguirk@incompleteness.net From sanguish at digifix.com Tue May 1 17:44:57 2001 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:46:11 2005 Subject: How do I change fonts in my app In-Reply-To: <20010430045554.10926.qmail@quoll.ind.tansu.com.au> Message-ID: If you have a look in this installment of the HMTLEditor series, there is a case where the font is set in preferences.. this might help.. http://www.stepwise.com/Articles/Technical/HTMLEditor/HTMLEditor-5.html specifically on this page http://www.stepwise.com/Articles/Technical/HTMLEditor/HTMLEditor-5.1.html steps 7 and 8 I am working on updating this to Mac OS X, but this stuff should be identical (mainly its the ProjectBuilder screenshots, and interaction that have changed) On Monday, April 30, 2001, at 12:55 AM, nigel@ind.tansu.com.au wrote: > > I have an app which is basically a wrapper around a command. > The window has some controls and an NSText for the command's output. > I would like to give the user the ability to change the font which > display's the command output. > > Now, I can easily pop up the NSFontPanel programatically, > but there seems no way to bind the action of the user selecting a > font to a method in my controller. > > The NSFontManager doco says that it will call the changeFont: > method of a foremost responder. I can do the following: > > [win makeFirstResponder: textOutputBox] > > but that fails also. From bierman at apple.com Tue May 1 18:00:11 2001 From: bierman at apple.com (Peter Bierman) Date: Thu Nov 3 14:46:11 2005 Subject: enumerating directory content in C In-Reply-To: <200104301429.HAA02372@smtpout.mac.com> Message-ID: At 4:32 PM +0200 4/30/01, Raphael Sebbe wrote: >Hi all, > >I need to enumerate directory content using C. I picked some unix code >from Kernighan&Ritchie using low-level apis, but it does not work. It >refuses to read directory information in : > >while((size = read(dir->fd... I suspect the sample code you found is incredibly out of date. Try: http://www.google.com/search?q=man+readdir -pmb From george at elgato.com Tue May 1 18:16:30 2001 From: george at elgato.com (George Rath) Date: Thu Nov 3 14:46:11 2005 Subject: ioVRefNum to BSD Message-ID: In Carbon looping through volumes I can call FSGetVolumeInfo and obtain the "ioVRefNum"-s of all mounted volumes. This works in "X" and "Classic". What is the best way to obtain the volume' BSD name (like disk5s1s2) knowing the volume' ioVRefNum? George From uli at ritual.org Tue May 1 18:41:04 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:11 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200104281537.IAA05997@omnigroup.com> Message-ID: <14ulda-1uveS0C@fmrl00.sul.t-online.com> Am Samstag, 28. April 2001 um 17:37 schrieb Daniel Staudigel: > It probably is because of non-full screen. You were probably right. The new iTunes update allows full screen display, and is considerably faster in this mode. Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From dweebert at home.com Tue May 1 19:44:27 2001 From: dweebert at home.com (Graeme Hiebert) Date: Thu Nov 3 14:46:11 2005 Subject: Referencing the private/Shared Frameworks In-Reply-To: <200105010231.WAA25598@pellns.alleg.edu> Message-ID: <20010502024408.MKSL24212.mail1.rdc2.bc.home.com@locutus> I apologize if this is a repeat. I didn't get a copy back here (yet?) On Monday, April 30, 2001, at 07:28 PM, Chris Behm wrote: > I just tried using the SharedFrameworks and it worked like a charm. > Make sure you clean your framework that's going to be shared, then > rebuild it with the install path as > @executable_path/../SharedFrameworks. Then, in the app that's including > it, add that framework to a copy phase into SharedFrameworks. > > Any other things (plugins, applications, whatever) that link against > that framework should be fine (though you might need/want to rebuild > them linked against the newly built framework). I've found that most > times, if a target isn't cleaned prior to building, a lot of these > types of changes aren't seen. Apparently I'm still doing something wrong. I'm hopeful, though, because it works for you. My test is a command-line tool written in C, and accessing my code from straight C; I don't know if that has anything to do with it. Here's what I've done. 1) Built my framework with the @executable_path/../SharedFrameworks (after a full clean). 2) Linked my application (in another project) with the framework, copying it to the "SharedFrameworks" directory. (Again, this is all after a full clean operation.) 3) Rename the original framework that was copied, so that I'm sure it wasn't being picked up from its original location. 4) My application runs great. 5) My C command-line tool, which was linked to the framework with "@executable_path..." can not find the framework UNLESS I make a symbolic link to it from ~/Library/Frameworks. I would have expected that having it in SharedFrameworks would allow the system to find it when running my command-line tool, but it appears that I am missing something fundamental here. -g From dstaudi at san.rr.com Tue May 1 20:52:42 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:11 2005 Subject: Drag And Drop Message-ID: <200105020352.UAA17616@omnigroup.com> Need help quick! Cannot seem to get drag and drop to work between to NSTableViews (not subclasses). Do I need to make a subclass to get functionality like in iTunes (drag one into an item in another, not next to it). Any source, projects, explanations would be gladly accepted. Daniel Staudigel From uli at ritual.org Tue May 1 20:57:32 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:11 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support Message-ID: <14unlj-24qVo8C@fmrl02.sul.t-online.com> Hi, I want to point out that according to Apple's new standards (as described on page 163 of the current version of SystemOverview.pdf), supplementary files for an application belong into ~/Library/Application Support. This is a very reasonable rule. A few days ago, I realized that practically all major Cocoa applications that are already available (from Omni, Stone, Caffeine and RBrowser) put their supplementary files into a folder directly in ~/Library. This a *very bad* thing, because as soon as you have a lot of apps, ~/Library will become a hardly manageable mess, in which other important folders will get lost among all these supplementary app folders, whereas putting these supplementary app folders into ~/Library/Application Support separates them from the rest and makes things much clearer. I thought it would be especially important that the already existing apps stick to Apple's guidelines, since they will be models for upcoming Cocoa apps. Therefore, I sent an email to the above mentioned companies with regard to this subject. While I still don't have an answer from the other companies, Omni reacted immediately, and starting with yesterday's release of OmniWeb rc1, will change the behavior of all their apps accordingly. (Many thanks to Omni! Once again, you proved to be such a great company! :-)) ) I just wanted to point this out to all developers here, so that upcoming Cocoa apps get this right from the start. Thanks! Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From bierman at apple.com Tue May 1 21:21:16 2001 From: bierman at apple.com (Peter Bierman) Date: Thu Nov 3 14:46:11 2005 Subject: Perl's sparse seek()/print causing kernel panic In-Reply-To: <20010429195534.A8009@tantrix.realprogrammers.com> Message-ID: At 7:55 PM -0700 4/29/01, omnigroup.com@paulm.com wrote: >The following snippet of code adapted from t/op/lfs.t (large file >system testing) causes my OS X 10.0.1 Cube to panic: > >open(BIG, ">big"); >seek(BIG, 5_000_000_000, 0); >print BIG "big"; >close BIG; # dies here > >The machine locks with console: > >Unresolved kernel trap(cpu 0): 0x300 HFS+ or UFS? HFS+ doesn't support sparse files, so the print causes the filesystem to actually try and grab all that space, which probably triggers the panic. Either way, make sure you file a bug with Apple. -pmb From nigel at ind.tansu.com.au Tue May 1 22:18:12 2001 From: nigel at ind.tansu.com.au (nigel@ind.tansu.com.au) Date: Thu Nov 3 14:46:11 2005 Subject: How do I change fonts in my app In-Reply-To: from "Scott Anguish" at May 01, 2001 08:43:32 PM Message-ID: <20010502051424.20867.qmail@quoll.ind.tansu.com.au> ... > specifically on this page > > http://www.stepwise.com/Articles/Technical/HTMLEditor/HTMLEditor-5.1.html > > steps 7 and 8 That is pretty much what I did, except that my controller was not a subclass of NSWindowController, and I was trying to use the standard Interface Builder Font menu to invoke the NSFontManager. I just changed it to the way the article recommended, (i.e. a separate method to invoke the font panel and manager) and sort of worked, but only once :-( (i.e. current font was not highlighted when the font panel came up, was able to change the font in first invocation of the program, but not since) Very weird. But at least I am in the right ball park. Thanks for the pointer, Scott! -- | Nigel Pearson, nigel@ind.tansu.com.au | "Reality is that which, | | Telstra NW-D, Sydney, Australia. | when you stop believing | | Office: 9206 3468 Fax: 9212 6329 | in it, doesn't go away." | | Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis.' | From mikevannorsdel at qwest.net Tue May 1 22:31:50 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:11 2005 Subject: waitUntilExit with Security Frmwrk? Message-ID: <200105020531.WAA21368@omnigroup.com> How do I wait for a task to complete when using the Security Framework and a task launched with AuthorizationExecuteWithPrivileges()? From raphael_sebbe at mac.com Tue May 1 23:43:47 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:11 2005 Subject: enumerating directory content in C In-Reply-To: Message-ID: <200105020643.XAA08296@smtpout.mac.com> On Wednesday, May 2, 2001, at 02:58 AM, Peter Bierman wrote: > At 4:32 PM +0200 4/30/01, Raphael Sebbe wrote: >> Hi all, >> >> I need to enumerate directory content using C. I picked some unix code >> from Kernighan&Ritchie using low-level apis, but it does not work. It >> refuses to read directory information in : >> >> while((size = read(dir->fd... > > I suspect the sample code you found is incredibly out of date. > Yes, indeed. It doesn't work on Linux either... Thanks to all. To sum up : there are at least 2 ways of doing that in UNIX/C : dirent.h (opendir...) and fts.h Raphael From hongping at visto.com Wed May 2 02:54:06 2001 From: hongping at visto.com (Hongping Lim) Date: Thu Nov 3 14:46:11 2005 Subject: does undoManager retain? which methods retain? Message-ID: <200105020953.CAA03947@omnigroup.com> I am having some memory leaks, always getting error 10 and 11 when I close a document or quit my application. I am also having some undo problems when I pass pointers to objects into prepareForInvocation. The undo/redo doesnt seem to function as expected. Does anyone have experience using the undoManager with objects/pointers arguments? Does it retain arguments passed as pointers? And if so is there a need to release? What other methods does retain and there is a need to release manually? I know NSArray does, but does it automatically release? ___________________________________________________________________________ Visit http://www.visto.com/info, your free web-based communications center. Visto.com. Life on the Dot. From mikevannorsdel at qwest.net Wed May 2 03:04:52 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:11 2005 Subject: Dropping on dock icon Message-ID: <200105021004.DAA05650@omnigroup.com> How do I allow files to be dropped onto my application's icon in the dock to be opened. And does this still use application:openFile:? From ssudre at intego.com Wed May 2 03:05:43 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:11 2005 Subject: Drag And Drop II (other query) In-Reply-To: <200105020352.UAA17616@omnigroup.com> Message-ID: <1223324276-19177065@transeo.com> Doe someone have a working example on how to do row Drag And Drop within the "same" NSTableView ? I have the following code in the table data source: - (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard { if ([rows count]==1) { NSArray * tTypes=[NSArray arrayWithObjects:@"myType",nil]; int tOriginalRow=[[rows objectAtIndex:0] intValue]; [pboard declareTypes: tTypes owner:nil]; [pboard setData: [NSData dataWithBytes: (void *) &tOriginalRow length:sizeof(int)] forType: @"myType"]; return YES; } else { return NO; } } - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id )info proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)op { NSArray * tArray=[[info draggingPasteboard] types]; if ([tArray count]==1) { if ([[tArray objectAtIndex:0] isEqualToString:@"NBFirewallRule"]==YES) { return NSDragOperationMove; } } return NSDragOperationNone; } - (BOOL)tableView:(NSTableView*)tv acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)op { NSArray * tArray=[[info draggingPasteboard] types]; int tOriginalRow; tOriginalRow= *((int *) [[[info draggingPasteboard] dataForType:@"myType"] bytes]); // Do something here when it works return YES; } The problem is the Drag is correctly managed but the Drop doesn't work. It seems the - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id )info proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)op is never called. I'm surely missing something but don't know where. -- Stephane From ssudre at intego.com Wed May 2 03:08:03 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:11 2005 Subject: capturing content of NSOpenGLView In-Reply-To: <200105010345.f413jodQ013681@texlog2.texas.rr.com> Message-ID: <1223324098-19187809@transeo.com> On mardi, mai 1, 2001, at 05:45 , Brian Nenninger wrote: > I have a Mac OS X app that needs to copy the contents of its windows as > bitmaps. I do this using -[NSImageView initWithFocusedViewRect:] and in > most cases it works fine. But if the source window has an NSOpenGLView > drawing its content, then that method doesn't work (it returns a solid > white bitmap). Apparently the NSOpenGLView is drawing in a way that > bypasses AppKit; anybody know of any way I can capture the image? > Grab.app can do it, but my understanding was that it uses undocumented > CoreGraphics functions. Thanks in advance for any advice, I remembered reading somewhere that the OpenGL drawings were done directly to the VRAM (which explains why Minimized windows doesn't show any NSOpenGLView). But I'm not 100% sure. From ssudre at intego.com Wed May 2 03:14:09 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:11 2005 Subject: LSOpenCFURLRef & ICLaunchURL In-Reply-To: Message-ID: <1223323769-19207595@transeo.com> On mardi, mai 1, 2001, at 01:43 , Ryan McGann wrote: > On Monday, April 30, 2001, at 04:41 AM, St?phane Sudre wrote: > >> I've just been looking at the QA 1028 on LSOpenCFURLRef & ICLaunchURL >> and I'm wondering if LSOpenCFURLRef does all the things ICLaunchURL >> does because it would avoid using the Carbon Frameworks within a Cocoa >> App. > I believe Eric Schlegel (a Carbon toolbox engineer) posted on the > Carbon development list that ICLaunchURL calls through to LSOpenCFURL. > As an added benefit you don't have do anything special to the URL, as > IC doesn't support UTF encoded strings but LaunchServices does. From what I'm beginning to understand. There are 3 possible calls: - LSOpenCFURLRef - ICLaunchURL - [NSWorkSpace openURL:] I tend to believe from what you said (which is what is stated in QA 1028) and what I guess that ICLaunchURL and [NSWorkSpace openURL:] are both based upon LSOpenCFURLRef. So I'm going to use the [NSWorkSpace openURL:] (which is not documented on the Apple Web Site IIRC). -- Stephane From gblock at wanadoo.fr Wed May 2 03:53:45 2001 From: gblock at wanadoo.fr (Gregory Block) Date: Thu Nov 3 14:46:11 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: Note: I'm a kernel weenie. I've been studying schedulers and VM systems for a long time, for fun. This makes me a very uninteresting person, and as a result, I resort to going to the gym four to five times a week to make up for the fact that conversations with me can curdle the milk in your tea. On Sunday, April 29, 2001, at 04:36 , Rosyna wrote: >> And I think on total, the drawbacks of cooperative outweight its >> advantages (unless you live in a perfect world, where every programer >> makes no mistakes, and hence writes perfect apps that never crash. >> hahhahaha) > That is protected memory, not multitasking. While it's true that the use of MMU functionality to provide protected memory is not necessarily linked to a preemptive scheduler, show me an implementation. :) >> With cooperative multitasking, if I run a lot of apps, any MP3 player >> I have used so far at some point stops to play continually. > > Not the ones I use ;) The point being that you cannot guarantee, in a cooperative multitasking environment, that you will be granted the resources you demand. Preemptive multitasking makes it easier to write time-critical systems by allowing the user or application to inform the scheduler of their needs. Ideally, the only difference between a cooperative scheduler and a preemptive one is that a preemptive one has a finer granularity. That's *it*. Any behavioral differences noted by the end user which cannot be explained by the behavior of the applications can be considered as a flaw in the system; this is true on both sides. In a cooperative environment, applications which fail to yield are at fault. In a preemptive environment, applications which schedule themselves improperly are at fault. The difference is that a preemptive environment SHOULD allow easier rectification of the situation and does not necessarily require an application change to change the scheduling environment. The fact that you're having an end-user experience issue does not necessarily point at the choice of preemptive scheduling being a mistake. 99% of humanity will happily disagree with that assessment, and with good arguments and reasons. > Yes, but with TRUE preemptive multitasking, it gets the same time as > all other processes. This could actually cause it to skip more. This is not true. Preemptive multitasking does not mean equivalent timeslices. There are many, many ways of providing these features: process/task prioritization is the most common one that end-users see, but one of the most important activities that take place behind the scenes is the process of priority inversion and other forms of handling I/O and blocking calls. The advantages go deeper than the skin you're looking at. Good throughput to device layers is one of the holy grails of good preemptive kernels. In a *single-tasking* environment, achieving that is simple. In a co-op, it's not as simple. Preemptive brings the problem to a more manageable space. > On OS X, this definitely isn't the case. All apps have the same > priority by default. This is sort of the opposite of preemptive. This is a flaw in the kernel; one which has already been rectified. The ability to set priorities will inevitably allow someone, maybe even Apple, to write a tool which allows you to set scheduling priority on your applications, or even to allow the "frontmost application" to get a priority bump. Or, more importantly, to *really* put that huge render into the background. > Yes, there should be NO reason a background app needs text input. Drop the idea of "foreground" versus "background" - that only works on a limited set of real-world applications. And replace "text input" for any input stream, whether from a device or a network port, because they're essentially the same problem. > In OS X, IE can still freeze the machine (crash the window manager) And once Carbon reaches 99% stability and parity with Cocoa, I would expect that freezing like that will become difficult, if not impossible, to reproduce. I think we can all clearly point this out as a flaw in an application and its core APIs rather than being something which is the result of a choice for preemptive multitasking. In short, and IMO: Preemptive multitasking is a better solution to 99% of any everyday user's real-world usage problems, whether that be your grandmother, your professional programmer, your stock trader, or your daughter. The problem is that 90% of that 90% isn't visible to the end-user unless he/she looks more carefully. :plur, Greg From gblock at wanadoo.fr Wed May 2 03:55:59 2001 From: gblock at wanadoo.fr (Gregory Block) Date: Thu Nov 3 14:46:11 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: On Sunday, April 29, 2001, at 05:15 , Rosyna wrote: > Ack, at 4/29/01, tlr@mac.com said: > >> And it never sleep (except when I wake up the Cube, but I believe it >> due to the external speakers), THANKS TO PREEMPTIVE MULTITASKING!!!! > > All audio objectts skip when waking from even monitor sleep. Neither of which have anything to do with preemptive multitasking, quite frankly, and everything to do with a young kernel. > Isn't this protected memory again? One's ability to switch to another application and function normally when an application refuses to respond is the preemptive core; protected memory prevents an application from trashing someone else's memory, but does not prevent the kernel from being fed crap and crashing. Two less problems than you used to have under OS9. From blop at mac.com Wed May 2 03:57:40 2001 From: blop at mac.com (Michel Fortin) Date: Thu Nov 3 14:46:11 2005 Subject: Scriptability In-Reply-To: <200105020953.CAA03947@omnigroup.com> Message-ID: <200105021053.GAA05801@river.netrover.com> Hi, I want to make my application scriptable, but when I try to get the dictionary from Script Editor I just get the standard suite and I can't see mine. I've made my .scriptSuite and .scriptTerminology files, and set the NSAppleScriptEnabled proprety to YES, but that gets me there: no visible custom dictionary. I can't either toucth any of my custom object with a script. I've looked at the Sketch example, but I can't find what's missing in my app. Any sugestions? Michel Fortin michelf@mac.com From rosyna at unsanity.com Wed May 2 04:01:07 2001 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:46:11 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: References: Message-ID: I don't think it has anything to do with carbon. i use a lot of carbon apps, they all crash sometime or another, but NONE take the comp with it other than IE. And project builder, a cocoa app, has taken the window manager a few times. Ack, at 4/30/01, Gregory Block said: >And once Carbon reaches 99% stability and parity with Cocoa, I would >expect that freezing like that will become difficult, if not >impossible, to reproduce. I think we can all clearly point this out >as a flaw in an application and its core APIs rather than being >something which is the result of a choice for preemptive >multitasking. -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insane People From ssudre at intego.com Wed May 2 04:43:10 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:11 2005 Subject: Dropping on dock icon In-Reply-To: <200105021004.DAA05650@omnigroup.com> Message-ID: <1223318393-19531103@transeo.com> On mercredi, mai 2, 2001, at 12:04 , Mike Vannorsdel wrote: > How do I allow files to be dropped onto my application's icon in the > dock to be opened. And does this still use application:openFile:? application:openFile is the method called. You need to have your .plist file correctly filled for the CFBundleDocumentTypes section. With all these things, it should work. From raphael_sebbe at mac.com Wed May 2 05:19:49 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:11 2005 Subject: Dropping on dock icon In-Reply-To: <1223318393-19531103@transeo.com> Message-ID: <200105021219.FAA21038@smtpout.mac.com> On Wednesday, May 2, 2001, at 01:43 PM, St?phane Sudre wrote: > > On mercredi, mai 2, 2001, at 12:04 , Mike Vannorsdel wrote: > >> How do I allow files to be dropped onto my application's icon in the >> dock to be opened. And does this still use application:openFile:? > > application:openFile is the method called. You need to have your .plist > file correctly filled for the CFBundleDocumentTypes section. With all > these things, it should work. From my experience, you *have to* set the OSType key in the document types. If you don't use OSTypes, set the key to "****". But perhaps I had to do that only because I authorize any extension (empty string as extension), though I did not check that... Raphael From mikevannorsdel at qwest.net Wed May 2 06:03:29 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:11 2005 Subject: Dropping on dock icon In-Reply-To: <200105021219.FAA21038@smtpout.mac.com> Message-ID: <200105021303.GAA18760@omnigroup.com> I have all the info.plist info filled out. Dropping files from the Finder works fine, but I just can't drop them on the dock icon (while the app is open). On Wednesday, May 2, 2001, at 06:22 AM, Raphael Sebbe wrote: > > On Wednesday, May 2, 2001, at 01:43 PM, St?phane Sudre wrote: >> >> application:openFile is the method called. You need to have your >> .plist file correctly filled for the CFBundleDocumentTypes section. >> With all these things, it should work. > > From my experience, you *have to* set the OSType key in the document > types. If you don't use OSTypes, set the key to "****". > But perhaps I had to do that only because I authorize any extension > (empty string as extension), though I did not check that... > > Raphael From ccunning at math.ohio-state.edu Wed May 2 06:10:36 2001 From: ccunning at math.ohio-state.edu (Chad Cunningham) Date: Thu Nov 3 14:46:11 2005 Subject: Memory management In-Reply-To: <200105010635.XAA12105@omnigroup.com> Message-ID: There are a few good articles on stepwise.com about this, but here's the short version. If your method alloc, copies, or retains an object, it should also release it. alloc and copy create a new object and set it's reference count to 1. release decreases the reference count by 1, retain increases it by 1. autorelease decreases the refernce count by 1, but at some time in the near future (mainly useful for returning objects). See http://www.stepwise.com/Articles/Technical/HoldMe.html for more. On Tue, 1 May 2001, Ben Lachman wrote: > Now that I've been doing small projects with cocoa for a while, one of > my projects it getting rather large (at least compared to the other > ones :-) and I'd like to understand a bit better the memory management > conventions of obj-c/cocoa. I've noticed that some code has autorelease > messages in it and some has release msgs and some has nothing at all. > When should each be used, what is the default behavior and why? I'm > coming from C++ and destructors so I'm a bit confused by the way cocoa > does it. > > Any help would be appreciated. > > ->Ben > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > -- Chad Cunningham ccunning@math.ohio-state.edu "Well, once again my friend, we find that science is a two-headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is bad! Oh beware the other head of science, Arthur, it bites!" From jba at bullex.de Wed May 2 06:28:21 2001 From: jba at bullex.de (Jens Baumeister) Date: Thu Nov 3 14:46:11 2005 Subject: Memory management Message-ID: > -----Original Message----- > From: Ben Lachman [mailto:lachman@boochee.com] > Now that I've been doing small projects with cocoa for a > while, one of > my projects it getting rather large (at least compared to the other > ones :-) and I'd like to understand a bit better the memory > management > conventions of obj-c/cocoa. www.cocoadev.com has many articles dealing with memory management. http://www.cocoadev.com/index.pl?MemoryManagement would be the best entry point. _____________________________________ Jens Baumeister Bullex GmbH, Cologne, Germany She sells c-shells by the sea shore. From buck.erik at mcleodusa.net Wed May 2 06:57:26 2001 From: buck.erik at mcleodusa.net (Erik M. Buck) Date: Thu Nov 3 14:46:11 2005 Subject: Memory management References: <200105010635.XAA12105@omnigroup.com> Message-ID: <005601c0d30f$f9ce7040$40e72bd8@bc7440b> Cocoa memory management: http://www.stepwise.com/Articles/Technical/2001-03-11.01.html http://www.stepwise.com/Articles/Technical/HoldMe.html or the hundreds of times this question has been asked in this forum before. From andreas.elin at popwire.com Wed May 2 07:11:02 2001 From: andreas.elin at popwire.com (Andreas Elin) Date: Thu Nov 3 14:46:11 2005 Subject: Catch mouse click in "resize view"? In-Reply-To: <200104262124.f3QLOLG13043@home.karahalios.org> Message-ID: Does anybody know how to decide when the mouse i clicked and released in the little "resize triangle" in the lower right corner? Regards, /Andreas From bbum at CODEFAB.COM Wed May 2 07:33:48 2001 From: bbum at CODEFAB.COM (Bill Bumgarner) Date: Thu Nov 3 14:46:11 2005 Subject: WebObjects 4.5.1 Released In-Reply-To: <200105021045.DAA17586@outbox.omnigroup.com> Message-ID: <200105021433.f42EXiW40241@pi.codefab.com> [Replies to webobjects-talk@omnigroup.com] This hasn't been rumor for a while; Apple announced long ago-- prior to last year's WWDC-- that WO 5.0 would be pure Java. Around December or so, Apple publically discussed that 4.5.1 on OSX would only support pure ObjC apps. Unless something changed recently, WO 4.5.1 on Win2K/NT, Solaris, HP-UX still supports the Java bridge. It isn't clear what the story is with Mac OS X Server as that is really two products; the shipping 1.2 version and the unreleased 2.0 version based on OSX. In any case, a lot of the people that have been using WebObjects for many years-- myself included-- are looking forward to a pure Java implementation with great enthusiasm. I can only speak about the parts that Apple has publically discussed. However, that little bit looks very promising; performance is excellent and the development environment is *vastly* improved by moving to a pure Java environment. Debugging works and it is trivial to leverage third party tools and frameworks-- most of which appear as Java implementations. Do not make the mistake of pre-evaluating WebObjects Java/5.0 in the context of WebObjects 4.5 as it exists today! The Java Bridge makes any such metrics completely useless. While I'm bummed that 4.5.1 on OSX won't support Java in a fashion that makes it possible to mix Java and ObjC-- my experience indicates that there are a lot of "pure ObjC" projects that use one or two Java classes because of convenience or requirements, I fully understand that absolute maintenance and porting nightmare that is the Java Bridge. Furthermore, suppprting the Java Bridge across multiple versions of a modern JDK-- a requirement to continue to support HP-UX, Solaris, Mac OS X and NT/2K simultaneously-- would be prohibitively expensive and a total bear to support. I would highly suggest you wade through the archives before taking this conversation any further-- this is a subject that has been rehashed many, many times in the last 12 months. b.bum On Wednesday, May 2, 2001, at 06:45 AM, macosx-dev-request@omnigroup.com wrote: > From: jeff_lamarche@peoplesoft.com > Subject: WebObjects 4.5.1 Released > To: macosx-dev@omnigroup.com > Date: Tue, 1 May 2001 14:37:28 -0700 > charset=us-ascii > > Good news - Objective-C is supported, and EO Framework is included. Bad > news: They made a rather ominous comment: > > This update will also convert WebObjects 4.5 Java applications to run on > WebObjects 5 for Java. It will also help you bring Objective-C > applications > forward to Java. > > So, it does look like the rumours of Objective-C going away in WO5 are > true. From ryanstevens at mac.com Wed May 2 07:41:42 2001 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:46:11 2005 Subject: I can't remove my menu. In-Reply-To: Message-ID: <200105021441.HAA25444@omnigroup.com> On Tuesday, May 1, 2001, at 04:08 AM, Rosyna wrote: > I use the below code to install and remove a global menu. When I try to > remove the menu, the Log shows the Remove string, but it's never > removed. if i install it again, it installs over the exact same place > as the other menu. What am I missing here? > > -(void)installMenu > { > > blahMenu = [[[NSStatusBar systemStatusBar] > statusItemWithLength:NSSquareStatusItemLength] retain]; > [blahMenu setTitle:@"LameMenu"]; > [blahMenu setMenu:blahMenuItem]; > NSLog(@"Installed"); > } > > -(void)removeMenu > { > [[NSStatusBar systemStatusBar] removeStatusItem:blahMenu]; > [blahMenuItem release]; blahMenuItem = nil; > NSLog(@"Removed"); > } > - (void)removeMenu { [blahMenu release]; [blahMenuItem release]; blahMenu = nil; blahMenuItem = nil; } ....Seems to work ok. From raphael_sebbe at mac.com Wed May 2 08:00:42 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:11 2005 Subject: pthread problem (thread leak) Message-ID: <200105021459.HAA14776@smtpout.mac.com> Using top, I can see that each time I use pthread_create(), I get one more thread (normal) in top's thread count column. But it does not decrease when the thread exits (by returning by itself). I am not doing anything special in the thread func (just return NULL). I also tried pthread_exit(NULL) instead of return NULL, with no effect. Am I missing something here ? On the other hand, I also use Carbon SoundManager, which creates a thread itself, but that one is correctly released when destroying the SoundChannel. Just in case this can help : the thread code (creation, thread func...) resides in a framework, and is called from a standard Cocoa app (not multithreaded). Thanks, Raphael From izidor.jerebic at tari.si Wed May 2 08:03:31 2001 From: izidor.jerebic at tari.si (Izidor Jerebic) Date: Thu Nov 3 14:46:11 2005 Subject: handling key equivalents, mnemonics, etc. in NSView? Message-ID: <15031460887615@ikar.s5.net> Hi! I am trying to use various dynamic key-equivalents or mnemonics in my NSView subclass (dynamic means they are defined by user of this application). I have three methods implemented in my NSView subclass (see below), and none of the -perform... methods is called when I press CTRL-J or CMD-J or any combination of 'J' with modifier keys ('J' is an example of dynamically defined mnemonic). KeyDown method is called when I press CTRL-J. When pressing CMD-J, nothing gets called at all. All I get is system beep. What am I doing wrong? What is the correct way to implement functionality like this? This really baffles me. I am porting an app from OpenStep 4.2 and almost everything just works, but some trivial (to me :-) things don't work. I guess I am spoiled :-) Thanks in advance, izidor // - (void)keyDown:(NSEvent *)e { [self interpretKeyEvents:[NSArray arrayWithObject:e]] ; } // - (BOOL)performMnemonic:(NSString *)aString { if( [graphicSystem performMnemonic:aString] ) return YES ; else return [super performMnemonic:aString] ; } // - (BOOL)performKeyEquivalent:(NSEvent *)theEvent { if( [graphicSystem performMnemonic:[theEvent charactersIgnoringModifiers] ] ) return YES ; else return [super performKeyEquivalent:theEvent] ; } From ssudre at intego.com Wed May 2 08:05:27 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:11 2005 Subject: Catch mouse click in "resize view"? In-Reply-To: Message-ID: <1223306250-20261775@transeo.com> On mercredi, mai 2, 2001, at 04:10 , Andreas Elin wrote: > Does anybody know how to decide when the mouse i clicked and released > in the > little "resize triangle" in the lower right corner? Maybe with a delegate for the Window and an implementation of: - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize; From tom_waters at mac.com Wed May 2 08:58:26 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:11 2005 Subject: Drag And Drop II (other query) In-Reply-To: <1223324276-19177065@transeo.com> Message-ID: <200105021556.IAA10839@smtpout.mac.com> I may be misunderstanding your code example, but you write the type "myType" into the pboard, then expect to find "NBFirewallRule" in validateDrop... (probably just an email typo) Which are you registering for? Did you remember to register? [yourTableViewInstance registerForDraggedTypes: [NSArray arrayWithObject: @"NBFirewallRule"]]; validateDrop will only get called if the pboard contains one of the types you are registered for. On Wednesday, May 2, 2001, at 03:04 AM, St?phane Sudre wrote: > Doe someone have a working example on how to do row Drag And Drop > within the "same" NSTableView ? > > I have the following code in the table data source: > > ***snip *** > > The problem is the Drag is correctly managed but the Drop doesn't work. > It seems the - (NSDragOperation)tableView:(NSTableView*)tv > validateDrop:(id )info proposedRow:(int)row > proposedDropOperation:(NSTableViewDropOperation)op is never called. > > I'm surely missing something but don't know where. > From ssudre at intego.com Wed May 2 09:08:16 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:11 2005 Subject: Drag And Drop II (other query) In-Reply-To: <200105021556.IAA10837@smtpout.mac.com> Message-ID: <1223302481-20488524@transeo.com> On mercredi, mai 2, 2001, at 05:55 , Tom Waters wrote: > I may be misunderstanding your code example, but you write the type > "myType" into the pboard, then expect to find "NBFirewallRule" in > validateDrop... (probably just an email typo) email typo. > Which are you registering for? Did you remember to register? > > [yourTableViewInstance registerForDraggedTypes: [NSArray > arrayWithObject: @"NBFirewallRule"]]; > > validateDrop will only get called if the pboard contains one of the > types you are registered for. I didn't register the type. Didn't know I had to. I thought the check was done in validateDrop. With registerForDraggedTypes, it's now working perfectly. Thanks From tom_waters at mac.com Wed May 2 09:09:06 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:11 2005 Subject: Drag And Drop In-Reply-To: <200105020352.UAA17616@omnigroup.com> Message-ID: <200105021607.JAA27019@smtpout.mac.com> You shouldn't need to subclass the views as long as you don't mind the default behavior of NSTableView. I've had to write about 1,500 lines of code to get my table view to behave the way I want, between drag and drop, custom cells, custom rendering, custom field editors, custom drag highlighting, spring loaded folders, etc. In order to get any kind of drag and drop functionality between table views, you're going to need to make your own datasource (NSTableDataSource) that implements the following three methods: - (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard; - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id )info proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)op; - (BOOL)tableView:(NSTableView*)tv acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)op; These are all pretty well explained at the bottom of NSTableView.h Don't forget to register your drag types too: NSTableView registerForDraggedTypes Note to all: Use the HEADER files! I've learned the most by using Batch Find in PB and reading the header files. On Tuesday, May 1, 2001, at 08:52 PM, Daniel Staudigel wrote: > Need help quick! Cannot seem to get drag and drop to work between to > NSTableViews (not subclasses). Do I need to make a subclass to get > functionality like in iTunes (drag one into an item in another, not > next to it). Any source, projects, explanations would be gladly > accepted. From izidor.jerebic at tari.si Wed May 2 09:09:30 2001 From: izidor.jerebic at tari.si (Izidor Jerebic) Date: Thu Nov 3 14:46:11 2005 Subject: handling key equivalents, mnemonics, etc. in NSView? (additional info) Message-ID: <15565392089254@ikar.s5.net> Hi! I have discovered the exact circumstances for annoying "not working behaviour" (see below). When the view's window is its own first responder (at the beginning), the view receives the -perform.. messages. But as soon as the view becomes window's first responder, nothing happens any more.... Why could this be? izidor On Wednesday, May 2, 2001, at 05:01 PM, Izidor Jerebic wrote: > Hi! > > I am trying to use various dynamic key-equivalents or mnemonics in my > NSView subclass (dynamic means they are defined by user of this > application). > > I have three methods implemented in my NSView subclass (see below), and > none of the -perform... methods is called when I press CTRL-J or CMD-J or > any combination of 'J' with modifier keys ('J' is an example of > dynamically defined mnemonic). KeyDown method is called when I press > CTRL-J. When pressing CMD-J, nothing gets called at all. All I get is > system beep. > > What am I doing wrong? What is the correct way to implement functionality > like this? > > This really baffles me. I am porting an app from OpenStep 4.2 and almost > everything just works, but some trivial (to me :-) things don't work. I > guess I am spoiled :-) > > Thanks in advance, > > izidor > > > // > > - (void)keyDown:(NSEvent *)e > { > [self interpretKeyEvents:[NSArray arrayWithObject:e]] ; > } > > // > > - (BOOL)performMnemonic:(NSString *)aString > { > if( [graphicSystem performMnemonic:aString] ) return YES ; > else return [super performMnemonic:aString] ; > } > > // > > - (BOOL)performKeyEquivalent:(NSEvent *)theEvent > { > if( [graphicSystem performMnemonic:[theEvent > charactersIgnoringModifiers] > ] ) return YES ; > else return [super performKeyEquivalent:theEvent] ; > } > > From demarco at apple.com Wed May 2 09:51:14 2001 From: demarco at apple.com (Vince DeMarco) Date: Thu Nov 3 14:46:11 2005 Subject: capturing content of NSOpenGLView In-Reply-To: <200105010345.f413jodQ013681@texlog2.texas.rr.com> Message-ID: <200105021650.JAA11751@scv3.apple.com> On Monday, April 30, 2001, at 08:45 PM, Brian Nenninger wrote: > I have a Mac OS X app that needs to copy the contents of its windows as > bitmaps. I do this using -[NSImageView initWithFocusedViewRect:] and in > most cases it works fine. But if the source window has an NSOpenGLView > drawing its content, then that method doesn't work (it returns a solid > white bitmap). Apparently the NSOpenGLView is drawing in a way that > bypasses AppKit; anybody know of any way I can capture the image? > Grab.app can do it, but my understanding was that it uses undocumented > CoreGraphics functions. Thanks in advance for any advice, > > You can have OpenGL render directly into a bitmap instead of doing it to the screen (I don't remember the call though) vince From djw_lists at pacbell.net Wed May 2 09:55:35 2001 From: djw_lists at pacbell.net (Dan Wood) Date: Thu Nov 3 14:46:11 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: <14unlj-24qVo8C@fmrl02.sul.t-online.com> Message-ID: <0GCP00H64W5SLS@mta6.snfc21.pbi.net> A good idea; I just update my app in progress. BTW, I ran across a nice NSFileManager category in Scott's OpenUp source code to create a directory and all of its parent directories if needed. In order to put a file into ~/Library/Application Support/MyApp/, this nice little method creates the enclosing directories for you automatically.... On Tuesday, May 1, 2001, at 08:57 PM, Uli Zappe wrote: > Hi, > > I want to point out that according to Apple's new standards (as > described on page 163 of the current version of SystemOverview.pdf), > supplementary files for an application belong into > ~/Library/Application Support. This is a very reasonable rule. > > A few days ago, I realized that practically all major Cocoa > applications that are already available (from Omni, Stone, Caffeine and > RBrowser) put their supplementary files into a folder directly in > ~/Library. > > This a *very bad* thing, because as soon as you have a lot of apps, > ~/Library will become a hardly manageable mess, in which other > important folders will get lost among all these supplementary app > folders, whereas putting these supplementary app folders into > ~/Library/Application Support separates them from the rest and makes > things much clearer. > > I thought it would be especially important that the already existing > apps stick to Apple's guidelines, since they will be models for > upcoming Cocoa apps. > > Therefore, I sent an email to the above mentioned companies with regard > to this subject. While I still don't have an answer from the other > companies, Omni reacted immediately, and starting with yesterday's > release of OmniWeb rc1, will change the behavior of all their apps > accordingly. (Many thanks to Omni! Once again, you proved to be such a > great company! :-)) ) > > I just wanted to point this out to all developers here, so that > upcoming Cocoa apps get this right from the start. > > Thanks! > > Bye > Uli > ________________________________________________________ > > Uli Zappe uli@ritual.org > Lorscher Stra?e 5 http://www.ritual.org > D-60489 Frankfurt Fon: +49-700-ULIZAPPE > Germany Fax: +49-700-ZAPPEFAX > ________________________________________________________ > _______________________________________________ > 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/ http://www.bikealameda.org/ Mac OS X Developer: Online Resume: http://www.karelia.com/resume.html From ryand at softarch.com Wed May 2 09:59:09 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:11 2005 Subject: OpenGL & Custom-shape window... Message-ID: <200105021658.JAA06095@omnigroup.com> I want to use the OpenGL surface and a custom-shape window to provide the ability for an object to seem to exist on the screen outside of a window. Similar to the Neko cats concepts, I want to have a rendered character walking around the screen and appear to be 'outside' of a window. I though that I would have OpenGL render to an offscreen buffer, then obtain a mask from that buffer to provide the custom shaped window, then draw the character to the visible portion of the window. Does anyone have an example of this? -- Ryan From fredrikp at hem.passagen.se Wed May 2 10:11:41 2001 From: fredrikp at hem.passagen.se (Fredrik Pettersson) Date: Thu Nov 3 14:46:11 2005 Subject: NSURLHandle? Message-ID: Hello, I was going to make a little program to automate the login to my ADSL internet connection. I used NSURLHandle to download the login-page and it worked fine, but then I got stuck when I had to POST the "username" and "password" back to the server. I thought maybe I could use the writeData: or writeProperty:forKey: method but I don't no how it works. Can this be done simply or is it easier to login manually? /fredrik From tom_waters at mac.com Wed May 2 10:25:16 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:12 2005 Subject: stack traces? Message-ID: <200105021724.KAA08989@smtpout.mac.com> Is it possible to get a stack trace printed out from a running objective-c program? In Java one can do this hack: try { throw new Exception(); } catch (Exception e) { e.printStackTrace(); } I am debugging some code and would love to be able to print the call stack in an NSLog()... -tw From ryand at softarch.com Wed May 2 11:20:56 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:12 2005 Subject: Authentication...Something very wrong Message-ID: <200105021820.LAA11111@omnigroup.com> I must have done something very wrong. I have created a Cocoa object which wraps the authentication 'security.framework' in order to have a generic object capable of launching a task with authentication rights. In my testing, I don't think that I have been properly deallocating the authenticationRef or deauthenticating upon closure of application. Something very peculiar happened. I was just doing some testing on the app, when it stopped responding as usual (allowing me to authenticate and deauthenticate with password) and then the strangest thing happened. The whole screen went blank (blue), and it had flushed all the running applications and basically logged me back in fresh. Started up my login items and loaded the finder and dock. Everything seems stable, but it was like I was logged out and back in again. Any ideas what I did wrong? Does not deauthenticating have the access to do this? Was it just a basic crash? Was not destroying the authenticationRef responsible? Is it possible to over-authenticate? I am wondering what happened. Any ideas would be great... -- Ryan From george at elgato.com Wed May 2 11:27:34 2001 From: george at elgato.com (George Rath) Date: Thu Nov 3 14:46:12 2005 Subject: ioVRefNum to BSD In-Reply-To: <200105020247.TAA23197@scv3.apple.com> Message-ID: on 5/1/01 7:47 PM, Chris Sarcone at sarcone@apple.com wrote: > George -- > > This is off-topic for the Darwin list as far as I am concerned, but I > believe the best way is to use > > PBHGetVolParmsSync() with a GetVolParmsInfoBuffer. Look in the > volParmsInfo.vMDeviceID. Your app must be CFRunLoop-based (Carbon, > Classic, Cocoa, or explicitly use CFRunLoop) for this to work correctly > last time I looked. > > OSStatus theErr = noErr; > HParamBlockRec pb; > GetVolParmsInfoBuffer volParmsInfo; > char bsdStyleName[MAXPATHLEN]; > > bzero ( &pb, sizeof ( pb ) ); > bzero ( &volParmsInfo, sizeof ( volParmsInfo ) ); > > pb.ioParam.ioVRefNum = vRefNum; > pb.ioParam.ioBuffer = ( Ptr ) &volParmsInfo; > pb.ioParam.ioReqCount = sizeof ( volParmsInfo ); > > theErr = PBHGetVolParmsSync ( &pb ); > > if ( theErr == noErr ) > { > > strcpy ( bsdStyleName, ( char * ) volParmsInfo.vMDeviceID ); > > } > > -- Chris > _______________________________________________ > darwin-development mailing list > darwin-development@lists.apple.com > http://www.lists.apple.com/mailman/listinfo/darwin-development > Chris, Thanks a lot, it did work. George From mthomp at mac.com Wed May 2 12:09:43 2001 From: mthomp at mac.com (Michael Thompson) Date: Thu Nov 3 14:46:12 2005 Subject: Fwd: Returned mail: Host unknown (Name server: omnigrioup.com: host not found) Message-ID: <200105021908.MAA09785@smtpout.mac.com> > > > Hello, > > I finally have the dev tools installed on my 100% unsupported Mac > 8500. :-) I have a question about CoreAudio. I see a bunch of examples > doing the audio processing inside the IOProc callback. I wonder if > someone could post an example of sending a audio stream(buffer) to the > callback. What I want to do is handle all of the processing outside the > callback, maybe mix multiple streams of processors, then send one > stream to the callback. Is this a good thing to do? > > Thanks, > Michael From cmeyer at gatan.com Wed May 2 12:18:14 2001 From: cmeyer at gatan.com (Chris Meyer) Date: Thu Nov 3 14:46:12 2005 Subject: Opening old Mac files without filename extensions Message-ID: Does anyone know how to use the CFBundleTypeOSTypes key to allow opening of old files without filename extensions (but with type codes from OS 9) ??? I need some help getting my application to open files without filename extensions. I've added the 'CFBundleTypeOSTypes' key but my application doesn't recognize the files. For testing: if I add the extension to a particular file, it opens correctly. Here's an excerpt from my Info.plist: CFBundleDocumentTypes CFBundleTypeExtensions txt CFBundleTypeName Text files CFBundleTypeOSTypes TEXT CFBundleTypeRole Editor NSDocumentClass MyTextDocument From josha at cs.nwu.edu Wed May 2 12:27:08 2001 From: josha at cs.nwu.edu (josha@cs.nwu.edu) Date: Thu Nov 3 14:46:12 2005 Subject: Opengl & custom-state window Message-ID: <20010502192700.18932.qmail@cs.nwu.edu> This isn't the most elegant solution, but you could draw 2x, the second time into the stencil buffer, and then load the stencil buffer (which gives you your mask) as the custom window shape. hth, Josh -- josha@cs.nwu.edu http://www.areax.net "The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." -Bill Gates From tom_waters at mac.com Wed May 2 13:01:40 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:12 2005 Subject: view borders? Message-ID: <200105022000.NAA17016@smtpout.mac.com> Has anyone developed a view that paints a border without having to repaint the whole view inside? I am trying to highlight a table view when a drag enters it, and find the ~200ms delay unacceptable. This happens because I am repainting the entire tableview in order to draw the highlight ring around it. Of course, it wouldn't be so bad if my table drawing were faster, but it's a pretty complicated table. I was hoping to be able to convince the tableview to have a border that I could turn on and off to highlight things, and I was even considering invalidating four skinny rectangles around the edges to speed things up. I thought I'd check with the list (which seems down again) to see if I'm missing something. -tw From RL at alsoft.com Wed May 2 13:48:58 2001 From: RL at alsoft.com (Rusty Little) Date: Thu Nov 3 14:46:12 2005 Subject: PB Linker Error [Help PB Newbie] Message-ID: <1223285912-4429722@mail.alsoft.com> I'm new to Project Builder and I've got a linker error without much info and was hoping some seasoned PB users could help point me on what to look for, It's a little test program with a main.cpp and one class that main() instantiates and calls. I've been doing C++ almost exlusively for the past 9 years, but it's my first C++ in project builder. The Build produces one line: "Build failed (see build log for details)" The log just states "...failed StandaloneExecutable.LinkUsingFileList [/project path/]" I've tried a number of things without success. Help if you can. Thanks!!!!! Rusty From bierman at apple.com Wed May 2 14:27:02 2001 From: bierman at apple.com (Peter Bierman) Date: Thu Nov 3 14:46:12 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105021459.HAA14776@smtpout.mac.com> Message-ID: At 5:02 PM +0200 5/2/01, Raphael Sebbe wrote: >Using top, I can see that each time I use pthread_create(), I get one >more thread (normal) in top's thread count column. But it does not >decrease when the thread exits (by returning by itself). I am not doing This is correct, the thread manager is keeping the old thread around to recycle it if needed. -pmb From tvb at cacheon.com Wed May 2 14:29:59 2001 From: tvb at cacheon.com (Todd Blanchard) Date: Thu Nov 3 14:46:12 2005 Subject: WebObjects 4.5.1 Released In-Reply-To: Message-ID: <200105022128.OAA21885@cacheon.com> And I'd buy it just to get EOF to use in vertical apps - only I'm suspicious of the licensing agreements (or lack thereof). The biggest mistake was in letting the WO team own EO. EO is bigger than WO. I also see demand for web apps tapering off in the enterprise - apps are making a comeback. What demand there is is all for EJBs (totally non-functional architecture but it seems to sell well). I hope to never do a web app again. On Tuesday, May 1, 2001, at 02:37 PM, jeff_lamarche@peoplesoft.com wrote: > Good news - Objective-C is supported, and EO Framework is included. Bad > news: They made a rather ominous comment: > > This update will also convert WebObjects 4.5 Java applications to run on > WebObjects 5 for Java. It will also help you bring Objective-C > applications > forward to Java. > > So, it does look like the rumours of Objective-C going away in WO5 are > true. > > > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev --- Todd Blanchard Enterprise Systems Architect Cacheon, Inc. http://www.cacheon.com (415) 856-1144 From cjbehm at mail.com Wed May 2 14:32:48 2001 From: cjbehm at mail.com (Chris Behm) Date: Thu Nov 3 14:46:12 2005 Subject: PB Linker Error [Help PB Newbie] In-Reply-To: <1223285912-4429722@mail.alsoft.com> Message-ID: <200105022132.RAA10188@pellns.alleg.edu> On Wednesday, May 2, 2001, at 04:48 PM, Rusty Little wrote: > I'm new to Project Builder and I've got a linker error without much > info and was hoping some seasoned PB users could help point me on what > to look for, > > It's a little test program with a main.cpp and one class that main() > instantiates and calls. I've been doing C++ almost exlusively for the > past 9 years, but it's my first C++ in project builder. > > The Build produces one line: "Build failed (see build log for details)" > > The log just states "...failed StandaloneExecutable.LinkUsingFileList > [/project path/]" > > I've tried a number of things without success. Help if you can. > Thanks!!!!! Scroll further up in the build log, there will be one or more missing object file(s) or other such errors, thus the LinkUsingFileList fails 'cause the object file isn't there. Chris From bierman at apple.com Wed May 2 14:46:48 2001 From: bierman at apple.com (Peter Bierman) Date: Thu Nov 3 14:46:12 2005 Subject: ioVRefNum to BSD In-Reply-To: Message-ID: At 6:16 PM -0700 5/1/01, George Rath wrote: >In Carbon looping through volumes I can call FSGetVolumeInfo and obtain the >"ioVRefNum"-s of all mounted volumes. This works in "X" and "Classic". > >What is the best way to obtain the volume' BSD name (like disk5s1s2) knowing >the volume' ioVRefNum? /* Stat the path to any file on the volume to get the mountfrom point */ err = stat([sfPath fileSystemRepresentation], &st); if (err) { NSLog(@"Ignoring cached path \"%@\" because stat returned %d", sfPath, errno); return; } /* turn it into an NSString */ mntfrm = [NSString stringWithFormat:@"/dev/%@", [NSString stringWithUTF8String:devname(st.st_dev, S_IFBLK)]]; -pmb From RL at alsoft.com Wed May 2 14:55:13 2001 From: RL at alsoft.com (Rusty Little) Date: Thu Nov 3 14:46:12 2005 Subject: PB Linker Error [Help PB Newbie] In-Reply-To: <200105022132.RAA10188@pellns.alleg.edu> Message-ID: <1223281935-4668933@mail.alsoft.com> On Wednesday, May 2, 2001, at 04:29 PM, Chris Behm wrote: > > On Wednesday, May 2, 2001, at 04:48 PM, Rusty Little wrote: > >> I'm new to Project Builder and I've got a linker error without much >> info and was hoping some seasoned PB users could help point me on what >> to look for, >> >> It's a little test program with a main.cpp and one class that main() >> instantiates and calls. I've been doing C++ almost exlusively for the >> past 9 years, but it's my first C++ in project builder. >> >> The Build produces one line: "Build failed (see build log for details)" >> >> The log just states "...failed StandaloneExecutable.LinkUsingFileList >> [/project path/]" >> >> I've tried a number of things without success. Help if you can. >> Thanks!!!!! > > Scroll further up in the build log, there will be one or more missing > object file(s) or other such errors, thus the LinkUsingFileList fails > 'cause the object file isn't there. > > Chris > Thanks Chris. I had missed the preference for "more detail in the build log", so there wasn't anything to scroll to until I changed the preference and built again. (Sorry, but that is a ridiculous preference - "Yea PB, show me the category of the error, but please spare me the details. I don't want to really know why I can't compile or link.") Anyway, I was calling a private framework where "extern C { }" was missing from the prototypes and the names were being mangled by the compiler and then the linker was failing. PB apparently does some caching, because once I figured out was was going on the only way I could link was to "clean" the project and build from scratch. After that it worked perfectly. Rusty From ryand at softarch.com Wed May 2 15:00:13 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:12 2005 Subject: How to know a process has finished Message-ID: <200105022200.PAA25358@omnigroup.com> I am using the Security.framework to launch a tool with admin priveliges, however I am wondering how to determine a couple things. Does the "AuthorizationExecuteWithPrivileges" function return immediately or after the execution is completed? If it returns immediately then how does one know when it completes? Also, is there any control over it as far as interrupting it or force quitting it? -- Ryan From tom_waters at mac.com Wed May 2 16:05:41 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:12 2005 Subject: getting current clip Message-ID: <200105022304.QAA27156@smtpout.mac.com> I am trying to optimize my cell drawing by checking the clip rectangle in my drawRect method before calculating expensive layout. All I need is a way to get the bounding rectangle of the current clip... and I can't seem to find it anywhere. Help? From rosyna at unsanity.com Wed May 2 16:13:15 2001 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:46:12 2005 Subject: I can't remove my menu. In-Reply-To: <200105021441.HAA25444@omnigroup.com> References: <200105021441.HAA25444@omnigroup.com> Message-ID: I made a lame mistake and was releasing the menu, not the menu bar as I should have. Ack, at 5/2/01, Ryan Stevens said: >- (void)removeMenu >{ > [blahMenu release]; > [blahMenuItem release]; > blahMenu = nil; > blahMenuItem = nil; >} -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insane People From aozer at apple.com Wed May 2 16:16:38 2001 From: aozer at apple.com (Ali Ozer) Date: Thu Nov 3 14:46:12 2005 Subject: Opening old Mac files without filename extensions In-Reply-To: Message-ID: <200105022316.QAA21912@scv2.apple.com> Is this when double-clicking in Finder, or using the open panel? When double-clicking in Finder, some other considerations come into play, such as the creator code in the document. Currently this always takes precedence, as the creator code is assumed to indicate a strong-binding between the document and the given app. So, if you have a creator code in the documents, the new app will not be launched unless you give it the same app signature as the old version of the app. This creator-code strong binding can't be overridden in 10.0. However, note that dragging the document to the new app should work (that is, the app icon should highlight and open the document), and that is one workaround to this creator code issue. If you are wondering about the open panel within the app... If your app is NSDocument based, it should load the extension and Mac OS file type from the Info.plist, and use it automatically (thus allowing choosing of extensionless documents). If your app is not NSDocument based, you probably call -[NSOpenPanel runModalForTypes:...] or something similar. Here, in addition to the extensions, provide the Mac OS file types using the new "HFS file type" APIs discussed in the Foundation release notes. Ali On Wednesday, May 2, 2001, at 12:17 PM, Chris Meyer wrote: > Does anyone know how to use the CFBundleTypeOSTypes key to allow > opening of old files without filename extensions (but with type codes > from OS 9) ??? > > I need some help getting my application to open files without filename > extensions. I've added the 'CFBundleTypeOSTypes' key but my application > doesn't recognize the files. > > For testing: if I add the extension to a particular file, it opens > correctly. > > Here's an excerpt from my Info.plist: > > CFBundleDocumentTypes > > > CFBundleTypeExtensions > > txt > > CFBundleTypeName > Text files > CFBundleTypeOSTypes > > TEXT > > CFBundleTypeRole > Editor > NSDocumentClass > MyTextDocument > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From mwatson at apple.com Wed May 2 16:23:55 2001 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:46:12 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105021459.HAA14776@smtpout.mac.com> Message-ID: <200105022323.QAA25781@scv2.apple.com> There's an extra thread left around that gets recycled on subsequent pthread_create's. This is normal. matt. On Wednesday, May 2, 2001, at 08:02 AM, Raphael Sebbe wrote: > Using top, I can see that each time I use pthread_create(), I get one > more thread (normal) in top's thread count column. But it does not > decrease when the thread exits (by returning by itself). I am not doing > anything special in the thread func (just return NULL). I also tried > pthread_exit(NULL) instead of return NULL, with no effect. Am I missing > something here ? > On the other hand, I also use Carbon SoundManager, which creates a > thread itself, but that one is correctly released when destroying the > SoundChannel. > > Just in case this can help : the thread code (creation, thread func...) > resides in a framework, and is called from a standard Cocoa app (not > multithreaded). > > Thanks, > > Raphael > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From shaxxerd at home.com Wed May 2 16:59:34 2001 From: shaxxerd at home.com (David Shaffer) Date: Thu Nov 3 14:46:12 2005 Subject: AltiVec In-Reply-To: <200104220155.f3M1tQ013754@whitestar.jumpgate.com> Message-ID: <20010502235926.DBAW11650.femail5.sdc1.sfba.home.com@localhost> are there any scientific frameworks that have been AltiVec-ized? things like fft, ifft, etc? are there any options that can be given to ProjectBuilder to add AltiVec optimization to an app /framework? From piecewise at mac.com Wed May 2 17:15:02 2001 From: piecewise at mac.com (Chris Rain) Date: Thu Nov 3 14:46:12 2005 Subject: simple sheets solution In-Reply-To: Message-ID: <200105030014.RAA29743@gull.mail.pas.earthlink.net> Well, I think a window moving downward or upward is a little more "startling" than left or right a little. And for the most part, sheets don't cause to move left or right (not for me, anyway). But they would almost ALWAYS have to move down. To me, if the sheet were above the window, it would be a little more confusing as to which sheet were with which window. Maybe that's just me. Additionally, for me at least, it would be annoying if a window were under another window... so I click on the window's titlebar to move the main window out of the way -- but now there's this sheet obstructing my view even further. And typically we think of moving the window by the top of the window -- but the "top" (the titlebar") is no longer really the top. Sorry, some of my friends are on Apple's UI/Aqua team, so I'm a stickler. :-) Chris On Wednesday, May 2, 2001, at 07:48 PM, strobe anarkhos wrote: > That's why what? > > I don't think it would make it any less apparent which window it's > attached to, it's connected to the title bar. If the button technique > was used the user would explicitly move the sheet to the top so he > would know which window it was attached to. > > And so what if windows would have to move down? Windows have to move > left if they are too far right, so why is moving them down any > different? Anyway it would only happen if the button was pressed. > > At 6:48 PM -0400 5/2/01, Chris Rain wrote: >> a) it would make it less apparant that the sheet belonged to that >> window >> b) windows would always have to move down, since most windows are at >> the top of the screen >> >> That's why, I would think >> >> On Tuesday, May 1, 2001, at 05:54 PM, strobe anarkhos wrote: >> >>> sheets are modal and should always have a 'cancel' button so I don't >>> think this is a major issue, but if people find that it obscures >>> information they want to enter into a sheet then why not have the >>> sheet optionally show itself above the title bar instead of below it? >>> >>> It could even follow the cursor, although an arrow button would be >>> clearer. >>> _______________________________________________ >>> MacOSX-dev mailing list >>> MacOSX-dev@omnigroup.com >>> http://www.omnigroup.com/mailman/listinfo/macosx-dev > From ckane at apple.com Wed May 2 17:36:51 2001 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:46:12 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105021459.HAA14776@smtpout.mac.com> Message-ID: <200105030036.RAA07930@scv1.apple.com> On Wednesday, May 2, 2001, at 08:02 AM, Raphael Sebbe wrote: > Using top, I can see that each time I use pthread_create(), I get one > more thread (normal) in top's thread count column. But it does not > decrease when the thread exits (by returning by itself). I am not doing > anything special in the thread func (just return NULL). I also tried > pthread_exit(NULL) instead of return NULL, with no effect. Am I missing > something here ? That is just an artifact of the pthreads implementation, and nothing to be alarmed about. You should not get more than one "dead" thread, however, in 10.0 (things could be different in future releases). Chris Kane Cocoa Frameworks, Apple, Inc. From campbell at world.std.com Wed May 2 17:50:08 2001 From: campbell at world.std.com (Larry Campbell) Date: Thu Nov 3 14:46:12 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105021459.HAA14776@smtpout.mac.com> Message-ID: <200105030050.UAA21761@world.std.com> Are you doing a pthread_join? Perhaps that's required to completely destroy the thread. - lc On Wednesday, May 2, 2001, at 11:02 AM, Raphael Sebbe wrote: > Using top, I can see that each time I use pthread_create(), I get one > more thread (normal) in top's thread count column. But it does not > decrease when the thread exits (by returning by itself). I am not doing > anything special in the thread func (just return NULL). I also tried > pthread_exit(NULL) instead of return NULL, with no effect. Am I missing > something here ? > On the other hand, I also use Carbon SoundManager, which creates a > thread itself, but that one is correctly released when destroying the > SoundChannel. > > Just in case this can help : the thread code (creation, thread func...) > resides in a framework, and is called from a standard Cocoa app (not > multithreaded). > > Thanks, > > Raphael > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From gideon_king at email.com Wed May 2 17:58:20 2001 From: gideon_king at email.com (Gideon King) Date: Thu Nov 3 14:46:12 2005 Subject: OS X performance: iTunes too slow on a G4 450??? Message-ID: <383948962.988851496726.JavaMail.root@web575-ec> And the bad news is...it still happens in 1.0.2 (happened to me last night) :-( Gideon King > Actually, I'm not sure that you are seeing infinite loops. I'm curious > to know if anyone else is experiencing the same thing I am and this may > explain why you see the rainbow. > > You go to do something (say save a doc in Project Builder). Up comes > the cursor (wait, where'd that come from?). Then a few seconds > stretches on into more than a minute (sometimes many). Other > applications "refuse" to launch (though you can still quit > applications). Any of this sound familiar to anyone? > ----------------------------------------------- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com From mikevannorsdel at qwest.net Wed May 2 18:59:34 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:12 2005 Subject: waitUntilExit with Security Frmwrk? Message-ID: <200105030159.SAA07359@omnigroup.com> How do I wait for a task to complete when using the Security Framework and a task launched with AuthorizationExecuteWithPrivileges()? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 133 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010502/3e4bb20e/attachment.bin From hongping at visto.com Wed May 2 19:23:11 2001 From: hongping at visto.com (Hongping Lim) Date: Thu Nov 3 14:46:12 2005 Subject: memory leaks and undoManager Message-ID: <200105030223.TAA08280@omnigroup.com> Do I need to removeAllObjects before I release a NSArray? What other memory leaks should I take note of? I also have problems with the undoManager when I pass pointers to objects as arguments. The undo/redo doesnt work properly. How does the undoManager store arguments passed to it? ___________________________________________________________________________ Visit http://www.visto.com/info, your free web-based communications center. Visto.com. Life on the Dot. From tdpaust at chorus.net Wed May 2 19:31:00 2001 From: tdpaust at chorus.net (Timothy Paustian) Date: Thu Nov 3 14:46:12 2005 Subject: Playing with NSBitMapImageRep In-Reply-To: <20010502192700.18932.qmail@cs.nwu.edu> References: <20010502192700.18932.qmail@cs.nwu.edu> Message-ID: First thanks, I have found many of the discussions of playing with images to be very useful. I of course have ended up stuck on a problem and since I an pretty new at manipulating image data... The application that I am writing is a gel analysis program. It takes gray scale scans of gels (either polyacrylamide or agarose gels) and analyzes the data in several ways. The main functionality I am working on is to grab single pixels from the bitmap and read the value of a single channel. Here is the code that I am trying to use. What I end up getting is 256 for the value from each pixel. What am I doing wrong? Thanks a bunch if you have the patience to go through this. :-) //Routine: sumPlotRect //Take the incoming rect (that defines an area inside the rectangle //and sum all the pixels inside of it. //iFillImage is the image. -(unsigned int) sumPlotRect:(NSRect)aRect { //we should first check to make sure aRect is within the image rect //and clip it if its not. int xStart, xEnd, yStart, yEnd; int iHeight = iRect.size.height; int x, y; NSData* tiffData = [iFillImage TIFFRepresentation]; NSBitmapImageRep * bitmap = [[NSBitmapImageRep alloc] initWithData:tiffData]; unsigned char *bitmapPointer=[bitmap bitmapData]; unsigned int pixelsWide = [bitmap pixelsWide]; unsigned int bytesInRow = [bitmap bytesPerRow]; unsigned int sum = 0; int jumpLength; unsigned char *rowPointer; [self fromRect: &aRect getXStart: &xStart getXEnd: &xEnd getYStart: &yStart getYEnd: &yEnd]; //make sure we don't go beyond the edge of the gel. if(xEnd > pixelsWide) xEnd = pixelsWide; //This is how many bytes per pixel. We want to sum only one channel jumpLength = bytesInRow/pixelsWide; //note we are assuming a 24 bit gray scale image here. We should probably find this out. //and adjust the routine accordingly. for (y = yStart; y < yEnd ; y++) { rowPointer=bitmapPointer + y * bytesInRow; for (x = xStart; x < xEnd ; x++) { //sum over only one channel sum += (255 - *rowPointer); rowPointer+=jumpLength; } } return sum; } //Routine fromRect:getXStart:getXEnd:getYStart:getYEnd //given a rectangle, figure out the offsets into the bitmap data //Both the rectangle and the image are inside a view. We have to //normalize for the offset of the image into the view. //iRect is the bounds of the image, inRect is the rectangle inside //the image. -(void) fromRect:(NSRect*)inRect getXStart: (int*) xStart getXEnd: (int*) xEnd getYStart: (int*) yStart getYEnd: (int*) yEnd { *xStart = (inRect->origin.x) - iRect.origin.x; *xEnd = *xStart + inRect->size.width; *yEnd = inRect->origin.y + inRect->size.height - iRect.origin.y; *yStart = inRect->origin.y - iRect.origin.y; } -- Cheers, Tim Timothy Paustian UW-Madison, Bacteriology From Lists at tassiemade.com.au Wed May 2 19:43:03 2001 From: Lists at tassiemade.com.au (Karl Goiser) Date: Thu Nov 3 14:46:12 2005 Subject: Database Files' Locations? Message-ID: Hello, Where is the appropriate place for storing user-specific database files? Thanks in advance, Karl -- ---- Klaatu verada nikto From tdpaust at chorus.net Wed May 2 20:16:07 2001 From: tdpaust at chorus.net (Timothy Paustian) Date: Thu Nov 3 14:46:12 2005 Subject: Basic Cocoa Document Based Apps In-Reply-To: <200104262138.OAA21699@omnigroup.com> References: <200104262138.OAA21699@omnigroup.com> Message-ID: At 4:35 PM -0500 4/26/01, Jason Moore wrote: > can someone please explain how objects are created when you open an app. I will take a whack at it, but I am no expert.... When you launch you application it eventually gets sent an apple event to tell it to open a document. This eventually make its way down to your myDocument objects init method. At this point you should do any initialization that you need. In many cases this will involve creating the model object for your document and then returning self. The document controller is then made. If you have a windowController instance created in interface builder it is made at this time. If you have any initialization to do, you can override windowDidLoad to do it. If you do not instatiate in interface builder, you have to create your window controller in makeWindowController which is a routine you override in your document class. You create the controller and then call [self addWindowController:controller] to add it to your document. Again any other window and controller initialization can go here. The controller has connections to your window that you set up in interface builder. When a interface element is acted on, if connected to your controller it sends an action to your window controller and you can then carry out whatever method you need. I hope this helps. Please those with more knowlegde correct anything I may have said that is incorrect. -- Cheers, Tim Timothy Paustian UW-Madison, Bacteriology From oplusplus at mediaone.net Wed May 2 20:20:56 2001 From: oplusplus at mediaone.net (oplusplus@mediaone.net) Date: Thu Nov 3 14:46:12 2005 Subject: Thread Question... In-Reply-To: Message-ID: <200105030320.f433KR620580@chmls20.mediaone.net> I think should should be able to pass the selector as is. From the DO-Thread sample I have from the adc they are calling with: portArray = [NSArray arrayWithObjects:port2, port1, nil]; [NSThread detachNewThreadSelector:@selector(connectWithPorts:) toTarget:[TransferServer class] withObject:portArray]; Where they in connectWithPorts implement: (void)connectWithPorts:(NSArray *)portArray So I don't think you will have to recast, since the withObject is a derived type (everything is an NSObject ?). then again, I'm a super newbie so get a second opinion:) Excuse the newbie qualifier, I am always cautious with lawyers , heh. On Friday, April 27, 2001, at 03:52 PM, jeff_lamarche@peoplesoft.com wrote: > Using the method detachNewThreadSelector:toTarget:withObject:, you are > given one argument that will be provided to your method. I'd like to use > this argument to pass the selector for the method that should be called > when the thread is done and ready to exit. Can this passed argument be a > selector, or would there be problems casting from an id to a SEL in my > method? > > > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > A man, A Plan, A Canal, Panama From axel at objectpark.de Wed May 2 22:50:27 2001 From: axel at objectpark.de (Axel 'Mikesch' Katerbau) Date: Thu Nov 3 14:46:12 2005 Subject: Disabling NSToolbarItems In-Reply-To: <200105011634.JAA28758@omnigroup.com> Message-ID: <200105030550.HAA04822@post.webmailer.de> Hi Luc, > I just can't seem to be able to disable my toolbar Items, the > 'setEnabled:NO' message simply does nothing. I've tried to send it from > various places in the code, with no luck. My toolbar items are standard > ones, just an icon set with 'setImage'. > > What do I miss ? > > PS: I also tried the different validation methods on NSToolbarItem and > NSToolbar, still with no luck. AFAIK the ToolbarItems are validated like MenuItems. If the responder chain provides the selector bound as action then the item is enabled unless you provide a method for validation of menu items and decide the other way around. I haven't tried it yet, though. It's just a guess. Greetings, Axel From raphael_sebbe at mac.com Wed May 2 23:13:04 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:12 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105030036.RAA07930@scv1.apple.com> Message-ID: <200105030611.XAA15205@smtpout.mac.com> On Thursday, May 3, 2001, at 02:36 AM, Chris Kane wrote: > On Wednesday, May 2, 2001, at 08:02 AM, Raphael Sebbe wrote: >> Using top, I can see that each time I use pthread_create(), I get one >> more thread (normal) in top's thread count column. But it does not >> decrease when the thread exits (by returning by itself). I am not >> doing anything special in the thread func (just return NULL). I also >> tried pthread_exit(NULL) instead of return NULL, with no effect. Am I >> missing something here ? > > That is just an artifact of the pthreads implementation, and nothing to > be alarmed about. You should not get more than one "dead" thread, > however, in 10.0 (things could be different in future releases). > > > Chris Kane > Cocoa Frameworks, Apple, Inc. > The threads are used for some async processing, and I do need to create one quite often (although there is only one of those thread running at any given time). So if it were recycling the first, it wouldn't create a new one each time... If by "dead" threads you mean threads that have returned from their function, I get more than 1 dead thread, I get tens of them... Those are never reused. Looking at top when running this program tells that, at any given time, the thread count is i, instead of 1. ------------------------- #include #include #include #include void *threadFunc(void *data) { return NULL; } int main() { int i; pthread_t aThread; for(i=0; i<100; i++) { pthread_create(&aThread, NULL, &threadFunc, NULL); printf("thread created\n"); sleep(1); } } ------------------------- From mikevannorsdel at qwest.net Wed May 2 23:28:34 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:12 2005 Subject: waitUntilExit with Security Frmwrk? Message-ID: <200105030628.XAA17584@omnigroup.com> How do I wait for a task to complete when using the Security Framework and a task launched with AuthorizationExecuteWithPrivileges()? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 133 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010502/b24e5e49/attachment.bin From rcerny at dataline.cz Wed May 2 23:43:28 2001 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:46:12 2005 Subject: Memory management In-Reply-To: <200105010635.XAA12105@omnigroup.com> Message-ID: <200105030544.f435iYH15781@linux.dataline.cz> This issue was covered here for hundred times. Go to www.stepwise.com or read the archives, Robert On Tuesday, May 1, 2001, at 08:35 AM, Ben Lachman wrote: > Now that I've been doing small projects with cocoa for a while, one of > my projects it getting rather large (at least compared to the other > ones:-) and I'd like to understand a bit better the memory management > conventions of obj-c/cocoa. I've noticed that some code has > autorelease messages in it and some has release msgs and some has > nothing at all. When should each be used, what is the default behavior > and why? I'm coming from C++ and destructors so I'm a bit confused by > the way cocoa does it. > > Any help would be appreciated. > > ->Ben > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From F.Schippers at inter.NL.net Thu May 3 00:13:25 2001 From: F.Schippers at inter.NL.net (Frans H. Schippers) Date: Thu Nov 3 14:46:12 2005 Subject: Cobol on Mac OS X Message-ID: Hi Has anyone compiled cobol on MacOS X. If so, which compiler, and are there any remarks. Frans -- X|support bv mailto:xsupport@inter.nl.net Bezoek Adres: Mollerusweg 150 2031 BZ Haarlem tel: +31 23 5 317 519 fax: +31 23 5 424 282 mbl: +31 653 650 806 Post Adres: Grote Beer 189 1188 AZ Amstelveen Kvk : btw: NL-807284324B01 From stevenf at mail.panic.com Thu May 3 01:38:44 2001 From: stevenf at mail.panic.com (Steven Frank) Date: Thu Nov 3 14:46:12 2005 Subject: Announcing SmallSockets! Message-ID: Hi everyone, I love OmniNetworking, but sometimes it seems like killing a fly with an axe -- fun, but a little excessive. I went looking for a simpler replacement, but to my surprise, didn't turn up anything. As a learning experience, and possibly valuable thing for the community, I decided to start an open-source project called SmallSockets that is a very simple and lightweight Obj-C Cocoa wrapper for BSD sockets. It requires no other frameworks, support files, or anything other than what is installed by your Mac OS X Developer CD. The initial release (12k!) can be downloaded here: It is VERY skeletal at the moment, and missing some important things, but it's a start. With a little love, some water, and sunlight, I think it will grow to be a handy thing to have around. It comes with a sample app showing how to call it. I hope you will take a moment to review my code and pitch in with comments, suggestions, and more code. Hopefully someone out there isn't already working on this! If you are, I couldn't find you! I tried! That's all for now! Ooh, I should go add it to Softrak. I feel so official. Steven From nathand at senet.com.au Thu May 3 03:46:55 2001 From: nathand at senet.com.au (Nathan Day) Date: Thu Nov 3 14:46:12 2005 Subject: Getting text of current document with AppleScript In-Reply-To: <200105010934.LAA01155@www8.aname.net> Message-ID: <200105031046.f43Akhl17348@pluto.senet.com.au> Not really sure what you are after, you can only use AppleScritps with Applications that support AppleScripts, The application 'Tex-Edit plus' has good AppleScript support, haven't found a way to do the sort of thing you're after with Apples TextEdit. This is how you would do it with Tex-Edit plus on run tell application "Tex-Edit Plus" activate set theText to contents of front window end tell theText end run On Tuesday, May 1, 2001, at 07:03 PM, Nils Svangard wrote: > Hello, > I (urgently) need a simple script that should retrieve the text of the > current active document of whatever application is beeing used at that > time. It will only be activated while the user edits text, so I can be > sure that there is a active document and that it contains text. Is this > possible? And in that case, how can I do this? > > Thanks! > > -- From ssudre at intego.com Thu May 3 03:53:10 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:12 2005 Subject: capturing content of NSOpenGLView In-Reply-To: <200105021650.JAA11751@scv3.apple.com> Message-ID: <1223234992-24549515@transeo.com> On mercredi, mai 2, 2001, at 06:50 , Vince DeMarco wrote: > > On Monday, April 30, 2001, at 08:45 PM, Brian Nenninger wrote: > >> I have a Mac OS X app that needs to copy the contents of its windows >> as bitmaps. I do this using -[NSImageView initWithFocusedViewRect:] >> and in most cases it works fine. But if the source window has an >> NSOpenGLView drawing its content, then that method doesn't work (it >> returns a solid white bitmap). Apparently the NSOpenGLView is drawing >> in a way that bypasses AppKit; anybody know of any way I can capture >> the image? Grab.app can do it, but my understanding was that it uses >> undocumented CoreGraphics functions. Thanks in advance for any advice, >> >> > You can have OpenGL render directly into a bitmap instead of doing it > to the screen (I don't remember the call though) There is a call to do that without specifying a NSOpenGLPFAOffScreen attributes ? Where can we find it ? From nathand at senet.com.au Thu May 3 04:04:33 2001 From: nathand at senet.com.au (Nathan Day) Date: Thu Nov 3 14:46:12 2005 Subject: Memory management In-Reply-To: <200105010635.XAA12105@omnigroup.com> Message-ID: <200105031104.f43B4Ul23806@pluto.senet.com.au> See Objective-C in Help, the section on Object Ownership and Disposal. also Stepwise have a couple of useful articles http://www.stepwise.com/Articles/Technical/HoldMe.html http://www.stepwise.com/Articles/Technical/2001-03-11.01.html Basicly release means release now and autorelease means release sometime later on. On Tuesday, May 1, 2001, at 04:05 PM, Ben Lachman wrote: > Now that I've been doing small projects with cocoa for a while, one of > my projects it getting rather large (at least compared to the other > ones :-) and I'd like to understand a bit better the memory management > conventions of obj-c/cocoa. I've noticed that some code has > autorelease messages in it and some has release msgs and some has > nothing at all. When should each be used, what is the default behavior > and why? I'm coming from C++ and destructors so I'm a bit confused by > the way cocoa does it. > > Any help would be appreciated. From martin at no.netopia.com Thu May 3 04:06:07 2001 From: martin at no.netopia.com (Martin Bestmann) Date: Thu Nov 3 14:46:12 2005 Subject: How can I get the name of the computer ? In-Reply-To: <200104230940.CAA11102@omnigroup.com> References: <200104230940.CAA11102@omnigroup.com> Message-ID: At 2:40 Uhr -0700 23.04.2001, Kurt Revis wrote: >[[NSDictionary >dictionaryWithContentsOfFile:@"/var/db/SystemConfiguration/preferences.xml" >] valueForKeyPath:@"System.System.ComputerName"]; Is there also a non ObjC way (e.g. C/C++) of doing the above line in one single statement? Martin -- _________________________________________________________________________ Martin Bestmann Netopia Development GmbH Phone: +49-9134-9942-0 Weingasse 26 Fax: +49-9134-997911 91077 Neunkirchen am Brand e-mail:martin@no.netopia.com Germany From joar at mtvspider.com Thu May 3 04:23:01 2001 From: joar at mtvspider.com (j o a r) Date: Thu Nov 3 14:46:12 2005 Subject: Problems with NSTimer Message-ID: Hi, I check the network interfaces with netstat and NSTask, this is done periodically using an NSTimer. For inactive network interfaces I invalidate the NSTimer, which gives me a one time exception: ================================================================= May 3 12:43:39 NetStat[1794] *** NSTimer ignoring exception 'NSGenericException' (reason 'encodeDataAt:ofObjCType: unencodable type (v@:)') that raised during posting of timer with target 1085740 and selector 'invoke' ================================================================= ...but it still seems to do what I wanted, ie. that timer is stopped and the other one continue to run. My timer is set up like this: ================================================================= // The NSTimer NSTimer *interfaceTimer; // Variables for the NSInvocation SEL theSelector; NSMethodSignature *aSignature; NSInvocation *anInvocation; // Set up the NSTimer theSelector = @selector(updateStatus); aSignature = [DimmuInterface instanceMethodSignatureForSelector:theSelector]; anInvocation = [NSInvocation invocationWithMethodSignature:aSignature]; [anInvocation setSelector:theSelector]; [anInvocation setTarget:self]; // Start the timer interfaceTimer = [NSTimer scheduledTimerWithTimeInterval:secondsPerUpdate invocation:anInvocation repeats:YES]; ================================================================= What happens when you invalidate a timer? Is there anything special to take into consideration? Regards, j o a r From froy at austin.rr.com Thu May 3 06:04:14 2001 From: froy at austin.rr.com (Fabien Roy) Date: Thu Nov 3 14:46:12 2005 Subject: Compiling sc-6.21 for BSD on OS X Message-ID: <200105031304.f43D47dQ005568@texlog2.texas.rr.com> You need to compile and intall the gnu regular expression library (regex). ftp://ftp.keystealth.org/pub/gnu/regex/ > /usr/bin/ld: Undefined symbols: > _regcmp > _regex > From contact at nickshanks.com Thu May 3 06:21:45 2001 From: contact at nickshanks.com (Nicholas Shanks) Date: Thu Nov 3 14:46:12 2005 Subject: Possible bug in Cocoa? Message-ID: I'm new to cocoa, but implement the following code in my application deligate and it doesn't work right: - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { return YES; } - (void)applicationWillTerminate:(NSNotification *)notification { // this doesn't seem to be called when last window closed } When I choose Command-Q, my app-will-terminate routine gets called, when I click the close box of my only window, it does not. The application terminates properly. Also, could someone tell me the difference between a delegate and a controller? Nicholas Shanks -- Wife: "The kitchen bin's full already!" Husband: "Well just fork another garbage collection process." From lachman at boochee.com Thu May 3 07:46:20 2001 From: lachman at boochee.com (Ben Lachman) Date: Thu Nov 3 14:46:12 2005 Subject: Project Builder debugger screw up Message-ID: <200105031446.HAA03314@omnigroup.com> Well I was stepping through my project yesterday to try and find bug that was eluding me. I set a breakpoint close to where I knew it was happening and the started up the debugger. I ran the app until it hit the break point, and it dropped down to the debugger, no problem. Then I started trying to step through the method, nada, wouldn't do it, kept giving me a error: Error from Debugger: error in executing MI command: PBXGDB_MIStepIntoCommand; '-exec-step'; error msg; If clicked step again PB would crash, if I click continue it gave me: Error from Debugger: error in executing MI command: PBXGDB_MIContinueCommand; '-exec-continue'; error msg; If I then clicked pause/stop it gave me this: Error from Debugger: error in executing MI command but command is NIL!; error message: mi_cmd_exec_interupt: Inferior Any ideas whats up with PB? I tried stepping through another project and that seemed to work ok, so I created a new project and dumped all my files into it but that didn't help at all. At this point PB is pretty useless for any sort of debugging. Should I just reinstall the dev tools? Would that overwrite stuff from 10.0.2? Thanks, ->Ben From ddavidso at apple.com Thu May 3 08:47:04 2001 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:46:12 2005 Subject: Fixed height drawers In-Reply-To: <200105012108.OAA05711@smtpout.mac.com> Message-ID: <200105031546.IAA01608@scv2.apple.com> On Tuesday, May 1, 2001, at 02:06 PM, Edwin Zacharias wrote: > How do I make a drawer that has a fixed height, just like to tool > pallets of Create and OmniGraffle? Setting the height of the drawer > doesn't seem to work, and attempts at overriding windowShouldResize or > drawerShouldResize resulted in my drawer shaking every time I resize > the window. Here's the procedure I was using to get a fixed-height drawer: - don't try to set the drawer's minContentSize; - in the parent window's delegate, implement windowDidResize: and in that method set the drawer's trailing offset based on the parent window's frame size (take the height and subtract some fixed constant); - in the parent window's delegate, implement windowWillResize:toSize: to constrain the parent window's height so that there is sufficient room for the drawer. Douglas Davidson From cmeyer at gatan.com Thu May 3 09:07:42 2001 From: cmeyer at gatan.com (Chris Meyer) Date: Thu Nov 3 14:46:12 2005 Subject: Opening old Mac files without filename extensions In-Reply-To: <200105022316.QAA21912@scv2.apple.com> References: <200105022316.QAA21912@scv2.apple.com> Message-ID: I'm wondering about the open panel. And my application is NSDocument based. I've never gotten this to work. This problem is really easy to reproduce: 1 - Create a new Cocoa Document-based Application in PB 2 - Click on 'Targets' tab, then on the target, then select Application Settings 3 - Change the '????' to 'TEXT' for the 'Types' column in the Document Type. 4 - Build and Run. 5 - Try to open a TEXT file. This doesn't work on my system. As far as I can tell, this SHOULD work. (If this works on your system, please send me the project so I can try it here and see what I'm doing wrong!!!) At 4:16 PM -0700 5/2/01, Ali Ozer wrote: >Is this when double-clicking in Finder, or using the open panel? > >When double-clicking in Finder, some other considerations come into >play, such as the creator code in the document. Currently this >always takes precedence, as the creator code is assumed to indicate >a strong-binding between the document and the given app. So, if you >have a creator code in the documents, the new app will not be >launched unless you give it the same app signature as the old >version of the app. > >This creator-code strong binding can't be overridden in 10.0. >However, note that dragging the document to the new app should work >(that is, the app icon should highlight and open the document), and >that is one workaround to this creator code issue. > >If you are wondering about the open panel within the app... If your >app is NSDocument based, it should load the extension and Mac OS >file type from the Info.plist, and use it automatically (thus >allowing choosing of extensionless documents). If your app is not >NSDocument based, you probably call -[NSOpenPanel >runModalForTypes:...] or something similar. Here, in addition to the >extensions, provide the Mac OS file types using the new "HFS file >type" APIs discussed in the Foundation release notes. > >Ali > > > >On Wednesday, May 2, 2001, at 12:17 PM, Chris Meyer wrote: > >>Does anyone know how to use the CFBundleTypeOSTypes key to allow >>opening of old files without filename extensions (but with type >>codes from OS 9) ??? >> >>I need some help getting my application to open files without >>filename extensions. I've added the 'CFBundleTypeOSTypes' key but >>my application doesn't recognize the files. >> >>For testing: if I add the extension to a particular file, it opens correctly. >> >>Here's an excerpt from my Info.plist: >> >>CFBundleDocumentTypes >> >> >> CFBundleTypeExtensions >> >> txt >> >> CFBundleTypeName >> Text files >> CFBundleTypeOSTypes >> >> TEXT >> >> CFBundleTypeRole >> Editor >> NSDocumentClass >> MyTextDocument >> >> >>_______________________________________________ >>MacOSX-dev mailing list >>MacOSX-dev@omnigroup.com >>http://www.omnigroup.com/mailman/listinfo/macosx-dev From ryand at softarch.com Thu May 3 09:31:05 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:12 2005 Subject: Enabling & Disabling Views Message-ID: <200105031631.JAA06927@omnigroup.com> I have a NSBox that I have embedded controls within. How can I 'disable' the whole view so that all the controls in that view are disabled? I couldn't find any methods for this in the docs. -- Ryan From ken at psy.herts.ac.uk Thu May 3 09:34:45 2001 From: ken at psy.herts.ac.uk (Ken Tabb) Date: Thu Nov 3 14:46:12 2005 Subject: Distributed Object docs/tutes/code? Message-ID: <1010503173431.15b62074.93c598f6.ASIP6.2.1.240732@io.psy.herts.ac.uk> Hi, does anyone know of any Distributed Objects docs (even just a "getting started in DO")? I've looked in the dev docs ('forthcoming'), StepWise, CocoDevCentral and in the AppKit and FoundationKit docs, and can't find anything which looks obvious, besides NSSocketPort and NSPortNameServer etc. (which seem to be saying "DO uses these but you should rarely need to touch them yourself"). Thanks in advance for any feeders, the boy Ken --------- Ken Tabb. Mac & UNIX C/C++/Java developer (Health & Human Sciences), Machine Vision researcher/programmer (Computer Science), University of Hertfordshire, Herts AL10 9AB, England Tel: (+0044 / 0) 1707 286171 e-mail: ken@psy.herts.ac.uk http://www.health.herts.ac.uk/ken/ Created in a Microsoft-free environment From wprice at cyphers.net Thu May 3 09:38:42 2001 From: wprice at cyphers.net (Will Price) Date: Thu Nov 3 14:46:12 2005 Subject: Standard icon+text in NSTableCell Message-ID: <200105031638.JAA07177@omnigroup.com> I've looked through list archives and through Fire.app source code, but so far there doesn't seem to be a cell type which supports an icon followed by text in the same cell (ie the way the Finder displays list views). Fire actually draws its own cell to do this, which provides them with a litany of UI violations. I'm sure those violations (such as always using Yellow for the highlight color) can be overcome, but this seems like a slippery slope. All I want is a standard cell type like those used in thousands of applications on other platforms which shows an icon followed by text. NSBrowserCell does not appear to be what I want. It puts some strange looking arrow in the right side of the cell, and doesn't seem to support images. Surely I am overlooking something? - Will From ryand at softarch.com Thu May 3 09:52:28 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:12 2005 Subject: Lock & Unlock Icons Message-ID: <200105031652.JAA07615@omnigroup.com> I am wondering if there is a way to get a "standard" lock/unlock icon, like the ones used in the preferences window for authorization. Does anyone know if there is a shared collection of icons and other resources, like back in OS 9 and the system?? -- Ryan From phillipm at truespectra.com Thu May 3 10:02:58 2001 From: phillipm at truespectra.com (Phillip Mills) Date: Thu Nov 3 14:46:12 2005 Subject: IB: Scrolling, etc. In-Reply-To: <1223324276-19177065@transeo.com> Message-ID: I'd like to challenge the notion that there are no stupid questions; this sure feels like one.... The documentation for NSScrollView says to create one via Interface Builder, but I'm having no luck figuring out how. I've tried cycling through all the palette tabs, dropping controls into my window at random to see if any of them magically become what need. Lot's of sliders; no scroll views. Looking through the list I also do not see palette elements for NSClipView, NSSplitView, NSRulerView, NSScroller.... How do access these items? If that wasn't enough, there's a couple of other things that I don't get. There's a menu to add a new palette, which seems to just add a new, empty palette. What's the point? If I add a CustomView to a window the inspector shows me a bunch of classes as Attributes of the view (as well as in the Custom Class section). What's that trying to imply? From avi_drissman at baseview.com Thu May 3 10:53:50 2001 From: avi_drissman at baseview.com (Avi Drissman) Date: Thu Nov 3 14:46:12 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: <14unlj-24qVo8C@fmrl02.sul.t-online.com> References: <14unlj-24qVo8C@fmrl02.sul.t-online.com> Message-ID: At 5:57 AM +0200 5/2/01, Uli Zappe wrote: >Therefore, I sent an email to the above mentioned companies with >regard to this subject. Very cool. Thanks. Of course, there's some Apple software that doesn't follow the rules either. Terminal, for example, looks in ~/Library/Terminal/ to populate its File:Library menu. Do you want to file the bug report, or should I? :-) Avi -- Avi Drissman avi_drissman@baseview.com Bit bashing since 1977 From tom_waters at mac.com Thu May 3 10:54:25 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:12 2005 Subject: drag and drop vs. close Message-ID: <200105031753.KAA24075@smtpout.mac.com> I think I've come across a bug in cocoa. If you ever close your window in response to a NSDraggingDestination message, your program will SIGBUS. the stack trace is objc_msgSend NSCoreDragTrackingProc DoTrackingMessage MessageHandler .... It seems as if NSCoreDragTrackingProc is attempting to send another message to my window, which has now been released... but it seems like it is fair for me to be able to close my window, especially given that I unregistered all dragged types. Can someone from Apple take a look at NSCoreDragTrackingProc and tell me if this is a bug, or if there is a known workaround? // NSWindow subclass. @implementation DragBug - (void)awakeFromNib { [self registerForDraggedTypes: [NSArray arrayWithObject: NSFilenamesPboardType]]; } - (NSDragOperation)draggingEntered:(id )sender; { NSLog(@"entered"); return NSDragOperationEvery; } - (void)draggingExited:(id )sender; { NSLog(@"exited"); [self unregisterDraggedTypes]; [self close]; } @end From chaoswerks at earthlink.net Thu May 3 11:05:15 2001 From: chaoswerks at earthlink.net (David P Henderson) Date: Thu Nov 3 14:46:12 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: <200105031805.LAA18834@swan.mail.pas.earthlink.net> On Wednesday, May 2, 2001, at 06:59 , Rosyna wrote: > I don't think it has anything to do with carbon. i use a lot of carbon > apps, they all crash sometime or another, but NONE take the comp with > it other than IE. And project builder, a cocoa app, has taken the > window manager a few times. > Ah, but parts of Cocoa are now built on top of carbon for instance Cocoa menus go through Carbon's Menu manager. Carbon is independent of Cocoa but Cocoa is not independent of Carbon. So the behavior could certainly be caused by Carbon especially given its relative immaturity. Dave -- Chaos Assembly Werks "Imagination is more important than knowledge." - Albert Einstein From mikevannorsdel at qwest.net Thu May 3 11:48:47 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:12 2005 Subject: waitUntilExit with Security Frmwrk? Message-ID: <200105031848.LAA12068@omnigroup.com> How do I wait for a task to complete when using the Security Framework and a task launched with AuthorizationExecuteWithPrivileges()? From glessard at mail.tffenterprises.com Thu May 3 13:40:31 2001 From: glessard at mail.tffenterprises.com (Guillaume Lessard) Date: Thu Nov 3 14:46:12 2005 Subject: Java3d on OSX In-Reply-To: References: <0GCM00JRM74R2O@mta7.pltn13.pbi.net> Message-ID: <84738027.988897223@shake.caltech.edu> --On May 1, 2001 2:51 PM -0700 strobe anarkhos wrote: > Why not use GL4Java which works on more platforms, and is usually faster > to boot. _______________________________________________ Not everyone wants to program their 3D at the low-level that OpenGL requires/enforces. For some applications, high-level is a lot more effective. -- Guillaume Lessard glessard@caltech.edu Graduate Student Caltech Applied Physics/Electrical Engineering From uli at ritual.org Thu May 3 14:04:32 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:12 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: Message-ID: <14vQH3-06jQEyC@fmrl04.sul.t-online.com> Am Donnerstag, 3. Mai 2001 um 19:53 schrieb Avi Drissman: > Of course, there's some Apple software that doesn't follow the > rules either. Well, being the system vendor, Apple is a story of its own... For one, there's folders such as ~/Library/Mail or ~/Library/Addresses that have a certain ambiguity to them. You could argue these are just supplementary files for Mail.app and Addresses.app, but OTOH they are important data in their own right, of system-wide interest and possibly generic for other apps, so I think this is justified. I mean, in a way *all* Library data support apps, so all would belong into Application Support, making the subdivision totally meaningless. I think a reasonable rule would be that files that belong clearly to one specific app, are in the app's proprietary format and of no system-wide interest, belong into Application Support. And then, of course, it seems that Apple is quite a big company with not necessarily only one opinion. ;-) E.g. so far, iTunes has been a really horrible OS X citizen. Its first version even required a Plug-ins folder in the *same* folder as the app itself, i.e. /Applications (or a subfolder therein). This has been cured in the first update (the plug-ins are now in the app wrapper, where they belong), but iTunes now creates an iTunes folder in ~/Library (for third-party plug-ins, I guess). Since plug-ins contain data really specific to iTunes, they should clearly go into Application Support. The really bad thing, however, is that iTunes insists on creating an iTunes folder in ~/Documents! This is the folder that's supposed to contain the documents that *I*, the user, have willingly created and saved there, according to my own hierarchy rules (e.g. if at all stored inside ~/Documents, I would want iTunes files to go into ~/Documents/Arts/Music), and *no* app should ever interfere there (in fact, being a German, my folder is called "Dokumente", and this stupid iTunes app recreates a "Documents" folder beside it). Aargh! > Terminal, for example, looks in ~/Library/Terminal/ to populate > its File:Library menu. Mostly true. Terminal asks you where you want to save your *.term files, and you can set any path in the preferences for the startup .term file, but the others have to be in ~/Library/Terminal to appear in the Library menu, as you point out. Historically, I think this is simply a heritage from the NeXT days. And you can probably make the case that Terminal is the system-wide command line interface of Mac OS X, therefore of generic interest, too. At least, Terminal is clearly less specific an application than iTunes. But I agree, Apple shouldn't consider all its apps special only because they stem from them. So far there's no German version of Apple Works, so I don't know how it behaves, but this would be another app where supplementary files should clearly go into ~/Library/Application Support, if Apple wants to stick to its own rules. > Do you want to file the bug report, or should I? :-) I don't think two bug reports can hurt ;-) Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From cmeyer at gatan.com Thu May 3 14:37:44 2001 From: cmeyer at gatan.com (Chris Meyer) Date: Thu Nov 3 14:46:12 2005 Subject: Playing with NSBitMapImageRep Message-ID: Hi Tim, This doesn't really explain why you're having your error, but: You're setting jump length to bytesInRow/pixelsWide; this is an invalid way to calculate this value; instead just hard code it to 4 bytes if you're assuming you're getting and RGB image. Of course you probably want to force it to be RGB or check that it is if you want robust code (and why wouldn't you?). One technique I use when debugging my image stuff is to print out the first few bytes during my processing operations to make sure I'm not overflowing or something like that (which it sounds like might be happening in your code). Chris P.S. We make an image processing application on the Mac/PC which can be used to analyze gel samples. There's a free demo download. Check at www.gatan.com and find the demo download or send me some e-mail... From uli at ritual.org Thu May 3 14:45:01 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:12 2005 Subject: Authentication...Something very wrong In-Reply-To: <200105021820.LAA11111@omnigroup.com> Message-ID: <14vQts-1NNgW0C@fmrl04.sul.t-online.com> Am Mittwoch, 2. Mai 2001 um 20:20 schrieb Ryan Dary: > I must have done something very wrong. I have created a Cocoa > object which wraps the authentication 'security.framework' in > order to have a generic object capable of launching a task with > authentication rights. > > In my testing, I don't think that I have been properly > deallocating the authenticationRef or deauthenticating upon > closure of application. > > Something very peculiar happened. I was just doing some testing > on the app, when it stopped responding as usual (allowing me to > authenticate and deauthenticate with password) and then the > strangest thing happened. The whole screen went blank (blue), and > it had flushed all the running applications and basically logged > me back in fresh. Started up my login items and loaded the finder > and dock. Everything seems stable, but it was like I was logged > out and back in again. > > Any ideas what I did wrong? Does not deauthenticating have the > access to do this? Was it just a basic crash? Was not destroying > the authenticationRef responsible? Is it possible to > over-authenticate? > > I am wondering what happened. This behavior is typically a crash of the Window Server. The system beneath the GUI stays stable, but a (graphical) login evaporates. No idea why it happened (I didn't have time to deal with the Security Framework, yet). Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From mikevannorsdel at qwest.net Thu May 3 15:47:00 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:12 2005 Subject: Posting problems Message-ID: <200105032246.PAA21680@omnigroup.com> I've been having posting problems and am curious if anyone else is affected. Sometimes I'll send a post to the list and it never seems to get posted. And sometimes I'll get multiple copies of posts from the past couple of days. Sometimes I send a post and it won't show up on the list for a few days. I can actually see my post on the archive but it's not for a few days later until it gets mailed out, at least to me. Anyone else having these problems or is it just me? Thanks. From mikevannorsdel at qwest.net Thu May 3 15:48:36 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:12 2005 Subject: waitUntilExit with Security Frmwrk? Message-ID: <200105032248.PAA21706@omnigroup.com> How do I wait for a task to complete when using the Security Framework and a task launched with AuthorizationExecuteWithPrivileges()? From cjbehm at mail.com Thu May 3 16:38:09 2001 From: cjbehm at mail.com (Chris Behm) Date: Thu Nov 3 14:46:12 2005 Subject: mailing list woes Message-ID: <200105032337.TAA04773@pellns.alleg.edu> I've got to ask, is anyone else receiving the same message multiple times but days (sometimes a whole lotta days) apart? Chris From Lists at tassiemade.com.au Thu May 3 17:02:15 2001 From: Lists at tassiemade.com.au (Karl Goiser) Date: Thu Nov 3 14:46:12 2005 Subject: NSSystemDirectories.h Message-ID: Hello, In the System Overview, http://www.devworld.apple.com/techpubs/macosx/SystemOverview/SystemOverview/FileSystem/How_the_Fil_s_Organized.html reference is made to the header file, 'NSSystemDirectories.h' but I don't seem to be able to find it. Has it been removed? If so, how do you get to search through file-system domains? Thanks in advance, Karl -- ---- Klaatu verada nikto -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/20010503/ddd9dc0e/attachment.html From dstaudi at san.rr.com Thu May 3 22:08:19 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:12 2005 Subject: About notifications in general Message-ID: <200105040412.f444CUV21700@smtp3.san.rr.com> I want to make a two threads, one that interacts with the user, and the other does the real underlying work, so the user is not plagued with the so called "rainbow cursor of death". The User Interface thread must have a cancel button, but I do not know how to make it send a message to the second thread while it is still doing its long and tedious work. I want the second thread to exit as soon as the button is pressed. I do not know how to have one thread interrupt the flow of execution in another, but this is effectively what I need to do. I came up with another idea however, that the workhorse thread "checks back" with the UI thread every now and then to check if the cancel button had been pressed. Summary for those (like me) who could not make heads or tails of that sentence: I want to know how to break the execution line in the middle of when a method is working, from a remote thread, by sending a notification or a message. Hope to hear soon... Daniel Staudigel From ssudre at intego.com Fri May 4 03:07:58 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:12 2005 Subject: Posting Problems Message-ID: <1223151296-29585601@transeo.com> It seems from what I'm seeing that the list is down since 2 days. From z1419539 at cit.gu.edu.au Fri May 4 03:31:48 2001 From: z1419539 at cit.gu.edu.au (Adrian Sutton) Date: Thu Nov 3 14:46:12 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: <200105041032.f44AWfD25131@mailhost.gu.edu.au> Firstly, excellent description of the benfits of preemptive memory management. Having just completed Operating Systems 101 it's nice to be able to understand all of it too. :) >> On OS X, this definitely isn't the case. All apps have the same >> priority by default. This is sort of the opposite of preemptive. > > This is a flaw in the kernel; one which has already been rectified. I didn't think that this had been implemented in Darwin yet. I haven't payed much attention to darwin-dev of late though. Are you certain this has been implemented? I would be quite interested in this capability and there are already some UNIX based tools to utilize it available (nice which comes with OSX GM). > Greg Adrian Sutton ************************************************************** Email: z1419539@cit.gu.edu.au Ph: 3714 4635 Don't go around saying the world owes you a living. The world owe's you nothing - it was here first. -- Mark Twain. ************************************************************** From anarkhos at mac.com Fri May 4 03:34:57 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:12 2005 Subject: simple sheets solution In-Reply-To: <200105030014.RAA29743@gull.mail.pas.earthlink.net> References: <200105030014.RAA29743@gull.mail.pas.earthlink.net> Message-ID: (hate it when people reply at the top) Nobody is forcing anybody to press the button to reveal the contents underneath, and since it would be explicit there would be no confusion. I would expect the button to be in the title bar so it doesn't move when you click it, and it's state would make it even more clear. Another solution is to make the sheet progressively more transparent the farther you move the cursor from it, or using an optional slider (perhaps one which doesn't have to be clicked). Having a sheet be less opaque when it's host window is inactive would be a good idea regardless. I still don't think it's a big issue compared to the zillions of UI problems OS X has. OS X has three sets of color pickers, three ways of selecting text, four pairs of open/save dialog boxes each with a different way to navigate, three different menu layouts, four different appearances, four different title bar drawing routines, three different menu bar drawing routines, three different sets of menu item states, the list goes on and on. In the Apple HI list there have been discussions on all sorts of Cocoa/Carbon inconsistencies like the useful command-click-through behavior Cocoa apps have but Carbon apps curiously do not, not to mention the Aqua HI Guidelines which don't cover enough ground (and seemingly avoid all areas where Carbon and Cocoa are at odds). Anyway don't bore your 'friends' with this issue if you have an opportunity to bring up Cocoa's horrible windows-like text selection behavior |-\ At 8:14 PM -0400 5/2/01, Chris Rain wrote: >Well, >I think a window moving downward or upward is a little more "startling" >than left or right a little. And for the most part, sheets don't cause >to move left or right (not for me, anyway). But they would almost >ALWAYS have to move down. > >To me, if the sheet were above the window, it would be a little >more confusing as to which sheet were with which window. >Maybe that's just me. > >Additionally, for me at least, it would be annoying if a window were under >another window... so I click on the window's titlebar to move the main >window out of the way -- but now there's this sheet obstructing my >view even further. And typically we think of moving the window by >the top of the window -- but the "top" (the titlebar") is no longer >really the top. > >Sorry, some of my friends are on Apple's UI/Aqua team, so I'm >a stickler. :-) > >Chris > >On Wednesday, May 2, 2001, at 07:48 PM, strobe anarkhos wrote: > >>That's why what? >> >>I don't think it would make it any less apparent which window it's >>attached to, it's connected to the title bar. If the button >>technique was used the user would explicitly move the sheet to the >>top so he would know which window it was attached to. >> >>And so what if windows would have to move down? Windows have to >>move left if they are too far right, so why is moving them down any >>different? Anyway it would only happen if the button was pressed. >> >>At 6:48 PM -0400 5/2/01, Chris Rain wrote: >>>a) it would make it less apparant that the sheet belonged to that window >>>b) windows would always have to move down, since most windows are >>>at the top of the screen >>> >>>That's why, I would think >>> >>>On Tuesday, May 1, 2001, at 05:54 PM, strobe anarkhos wrote: >>> >>>>sheets are modal and should always have a 'cancel' button so I >>>>don't think this is a major issue, but if people find that it >>>>obscures information they want to enter into a sheet then why not >>>>have the sheet optionally show itself above the title bar instead >>>>of below it? >>>> >>>>It could even follow the cursor, although an arrow button would be clearer. >>>>_______________________________________________ >>>>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/20010504/c430b479/attachment.html From john at toastedmarshmallow.com Fri May 4 03:49:04 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:12 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: <20010504104434.EFCB811C028@fimail01.cabinet.net> On Monday, April 30, 2001, at 07:05 PM, Gregory Block wrote: > On Sunday, April 29, 2001, at 04:36 , Rosyna wrote: >>> And I think on total, the drawbacks of cooperative outweight its >>> advantages (unless you live in a perfect world, where every programer >>> makes no mistakes, and hence writes perfect apps that never crash. >>> hahhahaha) >> That is protected memory, not multitasking. > > While it's true that the use of MMU functionality to provide protected > memory is not necessarily linked to a preemptive scheduler, show me an > implementation. :) Of a preemptitive scheduler without protected or virtual memory? The Amiga OS, of course. Very predictable, round-robin time slicing algorithm with fixed priorities. Coupled with a message driven user interface it was extremely responsive, even on slow machines. IIRC, "Intuition" ran at a high priority and doled out messages (very cheap to implement when there is no memory protection) to the tasks. This meant that even under heavy load, user action would be handled immediately. The simple scheduler and minimal process states also meant that slices could be kept short, further decreasing latency. The obvious downsides where that you pretty much had to manually manage priorities for big jobs, and the crashes that plague all systems without resource protection. > In short, and IMO: Preemptive multitasking is a better solution to 99% > of any everyday user's real-world usage problems, whether that be your > grandmother, your professional programmer, your stock trader, or your > daughter. The problem is that 90% of that 90% isn't visible to the > end-user unless he/she looks more carefully. Note though, that the lack of priority management functionality in Mac OS X is a huge handicap. Having a lower priority on non-interactive tasks can make a huge difference in responsiveness. The scheduler tries to manage that automatically, but it seems like it could need some help. Regards, John Hornkvist From jba at bullex.de Fri May 4 05:12:43 2001 From: jba at bullex.de (Jens Baumeister) Date: Thu Nov 3 14:46:12 2005 Subject: Database Files' Locations? Message-ID: > -----Original Message----- > From: Karl Goiser [mailto:Lists@tassiemade.com.au] > Where is the appropriate place for storing user-specific > database files? Apple suggests ~/Library/Application Support// _____________________________________ Jens Baumeister Bullex GmbH, Cologne, Germany She sells c-shells by the sea shore. From stefan.arentz at soze.com Fri May 4 06:08:03 2001 From: stefan.arentz at soze.com (Stefan Arentz) Date: Thu Nov 3 14:46:12 2005 Subject: Selecting a NSTableView's column *header* Message-ID: <20010504150627.A24984@keyser.soze.com> Does anyone know the correct method of selecting just the header cell of a table? I don't want to use the selectColumn:byExtendingSelection: method as that will also select all the cells in that column. I just want to change the color of the header cell as is done in Mail.app. Stefan From epeyton at epicware.com Fri May 4 06:21:11 2001 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:46:12 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: Message-ID: <20010504131952.4E8C07611@smtp-1.enteract.com> On Thursday, May 3, 2001, at 12:53 PM, Avi Drissman wrote: > Of course, there's some Apple software that doesn't follow the > rules either. Terminal, for example, looks in ~/Library/Terminal/ > to populate its File:Library menu. > > Do you want to file the bug report, or should I? :-) It has been filed. Eric From raphael_sebbe at mac.com Fri May 4 06:21:43 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:12 2005 Subject: IB: Scrolling, etc. In-Reply-To: Message-ID: <200105041314.GAA08665@smtpout.mac.com> On Thursday, May 3, 2001, at 07:04 PM, Phillip Mills wrote: > I'd like to challenge the notion that there are no stupid questions; > this > sure feels like one.... > > The documentation for NSScrollView says to create one via Interface > Builder, > but I'm having no luck figuring out how. I've tried cycling through > all the > palette tabs, dropping controls into my window at random to see if any > of > them magically become what need. Lot's of sliders; no scroll views. > > Looking through the list I also do not see palette elements for > NSClipView, > NSSplitView, NSRulerView, NSScroller.... How do access these items? > > Layout->Group In->ScrollView From stephan at arboretum.com Fri May 4 06:27:23 2001 From: stephan at arboretum.com (Stephan Pirson) Date: Thu Nov 3 14:46:12 2005 Subject: IB: Scrolling, etc. In-Reply-To: Message-ID: Select an object (an NSView for instance) select Layout->Group In->Scroll View On Thursday, May 3, 2001, at 07:04 PM, Phillip Mills wrote: > I'd like to challenge the notion that there are no stupid questions; > this > sure feels like one.... > > The documentation for NSScrollView says to create one via Interface > Builder, > but I'm having no luck figuring out how. I've tried cycling through > all the > palette tabs, dropping controls into my window at random to see if any > of > them magically become what need. Lot's of sliders; no scroll views. > > Looking through the list I also do not see palette elements for > NSClipView, > NSSplitView, NSRulerView, NSScroller.... How do access these items? > > > If that wasn't enough, there's a couple of other things that I don't > get. > > There's a menu to add a new palette, which seems to just add a new, > empty > palette. What's the point? Add things in it to make it a useful palette? > If I add a CustomView to a window the inspector shows me a bunch of > classes > as Attributes of the view (as well as in the Custom Class section). > What's > that trying to imply? That there are no defined properties for the custom view but its size, and that the only thing it can do is hold other things, unless you create a subclass of NSView. In which case, you can use the inspector to tell IB what subclass of NSView you'd like your customView to be (picking one in the list). In this case, the Custom Class section is identical to the Attributes section. A blank page for Attributes would be better fit IMHO, but I wasn't the one who created IB ;-) Stephan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1767 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/f35e934a/attachment.bin From stephan at arboretum.com Fri May 4 06:30:46 2001 From: stephan at arboretum.com (stephan@arboretum.com) Date: Thu Nov 3 14:46:12 2005 Subject: lost in Scroller, ScrollView, ... Message-ID: Hello, I'd like to change the standard scroller in a scrollview to insert a button between the scroller and the bottom right corner. What's the easiest way to do this? manually change the scroller's frame? subclass NSScroller and add a part? Anyone did this already, I'm a bit lost there... From raphael_sebbe at mac.com Fri May 4 06:36:42 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:12 2005 Subject: About notifications in general In-Reply-To: <200105040412.f444CUV21700@smtp3.san.rr.com> Message-ID: <200105041330.GAA10677@smtpout.mac.com> It is generally not a good idea to terminate a thread from the outside, because it often needs to clean up itself (free memory, release objects...). One solution could be to have a boolean flag made available to both thread. When the user hits cancel, you set it to YES from your main thread, checking regularly the flag from the "work" thread. You should also use some synchronization means to avoid race conditions (perhaps not absolutely necessary in this case - only one writer - , but it is nicer anyway). NSLock can do that. typically from the main thread : [flagLock lock]; flag = YES; [flag unlock]; from the "work" thread, regularly call this : [flagLock lock]; if(flag) shouldTerminate = YES; [flag unlock]; clean up and exit if shouldTerminate == YES. flag and flagLock should be available to both thread (through globals, or, better, a shared object) Raphael On Friday, May 4, 2001, at 06:11 AM, Daniel Staudigel wrote: > I want to make a two threads, one that interacts with the user, and the > other does the real underlying work, so the user is not plagued with > the so called "rainbow cursor of death". The User Interface thread > must have a cancel button, but I do not know how to make it send a > message to the second thread while it is still doing its long and > tedious work. I want the second thread to exit as soon as the button > is pressed. I do not know how to have one thread interrupt the flow of > execution in another, but this is effectively what I need to do. I > came up with another idea however, that the workhorse thread "checks > back" with the UI thread every now and then to check if the cancel > button had been pressed. > > Summary for those (like me) who could not make heads or tails of that > sentence: I want to know how to break the execution line in the middle > of when a method is working, from a remote thread, by sending a > notification or a message. > > Hope to hear soon... > > Daniel Staudigel > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From anarkhos at mac.com Fri May 4 06:39:25 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:12 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? Message-ID: I just don't understand why only the root Views are paged to video memory and not NSClipViews. This ought to speed up scrolling significantly by only copying what isn't currently visible. This is also true with QuickDraw. Scrolling in MacOS will only copy the offscreen portion which isn't already in video memory. It's clear that in OS X the entire port is being updated. It makes no sense. The whole window is in video memory which is evident when moving them, but the individual views within it are not considered in that context when being updated. Did the NeXT Dimension have this problem? (assuming anybody looked for it) From john at toastedmarshmallow.com Fri May 4 06:39:59 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:12 2005 Subject: Distributed Object docs/tutes/code? In-Reply-To: <1010503173431.15b62074.93c598f6.ASIP6.2.1.240732@io.psy.herts.ac.uk> Message-ID: <20010504133600.DE16811C012@fimail01.cabinet.net> On Thursday, May 3, 2001, at 06:31 PM, Ken Tabb wrote: > does anyone know of any Distributed Objects docs (even just a "getting > started in DO")? I've looked in the dev docs ('forthcoming'), StepWise, > CocoDevCentral and in the AppKit and FoundationKit docs, and can't find > anything which looks obvious, besides NSSocketPort and NSPortNameServer > etc. (which seem to be saying "DO uses these but you should rarely need > to touch them yourself"). What's the application over the network on on the machine? There is a short section on the topic in my MacTech article from last year; http://www.mactech.com/articles/mactech/Vol.16/16.05/HotChocolate/index.html Listing 5: Vending an object, and connecting to an object using Distributed Objects - (void) connect { NSDistantObject* serverObject= [NSConnection rootProxyForConnectionWithRegisteredName:@"MyServer" host:@"*"]; } - (NSConnection*) createConnectionName:(NSString*)name { NSConnection* newConnection=[[NSConnection alloc] init]; if ([newConnection registerName:@"name"]) { [newConnection setRootObject:self]; } else { [newConnection release]; newConnection=nil; } return newConnection; } If you're doing things within an application, it isn't that difficult either. This is partly stolen from mpegToaster: - (void)connect { NSPort *port1; NSPort *port2; NSArray *portArray; NSConnection* kitConnection; port1 = [NSPort port]; port2 = [NSPort port]; kitConnection = [[NSConnection alloc] initWithReceivePort:port1 sendPort:port2]; [kitConnection setRootObject:self]; /* Ports switched here. */ portArray = [NSArray arrayWithObjects:port2, port1, nil]; [NSThread detachNewThreadSelector:@selector(connectWithPorts:) toTarget:player withObject:portArray]; [player start]; [[NSRunLoop currentRunLoop] run]; return; } - (void)connectWithPorts:(NSArray *)portArray { NSAutoreleasePool *pool= [[NSAutoreleasePool alloc] init]; NSConnection* serverConnection; serverConnection = [NSConnection connectionWithReceivePort:[portArray objectAtIndex:0] sendPort:[portArray objectAtIndex:1]]; controller=[serverConnection rootProxy]; // [controller register:self]; // ... Do your stuff // [controller unregister:self]; [pool release]; [NSThread exit]; return; } } I haven't done DO between network nodes on Mac OS X yet. Regards, John Hornkvist From pinskia at physics.uc.edu Fri May 4 06:41:08 2001 From: pinskia at physics.uc.edu (Andrew Pinski) Date: Thu Nov 3 14:46:12 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200105041032.f44AWfD25131@mailhost.gu.edu.au> from "Adrian Sutton" at May 04, 2001 08:31:36 PM Message-ID: <200105041323.f44DNnU10758@earth.phy.uc.edu> > > Firstly, excellent description of the benfits of preemptive memory > management. Having just completed Operating Systems 101 it's nice to be > able to understand all of it too. :) > > >> On OS X, this definitely isn't the case. All apps have the same > >> priority by default. This is sort of the opposite of preemptive. > > > > This is a flaw in the kernel; one which has already been rectified. > > I didn't think that this had been implemented in Darwin yet. I haven't > payed much attention to darwin-dev of late though. Are you certain this > has been implemented? I would be quite interested in this capability > and there are already some UNIX based tools to utilize it available > (nice which comes with OSX GM). That least acrounding to the Apple Developers it has been fixed in 128 of the kernel (124 is in Mac OS X 10.0.2). Thanks, Andrew Pinski > > > Greg > > Adrian Sutton > > ************************************************************** > Email: z1419539@cit.gu.edu.au Ph: 3714 4635 > Don't go around saying the world owes you a living. > The world owe's you nothing - it was here first. > -- Mark Twain. > ************************************************************** > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From phillipm at truespectra.com Fri May 4 07:03:04 2001 From: phillipm at truespectra.com (Phillip Mills) Date: Thu Nov 3 14:46:12 2005 Subject: IB: Scrolling, etc. In-Reply-To: Message-ID: On 5/4/01 9:28 AM, "Stephan Pirson" wrote: > On Thursday, May 3, 2001, at 07:04 PM, Phillip Mills wrote: >> There's a menu to add a new palette, which seems to just add a new, >> empty >> palette. What's the point? >> >> > Add things in it to make it a useful palette? Sounds interesting.... Do you mean a selection of things from other palettes, Cocoa things, or custom things? How, then, would one add the desired things to the empty palette? (Additionally, thanks to all who pointed out the menu item that puts a view inside a NSScrollView. I assumed that views would be drag-and-drop items in one of the view palettes. I also assumed, probably because I use a lot of graphics applications, that 'group' would lead to some options for combining multiple selected items. Gee, now that I know the answer, I can even find it in IB Help.) From ryanstevens at mac.com Fri May 4 07:09:02 2001 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:46:12 2005 Subject: Lock & Unlock Icons In-Reply-To: <200105031652.JAA07615@omnigroup.com> Message-ID: <200105041408.HAA18418@omnigroup.com> On Thursday, May 3, 2001, at 09:52 AM, Ryan Dary wrote: > I am wondering if there is a way to get a "standard" lock/unlock icon, > like the ones used in the preferences window for authorization. Does > anyone know if there is a shared collection of icons and other > resources, like back in OS 9 and the system?? > > I'd just grab NetInfo Manager's lock/unlock icons and be done with it. It would be nice to have a standard set to work with that we knew was going to be around but I haven't seen anything yet. From wave at pixar.com Fri May 4 07:12:12 2001 From: wave at pixar.com (Michael B. Johnson) Date: Thu Nov 3 14:46:12 2005 Subject: IB: Scrolling, etc. In-Reply-To: Message-ID: <200105041411.HAA20805@pixar.pixar.com> Like most things in IB, it's not obvious until explained, and then you're all "Doh!"... To get a ScrollView in IB, you select the item you want in a scroll view and go to the "Layout" menu and go to "Group In" and select "ScrollView". As for the adding a new palette, those refer to what I believe are called "dynamic" palettes, which are different than the programmatic kind in that they don't allow you to introduce new classes into IB, but rather to group objects (only NSView subclasses, I believe, but I may be wrong) that you've modified from their defaults onto a palette. Having said that, I just tried to drag a grouped button on to it, and don't see how. Vince? On Thursday, May 3, 2001, at 10:04 AM, Phillip Mills wrote: > I'd like to challenge the notion that there are no stupid questions; > this > sure feels like one.... > > The documentation for NSScrollView says to create one via Interface > Builder, > but I'm having no luck figuring out how. I've tried cycling through > all the > palette tabs, dropping controls into my window at random to see if any > of > them magically become what need. Lot's of sliders; no scroll views. > > Looking through the list I also do not see palette elements for > NSClipView, > NSSplitView, NSRulerView, NSScroller.... How do access these items? > > > If that wasn't enough, there's a couple of other things that I don't > get. > > There's a menu to add a new palette, which seems to just add a new, > empty > palette. What's the point? > > If I add a CustomView to a window the inspector shows me a bunch of > classes > as Attributes of the view (as well as in the Custom Class section). > What's > that trying to imply? > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > --> Michael B. Johnson, Ph.D. -- wave@pixar.com --> Studio Tools, Pixar Animation Studios --> http://xenia.media.mit.edu/~wave From dweebert at home.com Fri May 4 07:21:33 2001 From: dweebert at home.com (Graeme Hiebert) Date: Thu Nov 3 14:46:12 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: <14unlj-24qVo8C@fmrl02.sul.t-online.com> Message-ID: <20010504142106.HSNP24212.mail1.rdc2.bc.home.com@locutus> On Tuesday, May 1, 2001, at 08:57 PM, Uli Zappe wrote: > I want to point out that according to Apple's new standards (as > described on page 163 of the current version of SystemOverview.pdf), > supplementary files for an application belong into > ~/Library/Application Support. This is a very reasonable rule. Thanks for the tip. Is there a #define or something somewhere, so that I don't have to hardcode "Application Support" into my application? -g From ryanstevens at mac.com Fri May 4 07:31:47 2001 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:46:12 2005 Subject: drag and drop vs. close In-Reply-To: <200105031753.KAA24075@smtpout.mac.com> Message-ID: <200105041431.HAA20481@omnigroup.com> On Thursday, May 3, 2001, at 10:52 AM, Tom Waters wrote: > I think I've come across a bug in cocoa. > > If you ever close your window in response to a NSDraggingDestination > message, your program will SIGBUS. > > the stack trace is > > objc_msgSend > NSCoreDragTrackingProc > DoTrackingMessage > MessageHandler > .... > > It seems as if NSCoreDragTrackingProc is attempting to send another > message to my window, which has now been released... but it seems like > it is fair for me to be able to close my window, especially given that > I unregistered all dragged types. > > Can someone from Apple take a look at NSCoreDragTrackingProc and tell > me if this is a bug, or if there is a known workaround? > > > // NSWindow subclass. > > @implementation DragBug > > - (void)awakeFromNib > { > [self registerForDraggedTypes: [NSArray arrayWithObject: > NSFilenamesPboardType]]; > } > > - (NSDragOperation)draggingEntered:(id )sender; > { > NSLog(@"entered"); > return NSDragOperationEvery; > } > > - (void)draggingExited:(id )sender; > { > NSLog(@"exited"); > [self unregisterDraggedTypes]; > [self close]; > } > > @end > > I've seen this type of thing before. I was having trouble closing a window right after doing something (nothing to do with drag&drop though). I found that I'd get a SIGBUS if I didn't sleep for a second or more. I don't know why I just know that it sucked. so.. [self unregisterDraggedTypes]; [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:SLEEP_TIME]]; [self close]; ..may just work. If not, well, I gave it a shot! :-) Good luck! From john at toastedmarshmallow.com Fri May 4 07:37:25 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:12 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: Message-ID: <20010504143711.5759811C007@fimail01.cabinet.net> On Friday, May 4, 2001, at 03:33 PM, strobe anarkhos wrote: > I just don't understand why only the root Views are paged to video > memory and not NSClipViews. This ought to speed up scrolling > significantly by only copying what isn't currently visible. I'm not sure what you mean here... The clip view is visible, and you can set it to copy the on screen content instead of redrawing it during scrolling of the content view. This works OK for views that draw a solid background, IIRC. If you want the content view to be rendered into memory and then copied onto screen during scrolling, I've done this for the GraphicKit, but the win isn't all that great in most cases, so it is turned off by default. The problem is that for large views there is an awful lot of image data. Consider dealing with a large text view; say 20,000 lines of text. At 15 pixels per row, that's 300,000 raster lines. Let's say it's 512 pixel wide (quite narrow) at 32 bpp -> 600MB. Now, this is extreme, but it does highlight the resource consumption. In most cases, you can do better by caching an intermediate representation rather than the bitmap. This uses far less memory and can be just as fast. > This is also true with QuickDraw. Scrolling in MacOS will only copy the > offscreen portion which isn't already in video memory. It's clear that > in OS X the entire port is being updated. > > It makes no sense. The whole window is in video memory which is evident > when moving them, but the individual views within it are not considered > in that context when being updated. Consider that double buffering works at the window level; each window has a complete representation in memory, and then this is copied to video memory. Doing a whole window move is trivial; it's just a compositing operation. Doing the drag within video memory would be non-trivial, considering that other things can be updating during the drag. You'd need to do a fair bit of extra magic for this special case. I'd do the work in main memory where there is plenty of bandwidth from the processor, and copy it to video memory. Regards, John Hornkvist From stark at easynet.fr Fri May 4 07:42:42 2001 From: stark at easynet.fr (Frederic Stark) Date: Thu Nov 3 14:46:12 2005 Subject: IB: Scrolling, etc. In-Reply-To: Message-ID: <200105040231.EAA01847@cow.almonde.com> > > Add things in it to make it a useful palette? > > Sounds interesting.... Do you mean a selection of things from other > palettes, Cocoa things, or custom things? How, then, would one add the > desired things to the empty palette? Use 'Alternate', or 'Command', or 'Meta', or 'Whatever it is called on your keyboard' when dragging stuff to the dynamic palette. Use the same modifier key to modify item on the palette. Cheers, --fred From brian_hill at unioncab.com Fri May 4 07:43:16 2001 From: brian_hill at unioncab.com (Brian Hill) Date: Thu Nov 3 14:46:12 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: <20010504142106.HSNP24212.mail1.rdc2.bc.home.com@locutus> Message-ID: On Friday, May 4, 2001, at 09:21 AM, Graeme Hiebert wrote: >> I want to point out that according to Apple's new standards (as >> described on page 163 of the current version of SystemOverview.pdf), >> supplementary files for an application belong into >> ~/Library/Application Support. This is a very reasonable rule. > > Thanks for the tip. Is there a #define or something somewhere, so that > I don't have to hardcode "Application Support" into my application? A related question: Is the path '~/Library/Application Support' going to work on non-English/non-Roman script language systems? Brian brianhill@mac.com http://personalpages.tds.net/~brian_hill ___________________________________________________________ "Why? I came into this game for adventure - go anywhere, travel light, get in, get out, wherever there's trouble, a man alone. Now they've got the whole country sectioned off and you can't move without a form. I'm the last of a breed." -- Archibald "Harry" Tuttle, Rogue HVAC Repairman ___________________________________________________________ From dweebert at home.com Fri May 4 07:51:50 2001 From: dweebert at home.com (Graeme Hiebert) Date: Thu Nov 3 14:46:12 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: Message-ID: <20010504145136.BHTH20687.mail2.rdc2.bc.home.com@locutus> On Friday, May 4, 2001, at 07:42 AM, Brian Hill wrote: > On Friday, May 4, 2001, at 09:21 AM, Graeme Hiebert wrote: > >> Thanks for the tip. Is there a #define or something somewhere, so >> that I don't have to hardcode "Application Support" into my >> application? > > A related question: Is the path '~/Library/Application Support' going > to work on non-English/non-Roman script language systems? You got the one that was in the back of my mind. Note, however, that you don't have to (and probably shouldn't) hardcode "~/Library". Check out NSPathUtilities.h; in particular, look at NSSearchPathForDirectoriesInDomains. -g From mmurrett at vanteon.com Fri May 4 08:25:40 2001 From: mmurrett at vanteon.com (Mac Murrett) Date: Thu Nov 3 14:46:12 2005 Subject: Accessing Resource Forks from a pthread Message-ID: Is there a pthread-safe mechanism for accessing resource forks and other HFS+-specific attributes? Thanks, Mac. From asynth at io.com Fri May 4 08:26:24 2001 From: asynth at io.com (James McCartney) Date: Thu Nov 3 14:46:12 2005 Subject: mailing list woes In-Reply-To: <200105032337.TAA04773@pellns.alleg.edu> Message-ID: on 5/3/01 6:34 PM, Chris Behm at cjbehm@mail.com wrote: > I've got to ask, is anyone else receiving the same message multiple > times but days (sometimes a whole lotta days) apart? > > Chris I'm not receiving multiples I don't think, but I am receiving messages 24-48 hours delayed. Like yours for instance. --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. From chuck at apple.com Fri May 4 08:28:46 2001 From: chuck at apple.com (Chuck Pisula) Date: Thu Nov 3 14:46:12 2005 Subject: Disabling NSToolbarItems In-Reply-To: <200105030550.HAA04822@post.webmailer.de> Message-ID: <200105041528.IAA03835@scv3.apple.com> the toolbar items will validate with the same "mechanism" that menu items do, but you should implement the method: -(BOOL) validateToolbarItem: (NSToolbarItem *)item; -chuck On Wednesday, May 2, 2001, at 10:50 PM, Axel 'Mikesch' Katerbau wrote: > > Hi Luc, > >> I just can't seem to be able to disable my toolbar Items, the >> 'setEnabled:NO' message simply does nothing. I've tried to send it >> from various places in the code, with no luck. My toolbar items are >> standard ones, just an icon set with 'setImage'. >> >> What do I miss ? >> >> PS: I also tried the different validation methods on NSToolbarItem and >> NSToolbar, still with no luck. > > AFAIK the ToolbarItems are validated like MenuItems. If the responder > chain provides the selector bound as action then the item is enabled > unless you provide a method for validation of menu items and decide the > other way around. > > I haven't tried it yet, though. It's just a guess. > > Greetings, > Axel > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From ryand at softarch.com Fri May 4 08:41:26 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:12 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: <200105041541.IAA24565@omnigroup.com> I am somewhat fearful of app designers being able to define or request priority in the scheduler. What about those boneheads that might make their app appear to be so important that the rest of the computer is sluggish. Of course someone could say, quit using that app, but I don't think that is my point. Isn't there some way or some algorithm to determine the needs of the application? That would be ideal right? I don't know, I just hate to see what could happen to our preemptive multitasking environment if abused. -- Ryan On Monday, April 30, 2001, at 10:05 AM, gblock@wanadoo.fr wrote: >>> On OS X, this definitely isn't the case. All apps have the same >>> priority by default. This is sort of the opposite of preemptive. > > This is a flaw in the kernel; one which has already been rectified. The > ability to set priorities will inevitably allow someone, maybe even > Apple, to write a tool which allows you to set scheduling priority on > your applications, or even to allow the "frontmost application" to get a > priority bump. Or, more importantly, to *really* put that huge render > into the background. From chad at pengar.com Fri May 4 08:41:39 2001 From: chad at pengar.com (Chad Leigh, Pengar Enterprises, Inc & Shire.Net LLC) Date: Thu Nov 3 14:46:13 2005 Subject: mailing list woes In-Reply-To: Message-ID: <1134001810.988976479@[192.168.99.123]> Yes, I have ogtten several day old ones that lok like repeats as well as several day old ones that don't look like repeats Chad --On Friday, May 04, 2001 10:27 AM -0500 James McCartney wrote: > on 5/3/01 6:34 PM, Chris Behm at cjbehm@mail.com wrote: > >> I've got to ask, is anyone else receiving the same message multiple >> times but days (sometimes a whole lotta days) apart? >> >> Chris > > I'm not receiving multiples I don't think, but I am receiving messages > 24-48 hours delayed. Like yours for instance. > > --- james mccartney james@audiosynth.com > SuperCollider - a real time synthesis programming language for the > PowerMac. > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > Pengar Enterprises, Inc. and Shire.Net LLC Web and Macintosh Consulting -- full service web hosting Chad Leigh chad@pengar.com chad@shire.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 231 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/68949dca/attachment.bin From asynth at io.com Fri May 4 08:51:54 2001 From: asynth at io.com (James McCartney) Date: Thu Nov 3 14:46:13 2005 Subject: no page faults, how to hold memory resident in OSX ? In-Reply-To: <200103120038.TAA20681@smtp2.andrew.cmu.edu> Message-ID: In the CoreAudio header it says that precautions must be taken to prevent a page fault, but it does not say how this is done. I have not been able to find any documentation on calls to hold a region resident. How is this done? --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. From anarkhos at mac.com Fri May 4 08:53:03 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:13 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: <20010504154204.D2A4911C001@fimail01.cabinet.net> References: <20010504154204.D2A4911C001@fimail01.cabinet.net> Message-ID: > > >> If every sub-view is a separate surface, scrolling would be no different that dragging a background window behind another using the command-drag gesture. > >And that would use a whole lot more memory. You couldn't do make each sub view an individually cached surface and keep them in video memory without using enormous amounts of video memory. So, you'd have to do that at the beginning of the drag, creating a special case for all updates going on during the drag. How is that using more memory? From buck.erik at mcleodusa.net Fri May 4 08:53:29 2001 From: buck.erik at mcleodusa.net (Erik M. Buck) Date: Thu Nov 3 14:46:13 2005 Subject: drag and drop vs. close References: <200105031753.KAA24075@smtpout.mac.com> Message-ID: <008d01c0d4aa$2498dae0$10e42bd8@bc7440b> Close the window after the end of the current event processing via -performSelector:withObject:afterDelay: using a zero second delay. - (void)draggingExited:(id )sender; { NSLog(@"exited"); [self unregisterDraggedTypes]; [someWindow performSelector:@selector(performClose:) withObject:nil afterDelay:0.0]; } However, as a user I would be extremely irritated by this behavior. Closing a window because a drag exited is contrary to every user interface convention, a non-intuitive side effect, ... From epeyton at epicware.com Fri May 4 08:55:46 2001 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:46:13 2005 Subject: Lock & Unlock Icons In-Reply-To: <200105041408.HAA18418@omnigroup.com> Message-ID: <20010504155426.504A25DB1@smtp-2.enteract.com> The lock icons on the released version fo OS X can be bragged from the resources of the private NIInterface framework. Eric On Friday, May 4, 2001, at 09:04 AM, Ryan Stevens wrote: > > On Thursday, May 3, 2001, at 09:52 AM, Ryan Dary wrote: > >> I am wondering if there is a way to get a "standard" lock/unlock >> icon, like the ones used in the preferences window for >> authorization. Does anyone know if there is a shared collection >> of icons and other resources, like back in OS 9 and the system?? >> >> > I'd just grab NetInfo Manager's lock/unlock icons and be done with it. > > It would be nice to have a standard set to work with that we knew > was going to be around but I haven't seen anything yet. > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From john at toastedmarshmallow.com Fri May 4 09:15:01 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:13 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: Message-ID: <20010504154204.D2A4911C001@fimail01.cabinet.net> On Friday, May 4, 2001, at 05:10 PM, strobe anarkhos wrote: > > I'm *not* talking about paging the offscreen view into video memory! > I'm talking about moving the visible portion to video memory only, as a > separate CG surface. Then when you scroll the surface is moved and the > offscreen portion is copied and updated instead of the entire ClipView. > Currently the entire NSScrollView is being updated with every scroll > movement. This is ludicrous. That's a choice the developer makes for each scroll view. Check - (void)setCopiesOnScroll:(BOOL)flag; on NSClipView. > > Dragging?! Huh?! Dragging referred to the window drags == moving a window. > There is no magic involved here dude. "dude"? The Porter-Duff composition that takes place when you drag a window is fairly complex. Doing window drags with composition with non-opaque windows in video memory is quite hairy. > If every sub-view is a separate surface, scrolling would be no > different that dragging a background window behind another using the > command-drag gesture. And that would use a whole lot more memory. You couldn't do make each sub view an individually cached surface and keep them in video memory without using enormous amounts of video memory. So, you'd have to do that at the beginning of the drag, creating a special case for all updates going on during the drag. > And in fact when you scroll a view within a window, the whole window is > NOT updated, only the NSScrollView. The stupid part is that the entire > NSClipView is updated when it shouldn't be. With the correct flag set, it is copied within the window. It's up to the programmer to ask for this behavior. Regards, John Hornkvist From ddavidso at apple.com Fri May 4 09:16:47 2001 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:46:13 2005 Subject: NSSystemDirectories.h In-Reply-To: Message-ID: <200105041619.JAA19771@scv2.apple.com> On Thursday, May 3, 2001, at 05:01 PM, Karl Goiser wrote: > In the System Overview, > > http://www.devworld.apple.com/techpubs/macosx/SystemOverview/SystemOverview/ > FileSystem/How_the_Fil_s_Organized.html > > reference is made to the header file, 'NSSystemDirectories.h' but I > don't seem to be able to find it. > It's in /usr/include with the rest of the System headers. Douglas Davidson -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 500 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/29f87146/attachment.bin From ryand at softarch.com Fri May 4 09:18:31 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:13 2005 Subject: Lock & Unlock Icons In-Reply-To: Message-ID: <200105041618.JAA26678@omnigroup.com> My sincere appreciation to all who has given me suggestions about getting a lock and unlock icon, however my goal in this was not to solve the issue with a workaround, but rather to know if there is some repository of resources similar to how OS 9's system worked. This way, if the icon changes in the "system" later, my app inherits the new one. 'Theme" compliant, if you will. -- Ryan On Friday, May 4, 2001, at 08:54 AM, epeyton@epicware.com wrote: > The lock icons on the released version fo OS X can be bragged from > the resources of the private NIInterface framework. > > Eric > > On Friday, May 4, 2001, at 09:04 AM, Ryan Stevens wrote: > >>> >>> On Thursday, May 3, 2001, at 09:52 AM, Ryan Dary wrote: >>> >>>> I am wondering if there is a way to get a "standard" lock/unlock >>>> icon, like the ones used in the preferences window for >>>> authorization. Does anyone know if there is a shared collection >>>> of icons and other resources, like back in OS 9 and the system?? >>>> >>>> >>> I'd just grab NetInfo Manager's lock/unlock icons and be done with it. >>> >>> It would be nice to have a standard set to work with that we knew >>> was going to be around but I haven't seen anything yet. >>> _______________________________________________ >>> MacOSX-dev mailing list >>> MacOSX-dev@omnigroup.com >>> http://www.omnigroup.com/mailman/listinfo/macosx-dev > From epeyton at epicware.com Fri May 4 09:19:51 2001 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:46:13 2005 Subject: Lock & Unlock Icons In-Reply-To: <20010504155426.504A25DB1@smtp-2.enteract.com> Message-ID: <20010504161910.ABE3A5D8A@smtp-2.enteract.com> (My fingers are much faster than my brain :- ) "version fo OS X can be bragged" Should have be written ... "version of OS X can be grabbed" Though I am sure you all got my point ... Eric On Friday, May 4, 2001, at 10:54 AM, Eric Peyton wrote: > The lock icons on the released version fo OS X can be bragged from > the resources of the private NIInterface framework. > > Eric > > On Friday, May 4, 2001, at 09:04 AM, Ryan Stevens wrote: > >> >> On Thursday, May 3, 2001, at 09:52 AM, Ryan Dary wrote: >> >>> I am wondering if there is a way to get a "standard" lock/unlock >>> icon, like the ones used in the preferences window for >>> authorization. Does anyone know if there is a shared collection >>> of icons and other resources, like back in OS 9 and the system?? >>> >>> >> I'd just grab NetInfo Manager's lock/unlock icons and be done with it. >> >> It would be nice to have a standard set to work with that we knew >> was going to be around but I haven't seen anything yet. >> _______________________________________________ >> 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 tinaddar at mac.com Fri May 4 09:20:05 2001 From: tinaddar at mac.com (James Roberts) Date: Thu Nov 3 14:46:13 2005 Subject: mailing list woes In-Reply-To: Message-ID: Sometimes my messages take a day or 2 to appear on the list. James Roberts -----Original Message----- From: macosx-dev-admin@omnigroup.com [mailto:macosx-dev-admin@omnigroup.com]On Behalf Of James McCartney Sent: Friday, May 04, 2001 8:28 AM To: Chris Behm; MacOS X Dev Subject: Re: mailing list woes on 5/3/01 6:34 PM, Chris Behm at cjbehm@mail.com wrote: > I've got to ask, is anyone else receiving the same message multiple > times but days (sometimes a whole lotta days) apart? > > Chris I'm not receiving multiples I don't think, but I am receiving messages 24-48 hours delayed. Like yours for instance. --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. _______________________________________________ MacOSX-dev mailing list MacOSX-dev@omnigroup.com http://www.omnigroup.com/mailman/listinfo/macosx-dev From epeyton at epicware.com Fri May 4 09:37:30 2001 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:46:13 2005 Subject: Lock & Unlock Icons In-Reply-To: <200105041618.JAA26678@omnigroup.com> Message-ID: <20010504163722.42C5D7288@smtp-1.enteract.com> Then the answer to your query is "no". there is no repository of "all" of the system icons that is guaranteed to be steady across releases wrt icon names, etc. Eric On Friday, May 4, 2001, at 10:59 AM, Ryan Dary wrote: > My sincere appreciation to all who has given me suggestions about > getting a lock and unlock icon, however my goal in this was not to > solve the issue with a workaround, but rather to know if there is > some repository of resources similar to how OS 9's system worked. > This way, if the icon changes in the "system" later, my app > inherits the new one. 'Theme" compliant, if you will. > > -- Ryan > > > On Friday, May 4, 2001, at 08:54 AM, epeyton@epicware.com wrote: > >> The lock icons on the released version fo OS X can be bragged from >> the resources of the private NIInterface framework. >> >> Eric >> >> On Friday, May 4, 2001, at 09:04 AM, Ryan Stevens wrote: >> >>>> >>>> On Thursday, May 3, 2001, at 09:52 AM, Ryan Dary wrote: >>>> >>>>> I am wondering if there is a way to get a "standard" lock/unlock >>>>> icon, like the ones used in the preferences window for >>>>> authorization. Does anyone know if there is a shared collection >>>>> of icons and other resources, like back in OS 9 and the system?? >>>>> >>>>> >>>> I'd just grab NetInfo Manager's lock/unlock icons and be done >>>> with it. >>>> >>>> It would be nice to have a standard set to work with that we knew >>>> was going to be around but I haven't seen anything yet. >>>> _______________________________________________ >>>> 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 tom_waters at mac.com Fri May 4 09:38:35 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:13 2005 Subject: Standard icon+text in NSTableCell In-Reply-To: <200105031638.JAA07177@omnigroup.com> Message-ID: <200105041637.JAA06067@smtpout.mac.com> You can turn the arrow off, then NSBrowserCell will look like you want. I am still disturbed why NSBrowserCell renders the icon to the left of the text without any mention of that behavior in the documentation, while NSCell has a setImage method, but never renders it properly. Plus, you will find that NSBrowserCells do not edit themselves correctly when they have an image set. NSBrowserCell *cell; ... [cell setImage: myImage]; [cell setTitle: myString]; [cell setLeaf: YES]; On Thursday, May 3, 2001, at 09:38 AM, Will Price wrote: > I've looked through list archives and through Fire.app source code, but > so far there doesn't seem to be a cell type which supports an icon > followed by text in the same cell (ie the way the Finder displays list > views). Fire actually draws its own cell to do this, which provides > them with a litany of UI violations. I'm sure those violations (such as > always using Yellow for the highlight color) can be overcome, but this > seems like a slippery slope. All I want is a standard cell type like > those used in thousands of applications on other platforms which shows > an icon followed by text. > > NSBrowserCell does not appear to be what I want. It puts some strange > looking arrow in the right side of the cell, and doesn't seem to > support images. From john at toastedmarshmallow.com Fri May 4 09:42:44 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:13 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: Message-ID: <20010504164232.4C79F11C002@fimail01.cabinet.net> On Friday, May 4, 2001, at 05:53 PM, strobe anarkhos wrote: >> >> >>> If every sub-view is a separate surface, scrolling would be no >>> different that dragging a background window behind another using the >>> command-drag gesture. >> >> And that would use a whole lot more memory. You couldn't do make each >> sub view an individually cached surface and keep them in video memory >> without using enormous amounts of video memory. So, you'd have to do >> that at the beginning of the drag, creating a special case for all >> updates going on during the drag. > > How is that using more memory? Views are nested. If every subview is a separate surface, as per your suggestion, then each would have to be buffered. That would use more memory than buffering just the window. Regards, John Hornkvist From tom_waters at mac.com Fri May 4 09:46:51 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:13 2005 Subject: Selecting a NSTableView's column *header* In-Reply-To: <20010504150627.A24984@keyser.soze.com> Message-ID: <200105041646.JAA07465@smtpout.mac.com> highlight and select are very related terms for your future searching of the docs and headers,... Put this in your tableview's delegate. - (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn { [tableView setHighlightedTableColumn: tableColumn]; } On Friday, May 4, 2001, at 06:06 AM, Stefan Arentz wrote: > Does anyone know the correct method of selecting just > the header cell of a table? I don't want to use the > selectColumn:byExtendingSelection: method as that will > also select all the cells in that column. > > I just want to change the color of the header cell > as is done in Mail.app. From tom_waters at mac.com Fri May 4 09:54:38 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:13 2005 Subject: drag and drop vs. close In-Reply-To: <008d01c0d4aa$2498dae0$10e42bd8@bc7440b> Message-ID: <200105041653.JAA08392@smtpout.mac.com> Think about the behavior of spring loaded folders in OS9's Finder. It is an important part of the user experience that if they have sprung a folder they don't want, they can leave it and it closes so they can select another one. On Friday, May 4, 2001, at 07:54 AM, Erik M. Buck wrote: > Close the window after the end of the current event processing > via -performSelector:withObject:afterDelay: using a zero second delay. > > - (void)draggingExited:(id )sender; > { > NSLog(@"exited"); > [self unregisterDraggedTypes]; > [someWindow performSelector:@selector(performClose:) withObject:nil > afterDelay:0.0]; > } > > However, as a user I would be extremely irritated by this behavior. > Closing > a window because a drag exited is contrary to every user interface > convention, a non-intuitive side effect, ... > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From douglas at city-net.com Fri May 4 09:58:22 2001 From: douglas at city-net.com (G. Douglas Davidson) Date: Thu Nov 3 14:46:13 2005 Subject: Simple DO Question (I think) Message-ID: <200105041642.MAA31967@vegeta.city-net.com> I have set up a DO connection (using the connection between two threads example in NSConnection) and I would like to be able to have a message parameter be an object existing in the original thread. The problem is that the DO mechanism results in a proxy (NSDistantObject) for that object arriving on the other side. Is there a simple way that I can send a pointer (by ref) to this object itself? Or can a get the "real" object pointed to from the proxy (NSDistantObject)? Thanks in advance! From anarkhos at mac.com Fri May 4 09:58:35 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:13 2005 Subject: Been looking at HID lately...definitely not an Input Sprockets replacement! Message-ID: I don't know what Apple was thinking when they replaced Input Sprockets with HID, but it was probably the same thing when they replaced QD3D with OpenGL. I have nothing against HID. I think it's an excellent framework for writing drivers. I plan to write a joystick driver for my ADB Thrustmaster as soon as Apple releases the joystick class and Griffin the iMate driver. It's also a good framework for implementing the global keymapping solution Apple said (errr hinted) they are working on. However it's not a good framework for application development. It's too low level! It doesn't even have calibration. Each application will have to implement HID mapping and calibration. This means I'll have to re-calibrate joysticks for every app using them, like games. And we all know how some games have completely failed in terms of mapping and calibration, look at Pod Racer for a good example of how to screw up big time. Each game and emulator will have to be rewritten to use another API and also write extra code to handle stuff which Input Sprockets handled automatically. I'm not going to suggest that Input Sprockets was all good, but what is it being replaced with?! From demarco at apple.com Fri May 4 09:58:50 2001 From: demarco at apple.com (Vince DeMarco) Date: Thu Nov 3 14:46:13 2005 Subject: IB: Scrolling, etc. In-Reply-To: <200105041411.HAA20805@pixar.pixar.com> Message-ID: <200105041658.JAA00035@scv3.apple.com> On Friday, May 4, 2001, at 07:09 AM, Michael B. Johnson wrote: > Like most things in IB, it's not obvious until explained, and then > you're all "Doh!"... > > To get a ScrollView in IB, you select the item you want in a scroll > view and go to the "Layout" menu and go to "Group In" and select > "ScrollView". > > As for the adding a new palette, those refer to what I believe are > called "dynamic" palettes, which are different than the programmatic > kind in that they don't allow you to introduce new classes into IB, but > rather to group objects (only NSView subclasses, I believe, but I may > be wrong) that you've modified from their defaults onto a palette. > Having said that, I just tried to drag a grouped button on to it, and > don't see how. > > Vince? > yes the new palette refers to dynamic palettes. Which is basically a way of saving common arrangements that you use all of the time. So i you always use a TextField with a button to its right in all of your programs, the easiest thing to do is is make a new palette, then select the textfield and button then alt drag the select and drop it on the newly created palette. One note you can't edit the palette once you have created it. (I guess we should probably fix that) vince > > On Thursday, May 3, 2001, at 10:04 AM, Phillip Mills wrote: > >> I'd like to challenge the notion that there are no stupid questions; >> this >> sure feels like one.... >> >> The documentation for NSScrollView says to create one via Interface >> Builder, >> but I'm having no luck figuring out how. I've tried cycling through >> all the >> palette tabs, dropping controls into my window at random to see if any >> of >> them magically become what need. Lot's of sliders; no scroll views. >> >> Looking through the list I also do not see palette elements for >> NSClipView, >> NSSplitView, NSRulerView, NSScroller.... How do access these items? >> >> >> If that wasn't enough, there's a couple of other things that I don't >> get. >> >> There's a menu to add a new palette, which seems to just add a new, >> empty >> palette. What's the point? >> >> If I add a CustomView to a window the inspector shows me a bunch of >> classes >> as Attributes of the view (as well as in the Custom Class section). >> What's >> that trying to imply? >> The purpose of the CustomView is to place an instance of a view, you don't want to convert into a palette, in your program. The Custom Class info panel, lists all of the classes you can use to replace the currently selected class. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2549 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/b7ea3a83/attachment.bin From buck.erik at mcleodusa.net Fri May 4 10:02:30 2001 From: buck.erik at mcleodusa.net (Erik M. Buck) Date: Thu Nov 3 14:46:13 2005 Subject: Standard icon+text in NSTableCell References: <200105041637.JAA06067@smtpout.mac.com> Message-ID: <002a01c0d4bc$25e6d980$44e72bd8@bc7440b> See http://www.stepwise.com/Articles/Technical/NSCell.html for source code to a NSBrowserCell subclass that does edit correctly. From marcel at bresink.de Fri May 4 10:05:26 2001 From: marcel at bresink.de (Marcel Bresink) Date: Thu Nov 3 14:46:13 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200105041541.IAA24565@omnigroup.com> Message-ID: <200105041704.TAA13077@mayim.bresink.net> Am Freitag, 4. Mai 2001 um 17:41 schrieb Ryan Dary: > I am somewhat fearful of app designers being able to define or request > priority in the scheduler. What about those boneheads that might make > their app appear to be so important that the rest of the computer is > sluggish. This cannot happen. Only software in "privileged mode" is allowed to increase process priorities. This means only the administrator or the operating system itself can request more CPU resources. As a "normal" user you can only decrease the priorities of your programs. > Isn't there some way or some algorithm to determine the needs of the > application? This is impossible in advance. But some operating systems monitor all applications at runtime and then decide to dynamically increase or decrease priorities. However, it's controversial if that's really a big advantage. In practice, simple schedulers are often as effective as the ones with complex optimization strategies. Marcel -- Dr. Marcel Bresink, Ringstr. 21, 56630 Kretz, Germany Fon: +49-2632-953150 Fax: -953151 http://www.bresink.de/ From stefan.arentz at soze.com Fri May 4 10:07:19 2001 From: stefan.arentz at soze.com (Stefan Arentz) Date: Thu Nov 3 14:46:13 2005 Subject: Selecting a NSTableView's column *header* In-Reply-To: <200105041646.JAA07465@smtpout.mac.com>; from tom_waters@mac.com on Fri, May 04, 2001 at 09:45:10AM -0700 References: <20010504150627.A24984@keyser.soze.com> <200105041646.JAA07465@smtpout.mac.com> Message-ID: <20010504190548.A27815@keyser.soze.com> On Fri, May 04, 2001 at 09:45:10AM -0700, Tom Waters wrote: > highlight and select are very related terms for your future searching of > the docs and headers,... > > Put this in your tableview's delegate. > > - (void)tableView:(NSTableView*)tableView > didClickTableColumn:(NSTableColumn *)tableColumn > { > [tableView setHighlightedTableColumn: tableColumn]; > } Argh! Must have over it while my NSBrain was full with other NSStuff. Thanks :-) Stefan From ryand at softarch.com Fri May 4 10:11:27 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:13 2005 Subject: Project Idea: Application Dockling Message-ID: <200105041711.KAA00987@omnigroup.com> Has anyone created a dockling which simply gives access to all the "Applications"? It would be capable of navigating in depth of folders in the Applications folder? I currently just put the Applications folder in the dock, however the nice thing about a dockling is that it can be invoked with a single click. With the Applications folder, in order to get the menu, I must click-hold until the popup. It would be nicer to just click and get the menu quicker. If this has been made I would like to try it, if not, where would i begin? Is there a sdk? -- Ryan From jcr at idiom.com Fri May 4 10:14:52 2001 From: jcr at idiom.com (John C. Randolph) Date: Thu Nov 3 14:46:13 2005 Subject: Pausing an NSTask? Message-ID: <200105041714.KAA36442@idiom.com> Suppose I have something time-consuming going on in an NSTask, and I'd like to do the moral equivalent of sending it a control-Z from a shell. I see that NSTask has a "description forthcoming" -interrupt method that sends a SIGINT, but I don't see any obvious way to suspend and restart. Can anyone suggest how I might go about this? advTHANKSance, -jcr For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken From Stefan_Jung at t-online.de Fri May 4 10:15:12 2001 From: Stefan_Jung at t-online.de (Stefan Jung) Date: Thu Nov 3 14:46:13 2005 Subject: IB: Scrolling, etc. In-Reply-To: Message-ID: <14vgP9-26KdBwC@fwd01.sul.t-online.com> Am Donnerstag, 3. Mai 2001 um 19:04 schrieb Phillip Mills: I'd like to challenge the notion that there are no stupid questions; this sure feels like one.... Hahahahooohoho :-) OK, this one is really easy. Select your custom view. Then choose the menu Layout->Group In->Scroll View. That's it. While connecting your outlets and actions watch that you have selected the right view. Your custom view or the surrounding scroll view. If the inner custom view is selected there will be a thicker frame and additional drag handles. Stefan Jung -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 600 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/ecae173b/attachment.bin From ryand at softarch.com Fri May 4 10:16:53 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:13 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: <200105041716.KAA01773@omnigroup.com> I am confused how they would both be about the same in speed. Do you mean that the process of trying to discover the priorities (at run-time) for the processes actually decreases performance to the point where it is comparable to a scheduler without the optimization process? That is quite interesting. So, what are some examples of applications which would be beneficial to decrease their own priority? And would this be something discussed (future versions) in the Aqua Interface guidelines so that developers can adjust this in their apps? Of course you can't speak for what will or won't be put into the HIG, however I simply mean to ask if you (or anyone) believes that this would be published so that developers could take this into consideration when building their applications. -- Ryan On Friday, May 4, 2001, at 10:04 AM, marcel@bresink.de wrote: >>> Isn't there some way or some algorithm to determine the needs of the >>> application? > > This is impossible in advance. But some operating systems > monitor all applications at runtime and then decide to > dynamically increase or decrease priorities. However, it's > controversial if that's really a big advantage. In practice, > simple schedulers are often as effective as the ones with > complex optimization strategies. > > Marcel From a at blackbox.net Fri May 4 10:17:03 2001 From: a at blackbox.net (Andreas Monitzer) Date: Thu Nov 3 14:46:13 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200105041541.IAA24565@omnigroup.com> Message-ID: <200105041716.TAA00531@am.homeip.net> On Friday, May 4, 2001, at 05:41 , Ryan Dary wrote: > I am somewhat fearful of app designers being able to define or request > priority in the scheduler. What about those boneheads that might make > their app appear to be so important that the rest of the computer is > sluggish. Of course someone could say, quit using that app, but I don't > think that is my point. > > Isn't there some way or some algorithm to determine the needs of the > application? That would be ideal right? I don't know, I just hate to > see what could happen to our preemptive multitasking environment if > abused. It's the same like in Mac OS 9. Some applications (like an old IE version and Langenscheidt's PC-Bibliothek) slow the whole system down a lot. The result? Users complain and don't use it, or modify it to use less CPU (there's a tool for Mac OS 9 that does this). It's just that simple. andy -- Description forthcoming. From buck.erik at mcleodusa.net Fri May 4 10:18:50 2001 From: buck.erik at mcleodusa.net (Erik M. Buck) Date: Thu Nov 3 14:46:13 2005 Subject: lost in Scroller, ScrollView, ... References: Message-ID: <00ca01c0d4af$8d28cac0$10e42bd8@bc7440b> The solution is to override the -tile method. A quick search on Yahoo reports: ftp://next-ftp.peak.org/next-ftp/next/sourcelibrary/miniexamples/appkit/Scro llViewDeluxe.NIHS.bs.tar.gz and ... A custom NSScrollView subclass which lets you add controls to both the vertical and horizontal Scroller areas of an NSScrollView. Useful to create zoom and ... http://softrak.stepwise.com/Apps/WebObjects/Softrak.woa/1/wa/displayPackage? package=132&os=10 From ccwells at mac.com Fri May 4 10:20:28 2001 From: ccwells at mac.com (Charles C Wells) Date: Thu Nov 3 14:46:13 2005 Subject: MacOSX-dev digest, Vol 1 #749 - 19 msgs In-Reply-To: <200105041715.KAA24024@outbox.omnigroup.com> Message-ID: <200105041719.KAA12106@smtpout.mac.com> Yes! This has been happening to me since I signed on to the list. Multiple versions of the same digest version, sometimes days apart. On Friday, May 4, 2001, at 10:15 , macosx-dev-request@omnigroup.com wrote: >> I've got to ask, is anyone else receiving the same message multiple >> times but days (sometimes a whole lotta days) apart? >> >> Chris From john at toastedmarshmallow.com Fri May 4 10:22:50 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:13 2005 Subject: Simple DO Question (I think) In-Reply-To: <200105041642.MAA31967@vegeta.city-net.com> Message-ID: <20010504172238.C109C11C008@fimail01.cabinet.net> On Friday, May 4, 2001, at 06:57 PM, G. Douglas Davidson wrote: > I have set up a DO connection (using the connection between two threads > example in NSConnection) and I would like to be able to have a message > parameter be an object existing in the original thread. The problem is > that the DO mechanism results in a proxy (NSDistantObject) for that > object arriving on the other side. Is there a simple way that I can > send a pointer (by ref) to this object itself? Or can a get the "real" > object pointed to from the proxy (NSDistantObject)? You could always pass the pointer as an integer... Or maybe a void*. Since the encoding happens in forwardInvocation, it will be done by looking at the method signature, and as long as the runtime can't find out from the signature that an argument is an object, it should be passed without conversion. Regards, John Hornkvist From ssudre at intego.com Fri May 4 10:27:21 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:13 2005 Subject: Standard icon+text in NSTableCell In-Reply-To: <200105041637.JAA06067@smtpout.mac.com> Message-ID: <1223125929-31111997@transeo.com> On vendredi, mai 4, 2001, at 06:36 , Tom Waters wrote: > You can turn the arrow off, then NSBrowserCell will look like you > want. I am still disturbed why NSBrowserCell renders the icon to the > left of the text without any mention of that behavior in the > documentation, while NSCell has a setImage method, but never renders it > properly. Plus, you will find that NSBrowserCells do not edit > themselves correctly when they have an image set. > > NSBrowserCell *cell; > ... > [cell setImage: myImage]; > [cell setTitle: myString]; > [cell setLeaf: YES]; Stupid question: Is it possible to use a NSBrowserCell as the DataCell of a NSTableView Column ? I don't see how you can give it a object value if it's possible to do so since you must provide it with an image and a text. From epeyton at epicware.com Fri May 4 10:27:36 2001 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:46:13 2005 Subject: Project Idea: Application Dockling In-Reply-To: <200105041711.KAA00987@omnigroup.com> Message-ID: <20010504172647.370AB5DA9@smtp-2.enteract.com> On Friday, May 4, 2001, at 12:11 PM, Ryan Dary wrote: > Has anyone created a dockling which simply gives access to all the > "Applications"? It would be capable of navigating in depth of > folders in the Applications folder? > > I currently just put the Applications folder in the dock, however > the nice thing about a dockling is that it can be invoked with a > single click. With the Applications folder, in order to get the > menu, I must click-hold until the popup. It would be nicer to > just click and get the menu quicker. > Or ctrl-click or right-click (you do have a multi-button mouse - right? :-) ) > If this has been made I would like to try it, if not, where would > i begin? Is there a sdk? > Stepwise. Check out the article on making docklings. This dockling should take you a whopping 30 minutes to write ... assuming you are somewhat familiar with Cocoa of course ... Eric > -- Ryan > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From dstaudi at san.rr.com Fri May 4 10:28:39 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:13 2005 Subject: mailing list woes In-Reply-To: Message-ID: <200105041729.f44HTIV05454@smtp3.san.rr.com> Yes when I send my messages out they come back to me days later, for example I am sending this at 10:24 PST on 5-4-01 we'll see when you guys get it... Daniel From anarkhos at mac.com Fri May 4 10:29:23 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:13 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: <20010504143711.5759811C007@fimail01.cabinet.net> References: <20010504143711.5759811C007@fimail01.cabinet.net> Message-ID: At 4:36 PM +0200 5/4/01, John H?rnkvist wrote: >On Friday, May 4, 2001, at 03:33 PM, strobe anarkhos wrote: > >>I just don't understand why only the root Views are paged to video memory and not NSClipViews. This ought to speed up scrolling significantly by only copying what isn't currently visible. > >I'm not sure what you mean here... The clip view is visible, and you can set it to copy the on screen content instead of redrawing it during scrolling of the content view. This works OK for views that draw a solid background, IIRC. > >If you want the content view to be rendered into memory and then copied onto screen during scrolling, I've done this for the GraphicKit, but the win isn't all that great in most cases, so it is turned off by default. The problem is that for large views there is an awful lot of image data. Consider dealing with a large text view; say 20,000 lines of text. At 15 pixels per row, that's 300,000 raster lines. Let's say it's 512 pixel wide (quite narrow) at 32 bpp -> 600MB. > >Now, this is extreme, but it does highlight the resource consumption. In most cases, you can do better by caching an intermediate representation rather than the bitmap. This uses far less memory and can be just as fast. I'm *not* talking about paging the offscreen view into video memory! I'm talking about moving the visible portion to video memory only, as a separate CG surface. Then when you scroll the surface is moved and the offscreen portion is copied and updated instead of the entire ClipView. Currently the entire NSScrollView is being updated with every scroll movement. This is ludicrous. >>This is also true with QuickDraw. Scrolling in MacOS will only copy the offscreen portion which isn't already in video memory. It's clear that in OS X the entire port is being updated. >> >>It makes no sense. The whole window is in video memory which is evident when moving them, but the individual views within it are not considered in that context when being updated. > >Consider that double buffering works at the window level; each window has a complete representation in memory, and then this is copied to video memory. Doing a whole window move is trivial; it's just a compositing operation. > >Doing the drag within video memory would be non-trivial, considering that other things can be updating during the drag. You'd need to do a fair bit of extra magic for this special case. > >I'd do the work in main memory where there is plenty of bandwidth from the processor, and copy it to video memory. Dragging?! Huh?! There is no magic involved here dude. If every sub-view is a separate surface, scrolling would be no different that dragging a background window behind another using the command-drag gesture. And in fact when you scroll a view within a window, the whole window is NOT updated, only the NSScrollView. The stupid part is that the entire NSClipView is updated when it shouldn't be. From dstaudi at san.rr.com Fri May 4 10:31:58 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:13 2005 Subject: mailing list woes In-Reply-To: <200105041729.f44HTIV05454@smtp3.san.rr.com> Message-ID: <200105041732.f44HWfV06053@smtp3.san.rr.com> I guess that example did not work on my end of things, I got it 6 minutes after I sent it! I am sending this one at 10:31 Daniel From phillipm at truespectra.com Fri May 4 10:38:10 2001 From: phillipm at truespectra.com (Phillip Mills) Date: Thu Nov 3 14:46:13 2005 Subject: NSDrawer visibility In-Reply-To: <200105041658.JAA00035@scv3.apple.com> Message-ID: I'd like to have my document window with a drawer, which is open by default when the window is created. Everything seems to be working except the part where I get to see the drawer. I picked -windowDidLoad as the place to intervene and tell the drawer to open via an outlet in my window controller that's connected using IB. If I break in -drawerDidOpen in my drawer's delegate, I see that the open is going as planned. However, on screen, all I get is the basic window. The oddest part is that if I then minimize my window and restore it from the dock, it appears with the drawer visible. (Resizing before docking it has no effect.) Do I need to be opening the drawer later in the process? ...after the window is actually displayed? (...and, if so, what hook does the window controller have for that?) From tom_waters at mac.com Fri May 4 10:44:38 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:13 2005 Subject: Standard icon+text in NSTableCell In-Reply-To: <1223125929-31111997@transeo.com> Message-ID: <200105041743.KAA15599@smtpout.mac.com> Remember, there is only one dataCell per column. It gets its title set by the dataSource's tableView:objectValueForTableColumn:row:, but the image has to be set some other way. You need to provide a delegate to the table and provide something like this: - (void)tableView:(NSTableView *)view willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)col row:(int)row { if ([col isTheColumnYouWantToSetTheImageOn]) { // provide your own test here. [cell setImage: [self theAppropriateImageForThisRow: row]]; } } If you don't mind using up a bunch of memory, you can override dataCellForRow and have a zillion datacells rather than one, and then the images will stick... but that's not the way I would suggest you do it. On Friday, May 4, 2001, at 10:10 AM, St?phane Sudre wrote: > > On vendredi, mai 4, 2001, at 06:36 , Tom Waters wrote: > >> You can turn the arrow off, then NSBrowserCell will look like you >> want. I am still disturbed why NSBrowserCell renders the icon to the >> left of the text without any mention of that behavior in the >> documentation, while NSCell has a setImage method, but never renders >> it properly. Plus, you will find that NSBrowserCells do not edit >> themselves correctly when they have an image set. >> >> NSBrowserCell *cell; >> ... >> [cell setImage: myImage]; >> [cell setTitle: myString]; >> [cell setLeaf: YES]; > > Stupid question: > > Is it possible to use a NSBrowserCell as the DataCell of a NSTableView > Column ? > > I don't see how you can give it a object value if it's possible to do > so since you must provide it with an image and a text. From ryanstevens at mac.com Fri May 4 10:47:44 2001 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:46:13 2005 Subject: mailing list woes In-Reply-To: <200105041732.f44HWfV06053@smtp3.san.rr.com> Message-ID: <200105041747.KAA05086@omnigroup.com> On Friday, May 4, 2001, at 10:31 AM, Daniel Staudigel wrote: > I guess that example did not work on my end of things, I got it 6 > minutes after I sent it! I am sending this one at 10:31 > > got it at 10:31 :-) I've done the same thing. "My messages aren't going through right away..." and poof, it works perfectly. It is being weird lately though. I got several duplicate messages today and some show as being sent up to 3 days ago. I still haven't gotten a message I sent 2 weeks ago but I did notice others got it 'cause they replied. From alex at raftis.net Fri May 4 10:55:00 2001 From: alex at raftis.net (Alex Raftis) Date: Thu Nov 3 14:46:13 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: <200105041754.KAA17415@buttercup.raftis.net> On Tuesday, May 1, 2001, at 03:27 AM, Max Horn wrote: > At 20:51 Uhr -0500 30.04.2001, Ryan McGann wrote: >> More than anything, I think OS X in its current incarnation is too >> much of a resource piggy. I have 256MB of RAM and OS X still pages >> quite a bit without Classic open; I could open up Photoshop in OS 9 >> and have it page hardly at all. Once Apple gets the size of the >> frameworks down, people start fine-tuning their code and all the >> memory leaks get plugged, things will get better. Actually, they can >> only get better.... > > I wish that was true. But if it really happened this way, it would be > the first time in Computer history for such a thing to occur, I > believe. :( But I hope your dream comes true anyway. > > > Prepare for the possibility that things don?t get better at all... > unless of course you buy a new G4/1000 with 1 GB ram. Then it might run > at good speed, with few disk trashing (did I mention the RAID array?). > Actually, if memory is really a concern or swapping a problem. Go check out memory prices. Just a quick look at www.pricescan.com, and you can get 256 M DIMMs for as little as $60. A short time ago, I tripled my memory to 768M for just $200. I haven't swapped since. Memory is cheap, so it really isn't the stumbling block. From ryand at softarch.com Fri May 4 11:02:42 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:13 2005 Subject: free-standing main menu Message-ID: <200105041802.LAA06349@omnigroup.com> I found this blurb in the Cocoa Reference online: http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ ObjC_classic/Classes/NSMenu.html A free-standing main menu is displayed on top of all other windows whenever the application is active; the user can move it by dragging its title bar. When a submenu is opened, it appears attached to the right of its supermenu with a title bar, allowing the user to drag it away from its supermenu so that it remains on the screen. A detached submenu displays a close button to allow the user to dismiss it (the main menu, of course, never displays a close button). If the user moves a menu window while a submenu is attached, the submenu follows its supermenu. If a menu window lies partly off-screen, when the user tracks the mouse pointer to the edge of the screen, by holding down the mouse button and dragging the mouse pointer, the menu temporarily shifts onto the screen (along with any attached super- or submenus), allowing the user to access all of its items. We can't really do that can we?? - Ryan From ssudre at intego.com Fri May 4 11:04:54 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:13 2005 Subject: Standard icon+text in NSTableCell In-Reply-To: <200105041743.KAA27407@smtpout.mac.com> Message-ID: <1223122680-31307519@transeo.com> On vendredi, mai 4, 2001, at 07:42 , Tom Waters wrote: > Remember, there is only one dataCell per column. It gets its title set > by the dataSource's tableView:objectValueForTableColumn:row:, but the > image has to be set some other way. > > You need to provide a delegate to the table and provide something like > this: > > - (void)tableView:(NSTableView *)view > willDisplayCell:(id)cell > forTableColumn:(NSTableColumn *)col > row:(int)row > { > if ([col isTheColumnYouWantToSetTheImageOn]) { // provide your > own test here. > [cell setImage: [self theAppropriateImageForThisRow: row]]; > } > } Thanks. It will prevent me from writing a custom view. One of the coolest thing with Cocoa is that there's almost always the code you need. The bad side is that you don't always find the good call before having already writen your own code :-) -- Stephnae From a at blackbox.net Fri May 4 11:11:25 2001 From: a at blackbox.net (Andreas Monitzer) Date: Thu Nov 3 14:46:13 2005 Subject: mailing list woes In-Reply-To: <200105041729.f44HTIV05454@smtp3.san.rr.com> Message-ID: <200105041811.UAA00580@am.homeip.net> On Friday, May 4, 2001, at 07:28 , Daniel Staudigel wrote: > Yes when I send my messages out they come back to me days later, for > example I am sending this at 10:24 PST on 5-4-01 we'll see when you guys > get it... From the received header: Fri, 4 May 2001 10:29:18 -0700 (PDT) Fri, 4 May 2001 10:28:36 -0700 (PDT) Fri, 4 May 2001 10:31:39 -0700 (PDT) Fri, 4 May 2001 19:28:54 +0200 Cool, this mail travelled back in time twice. What special version of Apple Mail are you using? ;-) andy -- Discussion forthcoming. From mlehmann at edv-medien.de Fri May 4 11:11:37 2001 From: mlehmann at edv-medien.de (Markus Lehmann) Date: Thu Nov 3 14:46:13 2005 Subject: NSDrawer visibility References: Message-ID: <3AF2F09F.E74105D6@edv-medien.de> Hi Phillip, I had the same problem, I solved it by overwriting the following NSWindowController method and adding 2 methods to my NSDocument subclass: windowWillShow, windowDidShow. I use windowWillShow to move the window to a special location and windowDidShow to open the drawer. Markus -(IBAction) showWindow:(id)sender { NSWindow *window; id document; if ((window=[self window])!=NULL && (document=[self document])!=NULL) { [document windowWillShow:window]; [super showWindow:sender]; [document windowDidShow]; } } Phillip Mills wrote: > I'd like to have my document window with a drawer, which is open by default > when the window is created. Everything seems to be working except the part > where I get to see the drawer. > > I picked -windowDidLoad as the place to intervene and tell the drawer to > open via an outlet in my window controller that's connected using IB. If I > break in -drawerDidOpen in my drawer's delegate, I see that the open is > going as planned. However, on screen, all I get is the basic window. > > The oddest part is that if I then minimize my window and restore it from the > dock, it appears with the drawer visible. (Resizing before docking it has > no effect.) > > Do I need to be opening the drawer later in the process? ...after the > window is actually displayed? (...and, if so, what hook does the window > controller have for that?) > > _______________________________________________ > 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: mlehmann.vcf Type: text/x-vcard Size: 331 bytes Desc: Card for Markus Lehmann Url : /mailman/archive/macosx-dev/attachments/20010504/b97f05c0/mlehmann.vcf From phillipm at truespectra.com Fri May 4 11:23:59 2001 From: phillipm at truespectra.com (Phillip Mills) Date: Thu Nov 3 14:46:13 2005 Subject: NSDrawer visibility In-Reply-To: <3AF2F09F.E74105D6@edv-medien.de> Message-ID: On 5/4/01 2:10 PM, "Markus Lehmann" wrote: > -(IBAction) showWindow:(id)sender > { > NSWindow *window; > id document; > > if ((window=[self window])!=NULL && (document=[self document])!=NULL) > { > [document windowWillShow:window]; > > [super showWindow:sender]; > > [document windowDidShow]; > } > } Thanks very much. (A major problem with being new to an application framework is not knowing which things should "just work" vs. which require some creativity.) From tom_waters at mac.com Fri May 4 11:34:26 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:13 2005 Subject: Fwd: Your message to MacOSX-dev awaits moderator approval Message-ID: <200105041833.LAA22017@smtpout.mac.com> Is anyone else getting these weird messages every time they post to the list? Begin forwarded message: > From: macosx-dev-admin@omnigroup.com > Date: Fri May 04, 2001 11:15:22 AM US/Pacific > To: tom_waters@mac.com > Subject: Your message to MacOSX-dev awaits moderator approval > > Your mail to 'MacOSX-dev' with the subject > > (no subject) > > Is being held until the list moderator can review it for approval. > > The reason it is being held: > > Message has implicit destination > > Either the message will get posted to the list, or you will receive > notification of the moderator's decision. From kdyke at apple.com Fri May 4 11:54:39 2001 From: kdyke at apple.com (Kenneth Dyke) Date: Thu Nov 3 14:46:13 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: Message-ID: <200105041854.LAA07834@scv3.apple.com> On Friday, May 4, 2001, at 06:33 AM, strobe anarkhos wrote: > I just don't understand why only the root Views are paged to video > memory and not NSClipViews. This ought to speed up scrolling > significantly by only copying what isn't currently visible. > > This is also true with QuickDraw. Scrolling in MacOS will only copy the > offscreen portion which isn't already in video memory. It's clear that > in OS X the entire port is being updated. > > It makes no sense. The whole window is in video memory which is evident > when moving them, but the individual views within it are not considered > in that context when being updated. > > Did the NeXT Dimension have this problem? (assuming anybody looked for > it) The main issue is that the bookeeping involved in figuring out which portions of the video-memory window can be scrolled vs which portions have to be updated is rather complex in light of the fact that you may have other preemptively updating translucent surfaces that happen to be on top of your window. The idea of scrolling both video memory and system memory in sync has been discussed many times, but it's been generally shot down due to the complexity involved in making that bookkeeping work correctly all the time. I believe there are other far more interesting solutions for making it so that the CPU doesn't have to push bits to the screen that would probably alleviate most of your complaints, and would still allow the window compositing stuff to still work correctly. -Ken From a at blackbox.net Fri May 4 12:06:23 2001 From: a at blackbox.net (Andreas Monitzer) Date: Thu Nov 3 14:46:13 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: <200105041854.LAA07834@scv3.apple.com> Message-ID: <200105041906.VAA00631@am.homeip.net> On Friday, May 4, 2001, at 08:54 , Kenneth Dyke wrote: > The main issue is that the bookeeping involved in figuring out which > portions of the video-memory window can be scrolled vs which portions > have to be updated is rather complex in light of the fact that you may > have other preemptively updating translucent surfaces that happen to be > on top of your window. The idea of scrolling both video memory and > system memory in sync has been discussed many times, but it's been > generally shot down due to the complexity involved in making that > bookkeeping work correctly all the time. What about implementing two versions: one optimized and the current one. When there's no translucent window on top of it, use the optimized. Otherwise, use the current one. Just a thought. andy -- Description forthcoming. From clarkcox3 at mac.com Fri May 4 12:11:33 2001 From: clarkcox3 at mac.com (Clark S. Cox III) Date: Thu Nov 3 14:46:13 2005 Subject: Been looking at HID lately...definitely not an Input Sprockets replacement! In-Reply-To: Message-ID: <200105041910.MAA26420@smtpout.mac.com> On Friday, May 4, 2001, at 09:17 , strobe anarkhos wrote: > I don't know what Apple was thinking when they replaced Input Sprockets > with HID, but it was probably the same thing when they replaced QD3D > with OpenGL. > > I have nothing against HID. I think it's an excellent framework for > writing drivers. I plan to write a joystick driver for my ADB > Thrustmaster as soon as Apple releases the joystick class and Griffin > the iMate driver. It's also a good framework for implementing the > global keymapping solution Apple said (errr hinted) they are working > on. However it's not a good framework for application development. It's > too low level! > > It doesn't even have calibration. Each application will have to > implement HID mapping and calibration. This means I'll have to > re-calibrate joysticks for every app using them, like games. And we all > know how some games have completely failed in terms of mapping and > calibration, look at Pod Racer for a good example of how to screw up > big time. > > Each game and emulator will have to be rewritten to use another API and > also write extra code to handle stuff which Input Sprockets handled > automatically. > > I'm not going to suggest that Input Sprockets was all good, but what is > it being replaced with?! It probably wouldn't be all that difficult to re-implement InputSprockets on top of HID (ala Quesa's re-implementation of QD3D on top of OpenGL ). Someone could write it up, and have it export all the same symbols as InputSprockets. Then applications relying on InputSprockets would continue to work with very little (or no) rewrite. Clark S. Cox, III clarkcox3@yahoo.com http://www.whereismyhead.com/clark/ From tom_waters at mac.com Fri May 4 12:18:30 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:13 2005 Subject: dragging enter / exit Message-ID: <200105041918.MAA27373@smtpout.mac.com> I asked earlier about being able to call close from draggingExited, and was given a nice solution here. Of course, that exposed another problem, which I'm not sure how to tackle. I have a NSPanel with an NSView inside of it with a standard sized border. When you drag in and out of the panel and view you get this sequence of calls to the NSDragging protocol methods. panel enter -> panel exit (because we're entering the subview) -> view enter -> view exit -> panel enter -> panel exit. Thus, I had to put in special processing to notice that the first panel exit is really just the drag entering a sub-view, so now when I get the final exit, I can make the window close. Sounds great. Now imagine you move the mouse out of the view and the panel VERY fast. Here's what you get: panel enter -> panel exit -> view enter -> view exit. You never get the panel exit because the mouse "skipped" over the narrow piece of the panel between the view and the outside. Bummer. I'm going to have to have the view exit close its enclosing NSWindow, but this whole thing feels a bit wrong. Thoughts? -tw From jswitte at bloomington.in.us Fri May 4 12:37:16 2001 From: jswitte at bloomington.in.us (Jim Witte) Date: Thu Nov 3 14:46:13 2005 Subject: Dragging to Favorites menu in Finder (was: Application Dockling References: <20010504172647.370AB5DA9@smtp-2.enteract.com> Message-ID: <3AF304EA.BCEEC3D6@bloomington.in.us> > Has anyone created a dockling which simply gives access to all the > "Applications"? It would be capable of navigating in depth of This reminded me of one of my pet peevs (of many) with the X Finder: You can't drag items to the Favorites Menu (unless I'm mistaken). Is there enough stuff open in the APIs to be able to hack up something like MenuDropper or Glidel in X? Jim From jeff_lamarche at peoplesoft.com Fri May 4 12:38:33 2001 From: jeff_lamarche at peoplesoft.com (jeff_lamarche@peoplesoft.com) Date: Thu Nov 3 14:46:13 2005 Subject: WebObjects 4.5.1 Released Message-ID: >And I'd buy it just to get EOF to use in vertical apps - only I'm >suspicious of the licensing agreements (or lack thereof). >The biggest mistake was in letting the WO team own EO. EO is bigger >than WO. Well, not having any real experience with WebObjects, I don't have much of an opinion on this, but since I work developing Enterprise software, I have to admit that I have salivated over EOF since I first read about them in some of the Next documentation, and was really bummed that EOF didn't come on the Developer CD. Cocoa and OS X have the potential to revolutionize the Enterprise Application space, but it looks like we're rolling toward another missed opportunity for Apple in the Enterprise markets. Apple seems to WANT to be excluded from it, and seem also not to realize that a large number of people buy a computer for their home based on what they know from work. >I also see demand for web apps tapering off in the enterprise - apps are making a >comeback. What demand there is is all for EJBs (totally non-functional >architecture but it seems to sell well). Well, my company has thrown most, if not all, of our eggs in the Internet basket, so on one level I hope you're wrong. However, on a more personal level, I actually agree with you (and have argued the point with management and colleagues at times) - I think the reports of the death of regular applications have been greatly exaggerated. Internet Apps are just a new tool - not a panacea for software woes - and just because they're new and trendy doesn't mean they're the best choice for every purpose. Oh, well. If Apple ever stops making decisions that annoy me, I'll start to worry =) From tjw at omnigroup.com Fri May 4 13:59:23 2001 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:46:13 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105030611.XAA15205@smtpout.mac.com> Message-ID: <200105042059.NAA14775@omnigroup.com> You either need to create the thread with the 'detached' attribute or explicitly detach or join the thread. Otherwise, the pthread layer needs to keep the thread around to make sure that you can synchronize with it to collect its return value and/or receive notification that it is dead. In Mac OS X, it appears that pthread_attr_setdetachstate() doesn't actually work (or maybe I'm misunderstanding it), but the pthread_join or pthread_detach approach does reap the threads. I've attached a modified example below. -tim /* cc -Wall -DUSE_PTHREAD_DETACH -o thread thread.c */ #include #include #include #include void *threadFunc(void *data) { return NULL; } int main() { int i; pthread_t aThread; void *returnValue; for(i=0; i<100; i++) { pthread_attr_t attr; pthread_attr_init(&attr); #ifdef USE_PTHREAD_ATTR #warning TJW: This should work, I think, but does not in Mac OS X pthread_attr_setdetachstate(&attr, 1); #endif pthread_create(&aThread, &attr, &threadFunc, NULL); #ifdef USE_PTHREAD_DETACH pthread_detach(aThread); #elif USE_PTHREAD_JOIN pthread_join(aThread, &returnValue); #elif USE_PTHREAD_ATTR // nothing to do here -- it was created as detached #else #error Pick a detach mechanism #endif printf("thread created\n"); sleep(1); } return 0; } From logan.hall at asu.edu Fri May 4 14:17:34 2001 From: logan.hall at asu.edu (Logan Hall) Date: Thu Nov 3 14:46:13 2005 Subject: Compiling sc-6.21 for BSD on OS X References: <200105031304.f43D47dQ005568@texlog2.texas.rr.com> Message-ID: <3AF31D79.1010506@asu.edu> Im rather suprized that OS X doesn't have the unix regex library.... Doesn't BSD have it? Its part of POSIX. Fabien Roy wrote: > You need to compile and intall the gnu regular expression library (regex). > ftp://ftp.keystealth.org/pub/gnu/regex/ > > >> /usr/bin/ld: Undefined symbols: >> _regcmp >> _regex >> > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev -- +--------------------------------------------+ | Logan Hall | | ASU Information Technology | | CPCOM 3N54 | | (480) 965-6070 | | logan.hall@asu.edu | +--------------------------------------------+ From phillipm at truespectra.com Fri May 4 14:29:16 2001 From: phillipm at truespectra.com (Phillip Mills) Date: Thu Nov 3 14:46:13 2005 Subject: Compiling sc-6.21 for BSD on OS X In-Reply-To: <3AF31D79.1010506@asu.edu> Message-ID: It does have regcomp, regexec, ... if that's any help. On 5/4/01 5:22 PM, "Logan Hall" wrote: > Im rather suprized that OS X doesn't have the unix regex library.... > Doesn't BSD have it? Its part of POSIX. > > Fabien Roy wrote: > >> You need to compile and intall the gnu regular expression library (regex). >> ftp://ftp.keystealth.org/pub/gnu/regex/ >> >> >>> /usr/bin/ld: Undefined symbols: >>> _regcmp >>> _regex >>> >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > From kelleysoft at pressenter.com Fri May 4 14:32:41 2001 From: kelleysoft at pressenter.com (Greg Betzel) Date: Thu Nov 3 14:46:13 2005 Subject: Project Idea: Application Dockling In-Reply-To: <200105041711.KAA00987@omnigroup.com> Message-ID: On Friday, May 4, 2001, at 12:11 pm, Ryan Dary wrote: > I currently just put the Applications folder in the dock, however the > nice thing about a dockling is that it can be invoked with a single > click. With the Applications folder, in order to get the menu, I must > click-hold until the popup. It would be nicer to just click and get > the menu quicker. It's almost there. Control-click. > If this has been made I would like to try it, if not, where would i > begin? Is there a sdk? There's a way, but with caveats. Stepwise has an excellent article on this: http://www.stepwise.com/Articles/Technical/2001-03-30.01.html This may be something more for macosx-talk, but Dock folder-menus (that pop up all the folder contents) give me the chills. It's too much like that task bar from a certain PC-based OS. Interestingly, with the Dock you can only go so deep into a folder hierarchy (for an example, drop System into the dock & then follow the menus). At least one can't zigzag across the screen forever in submenus like with that "other" task bar. :) Greg Betzel From RL at alsoft.com Fri May 4 14:34:12 2001 From: RL at alsoft.com (Rusty Little) Date: Thu Nov 3 14:46:13 2005 Subject: [Q] Reply mode strings for CFMessagePort Message-ID: <1223110401-14987340@mail.alsoft.com> Anyone know the valid strings that are passed in the 'replyMode' argument for 'CFMessagePortSendRequest'? I've checked headers, installed documentation, online documentation, etc. I can only find that NULL means 'don't wait'. The CoreFoundation objects are so new there doen't seem to be any documention yet, at least I couldn't find any. I need to know the other reply modes. Thanks and have a great weekend. Rusty From froy at austin.rr.com Fri May 4 15:01:04 2001 From: froy at austin.rr.com (Fabien Roy) Date: Thu Nov 3 14:46:13 2005 Subject: Compiling sc-6.21 for BSD on OS X Message-ID: <1223108811-62205754@Snakefeet.com> The GNU rx (POSIX regular expression lib) just compile and install out of the download. ./configure gnumake (sudo or su) gnumake install > Im rather suprized that OS X doesn't have the unix regex library.... > Doesn't BSD have it? Its part of POSIX. > From moetteli at uni2a.unige.ch Fri May 4 15:05:16 2001 From: moetteli at uni2a.unige.ch (Philip M=?iso-8859-1?q?=F6?=tteli) Date: Thu Nov 3 14:46:13 2005 Subject: How to Get the Default Locale for another Country? Message-ID: <200105041809.f44I5Jp14917@hermes.moetteli.ch> Hi Certain objects like NSScanner or NSCalendarDate use local definitions for parsing and printing. Especially for NSScanner it is usefull to be able to set those defaults manually, when one wants to parse a string, which was created in another location, lets say, in France. Now, in my user defaults, the default language is not French. So I would like to set the locale of my NSScanner to the default French values (NSDecimalPoint...). How can I programmatically have access to such a dictionary of default French values? Thanks Phil ---------------------------------------------------------------------- lic. oec. publ. Philip M?tteli Tel# +41(22)320-3088 c/o Leila Bourahla Fax# +1(425)940-1642 23, Rue Pr?vost-Martin Tel# +41(78)742-9334 CH-1205 Geneva E-Mail: moetteli at mac.com From Halliday at WebWizardry.net Fri May 4 15:15:42 2001 From: Halliday at WebWizardry.net (David W. Halliday) Date: Thu Nov 3 14:46:13 2005 Subject: more mailing list woes (Re: MacOSX-dev digest, Vol 1 #749 - 19 msgs) References: <200105041719.KAA12106@smtpout.mac.com> Message-ID: <3AF32AB6.F34B2F90@WebWizardry.net> Charles C Wells wrote: > Yes! This has been happening to me since I signed on to the list. Multiple > versions of the same digest version, sometimes days apart. > > On Friday, May 4, 2001, at 10:15 , macosx-dev-request@omnigroup.com wrote: > > >> I've got to ask, is anyone else receiving the same message multiple > >> times but days (sometimes a whole lotta days) apart? > >> > >> Chris > Not just to say "me too", but me too. :-) I have noticed four things: 1) Messages delayed by anywhere from a half day to several days; 2) Repeat messages, separated by days (at least some of this does not appear to be attributable to people re-sending, though there is certainly some of that); 3) repeat digest versions, but not always identical (often with different message counts); and 4) some of the delayed messages arrive /after/ I receive one or more replies (suggesting the problem is non-uniform in locality). I have checked some of the "Received:" headers on some of the delayed messages and found that some appear to be delayed going into the list, while others are delayed going out. I have had a few notes back from one or more of the list admins stating that their systems are experiencing high load, and, by implication, that this is causing their troubles. (However, I see much lower message volume on this list than on some of my Apple sponsored lists that use the same list software [though the versions may differ, and the hardware almost certainly differs]. Maybe the problem list is some /other/ Omni sponsored list.) Just my observations. David Halliday@WebWizardry.net From richards9 at mac.com Fri May 4 15:17:12 2001 From: richards9 at mac.com (Richard Schreyer) Date: Thu Nov 3 14:46:13 2005 Subject: Getting the icon of any filetype Message-ID: <200105042213.PAA22394@smtpout.mac.com> I am displaying a file tree with a NSBrowser, and want to display the icon next to the name of the file. Is there any system in place to retrieve the NSImage, or path to a image file for any given file type? I have both the file extension and it's type/creator codes avaiable. Also, in an NSBrowserCell, is there a way to add another text field on the far right of the column? In short, I want it to look like [icon] [filename] [file size] Thanks, Richard Schreyer From stefan.arentz at soze.com Fri May 4 15:18:14 2001 From: stefan.arentz at soze.com (Stefan Arentz) Date: Thu Nov 3 14:46:13 2005 Subject: Selecting a NSTableView's column *header* In-Reply-To: <200105041646.JAA19286@smtpout.mac.com>; from tom_waters@mac.com on Fri, May 04, 2001 at 09:45:10AM -0700 References: <20010504150627.A24984@keyser.soze.com> <200105041646.JAA19286@smtpout.mac.com> Message-ID: <20010505001636.A922@keyser.soze.com> On Fri, May 04, 2001 at 09:45:10AM -0700, Tom Waters wrote: > highlight and select are very related terms for your future searching of > the docs and headers,... > > Put this in your tableview's delegate. > > - (void)tableView:(NSTableView*)tableView > didClickTableColumn:(NSTableColumn *)tableColumn > { > [tableView setHighlightedTableColumn: tableColumn]; > } Ok this works, but is not exactly what I want. Mail.app highlights the selected column head *while* it is sorting and then removes the highlight of the previously selected column. I guess what I want to know is ... how does setHighlightedTableColumn: do it's trick? Stefan From mthomp at mac.com Fri May 4 15:18:23 2001 From: mthomp at mac.com (Michael Thompson) Date: Thu Nov 3 14:46:13 2005 Subject: CoreAudio Questions... Message-ID: <200105042212.PAA22288@smtpout.mac.com> Hello, I finally have the dev tools installed on my 100% unsupported Mac 8500. :-) I have a question about CoreAudio. I see a bunch of examples doing the audio processing inside the IOProc callback. I wonder if someone could post an example of sending a audio stream(buffer) to the callback. What I want to do is handle all of the processing outside the callback, maybe mix multiple streams of processors, then send one stream to the callback. Is this a good thing to do? Thanks, Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 571 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/894f09aa/attachment.bin From ddavidso at apple.com Fri May 4 15:18:45 2001 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:46:13 2005 Subject: [Q] Reply mode strings for CFMessagePort In-Reply-To: <1223110401-14987340@mail.alsoft.com> Message-ID: <200105042218.PAA10371@scv2.apple.com> On Friday, May 4, 2001, at 02:33 PM, Rusty Little wrote: > Anyone know the valid strings that are passed in the 'replyMode' > argument for 'CFMessagePortSendRequest'? This is just a runloop mode. For example, you can use kCFRunLoopDefaultMode if you want other runloop events to continue to be processed while you are waiting for a reply, or you can use a custom mode (i.e., some string of your choice) if you don't. Douglas Davidson From chad at pengar.com Fri May 4 15:21:37 2001 From: chad at pengar.com (Chad Leigh, Pengar Enterprises, Inc & Shire.Net LLC) Date: Thu Nov 3 14:46:13 2005 Subject: Fwd: Your message to MacOSX-dev awaits moderator approval In-Reply-To: <200105041833.LAA22017@smtpout.mac.com> Message-ID: <1158012982.989000491@[192.168.99.123]> yes --On Friday, May 04, 2001 11:33 AM -0700 Tom Waters wrote: > Is anyone else getting these weird messages every time they post to the > list? > > Begin forwarded message: > >> From: macosx-dev-admin@omnigroup.com >> Date: Fri May 04, 2001 11:15:22 AM US/Pacific >> To: tom_waters@mac.com >> Subject: Your message to MacOSX-dev awaits moderator approval >> >> Your mail to 'MacOSX-dev' with the subject >> >> (no subject) >> >> Is being held until the list moderator can review it for approval. >> >> The reason it is being held: >> >> Message has implicit destination >> >> Either the message will get posted to the list, or you will receive >> notification of the moderator's decision. > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > Pengar Enterprises, Inc. and Shire.Net LLC Web and Macintosh Consulting -- full service web hosting Chad Leigh chad@pengar.com chad@shire.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 231 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/916fd80f/attachment.bin From tom_waters at mac.com Fri May 4 15:33:20 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:13 2005 Subject: Selecting a NSTableView's column *header* In-Reply-To: <20010505001636.A922@keyser.soze.com> Message-ID: <200105042232.PAA06464@smtpout.mac.com> My table headers behave *exactly* like Mail.app's... Here's the comments from my method: The the table column header does all the right things with showing the new click, doing the work in this method, then removing the old highlight. I didn't have to do anything special to enable that behavior. There is no trick. - (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn { // check to see if this column was already the selected one and if so invert the sort function. // if there already was a sorted column, remove the indicator image from it. // set the indicator image in the newly selected column. // set the highlighted table column. // set the sort function based on what column was clicked. // deselect all selected rows. // resort the data // reload the data // reapply the selection... } On Friday, May 4, 2001, at 03:16 PM, Stefan Arentz wrote: > On Fri, May 04, 2001 at 09:45:10AM -0700, Tom Waters wrote: >> highlight and select are very related terms for your future searching >> of >> the docs and headers,... >> >> Put this in your tableview's delegate. >> >> - (void)tableView:(NSTableView*)tableView >> didClickTableColumn:(NSTableColumn *)tableColumn >> { >> [tableView setHighlightedTableColumn: tableColumn]; >> } > > Ok this works, but is not exactly what I want. Mail.app highlights the > selected column head *while* it is sorting and then removes the > highlight > of the previously selected column. > > I guess what I want to know is ... how does setHighlightedTableColumn: > do it's trick? > > Stefan > From ryand at softarch.com Fri May 4 15:35:33 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:13 2005 Subject: Your message to MacOSX-dev awaits moderator approval In-Reply-To: Message-ID: <200105042235.PAA21334@omnigroup.com> Yeah, all the time... - Ryan P.S. Probably for this message too! On Friday, May 4, 2001, at 11:33 AM, tom_waters@mac.com wrote: > Is anyone else getting these weird messages every time they post to the > list? > > Begin forwarded message: > >>> From: macosx-dev-admin@omnigroup.com >>> Date: Fri May 04, 2001 11:15:22 AM US/Pacific >>> To: tom_waters@mac.com >>> Subject: Your message to MacOSX-dev awaits moderator approval >>> >>> Your mail to 'MacOSX-dev' with the subject >>> >>> (no subject) >>> >>> Is being held until the list moderator can review it for approval. >>> >>> The reason it is being held: >>> >>> Message has implicit destination >>> >>> Either the message will get posted to the list, or you will receive >>> notification of the moderator's decision. > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From dstaudi at san.rr.com Fri May 4 15:36:25 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:13 2005 Subject: Ob-C indeterminate number of arguments declarations Message-ID: <200105042236.PAA21371@omnigroup.com> How do you declare and implement a method in obj-c (like NSArray's arrayWithObjects:(id)firstObj, ...)? Daniel Staudigel --------------- How to fly: Find a nice big cliff, jump off, and miss the ground! Easy enough! From listmail at cramnotch.com Fri May 4 15:58:38 2001 From: listmail at cramnotch.com (listmail@cramnotch.com) Date: Thu Nov 3 14:46:13 2005 Subject: Autosizing Question... In-Reply-To: <1223108811-62205754@Snakefeet.com> Message-ID: I have been toying around with autosizing a little bit and was wondering... How exact is autosizing? For example, I have 5 square NSViews in a window spaced 1 pixel apart. No matter what, even having setting the appropriate "springiness," I'll still sometimes get a 2 - 4 pixel gap between one view and not another when I resize the window. I do have it set up so that the views resize themselves horizontally. At any rate, I guess what I'm really asking is whether there are some tricks of the trade for autosizing, or whether it's best to programatically set the location of the views if perfect alignment is that important to me. Thanks much! From greg at omnigroup.com Fri May 4 16:01:45 2001 From: greg at omnigroup.com (Greg Titus) Date: Thu Nov 3 14:46:14 2005 Subject: Getting the icon of any filetype In-Reply-To: <200105042213.PAA22394@smtpout.mac.com> Message-ID: <200105042301.QAA22439@omnigroup.com> On Friday, May 4, 2001, at 03:14 PM, Richard Schreyer wrote: > I am displaying a file tree with a NSBrowser, and want to display the > icon next to the name of the file. Is there any system in place to > retrieve the NSImage, or path to a image file for any given file type? > I have both the file extension and it's type/creator codes avaiable. Check out NSWorkspace's -iconForFile: and -iconForFileType: (If you have an actual filename and not just the type, you'll want to use the first method instead of the second because NSWorkspace will give you the custom icon for that particular file if there is one, not always the icon for the type.) > Also, in an NSBrowserCell, is there a way to add another text field on > the far right of the column? In short, I want it to look like > [icon] [filename] [file size] Not without writing your own subclass of NSBrowserCell, no. --Greg -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1020 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010504/95368e8d/attachment.bin From marcel at bresink.de Fri May 4 16:03:26 2001 From: marcel at bresink.de (Marcel Bresink) Date: Thu Nov 3 14:46:14 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200105041716.TAA21229@post.webmailer.de> Message-ID: <200105042255.AAA20629@mayim.bresink.net> > I am confused how they would both be about the same in speed. Do you > mean that the process of trying to discover the priorities (at > run-time) for the processes actually decreases performance to the point > where it is comparable to a scheduler without the optimization process? No, that's not the reason. Note that there a different "speeds" involved here. If you change priorities, there always will be processes that have an advantage at the expense of others. On an interactive workstation like the Mac, a simple strategy of dynamically changing priorities is sufficient: The OS should prioritize the foreground process and the processes doing a lot of I/O operations. What really counts here is how the user perceives speed, which could be expressed as the average response time of the foreground application. A special case are processes that have real-time demands like burning a CD or playing a movie or MP3. Here, you can "guess" in advance that a higher priority might be helpful. But this comes back to your original question: How should the OS detect a multimedia application and how can we prevent abuse of the detection mechanism? > So, what are some examples of applications which would be beneficial to > decrease their own priority? There is no need to change priorities for a general-purpose application. Decreasing priorities makes sense for jobs that put a load of 100 percent on the CPU(s) but are not important for user interaction. Examples are screen savers, offline compression of QuickTime movies, SETI@home, RC5 contest, creating frames for a computer animation, etc. Jobs that don't need user intervention and can run in the background for a long time. Marcel -- Dr. Marcel Bresink, Ringstr. 21, 56630 Kretz, Germany Fon: +49-2632-953150 Fax: -953151 http://www.bresink.de/ From Halliday at WebWizardry.net Fri May 4 16:17:52 2001 From: Halliday at WebWizardry.net (David W. Halliday) Date: Thu Nov 3 14:46:14 2005 Subject: free-standing main menu References: <200105041802.LAA06349@omnigroup.com> Message-ID: <3AF337CB.FF49DD82@WebWizardry.net> Ryan Dary wrote: > I found this blurb in the Cocoa Reference online: > > http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ > ObjC_classic/Classes/NSMenu.html > > A free-standing main menu is displayed on top of all other windows > whenever the application is active; the user can move it by dragging its > title bar. When a submenu is opened, it appears attached to the right of > its supermenu with a title bar, allowing the user to drag it away from > its supermenu so that it remains on the screen. A detached submenu > displays a close button to allow the user to dismiss it (the main menu, > of course, never displays a close button). If the user moves a menu > window while a submenu is attached, the submenu follows its supermenu. > If a menu window lies partly off-screen, when the user tracks the mouse > pointer to the edge of the screen, by holding down the mouse button and > dragging the mouse pointer, the menu temporarily shifts onto the screen > (along with any attached super- or submenus), allowing the user to > access all of its items. > > We can't really do that can we?? > > - Ryan Boy, do I wish! :-) From a user's standpoint, this is one of the things I /really/ liked about NEXTSTEP/OPENSTEP compared to /anything/ else (even the Mac). This works better on multiple monitors, or even really big monitors (the menu is closer to your work). It doesn't take up valuable vertical real-estate (I find that I run out of vertical real-estate far faster than horizontal [though, if I were doing cinematography with something like a 16:9 aspect ratio, I might find the reverse], and both the Mac's menu bar and Windows' menus attached to all windows take up additional valuable vertical real-estate). Furthermore, when I set the default position of all menus to be off screen (I allowed the title bar to peak out over the Trash/Recycler/Black-Hole), and used the second mouse button as the menu button (thus allowing me to pop up a menu right under my mouse any time I wished), I could have menus take up practically no screen real-estate whatsoever while having a menu right at my fingertips anytime I chose. This was practically nirvana. The only advantage I have found for the Mac menu bar is the infinite height of the top-level menu items. However, I find that having a menu pop-up right under my mouse is far faster than trying to hit even these infinitely tall menu items. (Besides, once you open the menu, your right back to the same "hitability". Furthermore, the NeXT menu approach also allowed for top level menu items that were not simply more menus, and, since they extended vertically, rather than horizontal, there could be far more top level choices without crowding [at least on a reasonably large screen].) Just my nostalgic contribution. David Halliday@WebWizardry.net P.S. What message is Apple trying to convey (or what hidden messages is contained) in having this (and all the Objective-C) classes under this "ObjC_classic" directory name? (The Java versions are not under "Java_classic".) Just my paranoia showing, I guess. From mikevannorsdel at qwest.net Fri May 4 16:42:15 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:14 2005 Subject: mailing list woes In-Reply-To: <200105032337.TAA04773@pellns.alleg.edu> Message-ID: <200105042342.QAA23714@omnigroup.com> I am. Sometimes if I post a message, it won't show for days. And when it does show, it show up multiple times (and sometimes over multiple days). This message you just sent was sent on May 3, 5:34PM. I received it on May 4, 5:40PM. Today I also received many duplication messages, but I wasn't paying attention to the dates. On Thursday, May 3, 2001, at 05:34 PM, Chris Behm wrote: > I've got to ask, is anyone else receiving the same message multiple > times but days (sometimes a whole lotta days) apart? > > Chris From lambda at mac.com Fri May 4 17:04:58 2001 From: lambda at mac.com (Brian Campbell) Date: Thu Nov 3 14:46:14 2005 Subject: Drawing into a View Message-ID: <200105050004.RAA16184@smtpout.mac.com> Sorry for the newbie question, but how do I draw into a NSView? The NSView documentation says to subclass NSView and override drawRect, but what commands do I use within drawRect for drawing? For instance, I want to load an image and animate it moving around in the view. How can I do that? The commands in NSGraphics.h don't seem to have anything for displaying an image. Or do I use CoreGraphics, and if so, how do I get the CGContextRef? Thanks, Brian Campbell From harrisonm7 at home.com Fri May 4 17:28:39 2001 From: harrisonm7 at home.com (Mike Harrison) Date: Thu Nov 3 14:46:14 2005 Subject: Mail Preferences dialog - how? Message-ID: <20010505002933.RXUE718.femail4.rdc1.on.home.com@localhost> I've been looking into how Mail.app implements its preferences dialog, and it seems like each of the 6 icons at the top corresponds to a separate nib file. Somehow when you click the buttons it loads the corresponding nib file into the space below the icons. Also, there doesn't seem to be a nib file corresponding to the preferences toolbar at all. Can anyone tell me how they are doing this? I'd like to implement a similar type of prefs dialog. Thanks, Mike harrisonm7@home.com From richards9 at mac.com Fri May 4 17:33:03 2001 From: richards9 at mac.com (Richard Schreyer) Date: Thu Nov 3 14:46:14 2005 Subject: Getting the icon of any filetype In-Reply-To: <200105042301.QAA22439@omnigroup.com> Message-ID: <200105050030.RAA18571@smtpout.mac.com> On Friday, May 4, 2001, at 04:01 PM, Greg Titus wrote: >> I am displaying a file tree with a NSBrowser, and want to display the >> icon next to the name of the file. Is there any system in place to >> retrieve the NSImage, or path to a image file for any given file >> type? I have both the file extension and it's type/creator codes >> avaiable. > > Check out NSWorkspace's -iconForFile: and -iconForFileType: (If you > have an actual filename and not just the type, you'll want to use the > first method instead of the second because NSWorkspace will give you > the custom icon for that particular file if there is one, not always > the icon for the type.) I've run into a few issues with -iconForFileType First of all, when sending a HFS Type code in apostrophes (like 'TEXT') it just returns the generic document icon. Not all of the files I will be dealing with have filename extensions, so if possible, I would like to get this to work with apostrophes. Second, what is the file type that would get me the image of a folder? Thanks, Richard Schreyer From gblock at wanadoo.fr Fri May 4 18:15:37 2001 From: gblock at wanadoo.fr (Gregory Block) Date: Thu Nov 3 14:46:14 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <3af2cdc63b0a9ebf@camelia.wanadoo.fr> (added by camelia.wanadoo.fr) Message-ID: On Friday, May 4, 2001, at 04:41 , Ryan Dary wrote: > I am somewhat fearful of app designers being able to define or request > priority in the scheduler. What about those Of course, if I were writing SETI, and *didn't* set it up as a lowest-priority task in the scheduler, my users would rip my head off and pee on what's left. Or if I'm writing a multithreaded application where I know I want certain operations to take place at a lower priority than the user's own actions, I can do so easily. There are good reasons to use it. > boneheads that might make their app appear to be so important that the > rest of the computer is sluggish. Of course someone could say, quit > using that app, but I don't think that is my point. > > Isn't there some way or some algorithm to determine the needs of the > application? That would be ideal right? I don't know, I just hate to > see what could happen to our preemptive multitasking environment if > abused. If abused, at absolute worst, the kernel would still be given back the CPU long enough to allow someone to do something about that runaway process. Schedulers often assure that every task gets some CPU, regardless of its priority to ensure that stuff like this is solvable. So no matter what happens, it may be sluggish, but in theory, you can regain control. The best thing about preemptive multitasking isn't the preempting on friendly tasks, it's the preempting on the unfriendly ones. Yes, someone probably should try to figure out what Apple's goals are, as far as the kernel's scheduling behavior, and write up some tests that tell us all how far off the mark we currently are - but in all honesty, even a bad preemptive scheduler is going to be thousands of times better than a coop system if it allows basic prioritization and priority inversion on I/O. It's a good thing. It may be scary and appear, for now, to be hideously techie, but it's a good thing. Believe that first. Given a good foundation, you can make something easy to use. Let's get that foundation, shall we? :plur, Greg From uli at ritual.org Fri May 4 18:19:47 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:14 2005 Subject: free-standing main menu In-Reply-To: <200105041802.LAA06349@omnigroup.com> Message-ID: <200105050118.f451IiM05844@ritual.org> Am Freitag, 4. Mai 2001 um 20:02 schrieb Ryan Dary: > I found this blurb in the Cocoa Reference online: > > http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ > ObjC_classic/Classes/NSMenu.html > > A free-standing main menu is displayed on top of all other windows > whenever the application is active; the user can move it by > dragging its title bar. When a submenu is opened, it appears > attached to the right of its supermenu with a title bar, allowing > the user to drag it away from its supermenu so that it remains on > the screen. A detached submenu displays a close button to allow > the user to dismiss it (the main menu, of course, never displays a > close button). If the user moves a menu window while a submenu is > attached, the submenu follows its supermenu. If a menu window lies > partly off-screen, when the user tracks the mouse pointer to the > edge of the screen, by holding down the mouse button and dragging > the mouse pointer, the menu temporarily shifts onto the screen > (along with any attached super- or submenus), allowing the user to > access all of its items. That's the way menus worked in NEXTSTEP. > We can't really do that can we?? No, we're Mac OS X, and Mac OS X tries hard to be different from NEXTSTEP :-/ Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From gblock at wanadoo.fr Fri May 4 18:25:14 2001 From: gblock at wanadoo.fr (Gregory Block) Date: Thu Nov 3 14:46:14 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200105041716.KAA01773@omnigroup.com> Message-ID: On Friday, May 4, 2001, at 06:16 , Ryan Dary wrote: > I am confused how they would both be about the same in speed. Do you > mean that the process of trying to discover the priorities (at > run-time) for the processes actually decreases performance to the point > where it is comparable to a scheduler without the optimization process? Scheduling happens often. Really often. Complex schedulers build tables every now and then to keep track of how much it should skew what's going on; but those calculations are often expensive enough that you've wasted valuable CPU time that could have been given to another task. > So, what are some examples of applications which would be beneficial to > decrease their own priority? And would this be something discussed > (future versions) in the Aqua Interface guidelines so that developers > can adjust this in their apps? Really, any non-UI task should be lowered in comparison to the UI task if it's not I/O bound. Things that are disk-bound, for example, are going to get priority inverted around and played with by the long seek times regardless, so they're not likely to do the user irreparable damage. Spawning a thread to load a file is probably a waste. Spawning a thread to put a watermark on that image is a good idea, however. Spawning a thread to raytrace. Or to render some PostScript. Anything that uses lots of CPU that might cause the user's experience to be reduced, where the action being taken is reversible or non-modal. It insures that "interactive" tasks have priority over "non-interactive" or "batch" tasks. Lowest priority goes to batch scheduling, screensavers, your SETI clients. Highest priorities go to UI handling and application main loops. > Of course you can't speak for what will or won't be put into the HIG, > however I simply mean to ask if you (or anyone) believes that this > would be published so that developers could take this into > consideration when building their applications. Most of it's common sense, and well documented, so I imagine that the HIG will be very clear on how this should work. There's obviously some gray area around the exact figures, but the principle at least can be explained in depth. :plur, Greg From uli at ritual.org Fri May 4 18:44:35 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:14 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: <20010504142106.HSNP24212.mail1.rdc2.bc.home.com@locutus> Message-ID: <200105050144.f451iQM06005@ritual.org> Am Freitag, 4. Mai 2001 um 16:21 schrieb Graeme Hiebert: > On Tuesday, May 1, 2001, at 08:57 PM, Uli Zappe wrote: > >> I want to point out that according to Apple's new standards (as >> described on page 163 of the current version of >> SystemOverview.pdf), supplementary files for an application >> belong into ~/Library/Application Support. This is a very >> reasonable rule. > > Thanks for the tip. Is there a #define or something somewhere, so > that I don't have to hardcode "Application Support" into my > application? No, it's not. If it were, it should be in /usr/include/NSSystemDirectories.h, but this file contains only absolute paths, no user specific ones. For now, I'd use my own #define. Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From tdpaust at chorus.net Fri May 4 19:25:03 2001 From: tdpaust at chorus.net (Timothy Paustian) Date: Thu Nov 3 14:46:14 2005 Subject: Playing with NSBitMapImageRep - rephrased. In-Reply-To: References: <20010502192700.18932.qmail@cs.nwu.edu> Message-ID: OK, that first post was a bit too verbose. Let me distill it down to the core issue. How do I get the value of each pixel of an image. Here is what I thought I could do.... unsigned char *bitmapPointer=[bitmap bitmapData]; unsigned char *pixelPointer = bitmapPointer + bytesPerRow; int sum = *pixelPointer; My thinking is that this code will read the value of the pixel that pixelPointer points to and assign it to sum. These values should be in the range of 0-255. When I do this all I get is 255, never anything else. Any help is appreciated. -- Cheers, Tim Timothy Paustian UW-Madison, Bacteriology From jba at bullex.de Fri May 4 19:48:12 2001 From: jba at bullex.de (Jens Baumeister) Date: Thu Nov 3 14:46:14 2005 Subject: mailing list woes Message-ID: > -----Original Message----- > From: Chris Behm [mailto:cjbehm@mail.com] > > > I've got to ask, is anyone else receiving the same message multiple > times but days (sometimes a whole lotta days) apart? Not only that - according to the headers, your mail - for example - seems to have spent about 12 hrs in purgatory at Omni before it got sent out to me. (Got in at 4pm PDT, got out at 5am PDT.) Some of the replies arrived before the mail itself. I guess the listbot is a) malconfigured, b)underpowered or c) developing its own AI and reading up on this list. :) Did anyone tell our list mom about it already? _____________________________________ Jens Baumeister Bullex GmbH, Cologne, Germany She sells c-shells by the sea shore. From imacman287 at jacksonville.net Fri May 4 20:24:05 2001 From: imacman287 at jacksonville.net (imacman287@jacksonville.net) Date: Thu Nov 3 14:46:14 2005 Subject: What should I do? Message-ID: <200105050324.f453Nx516821@duval.se.mediaone.net> Ok, I want to make something that allows a user to arrange graphics (at 20% of their size, created on the fly) In a way similar to PowerPoint. What is the easiest and most flexible way of doing this? Does anyone have any helpful advice or a link to a good tutorial? Thank You, Justin Haynes From siracusa at mindspring.com Fri May 4 20:39:09 2001 From: siracusa at mindspring.com (John Siracusa) Date: Thu Nov 3 14:46:14 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: <200105041854.LAA07834@scv3.apple.com> Message-ID: On 5/4/01 2:54 PM, Kenneth Dyke wrote: > On Friday, May 4, 2001, at 06:33 AM, strobe anarkhos wrote: >> I just don't understand why only the root Views are paged to video >> memory and not NSClipViews. This ought to speed up scrolling >> significantly by only copying what isn't currently visible. [snip] > The main issue is that the bookeeping involved in figuring out which > portions of the video-memory window can be scrolled vs which portions > have to be updated is rather complex in light of the fact that you may > have other preemptively updating translucent surfaces that happen to be > on top of your window. The idea of scrolling both video memory and > system memory in sync has been discussed many times, but it's been > generally shot down due to the complexity involved in making that > bookkeeping work correctly all the time. > > I believe there are other far more interesting solutions for making it > so that the CPU doesn't have to push bits to the screen that would > probably alleviate most of your complaints, and would still allow the > window compositing stuff to still work correctly. Looks like the portion of you message where you list the alternative solutions got truncated during delivery... ;) I'm guessing that wholesale offload of all compositing operations to a capable GPU solves the problem, but I'm also guessing that that's not possible with shipping hardware (e.g. Rage 128, Radeon, GeForce2 MX). If that's the case, then what "more interesting solutions" are possible? -John From tom_waters at mac.com Fri May 4 21:13:02 2001 From: tom_waters at mac.com (Tom Waters) Date: Thu Nov 3 14:46:14 2005 Subject: NSWorkspace iconForFile Message-ID: <200105050412.VAA07032@smtpout.mac.com> Do NSImages have any facility for representing multiple sizes of an image? I am using NSWorkspace iconForFile to extract the icon image from files, and the image that gets returned is 32x32, but I need to render it at 16x16, so I end up copying it and scaling it down to 16x16 with setSize. Unfortunately this takes a loonnng time, and most icon editors I've seen, and .icns files tend to have many sizes embedded in them. Is it possible to ask for the pre-scaled 16x16 sized icon using NSWorkspace? Or is there a CF function that will do it? Thanks. -tw From contact at nickshanks.com Fri May 4 21:46:21 2001 From: contact at nickshanks.com (Nicholas Shanks) Date: Thu Nov 3 14:46:14 2005 Subject: Possible AppKit bug? Message-ID: > sorry if this is a re-post, but I sent it two days ago and it hasn't shown up yet :/ I'm new to cocoa, but implement the following code in my application delegate and it doesn't work right: - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { return YES; } - (void)applicationWillTerminate:(NSNotification *)notification { // this doesn't seem to be called when last window closed } When I choose Command-Q, my app-will-terminate routine gets called, when I click the close box of my only window, it does not. The application does however terminate correctly. Also, could someone tell me the difference between a delegate and a controller? Nicholas Shanks -- ICQ: 55542254 From dstaudi at san.rr.com Fri May 4 21:47:19 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:14 2005 Subject: AltiVec In-Reply-To: <20010502235926.DBAW11650.femail5.sdc1.sfba.home.com@localhost> Message-ID: <200105050447.VAA02956@omnigroup.com> I believe that the "optimization" pulldown menu in the application settings tab of "edit current target" under the project menu will do just that, although I am not sure, anyway, it gives faster programs and smaller files, so it's gotta be good! On Wednesday, May 2, 2001, at 04:59 PM, David Shaffer wrote: > are there any scientific frameworks that have been AltiVec-ized? > things like fft, ifft, etc? > > are there any options that can be given to ProjectBuilder to add > AltiVec optimization to an app /framework? > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > Daniel Staudigel --------------- How to fly: Find a nice big cliff, jump off, and miss the ground! Easy enough! From mikevannorsdel at qwest.net Fri May 4 22:21:45 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:14 2005 Subject: How to know a process has finished In-Reply-To: <200105022200.PAA25358@omnigroup.com> Message-ID: <200105050521.WAA03854@omnigroup.com> I second this question. There are times I need to run AuthorizationExecuteWithPrivileges() a couple of times, one after the other. Since I can't wait for the task to finish, the second task will usually fail (because it relies on the completion of the first). I looked through the Security Framework headers and didn't see anything. Any ideas? On Wednesday, May 2, 2001, at 04:00 PM, Ryan Dary wrote: > I am using the Security.framework to launch a tool with admin > priveliges, however I am wondering how to determine a couple things. > > Does the "AuthorizationExecuteWithPrivileges" function return > immediately or after the execution is completed? > > If it returns immediately then how does one know when it completes? > Also, is there any control over it as far as interrupting it or force > quitting it? > > -- Ryan From chrisd at plaidworld.com Fri May 4 23:04:06 2001 From: chrisd at plaidworld.com (Chris Dillman) Date: Thu Nov 3 14:46:14 2005 Subject: Drag/Drop on to running app icon in dock, How? Message-ID: Drag/Drop on to running app icon in dock, How? I have DD working into the apps window and also it works onto the apps icon in the finder. Now I am just missing DD on the app in the Dock. What do I need to do? -- =========================================================== Technical Editor for http://www.idevgames.com Support Programmer for http://www.desoftware.com Owner, Plaid World Studios, http://www.plaidworld.com Software Engineer for http://www.riskwise.com, Part of LexisNexis A one-question geek test. If you get the joke, you're a geek: Seen on a California license plate on a VW Beetle: "FEATURE" ============================================================ From dstaudi at san.rr.com Fri May 4 23:26:36 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:14 2005 Subject: NSConnection Example Message-ID: <200105050626.XAA05568@omnigroup.com> A while back I posted a question having to do with terminating a thread remotely. I solved this mystery. For anyone interested in example code having to do with this specific problem, or NSConnections in general, check out my website, http://homepage.mac.com/dstaudigel . It will be up in about at about 11:45 PST, I just gotta add comments and a read me... Daniel Staudigel --------------- How to fly: Find a nice big cliff, jump off, and miss the ground! Easy enough! From dstaudi at san.rr.com Fri May 4 23:34:46 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:14 2005 Subject: Force Quit Window versus Same size window Message-ID: <200105050634.XAA05761@omnigroup.com> Why is it that the force quit window moves much better than any other window? Is it because it is not double-buffered, because it cannot be covered? or is it just optimized... Daniel Staudigel --------------- How to fly: Find a nice big cliff, jump off, and miss the ground! Easy enough! From jerome.laurens at u-bourgogne.fr Fri May 4 23:52:39 2001 From: jerome.laurens at u-bourgogne.fr (laurens) Date: Thu Nov 3 14:46:14 2005 Subject: How to reveal a file/directory in finder... In-Reply-To: <200105022200.PAA25358@omnigroup.com> Message-ID: in objC cocoa ? TIA LAURENS Jerome Analyse Appliquee & Optimisation tel : (+33) (0)3 80 39 58 76 9 Avenue Alain Savary fax : (+33) (0)3 80 39 58 90 BP 47870 courriel : laurens@u-bourgogne.fr F-21078 DIJON Cedex From jerome.laurens at u-bourgogne.fr Sat May 5 00:02:55 2001 From: jerome.laurens at u-bourgogne.fr (laurens) Date: Thu Nov 3 14:46:14 2005 Subject: Font problem in NSButton In-Reply-To: <200105022200.PAA25358@omnigroup.com> Message-ID: Hi How to change the font of the button title ? There are no issues in the inspector panel (?). The only way I found is not complete: select the button title and choose the font parameters in the font panel. It works well for the size but not for the shape. Apparently, the button only accepts some prefered fonts, for example it does not accept the webding font. Did I miss something? May be I am reduced to set the font programmatically. My original problem is to recover in cocoa the rounded back button (with a left arrow and two dots) of the finder and sherlock. TIA LAURENS Jerome Analyse Appliquee & Optimisation tel : (+33) (0)3 80 39 58 76 9 Avenue Alain Savary fax : (+33) (0)3 80 39 58 90 BP 47870 courriel : laurens@u-bourgogne.fr F-21078 DIJON Cedex From jason at publicus.lcma.com.au Sat May 5 01:07:10 2001 From: jason at publicus.lcma.com.au (Jason Engelman) Date: Thu Nov 3 14:46:14 2005 Subject: Omniframeworks on OS 4.2 & NT In-Reply-To: <200105042145.OAA04845@outbox.omnigroup.com> Message-ID: I can compile the omnibase framework work but when I try the omnifoundation get errors saying extern void method missing ; Has anyone have problems compiling this up on os 4.2 or nt.. It works on mac os x..! Plz help!! From anarkhos at mac.com Sat May 5 02:23:54 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:14 2005 Subject: macosx-dev list server screwing up bad Message-ID: I'm receiving lots of errors and messages with malformed headers from this server. All the emails I have sent have topic and the server is complaining they don't From anarkhos at mac.com Sat May 5 02:24:05 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:14 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: <200105041906.VAA00631@am.homeip.net> References: <200105041906.VAA00631@am.homeip.net> Message-ID: > >What about implementing two versions: one optimized and the current one. When there's no translucent window on top of it, use the optimized. Otherwise, use the current one. > >Just a thought. That was my point. When I talk about acceleration I'm obviously talking about opaque surfaces which are already in video memory which means they are already unobscured. This is not a composition issue, it's how surfaces are being partitioned and updated. If I move a surface I don't have the same penalty as when I update the entire surface, however there is some sacred unwritten rule about having one surface per window so you only have the option of updating a portion of a surface instead of either having a window which has multiple surfaces or a different method to update the window surface. From anarkhos at mac.com Sat May 5 02:33:17 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:14 2005 Subject: Been looking at HID lately...definitely not an Input Sprockets replacement! Message-ID: >> >>I'm not going to suggest that Input Sprockets was all good, but what is it being replaced with?! > > It probably wouldn't be all that difficult to re-implement InputSprockets on top of HID (ala Quesa's re-implementation of QD3D on top of OpenGL ). Someone could write it up, and have it export all the same symbols as InputSprockets. Then applications relying on InputSprockets would continue to work with very little (or no) rewrite. I've considered this but: a) How many commercial titles used IP anyway? Without such sponsors the project may have not enough "free time" among those interested to get going. Plus it's more of a user concern than a developer one. I don't think developers care much if a user has to re-calibrate his joystick for every app and also learn new keymapping interfaces. b) Is legacy code the issue, or merely the fact that a decent replacement isn't available. Perhaps something better could be made. Perhaps with force feedback support. c) How could I reach enough of the developers who are potentially interested? I guess emulation.net may be a good start |-\ Seems like another case where I'm pissed that Apple didn't release the source after the axe (haunted memories of OpenDoc, QD3D, GX, etc.). I mean Input Sprockets weren't THAT bad, it could have been improved |-\ From contact at nickshanks.com Sat May 5 03:31:35 2001 From: contact at nickshanks.com (Nicholas Shanks) Date: Thu Nov 3 14:46:14 2005 Subject: Pausing an NSTask? In-Reply-To: <200105041714.KAA36442@idiom.com> Message-ID: John C. Randolph said: > > Suppose I have something time-consuming going on in an NSTask, and I'd > like to do the moral equivalent of sending it a control-Z from a shell. > > I see that NSTask has a "description forthcoming" -interrupt method that > sends a SIGINT, but I don't see any obvious way to suspend and restart. > > Can anyone suggest how I might go about this? Look at the header files, never the documentation. There is a suspend and a resume method available. Nicholas Shanks -- Chases Ed Voas (with scissors) From joar at mtvspider.com Sat May 5 06:23:27 2001 From: joar at mtvspider.com (j o a r) Date: Thu Nov 3 14:46:14 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200105041323.f44DNnU10758@earth.phy.uc.edu> Message-ID: On fredag, maj 4, 2001, at 03:23 , Andrew Pinski wrote: >>>> On OS X, this definitely isn't the case. All apps have the same >>>> priority by default. This is sort of the opposite of preemptive. >>> This is a flaw in the kernel; one which has already been rectified. >> I didn't think that this had been implemented in Darwin yet. I haven't >> payed much attention to darwin-dev of late though. Are you certain >> this >> has been implemented? I would be quite interested in this capability >> and there are already some UNIX based tools to utilize it available >> (nice which comes with OSX GM). > That least acrounding to the Apple Developers it has been fixed in 128 > of the kernel (124 is in Mac OS X 10.0.2). Scott, you'll compile and package a replacement kernel of this version for download on Stepwise, right? ;) j o a r From nemesys at cox.rr.com Sat May 5 06:47:30 2001 From: nemesys at cox.rr.com (Laurent Daudelin) Date: Thu Nov 3 14:46:14 2005 Subject: memory leaks and undoManager In-Reply-To: <200105030223.TAA08280@omnigroup.com> Message-ID: on 02/05/01 22:22, Hongping Lim at hongping@visto.com wrote: > Do I need to removeAllObjects before I release a NSArray? What other memory > leaks should I take note of? No, you shouldn't have to removeAllObjects before releasing it. If you retain or copy an object an don't release it when you're done, you might see memory usage increases. -Laurent. -- ============================================================ Laurent Daudelin Logiciels Nemesys Software mailto:nemesys@cox.rr.com From nemesys at cox.rr.com Sat May 5 06:49:05 2001 From: nemesys at cox.rr.com (Laurent Daudelin) Date: Thu Nov 3 14:46:14 2005 Subject: Posting problems In-Reply-To: <200105032246.PAA21680@omnigroup.com> Message-ID: on 03/05/01 18:46, Mike Vannorsdel at mikevannorsdel@qwest.net wrote: > I've been having posting problems and am curious if anyone else is > affected. Sometimes I'll send a post to the list and it never seems to > get posted. And sometimes I'll get multiple copies of posts from the > past couple of days. Sometimes I send a post and it won't show up on > the list for a few days. I can actually see my post on the archive but > it's not for a few days later until it gets mailed out, at least to me. > Anyone else having these problems or is it just me? Thanks. Same here. To various OmniGroup lists. Seems like the post never get through, then, sometimes after a few hours, my message appears on the list. Or I will receive very few messages from the list, and later, at some point, I've got a bunch of them all of a sudden. -Laurent. -- ============================================================ Laurent Daudelin Logiciels Nemesys Software mailto:nemesys@cox.rr.com From epeyton at epicware.com Sat May 5 07:12:54 2001 From: epeyton at epicware.com (Eric Peyton) Date: Thu Nov 3 14:46:14 2005 Subject: How can I get the name of the computer ? In-Reply-To: Message-ID: <20010505141247.7D68A62C1@smtp-1.enteract.com> Yes, look at the documentation on CFDictionary. Eric On Thursday, May 3, 2001, at 04:58 AM, Martin Bestmann wrote: > At 2:40 Uhr -0700 23.04.2001, Kurt Revis wrote: >> [[NSDictionary >> dictionaryWithContentsOfFile:@"/var/db/SystemConfiguration/preferences.xml" >> ] valueForKeyPath:@"System.System.ComputerName"]; > > Is there also a non ObjC way (e.g. C/C++) of doing the above line > in one single statement? > > Martin > -- > _________________________________________________________________________ > Martin Bestmann Netopia Development GmbH > Phone: +49-9134-9942-0 Weingasse 26 > Fax: +49-9134-997911 91077 Neunkirchen > am Brand > e-mail:martin@no.netopia.com Germany > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From listmail at cramnotch.com Sat May 5 09:10:19 2001 From: listmail at cramnotch.com (listmail@cramnotch.com) Date: Thu Nov 3 14:46:14 2005 Subject: CoreGraphics Text... In-Reply-To: Message-ID: Does anyone have a dead simple example of how to draw text using CoreGraphics? I've puttered around with most of the text related functions in one way or another but haven't as yet actually drawn a character! =) Thanks! From richards9 at mac.com Sat May 5 10:16:06 2001 From: richards9 at mac.com (Richard Schreyer) Date: Thu Nov 3 14:46:14 2005 Subject: Subclassing NSBrowserCell In-Reply-To: <200105050611.XAA18390@buttercup.raftis.net> Message-ID: <200105051715.KAA09707@smtpout.mac.com> On Friday, May 4, 2001, at 11:11 PM, Alex Raftis wrote: >> Also, in an NSBrowserCell, is there a way to add another text field on >> the far right of the column? In short, I want it to look like >> [icon] [filename] [file size] > > If you want to display columns of data, then use a table view. It's > less pain. If you really want to display all three of those pieces of > data, you'll want to make a subclass of NSBrowserCell, since by > default, NSBrowserCell will only display the icon and filename, > assuming you want the file sizes lined up. It looks like a custom NSBrowserCell subclass will be necessary, because I am creating a sort of Finder-like column view, with the file icon, name, but then adding the size of the file of number of contained items on the far right. I've had to do something like this before, so I guess it's really time to figure out how to do it. I've looked at the Fire source code, and I have the same issue that someone else brought up a few days ago, dealing with the highlighting behavior. Other than that, it sounds fairly easy, first ~20 pixels for the icon, last ~20 for the size, and everything else between them goes to the filename. I'm just worried about the proper highlighting or other issues that would come up witha custom view. The Fire source actually draws directly to the screen with calls like [[string string] drawInRect:stringRect withAttributes:nil]. I don't know if that is the preferred method, or it would be better to try and fill the cell view area with a NSImage and a pair of NSTextViews. (would that even work, or prevent the selection problem?) Any thoughts? Richard Schryer From izidor.jerebic at tari.si Sat May 5 10:17:26 2001 From: izidor.jerebic at tari.si (Izidor Jerebic) Date: Thu Nov 3 14:46:14 2005 Subject: lost in Scroller, ScrollView, ... Message-ID: <17171182323153@ikar.s5.net> On Friday, May 4, 2001, at 03:31 PM, stephan@arboretum.com wrote: > Hello, > > I'd like to change the standard scroller in a scrollview to insert a > button between the scroller and the bottom right corner. Look in /Developer/Examples/AppKit/TextEdit. There is a class ScalingScrollView in textEdit project, which does exactly this (inserts a zoom popup button). You can see what it looks like in TextEdit if you select Format->WrapToPage in its main menu. izidor From izidor.jerebic at tari.si Sat May 5 10:17:36 2001 From: izidor.jerebic at tari.si (Izidor Jerebic) Date: Thu Nov 3 14:46:14 2005 Subject: lost in Scroller, ScrollView, ... In-Reply-To: Message-ID: <17171352623157@ikar.s5.net> On Friday, May 4, 2001, at 03:31 PM, stephan@arboretum.com wrote: > Hello, > > I'd like to change the standard scroller in a scrollview to insert a > button between the scroller and the bottom right corner. Look in /Developer/Examples/AppKit/TextEdit. There is a class ScalingScrollView in textEdit project, which does exactly this (inserts a zoom popup button). You can see what it looks like in TextEdit if you select Format->WrapToPage in its main menu. izidor From jswitte at bloomington.in.us Sat May 5 10:32:53 2001 From: jswitte at bloomington.in.us (Jim Witte) Date: Thu Nov 3 14:46:14 2005 Subject: OT: Revere-engineering file formats and compaibility Message-ID: <3AF43944.CA88F255@bloomington.in.us> When, say, Apple wants to make Appleworks be able to read M$ files, how do they do it? Do they reverse-engineer the M$ file format, or does M$ have programs by which you can license their proprietary formats for compatibility reasons? I remember a discuss somewhere (Slashdot I think) saying that if UCITA goes through, reverse-engineering would become enforceably illegal, which could do grave danger to the idea of cross-app compatibility, especially if M$ decided then to charge anyone who wanted the format $10000 or something for it.. Jim From guenter.obiltschnig at cpointc.com Sat May 5 11:05:07 2001 From: guenter.obiltschnig at cpointc.com (Guenter Obiltschnig) Date: Thu Nov 3 14:46:14 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105030611.XAA15205@smtpout.mac.com> Message-ID: <200105051804.UAA22923@mail.net4you.net> Hi! What you observe is normal pthreads behaviour. Posix threads, unless created in detached state, stay around until you join them by calling pthread_join(). So to get rid of threads when they have finished you must either a) create the thread in detached state (using thread attributes, see pthread.h) b) call pthread_detach() at some point, or c) call pthread_join() Best regards, Guenter On Donnerstag, Mai 3, 2001, at 08:14 , Raphael Sebbe wrote: > The threads are used for some async processing, and I do need > to create one quite often (although there is only one of those > thread running at any given time). So if it were recycling the > first, it wouldn't create a new one each time... > > If by "dead" threads you mean threads that have returned from > their function, I get more than 1 dead thread, I get tens of > them... Those are never reused. > > Looking at top when running this program tells that, at any > given time, the thread count is i, instead of 1. > [snip] Guenter Obiltschnig Lead Software Engineer/Consultant CenterPoint - Connective Software Engineering GmbH http://www.cpointc.com From mwatson at apple.com Sat May 5 11:14:41 2001 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:46:14 2005 Subject: Pausing an NSTask? In-Reply-To: <200105041714.KAA36442@idiom.com> Message-ID: <200105051814.LAA07185@scv1.apple.com> kill([aTask processIdentifier], SIGSTOP). matt. On Friday, May 4, 2001, at 10:13 AM, John C. Randolph wrote: > > Suppose I have something time-consuming going on in an NSTask, and I'd > like to do the moral equivalent of sending it a control-Z from a shell. > > I see that NSTask has a "description forthcoming" -interrupt method > that sends a SIGINT, but I don't see any obvious way to suspend and > restart. > > Can anyone suggest how I might go about this? > > advTHANKSance, > > -jcr > > For every complex problem there is an answer that is clear, simple, and > wrong. -- H L Mencken > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From joar at mtvspider.com Sat May 5 11:29:12 2001 From: joar at mtvspider.com (j o a r) Date: Thu Nov 3 14:46:14 2005 Subject: Distributed Object docs/tutes/code? In-Reply-To: <1010503173431.15b62074.93c598f6.ASIP6.2.1.240732@io.psy.herts.ac.uk> Message-ID: On torsdag, maj 3, 2001, at 06:31 , Ken Tabb wrote: > does anyone know of any Distributed Objects docs (even just a "getting > started in DO")? I've looked in the dev docs ('forthcoming'), StepWise, > CocoDevCentral and in the AppKit and FoundationKit docs, and can't find > anything which looks obvious, besides NSSocketPort and NSPortNameServer > etc. (which seem to be saying "DO uses these but you should rarely need > to touch them yourself"). Apple have some sample code, "SimpleThreads" and "TrivialThreads" at developer.apple.com - perhaps more? There is also at least one example from Chris Kane at Apple - search the list archives for "DO over TCP" Regards, j o a r From shawn at freetimesw.com Sat May 5 11:32:16 2001 From: shawn at freetimesw.com (Shawn Erickson) Date: Thu Nov 3 14:46:14 2005 Subject: AltiVec In-Reply-To: <20010502235926.DBAW11650.femail5.sdc1.sfba.home.com@localhost> Message-ID: <20010505183210.DF55B1453C3@beach.silcom.com> On Wednesday, May 2, 2001, at 04:59 PM, David Shaffer wrote: > are there any scientific frameworks that have been AltiVec-ized? > things like fft, ifft, etc? Mostly Mac OS 9 style libs (not frameworks) but it maybe helpful to you. http://developer.apple.com/hardware/ve/vector_libraries.html From chaoswerks at earthlink.net Sat May 5 14:14:29 2001 From: chaoswerks at earthlink.net (David P Henderson) Date: Thu Nov 3 14:46:14 2005 Subject: Possible bug in Cocoa? In-Reply-To: Message-ID: <200105052114.OAA12332@harrier.mail.pas.earthlink.net> On Thursday, May 3, 2001, at 09:21 , Nicholas Shanks wrote: > I'm new to cocoa, but implement the following code in my application > deligate and it doesn't work right: > > > - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication > *)theApplication > { > return YES; > } > > - (void)applicationWillTerminate:(NSNotification *)notification > { > // this doesn't seem to be called when last window closed > } > > > When I choose Command-Q, my app-will-terminate routine gets called, > when I > click the close box of my only window, it does not. The application > terminates properly. > I wrote a simple app and a simple multi-doc app that tests this I get the correct behavior in both, applicationWillTerminate gets messaged in both. Are you positive that applicationWillTerminate doesn't get called? > Also, could someone tell me the difference between a delegate and a > controller? > A delegate is an object which allows you alter the behavior of a class without subclassing by implementing certain methods which rely on notifications posted by the delegating object. While a controller is an object which coordinates messaging between the model object(s) and the view object(s). Dave -- Chaos Assembly Werks "The Trend over the last 20 years or so has been to design computer languages that enforce a state of paranoia. You're expected to program every module as if it were in a state of siege ? In Perl culture, by contrast, you're expected to stay out of someone's home because you weren't invited in, not because there are bars on the windows." from Programming Perl From Halliday at WebWizardry.net Sat May 5 14:50:01 2001 From: Halliday at WebWizardry.net (David W. Halliday) Date: Thu Nov 3 14:46:14 2005 Subject: mailing list woes References: <200105032337.TAA04773@pellns.alleg.edu> Message-ID: <3AF4760D.2BFA7707@WebWizardry.net> Chris Behm wrote: > I've got to ask, is anyone else receiving the same message multiple > times but days (sometimes a whole lotta days) apart? > > Chris That and much more (as I've already posted---for instance, I received seven replies to this post before receiving yours). As a data point, I find this in the header of your message: Received: from outbox.omnigroup.com (outbox.omnigroup.com [198.151.161.40]) by webwizardry.net (8.11.1/8.11.1) with ESMTP id f44NU3R20689 for ; Fri, 4 May 2001 16:30:03 -0700 Received: from scyther.omnigroup.com (omnigroup.com [198.151.161.1]) by outbox.omnigroup.com (8.9.1/8.9.1) with ESMTP id FAA03603; Fri, 4 May 2001 05:59:21 -0700 (PDT) Received: from pellns.alleg.edu (pellns.alleg.edu [141.195.5.200]) by omnigroup.com (8.9.1/8.9.1) with ESMTP id QAA23431 for ; Thu, 3 May 2001 16:38:07 -0700 (PDT) Received: [from deliquent (res14.alleg.edu [141.195.131.14]) by pellns.alleg.edu (SYSADMIN-antispam 0.2) with ESMTP id TAA04773 for ; Thu, 3 May 2001 19:37:33 -0400 (EDT)] Message-Id: <200105032337.TAA04773@pellns.alleg.edu> Date: Thu, 3 May 2001 19:34:48 -0400 As you can see there were two delays, in my case. The first (~13.5 hours) was for your message getting from omnigroup.com (scyther.omnigroup.com) to outbox.omnigroup.com. The second (~10.5 hours) was from outbox.omnigroup.com to my IMAP server. David Halliday@WebWizardry.net From gblock at wanadoo.fr Sat May 5 17:17:37 2001 From: gblock at wanadoo.fr (Gregory Block) Date: Thu Nov 3 14:46:14 2005 Subject: NSView-related implementation advice wanted. Message-ID: I'd like to implement something, and I'd like to ask everyone's advice on how it could best be done. Imagine that I've got a series of independently-updating views; I'd like to show those views in a continuously-scrolling area onscreen. When it reaches the end of the views to display, I'd like it to loop into the first view immediately. Obviously, a scrollview of some kind would be fine - but it wouldn't loop to the beginning; it would snap, or have blank space, neither of which is something I want to actually see. Essentially, what's the best way to implement a ticker-type scroll where the contents loop? I could: - Write an NSView which keeps a private internal list of views and an index, and continuously updates the views which are actually a part of the visible view with the views to show and their positions; this is the implementation I'm currently working on. - Write an NSView which takes a view containing all contents and copies bitmaps of contents, - Render all of the NSViews via imagereps by hand, never actually adding them to a view. - Other things I haven't thought of. Now, all but the first one seem like a bad idea. I *think* I'm doing the right implementation, and I think that it might even be vaguely generally useful to do so; but is it the right way? :plur, Greg From life_magick at mac.com Sat May 5 17:48:32 2001 From: life_magick at mac.com (G. 'Andrew' Tapolow) Date: Thu Nov 3 14:46:14 2005 Subject: [Q] Opening a secondary Window Message-ID: <200105060047.RAA04098@smtpout.mac.com> New programmer question I'm trying to bring up a secondary window. Currently it is similar to a simple question dialog. The window has 2 text fields and a button. I've created and linked the controller class to it, created the files and inserted them in the project. The window is in the main nib that the main window is. The questions I have are: 1) What is the process from one controller.m to show the secondary window and use that windowController's class. 2) How can I make a c wrapper around one of an obj-c classes methods? Still very new at all of this and all help is very strongly appreciated. -Andrew From john at toastedmarshmallow.com Sat May 5 18:44:52 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:14 2005 Subject: About notifications in general In-Reply-To: <200105040412.f444CUV21700@smtp3.san.rr.com> Message-ID: <20010506014024.E493E11C001@fimail01.cabinet.net> On Friday, May 4, 2001, at 06:11 AM, Daniel Staudigel wrote: > Summary for those (like me) who could not make heads or tails of that > sentence: I want to know how to break the execution line in the middle > of when a method is working, from a remote thread, by sending a > notification or a message. How you do this depends a lot on what the worker thread looks like. If it easy to make it do callbacks or signal checks (a shared variable should work) then that's probably the nicest solution. If you want faster results, then you could try having the new thread return (or set it as a global variable) its posix thread (which it can get using pthread_self()) and then pthread_cancel it from your UI thread. You might also need to call pthread_testcancel in the worker make sure that it gets cancelled within reasonable time. Take a look at http://mirrors.ccs.neu.edu/cgi-bin/unixhelp/man- cgi?cancellation+3 If you do it in Objective-C, you'll have to have the worker thread listen for "signals" at one time or another. One way is to use Distributed Objects to have the worker thread ask its "parent" if it should continue. Another option is using global variables and a signal. The worker thread does something like this; while(!stop) { // do your stuff. } stopped=YES, pthread_cond_signal(stoppedcond); And the UI thread: - (void)cancel:(id)sender { stop=YES; } - (void)start:(id)sender { int i; while (stop && !stopped && i< loop_max) { pthread_cond_timedwait(stoppedcond,mutex,timeout); } if (!(loop_max)) { // handle exceptional condition } stop=NO; stopped=NO; // start the new worker. } (Setting up the mutex and condition must be done too, of course.) Since one thread just reads the variable, the worst thing that can happen is that you get a few extra iterations. stop may need to be volatile. Regards, John Hornkvist From ian.cardenas at ultraviolent.com Sat May 5 20:33:04 2001 From: ian.cardenas at ultraviolent.com (Ian P. Cardenas) Date: Thu Nov 3 14:46:14 2005 Subject: handling documents than need custom initialization Message-ID: <200105060333.VAA01203@uv.iserver.net> Hey all, Where's the best place to customize the behavior of -newDocument: ? For example, an image-editing application would need to set the width and height of the new image before it could present the untitled document. Right now, I've created an NSPanel that I run modally from my own Controller and then addDocument: manually. That works fine when the user selects 'New' from the menu but when NSApplication tries to create a new untitled document (e.g. when [re]started) my custom new method isn't involved. I'm considering subclassing NSDocumentController and overriding -makeUntitledDocumentOfType:. Is that reasonable, or is there a better way to go about this? Thanks, -- Ian P. Cardenas Computer Scientist, Software From richards9 at mac.com Sat May 5 21:35:02 2001 From: richards9 at mac.com (Richard Schreyer) Date: Thu Nov 3 14:46:14 2005 Subject: Removing whitespace Message-ID: <200105060434.VAA05274@smtpout.mac.com> I have a NSString whose first characters may be whitespace/newlines. I need to get rid of these characters. I've just spent the last hour tinkering with NSScanner with no luck. I can't seem to make any combination of the whiteSpaceAndNewLines character set (or inverting that set) and the scanning functions work. Either nothing happens, or I get valid characters chopped off the front. Thanks in advance, Richard Schreyer From raphael_sebbe at mac.com Sat May 5 23:53:58 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:14 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105042059.NAA14775@omnigroup.com> Message-ID: <200105060653.f466rmO01402@picard.skynet.be> Thanks, this is exactly what I was missing. Raphael On Friday, May 4, 2001, at 10:59 PM, Timothy J. Wood wrote: > You either need to create the thread with the 'detached' attribute or > explicitly detach or join the thread. Otherwise, the pthread layer > needs to keep the thread around to make sure that you can synchronize > with it to collect its return value and/or receive notification that it > is dead. > > In Mac OS X, it appears that pthread_attr_setdetachstate() doesn't > actually work (or maybe I'm misunderstanding it), but the pthread_join > or pthread_detach approach does reap the threads. I've attached a > modified example below. From luke at frontbase.com Sun May 6 00:21:55 2001 From: luke at frontbase.com (Luke Adamson) Date: Thu Nov 3 14:46:14 2005 Subject: About notifications in general In-Reply-To: <200105040412.f444CUV21700@smtp3.san.rr.com> Message-ID: On Thursday, May 3, 2001, at 09:11 PM, Daniel Staudigel wrote: > Summary for those (like me) who could not make heads or tails of that > sentence: I want to know how to break the execution line in the middle > of when a method is working, from a remote thread, by sending a > notification or a message. Generally, this requires three things: 1. A method of communication between the two (or more) threads. 2. Your worker threads must monitor the communication mechanism as part of their work cycle. 3. It must be possible to un-block any blocking operations undertaken by your worker threads. A very simple way of communicating between threads is to use shared variables (either instance variables or globals). Let's assume that we have a shared variable: BOOL shouldContinue, which we'll use to control the worker thread. Your worker thread "processing" loop needs to look something like this: - (void)processUntilComplete; { while ([self isProcessingComplete] == NO) { [processingLock lock]; // Where "processingLock" is an NSLock if (shouldContinue == NO) { [processingLock unlock]; break; } [self doOneUnitOfWork]; [processingLock unlock]; } } Your cancel method would look something like: - (IBAction)cancelProcessing:(id)sender; { [processingLock lock]; shouldContinue = NO; [processingLock unlock]; } This example is a little paranoid in that it blocks the main thread from canceling the worker during each unit of processing, which might not be necessary in your application, but it's often a good idea to design your app such that when "cancel" returns, you can be confident that processing has stopped (especially important when canceling during deallocation). Now we've satisfied points #1 and #2, and we're assuming that -doOneUnitOfWork isn't a blocking operation (a method call that can hang indefinitely). If -doOneUnitOfWork can be a blocking operation, such as reading data from a socket or a file, we have to come up with a way of interrupting that call in our -cancelProcessing: method. This mechanism is dependant entirely on the blocking call. For I/O, such as reading network data from a socket, one way to "abort" a blocked read() is to close the associated socket descriptor in our -cancelProcessing: method. This is a rather heavyweight approach, but it will cause the read() call to return (with an error). A more advanced approach might be to send out-of-band data through the socket to the server, which would have to handle the SIGURG and stop processing on the server side (to unblock the client). This would require "canceling" support in the server. The "shared BOOL" communication mechanism only gives you one bit of bandwidth between your threads, but there are numerous other MT communication mechanisms supported by Cocoa (Distributed Objects, NSPortMessages, larger blocks of shared memory, etc). If you really, really want to interrupt a thread without having explicit support for doing so within the worker thread itself, you could look into the mach thread control calls in (thread_terminate, thread_abort, thread_suspend). Using these calls to directly to stop a running thread would be analogous to killing a running process---not the preferred "Quit" mechanism, and one which could leave required cleanup incomplete. Hope that helps. Have fun! --- Luke From a at blackbox.net Sun May 6 01:44:54 2001 From: a at blackbox.net (Andreas Monitzer) Date: Thu Nov 3 14:46:14 2005 Subject: About notifications in general In-Reply-To: <200105040412.f444CUV21700@smtp3.san.rr.com> Message-ID: <200105060844.KAA00356@am.homeip.net> On Friday, May 4, 2001, at 06:11 , Daniel Staudigel wrote: > I want to make a two threads, one that interacts with the user, and the > other does the real underlying work, so the user is not plagued with the > so called "rainbow cursor of death". The User Interface thread must have > a cancel button, but I do not know how to make it send a message to the > second thread while it is still doing its long and tedious work. I want > the second thread to exit as soon as the button is pressed. I do not > know how to have one thread interrupt the flow of execution in another, > but this is effectively what I need to do. I came up with another idea > however, that the workhorse thread "checks back" with the UI thread every > now and then to check if the cancel button had been pressed. > > Summary for those (like me) who could not make heads or tails of that > sentence: I want to know how to break the execution line in the middle > of when a method is working, from a remote thread, by sending a > notification or a message. I've done this on Linux by cancelling the thread (using pthread_cancel). However, the last time I checked (10.0.0), this wasn't supported in Mac OS X. andy -- Discussion forthcoming. From gblock at wanadoo.fr Sun May 6 03:43:13 2001 From: gblock at wanadoo.fr (Gregory Block) Date: Thu Nov 3 14:46:14 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: <200105041032.f44AWfD25131@mailhost.gu.edu.au> Message-ID: On Friday, May 4, 2001, at 11:31 , Adrian Sutton wrote: > I didn't think that this had been implemented in Darwin yet. I haven't > payed much attention to darwin-dev of late though. Are you certain > this has been implemented? I would be quite interested in this > capability and there are already some UNIX based tools to utilize it > available (nice which comes with OSX GM). Just because we can't see it doesn't mean it isn't fixed. :) Xnu-128. Once something like that has been finished, Space.dock, for example, could be modified to lower the priority of offscreen applications by 1; or to do that to 'background' applications. Mind you, I'd *never* use such functionality, but it's there for others if they felt compelled to do so. Well designed applications should not be running CPU-intensive operations on main threads at standard priority. Space.dock probably makes a good playground for this modification, as well. :plur, Greg From kelleysoft at pressenter.com Sun May 6 05:03:21 2001 From: kelleysoft at pressenter.com (Greg Betzel) Date: Thu Nov 3 14:46:14 2005 Subject: Project Idea: Application Dockling In-Reply-To: Message-ID: On Friday, May 4, 2001, at 04:31 pm, Greg Betzel wrote: > There's a way, but with caveats. Stepwise has an excellent article on > this: > http://www.stepwise.com/Articles/Technical/2001-03-30.01.html I spoke too soon. Stepwise just updated that article for Mac OS X 10.0.2, so anybody who followed it should probably reload & re-read. It's still at the above link. Greg Betzel From imacman287 at jacksonville.net Sun May 6 06:25:07 2001 From: imacman287 at jacksonville.net (Justin Haynes) Date: Thu Nov 3 14:46:14 2005 Subject: mailing list woes In-Reply-To: Message-ID: <200105061325.f46DP0500947@duval.se.mediaone.net> I was getting messages from a week ago... On Friday, May 4, 2001, at 12:14 PM, James Roberts wrote: > Sometimes my messages take a day or 2 to appear on the list. > > James Roberts > > -----Original Message----- > From: macosx-dev-admin@omnigroup.com > [mailto:macosx-dev-admin@omnigroup.com]On Behalf Of James McCartney > Sent: Friday, May 04, 2001 8:28 AM > To: Chris Behm; MacOS X Dev > Subject: Re: mailing list woes > > > on 5/3/01 6:34 PM, Chris Behm at cjbehm@mail.com wrote: > >> I've got to ask, is anyone else receiving the same message multiple >> times but days (sometimes a whole lotta days) apart? >> >> Chris > > I'm not receiving multiples I don't think, but I am receiving messages > 24-48 > hours delayed. Like yours for instance. > > --- james mccartney james@audiosynth.com > SuperCollider - a real time synthesis programming language for the > PowerMac. > > > > _______________________________________________ > 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 Shinya.Sadahisa at ma4.seikyou.ne.jp Sun May 6 07:07:29 2001 From: Shinya.Sadahisa at ma4.seikyou.ne.jp (SadahisaShinya) Date: Thu Nov 3 14:46:14 2005 Subject: Newbie attempts to use URL/XML services and fails References: Message-ID: <3AF55ADA.60B9826C@ma4.seikyou.ne.jp> try this change. Bob Savage wrote: > sourceURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, > CFSTR("file://localhost/Users/bsavage/Desktop/SW.xml"), > kCFURLPOSIXPathStyle, > FALSE); sourceURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, CFSTR("/Users/bsavage/Desktop/SW.xml"), kCFURLPOSIXPathStyle, FALSE); From froy at austin.rr.com Sun May 6 08:45:25 2001 From: froy at austin.rr.com (Fabien Roy) Date: Thu Nov 3 14:46:14 2005 Subject: Announcing SmallSockets! Message-ID: <200105061545.f46FjDdQ027147@texlog2.texas.rr.com> Hi, Here is some suggestion: Writing on a socket is not guaranteed to send all the bytes. You have to put this in a loop like this: Excerpt for some socket code: for (sent = 0; sent < nbytes;){ ret = write (s, buffer + sent, nbytes - sent); if (ret == -1){ perror ("write (socket)"); exit (3); } sent += ret; } Another thing: if ( (send(fd, [string cString], [string length], 0) < 0) ) [string cString] can raise an exception. Please think about of the non English users. I would recommend to get the bytes array using getCharacters: - (void)getCharacters:(unichar *)buffer Invokes getCharacters:range: with buffer and the entire extent of the receiver as the range. buffer must be large enough to contain all the characters in the string. In that case you must allocate a buffer of [string length] of (unichar *). You may have to free this buffer at the end, or if you want to keep it as an instance variable, you will have to reallocate to adjust the size if needed and keep track of the current buffer size. In that case jut put a "free" in your -(void)dealloc. In any case this is a "Good Job!" Hope that helps. Fabien. > Hi everyone, > > I love OmniNetworking, but sometimes it seems like killing a fly with > an axe -- fun, but a little excessive. I went looking for a simpler > replacement, but to my surprise, didn't turn up anything. > > As a learning experience, and possibly valuable thing for the > community, I decided to start an open-source project called > SmallSockets that is a very simple and lightweight Obj-C Cocoa > wrapper for BSD sockets. > > It requires no other frameworks, support files, or anything other > than what is installed by your Mac OS X Developer CD. > > The initial release (12k!) can be downloaded here: > > > > It is VERY skeletal at the moment, and missing some important things, > but it's a start. With a little love, some water, and sunlight, I > think it will grow to be a handy thing to have around. It comes with > a sample app showing how to call it. > > I hope you will take a moment to review my code and pitch in with > comments, suggestions, and more code. > > Hopefully someone out there isn't already working on this! If you > are, I couldn't find you! I tried! > > That's all for now! Ooh, I should go add it to Softrak. I feel so official. > > Steven > ___________________ From max at quendi.de Sun May 6 12:24:08 2001 From: max at quendi.de (Max Horn) Date: Thu Nov 3 14:46:14 2005 Subject: mailing list woes In-Reply-To: <200105032337.TAA04773@pellns.alleg.edu> References: <200105032337.TAA04773@pellns.alleg.edu> Message-ID: Hi Chris, I also get messages to this list very late (e.g. right now the first email from saturday 0:00 has arrived - over here it is already Sun 21:19) The reason for this might be the heavy traffic on this list; maybe the machine that handles this list is not able to deliver it faster? As to the duplicate messages: so far, in my experience this is caused by two factors: 1) ppl resending their mails as they seem not to be delivered correctly (but in reality they are simple 1-2 days delayed) 2) When you use "Reply All" (like I always do), messages on this mailing list are not only sent back to the list, but also to the original sender. And if I reply to a reply, CC field entries start to sum up. The CC usually arrives "immediatly", but the ML copy a few days later. Max From uli at ritual.org Sun May 6 13:44:16 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:14 2005 Subject: NSSystemDirectories.h In-Reply-To: Message-ID: <14wVNr-0gfsaOC@fmrl03.sul.t-online.com> Am Freitag, 4. Mai 2001 um 02:01 schrieb Karl Goiser: > reference is made to the header file, 'NSSystemDirectories.h' but > I don't seem to be able to find it. /usr/include Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From uli at ritual.org Sun May 6 13:48:02 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:14 2005 Subject: Supplementary files of an app belong into ~/Library/Application Support In-Reply-To: <20010504145136.BHTH20687.mail2.rdc2.bc.home.com@locutus> Message-ID: <14wVRi-18xiW8C@fmrl03.sul.t-online.com> Am Freitag, 4. Mai 2001 um 16:51 schrieb Graeme Hiebert: > Note, however, that you don't have to (and probably shouldn't) > hardcode "~/Library". Check out NSPathUtilities.h; in particular, > look at NSSearchPathForDirectoriesInDomains. Good hint; I overlooked that when I answered your earlier question about not hardcoding these paths. So what's left is to #define and hardcode "Application Support". Bye Uli ________________________________________________________ Uli Zappe uli@ritual.org Lorscher Stra?e 5 http://www.ritual.org D-60489 Frankfurt Fon: +49-700-ULIZAPPE Germany Fax: +49-700-ZAPPEFAX ________________________________________________________ From tdpaust at chorus.net Sun May 6 14:57:52 2001 From: tdpaust at chorus.net (Timothy Paustian) Date: Thu Nov 3 14:46:14 2005 Subject: Playing with NSBitMapImageRep [solution] In-Reply-To: References: <20010502192700.18932.qmail@cs.nwu.edu> Message-ID: Well it turns out my code for working with the bitmap of the image was fine. I was calculating the location of the areas that need to be analyzed incorrectly. I was not figuring the location in the image data correctly. I was tripped up by the difference in the way a NSView coordinates work vs. a Power Plant view for example. I realized they were different, but did not translate appropriately. The incorrect code was -(void) fromRect:(NSRect*)inRect getXStart: (int*) xStart getXEnd: (int*) xEnd getYStart: (int*) yStart getYEnd: (int*) yEnd { *xStart = (inRect->origin.x) - iRect.origin.x; *xEnd = *xStart + inRect->size.width; *yEnd = inRect->origin.y + inRect->size.height - iRect.origin.y; *yStart = inRect->origin.y - iRect.origin.y; } The x values are calculated correctly, but not the y's In the above I am using the iRect.origin, where I should really be doing the following. -(void) fromRect:(NSRect*)inRect getXStart: (int*) xStart getXEnd: (int*) xEnd getYStart: (int*) yStart getYEnd: (int*) yEnd { *xStart = (inRect->origin.x) - iRect.origin.x; *xEnd = *xStart + inRect->size.width; *yStart = iRect.size.height - (inRect->origin.y + inRect->size.height - iRect.origin.y); *yEnd = iRect.size.height - inRect->origin.y - iRect.origin.y; } I think I am on the right track now. Thanks to everyone who replied. -- Cheers, Tim Timothy Paustian UW-Madison, Bacteriology From ckane at apple.com Sun May 6 15:49:04 2001 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:46:14 2005 Subject: Pausing an NSTask? In-Reply-To: <200105041714.KAA36442@idiom.com> Message-ID: <200105062248.PAA11972@scv3.apple.com> On Friday, May 4, 2001, at 10:13 AM, John C. Randolph wrote: > Suppose I have something time-consuming going on in an NSTask, and I'd > like to do the moral equivalent of sending it a control-Z from a shell. > > I see that NSTask has a "description forthcoming" -interrupt method > that sends a SIGINT, but I don't see any obvious way to suspend and > restart. > > Can anyone suggest how I might go about this? -[NSTask suspend] & -[NSTask restart]? Chris Kane Cocoa Frameworks, Apple, Inc. From ckane at apple.com Sun May 6 16:00:17 2001 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:46:14 2005 Subject: Problems with NSTimer In-Reply-To: Message-ID: <200105062300.QAA02288@scv1.apple.com> On Monday, April 30, 2001, at 05:48 PM, j o a r wrote: > Hi, > > I check the network interfaces with netstat and NSTask, this is done > periodically using an NSTimer. For inactive network interfaces I > invalidate the NSTimer, which gives me a one time exception: > > ================================================================= > Apr 29 12:43:39 NetStat[1794] *** NSTimer ignoring exception > 'NSGenericException' (reason 'encodeDataAt:ofObjCType: unencodable type > (v@:)') that raised during posting of timer with target 1085740 and > selector 'invoke' > ================================================================= > > ...but it still seems to do what I wanted, ie. that timer is stopped > and the other one continue to run. > > I am guessing that this is proably a retain-release problem - is that > something to follow up on? NSTimer is trapping an exception and tossing it. For various reasons, we cannot allow exceptions to percolate back through the run loop. If you want to catch the exception yourself, put an NS_DURING etc. handler in the method being invoked by the timer. This would allow you to avoid the logging, at least. Now, as to what this particular exception is: something done by your timer method (or indirectly) is using an NSArchiver to archive up something. That process has hit the "v" type in the type string, which stands for "void", which is not encodable. It's like something is encoding up an NSMethodSignature's type string. But NSMethodSignature's don't implement NSCoding, so I don't know what that might be. Chris Kane Cocoa Frameworks, Apple, Inc. From jcr at idiom.com Sun May 6 16:10:13 2001 From: jcr at idiom.com (John C. Randolph) Date: Thu Nov 3 14:46:14 2005 Subject: Pausing an NSTask? In-Reply-To: <200105062248.PAA11972@scv3.apple.com> Message-ID: <200105062310.QAA87495@idiom.com> On Sunday, May 6, 2001, at 03:49 PM, Chris Kane wrote: > On Friday, May 4, 2001, at 10:13 AM, John C. Randolph wrote: >> Suppose I have something time-consuming going on in an NSTask, and I'd >> like to do the moral equivalent of sending it a control-Z from a shell. >> >> I see that NSTask has a "description forthcoming" -interrupt method >> that sends a SIGINT, but I don't see any obvious way to suspend and >> restart. >> >> Can anyone suggest how I might go about this? > > -[NSTask suspend] & -[NSTask restart]? Thanks, Chris. Neither of these are mentioned in the documentation. I guess the lesson of the day is RTFH, when TFM isn't up to date. BTW, it turned out to be -resume, not -restart. -jcr "The problem with trying to child-proof the world, is that it makes people neglect the far more important task of world-proofing the child." -- Hugh Daniel From john at toastedmarshmallow.com Sun May 6 16:35:12 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:14 2005 Subject: CoreAudio Questions... In-Reply-To: <200105042212.PAA22288@smtpout.mac.com> Message-ID: <20010506233350.478C511C002@fimail01.cabinet.net> On Saturday, May 5, 2001, at 12:12 AM, Michael Thompson wrote: > > I finally have the dev tools installed on my 100% unsupported Mac > 8500. :-) I have a question about CoreAudio. I see a bunch of examples > doing the audio processing inside the IOProc callback. I wonder if > someone could post an example of sending a audio stream(buffer) to the > callback. What I want to do is handle all of the processing outside the > callback, maybe mix multiple streams of processors, then send one > stream to the callback. Is this a good thing to do? I don't have any code handy right now, but it looks like a simple exercise. (If I understand you correctly.) Use a circular queue as a buffer for the callback procedure. Do your processing into the buffer. When the buffer goes full, sleep on a posix condition. Let the callback consume buffers and signal the feeder when the queue isn't full. Global variables work fine for most of the information exchange between the threads, but make sure each variable is only written by one thread. Otherwise you'll have to deal with locks. Regards, John Hornkvist -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1228 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010506/787c4d08/attachment.bin From john at toastedmarshmallow.com Sun May 6 16:37:39 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:14 2005 Subject: Drawing into a View In-Reply-To: <200105050004.RAA16184@smtpout.mac.com> Message-ID: <20010506233642.538B511C002@fimail01.cabinet.net> On Saturday, May 5, 2001, at 02:04 AM, Brian Campbell wrote: > Sorry for the newbie question, but how do I draw into a NSView? The > NSView documentation says to subclass NSView and override drawRect, but > what commands do I use within drawRect for drawing? For instance, I > want to load an image and animate it moving around in the view. How can > I do that? The commands in NSGraphics.h don't seem to have anything for > displaying an image. Or do I use CoreGraphics, and if so, how do I get > the CGContextRef? You could do it with the GraphicKit; it already supports animation of images and other things (such as transforms), using composition of animation objects for very flexible behaviors. The example application that comes with the kit has animation. Otherwise, check NSImage. - (void)drawRect:(NSRect)aRect { NSEraseRect(aRect); [myImage compositeToPoint:currentImageOrigin operation:NSCompositeCopy]; } Then you can use a timer to periodically update the image origin or the image itself, and then tell the view that it needs to be redrawn. Regards, John Hornkvist From froy at austin.rr.com Sun May 6 17:26:14 2001 From: froy at austin.rr.com (Fabien Roy) Date: Thu Nov 3 14:46:14 2005 Subject: Fwd: Your message to MacOSX-dev awaits moderator approval Message-ID: <200105070025.f470PrdQ008576@texlog2.texas.rr.com> Yes I got the same once. Wonder what'going on! Fabien > Is anyone else getting these weird messages every time they post to the > list? > > Begin forwarded message: > > > From: macosx-dev-admin@omnigroup.com > > Date: Fri May 04, 2001 11:15:22 AM US/Pacific > > To: tom_waters@mac.com > > Subject: Your message to MacOSX-dev awaits moderator approval > > > > Your mail to 'MacOSX-dev' with the subject > > > > (no subject) > > > > Is being held until the list moderator can review it for approval. > > > > The reason it is being held: > > > > Message has implicit destination > > > > Either the message will get posted to the list, or you will receive > > notification of the moderator's decision. > From robsmith at hfx.eastlink.ca Sun May 6 17:43:14 2001 From: robsmith at hfx.eastlink.ca (Rob Smith) Date: Thu Nov 3 14:46:14 2005 Subject: compiler Message-ID: Where can I download the development tools for osx?? The Cd that shipped with our box set seems to have disappeared. Thanks Rob From uli at ritual.org Sun May 6 18:00:35 2001 From: uli at ritual.org (Uli Zappe) Date: Thu Nov 3 14:46:14 2005 Subject: Fwd: Usenet Programs... Message-ID: <14wZOK-0kYUNcC@fmrl03.sul.t-online.com> Erik has sent the following mail to me as well as the list, but since as far as I know he's not subscribed to the list and the mail therefore probably won't get posted, I forward it to the list in this mail. Sorry if this results in a double posting. Uli Anfang der weitergeleiteten E-Mail: > Von: Erik Doernenburg > Datum: Mon, 07. Mai. 2001 02:47:07 Europe/Berlin > An: Uli Zappe > Kopie: Annard Brouwer , > jeff_lamarche@peoplesoft.com, macosx-dev@omnigroup.com > Betreff: Re: Usenet Programs... > X-Mailer: Apple Mail (2.388) > > On Friday, April 27, 2001, at 02:55 , Uli Zappe wrote: >> >> Am Mittwoch, 25. April 2001 um 22:01 schrieb Annard Brouwer: >> >>>> Does anyone know of any Cocoa-based news reader projects that are in >>>> progress? If not, I'll probably start a project on SourceForge... >>> >>> There is Alexandra3000 but I'm not sure how ready it is... >> >> I've seen a version about 8 weeks ago, and it really looked >> great. Erik has been working on it already for a long time, and >> some frameworks that build the foundation of Alexandra are >> already publicly available (see http://www.mulle- >> kybernetik.de/software/ALX3000/). > > I have just uploaded new versions of the EDCommon and EDInternet > frameworks that work on Mac OS X final with the new > ProjectBuilder. Check out Softrak or follow the link Uli mentioned. > >> Unfortunately, Erik seems to be quite busy now, and wouldn't give >> an estimated release date (though, by the logic of the >> aforementioned web page, Alexandra should already be there: >> "However, I'm still confident that a basic version of ALX3000 is >> ready before a "NeXT technology based" version of Mac OS hits the >> shelves."). > > Oh well... Let's say a basic version of ALX3000 is ready before a > "NeXT technology based" version of Mac OS is preinstalled on new > Apples... > >> Still, I doubt if it's a particular lucky situation to start >> another open-sourced Cocoa newsreader, instead of joining forces. >> I have no idea if Erik is willing to share his development work >> if he lacks time himself, but you can try and contact him >> (mailto:erik@clara.co.uk), and offer to help, or at least >> encourage him to get out a first version. > > Please send all mail to erik@x101.net. The other address will > cease to work very soon. > > Regarding the development of a newsreader I would agree with Uli > that it is not such a great idea to start all over. On the other > hand, a couple of design issues in ALX3000 are not finalised yet > and I think it would take me longer to document the current > architecture so that somebody could contribute in a meaningful way > than to finish it off myself. Hence, the most reasonable path > seems to be to have a good look at the ED frameworks mentioned > above and start from there. This way you can write a newsreader > without having to deal with all the ugly low-level stuff. And this > does take time to get right! The frameworks are pretty much > finished and are being used in two other Cocoa projects, the Ginko > mail client and JabberMull, as well as several commercial > WebObjects projects. No worries about licensing by the way, the > frameworks come under a BSD license. What do you think? > > cheers > erik From kdyke at apple.com Sun May 6 18:01:02 2001 From: kdyke at apple.com (Kenneth Dyke) Date: Thu Nov 3 14:46:14 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: Message-ID: <200105070100.SAA21654@scv1.apple.com> On Saturday, May 5, 2001, at 02:24 AM, strobe anarkhos wrote: >> >> What about implementing two versions: one optimized and the current >> one. When there's no translucent window on top of it, use the >> optimized. Otherwise, use the current one. >> >> Just a thought. > > That was my point. When I talk about acceleration I'm obviously talking > about opaque surfaces which are already in video memory which means > they are already unobscured. This is not a composition issue, it's how > surfaces are being partitioned and updated. If I move a surface I don't > have the same penalty as when I update the entire surface, however > there is some sacred unwritten rule about having one surface per window > so you only have the option of updating a portion of a surface instead > of either having a window which has multiple surfaces or a different > method to update the window surface. Actually, in the strict API sense, most windows have zero CG "surfaces". Window backing stores are only stored in system memory and do not have a corresponding CG "surface" as such. The only two parts of the system using real CG surfaces are OpenGL and QuickTime. In that sense, you can think of CG surfaces as opaque subwindows layered on top of the window backing store. (This is why, for example, using AppKit to read the bits from an NSOpenGLView doesn't work as you'd like it to, the OpenGL bits are in a different place). Surfaces also have a few other private uses by the windowing system. Compared to standard window backing stores, CG surfaces have considerable overhead (IOKit objects, kernel memory allocations, AGP goo, etc), so they are used sparingly. I know everyone has their favorite pet opinion as to which part of the system is how fast vs everything else, but solving all of the issues is not a slam dunk by any means, no matter how things look from the "outside" of the windowing system. Doing significant rework of the update mechanism to optimize one "simple" case seems less interesting than other things that could be done that might also have other significant benefits to the system as a whole. -Ken From robsmith at hfx.eastlink.ca Sun May 6 19:11:47 2001 From: robsmith at hfx.eastlink.ca (Rob Smith) Date: Thu Nov 3 14:46:14 2005 Subject: ./configure error Message-ID: <200105070211.f472Bkb24886@m5.andara.com> Please ignore my last request about development tools download...I have them now... anyway I get the following error when trying to install ncurses. Can anyone tell me what the problem might be? > [localhost:/Users/xavier/ncurses-5.2] root# ./configure > loading cache ./config.cache > Configuring NCURSES 5.2 ABI 5 (Sun May 6 23:04:55 ADT 2001) > checking host system type... powerpc-apple-darwin1.3.2 > checking target system type... powerpc-apple-darwin1.3.2 > checking build system type... powerpc-apple-darwin1.3.2 > Configuring for darwin1.3.2 > checking for prefix... /usr/local > checking for gcc... no > checking for cc... cc > checking whether the C compiler (cc ) works... no > configure: error: installation or configuration problem: C compiler > cannot create executables. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 839 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010506/735c7590/attachment.bin From mwatson at apple.com Sun May 6 19:12:33 2001 From: mwatson at apple.com (Matt Watson) Date: Thu Nov 3 14:46:14 2005 Subject: pthread problem (thread leak) In-Reply-To: <200105060653.f466rmO01402@picard.skynet.be> Message-ID: <200105070212.TAA13939@scv2.apple.com> pthread_attr_setdetachstate() works fine. There's a bug which occurs when a thread is created but exits before pthread_detach() is called. This should, but does not cause the thread to be detached. Due to this, pthread_detach() cannot reliably be used, unless some synchronization is done to ensure that the thread is still running. Fortunately, there's an easy workaround: pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_create(&thread, &attr, &func, &arg); pthread_attr_destroy(&attr); matt. From jcr at idiom.com Sun May 6 19:34:43 2001 From: jcr at idiom.com (John C. Randolph) Date: Thu Nov 3 14:46:14 2005 Subject: System-wide networking notifications? Message-ID: <200105070234.TAA83716@idiom.com> Can anyone tell me how to get notified if a network connection goes down? I want to do the right thing if a time-consuming operation gets interrupted. -jcr "Scientology is both immoral and socially obnoxious... it is corrupt, sinister and dangerous." - Mr. Justice Latey, London 1984 From wade-williams at home.com Sun May 6 19:57:00 2001 From: wade-williams at home.com (Wade Williams) Date: Thu Nov 3 14:46:14 2005 Subject: ./configure error In-Reply-To: <200105070211.f472Bkb24886@m5.andara.com> Message-ID: <20010507025617.WIFD27407.femail2.sdc1.sfba.home.com@localhost> First, I've found that a lot of programs don't configure or make correctly when su'd (or sudo'd) to another account. The environment variables are not setup correctly. I configure and make as myself, and then make install as root (if needed). Second, replace the config.sub and config.guess files with the ones on your system and things should go more smoothly: cp config.sub config.sub.orig cp config.guess config.guess.orig cp /usr/libexec/config.* . Wade On Sunday, May 6, 2001, at 09:11 PM, Rob Smith wrote: > Please ignore my last request about development tools download...I have > them now... anyway I get the following error when trying to install > ncurses. Can anyone tell me what the problem might be? > >> [localhost:/Users/xavier/ncurses-5.2] root# ./configure >> loading cache ./config.cache >> Configuring NCURSES 5.2 ABI 5 (Sun May 6 23:04:55 ADT 2001) >> checking host system type... powerpc-apple-darwin1.3.2 >> checking target system type... powerpc-apple-darwin1.3.2 >> checking build system type... powerpc-apple-darwin1.3.2 >> Configuring for darwin1.3.2 >> checking for prefix... /usr/local >> checking for gcc... no >> checking for cc... cc >> checking whether the C compiler (cc ) works... no >> configure: error: installation or configuration problem: C compiler >> cannot create executables. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1385 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010506/07e1234f/attachment.bin From ccunning at math.ohio-state.edu Sun May 6 20:14:21 2001 From: ccunning at math.ohio-state.edu (Chad Cunningham) Date: Thu Nov 3 14:46:14 2005 Subject: ./configure error In-Reply-To: <200105070211.f472Bkb24886@m5.andara.com> Message-ID: You need to view the config.log and see what went wrong. It's trying to compile a program to test if your compiler and compiler flags will actually work, and that program is failing to compile. Check config.log and see what the error is. On Sun, 6 May 2001, Rob Smith wrote: > Please ignore my last request about development tools download...I have > them now... anyway I get the following error when trying to install > ncurses. Can anyone tell me what the problem might be? > > > [localhost:/Users/xavier/ncurses-5.2] root# ./configure > > loading cache ./config.cache > > Configuring NCURSES 5.2 ABI 5 (Sun May 6 23:04:55 ADT 2001) > > checking host system type... powerpc-apple-darwin1.3.2 > > checking target system type... powerpc-apple-darwin1.3.2 > > checking build system type... powerpc-apple-darwin1.3.2 > > Configuring for darwin1.3.2 > > checking for prefix... /usr/local > > checking for gcc... no > > checking for cc... cc > > checking whether the C compiler (cc ) works... no > > configure: error: installation or configuration problem: C compiler > > cannot create executables. > -- Chad Cunningham ccunning@math.ohio-state.edu "Well, once again my friend, we find that science is a two-headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is bad! Oh beware the other head of science, Arthur, it bites!" From chrisd at plaidworld.com Sun May 6 20:23:02 2001 From: chrisd at plaidworld.com (Chris Dillman) Date: Thu Nov 3 14:46:14 2005 Subject: Drag/Drop on to running app icon in dock, How? Message-ID: Drag/Drop on to running app icon in dock, How? I have DD working into the apps window and also it works onto the apps icon in the finder. Now I am just missing DD on the app in the Dock. What do I need to do? -- =========================================================== Technical Editor for http://www.idevgames.com Support Programmer for http://www.desoftware.com Owner, Plaid World Studios, http://www.plaidworld.com Software Engineer for http://www.riskwise.com, Part of LexisNexis A one-question geek test. If you get the joke, you're a geek: Seen on a California license plate on a VW Beetle: "FEATURE" ============================================================ From nigel at ind.tansu.com.au Sun May 6 20:58:14 2001 From: nigel at ind.tansu.com.au (nigel@ind.tansu.com.au) Date: Thu Nov 3 14:46:14 2005 Subject: Lock & Unlock Icons In-Reply-To: <200105041545.IAA17660@outbox.omnigroup.com> from "macosx-dev-request@omnigroup.com" at May 04, 2001 08:45:01 AM Message-ID: <20010507035626.1873.qmail@quoll.ind.tansu.com.au> Ryan Dary asked: > I am wondering if there is a way to get a "standard" lock/unlock icon, > like the ones used in the preferences window for authorization. Does > anyone know if there is a shared collection of icons and other > resources, like back in OS 9 and the system?? There are currently two different "standard" ones: /System/Library/PrivateFrameworks/NIInterface.framework/Resources/lock.tiff /System/Library/PrivateFrameworks/Preferences.framework/Resources/lock.tiff Ryan Stevens suggested: > > I'd just grab NetInfo Manager's lock/unlock icons and be done with it. > > It would be nice to have a standard set to work with that we knew was > going to be around but I haven't seen anything yet. Nor I. Every time I want to use another "standard" icon, I do find /System/Library -name \*.tif\* -exec open {} \; Note 1: Project Builder lets you add images from paths like the above without copying them. e.g. add icon files into your project's Resources group (as an absolute path). Note 2: It doesn't seem that Interface Builder lets you do the same sort of thing. (i.e. it doesn't understand full paths in the icon fields of a button's inspector, or symlink files in .nib) What I do is put a README file or shell script in the .nib directory which reminds me where I copied the file from. -- | Nigel Pearson, nigel@ind.tansu.com.au | "Reality is that which, | | Telstra NW-D, Sydney, Australia. | when you stop believing | | Office: 9206 3468 Fax: 9212 6329 | in it, doesn't go away." | | Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis.' | From rcerny at dataline.cz Sun May 6 22:50:14 2001 From: rcerny at dataline.cz (Robert Cerny) Date: Thu Nov 3 14:46:14 2005 Subject: new release of Omni frameworks Message-ID: <200105070451.f474pMH10330@linux.dataline.cz> Hi, I downloaded new release of Omni frameworks and suddenly get an error message I have never seem before header file 'OmniBase/NSObject-OBObjectCompatibility.h' not found. The framework was build without errors. What's wrong? Robert From lambda at mac.com Sun May 6 22:59:26 2001 From: lambda at mac.com (Brian Campbell) Date: Thu Nov 3 14:46:14 2005 Subject: new release of Omni frameworks In-Reply-To: <200105070451.f474pMH10330@linux.dataline.cz> Message-ID: <200105070558.WAA18628@smtpout.mac.com> The .h seems to have been cut off some how. You just need to rename it. On Monday, May 7, 2001, at 01:50 AM, Robert Cerny wrote: > Hi, > I downloaded new release of Omni frameworks and suddenly get an > error message I have never seem before > > header file 'OmniBase/NSObject-OBObjectCompatibility.h' not found. > > The framework was build without errors. What's wrong? > > Robert From outtersg at esiee.fr Mon May 7 00:06:44 2001 From: outtersg at esiee.fr (Guillaume) Date: Thu Nov 3 14:46:14 2005 Subject: CoreAudio Questions... In-Reply-To: <200105070315.UAA20279@outbox.omnigroup.com> Message-ID: <200105070712.JAA06494@argyre.fr.uu.net> Le lundi 7 mai 2001, ? 05:15, John H?rnkvist a ?crit : > On Saturday, May 5, 2001, at 12:12 AM, Michael Thompson wrote: >> >> I finally have the dev tools installed on my 100% unsupported Mac >> 8500. :-) I have a question about CoreAudio. I see a bunch of examples >> doing the audio processing inside the IOProc callback. I wonder if >> someone could post an example of sending a audio stream(buffer) to the >> callback. What I want to do is handle all of the processing outside the >> callback, maybe mix multiple streams of processors, then send one >> stream to the callback. Is this a good thing to do? > > I don't have any code handy right now, but it looks like a simple > exercise. (If I understand you correctly.) > > Use a circular queue as a buffer for the callback procedure. Do your > processing into the buffer. When the buffer goes full, sleep on a posix > condition. Let the callback consume buffers and signal the feeder when > the queue isn't full. Exactly what I did to port mpg123 :-) You can find the source at ; the whole (still non-official) mpg123 port package can be accessed one level up. In fact, it is still quite dirty, because I use sleep()/kill() to wake up my process, and some hacks to synchronize them. In a personal modified version (where I do some mixing), I use named semaphores, what should be done instead. But this version works well, uses a buffer loop, and (I think) is quite clean. If you don't know mpg123, what will most interest you are: audio_open, audio_close, and audio_play_samples (called when mpg123 has filled a buffer and wants me to dump it. In this procedure, I sleep() until I find a buffer in my loop where to put those samples). -- Guillaume Outters From nigel at ind.tansu.com.au Mon May 7 00:26:26 2001 From: nigel at ind.tansu.com.au (nigel@ind.tansu.com.au) Date: Thu Nov 3 14:46:14 2005 Subject: Possible bug in Cocoa? In-Reply-To: <200105070031.RAA13228@outbox.omnigroup.com> from "macosx-dev-request@omnigroup.com" at May 06, 2001 05:31:47 PM Message-ID: <20010507072506.5689.qmail@quoll.ind.tansu.com.au> Nicholas Shanks wrote: > > I'm new to cocoa, but implement the following code in my application > deligate and it doesn't work right: > > > - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication > { > return YES; > } > > - (void)applicationWillTerminate:(NSNotification *)notification > { > // this doesn't seem to be called when last window closed > } I was able to reproduce similar behaviour (i.e. only one one these being called) by having these in a .nib instantiated class (e.g. an NSObject called Controller), and _not_ setting the class as a delegate of NSApp. Thus, make sure that your class does something like: '[NSApp setDelegate:self];' in it's init method. -- | Nigel Pearson, nigel@ind.tansu.com.au | "Reality is that which, | | Telstra NW-D, Sydney, Australia. | when you stop believing | | Office: 9206 3468 Fax: 9212 6329 | in it, doesn't go away." | | Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis.' | From pa44 at cornell.edu Mon May 7 00:45:19 2001 From: pa44 at cornell.edu (Peter Ammon) Date: Thu Nov 3 14:46:14 2005 Subject: Thread communication idea Message-ID: <200105070745.DAA21582@postoffice2.mail.cornell.edu> I find that I often need to do some cleanup in the main thread when an NSThread exits, but the method called by the NSThreadWillExitNotification executes in the spawned thread. The idea I hit on is to create a non-repeating NSTimer with time interval 0 that calls my main thread cleanup function, and insert it into the main run loop (recorded before I spawned the thread) from my NSThreadWillExitNotification method. Is this idea any good? Thanks for any input. -Peter From tjw at omnigroup.com Mon May 7 02:12:17 2001 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:46:14 2005 Subject: Thread communication idea In-Reply-To: <200105070745.DAA21582@postoffice2.mail.cornell.edu> Message-ID: <200105070912.CAA13706@omnigroup.com> This is very likely not a good idea. I say 'very likely' since NSRunLoop has in the past been thread-unsafe. That is, it isn't guaranteed to be safe to talk to any runloop other than the one for your current thread. The documentation makes no claims either way (at least for NSRunLoop -- CFRunLoop might actually be thread-safe). Anyway, I wouldn't depend upon it being safe unless the docs say it is. Either way, you can do this very easily anyway with the API that exists with something like the following. -tim /* cc -Wall -O2 -o foo foo.m -framework Foundation */ #import @interface ThreadExample : NSObject { NSPort *threadDiedPort; NSPortMessage *threadDiedMessage; } - (void) runThread; - (void) threadWillExit: (NSNotification *) note; - (void) handlePortMessage:(NSPortMessage *)message; @end @implementation ThreadExample - init { threadDiedPort = [[NSPort port] retain]; [threadDiedPort setDelegate: self]; threadDiedMessage = [[NSPortMessage alloc] initWithSendPort: threadDiedPort receivePort:threadDiedPort components: [NSArray array]]; [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(threadWillExit:) name:NSThreadWillExitNotification object:nil]; [[NSRunLoop currentRunLoop] addPort: threadDiedPort forMode: NSDefaultRunLoopMode]; [NSThread detachNewThreadSelector:@selector(runThread) toTarget:self withObject: nil]; return self; } // never called, but we'll practice good form... - (void) dealloc; { [[NSNotificationCenter defaultCenter] removeObserver: self]; [[NSRunLoop currentRunLoop] removePort: threadDiedPort forMode: NSDefaultRunLoopMode]; [threadDiedMessage release]; [threadDiedPort release]; } - (void) runThread; { // nothing } - (void) threadWillExit: (NSNotification *) note; { NSLog(@"threadWillExit: called"); [threadDiedMessage sendBeforeDate: [NSDate distantFuture]]; } - (void) handlePortMessage:(NSPortMessage *)message; { if ([message receivePort] == threadDiedPort) NSLog(@"received message on thread death port"); } @end int main(int argc, char *argv[]) { NSAutoreleasePool *pool; pool = [[NSAutoreleasePool alloc] init]; [[ThreadExample alloc] init]; [[NSRunLoop currentRunLoop] runUntilDate: [NSDate distantFuture]]; [pool release]; return 0; } On Monday, May 7, 2001, at 12:38 AM, Peter Ammon wrote: > I find that I often need to do some cleanup in the main thread when an > NSThread exits, but the method called by the > NSThreadWillExitNotification executes in the spawned thread. The idea > I hit on is to create a non-repeating NSTimer with time interval 0 that > calls my main thread cleanup function, and insert it into the main run > loop (recorded before I spawned the thread) from my > NSThreadWillExitNotification method. > > Is this idea any good? > > Thanks for any input. > > -Peter > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From ghulands at mac.com Mon May 7 02:21:04 2001 From: ghulands at mac.com (Greg Hulands) Date: Thu Nov 3 14:46:14 2005 Subject: Printing to docket printers Message-ID: <200105070920.CAA18460@smtpout.mac.com> Hi, I am trying to print to an epson docket printer via the serial port. I have been able to send data to it but what it prints is jibberish. I am thinking the the ordering of bytes is important for it as these are mainly used on the intel platform do I need to change the data i send it? How do I change the byte ordering of it? Any hints or tips are greatly appreciated, Greg From jcr at idiom.com Mon May 7 02:27:51 2001 From: jcr at idiom.com (John C. Randolph) Date: Thu Nov 3 14:46:14 2005 Subject: Ob-C indeterminate number of arguments declarations Message-ID: <200105070927.CAA78619@idiom.com> Daniel Staudigel wrote: > > How do you declare and implement a method in obj-c (like NSArray's > arrayWithObjects:(id)firstObj, ...)? Declare a varargs list, e.g: va_list args; call the start macro: va_start(args, firstObj); and then call va_arg(args, typeOfWhatYouWantToRead) to get each argument in the list. Here's the way I did it a few weeks back: - (NSString *) stringByAppendingStrings:(NSString *) aString, ... /*"This instance method returns an autoreleased string which is the result of contatenating the reciever and all of the arguments given in a nil-terminated list."*/ { va_list strings; NSString *thisString, *result = [self stringByAppendingString:aString]; va_start(strings, aString); while (thisString = va_arg(strings, id)) result = [result stringByAppendingString:thisString]; va_end(strings); return result; } I didn't deal with the pathological case of someone handing me just a nil. You might also want to have a look at the man page for varargs. -jcr "The right to be heard does not include the right to be taken seriously." - Hubert Humphrey From sanguish at digifix.com Mon May 7 02:38:30 2001 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:46:14 2005 Subject: CoreGraphics Text... In-Reply-To: Message-ID: On Saturday, May 5, 2001, at 12:04 PM, listmail@cramnotch.com wrote: > > Does anyone have a dead simple example of how to draw text using > CoreGraphics? I've puttered around with most of the text related > functions in one way or another but haven't as yet actually drawn a > character! =) > I'm not sure if this is helpful to your situation or not, but Ralf Suckow has written an article on drawing with Cocoa (more about finding the documentation) and it includes an example. It's on Stepwise now http://www.stepwise.com/ From joar at mtvspider.com Mon May 7 02:39:15 2001 From: joar at mtvspider.com (j o a r) Date: Thu Nov 3 14:46:14 2005 Subject: Problems with NSTimer In-Reply-To: <200105062300.QAA02288@scv1.apple.com> Message-ID: On m?ndag, maj 7, 2001, at 01:00 , Chris Kane wrote: >> Apr 29 12:43:39 NetStat[1794] *** NSTimer ignoring exception >> 'NSGenericException' (reason 'encodeDataAt:ofObjCType: unencodable >> type (v@:)') that raised during posting of timer with target 1085740 >> and selector 'invoke' > NSTimer is trapping an exception and tossing it. For various reasons, > we cannot allow exceptions to percolate back through the run loop. If > you want to catch the exception yourself, put an NS_DURING etc. handler > in the method being invoked by the timer. This would allow you to > avoid the logging, at least. > > Now, as to what this particular exception is: something done by your > timer method (or indirectly) is using an NSArchiver to archive up > something. That process has hit the "v" type in the type string, which > stands for "void", which is not encodable. It's like something is > encoding up an NSMethodSignature's type string. But > NSMethodSignature's don't implement NSCoding, so I don't know what that > might be. Before I got your reply (these !"## lists...) I changed this: ================================================================= // Variables for the NSInvocation SEL theSelector; NSMethodSignature *aSignature; NSInvocation *anInvocation; // Set up the NSTimer theSelector = @selector(updateStatus); aSignature = [DimmuInterface instanceMethodSignatureForSelector:theSelector]; anInvocation = [NSInvocation invocationWithMethodSignature:aSignature]; [anInvocation setSelector:theSelector]; [anInvocation setTarget:self]; // Start the timer interfaceTimer = [NSTimer scheduledTimerWithTimeInterval:secondsPerUpdate invocation:anInvocation repeats:YES]; ================================================================= to this: ================================================================= interfaceTimer = [[NSTimer scheduledTimerWithTimeInterval:secondsPerUpdate target:self selector:@selector(updateStatus) userInfo:nil repeats:YES] retain]; ================================================================= And now it works fine without errors. Why is that? To me the methods are the same? Regards, j o a r From max at quendi.de Mon May 7 03:28:52 2001 From: max at quendi.de (Max Horn) Date: Thu Nov 3 14:46:14 2005 Subject: Clickable URL in NSTextView Message-ID: Is it possible to implement clickable URLs inside a NSTextView? I guess I'd have to subclass it, but I am not completly sure what I would have to do. I noticed there is a class NSTextAttachment, but from what I read in the docs, it seems to be attaching files only, not general-purpose stuff?!? Specifically, I want to be able to detect URLs in a text, display them in a different style (the one specified in InternetConfig for links), and then when the user double-/cmd-clicks on the URL in the text, that URL is launched. Any input is appreciated. ;) Max -- ----------------------------------------------- Max Horn C++/ObjC/Java Developer email: phone: (+49) 6151-494890 From ssudre at intego.com Mon May 7 03:49:04 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:14 2005 Subject: CoreGraphics Text... In-Reply-To: Message-ID: <1222889626-45330761@transeo.com> On lundi, mai 7, 2001, at 11:38 , Scott Anguish wrote: > > On Saturday, May 5, 2001, at 12:04 PM, listmail@cramnotch.com wrote: > >> >> Does anyone have a dead simple example of how to draw text using >> CoreGraphics? I've puttered around with most of the text related >> functions in one way or another but haven't as yet actually drawn a >> character! =) >> > > I'm not sure if this is helpful to your situation or not, but Ralf > Suckow has written an article on drawing with Cocoa (more about finding > the documentation) and it includes an example. > > It's on Stepwise now > > http://www.stepwise.com/ The article only deals with the AppKit and not CoreGraphics. When it comes to drawing text with CoreGraphics, you sometimes enter nightmare land (ATSUI stuff is a brain killer). If you're using Cocoa, it's easier to use the AppKit and you often get a better rendering time (I used CG to render some text and found that it was eating 25% of a G4 450 for the stuff I was doing. Using the Appkit, it fell to 0.x % of CPU time, because the AppKit really knows how to use the CG font part and I didn't). From Stefan_Jung at t-online.de Mon May 7 03:50:35 2001 From: Stefan_Jung at t-online.de (Stefan Jung) Date: Thu Nov 3 14:46:14 2005 Subject: Drawing into a View In-Reply-To: <200105050004.RAA16184@smtpout.mac.com> Message-ID: <14wiay-1fOwE4C@fwd07.sul.t-online.com> Am Samstag, 5. Mai 2001 um 02:04 schrieb Brian Campbell: > Sorry for the newbie question, but how do I draw into a NSView? > The NSView documentation says to subclass NSView and override > drawRect, but what commands do I use within drawRect for drawing? I am aware of two methods/APIs. NSBezierpath in AppKit and CoreGraphics. There is mostly forthcoming documentation for CoreGraphics, you will have to llok into the header files and example code. There is also a little Quartz Primer from Apple, but any other example code is as good as this. > For instance, I want to load an image and animate it moving > around in the view. How can I do that? Read documentation on Foundation/NSTimer and AppKit/NSImage-family. If you use NSImage & co. you do not have to bother with CoreGraphics. > The commands in NSGraphics.h don't seem to have anything for > displaying an image. Or do I use CoreGraphics, and if so, how do > I get the CGContextRef? NSGraphicsContext *graphicsContext = [NSGraphicsContext currentContext]; CGContextRef windowContext = [graphicsContext graphicsPort]; If you want to draw lines or something, it seems not as you want to LOAD an image, you also have to set a color like (NSBezierPath works similar): NSColor *foreColor = [[[NSColor redColor] colorUsingColorSpaceName:NSDeviceRGBColorSpace] retain]; CGContextSetRGBStrokeColor(windowContext, [foreColor redComponent], [foreColor greenComponent], [foreColor blueComponent], 1); Then something like: CGContextBeginPath(windowContext); CGContextMoveToPoint(windowContext,0,32); . . . follows. Again, if you use NSImage & co. you do not have to bother with CoreGraphics. Stefan Jung > > Thanks, > Brian Campbell > _______________________________________________ > 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: 2003 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010507/17950c42/attachment.bin From stephan at arboretum.com Mon May 7 04:26:31 2001 From: stephan at arboretum.com (stephan@arboretum.com) Date: Thu Nov 3 14:46:14 2005 Subject: Small controls Message-ID: Hello, When using IB to create controls, for many of them there's an option 'small' that creates a small version of the selected control. I have a need to create controls programmatically. The problem I have is that for many a control, there's no 'small' property in the class itself (or a setControlSize function). In this case, I have a problem with the NSSlider control, I have tried setting the frame to something I think to be the small size (12) as well as the knob thickness, but that doesn't seem to work. Anyone had that problem before or know the solution? Stephan From stefan.arentz at soze.com Mon May 7 04:33:11 2001 From: stefan.arentz at soze.com (Stefan Arentz) Date: Thu Nov 3 14:46:15 2005 Subject: Problems with NSTimer In-Reply-To: ; from joar@mtvspider.com on Mon, May 07, 2001 at 11:39:07AM +0200 References: <200105062300.QAA02288@scv1.apple.com> Message-ID: <20010507133124.A26162@keyser.soze.com> On Mon, May 07, 2001 at 11:39:07AM +0200, j o a r wrote: ... > Before I got your reply (these !"## lists...) I changed this: > > ================================================================= > // Variables for the NSInvocation > SEL theSelector; > NSMethodSignature *aSignature; > NSInvocation *anInvocation; > > // Set up the NSTimer > theSelector = @selector(updateStatus); > aSignature = [DimmuInterface > instanceMethodSignatureForSelector:theSelector]; > anInvocation = [NSInvocation > invocationWithMethodSignature:aSignature]; > [anInvocation setSelector:theSelector]; > [anInvocation setTarget:self]; > > // Start the timer > interfaceTimer = [NSTimer > scheduledTimerWithTimeInterval:secondsPerUpdate invocation:anInvocation > repeats:YES]; > ================================================================= > > to this: > > ================================================================= > interfaceTimer = [[NSTimer > scheduledTimerWithTimeInterval:secondsPerUpdate > target:self > selector:@selector(updateStatus) > userInfo:nil > repeats:YES] retain]; > ================================================================= > > And now it works fine without errors. Why is that? To me the methods are > the same? Almost the same. You do not retain the first timer. Stefan From mikevannorsdel at qwest.net Mon May 7 04:55:31 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:15 2005 Subject: nextKeyView problems Message-ID: <200105071155.EAA19043@omnigroup.com> I have a group of NSTextFields. By default, tabbing trough the fields doesn't go in the order I would like. So from IB I set field #2 as field #1's nextKeyView, field #3 as field #2's nextKeyView, and so on. But these settings don't change the tab order. Is there a different way this should be done to change the tab order? From stefan.arentz at soze.com Mon May 7 05:02:35 2001 From: stefan.arentz at soze.com (Stefan Arentz) Date: Thu Nov 3 14:46:15 2005 Subject: Lock & Unlock Icons In-Reply-To: <20010507035626.1873.qmail@quoll.ind.tansu.com.au>; from nigel@ind.tansu.com.au on Mon, May 07, 2001 at 01:56:26PM +1000 References: <200105041545.IAA17660@outbox.omnigroup.com> <20010507035626.1873.qmail@quoll.ind.tansu.com.au> Message-ID: <20010507140054.A26487@keyser.soze.com> On Mon, May 07, 2001 at 01:56:26PM +1000, nigel@ind.tansu.com.au wrote: ... > Ryan Stevens suggested: > > > > I'd just grab NetInfo Manager's lock/unlock icons and be done with it. > > > > It would be nice to have a standard set to work with that we knew was > > going to be around but I haven't seen anything yet. > > Nor I. Every time I want to use another "standard" icon, > I do find /System/Library -name \*.tif\* -exec open {} \; > > > Note 1: Project Builder lets you add images from paths like the above > without copying them. e.g. add icon files into your project's > Resources group (as an absolute path). The lock/unlock images are private to those frameworks. If you want to use them in your own project, use a copy and do not point to the ones in the frameworks you mention above. This has been brought up before in a discussion about the little arrows in column headers. Stefan From joar at mtvspider.com Mon May 7 05:03:42 2001 From: joar at mtvspider.com (j o a r) Date: Thu Nov 3 14:46:15 2005 Subject: Problems with NSTimer In-Reply-To: <20010507133124.A26162@keyser.soze.com> Message-ID: On m?ndag, maj 7, 2001, at 01:31 , Stefan Arentz wrote: > Almost the same. You do not retain the first timer. ...and this would explain the difference? The timer is fine until I invalidate it, when it in the first case raises an exception and in the second case it doesn't - which I guess would prove you right - but why? Why would I need to retain it in any case (it was retained in the code snippet I borrowed)? Is the timer handed to me autoreleased? If so, why does it work fine until I invalidate it? (Sorry for the newbie questions) I will not switch back to the other method in any case, this way of creating the timer is much more time saving (bad pun), but it would be interesting to know. I'm trying to get a grip of this, and still makes most mistakes with the release-retain stuff. BTW: On m?ndag, maj 7, 2001, at 01:00 , Chris Kane wrote: > Now, as to what this particular exception is: something done by your > timer method (or indirectly) is using an NSArchiver to archive up > something. That process has hit the "v" type in the type string, which > stands for "void", which is not encodable. It's like something is > encoding up an NSMethodSignature's type string. But > NSMethodSignature's don't implement NSCoding, so I don't know what that > might be. I am not using NSArchiver myself (afaik), so I don't know where that error comes from if it isn't used "behind the scenes" by the run time? Regards, j o a r From stefan.arentz at soze.com Mon May 7 05:07:55 2001 From: stefan.arentz at soze.com (Stefan Arentz) Date: Thu Nov 3 14:46:15 2005 Subject: Problems with NSTimer In-Reply-To: ; from joar@mtvspider.com on Mon, May 07, 2001 at 02:03:38PM +0200 References: <20010507133124.A26162@keyser.soze.com> Message-ID: <20010507140619.B26487@keyser.soze.com> On Mon, May 07, 2001 at 02:03:38PM +0200, j o a r wrote: > > On m?ndag, maj 7, 2001, at 01:31 , Stefan Arentz wrote: > > > Almost the same. You do not retain the first timer. > > ...and this would explain the difference? The timer is fine until I > invalidate it, when it in the first case raises an exception and in the > second case it doesn't - which I guess would prove you right - but why? > Why would I need to retain it in any case (it was retained in the code > snippet I borrowed)? Is the timer handed to me autoreleased? If so, why > does it work fine until I invalidate it? (Sorry for the newbie questions) Yes it is autoreleased because you created it with a 'convenience' method instead of alloc & initWith... What probably happens is that the garbage collector has cleaned up your timer, so when you invalidate it, it kinda works, it doesn't crash but operates on a nonexistent object. There is a good article on www.stepwise.com about memory management rules that you might want to read. Helped me a lot :-) Regards, Stefan From stefan.arentz at norad.org Mon May 7 05:10:05 2001 From: stefan.arentz at norad.org (Stefan Arentz) Date: Thu Nov 3 14:46:15 2005 Subject: System-wide networking notifications? In-Reply-To: <200105070234.TAA83716@idiom.com> Message-ID: <200105071208.OAA26626@keyser.soze.com> On Monday, May 7, 2001, at 04:33 AM, John C. Randolph wrote: Can anyone tell me how to get notified if a network connection goes down? I want to do the right thing if a time-consuming operation gets interrupted. John, do you mean the interface or the socket? Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 324 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010507/fb88ea21/attachment.bin From joar at mtvspider.com Mon May 7 05:26:22 2001 From: joar at mtvspider.com (j o a r) Date: Thu Nov 3 14:46:15 2005 Subject: Problems with NSTimer In-Reply-To: <20010507140619.B26487@keyser.soze.com> Message-ID: On m?ndag, maj 7, 2001, at 02:06 , Stefan Arentz wrote: >> ...and this would explain the difference? The timer is fine until I >> invalidate it, when it in the first case raises an exception and in the >> second case it doesn't - which I guess would prove you right - but why? >> Why would I need to retain it in any case (it was retained in the code >> snippet I borrowed)? Is the timer handed to me autoreleased? If so, why >> does it work fine until I invalidate it? (Sorry for the newbie >> questions) > Yes it is autoreleased because you created it with a 'convenience' > method instead of alloc & initWith... I don't see a plain init method in the docs - so I wouldn't know how to init a timer with the proper parameters if I din't use one of the convenience methods? Are all objects returned by these kind of methods autoreleased? > What probably happens is that the garbage collector has cleaned up your > timer, so when you invalidate it, it kinda works, it doesn't crash but > operates on a nonexistent object. But if it is released, why does it still work? If I relased a Timer it would still work as a timer, but couldn't respond to messages since it doesn't exist? Confusing... ;) > There is a good article on www.stepwise.com about memory management > rules that you might want to read. Helped me a lot :-) Have read it already - I guess I forgot to [retain]?it... Thanx for the help, j o a r From pa44 at cornell.edu Mon May 7 08:02:09 2001 From: pa44 at cornell.edu (Peter Ammon) Date: Thu Nov 3 14:46:15 2005 Subject: Clickable URL in NSTextView In-Reply-To: Message-ID: <200105071502.LAA17677@postoffice2.mail.cornell.edu> On Monday, May 7, 2001, at 06:27 AM, Max Horn wrote: > Is it possible to implement clickable URLs inside a NSTextView? I guess > I'd have to subclass it, but I am not completly sure what I would have > to do. I noticed there is a class NSTextAttachment, but from what I > read in the docs, it seems to be attaching files only, not > general-purpose stuff?!? > > > Specifically, I want to be able to detect URLs in a text, display them > in a different style (the one specified in InternetConfig for links), > and then when the user double-/cmd-clicks on the URL in the text, that > URL is launched. > > > Any input is appreciated. ;) > Yes, it's fairly easy. No subclassing necessary. Get the NSTextStorage of your NSTextView and set the NSLinkAttributeName attribute of the URL in the string to the address of the web page. Then implement the textView: clickedOnLink: atIndex: method in the NSTextView's delegate. Here's some basic untested sample code: - (void)hiliteAndActivateURLs:(NSTextView*)textView { NSTextStorage* textStorage=[textView textStorage]; NSString* string=[textStorage string]; NSRange searchRange=NSMakeRange(0, [string length]; NSRange foundRange; [textStorage beginEditing]; do { //We assume that all URLs start with http:// foundRange=[string rangeOfString:@"http://" options:0 range:searchRange]; if (foundRange.length > 0) { //Did we find a URL? NSURL* theURL; NSDictionary* linkAttributes; NSRange endOfURLRange; //Restrict the searchRange so that it won't find the same string again searchRange.location=foundRange.location; searchRange.length -= foundRange.location; //We assume the URL ends with whitespace endOfURLRange=[string rangeOfCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet] options:0 range:searchRange]; //The URL could also end at the end of the text. The next line fixes it in case it does if (endOfURLRange.location==0) endOfURLRange.location=[string length]-1; //Set foundRange's length to the length of the URL foundRange.length = endOfURLRange.location- foundRange.location+1; //grab the URL from the text theURL=[NSURL URLWithString:[string substringWithRange:foundRange]]; //Make the link attributes linkAttributes= [NSDictionary dictionaryWithObjectsAndKeys: theURL, NSLinkAttributeName, [NSNumber numberWithInt:NSSingleUnderlineStyle], NSUnderlineStyleAttributeName, [NSColor blueColor], NSForegroundColorAttributeName, NULL]; //Finally, apply those attributes to the URL in the text [textStorage addAttributes:linkAttributes range:foundRange]; } } while (foundRange.length==0); //repeat the do block until it no longer finds anything [textStorage endEditing]; } Now, in the delegate for your NSTextView, simply add this: - (BOOL)textView:(NSTextView*)textView clickedOnLink:(id)link atIndex:(unsigned)charIndex { BOOL success; success=[[NSWorkspace sharedWorkspace] openURL: link]; return success; } Note that this works for single clicks, not double clicks. But users are used to single clicking on links, so maybe that's better. -Peter From tinaddar at mac.com Mon May 7 08:23:51 2001 From: tinaddar at mac.com (James Roberts) Date: Thu Nov 3 14:46:15 2005 Subject: compiler In-Reply-To: Message-ID: I don't believe that you can download it anywhere. I could be wrong though. James Roberts -----Original Message----- From: macosx-dev-admin@omnigroup.com [mailto:macosx-dev-admin@omnigroup.com]On Behalf Of Rob Smith Sent: Sunday, May 06, 2001 5:45 PM To: Osxdevelopment Subject: compiler Where can I download the development tools for osx?? The Cd that shipped with our box set seems to have disappeared. Thanks Rob _______________________________________________ MacOSX-dev mailing list MacOSX-dev@omnigroup.com http://www.omnigroup.com/mailman/listinfo/macosx-dev From john at toastedmarshmallow.com Mon May 7 08:49:06 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:15 2005 Subject: Mail Preferences dialog - how? In-Reply-To: <20010505002933.RXUE718.femail4.rdc1.on.home.com@localhost> Message-ID: <20010507154859.0A59A11C001@fimail01.cabinet.net> On Saturday, May 5, 2001, at 02:27 AM, Mike Harrison wrote: > > I've been looking into how Mail.app implements its preferences dialog, > and it seems like each of the 6 icons at the top corresponds to a > separate nib file. Somehow when you click the buttons it loads the > corresponding nib file into the space below the icons. Also, there > doesn't seem to be a nib file corresponding to the preferences toolbar > at all. Can anyone tell me how they are doing this? I'd like to > implement a similar type of prefs dialog. I don't know how it's done in mail, but it is easy to implement. What you usually do is to have a view in the nib file which you remove from its superview and put in the preference window. Something like this: currentPreferenceController = ... ; [currentPreferenceView removeFromSuperview]; currentPreferenceView = [currentPreferenceController preferenceView]; [preferenceView addSubview:currentAttributeView]; The currentPreferenceController loads a nib when it is created, and returns a view containing your preference objects (typically a box with no borders) on preferenceView. If that isn't enough I can probably dig up some source. Regards, John Hornkvist From demars at mminternet.com Mon May 7 08:58:10 2001 From: demars at mminternet.com (Dennis C. De Mars) Date: Thu Nov 3 14:46:15 2005 Subject: CoreGraphics Text... In-Reply-To: Message-ID: on 5/7/01 2:38 AM, Scott Anguish at sanguish@digifix.com wrote: > > On Saturday, May 5, 2001, at 12:04 PM, listmail@cramnotch.com wrote: > >> >> Does anyone have a dead simple example of how to draw text using >> CoreGraphics? I've puttered around with most of the text related >> functions in one way or another but haven't as yet actually drawn a >> character! =) >> > > I'm not sure if this is helpful to your situation or not, but Ralf > Suckow has written an article on drawing with Cocoa (more about finding > the documentation) and it includes an example. > > It's on Stepwise now > > http://www.stepwise.com/ > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > The title of that article, "Mining for Quartz in Cocoa" is misleading. It gives the impression that it is going to be about accessing the CoreGraphics API from Cocoa, whereas it is actually a pointer to documentation on the Cocoa drawing classes -- which is a good thing, but the title should have been "Drawing in Cocoa" or something like that. The example code also uses only standard Cocoa classes, no CoreGraphics calls. Of course we all know that the Cocoa drawing classes are implemented under the hood with Quartz, but the use of Quartz in the title and the text of the article suggests that using the Cocoa drawing stuff is synonymous with using Quartz. Although Quartz is still not completely documented, there is now at least a nice introduction on the Apple web site (It's at ) Ironically, the article does not even contain a link to that intro document! The article itself is a good idea, it is in fact a frequently asked question: "where is the documentation for drawing in Cocoa?" The article performs a service by grouping all of the drawing-related links into one place. But it isn't going to provide any information to someone trying to access Quartz directly. For instance, the original question in this thread was clearly about CoreGraphics text routines, yet this article only contains pointers to NSStringAdditions documentation. I'm guessing that the original poster already knows how to use that stuff. - Dennis D. From jeff_lamarche at peoplesoft.com Mon May 7 09:09:24 2001 From: jeff_lamarche at peoplesoft.com (jeff_lamarche@peoplesoft.com) Date: Thu Nov 3 14:46:15 2005 Subject: Drawing into a View Message-ID: >Sorry for the newbie question, but how do I draw into a NSView? >The NSView documentation says to subclass NSView and override >drawRect, but what commands do I use within drawRect for >drawing? For instance, I want to load an image and animate it >moving around in the view. How can I do that? The commands in >NSGraphics.h don't seem to have anything for displaying an >image. Or do I use CoreGraphics, and if so, how do I get the >CGContextRef? I typed this directly into e-mail, so forgive any typos or mistakes - I don't guarantee this will compile as-is... Let's say you have an NSView called myView. Here is a simple example of drawing into it... // This command tells the system that your drawing commands should go to this view // ------------------------------------------------------------------------------- [myView lockFocus]; // You can set the color to draw in using the NSColor set method // ------------------------------------------------------------- [[NSColor blackColor] set]; // You can now draw using commands from objects like NSBezierPath and NSString // --------------------------------------------------------------------------- [NSBezierPath fillRect:NSMakeRect(left, right, width, height)]; // And when you're all done release the focus // ------------------------------------------ [myView unlockFocus]; Hope that helps you.. Jeff From ddavidso at apple.com Mon May 7 09:39:26 2001 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:46:15 2005 Subject: How to reveal a file/directory in finder... In-Reply-To: Message-ID: <200105071639.JAA12786@scv1.apple.com> On Friday, May 4, 2001, at 11:54 PM, laurens wrote: > in objC cocoa ? Use the NSWorkspace method - (BOOL)selectFile:(NSString *)fullPath inFileViewerRootedAtPath:(NSString *)rootFullpath; The current semantics of the Finder don't exactly match the Workspace behavior that this call was modeled upon, but you can reveal a file, for example, by specifying its path as fullPath and passing in nil for the rootFullpath. You can reveal the contents of a folder by passing in its path as rootFullpath and nil for fullPath. Douglas Davidson From chuck at benatong.com Mon May 7 09:46:32 2001 From: chuck at benatong.com (Charles Bennett) Date: Thu Nov 3 14:46:15 2005 Subject: Distributed Objects MacTech article problems (The don't seem to work anyway) Message-ID: <3AF6D15D.935BF3BD@benatong.com> Have you actually tried running the Distributed Object code snippet found at http://www.mactech.com/articles/mactech/Vol.16/16.05/HotChocolate/index.html After fixing a couple of errors.. (paste errors?) NSDistantObject* serverObject= [NSConnection rootProxyForConnectionWithRegisteredName:@"MyServer" isn't a valid statement.. it's missing the ending "];" and needs a "host:" parameter it most likely should be NSDistantObject* serverObject= [NSConnection rootProxyForConnectionWithRegisteredName:@"FOO" host:@"MyServer"]; and in the method - (NSConnection*) createConnectionName:(NSString*)name if ([newConnection registerName:@"name"]) had better be if ([newConnection registerName:@name]) << Message-ID: <200105071658.JAA97725@idiom.com> On Monday, May 7, 2001, at 12:04 AM, Stefan Arentz wrote: > On Monday, May 7, 2001, at 04:33 AM, John C. Randolph wrote: > > > Can anyone tell me how to get notified if a network connection goes > down? I want to do the right thing if a time-consuming operation gets > interrupted. > > John, do you mean the interface or the socket? I mean the interface. -jcr "Scientology is both immoral and socially obnoxious... it is corrupt, sinister and dangerous." - Mr. Justice Latey, London 1984 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 601 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010507/1592a49a/attachment.bin From gtapolow at yahoo.com Mon May 7 10:02:28 2001 From: gtapolow at yahoo.com (G. 'Andrew' Tapolow) Date: Thu Nov 3 14:46:15 2005 Subject: [Q] Opening a secondary Window Message-ID: <200105071702.KAA04127@mailer.symantec.com> Please forgive duplication, this was originally submitted to this list 5/5/1 at 5:47pm but seems to have been lost in transit. Newbie obj-c programmer question I'm trying to bring up a secondary window. Currently it is similar to a simple question dialog. The window has 2 text fields and a button. I've created and linked the controller class to it, created the files and inserted them in the project. The window is in the main nib that the main window is. The questions I have are: 1) What is the process from one controller.m to show the secondary window and use that windowController's class. 2) How can I make a c wrapper around one of an obj-c classes methods? Still very new at all of this and all help is very strongly appreciated. -Andrew From ckane at apple.com Mon May 7 10:46:56 2001 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:46:15 2005 Subject: How can I get the name of the computer ? In-Reply-To: <20010505141247.7D68A62C1@smtp-1.enteract.com> Message-ID: <200105071746.KAA05355@scv1.apple.com> ... Though you may not be able to do it in a one-liner or it might be more trouble than it's worth. As a software engineer, I distrust the use of this particular one-liner, because it is and looks very convenient, but is expensive. It is tempting to copy/paste this line elsewhere (or several elsewheres) and every time you're going to be loading and parsing the dictionary, getting one value, and then throwing the whole thing away (via autorelease). I've seen this sort of thing happen before (and run across such code in the system software). Using multiple lines won't make it look so cheap, and will make you realize later when you want another key out of the dictionary where the best place to put that is. Chris Kane Cocoa Frameworks, Apple, Inc. On Saturday, May 5, 2001, at 07:12 AM, Eric Peyton wrote: > Yes, look at the documentation on CFDictionary. > > Eric > > On Thursday, May 3, 2001, at 04:58 AM, Martin Bestmann wrote: > >> At 2:40 Uhr -0700 23.04.2001, Kurt Revis wrote: >>> [[NSDictionary >>> dictionaryWithContentsOfFile:@"/var/db/SystemConfiguration/preferences. >>> xml" >>> ] valueForKeyPath:@"System.System.ComputerName"]; >> >> Is there also a non ObjC way (e.g. C/C++) of doing the above line in >> one single statement? From mirko.viviani at rccr.cremona.it Mon May 7 11:01:48 2001 From: mirko.viviani at rccr.cremona.it (Mirko Viviani) Date: Thu Nov 3 14:46:15 2005 Subject: NSSavePanel -selectText: Message-ID: <200105071807.UAA03823@mail.rccr.cremona.it> Ciao! Could someone tell me when -[NSSavePanel selectText:] is called ? I've done some test in OS4.2 but it seems that is never called. Thanks. --- Bye, Mirko (NeXTmail, MIME) From simonrobins at mac.com Mon May 7 12:07:11 2001 From: simonrobins at mac.com (Simon Robins) Date: Thu Nov 3 14:46:15 2005 Subject: Where do I call MCIsPlayerEvent. In-Reply-To: <200105042215.PAA06155@outbox.omnigroup.com> Message-ID: <200105071906.MAA05121@smtpout.mac.com> I am currently writing a new Carbon application which uses Quicktime. As this is a new application I would like to use Carbon Events, but I can't see where the QuickTime call MCIsPlayerEvent would be called. All the sample code I've seen uses the classic event loop. Is it possible to use the Carbon Event Manager with QuickTime. Cheers From john at toastedmarshmallow.com Mon May 7 12:08:49 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:15 2005 Subject: Playing with NSBitMapImageRep - rephrased. In-Reply-To: Message-ID: <20010507190840.1564111C009@fimail01.cabinet.net> On Saturday, May 5, 2001, at 04:24 AM, Timothy Paustian wrote: > My thinking is that this code will read the value of the pixel that > pixelPointer points to and assign it to sum. These values should be in > the range of 0-255. When I do this all I get is 255, never anything > else. I never saw the original mail, so I may well be missing something, but if the image is in a planar configuration you might be getting the data from the alpha plane. You can find out by using [bitmap isPlanar]; Regards, John Hornkvist From froy at austin.rr.com Mon May 7 12:32:02 2001 From: froy at austin.rr.com (Fabien Roy) Date: Thu Nov 3 14:46:15 2005 Subject: Removing whitespace Message-ID: <1222858566-77267342@Snakefeet.com> Excerpt from OmniFoundation's NSString category: - (NSString *)stringByRemovingSurroundingWhitespace; { static NSCharacterSet *nonWhitespace = nil; NSRange firstValidCharacter, lastValidCharacter; if (!nonWhitespace) { nonWhitespace = [[[NSCharacterSet characterSetWithCharactersInString: @" \t\r\n"] invertedSet] retain]; } firstValidCharacter = [self rangeOfCharacterFromSet:nonWhitespace]; if (firstValidCharacter.length == 0) return @""; lastValidCharacter = [self rangeOfCharacterFromSet:nonWhitespace options:NSBackwardsSearch]; if (firstValidCharacter.location == 0 && lastValidCharacter.location == [self length] - 1) return self; else return [self substringWithRange:NSUnionRange(firstValidCharacter, lastValidCharacter)]; } From robsmith at hfx.eastlink.ca Mon May 7 13:06:38 2001 From: robsmith at hfx.eastlink.ca (Rob Smith) Date: Thu Nov 3 14:46:15 2005 Subject: gcc ./configure problems Message-ID: <200105072006.f47K6cb00212@m5.andara.com> I was trying to configure ncurses when I realized I needed development tools installed so I installed them. Tried to configure ncurses again and still wouldn't work. Someone kindly pointed out that I didn't have gcc installed so I downloaded it from the apple site. Now I get the following error when trying to configure gcc. the last 2 lines are interesting. the compiler doesn't work and can't make executables?? Any ideas on what might be wrong? > [localhost:downloads/gcc-3/gcc] root# ./configure > loading cache ./config.cache > checking LIBRARY_PATH variable... ok > checking GCC_EXEC_PREFIX variable... ok > checking host system type... powerpc-apple-darwin1.3.2 > checking target system type... powerpc-apple-darwin1.3.2 > checking build system type... powerpc-apple-darwin1.3.2 > checking for gcc... no > checking for cc... cc > checking whether the C compiler (cc ) works... no > configure: error: installation or configuration problem: C compiler > cannot create executables. > [localhost:downloads/gcc-3/gcc] root# From robsmith at hfx.eastlink.ca Mon May 7 13:08:32 2001 From: robsmith at hfx.eastlink.ca (Rob Smith) Date: Thu Nov 3 14:46:15 2005 Subject: gcc ./configure problems Message-ID: <200105072008.f47K8Qb01587@m5.andara.com> I was trying to configure ncurses when I realized I needed development tools installed so I installed them. Tried to configure ncurses again and still wouldn't work. Someone kindly pointed out that I didn't have gcc installed so I downloaded it from the apple site. Now I get the following error when trying to configure gcc. the last 2 lines are interesting. the compiler doesn't work and can't make executables?? Any ideas on what might be wrong? > [localhost:downloads/gcc-3/gcc] root# ./configure > loading cache ./config.cache > checking LIBRARY_PATH variable... ok > checking GCC_EXEC_PREFIX variable... ok > checking host system type... powerpc-apple-darwin1.3.2 > checking target system type... powerpc-apple-darwin1.3.2 > checking build system type... powerpc-apple-darwin1.3.2 > checking for gcc... no > checking for cc... cc > checking whether the C compiler (cc ) works... no > configure: error: installation or configuration problem: C compiler > cannot create executables. > [localhost:downloads/gcc-3/gcc] root# From pa44 at cornell.edu Mon May 7 13:43:58 2001 From: pa44 at cornell.edu (Peter Ammon) Date: Thu Nov 3 14:46:15 2005 Subject: Clickable URL in NSTextView Message-ID: <200105072043.QAA20585@postoffice2.mail.cornell.edu> I made several grievous mistakes in my previous function. This one should work better. - (void)hiliteAndActivateURLs:(NSTextView*)textView { NSTextStorage* textStorage=[textView textStorage]; NSString* string=[textStorage string]; NSRange searchRange=NSMakeRange(0, [string length]); NSRange foundRange; [textStorage beginEditing]; do { //We assume that all URLs start with http:// foundRange=[string rangeOfString:@"http://" options:0 range:searchRange]; if (foundRange.length > 0) { //Did we find a URL? NSURL* theURL; NSDictionary* linkAttributes; NSRange endOfURLRange; //Restrict the searchRange so that it won't find the same string again searchRange.location=(foundRange.location+1); searchRange.length -= (foundRange.location+1); //We assume the URL ends with whitespace endOfURLRange=[string rangeOfCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet] options:0 range:searchRange]; //The URL could also end at the end of the text. The next line fixes it in case it does if (endOfURLRange.length==0) endOfURLRange.location=[string length]-1; //Set foundRange's length to the length of the URL foundRange.length = endOfURLRange.location- foundRange.location+1; //grab the URL from the text theURL=[NSURL URLWithString:[string substringWithRange:foundRange]]; //Make the link attributes linkAttributes= [NSDictionary dictionaryWithObjectsAndKeys: theURL, NSLinkAttributeName, [NSNumber numberWithInt:NSSingleUnderlineStyle], NSUnderlineStyleAttributeName, [NSColor blueColor], NSForegroundColorAttributeName, NULL]; //Finally, apply those attributes to the URL in the text [textStorage addAttributes:linkAttributes range:foundRange]; } } while (foundRange.length!=0); //repeat the do block until it no longer finds anything [textStorage endEditing]; } From stefan.arentz at norad.org Mon May 7 13:59:39 2001 From: stefan.arentz at norad.org (Stefan Arentz) Date: Thu Nov 3 14:46:15 2005 Subject: System-wide networking notifications? In-Reply-To: <200105071658.JAA97725@idiom.com> Message-ID: <200105072057.WAA01456@keyser.soze.com> On Monday, May 7, 2001, at 06:57 PM, John C. Randolph wrote: On Monday, May 7, 2001, at 12:04 AM, Stefan Arentz wrote: On Monday, May 7, 2001, at 04:33 AM, John C. Randolph wrote: Can anyone tell me how to get notified if a network connection goes down? I want to do the right thing if a time-consuming operation gets interrupted. John, do you mean the interface or the socket? I mean the interface. There are two APIs that you can use. First there are kernel events, the configd source code in Darwin uses this, and there is a standard routing socket on which you can receive interface up and down events. The latter is documented in TCP/IP Illustrated. Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 906 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010507/bf4d1ea9/attachment.bin From richards9 at mac.com Mon May 7 14:38:23 2001 From: richards9 at mac.com (Richard Schreyer) Date: Thu Nov 3 14:46:15 2005 Subject: iconForFileType broken In-Reply-To: <200105071858.LAA01509@scv1.apple.com> Message-ID: <200105072137.OAA26282@smtpout.mac.com> On Monday, May 7, 2001, at 11:58 AM, Douglas Davidson wrote: > On Sunday, May 6, 2001, at 07:21 PM, Steve Gehrman wrote: > >> folderIcon = [[[NSWorkspace sharedWorkspace] >> iconForFileType:NSDirectoryFileType] retain]; > > NSDirectoryFileType is, as documented, a return value for > getInfoForFile:, not an argument to iconForFileType:. The arguments > for iconForFileType: are file type strings in the sense described in > Foundation/NSHFSFileTypes.h: either extensions or else encoded HFS > types. There do appear to be some circumstances in which the > lower-level services that NSWorkspace uses return a less-specific icon > to iconForFileType: than to iconForFile:. We are working on this issue. I found out, mostly by luck, that you can get the default folder icon using the type code 'fldr' with the quotes, since it is a HFS Type code, not a filename extension. Richard Schreyer From chuck at apple.com Mon May 7 17:22:55 2001 From: chuck at apple.com (Chuck Pisula) Date: Thu Nov 3 14:46:15 2005 Subject: Small controls In-Reply-To: Message-ID: <200105080022.RAA29642@scv2.apple.com> Use setControlSize: with NSSmallControlSize (I think these are defined in NSCell.h, not sure though). For some you have to do setControlSize: on the cell instead of the control itself (those that have cells...) -c On Monday, May 7, 2001, at 04:27 AM, stephan@arboretum.com wrote: > Hello, > > When using IB to create controls, for many of them there's an option > 'small' that creates a small version of the selected control. > > I have a need to create controls programmatically. > > The problem I have is that for many a control, there's no 'small' > property in the class itself (or a setControlSize function). > > In this case, I have a problem with the NSSlider control, I have tried > setting the frame to something I think to be the small size (12) as > well as the knob thickness, but that doesn't seem to work. > > Anyone had that problem before or know the solution? > > Stephan > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From torrey at mrcla.com Mon May 7 17:30:41 2001 From: torrey at mrcla.com (Torrey T. Lyons) Date: Thu Nov 3 14:46:15 2005 Subject: new release of Omni frameworks Message-ID: In this case, the .h is cut off if you unpack the tarball with StuffIt Expander. Use gnutar instead. --Torrey At 5:20 PM -0700 5/7/01, Brian Campbell wrote: >The .h seems to have been cut off some how. You just need to rename it. > >On Monday, May 7, 2001, at 01:50 AM, Robert Cerny wrote: > >> Hi, >> I downloaded new release of Omni frameworks and suddenly get an >> error message I have never seem before >> > > header file 'OmniBase/NSObject-OBObjectCompatibility.h' not found. From ccunning at math.ohio-state.edu Mon May 7 17:35:39 2001 From: ccunning at math.ohio-state.edu (Chad Cunningham) Date: Thu Nov 3 14:46:15 2005 Subject: gcc ./configure problems In-Reply-To: <200105072006.f47K6cb00212@m5.andara.com> Message-ID: Do you really need to install gcc? The version included with the developer tools should be sufficient. I downloaded ncurses and it compiled and installed fine, perhaps your tools are not properly installed. There is also a package with ncurses 5.2 at http://softrak.stepwise.com/display?pkg=1272&os=20, it was built pre 10.0 but it should work. On Mon, 7 May 2001, Rob Smith wrote: > I was trying to configure ncurses when I realized I needed development > tools installed so I installed them. Tried to configure ncurses again > and still wouldn't work. Someone kindly pointed out that I didn't have > gcc installed so I downloaded it from the apple site. Now I get the > following error when trying to configure gcc. the last 2 lines are > interesting. the compiler doesn't work and can't make executables?? > Any ideas on what might be wrong? > > > > > [localhost:downloads/gcc-3/gcc] root# ./configure > > loading cache ./config.cache > > checking LIBRARY_PATH variable... ok > > checking GCC_EXEC_PREFIX variable... ok > > checking host system type... powerpc-apple-darwin1.3.2 > > checking target system type... powerpc-apple-darwin1.3.2 > > checking build system type... powerpc-apple-darwin1.3.2 > > checking for gcc... no > > checking for cc... cc > > checking whether the C compiler (cc ) works... no > > configure: error: installation or configuration problem: C compiler > > cannot create executables. > > [localhost:downloads/gcc-3/gcc] root# > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > -- Chad Cunningham ccunning@math.ohio-state.edu "Well, once again my friend, we find that science is a two-headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is bad! Oh beware the other head of science, Arthur, it bites!" From chuck at apple.com Mon May 7 17:47:12 2001 From: chuck at apple.com (Chuck Pisula) Date: Thu Nov 3 14:46:15 2005 Subject: Drawing into a View In-Reply-To: Message-ID: <200105080020.RAA12184@scv1.apple.com> Typically you don't lock focus on your view directly. you should override drawRect: , which is wrapped by a lockFocus / unlockFocus for you. As far as primitives... NSBezierPath is for path based drawing, NSImage can draw/composite, and NSString (and attributed strings) know how to draw themselves. Also, you can always use CG functions which some have pointed out. -chuck On Monday, May 7, 2001, at 09:09 AM, jeff_lamarche@peoplesoft.com wrote: > // This command tells the system that your drawing commands should go to > this view > // > ------------------------------------------------------------------------------- > [myView lockFocus]; > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 706 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010507/b7df3b49/attachment.bin From nigel at ind.tansu.com.au Mon May 7 18:15:21 2001 From: nigel at ind.tansu.com.au (nigel@ind.tansu.com.au) Date: Thu Nov 3 14:46:15 2005 Subject: Lock & Unlock Icons In-Reply-To: <20010507140054.A26487@keyser.soze.com> from "Stefan Arentz" at May 07, 2001 02:00:55 PM Message-ID: <20010508011323.6470.qmail@quoll.ind.tansu.com.au> Ryan Stevens suggested: > > I'd just grab NetInfo Manager's lock/unlock icons and be done with it. > > It would be nice to have a standard set to work with that we knew was > going to be around but I haven't seen anything yet. I commented: > > Nor I. Every time I want to use another "standard" icon, > I do find /System/Library -name \*.tif\* -exec open {} \; > > > Note 1: Project Builder lets you add images from paths like the above > without copying them. e.g. add icon files into your project's > Resources group (as an absolute path). Stefan critiqued: > > The lock/unlock images are private to those frameworks. If you want to > use them in your own project, use a copy and do not point to the ones in > the frameworks you mention above. This has been brought up before in a > discussion about the little arrows in column headers. While that is the most sensible thing for reliable building, I think there is some value in knowing when the images in Apple's private frameworks change: 1) If I upgrade the OS or Developer Tools and the image goes missing, it could mean that there is a new standard image library for me to start using 2) If Apple updates their image (e.g. the reset.tif button from the login window between PB & GM) then I automatically get the latest one next time I build, which means that my program will better match Apple's "standards" -- | Nigel Pearson, nigel@ind.tansu.com.au | "Reality is that which, | | Telstra NW-D, Sydney, Australia. | when you stop believing | | Office: 9206 3468 Fax: 9212 6329 | in it, doesn't go away." | | Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis.' | From john at toastedmarshmallow.com Mon May 7 18:22:00 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:15 2005 Subject: AltiVec In-Reply-To: <200105050447.VAA02956@omnigroup.com> Message-ID: <20010508011738.48AF611C001@fimail01.cabinet.net> On Saturday, May 5, 2001, at 06:47 AM, Daniel Staudigel wrote: > I believe that the "optimization" pulldown menu in the application > settings tab of "edit current target" under the project menu will do > just that, although I am not sure, anyway, it gives faster programs and > smaller files, so it's gotta be good! (gcc produces lousy code when compiling without optimization. Lots of unnecessary register shuffling, jumps to the next line and things like that. -O takes care of that.) > On Wednesday, May 2, 2001, at 04:59 PM, David Shaffer wrote: > >> are there any scientific frameworks that have been AltiVec-ized? >> things like fft, ifft, etc Check out /System/Library/Frameworks/vecLib.framework. >> are there any options that can be given to ProjectBuilder to add >> AltiVec optimization to an app /framework? -faltivec turns on support for AltiVec, so you can write AltiVec code, but I doubt gcc does automatic vectorizing yet. Regards, John Hornkvist From alex at gestalt.com Mon May 7 18:39:05 2001 From: alex at gestalt.com (Alexandr Molochnikov) Date: Thu Nov 3 14:46:15 2005 Subject: PSWait - equivalent in Cocoa? Message-ID: <00d701c0d760$3da04600$f24ce4cf@207.228.64.39> Hello everyone, PSWait() was a PostScript function that flushed the generated PostScript code to the window server. It was used to smooth UI responses to such user gestures as dragging. What is the Cocoa/Quartz equivalent to PSWait()? Is it perhaps hidden somewhere in the AppKit, like single-op PS functions now wrapped in NSBezierPath? Is it even needed in Mac OS X apps? Any clues are highly appreciated. Alex Molochnikov Gestalt Corporation From brian_hill at unioncab.com Mon May 7 19:43:51 2001 From: brian_hill at unioncab.com (Brian Hill) Date: Thu Nov 3 14:46:15 2005 Subject: Much of WO/EOF 4.5.1 doesn't actually work on OS X Message-ID: Hello, Well, I got my WO 4.5.1 for OSX upgrade today, and tried to create a quick EOF Cocoa application on OSX. While I was able to create the simple Single Table application using the EOWizard, and it built and ran, modifying the nib in Interface Builder was another matter. After I made sure that the EOPalette.palette was properly loaded, I could open the nib just fine. Unfortunately, you can't actually change the EOAssociations created by the EOWizard with it, or create new EOAssociation connections. Attempting to call up the Inspector on an EODisplayGroup in a nib throws this error consistently: May 07 13:52:03 Interface Builder[4102] Exception raised during posting of notification. Ignored. exception: *** +[WBProject projectAtPath:includeFrameworks:autoParse:]: selector not recognized Attempting to inspect an existing EOAssociation displays a screwed up (and non-functional) inspector panel. There appears to be no way to create new EOAssociations with this. It will not display the keys on the targeted EODisplayGroup, and well, you just got to see it. Try it. NOTE: I am not an EOF newbie. I've created many EOF applications on OSX Server. This update is broken. I tried this same set of tests (install WO 4.5.1 developer, use ProjectBuilderWO to create a new EOF Application with the wizard, attempt to modify it in IB) on 3 different machines today, two with the 10.0.2 update already applied, and one brand new iMac with 10.0.0 and the Dev tools installed just today (ie., completely pristine). Same, non-functional IB integration on all three machines. It seems quite obvious to me that this update wasn't tested much on OSX. If it was, apparently no-one tested the IB palette at all. It doesn't work. The WebObjects stuff seems to work fine in a development install. It's basically just the InterfaceBuilder integration that's hosed. Without that, though, well... I am hoping and praying that somehow, I've made a mistake, and that WO 4.5.1 for OSX actually does work after all. I'm in a huge bind with this at my workplace, as I'm sure many other developers are, having waited so long for this update. Please, if anyone else has received the WO 4.5.1 update already, if your Interface Builder integration actually works, I'd really appreciate knowing. Brian ps. There are also about a zillion duplicate symbol errors between the 4.5.1 EOInterface.framework and the AppleUtilities.framework in PrivateFrameworks as well. Apparently, that's where they stashed what was left of the EOF frameworks when if finally disappeared from PrivateFrameworks between the PB and OSX 1.0.(?) brianhill@mac.com http://personalpages.tds.net/~brian_hill ?????????????????????????????????????????????????????? "Why? I came into this game for adventure - go anywhere, travel light, get in, get out, wherever there's trouble, a man alone. Now they've got the whole country sectioned off and you can't move without a form. I'm the last of a breed." -- Archibald "Harry" Tuttle, Rogue HVAC Repairman ?????????????????????????????????????????????????????? From Halliday at WebWizardry.net Mon May 7 19:51:13 2001 From: Halliday at WebWizardry.net (David W. Halliday) Date: Thu Nov 3 14:46:15 2005 Subject: AltiVec References: <20010508011738.48AF611C001@fimail01.cabinet.net> Message-ID: <3AF75ED2.55940FAD@WebWizardry.net> John H?rnkvist wrote: > On Saturday, May 5, 2001, at 06:47 AM, Daniel Staudigel wrote: > > ... > > >> are there any options that can be given to ProjectBuilder to add > >> AltiVec optimization to an app /framework? > > -faltivec turns on support for AltiVec, so you can write AltiVec code, > but I doubt gcc does automatic vectorizing yet. > > Regards, > John Hornkvist Automatic vectorization is a very hard problem (it's essentially an AI problem). Most automatic vectorization relies upon pattern recognition, which is easily fouled up when programmers try to do array "optimizations" (most notably, pointer arithmetic---very bad for most optimizations done by compilers anyway). Of course, this to be expected from a language that was designed to be a high level assembly language (or low level direct compiled language)---there will always be automatic optimizations that will, in general, be precluded by the nature of the language. I look forward to a Fortran 90 or 95 compiler, since it's built-in ability to express vector processing makes the use of AltiVec (and other) SIMD acceleration a very straight forward optimization (of course, making optimization easy has been a hallmark of Fortran since very early on). However, no one need conclude from my comments any feeling that Fortran is always superior to C (I wouldn't want to write driver code in Fortran, and I hated having to write business software in Fortran for an "Advanced Fortran" programming course [COBOL or Lisp would have been /much/ easier]). David Halliday@WebWizardry.net From john at toastedmarshmallow.com Mon May 7 20:42:49 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:15 2005 Subject: AltiVec In-Reply-To: <3AF75ED2.55940FAD@WebWizardry.net> Message-ID: <20010508034239.9982311C001@fimail01.cabinet.net> On Tuesday, May 8, 2001, at 04:49 AM, David W. Halliday wrote: > > Automatic vectorization is a very hard problem (it's essentially an > AI > problem). Indeed, and particularly for a language like C. The only evident optimization is the use of prefetch instructions -- part of AltiVec, but not a program transformation at all. > Most automatic vectorization relies upon pattern recognition, > which is easily fouled up when programmers try to do array > "optimizations" > (most notably, pointer arithmetic---very bad for most optimizations > done by > compilers anyway). > Of course, this to be expected from a language that was > designed to be a high level assembly language (or low level direct > compiled > language)---there will always be automatic optimizations that will, in > general, be precluded by the nature of the language. Yeah; C's pointers makes for ample aliasing opportunities, and that renders lots and lots of nice program transformations useless. To handle aliasing, in a language where it can occur, you need to do strong type analysis at least. (IIRC, gcc's -fstrict-aliasing does some of that, but doesn't preserve semantics; a program compiled with -fstrict-aliasing might not give return the same result as without this analysis.) I've been looking at the back end of some compilers that compile to C (GHC and Mercury, notably), and it is very interesting to see what hoops they jump through to get past C's call semantics. (GHC even post-processes the assembly output with a PERL program.) > I look forward to a Fortran 90 or 95 compiler, since it's built-in > ability to express vector processing makes the use of AltiVec (and > other) > SIMD acceleration a very straight forward optimization (of course, > making > optimization easy has been a hallmark of Fortran since very early on). And then there's the usual feedback loop; since such a lot of performance critical code was written in Fortran, lots of research went into how to do the necessary transformations. The super computer companies worked rather hard on automatic vectorization of Fortran codes (and C programs too, for that matter, but with less success, as I recall; language extensions tend to be necessary). Regards, John Hornkvist From ryanstevens at mac.com Mon May 7 21:47:41 2001 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:46:15 2005 Subject: Posting problems & mailing list woes In-Reply-To: Message-ID: <200105080447.VAA25095@omnigroup.com> Just thought I'd attempt to consolidate the two parallel threads here. Any word on what's going on or a fix planned? I've been having all the problems described in these 2 threads. Things are very strange 'round these parts lately.... From ryanstevens at mac.com Mon May 7 21:57:24 2001 From: ryanstevens at mac.com (Ryan Stevens) Date: Thu Nov 3 14:46:15 2005 Subject: Posting problems & mailing list woes (forgot "awaits mod..") In-Reply-To: <200105080447.VAA25095@omnigroup.com> Message-ID: <200105080457.VAA25786@omnigroup.com> I wrote: > Just thought I'd attempt to consolidate the two parallel threads here. > > Any word on what's going on or a fix planned? I've been having all the > problems described in these 2 threads. > > Things are very strange 'round these parts lately.... > I forgot to throw in the "Your message to MacOSX-dev awaits moderator approval" in with my attempt to consolidate. I've seen this one a few times as well. Everything seems ok now but I'm not un-crossing my fingers just yet. From dimitry.markman at verizon.net Mon May 7 22:14:04 2001 From: dimitry.markman at verizon.net (Dmitry Markman (verizon)) Date: Thu Nov 3 14:46:15 2005 Subject: How I can enable Preferences Item in AppleMenu in Carbon? In-Reply-To: <200105042235.PAA21334@omnigroup.com> Message-ID: <200105080518.FAA3111990@smtp5ve.mailsrvcs.net> Hi, How I can enable Preferences Item in AppleMenu in Carbon? Thank you From life_magick at mac.com Mon May 7 22:15:41 2001 From: life_magick at mac.com (G.'Andrew' Tapolow) Date: Thu Nov 3 14:46:15 2005 Subject: mailing woes In-Reply-To: <200105060047.RAA04098@smtpout.mac.com> Message-ID: <20010508051528.2D5F85D95A@pop136-mc.mail.com> On Saturday, May 5, 2001, at 05:47 PM, G. 'Andrew' Tapolow wrote: > Received: from outbox.omnigroup.com (198.151.161.40) by > mta106.mail.yahoo.com with SMTP; 07 May 2001 20:37:02 -0700 (PDT) > Received: from omnigroup.com (omnigroup.com [198.151.161.1]) by > outbox.omnigroup.com (8.9.1/8.9.1) with ESMTP id RAA04172; Sun, 6 May > 2001 17:08:07 -0700 (PDT) > Received: from smtpout.mac.com (smtpout.mac.com [204.179.120.88] (may > be forged)) by omnigroup.com (8.9.1/8.9.1) with ESMTP id RAA06065 for > ; Sat, 5 May 2001 17:48:24 -0700 (PDT) May be forged? -A From sanguish at digifix.com Mon May 7 22:20:55 2001 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:46:15 2005 Subject: CoreGraphics Text... In-Reply-To: Message-ID: On Monday, May 7, 2001, at 11:58 AM, Dennis C. De Mars wrote: > The title of that article, "Mining for Quartz in Cocoa" is misleading. > It > gives the impression that it is going to be about accessing the > CoreGraphics > API from Cocoa, No, it doesn't say "Mining for CoreGraphics in Cocoa". > whereas it is actually a pointer to documentation on the > Cocoa drawing classes -- which is a good thing, but the title should > have > been "Drawing in Cocoa" or something like that. The example code also > uses > only standard Cocoa classes, no CoreGraphics calls. > As I said, "I'm not sure if this is helpful to your situation or not" > Of course we all know that the Cocoa drawing classes are implemented > under > the hood with Quartz, but the use of Quartz in the title and the text > of the > article suggests that using the Cocoa drawing stuff is synonymous with > using > Quartz. > You are using Quartz... you just aren't at the level of CoreGraphics. > Although Quartz is still not completely documented, there is now at > least a > nice introduction on the Apple web site (It's at > > ) Ironically, the article does not even contain a link to that intro > document! > Shucks, Ralf must have missed it.. I've pinged him to add it. From robert.fischer at ilink.de Tue May 8 00:11:06 2001 From: robert.fischer at ilink.de (Robert Fischer) Date: Thu Nov 3 14:46:15 2005 Subject: Drag/Drop on to running app icon in dock, How? Message-ID: > Drag/Drop on to running app icon in dock, How? > > I have DD working into the apps window > and also it works onto the apps icon in the finder. > Now I am just missing DD on the app in the Dock. > > What do I need to do? > Your application instance (or delegate of the application) should "accept files" which it signals by implementing this method: - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename. (X Server 1.2) Look into the documentation of NSApplication and you'll be fine. I think that only D&D of filetypes registered with the app will be possible. But with Command and Option pressed you may D&D every file onto the apps icon. Cheers, Robert -- --- - .-. -- -- --- / \ ---- Robert Fischer .-. / \ --- .-. __o .-. @ / \ / \ / \ _`\<,_ / \ i.link / \ / \ / \ (*)/ (*) / `-------------- / `---' `-' `-----------' From david.teran at cluster9.com Tue May 8 01:33:38 2001 From: david.teran at cluster9.com (David Teran) Date: Thu Nov 3 14:46:15 2005 Subject: appletalk on Ethernet and Airport Message-ID: Hi, this is not really an development issue, but we have problems with the following setup: one g4 mac has an Airport card installed. We us natd and ipfw to use this machine as an "airport base station" and it works fine. But it seems that appletalk cannot be used on both ports and so we are unable to print with this machine on an laserwriter and use this machine also as fileserver for all our airport computers. The printmanager says that appletalk is not active, also hostconfig has an entry "APPLETALK=-MULTIHOME-". Any help would be great. Thanks, david From bobsavage at mac.com Tue May 8 01:41:54 2001 From: bobsavage at mac.com (Bob Savage) Date: Thu Nov 3 14:46:15 2005 Subject: sample code (Re: NSSystemDirectories.h) In-Reply-To: <14wVNr-0gfsaOC@fmrl03.sul.t-online.com> Message-ID: I was just working on something like this last night while teaching myself how to load bundles, so I'm just posting it here in case someone wants it. Note you do not need to #include NSSystemDirectories.h for this to work, just import the Cocoa framework. I'm also including the NSFileManager stuff because I mistakenly spent about 3 hours coding this whole thing using NSFileWrappers, the whole time thinking "there has got to be a better way than this!" Doh! Bob -------------------- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *app_suppPATH, *appLibPATH; NSArray *pathARRAY, *bundleARRAY; NSFileManager *fManager; // get path for ~/Library pathARRAY = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); if ([pathARRAY count] == 1) { // should always be true // paths as strings app_suppPATH = [[pathARRAY objectAtIndex:0] stringByAppendingPathComponent: @"Application Support"]; appLibPATH = [app_suppPATH stringByAppendingPathComponent: kMyApp]; // checking for the "Application Support" directory in ~/Library fManager = [[NSFileManager defaultManager] retain]; if (![fManager fileExistsAtPath:app_suppPATH]) { if(![fManager createDirectoryAtPath:app_suppPATH attributes: nil]) NSLog(@"Could not create directory '%@'", app_suppPATH); } // checking for the My App's sub directory if (![fManager fileExistsAtPath:appLibPATH]) { if(![fManager createDirectoryAtPath:appLibPATH attributes: nil]) NSLog(@"Could not create directory '%@'", appLibPATH); } // checking for directory contents bundleARRAY = [[fManager directoryContentsAtPath:appLibPATH] retain]; NSLog(@"%@", bundleARRAY); if ([bundleARRAY count] == 0) { // nothing there NSLog(@"\n --- NO BUNDLES ---\nPlease install bundles in '%@'\nto run %@.", appLibPATH, kMyApp); [bundleARRAY release]; [fManager release]; [pool release]; return 0; } } else NSLog(@" --- Something really wrong at 'pathARRAY'\n"); From Stefan_Jung at t-online.de Tue May 8 01:51:27 2001 From: Stefan_Jung at t-online.de (Stefan Jung) Date: Thu Nov 3 14:46:15 2005 Subject: PSWait - equivalent in Cocoa? In-Reply-To: <00d701c0d760$3da04600$f24ce4cf@207.228.64.39> Message-ID: <14x3DE-24daVcC@fwd01.sul.t-online.com> Am Dienstag, 8. Mai 2001 um 03:43 schrieb Alexandr Molochnikov: > Hello everyone, > > PSWait() was a PostScript function that flushed the generated > PostScript > code to the window server. It was used to smooth UI responses to > such user > gestures as dragging. > > What is the Cocoa/Quartz equivalent to PSWait()? Is it perhaps hidden > somewhere in the AppKit, like single-op PS functions now wrapped in > NSBezierPath? > > Is it even needed in Mac OS X apps? > No. You can ignore it. Stefan Jung -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 558 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010508/b9f8e9e3/attachment.bin From lambda at mac.com Tue May 8 02:09:11 2001 From: lambda at mac.com (Brian Campbell) Date: Thu Nov 3 14:46:15 2005 Subject: HID Documentation Message-ID: <200105080908.CAA22011@smtpout.mac.com> Is there any documentation (examples would be great) of using the HID for input? The header files are a bit thin on comments. Also, are there any joysticks/yokes/other input devices which support this yet? From anarkhos at mac.com Tue May 8 02:18:24 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:15 2005 Subject: HID Documentation In-Reply-To: <200105080908.CAA22011@smtpout.mac.com> References: <200105080908.CAA22011@smtpout.mac.com> Message-ID: At 5:08 AM -0400 5/8/01, Brian Campbell wrote: >Is there any documentation (examples would be great) of using the HID for input? The header files are a bit thin on comments. Also, are there any joysticks/yokes/other input devices which support this yet? I want to write an HID driver for a joystick, but Apple hasn't released the joystick class yet. It definitely looks very green, not to mention extremely low level compared to Input Sprockets. Guess we'll have to wait and weep until may-ish From wprice at cyphers.net Tue May 8 02:32:48 2001 From: wprice at cyphers.net (Will Price) Date: Thu Nov 3 14:46:15 2005 Subject: NSCell wrapping problems Message-ID: <200105080932.CAA13816@omnigroup.com> I'm using an NSOutlineView with NSBrowserCells. I have called setWraps:NO on the proto cells. Regardless, the cells still wrap. If I jack up the cell height to something high enough to see it, I can see the text has wrapped. What I'd like is a function like TruncString on OS 9 which would neatly truncate the string to be displayed in the cell with a "..." in the middle if the string is too long. The OS X Finder does this, but I don't see any methods to turn this on. Is it supposed to do that automatically when setWraps is off? If so, it isn't. Any pointers here? Thanks. -- Will From dweebert at home.com Tue May 8 03:09:38 2001 From: dweebert at home.com (Graeme Hiebert) Date: Thu Nov 3 14:46:15 2005 Subject: Referencing the private/Shared Frameworks In-Reply-To: <200105010231.WAA25598@pellns.alleg.edu> Message-ID: <200105081009.DAA15773@omnigroup.com> On Monday, April 30, 2001, at 07:28 PM, Chris Behm wrote: > I just tried using the SharedFrameworks and it worked like a charm. > Make sure you clean your framework that's going to be shared, then > rebuild it with the install path as > @executable_path/../SharedFrameworks. Then, in the app that's including > it, add that framework to a copy phase into SharedFrameworks. > > Any other things (plugins, applications, whatever) that link against > that framework should be fine (though you might need/want to rebuild > them linked against the newly built framework). I've found that most > times, if a target isn't cleaned prior to building, a lot of these > types of changes aren't seen. I still can't get this to work the way I expect. If I set the framework's install path to @executable_path/../SharedFrameworks, it can be used by my main application and by tools inside my Resources directory (for example) inside the same application bundle, because the frameworks it needs are then in the same position relative to the tool (../SharedFrameworks). However, if I move the tool to another directory within my application bundle, or attempt to use a tool that resides outside of the application bundle, it does not find the library. Can somebody verify whether the behaviour I expect is implemented? If I have an application with a "SharedFrameworks" subdirectory, and the frameworks inside that directory are built with the install path of "@executable_path/../SharedFrameworks", can I expect that any plugins, tools, applications, whatever that link against those frameworks can find them at runtime, regardless of where those plugins, tools, applications or whatever are installed? And if it should be working as I describe, does anybody have any clue what I might be doing wrong? -g From david.teran at cluster9.com Tue May 8 03:11:02 2001 From: david.teran at cluster9.com (David Teran) Date: Thu Nov 3 14:46:15 2005 Subject: Much of WO/EOF 4.5.1 doesn't actually work on OS X In-Reply-To: Message-ID: Hi Brian, one (maybe silly) question: can you create an WO application that uses Java as primary development language (and as the only one) as we can with wo4.5 on macosxserver and nt and solaris and hpux? thanks, david on 08.05.2001 4:43 Uhr, Brian Hill at brian_hill@unioncab.com wrote: > Hello, > > Well, I got my WO 4.5.1 for OSX upgrade today, and tried to create a > quick EOF Cocoa application on OSX. While I was able to create the > simple Single Table application using the EOWizard, and it built and > ran, modifying the nib in Interface Builder was another matter. > > After I made sure that the EOPalette.palette was properly loaded, I > could open the nib just fine. Unfortunately, you can't actually change > the EOAssociations created by the EOWizard with it, or create new > EOAssociation connections. > > Attempting to call up the Inspector on an EODisplayGroup in a nib throws > this error consistently: > > May 07 13:52:03 Interface Builder[4102] Exception raised during posting > of notification. Ignored. exception: *** +[WBProject > projectAtPath:includeFrameworks:autoParse:]: selector not recognized > > Attempting to inspect an existing EOAssociation displays a screwed up > (and non-functional) inspector panel. There appears to be no way to > create new EOAssociations with this. It will not display the keys on the > targeted EODisplayGroup, and well, you just got to see it. Try it. > > NOTE: I am not an EOF newbie. I've created many EOF applications on OSX > Server. This update is broken. > > I tried this same set of tests (install WO 4.5.1 developer, use > ProjectBuilderWO to create a new EOF Application with the wizard, > attempt to modify it in IB) on 3 different machines today, two with the > 10.0.2 update already applied, and one brand new iMac with 10.0.0 and > the Dev tools installed just today (ie., completely pristine). > > Same, non-functional IB integration on all three machines. > > It seems quite obvious to me that this update wasn't tested much on OSX. > If it was, apparently no-one tested the IB palette at all. It doesn't > work. > > The WebObjects stuff seems to work fine in a development install. It's > basically just the InterfaceBuilder integration that's hosed. Without > that, though, well... > > I am hoping and praying that somehow, I've made a mistake, and that WO > 4.5.1 for OSX actually does work after all. I'm in a huge bind with this > at my workplace, as I'm sure many other developers are, having waited so > long for this update. > > Please, if anyone else has received the WO 4.5.1 update already, if your > Interface Builder integration actually works, I'd really appreciate > knowing. > > > Brian > > ps. There are also about a zillion duplicate symbol errors between the > 4.5.1 EOInterface.framework and the AppleUtilities.framework in > PrivateFrameworks as well. Apparently, that's where they stashed what > was left of the EOF frameworks when if finally disappeared from > PrivateFrameworks between the PB and OSX 1.0.(?) > > > brianhill@mac.com http://personalpages.tds.net/~brian_hill > ?????????????????????????????????????????????????????? > "Why? I came into this game for adventure - go anywhere, travel > light, get in, get out, wherever there's trouble, a man alone. > Now they've got the whole country sectioned off and you can't > move without a form. I'm the last of a breed." > -- Archibald "Harry" Tuttle, Rogue HVAC Repairman > ?????????????????????????????????????????????????????? > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From a at blackbox.net Tue May 8 05:45:00 2001 From: a at blackbox.net (Andreas Monitzer) Date: Thu Nov 3 14:46:15 2005 Subject: Been looking at HID lately...definitely not an Input Sprockets replacement! In-Reply-To: Message-ID: <200105081245.OAA00409@am.homeip.net> On Saturday, May 5, 2001, at 11:33 , strobe anarkhos wrote: >> It probably wouldn't be all that difficult to re-implement >> InputSprockets on top of HID (ala Quesa's re-implementation of QD3D on >> top of OpenGL ). Someone could write it up, and have it export all the >> same symbols as InputSprockets. Then applications relying on >> InputSprockets would continue to work with very little (or no) rewrite. > > I've considered this but: > > a) How many commercial titles used IP anyway? Unreal Tournament, Bugdom, Starcraft, Oni and Quake 1&2 are the ones I remember right now. > Without such sponsors the project may have not enough "free time" among > those interested to get going. Plus it's more of a user concern than a > developer one. I don't think developers care much if a user has to > re-calibrate his joystick for every app and also learn new keymapping > interfaces. Really? Even in classic MacOS, implementing the interface for calibration & keymapping was just one line of code. It even supported a custom layout for each input device (nobody knows where button 23 of 50 is without a picture). > b) Is legacy code the issue, or merely the fact that a decent replacement > isn't available. Perhaps something better could be made. Perhaps with > force feedback support. Agreed. And one that supports Carbon & Cocoa. > c) How could I reach enough of the developers who are potentially > interested? I guess emulation.net may be a good start |-\ Contact Westlake Interactive, OmniGroup and Aspyr. > Seems like another case where I'm pissed that Apple didn't release the > source after the axe (haunted memories of OpenDoc, QD3D, GX, etc.). I > mean Input Sprockets weren't THAT bad, it could have been improved |-\ Porting low-level code isn't that easy. andy -- Discussion forthcoming. From pa44 at cornell.edu Tue May 8 05:46:59 2001 From: pa44 at cornell.edu (Peter Ammon) Date: Thu Nov 3 14:46:15 2005 Subject: Accuracy of leaks? Message-ID: <200105081246.IAA15591@postoffice2.mail.cornell.edu> How accurate is the command line tool leaks? I was flustered that it found a number of leaks in my app, but then I noticed that it found leaks in every app I tried it on, from the Finder to Project Builder to Mail to TextEdit. It says that the leaks reported will always be true leaks. Is all software really leaky, or is the problem with the leaks executable itself? -Peter From brian_hill at unioncab.com Tue May 8 06:07:15 2001 From: brian_hill at unioncab.com (Brian Hill) Date: Thu Nov 3 14:46:15 2005 Subject: Much of WO/EOF 4.5.1 doesn't actually work on OS X In-Reply-To: Message-ID: On Tuesday, May 8, 2001, at 05:10 AM, David Teran wrote: > Hi Brian, > > one (maybe silly) question: can you create an WO application that uses > Java > as primary development language (and as the only one) as we can with > wo4.5 > on macosxserver and nt and solaris and hpux? I haven't checked yet. brianhill@mac.com http://personalpages.tds.net/~brian_hill ?????????????????????????????????????????????????????? "Why? I came into this game for adventure - go anywhere, travel light, get in, get out, wherever there's trouble, a man alone. Now they've got the whole country sectioned off and you can't move without a form. I'm the last of a breed." -- Archibald "Harry" Tuttle, Rogue HVAC Repairman ?????????????????????????????????????????????????????? From brian_hill at unioncab.com Tue May 8 06:07:50 2001 From: brian_hill at unioncab.com (Brian Hill) Date: Thu Nov 3 14:46:15 2005 Subject: Much of WO/EOF 4.5.1 doesn't actually work on OS X In-Reply-To: Message-ID: Darn, I pushed Send before I meant to. On Tuesday, May 8, 2001, at 05:10 AM, David Teran wrote: > Hi Brian, > > one (maybe silly) question: can you create an WO application that uses > Java > as primary development language (and as the only one) as we can with > wo4.5 > on macosxserver and nt and solaris and hpux? I think you may be able to, since it looks the rest of WO is there for the other platforms (there are 3 CDs: the usual multi-platform Development and Deployment ones, and a separate one for MacOS X 1.0). I'll double check on the Java stuff later today when I land at work. More on the InterfaceBuilder EOPalette problem: it's actually worse than I'd mentioned before. If you have the EOPalette loaded into InterfaceBuillder AT ALL, it breaks InterfaceBuillder for all other nibs as well, even non-EOF ones. I had to unload the palette to get any work done in IB at all. What appears to be happening is that the bottom little table in the Connections page of the Inspector shows a random NSBrowser (such as a copy of the one above) or nothing at all, making it impossible to create new connections or alter existing ones. If you load the palette, you'll notice it as soon as you try to do anything with InterfaceBuilder (at least that's been my experience on the 3 machines I've tried it on since yesterday). Brian brianhill@mac.com http://personalpages.tds.net/~brian_hill ?????????????????????????????????????????????????????? "Why? I came into this game for adventure - go anywhere, travel light, get in, get out, wherever there's trouble, a man alone. Now they've got the whole country sectioned off and you can't move without a form. I'm the last of a breed." -- Archibald "Harry" Tuttle, Rogue HVAC Repairman ?????????????????????????????????????????????????????? From anarkhos at mac.com Tue May 8 07:00:20 2001 From: anarkhos at mac.com (strobe anarkhos) Date: Thu Nov 3 14:46:15 2005 Subject: Been looking at HID lately...definitely not an Input Sprockets replacement! In-Reply-To: <200105081245.OAA00409@am.homeip.net> References: <200105081245.OAA00409@am.homeip.net> Message-ID: > > >>Without such sponsors the project may have not enough "free time" among those interested to get going. Plus it's more of a user concern than a developer one. I don't think developers care much if a user has to re-calibrate his joystick for every app and also learn new keymapping interfaces. > >Really? Even in classic MacOS, implementing the interface for calibration & keymapping was just one line of code. It even supported a custom layout for each input device (nobody knows where button 23 of 50 is without a picture). I'm talking about the difficulty of re-implementing IP on OS X without the original source. QD3D is also easy to use, but not so easy to reverse engineer. >>b) Is legacy code the issue, or merely the fact that a decent replacement isn't available. Perhaps something better could be made. Perhaps with force feedback support. > >Agreed. And one that supports Carbon & Cocoa. I would think the interface would be app framework independent, creating it's own window when called. I see no reason why an application using IPclone would have to link to Cocoa or Carbon unless you wanted to embed the IP configuration panels within a custom window. > >>Seems like another case where I'm pissed that Apple didn't release the source after the axe (haunted memories of OpenDoc, QD3D, GX, etc.). I mean Input Sprockets weren't THAT bad, it could have been improved |-\ > >Porting low-level code isn't that easy. > To my knowledge IP already interfaced with USB HID in MacOS 9, I can't imagine it would have been that hard to port it to OS X. HID already handles most of the low-level stuff. From buck.erik at mcleodusa.net Tue May 8 07:15:17 2001 From: buck.erik at mcleodusa.net (Erik M. Buck) Date: Thu Nov 3 14:46:15 2005 Subject: nextKeyView problems References: <200105071155.EAA19043@omnigroup.com> Message-ID: <004001c0d7c9$73255a40$32e52bd8@bc7440b> nextKeyView works as you expect. You must set the initial key view! From jswitte at bloomington.in.us Tue May 8 07:59:40 2001 From: jswitte at bloomington.in.us (Jim Witte) Date: Thu Nov 3 14:46:16 2005 Subject: HID Documentation In-Reply-To: <200105080908.CAA22011@smtpout.mac.com> Message-ID: There's the USB DDK for MacOS 9, which includes some well-commented examples. I'm not sure if it's Carbonized, or if the HID 'Manager' has changed under X, though. JIm >Is there any documentation (examples would be great) of using >the HID for input? The header files are a bit thin on comments. From ryand at softarch.com Tue May 8 10:15:33 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:16 2005 Subject: Authentication works... sometimes Message-ID: <200105081715.KAA03072@omnigroup.com> I have built an app which uses the Authentication routines in security.framework to launch a tool. The tool is a custom built program which simply does something to prove that it has root privileges. The problem is this, when I click the "run" button in Project builder, the application runs, and launches the tool with root privileges and everything works fine, however if I double-click the application from the finder, then try to authenticate and run the tool, I get this in the console.log: May 08 10:10:40 AuthenticationSample[1183] Error -60031 in AuthorizationExecuteWithPrivileges It is an error message put out by my code when the authentication fails. Why would this work when ran from Project Builder but not from Finder? Any ideas? - Ryan From meng at greatergood.com Tue May 8 10:37:36 2001 From: meng at greatergood.com (Jianhua Meng) Date: Thu Nov 3 14:46:16 2005 Subject: EOF adaptor for Sybase on MacOS X/WebObjects 4.5.1 Message-ID: <200105081737.f48Hb3e14072@htserv01.yss4.com> Hi, Does anybody know if there exists an EOF adaptor for Sybase on MacOS X/WebObjects 4.5.1. We would like to know how feasible it is to move to MacOS X/WebObjects 4.5.1 at this time. The WebObjects 4.5.1 release notes document some Sybase Adaptor bug fixes, which seems to support the speculation that such an adaptor might exist. Whether such an adaptor is actually available is another issue. Thanks. Jianhua From ryand at softarch.com Tue May 8 10:39:49 2001 From: ryand at softarch.com (Ryan Dary) Date: Thu Nov 3 14:46:16 2005 Subject: [NSWorkspace notificationCenter]; Message-ID: <200105081739.KAA03878@omnigroup.com> I noticed that within the NSWorkspace, that you can get a notificationCenter. Is this one that all apps can share? Something that one app could post a notification which all other (registered) apps could receive? This seems very powerful and I was wondering if there is a standard set of notifications, like Disk Insertion, App launched, etc. Would this be documented somewhere? - Ryan From dunham at mac.com Tue May 8 11:06:06 2001 From: dunham at mac.com (David Dunham) Date: Thu Nov 3 14:46:16 2005 Subject: How I can enable Preferences Item in AppleMenu in Carbon? In-Reply-To: <200105080518.FAA3111990@smtp5ve.mailsrvcs.net> Message-ID: <200105081803.LAA09531@smtpout.mac.com> On Monday, May 7, 2001, at 10:13 , Dmitry Markman (verizon) wrote: > How I can enable Preferences Item in AppleMenu in Carbon? Assuming you really mean in Aqua (since Carbon apps run fine under OS 8.x): ::EnableMenuCommand(0, 'pref'); ------------ David Dunham Electric Fish, Inc snapper@electricfish.com Voice: 206 634 2926 Fax: 206 634 2921 http://www.electricfish.com Life is hard. Concrete is hard. Life is concrete. From a at blackbox.net Tue May 8 11:50:09 2001 From: a at blackbox.net (Andreas Monitzer) Date: Thu Nov 3 14:46:16 2005 Subject: How to reveal a file/directory in finder... In-Reply-To: <200105071639.JAA12786@scv1.apple.com> Message-ID: <200105081850.UAA00718@am.homeip.net> On Monday, May 7, 2001, at 06:39 , Douglas Davidson wrote: > - (BOOL)selectFile:(NSString *)fullPath > inFileViewerRootedAtPath:(NSString *)rootFullpath; > > The current semantics of the Finder don't exactly match the Workspace > behavior that this call was modeled upon, but you can reveal a file, for > example, by specifying its path as fullPath and passing in nil for the > rootFullpath. You can reveal the contents of a folder by passing in its > path as rootFullpath and nil for fullPath. And what happens when I replace the Finder with some other application? Would it launch the Finder or send an open-AppleEvent to the replacement? andy -- Description forthcoming. From meeloo at noos.fr Tue May 8 12:13:51 2001 From: meeloo at noos.fr (=?iso-8859-1?Q?S=E9bastien_M=E9trot?=) Date: Thu Nov 3 14:46:16 2005 Subject: gcc ./configure problems References: <200105072008.f47K8Qb01587@m5.andara.com> Message-ID: <024901c0d7f2$fd6d7380$0201010a@kashmir> There is a miising link in the gcc distribution from apple. You should create a link from /usr/bin/c++ to /usr/bin/gcc and everything will be allright. The comand is ln -s /usr/bin/c++ /usr/bin/gcc And you have to be root to execute it. Didn't I told you allready? I thought I did... Hope this helps, S?bastien ----- Original Message ----- From: "Rob Smith" To: Sent: Monday, May 07, 2001 10:07 PM Subject: gcc ./configure problems > I was trying to configure ncurses when I realized I needed development > tools installed so I installed them. Tried to configure ncurses again > and still wouldn't work. Someone kindly pointed out that I didn't have > gcc installed so I downloaded it from the apple site. Now I get the > following error when trying to configure gcc. the last 2 lines are > interesting. the compiler doesn't work and can't make executables?? > Any ideas on what might be wrong? > > > > > [localhost:downloads/gcc-3/gcc] root# ./configure > > loading cache ./config.cache > > checking LIBRARY_PATH variable... ok > > checking GCC_EXEC_PREFIX variable... ok > > checking host system type... powerpc-apple-darwin1.3.2 > > checking target system type... powerpc-apple-darwin1.3.2 > > checking build system type... powerpc-apple-darwin1.3.2 > > checking for gcc... no > > checking for cc... cc > > checking whether the C compiler (cc ) works... no > > configure: error: installation or configuration problem: C compiler > > cannot create executables. > > [localhost:downloads/gcc-3/gcc] root# > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From haikusw at mac.com Tue May 8 12:23:23 2001 From: haikusw at mac.com (haikusw@mac.com) Date: Thu Nov 3 14:46:16 2005 Subject: Anyone have any experience sending Apple Events from Cocoa? Message-ID: <200105081922.MAA21455@smtpout.mac.com> Hey There, Seems I read that it is possible to send apple events from cocoa to carbon apps & even classic apps. Anyone out there tried this? Does it work? Snippet of sample code would be cool, or pointer to sample code would be _really_ helpful! Looks like some docs are: NSAppleEventDescriptor.html NSAppleEventManager.html contain the stuff to use, but it's pretty sparse in there.... "Description forthcoming" seems to occur more times than anything else :-) I guess one would use: dispatchRawAppleEvent:withRawReply:handlerRefCon: to send the event, but how to get reply? is it modal (kAEWaitReply equivlent?); or perhaps replyFromSendingEvent:withSendMode:sendPriority:timeout: should be used if one wanted a reply. Anybody played with this yet? thanks in advance. peace, tyler From rosyna at unsanity.com Tue May 8 12:35:01 2001 From: rosyna at unsanity.com (Rosyna) Date: Thu Nov 3 14:46:16 2005 Subject: Bloody lame windows In-Reply-To: <200105071702.KAA04127@mailer.symantec.com> References: <200105071702.KAA04127@mailer.symantec.com> Message-ID: You'd THINK this would make a window frontmost and have all controls active, But NOOOOO! [[textInfo window] center]; [[textInfo window] makeKeyAndOrderFront:nil]; [[textInfo window] orderFrontRegardless]; [[textInfo window] _setForceActiveControls:YES]; Any way to make it have active controls too? -- Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug Unsanity: Unsane Tools for Insane People From jason at prismatix.com Tue May 8 12:37:27 2001 From: jason at prismatix.com (Jason Bobier) Date: Thu Nov 3 14:46:16 2005 Subject: Distributed Objects and permissions Message-ID: Hey folks, I have a service that clients connect to using DO. The service will be vending data from files for potentially many users so I need to respect the file permissions for each file depending upon the who is running the client. For other Unix flavors, we've used various platform dependent means of getting the effective user id and effective group id of the client, and set the service (running as root) to these ids before doing work for the client and then restoring them after the work is complete. How would I go about doing this on OS X? Is there any way of finding info about who is connected to you in DO? Thanx for the help, Jason -- Jason A. Bobier jason@prismatix.com Tech Lead, PGP Macintosh Products http://www.prismatix.com/ Network Associates, Inc. Nothing's constant PGPKey: Fingerprint: 7809 7E6E BCCA 903D 4618 9740 EB10 9DF9 F6F8 3318 All of the energy collected by all the radio and optical telescopes in the history of mankind is less than the energy of a single snowflake striking the earth. - Cosmos From seanr at yellowmatter.com Tue May 8 12:39:52 2001 From: seanr at yellowmatter.com (sean roehnelt) Date: Thu Nov 3 14:46:16 2005 Subject: NSURL & HTTP_USER_AGENT = Apple-CFNetwork/0.9 Message-ID: <20010508193930.OAMQ24113.femail12.sdc1.sfba.home.com@localhost> My goal is to set the HTTP_USER_AGENT of a NSURL to the name of my application. NSURL is not documented very well yet at all... I tried using setProperty:forKey: without luck like this. // --- NSString * urlString = @"http://www.yellowmatter.com/cgi-bin/printenv"; NSURL * newURL = [NSURL URLWithString:urlString]; NSString * resultString = nil; [newURL setProperty:@"Mozilla/4.0 (compatible; MSIE 5.5; Mac_PowerPC; OmniWeb/4.0)" forKey:@"HTTP_USER_AGENT"]; resultString = [NSString stringWithContentsOfURL:newURL]; // --- Does anybody at Apple (or anybody else for that matter) have any suggestions on how to do this with a NSURL? Thanks in advance, Sean -- Sean Roehnelt http://yellowmatter.com "What color is your matter?" From robsmith at hfx.eastlink.ca Tue May 8 13:08:17 2001 From: robsmith at hfx.eastlink.ca (Rob Smith) Date: Thu Nov 3 14:46:16 2005 Subject: gcc ./configure problems In-Reply-To: <024901c0d7f2$fd6d7380$0201010a@kashmir> Message-ID: <200105082008.f48K8Fb25366@m5.andara.com> ok...I created the link (ln -s /usr/bin/c++ /usr/bin/gcc) but I still get the following error: It is complaining about the compiler not being able to create executables. Maybe I should uninstall and reinstall the develpment tools. Is there a way to do this cleanly? so that I get rid of everything and reinstall fresh? Or does someone see another solution. > [localhost:/Users/xavier/ncurses-5.2] root# ./configure > creating cache ./config.cache > Configuring NCURSES 5.2 ABI 5 (Tue May 8 17:02:57 ADT 2001) > checking host system type... powerpc-apple-darwin1.3.2 > checking target system type... powerpc-apple-darwin1.3.2 > checking build system type... powerpc-apple-darwin1.3.2 > Configuring for darwin1.3.2 > checking for prefix... /usr/local > checking for gcc... gcc > checking whether the C compiler (gcc ) works... no > configure: error: installation or configuration problem: C compiler > cannot create executables. On Tuesday, May 8, 2001, at 04:13 PM, S?bastien M?trot wrote: > There is a miising link in the gcc distribution from apple. You should > create a link from /usr/bin/c++ to /usr/bin/gcc and everything will be > allright. The comand is > ln -s /usr/bin/c++ /usr/bin/gcc > And you have to be root to execute it. Didn't I told you allready? I > thought > I did... > From dstaudi at san.rr.com Tue May 8 13:13:32 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:16 2005 Subject: OS X performance: iTunes too slow on a G4 450??? In-Reply-To: Message-ID: <200105082013.NAA10302@omnigroup.com> Can you set the priorities of tasks, if so how, from within the thread or externally only? there was no such documentation on NSThread. Daniel Staudigel --------------- How to fly: Find a nice big cliff, jump off, and miss the ground! Easy enough! From mah at jump-ing.de Tue May 8 13:18:29 2001 From: mah at jump-ing.de (Markus Hitter) Date: Thu Nov 3 14:46:16 2005 Subject: gcc ./configure problems In-Reply-To: <200105072008.f47K8Qb01587@m5.andara.com> Message-ID: <200105082017.WAA22279@post.webmailer.de> Am Montag, 7. Mai 2001 um 22:07 schrieb Rob Smith: > I was trying to configure ncurses when I realized I needed development > tools installed so I installed them. Tried to configure ncurses again > and still wouldn't work. > Someone kindly pointed out that I didn't have gcc installed so I > downloaded it from the apple site. gcc, or more precisely, a modified gcc, is Darwin's / OS X's default compiler and included with Development Tools. Just it's name is "cc". Try a "cc -v" > Now I get the following error when trying to configure gcc. Whatever you found on the Apple site, it was probably some Darwin package. Darwin and OS X put some files to different places, so you probably screwed up your OS X Developer Tools installation. > the last 2 lines are interesting. the compiler doesn't work and > can't make executables?? Any ideas on what might be wrong? Did your try a simple test program? Something like: #include int main () { printf ("Hello, World\n"); return 0; } > >> [localhost:downloads/gcc-3/gcc] root# ./configure Thought you are after ncurses. It's very likely you don't need to build gcc-3 to get ncurses. If you need gcc-3, there was some discussion how to build it within the last month on this list. >> loading cache ./config.cache >> checking LIBRARY_PATH variable... ok >> checking GCC_EXEC_PREFIX variable... ok >> checking host system type... powerpc-apple-darwin1.3.2 >> checking target system type... powerpc-apple-darwin1.3.2 >> checking build system type... powerpc-apple-darwin1.3.2 >> checking for gcc... no >> checking for cc... cc >> checking whether the C compiler (cc ) works... no >> configure: error: installation or configuration problem: C compiler >> cannot create executables. >> [localhost:downloads/gcc-3/gcc] root# Hope that helps a little, Markus From mah at jump-ing.de Tue May 8 13:19:08 2001 From: mah at jump-ing.de (Markus Hitter) Date: Thu Nov 3 14:46:16 2005 Subject: gcc ./configure problems In-Reply-To: <200105072008.f47K8Qb01587@m5.andara.com> Message-ID: <200105082018.WAA24031@post.webmailer.de> oops, little addition: The discussion about hoe to build gcc-3 was on the Darwin Development list. Markus From ddavidso at apple.com Tue May 8 13:40:17 2001 From: ddavidso at apple.com (Douglas Davidson) Date: Thu Nov 3 14:46:16 2005 Subject: How to reveal a file/directory in finder... In-Reply-To: <200105081850.UAA00718@am.homeip.net> Message-ID: <200105082040.NAA10525@scv2.apple.com> On Tuesday, May 8, 2001, at 11:49 AM, Andreas Monitzer wrote: > And what happens when I replace the Finder with some other application? > Would it launch the Finder or send an open-AppleEvent to the > replacement? If your Finder replacement has the right signature, then you will get the AppleEvents. You will want to implement the same AE interface that the Finder currently does. Douglas Davidson From seanr at yellowmatter.com Tue May 8 13:56:43 2001 From: seanr at yellowmatter.com (sean roehnelt) Date: Thu Nov 3 14:46:16 2005 Subject: Standard icon+text in NSTableCell Message-ID: <20010508205634.LYRH570.femail13.sdc1.sfba.home.com@localhost> To get rid of NSBrowserCell's right arrow do this. [cell setLeaf:YES]; I believe it does support images... I can't seem to find it in the doc's, but I use this in my code which I believe still works. [cell setImage:[NSImage imageNamed:SPEAKER_IMAGE]]; - sean -- Sean Roehnelt http://yellowmatter.com "What color is your matter?" ---- RE: Date: Thu, 3 May 2001 09:38:38 -0700 format=flowed; charset=us-ascii From: Will Price To: macosx-dev@omnigroup.com Subject: Standard icon+text in NSTableCell I've looked through list archives and through Fire.app source code, but so far there doesn't seem to be a cell type which supports an icon followed by text in the same cell (ie the way the Finder displays list views). Fire actually draws its own cell to do this, which provides them with a litany of UI violations. I'm sure those violations (such as always using Yellow for the highlight color) can be overcome, but this seems like a slippery slope. All I want is a standard cell type like those used in thousands of applications on other platforms which shows an icon followed by text. NSBrowserCell does not appear to be what I want. It puts some strange looking arrow in the right side of the cell, and doesn't seem to support images. Surely I am overlooking something? - Will From dimitry.markman at verizon.net Tue May 8 14:01:19 2001 From: dimitry.markman at verizon.net (Dmitry Markman (verizon)) Date: Thu Nov 3 14:46:16 2005 Subject: How I can enable Preferences Item in AppleMenu in Carbon? In-Reply-To: <200105081803.LAA09533@smtpout.mac.com> Message-ID: <200105082110.VAA18619042@smtp7ve.mailsrvcs.net> On Tuesday, May 8, 2001, at 02:03 PM, David Dunham wrote: > Assuming you really mean in Aqua (since Carbon apps run fine under OS > 8.x): > > ::EnableMenuCommand(0, 'pref'); Thank you very much, David it works, but it's not enough if you don't install AEHandler for kAEShowPreferences ( = 'pref') you will not receive corresponded AEvent thanks again From lachman at boochee.com Tue May 8 14:05:29 2001 From: lachman at boochee.com (Ben Lachman) Date: Thu Nov 3 14:46:16 2005 Subject: connecting NSLog to something Message-ID: <200105082105.OAA12778@omnigroup.com> Anyone know how to connect the output of a cocoa app's NSLog() calls to something like project builder does when you launch a built project with its "run" command. Is it an argument to the launch or something? I'd like to be able to get a log of runs that my testers have problems with, etc. TIA, ->Ben From rjz7584 at valueweb.net Tue May 8 14:24:47 2001 From: rjz7584 at valueweb.net (Robert Ziefel) Date: Thu Nov 3 14:46:16 2005 Subject: NSTable scrollRowToVisable doesn't work? Message-ID: <200105082122.f48LMiK17284@mailout4-0.nyroc.rr.com> I have an NSTable which has been working fine except for one thing. When I add a record to the table I want it to scroll down to that last record. However, [table scrollRowToVisible :[dataArray count]]; // table being the NSTable, dataArray being an NSMutableArray does nothing. The table just sits there and looks at me. However [table scrollRowToVisible :[dataArray count] - 1]; works just fine. The table scrolls down to the last one, minus one, so I can hit the down arrow once and see what the last item is. But that's not good enough! I really want it to go all the way down. Has anyone seen this before? Can you help? The code is for a checkbook, and once I have this figured out I'm releasing both source and app. If it would help, I have made the source available at http://homepage.mac.com/rjz7584/bankbookcode.sit Thanks! From tjw at omnigroup.com Tue May 8 15:01:50 2001 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:46:16 2005 Subject: [MODERATOR] Re: Posting problems & mailing list woes In-Reply-To: <200105080447.VAA25095@omnigroup.com> Message-ID: <200105082201.PAA15566@omnigroup.com> We are aware of the problems with the mailing list and Ken is working on fixing them. The current setup is failing due to mail mysteriously failing to get routed from one of our servers to another. Ken is just going to move all the mailing list processing to our outgoing SMTP server. -tim From a at blackbox.net Tue May 8 15:12:21 2001 From: a at blackbox.net (Andreas Monitzer) Date: Thu Nov 3 14:46:16 2005 Subject: free-standing main menu In-Reply-To: <3AF337CB.FF49DD82@WebWizardry.net> Message-ID: <200105082212.AAA00946@am.homeip.net> On Saturday, May 5, 2001, at 01:14 , David W. Halliday wrote: > used the second mouse button as the menu button (thus allowing me to pop > up a > menu right under my mouse any time I wished), I could have menus take up > practically no screen real-estate whatsoever while having a menu right at > my > fingertips anytime I chose. This was practically nirvana. Here's the difference between a GUI for regular and advanced users. NeXTSTEP was designed for advanced users (developers). For example, I searched the interface of gimp for about one week looking where I could activate those filters I compiled. One day I found it by accidentally pressing the middle mouse button (Thank god I have one, I'd still be looking for it otherwise...). Users aren't born with the knowledge about what a menu is. If they don't see any, they won't ever realize that there could be more to the program than that strange white rectangle in the middle of the screen (which obscures the other white rectangles, because they don't know that they could move it). andy -- Description forthcoming. From jdipalma at mac.com Tue May 8 15:32:17 2001 From: jdipalma at mac.com (James DiPalma) Date: Thu Nov 3 14:46:16 2005 Subject: Disabling NSToolbarItems In-Reply-To: <200105041528.IAA03835@scv3.apple.com> Message-ID: <200105082231.PAA10094@smtpout.mac.com> On Friday, May 4, 2001, at 08:27 AM, Chuck Pisula wrote: > the toolbar items will validate with the same "mechanism" that menu > items do, but you should implement the method: -(BOOL) > validateToolbarItem: (NSToolbarItem *)item; I always hated the way menu items where validated. A simple reversal of the logic would allow all menu items to be auto-disabled when no one in the responder chain responds to their action and allow for setEnabled:NO to actually work. Just another case where the AppKit prefers writting code (validate...) over simply using IB (menu items can not be disabled in IB). -jim From randy at schemaresearch.com Tue May 8 16:03:53 2001 From: randy at schemaresearch.com (Randy Brown) Date: Thu Nov 3 14:46:16 2005 Subject: Much of WO/EOF 4.5.1 doesn't actually work on OS X Message-ID: <3AF87A3A.BADE4051@schemaresearch.com> Brian, Just a quick question (since we haven't gotten WO 4.5.1 yet). Which EOAdapters come with it? Thanks' Randy Brown Schema Research From brian_hill at unioncab.com Tue May 8 17:11:13 2001 From: brian_hill at unioncab.com (Brian Hill) Date: Thu Nov 3 14:46:16 2005 Subject: Much of WO/EOF 4.5.1 doesn't actually work on OS X In-Reply-To: <3AF87A3A.BADE4051@schemaresearch.com> Message-ID: On Tuesday, May 8, 2001, at 05:59 PM, Randy Brown wrote: > > Just a quick question (since we haven't gotten WO 4.5.1 yet). Which > EOAdapters come with it? The Mac OSX installation comes with the Oracle adaptor, and I've also gotten the latest OpenBase, FrontBase, PrimeBase and FlatFile adaptors to work. I've still gotten no word on the situation with the EOPalette.palette for InterfaceBuilder. It seems to prevent creating connections in ANY nib once it's loaded on OSX. Broke. Broke. Broke. Brian brianhill@mac.com http://personalpages.tds.net/~brian_hill ?????????????????????????????????????????????????????? "Why? I came into this game for adventure - go anywhere, travel light, get in, get out, wherever there's trouble, a man alone. Now they've got the whole country sectioned off and you can't move without a form. I'm the last of a breed." -- Archibald "Harry" Tuttle, Rogue HVAC Repairman ?????????????????????????????????????????????????????? From mmark at fivespeed.com Tue May 8 18:07:36 2001 From: mmark at fivespeed.com (Mason Mark) Date: Thu Nov 3 14:46:16 2005 Subject: IB: How to use subclass of NSTextView ? Message-ID: I would like to subclass NSTextView and use my subclass in my interface designs within InterfaceBuilder. Assume my subclass is called SpecialTextView. The problem I have is that I see no way to set the class of a text view to SpecialTextView. In fact, I don't know how to even put an NSTextView into my window in IB. I can drag in the NSScrollView/NSTextView combination. This gives me an NSTextView in an NSScrollView. But there doesn't appear to be any mechanism to change the class of the text view; in the Inspector, the Custom Class pane just says "Not Applicable". I can change the class of the NSScrollView, but not the text view inside it. Ideally, that is what I would want to do, because then it would be very convenient, just like using a regular NSTextView. However, I am guessing that I need to put an NSTextView in the window, then use the Group in Scroll View command. That would be fine, but I don't know how to add an NSTextView to the window by itself (so I can change its class), which I would need to do in order to group it in a scroll view. I hope that is a clear explanation of my problem. I have had nice results subclassing other UI objects and just using them within IB, but I haven't figured out this one. The only potential solution which I have figured out is to drag a Custom View from the IB palette into my window, then set the class to SpecialTextView. Then, I can group it in a scroll view, but IB doesn't let me use the handy Attributes inspector pane. I guess I could then just set all my attributes programmatically but that is not as convenient and I believe I am probably missing something. Or is this, in fact, what I should do? Thanks for any pointers, -- Mason -- From gehlker at fastq.com Tue May 8 19:33:26 2001 From: gehlker at fastq.com (Chris Gehlker) Date: Thu Nov 3 14:46:16 2005 Subject: Problem installing clisp Message-ID: Hi folks, I'm getting the following error when I try to install clisp: % make cc -O base/modules.o base/lisp.a base/libsigsegv.a base/libiconv.a base/libintl.a base/libreadline.a -liconv /usr/bin/ld: can't locate file for: -liconv make: *** [base/lisp.run] Error 1 The problem is that the -liconv option doesn't seem to be documented anywhere? Does someone know a work around. -- When I was a boy I was told that anybody could become President. Now I'm beginning to believe it. -Clarence Darrow, lawyer and author (1857-1938) From demars at mminternet.com Tue May 8 20:54:14 2001 From: demars at mminternet.com (Dennis C. De Mars) Date: Thu Nov 3 14:46:16 2005 Subject: nextKeyView problems In-Reply-To: <200105071155.EAA19043@omnigroup.com> Message-ID: on 5/7/01 4:55 AM, Mike Vannorsdel at mikevannorsdel@qwest.net wrote: > I have a group of NSTextFields. By default, tabbing trough the fields > doesn't go in the order I would like. So from IB I set field #2 as > field #1's nextKeyView, field #3 as field #2's nextKeyView, and so on. > But these settings don't change the tab order. Is there a different way > this should be done to change the tab order? Y'know, I had this same problem when following the "Currency Converter" tutorial on Apple's web site. The tutorial calls for three text fields, with two of the connected to each other through nextKeyView so that tabbing switches between them. But, setting nextKeyView seems to have no effect, tabbing always cycles through all three fields in the same order. Is this a known bug, or am I doing something wrong? - Dennis D. From john at toastedmarshmallow.com Tue May 8 21:14:42 2001 From: john at toastedmarshmallow.com (=?iso-8859-1?Q?John_H=F6rnkvist?=) Date: Thu Nov 3 14:46:16 2005 Subject: Distributed Objects MacTech article problems (The don't seem to work anyway) In-Reply-To: <3AF6D15D.935BF3BD@benatong.com> Message-ID: <20010509040959.B213411C001@fimail01.cabinet.net> On Monday, May 7, 2001, at 06:46 PM, Charles Bennett wrote: > Have you actually tried running the Distributed Object code snippet > found at > http://www.mactech.com/articles/mactech/Vol.16/16.05/HotChocolate/index.html Since I wrote that article, I guess I'd better answer. > After fixing a couple of errors.. (paste errors?) > > NSDistantObject* serverObject= > [NSConnection rootProxyForConnectionWithRegisteredName:@"MyServer" The end of that line is on the next line so what I wrote was this: - (void) connect { NSDistantObject* serverObject= [NSConnection rootProxyForConnectionWithRegisteredName:@"MyServer" host:@"*"]; } Since you can't rely on the name server on Mac OS X, host will have to be nil. And in the next one there is a typo; - (NSConnection*) createConnectionName:(NSString*)name { NSConnection* newConnection=[[NSConnection alloc] init]; if ([newConnection registerName:name]) { [newConnection setRootObject:self]; } else { [newConnection release]; newConnection=nil; } return newConnection; } > unless you WANT ( :-) ) to register the object's name as "name" and > ignore the input > parameter.. > > The BOTTOM line is that I can't get distributed objects to work "across > the wire" at all > no matter the example. The sentence preceding the example said: Distributed Objects also works over networks, but the semantics for this have changed because of the kernel change in Mac OS X, and it is not yet clear how named object services will work. Here is code that I know to work: // DOTest.h #import @interface Client:NSObject { id serverObject; } - (void) connect; - (void)log:(NSString*)string; @end @interface Server:NSObject { NSConnection* serverConnection; } - (void)log:(NSString*)string; - (void)serve; - (NSConnection*) createConnectionName:(NSString*)name; @end // DOTest.m #import "DOTest.h" @implementation Client - (void) connect { serverObject=[NSConnection rootProxyForConnectionWithRegisteredName:@"MyServer" host:nil]; } - (void)log:(NSString*)string { [serverObject log:string]; } @end @implementation Server - (void)log:(NSString*)string { NSLog(string); } - (void)serve { serverConnection=[self createConnectionName:@"MyServer"]; [[NSRunLoop currentRunLoop] run]; } - (NSConnection*) createConnectionName:(NSString*)name { NSConnection* newConnection=[[NSConnection alloc] init]; if ([newConnection registerName:name]) { [newConnection setRootObject:self]; } else { [newConnection release]; newConnection=nil; } return newConnection; } @end // server.m #import "DOTest.h" main() { NSAutoreleasePool* pool=[[NSAutoreleasePool alloc] init]; Server* server=[[Server alloc] init]; [server serve]; [pool release]; } // client.m #import "DOTest.h" main() { NSAutoreleasePool* pool=[[NSAutoreleasePool alloc] init]; Client* client=[[Client alloc] init]; [client connect]; [client log:@"Hello, world!"]; [pool release]; } To test: cc -c -o DOTest.o DOTest.m cc -o client client.m DOTest.o -framework Foundation cc -o server server.m DOTest.o -framework Foundation And then launch client in one Terminal window and Server in another. The "Hello, world!" will be sent from the client and logged in the servers window. I tested this a moment ago, and it works perfectly. Regards, John Hornkvist -- ToastedMarshmallow, the perfect Cocoa companion http://www.toastedmarshmallow.com From dstaudi at san.rr.com Tue May 8 21:50:28 2001 From: dstaudi at san.rr.com (Daniel Staudigel) Date: Thu Nov 3 14:46:16 2005 Subject: NSLocks (and their ilk), Multithreading, Global Variables, Distributed Objects etc. Message-ID: <200105090450.VAA04298@omnigroup.com> There seems to be more to multithreading than I thought. When I was introduced to it, by necessity, I had to go look it up. In the documentation, very few methods were documented in NSThread. In NSLock, NSRecursiveLock etc., the people at apple said that they are to protect variables from being accessed all at the same time. This makes sense, but I have never worked with multiple threads before. Basically, when one passes a variable to a new thread, using detachThreadSelector (or whatever), does it change in thread 2 (the one I detached) when you change it in thread 1? If you can how do you organize the NSLock to protect certain object and not others? Daniel Staudigel --------------- How to fly: Find a nice big cliff, jump off, and miss the ground! Easy enough! From life_magick at mac.com Wed May 9 00:01:00 2001 From: life_magick at mac.com (G. 'Andrew' Tapolow) Date: Thu Nov 3 14:46:16 2005 Subject: NSButton in NSTableView Message-ID: <200105090700.AAA09435@smtpout.mac.com> Hello, I've managed to set up my NSTableView (No column reorder, no column select) and my NSTableDataSource object. I want to put a column of CheckBoxes in so that depending on what is in column 1 you can choose to either check column 2 or leave it unchecked. I've tried code similar (and not excerpted) to that which is below but it caused a slew of errors outside the method: - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row; { int theColumn; NSButton* theRetButton; theRetString = [NSString stringWithString: [tableColumn identifier]]; if ([theRetString isEqualToString:@"Col2Name"]){ theColumn = 3; } else { theColumn = 2; } if (theColumn == 2) { theRetButton = [[NSButton alloc] initWithFrame:[tableView frameOfCellAtColumn:theColumn row:row]]; [theRetButton setButtonType:NSSwitchButton]; [theRetButton ]; return theRetButton; } else { return theRetString; } } Admittedly, I've also not figured out how to intercept the button presses to toggle the data stored yet either. As always, any assistance or at least pointers to which FM I should R would be appreciated. -Andrew P.S. This was submitted at 11:56pm on May 8th, I'm posting this out of curiosity to see how long it takes to show up on the list. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1614 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/20010509/3015f1fd/attachment.bin From gblock at wanadoo.fr Wed May 9 02:15:26 2001 From: gblock at wanadoo.fr (Gregory Block) Date: Thu Nov 3 14:46:16 2005 Subject: Why aren't NSClipViews paged to video memory in OS X? In-Reply-To: Message-ID: On Saturday, May 5, 2001, at 04:39 , John Siracusa wrote: > I'm guessing that wholesale offload of all compositing operations to a > capable GPU solves the problem, but I'm also guessing that that's not > possible with shipping hardware (e.g. Rage 128, Radeon, GeForce2 MX). > If > that's the case, then what "more interesting solutions" are possible? Holding all cllipped data offscreen would grow more wasteful as the size of the clipped area grew, so that's no good; that's only efficient if the area in question is marginally/minimally larger than the actual visible area - which may be true in the cases people are thinking of, but certainly isn't something you'd want to generically apply to a clipping view; that's very specific behavior, and it's only going to pay off in a *small* number of situations. You can count 'em: heavily composited images where the application author is unable to keep an intermediate view of the data. So there's a middle road; allow the scrolling of the part you can see as a bitmap, and only ask for the specific region which wasn't onscreen to be updated. Guess what - that's the implementation. That's a memory and cpu-efficient way of doing it in 90%+ of all circumstances - and if it isn't, allow me to venture forward and say that those situations for where it is NOT true, large-screen representations, you should be using intermediate representations *anyways* or updating that offscreen region will be too slow; and the bigger that region gets, the more exponentially wasteful it gets. No, fully offscreen clipviews really don't have much real-world use. :plur, Greg From mikevannorsdel at qwest.net Wed May 9 02:40:50 2001 From: mikevannorsdel at qwest.net (Mike Vannorsdel) Date: Thu Nov 3 14:46:16 2005 Subject: Quick Attributed String Q Message-ID: <200105090940.CAA13971@omnigroup.com> What are the dictionary key values for NSAttributedStrings or where can I find them? Thanks. From ssudre at intego.com Wed May 9 03:22:41 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:16 2005 Subject: Mail Preferences dialog - how? In-Reply-To: <20010507154859.0A59A11C001@fimail01.cabinet.net> Message-ID: <1222718432-55631813@transeo.com> On lundi, mai 7, 2001, at 05:48 , John H?rnkvist wrote: > > On Saturday, May 5, 2001, at 02:27 AM, Mike Harrison wrote: > >> >> I've been looking into how Mail.app implements its preferences dialog, >> and it seems like each of the 6 icons at the top corresponds to a >> separate nib file. Somehow when you click the buttons it loads the >> corresponding nib file into the space below the icons. Also, there >> doesn't seem to be a nib file corresponding to the preferences toolbar >> at all. Can anyone tell me how they are doing this? I'd like to >> implement a similar type of prefs dialog. > > I don't know how it's done in mail, but it is easy to implement. > > What you usually do is to have a view in the nib file which you remove > from its superview and put in the preference window. > > Something like this: > currentPreferenceController = ... ; > [currentPreferenceView removeFromSuperview]; > currentPreferenceView = > [currentPreferenceController preferenceView]; > [preferenceView addSubview:currentAttributeView]; > > The currentPreferenceController loads a nib when it is created, and > returns a view containing your preference objects (typically a box with > no borders) on preferenceView. > > If that isn't enough I can probably dig up some source. Unfortunately, that's not the most difficult part. Easy parts are: - managing the nib files and the interface a .plist file with a array of nib files names (which are also icons name) can fit. NSString * tPath; NSArray * tArray; tPath=[[NSBundle mainBundle] pathForResource:@"preferenceDialog" ofType:@"plist"]; tArray= [NSArray arrayWithContentsOfFile: tPath]; and then you do some: [NSBundle loadNibNamed:[tArray objectAtIndex:something] owner:self] to get the good nib and then use your code to display it: currentPreferenceController = ... ; [currentPreferenceView removeFromSuperview]; currentPreferenceView = [currentPreferenceController preferenceView]; [preferenceView addSubview:currentAttributeView]; The missing parts are: - how to resize the window with the animation effect (I guess this one can be found in the OmniAppKit). - what kind of view is used to contain the Icons ? NSMatrix, NSTableView ? - what kind of view is used to display the Icons ? It looks like it's not a NSButton but a custom one. One thing I have not found yet is: where is the nib containing the Preferences Panel ? It seems to be built with code. From ian.cardenas at ultraviolent.com Wed May 9 03:29:39 2001 From: ian.cardenas at ultraviolent.com (Ian P. Cardenas) Date: Thu Nov 3 14:46:16 2005 Subject: Quick Attributed String Q In-Reply-To: <200105090940.CAA13971@omnigroup.com> Message-ID: <200105091029.EAA07425@uv.iserver.net> On Wednesday, May 9, 2001, at 05:41 , Mike Vannorsdel wrote: > What are the dictionary key values for NSAttributedStrings or where can I > find them? Thanks. > although NSAttributedString is a Foundation class, there are additions made to it in AppKit via categories. If you open Project Builder's find panel (cmd-shift-f) and search for NSAttributedString definitions you'll find /System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h the keys for the init method and the character attributes are listed there. -- Ian P. Cardenas Computer Scientist, Software From ssudre at intego.com Wed May 9 03:43:10 2001 From: ssudre at intego.com (=?iso-8859-1?Q?St=E9phane_Sudre?=) Date: Thu Nov 3 14:46:16 2005 Subject: Mail Preferences dialog - how 2? In-Reply-To: <1222718432-55631813@transeo.com> Message-ID: <1222717222-55704624@transeo.com> On mercredi, mai 9, 2001, at 12:22 , St?phane Sudre wrote: > > - how to resize the window with the animation effect (I guess this one > can be found in the OmniAppKit). Found that one: // smooth resize // subclasses can override animationResizeTime: to control the total time for the frame change. // newFrame is the rect passed into setFrame:display:animate: - (NSTimeInterval)animationResizeTime:(NSRect)newFrame; // setFrame:display:animate: is equivalent to setFrame:display: if animateFlag is NO // If animationFlag is YES, this method will perform a smooth resize of the window, where the total time for the resize is specified by -animationResizeTime: - (void)setFrame:(NSRect)frameRect display:(BOOL)displayFlag animate:(BOOL)animateFlag; Use the headers Luke. 2 difficult parts left. I've looked at the Preference.subproj of the OmniAppKit and still can't figure how it works. From jklein at ivy.artificial.com Wed May 9 03:57:21 2001 From: jklein at ivy.artificial.com (jk) Date: Thu Nov 3 14:46:16 2005 Subject: Accuracy of leaks? In-Reply-To: <200105081246.IAA15591@postoffice2.mail.cornell.edu> Message-ID: On Tue, 8 May 2001, Peter Ammon wrote: > How accurate is the command line tool leaks? I was flustered that it > found a number of leaks in my app, but then I noticed that it found > leaks in every app I tried it on, from the Finder to Project Builder to > Mail to TextEdit. It says that the leaks reported will always be true > leaks. Is all software really leaky, or is the problem with the leaks > executable itself? If you set the environment variable MallocStackLogging you can see exactly where the leaks are. What I found is that there are a lot of memory leaks in the Cocoa classes and, consequently, probably genuine leaks in your application as well. -- this is a .sig about a superhero named jonny, it's called jonny's .sig! From raphael_sebbe at mac.com Wed May 9 05:47:36 2001 From: raphael_sebbe at mac.com (Raphael Sebbe) Date: Thu Nov 3 14:46:16 2005 Subject: ObjC from pthreads Message-ID: <200105091246.FAA01634@smtpout.mac.com> Hi, I am having problems (crashes) using NSLog from secondary pthreads. It feels like I am missing something here too... So, I have secondary threads (pthreads) running in the background that call a user provided callback function. This function uses ObjC objects as well as NSLogs. The problem is that I (sometimes) get bad access, and the debugger shows it comes from some NSLogs in that callback. I think that perhaps the ObjC runtime does not know the app is multithreaded (no NSThread detached) and perhaps some variable get messed up when using NSLog. When I remove NSLogs, everything's fine again. The only arg to NSLog is an ObjC constant string (ie, @"blabla"). So, what's the problem ? More generally, could someone tell me what I should be aware of when using ObjC from pthreads ? BTW, in the callback (called from the pthread), I create an autorelease pool, and destroy it at the end. That is required, right ? Thanks, Raphael From ccunning at math.ohio-state.edu Wed May 9 06:09:29 2001 From: ccunning at math.ohio-state.edu (Chad Cunningham) Date: Thu Nov 3 14:46:16 2005 Subject: gcc ./configure problems In-Reply-To: <200105082008.f48K8Fb25366@m5.andara.com> Message-ID: On Tue, 8 May 2001, Rob Smith wrote: > ok...I created the link (ln -s /usr/bin/c++ /usr/bin/gcc) but I still > get the following error: It is complaining about the compiler not being > able to create executables. Maybe I should uninstall and reinstall the > develpment tools. Is there a way to do this cleanly? so that I get rid > of everything and reinstall fresh? Or does someone see another solution. Why are you linking the c++ compiler to the name for the gnu c compiler? There's no need for that, cc is there and any program will know to use cc to compile programs. As I said before, you need to look at config.log and find out why it is failing. It will say something like: configure:1583: gcc -o conftest -L/nonexistant -lnolibrary conftest.c 1>&5 /usr/bin/ld: cannot find -lnolibrary collect2: ld returned 1 exit status configure: failed program was: #line 1578 "configure" #include "confdefs.h" main(){return(0);} In this case it fails because it's trying to link against a library that doesn't exist (which I intentionally told it to do). -- Chad Cunningham ccunning@math.ohio-state.edu "Well, once again my friend, we find that science is a two-headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is bad! Oh beware the other head of science, Arthur, it bites!" From ben at dluke.geeklair.net Wed May 9 06:25:44 2001 From: ben at dluke.geeklair.net (Ben Reiter) Date: Thu Nov 3 14:46:16 2005 Subject: Bloody lame windows In-Reply-To: ; from rosyna@unsanity.com on Tue, May 08, 2001 at 12:34:52PM -0700 References: <200105071702.KAA04127@mailer.symantec.com> Message-ID: <20010509092529.A2099@dluke.geeklair.net> On Tue, May 08, 2001 at 12:34:52PM -0700, Rosyna wrote: > You'd THINK this would make a window frontmost and have all controls > active, But NOOOOO! > > [[textInfo window] center]; > [[textInfo window] makeKeyAndOrderFront:nil]; > [[textInfo window] orderFrontRegardless]; > [[textInfo window] _setForceActiveControls:YES]; > > Any way to make it have active controls too? I don't know about activating the controls, but I /think/ [[textInfo window] makeKeyAndOrderFront:nil]; should be [[textInfo window] makeKeyAndOrderFront:self]; remember, though, that I don't really know what I'm talking about. -- Ben Reiter ben@geeklair.net "The surest way to corrupt a youth is to instruct him to hold in higher regard those who think alike than those who think differently" - Nietzsche "Think Different" - Apple From marcel at metaobject.com Wed May 9 06:56:48 2001 From: marcel at metaobject.com (Marcel Weiher) Date: Thu Nov 3 14:46:16 2005 Subject: Disabling NSToolbarItems In-Reply-To: <200105082231.PAA10094@smtpout.mac.com> Message-ID: On Mittwoch, Mai 9, 2001, at 12:27 Uhr, James DiPalma wrote: > > On Friday, May 4, 2001, at 08:27 AM, Chuck Pisula wrote: > >> the toolbar items will validate with the same "mechanism" that menu >> items do, but you should implement the method: -(BOOL) >> validateToolbarItem: (NSToolbarItem *)item; > > I always hated the way menu items where validated. A simple reversal of > the logic would allow all menu items to be auto-disabled when no one in > the responder chain responds to their action That's exactly how it works. The validation method is for those cases where the responder does actually respond to the message, but the current state means it isn't useful. (Delete with empy text) > and allow for setEnabled:NO to actually work. ? Marcel From marcel at metaobject.com Wed May 9 06:58:02 2001 From: marcel at metaobject.com (Marcel Weiher) Date: Thu Nov 3 14:46:16 2005 Subject: ObjC from pthreads In-Reply-To: <200105091246.FAA01634@smtpout.mac.com> Message-ID: On Mittwoch, Mai 9, 2001, at 02:49 Uhr, Raphael Sebbe wrote: > Hi, > > I am having problems (crashes) using NSLog from secondary pthreads. It > feels like I am missing something here too... Yes. The Objective-C runtime isn't thread-safe by default. You need to create at least one thread with NSThread, at which point a notification signals multi-threadedness and everything reconfigures itself. After that, you can merrily create pthreads as you like. Marcel From chuck at benatong.com Wed May 9 07:17:34 2001 From: chuck at benatong.com (Charles Bennett) Date: Thu Nov 3 14:46:16 2005 Subject: Was MacTech problems now "beating a dead horse" References: <20010509040959.B213411C001@fimail01.cabinet.net> Message-ID: <3AF95173.C09A2874@benatong.com> First, thank you for the working example, I was debugging some known good code that uses DO over the network, and was looking to see if it was me. I tried using Apples example's before I found your article. John H?rnkvist wrote: > > On Monday, May 7, 2001, at 06:46 PM, Charles Bennett wrote: > > > Have you actually tried running the Distributed Object code snippet > > found at > > http://www.mactech.com/articles/mactech/Vol.16/16.05/HotChocolate/index.html > > Since I wrote that article, I guess I'd better answer. > > > After fixing a couple of errors.. (paste errors?) > > > > NSDistantObject* serverObject= > > [NSConnection rootProxyForConnectionWithRegisteredName:@"MyServer" > > The end of that line is on the next line so what I wrote was this: > - (void) connect > { > NSDistantObject* serverObject= > [NSConnection rootProxyForConnectionWithRegisteredName:@"MyServer" > host:@"*"]; > } Sorry about that, I missed the the host:@"*"]; on my browser (and at the MacTech website) it displays way the heck off to the right at about column 8000 ;-) and is all alone. If you pull up the page source you'll see what I mean. Ok, so it's only at column 180 but it really does look like it's missing, honest :-) > Since you can't rely on the name server on