From rcfa at wenix.cubiculum.com Tue Sep 1 00:20:24 1998 From: rcfa at wenix.cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:28 2005 Subject: questions In-Reply-To: <9808311955.AA05077@vviuh221.vvi.com> References: <9808311955.AA05077@vviuh221.vvi.com> Message-ID: <9809010720.AA12471@wenix.cubiculum.com> > > That was quite important to do, because there is no easy and > > efficient way to determine what sections depend on what others. > > My point is that with a little more general indirection built into > the bundle convention and obj-c the whole issue could have been > nicely taken care of. Instead the mach-o dyn loadable section model > did not consider good indirection of objective-c only bundles. That > resulted in a system that was never used because it was impractical. I guess, the key question would be, how much of a performance overhead that would add to the objc runtime system, and in consideration of how often the feature would be used, if it's worth that overhead. Of course, from a developer's point of view, it would be great, because it would allow almost interpreter like modify/compile/debug cycles, where class and method definitions could be updated in running programs while in the debugger... Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From C.Ridd at isode.com Tue Sep 1 06:02:02 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:28 2005 Subject: Full C++ STL, gcc2.8.1 ? In-Reply-To: Your message of "Sat, 29 Aug 1998 12:22:30 CDT." Message-ID: <13953.904654922@isode.com> On Sat, 29 Aug 1998 12:22:30 CDT, Dan Keith wrote: > I feel your pain. Please pardon me if my frustration with this issue seeps= > too much into the remainder of this message. > > We were trying to port our cross-platform (NT, MacOS, and various Unixes)= > server to Rhapsody and have abandoned all efforts to do ANY MacOSX Server= > development because of Apple's apparent lack of a modern C++ strategy. No= > one from Apple has even acknowledged the problem, despited my pointing out= > this problem since RDR1 shipped 1 year ago. Other people have commented on other aspects of your message. I'd like to point out that the STL is not generally available on other Unixes. For example Sun's C++ compiler does not have STL support. Betting that STL will make your application portable is a little premature at this point. Heck, ISO only published the C++ standard recently! Chris From dbk at opentext.com Tue Sep 1 08:33:40 1998 From: dbk at opentext.com (Dan Keith) Date: Thu Nov 3 14:41:28 2005 Subject: Full C++ STL, gcc2.8.1 ? In-Reply-To: <13953.904654922@isode.com> Message-ID: At 6:15 AM -0700 9/1/98, Chris Ridd wrote: >On Sat, 29 Aug 1998 12:22:30 CDT, Dan Keith wrote: >> I feel your pain. Please pardon me if my frustration with this issue seeps= >> too much into the remainder of this message. >> >> We were trying to port our cross-platform (NT, MacOS, and various Unixes)= >> server to Rhapsody and have abandoned all efforts to do ANY MacOSX Server= >> development because of Apple's apparent lack of a modern C++ strategy. No= >> one from Apple has even acknowledged the problem, despited my pointing out= >> this problem since RDR1 shipped 1 year ago. > >Other people have commented on other aspects of your message. I'd like >to point out that the STL is not generally available on other Unixes. >For example Sun's C++ compiler does not have STL support. > >Betting that STL will make your application portable is a little >premature at this point. Heck, ISO only published the C++ standard >recently! Sun's C++ compiler can compile the STL from several different vendors (including HP and ObjectSpace). You are correct in that Sun does not ship an STL itself; they do recommend that you use either HP's or ObjectSpace's STL. Their compiler is capable of processing the requisite templates and exceptions. We use ObjectSpace's STL and it works just dandy. bud ! Dan "Bud" Keith dbk@mcs.com ! "You never can tell what goes on down below. This pool might be bigger than you or I know." - Dr. Seuss From matthew.wood at bbc.co.uk Tue Sep 1 11:07:18 1998 From: matthew.wood at bbc.co.uk (Matthew Wood-ONLINE) Date: Thu Nov 3 14:41:28 2005 Subject: 'Unsatisfied Link' crash in Java YB Message-ID: The following trivial code crashes with an 'Unsatisfied Link' java exception when I do anything to its NSArray. EOEditingContext editingContext = new EOEditingContext(); EOFetchSpecification fetch = new EOFetchSpecification("Descriptions",null,null); NSArray objects = editingContext.objectsWithFetchSpecification(fetch); System.out.println(objects.count()); // die! This, however, works fine: NSArray objects = new NSArray(); System.out.println(objects.count()); The project is a vanilla Application, but with the EO frameworks added. I am using the YB that came with WebObjects 4.0 Beta, on NT 4. I have tried the Windows NullSecurityManager patch, to no avail. I'm guessing that somehow the Obj-C core to NSArray is failing to be linked in properly...? Is there anything I should Bear In Mind when writing a java-based EO Application? || Matthew Wood, development lead, BBC News Online || http://www.bbc.co.uk/news/ || matthew.wood@bbc.co.uk From talorza at csarc.otago.ac.nz Tue Sep 1 20:19:54 1998 From: talorza at csarc.otago.ac.nz (Tracy Mason) Date: Thu Nov 3 14:41:28 2005 Subject: pulldown menu lists Message-ID: <199809020319.PAA00399@aphrael.csarc.otago.ac.nz> Hi Does anyone know how the '+' button pulldown menu list (where you choose which columns are displayed) is done in the Openstep eomodeller main table browsing window? With thanks Tracy ******************************************************************* Tracy Mason Programmer/Analyst Black Albatross, Computer Science Applied Research Centre University of Otago ph (03) 479-5468 NeXT mail: talorza@csarc.otago.ac.nz ******************************************************************* From paul at eisusa.com Tue Sep 1 20:49:55 1998 From: paul at eisusa.com (Paul Nicholson) Date: Thu Nov 3 14:41:28 2005 Subject: Rhapsody "CheckItem" equivalent? In-Reply-To: Message-ID: Hi, I have a hierarchial menu with menu items that are connected to methods used to select one out of a number of states. I want the currently active state to be displayed with its corresponding menu item checked, and the other menu items to be unchecked. What is the cool way to do this? Paul From C.Ridd at isode.com Wed Sep 2 01:13:28 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:28 2005 Subject: NSBitmapImageRep Message-ID: <15506.904724008@isode.com> I'm writing a little app that needs to create an image 'by hand' (eg by image processing) and save it to disk in TIFF or PNG or something similar. My approach so far has been to create an NSBitmapImageRep of the appropriate size and parameters, and then manipulate the pixels directory using -bitmapData. I can then save it by doing a -getRepresentation:NSPNGFileType properties:NULL (I don't have the header file here to check what the method's exact name is), and then saving the resulting NSData object. Presumably if I wanted to draw the thing somewhere I'd have to create an NSImage and do an addRepresentation on it with my NSBitmapImageRep. I have some queries! a) What properties should I be passing to getRepresentation:properties? Could I determine the list of available properties at run-time? b) Can I find out the list of values to pass instead of NSPNGFileType at run-time? It would be nice when running on Windows for instance to offer the native Windows BMP format as well as formats like TIFF and PNG. c) Saving as PNG requires the BitmapImage to be created a certain way (eg non-planar); is this determinable at run-time as well? d) converting the image to the file representation in memory and then squirting it to disk seems an inefficient use of memory. Is there a way to do both of these steps together, which (hopefully) uses less memory? Thanks for any help, Chris From paulrs at lgs-systems.com Wed Sep 2 05:29:54 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:28 2005 Subject: NSMenuPanel, NSPopUpList, NSMenuView, Context menus ... Message-ID: <9809021229.AA08113@slab> Hey guys, I'm trying to wade through a group of very useful but private classes to find a solution for a problem on OS 4.2 whose solution can be easily migrated to X. I need to accomplish something very similar to what happens in Explorer when you right click and drag a file. When you've reached your destination, a menu pops up underneath your cursor giving you options like Copy, Move, ... Given the complex APIs for NSMenuPanel and NSPopUpList which I am looking at from the class-dump, I am reluctant to roll my own versions. However, I'm equally nervous about using private classes, especially since they still seem to be private in Rhapsody. Does anyone have any suggestions on what we should do? Any thoughts would be appreciated. Regards, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From paulrs at lgs-systems.com Wed Sep 2 04:24:50 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:28 2005 Subject: pulldown menu lists In-Reply-To: <199809020319.PAA00399@aphrael.csarc.otago.ac.nz> References: <199809020319.PAA00399@aphrael.csarc.otago.ac.nz> Message-ID: <9809021124.AA08098@slab> You wrote: [ Hi [ Does anyone know how the '+' button pulldown menu list (where you choose [ which columns are displayed) is done in the Openstep eomodeller main [ table browsing window? [ With thanks [ Tracy I'm not sure of the specifics, but I can give you a cheap hack which works pretty well. NSTableViews have a cornerView. If you create an intance of a pullDownButton, you can put this button in the corner view and get something pretty similar to what they have in EOModeler. The problem with this is that when you click on the button it 'pops' out and draws itself over part of the table's header cells. Regardless, there is API in rhapsody which I haven't used that will let you place menus where you need them on screen. This should allow you to stick a button in the corner and place the menu when the user mouses down. Here is some information which Mike Ferris posted on the topic as it pertains to Rhapsody NOT OS 4.2: "Just set an NSPopUpButton as the corner view. You can configure a pulldown menu to behave the way you need it to by tweaking a few ofthe public settings. See the MenuMadness example for some code that shows various ways you can configure popups (although there is no specific example of using one as a corner view. The main thing you'll want to do is probably turn off -setUsesItemFromMenu: in the NSPopUpButtonCell of the NSPopUpButton so you can create a special icon-only item to use for the popup itself while the menu contains normal textual items." another tidbit from a later message from Mike which is also applicable to this situation: "Try doing an NSPopUpButtonCell subclass that overrides -attachPopUpWithFrame:inView: to modify the frame appropriately and call super." Regards, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From snoyes1 at .rdc1.az.home.com Wed Sep 2 08:57:47 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:28 2005 Subject: YB Images fail to show on YB Win95 Message-ID: <19980902155519.AAA26547@CX268689-A> I have developed an application under OS-X and OPENSTEP that composites simple tiff images in an NSScrollView. Under OS-X and OPENSTEP the image displays (they are "large" about 300X 600 @ 72DPI). When I compiled under YB for Win95, the larger images will not composite to the view. Frequently they fail to load. I am using [[NSImage alloc] initByReferencingFile:@""] to load the images. Is there anything special to watch out for in the Windows environment? From sbrandon at music.gla.ac.uk Wed Sep 2 08:55:58 1998 From: sbrandon at music.gla.ac.uk (Stephen Brandon - SysAdmin) Date: Thu Nov 3 14:41:28 2005 Subject: NSButtonCell madness Message-ID: <199809021556.QAA19273@music.gla.ac.uk> Hi, In converting Calliope.app, I need to have a working 3 state button. It used to use MiscThreeStateButton.palette. The behaviour of NSButtonCell must have changed internally, as the normal conversion process does not have the desired effect. What is happening is this: I can set the alternateImage of the buttoncell once, after which time it will not change again, except to nil. I am doing this from within the subclass (in methods such as highlight, and setState), with calls to super. [super setAlternateImage:newImage]; but even after this, [super alternateImage] == oldimage I realise that NXButtonCell stated that you could use it to create multi state buttons, but that NSButtonCell has dropped this claim. Nevertheless, the behaviour I have outlined above is ugly. I have wasted 2 days on this. Does anyone else have a preferred 3StateButton implementation or any ideas which could help me? Cheers, Stephen Brandon --- Systems Administrator, Department of Music, e-mail: S.Brandon@music.gla.ac.uk 14 University Gardens, (NeXT mail welcomed) University of Glasgow, Tel: +44 (0)141 330 6065 Glasgow. Fax: +44 (0)141 330 3518 Scotland G12 8QH From aep at apple.com Wed Sep 2 10:31:11 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:28 2005 Subject: NSButtonCell madness Message-ID: <199809021730.KAA49274@scv1.apple.com> > The behaviour of NSButtonCell must have changed internally, as the normal > conversion process does not have the desired effect. > > What is happening is this: I can set the alternateImage of the buttoncell > once, after which time it will not change again, except to nil. I am doing > this from within the subclass (in methods such as highlight, and > setState), > with calls to super. > > [super setAlternateImage:newImage]; > > but even after this, [super alternateImage] == oldimage > > I realise that NXButtonCell stated that you could use it to create multi > state buttons, but that NSButtonCell has dropped this claim. > Nevertheless, > the behaviour I have outlined above is ugly. I have wasted 2 days on this. You should be able to subclass NSButtonCell, override [NSButtonCell alternateImage] and as long as the state is non-zero and you have said [self showsStateBy:NSContentsCellMask], you can provide any number of alternate images which are used by [NSButtonCell drawInteriorWithFrame:inView:] Also note that the default radio buttons and switches (checkboxes) can display standard tri-state images if you set the button to [self setAllowsMixedState:YES] and use NSMixedState, NSOffState, and NSOnState. (Note that these images cannot be changed.) As for why it's forgetting the alternate image, if you are starting from standard radio buttons or checkboxes there is custom code to handle those and it doesn't use [NSButtonCell alternateImage] at all for those. Andrew Platzer Application Frameworks Apple Computer, Inc. From aep at apple.com Wed Sep 2 10:47:42 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:28 2005 Subject: Rhapsody "CheckItem" equivalent? Message-ID: <199809021746.KAA10928@scv2.apple.com> > I have a hierarchial menu with menu items that are connected to methods > used to select one out of a number of states. I want the currently active > state to be displayed with its corresponding menu item checked, and the > other menu items to be unchecked. What is the cool way to do this? To visually indicate it, use [NSMenuItem setState:] on each item. Though there is no concept of menu item groups so you'll have to roll your own in terms of setting/clearing the mark. Andrew Platzer Application Frameworks Apple Computer, Inc. From aep at apple.com Wed Sep 2 10:43:46 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:29 2005 Subject: NSBitmapImageRep Message-ID: <199809021742.KAA10896@scv2.apple.com> > I'm writing a little app that needs to create an image 'by hand' (eg by > image processing) and save it to disk in TIFF or PNG or something > similar. My suggestions is to stick with TIFF where possible since that is the standard currently on Rhapsody. The PNG stuff is limited and really only meant for reading. > Presumably if I wanted to draw the thing somewhere I'd have to create > an NSImage and do an addRepresentation on it with my NSBitmapImageRep. Yes. > a) What properties should I be passing to getRepresentation:properties? > Could I determine the list of available properties at run-time? The only property that is used by the PNG writer is NSImageInterlaced (see comments in NSBitmapImageRep.h) > b) Can I find out the list of values to pass instead of NSPNGFileType > at run-time? It would be nice when running on Windows for instance to > offer the native Windows BMP format as well as formats like TIFF and > PNG. See the NSBitmapImageFileType enumeration in NSBitmapImageRep.h > c) Saving as PNG requires the BitmapImage to be created a certain way > (eg non-planar); is this determinable at run-time as well? No. It only accepts images at 8 bits/sample, 3 or 4 samples per pixel non-planar. > d) converting the image to the file representation in memory and then > squirting it to disk seems an inefficient use of memory. Is there a way > to do both of these steps together, which (hopefully) uses less memory? No. Andrew Platzer Application Frameworks Apple Computer, Inc. From paulrs at lgs-systems.com Wed Sep 2 10:52:48 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:29 2005 Subject: dragImage: ... & mouseOffset Message-ID: <9809021752.AA08402@slab> Hey guys, I've never had to take advantage of this before, but we have created a button like object which, if you click and drag the mouse out of the button, starts a dragging session. The dragImage: ... method on NSView has a mouseOffset argument which seems to be the hook I need. Basically, the user may have started the drag somewhere which is far from the current event's location. This needs to be taken into consideration by the view when figuring out where to put the image. The problem is that the mouseOffset argument is an NSSize. The foundation documenation indicates quite strongly that sizes should never be negative. How can I denote an offset from a point without sometimes needed a negative number? For example, if the original mouseDown event is at 50,50 and the current event's location is 25,50, I would think that I would want to have an offset of -25.0,0.0. Am I way off base? If so, is there another way in which to accomplish this? Thanks, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From aep at apple.com Wed Sep 2 10:57:00 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:29 2005 Subject: NSMenuPanel, NSPopUpList, NSMenuView, Context menus ... Message-ID: <199809021756.KAA23892@scv3.apple.com> > I'm trying to wade through a group of very useful but private > classes to find a solution for a problem on OS 4.2 whose solution can be > easily migrated to X. I need to accomplish something very similar to what > happens in Explorer when you right click and drag a file. When you've > reached your destination, a menu pops up underneath your cursor giving you > options like Copy, Move, ... That's not very Mac-like (right click, what's that? :-) Perhaps you could think of a different way of offering this choice on drop. For example, just dropping could be Move while option-drop could mean Copy (i.e using Finder modifier key semantics.) > Given the complex APIs for NSMenuPanel and NSPopUpList which I am > looking at from the class-dump, I am reluctant to roll my own versions. > However, I'm equally nervous about using private classes, especially > since > they still seem to be private in Rhapsody. Does anyone have any suggestions > on what we should do? Any thoughts would be appreciated. I would stay away from using any private classes. These may change internally as we go from Mac OS X Server to Mac OS X. No guarantees. Andrew Platzer Application Frameworks Apple Computer, Inc. From edream at mailbag.com Wed Sep 2 16:08:31 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:29 2005 Subject: DR2 PB or Win95 keyboard mystery Message-ID: Hi, Earlier I posted the following: [ Quote ] While editing a file in PB I probably hit an alt-key combination instead of a control-key combination to cut or paste. Thereafter, in _all_ projects, the control keys in PB act like they do in Win95 instead of as I would expect in PB. [ End Quote ] I have discovered that doing a "cold" boot, that is, actually turning off the power on my Windows machine, restores Win95 and IB to their expected operation. On the other hand, doing a simple restart has no effect. I'm not sure whether this is purely a bug in IB or not. Edward -------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) http://www.mailbag.com/users/edream/front.html Apple Computer, right down there with Mercedes Benz. -------------------------------------------------- From z.leo at dns.net.iss.it Wed Sep 2 23:03:48 1998 From: z.leo at dns.net.iss.it (Zanitti Leo) Date: Thu Nov 3 14:41:29 2005 Subject: My BUG? In-Reply-To: <199809022023.NAA14938@ignem.omnigroup.com> Message-ID: <3.0.5.32.19980903080348.007a6420@net.iss.it> I have an litte bug in my app. The bug appear only when I resize the window. And I think the bug not is mine but of apple. I have one NSMatrix of NSTextFields (and other widgets) surrounded in one NSBox (if I don't put in a NSBox the items on the window don't resize in the correct proportions) Now if the first NSTextField of the matrix is selected, and I resize the window (bigger) the rectangular line blue of the selection is resized bigger of the size of the NSTextView -------------- | | size of the NSTextField -------------- ---------------------- | | size of the blu lines of the rectangle indicating the selection ---------------------- after the resizing if I select the NSTextField the problem go away, but the problem is annoyng Have you meet the same problem? Or is it only for my app? (My BUG) Thanks Bye :-) ;>) )^> %^) =^) :) >-) (:|) >:-( 8-) %^| Zanitti Leo :<( 8-> Via Capovilla n. 22 :-] :^< I-33010 Montenars (UD) :o) :-0 :-[ :=) E-Mail: z.leo@net.iss.it :<| ;-[ 8^| :^0 TEL +39 432 972966 :*) &^) ;=J 8-! :-/ :-I :-> :0) ;=| :>) :#( 3-) 8#( :-] 8*I From contact at finindev.com Thu Sep 3 02:19:13 1998 From: contact at finindev.com (Philippe Roger) Date: Thu Nov 3 14:41:29 2005 Subject: how to have a wait cursor Message-ID: <01BDD72C.AEE6B510@PHILIPPE> Hi, I want to whange the cursor and have a wait cursor when my app is doing a backgroun task (which is in that case operation on datas). Any idea about that ? Thanks PhR - Finindev From marco at sente.ch Thu Sep 3 02:39:12 1998 From: marco at sente.ch (Marco Scheurer) Date: Thu Nov 3 14:41:29 2005 Subject: Loading code from "other" bundles Message-ID: <199809030939.LAA03105@hnw.sente.ch> Hi, Is it possible to load into one application the code from another one? If yes, how? I hoped that a (.app) NSApplication bundle, was a kind of bundle so that it would be possible to use the regular NSBundle methods, but this does not work. Should I look into mach-o stuff? Thansk for any ideas. Marco Scheurer Sen:te From tjw at omnigroup.com Thu Sep 3 02:51:26 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:29 2005 Subject: Loading code from "other" bundles In-Reply-To: <199809030939.LAA03105@hnw.sente.ch> References: <199809030939.LAA03105@hnw.sente.ch> Message-ID: <199809030951.CAA15475@ignem.omnigroup.com> A .app is a bundle as far as NSBundle is concerned, but it is not a loadable bundle. If you get down to the Mach-O layer, would find that loadable bundles are a particular type of Mach-O file (MH_BUNDLE) while those inside .app wrappers are a differnt type (MH_EXECUTE). A MH_EXECUTE file may not be dynamically loaded but a MH_BUNDLE (or MH_DYLIB -- ie, a framework) may be dynamically loaded. So, if you have some code that you want to share between two applications, you should put it into a bundle and then have the two applications share that bundle. -tim Begin forwarded message: Date: Thu, 3 Sep 1998 02:41:36 -0700 (PDT) Reply-To: marco@sente.ch From: Marco Scheurer To: Multiple recipients of list Subject: Loading code from "other" bundles X-Nextstep-Mailer: Mail 3.3 (Enhance 1.2) Hi, Is it possible to load into one application the code from another one? If yes, how? I hoped that a (.app) NSApplication bundle, was a kind of bundle so that it would be possible to use the regular NSBundle methods, but this does not work. Should I look into mach-o stuff? Thansk for any ideas. Marco Scheurer Sen:te From plc at ina.fr Thu Sep 3 05:17:58 1998 From: plc at ina.fr (Philippe Converset) Date: Thu Nov 3 14:41:29 2005 Subject: how to have a wait cursor References: <01BDD72C.AEE6B510@PHILIPPE> Message-ID: <35EE88F5.7857C323@ina.fr> One simple solution is to create a cursor cursor = [[NSCursor alloc] initWithImage:[NSImage imageNamed:@"myWaitingCursor"] hotSpot:NSMakePoint(8,8)] and select it for displaying [cursor push] When your work is done you must display previous cursor [cursor pop] That's all. Phil. From in-MacOSX-dev at object-factory.com Thu Sep 3 05:52:49 1998 From: in-MacOSX-dev at object-factory.com (in-MacOSX-dev@object-factory.com) Date: Thu Nov 3 14:41:29 2005 Subject: Derived relationships? Message-ID: <6sm3f1$130$1@leonie.object-factory.com> InterfaceBuilder supports derived attributes for data sources. As you all know one simply adds the desired attribute in the inspector for the respective EODisplayGroup. There is no way of further describing the attribute but this is normally not necessary because the association connected to the attribute will (hopefully!) convert the object values. If, however, the derived attribute is in fact a "derived relationship," ie. returns an array of objects I'm not sure how to access these in IB. Say, for example, a company object has a list of departments and each department has a list of persons. The company class has a method (allEmployees) that returns a concatenation of the employee lists of all its departments. Now I have a display group that contains company objects and I want to display the names of its employees in a table view. So I add the `allEmployees' attribute to the display group and connect my table column associations?! As I had no possibility to specify that `allEmployees' returns employee objects IB doesn't treat it as a relationship and I cannot access attributes of the employee entity. So far, I solved this by writing some code in each case where this problem occured but now I'll have a fair amount of cases like this and I'm looking for a no-code solution even if it involves writing code to extent IB or something similar. Any ideas? thanks in advance, erik -- OBJECT FACTORY, Gesellschaft f?r Informatik und Datenverarbeitung mbH Telephone: ++49 +231 9751370, Internet: http://www.object-factory.com From marco at sente.ch Thu Sep 3 07:24:59 1998 From: marco at sente.ch (Marco Scheurer) Date: Thu Nov 3 14:41:29 2005 Subject: Loading code from "other" bundles In-Reply-To: <199809030951.CAA15475@ignem.omnigroup.com> References: <199809030939.LAA03105@hnw.sente.ch> <199809030951.CAA15475@ignem.omnigroup.com> Message-ID: <199809031425.QAA03160@hnw.sente.ch> You wrote: > A .app is a bundle as far as NSBundle is concerned, but it is not a > loadable bundle. If you get down to the Mach-O layer, would find > that loadable bundles are a particular type of Mach-O file > (MH_BUNDLE) while those inside .app wrappers are a differnt type > (MH_EXECUTE). > > A MH_EXECUTE file may not be dynamically loaded but a MH_BUNDLE (or > MH_DYLIB -- ie, a framework) may be dynamically loaded. Thanks for the information. > So, if you have some code that you want to share between two > applications, you should put it into a bundle and then have the two > applications share that bundle. Yes, but this is not what I wanted to do, which is a kind of development tool that would be able to transparently load, analyze and execute code from any executable (bundle, framework or app). Thanks again, Marco Scheurer Sen:te From snoyes1 at .rdc1.az.home.com Thu Sep 3 07:36:43 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:29 2005 Subject: Modal window ontop of modal window Message-ID: <19980903143601.AAA20863@CX268689-A> How do you put a modal window on top of a modal window? I have a modal window that requests another modal window to open. My first window always remain key and does not allow my new modal window to the front. I have checked the archives and found that under NextStep 3.3, it was possible to tweak with the tier levels of the windows to force the key window. This seems like a real kludge to do something very simple. Any ideas? From embuck at palmer.cca.rockwell.com Thu Sep 3 07:48:35 1998 From: embuck at palmer.cca.rockwell.com (Erik M. Buck) Date: Thu Nov 3 14:41:29 2005 Subject: Modal window ontop of modal window References: <19980903143601.AAA20863@CX268689-A> Message-ID: <9809031448.AA21577@palmer.cca.rockwell.com> Never ever bring up a modal window on top of another modal window. Are you trying to be as bad as Microsoft ? First, if you are attempted to use a modal window at all, sleep on it, consult others, and put $500 in a jar as penance for doing something so anti-social. Nested modal windows are an unforgivable sin. Never never do this! Find some alternative! From mnorman at princeton.com Thu Sep 3 08:15:39 1998 From: mnorman at princeton.com (Michael Norman) Date: Thu Nov 3 14:41:29 2005 Subject: java not compiling on YB/Win98 Message-ID: <35EEB29B.5E058779@princeton.com> Hi all, I'm having a peculiar problem with YB on my win98 laptop. Javac gets called during the build process, but it ignores the .java files in the project. The compiler doesn't generate .class files and doesn't even catch errors. The same projects work correctly on NT workstation. The makefiles are identical and so are the /Developer/Makefiles directories. The build output is identical up until the point where NT catches the error in the code, but 98 finishes the build process, ignoring the file and the error. Everything else, including Objective-C, is working fine on both machines. Does anyone know where I should look to fix this? Thanks much, - Michael ----- Michael Norman Princeton Consultants From Malcolm_Crawford at plsys.co.uk Thu Sep 3 08:15:31 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:29 2005 Subject: Modal window ontop of modal window In-Reply-To: <9809031448.AA21577@palmer.cca.rockwell.com> References: <9809031448.AA21577@palmer.cca.rockwell.com> Message-ID: <199809031515.QAA00696@jasmine.plsys.co.uk> Eric wrote: > Never ever bring up a modal window on top of another modal window. > Are you trying to be as bad as Microsoft ? First, if you are > attempted to use a modal window at all, sleep on it, consult others, > and put $500 in a jar as penance for doing something so > anti-social. Nested modal windows are an unforgivable sin. Never > never do this! > Find some alternative! > Umm, I beg to differ... there are occasions when this is a reasonable behaviour (IMHO, of course)... ... e.g. recently for me, bringing up a filebrowser (NSOpenPanel) when creating a new entry in a list, which itself required a modal panel. Built-in examples include the Options, Save and Fax panels in the Print panel... As to the problem at hand; this should Just Work (as it does with the OpenPanel) -- what method are you calling to create the modal? Best wishes, mmalc. From snoyes1 at .rdc1.az.home.com Thu Sep 3 09:08:40 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:29 2005 Subject: Modal window ontop of modal window Message-ID: <19980903160756.AAA29358@CX268689-A> > As to the problem at hand; this should Just Work (as it does with the > OpenPanel) -- what method are you calling to create the modal? > I am using [NSApp runModalForWindow:panel]; on both panels. The second modal panel just sits in the packground until the first one finishes. It then starts its modal loop. Then things get confused. From foster at onyx.si.edu Thu Sep 3 09:15:24 1998 From: foster at onyx.si.edu (Peter Foster) Date: Thu Nov 3 14:41:29 2005 Subject: fabs used as a function pointer Message-ID: <199809031612.MAA14975@onyx.si.edu> Here is an interesting bit of code. On RDR2 on an 8600 PPC double (*f) (double); f = fabs; printf("fabs(-1) = %g\n", fabs(-1.0)); // prints 1 printf("f(-1) = %g\n", f(-1.0)); // prints -1 ! Here fabs works as a function, but does not work when used as a function pointer. The problem arose when I tried to compile python 1.5.1, which uses function pointers to make math.h functions into python math.whatevers. So the bug transfers to python. Other math.h functions were fine. Is there anything I can do about this? Has anyone else had success with compiling python? Peter Foster Laboratory of Molecular Systematics National Museum of Natural History Smithsonian Institution From C.Ridd at isode.com Thu Sep 3 09:32:15 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:29 2005 Subject: NSBitmapImageRep In-Reply-To: Your message of "Wed, 02 Sep 1998 10:43:46 PDT." <199809021742.KAA10896@scv2.apple.com> Message-ID: <18129.904840335@isode.com> On Wed, 02 Sep 1998 10:43:46 PDT, Andrew Platzer wrote: > > I'm writing a little app that needs to create an image 'by hand' (eg by > > image processing) and save it to disk in TIFF or PNG or something > > similar. > > My suggestions is to stick with TIFF where possible since that is the > standard currently on Rhapsody. The PNG stuff is limited and really only meant > for reading. OK. Having decent PNG support would be a Good Thing though. > > a) What properties should I be passing to getRepresentation:properties? > > Could I determine the list of available properties at run-time? > > The only property that is used by the PNG writer is NSImageInterlaced (see > comments in NSBitmapImageRep.h) Thanks. I should read the header file more :-) > > b) Can I find out the list of values to pass instead of NSPNGFileType > > at run-time? It would be nice when running on Windows for instance to > > offer the native Windows BMP format as well as formats like TIFF and > > PNG. > > See the NSBitmapImageFileType enumeration in NSBitmapImageRep.h This only tells me at compile-time what the AppKit will read and write. Finding it out at run-time is much more useful, as the app can progressively support more and more file types without recompilation, as the AppKit gets improved. > > d) converting the image to the file representation in memory and then > > squirting it to disk seems an inefficient use of memory. Is there a way > > to do both of these steps together, which (hopefully) uses less memory? > > No. OK, never mind! It isn't causing a problem. Thanks for the reply, Chris From dyoung at vviuh221.vvi.com Thu Sep 3 09:43:53 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:29 2005 Subject: Modal window ontop of modal window Message-ID: <9809031643.AA07204@vviuh221.vvi.com> >> Never ever bring up a modal window on top of another modal window. >> Are you trying to be as bad as Microsoft ? First, if you are > Umm, I beg to differ... there are occasions when this is a > reasonable behavior (IMHO, of course)... > Built-in examples include the Options, Save and Fax panels in the > Print panel... Modal windows are appropriate for sequential user action and input; however Nested modal windows are sloppy. Even the Yellow Box Open Panel's modal windows are messy. The better way to do this is to either: (a) have a dialog area on the open panel itself indicating the current (error) state, or (b) switch the OpenPanel's window's content view to the new modal content view which indicates the error message and then when the user clicks "OK" then switch back to the normal open panel view again. I find the Alert Panels to be lame in many ways and like to make my own modal panels. For example, Alert Panels truncate their titles when they are long compared to their button widths. That is really annoying. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From paulrs at lgs-systems.com Thu Sep 3 05:49:48 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:29 2005 Subject: dragImage: ... & mouseOffset Message-ID: <9809031249.AA00686@slab> Hey guys, I've never had to take advantage of this before, but we have created a button like object which, if you click and drag the mouse out of the button, starts a dragging session. The dragImage: ... method on NSView has a mouseOffset argument which seems to be the hook I need. Basically, the user may have started the drag somewhere which is far from the current event's location. This needs to be taken into consideration by the view when figuring out where to put the image. The problem is that the mouseOffset argument is an NSSize. The foundation documenation indicates quite strongly that sizes should never be negative. How can I denote an offset from a point without sometimes needed a negative number? For example, if the original mouseDown event is at 50,50 and the current event's location is 25,50, I would think that I would want to have an offset of -25.0,0.0. Am I way off base? If so, is there another way in which to accomplish this? Thanks, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From snoyes1 at .rdc1.az.home.com Thu Sep 3 10:30:54 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:29 2005 Subject: Modal window ontop of modal window Message-ID: <19980903173010.AAA5873@CX268689-A> Modal problem solved. I had defined a custom coltroller class to handel all of my panels. It includes showing hiding layering and modal controll. This is then subclassed for each controller changing what is needed. For some reason, IB placed a copy of the sub-classed controller in the: English.lproj directory. When I extended the controller, the old (and unchanged) "English.lproj/XXController" was compiled. Not the one that I had edited within PB. Fixed that. Things work. There was much rejoicing. From mtarbell at tarbell.jpl.nasa.gov Thu Sep 3 11:49:56 1998 From: mtarbell at tarbell.jpl.nasa.gov (Mark Tarbell) Date: Thu Nov 3 14:41:29 2005 Subject: NSConcreteMutableArray: failed Message-ID: <9809031849.AA00791@tarbell.jpl.nasa.gov> I'm seeing this from somewhere deep within my code: objc: NSConcreteMutableArray: failed -- out of memory(NSConcreteMutableArray, 0) objc: NSConcreteMutableArray: failed -- out of memory(NSConcreteMutableArray, 0) Unfortunately, this isn't an exception - it's simply a printf(), as far as I can tell, so I'm guessing that there's no way to set a breakpoint to catch this? (Setting a break on -raise doesn't catch it.) It doesn't stop the program, things do keep on running. Can anyone tell me what this error really means, specifically? Thanks Mark -- Mark Tarbell (Mark.A.Tarbell@jpl.nasa.gov) Applications Development Section Information Systems Development and Operations Division Engineering and Science Directorate Jet Propulsion Laboratory 4800 Oak Grove Drive MS 502-500 Pasadena, CA 91109 Opinions expressed herein do not reflect those of JPL. From ckane at apple.com Thu Sep 3 12:03:29 1998 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:41:29 2005 Subject: NSConcreteMutableArray: failed Message-ID: <199809031903.MAA07998@scv2.apple.com> Mark Tarbell writes: > objc: NSConcreteMutableArray: failed -- out of memory(NSConcreteMutableArray, 0) > objc: NSConcreteMutableArray: failed -- out of memory(NSConcreteMutableArray, 0) > > Unfortunately, this isn't an exception - it's simply a printf(), > as far as I can tell, so I'm guessing that there's no way to set > a breakpoint to catch this? > Can anyone tell me what this error really means, specifically? This comes from the ObjC runtime when trying to allocate an object (in this case, an NSConcreteMutableArray). malloc() or NXZoneMalloc() or related has returned NULL, and the *createInstance() method is about to return nil. Try breaking on __objc_error(), which is a general funnel point for ObjC errors. Chris Kane Apple Computer, Inc. From peter at baseview.com Thu Sep 3 13:15:06 1998 From: peter at baseview.com (Peter_Johnson) Date: Thu Nov 3 14:41:29 2005 Subject: Extending NSParagraphStyle Message-ID: <199809032015.NAA19445@ignem.omnigroup.com> I need to track some additional character and paragraph attributes along with the text using the Yellow Box text system. Character attributes seem pretty easy, since the attributes are stored in a dictionary--I can throw anything I want in there. However, paragraph attributes seem to be altogether different. Paragraph attributes are stored in an NSParagraphStyle object, not an NSDictionary. So, the question is how do I add my own paragraph attributes? I've only come up with 2 options so far, and I don't really like either of them: 1. Add the attributes to the (character) attributes dictionary, and try to keep them applied on a paragraph boundary basis. This is not trivial, and it seems silly to do, since NSTextStorage (fixParagraphStyleAttributeInRange:) already does this for the NSParagraphStyle attribute. I should be able to leverage off of the already existing mechanism. 2. Subclass NSParagraphStyle and use it whenever the additional info is available. It seems like there will be problems having some paragraph styles be NSParagraphStyle and some be a subclass. Has anybody else had to add new paragraph attributes? Any suggestions? From yfl at mira.net Thu Sep 3 18:48:55 1998 From: yfl at mira.net (Michael) Date: Thu Nov 3 14:41:29 2005 Subject: Is it possible to create Java command line tools in ProjectBuilder Message-ID: <35EF4707.D7C284DA@mira.net> hi all This is the first time I am using This service Hopefully I am on the right track... Anyway, what I like to know if it is possible for me to create a Java command line tool using Project Builder. Thanks Michael Lee From jflowers at grand-central.yar.com Thu Sep 3 17:43:55 1998 From: jflowers at grand-central.yar.com (Josh Flowers) Date: Thu Nov 3 14:41:29 2005 Subject: Is it possible to create Java command line tools in ProjectBuilder References: <35EF4707.D7C284DA@mira.net> Message-ID: <35EF37CB.2C400B0E@mail.yar.com> Sure just create a project of type Java Package. What I'm curious about is if apple is still planing on adding Java Beans support to IB. I haven't heard much, but I'm also fairly new to this list. Michael wrote: > > hi all > > This is the first time I am using This service Hopefully I am on the > right track... > Anyway, what I like to know if it is possible for me to create a Java > command line tool using Project Builder. > > Thanks > > Michael Lee From rcfa at cubiculum.com Thu Sep 3 18:29:38 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:29 2005 Subject: fabs used as a function pointer In-Reply-To: <199809031612.MAA14975@onyx.si.edu> References: <199809031612.MAA14975@onyx.si.edu> Message-ID: <9809040129.AA01201@kannix.cubiculum.com> I don't have a running version of RDR, since I have a lack of hardware, but you may want to check out if fabs is defined as a macro, rather than as a function. If that were the case, it would explain why the function pointer wouldn't work. The work around would be to define your own function that is implemented by calling the fabs macro, and then using a #define to refer to that function... Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From rcfa at cubiculum.com Thu Sep 3 18:40:49 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:29 2005 Subject: dragImage: ... & mouseOffset In-Reply-To: <9809031249.AA00686@slab> References: <9809031249.AA00686@slab> Message-ID: <9809040140.AA01229@kannix.cubiculum.com> you wrote: > The foundation documenation indicates quite strongly > that sizes should never be negative. I always thought that was a bad idea. Now you add another reason why it is. If sizes could be negative, then any drawing program would be able to do all mirroring operations as part of the resize operation: you keep dragging while resizing the right side of an object until it flips over the right edge of the bounding box, and you have an object mirrored along the vertical axis. Analog you can do mirroring along the horizontal axis or any point. Needless to say, that this requires negative sizes. I'm always anoyed by drawing programs where I do these things, and the object emerges unaltered past the logical line/point of mirror. :-( Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From wsanchez at apple.com Thu Sep 3 19:29:53 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support Message-ID: <199809040229.TAA27814@scv2.apple.com> I've updated my copy of cvs to 1.10. This includes support for t/f wrappers in both local and client/server configurations. Binaries and source code for Mac OS X Server (Rhapsody) is available at: ftp://isp.mit.edu/users/tritan/Rhapsody/cvs-1.10-13.paz. To unpack it on Rhapsody, do the following as root: cd / pax -f cvs-13.paz Beware that this hasn't had as much testing as stock cvs-1.10, and I am hoping you can help me fix bugs. I don't have versions for NeXTStep or other platforms; perhaps Bill can redistribute this in a better form for non-Rhapsody users, though I won't pretend to make him commit to anything. :-) In a pleasant we're-all-doing-ducky world, we'd get this stuff syncronized with the main distribution of CVS so that we don't have any wierd incompatibilities. If anyone is interested in helping me out here, I'm appreciate it, since I manage a lot of ports and I can't work on CVS as much as I'd like to in order to get it all done. What needs to happen: 1) We need sanity.sh test cases which adequately test the functionality of t/f wrappers. 2) We need to remove the dependancy on an external tar program and do the archiving before transfers in CVS. 3) We need to improve the means by which changes in wrapped directories are detected. Currently CVS checks the timestamp on the directory, which may not have changed altough a file in the directory has changed. Better still, we need a better mechanism, but that seems far away, and perhaps getting the current scheme working properly is a good first step. By better scheme I mean something which (for example) allows for arbitrary sorts of data to be stored in a CVS repository, and lets you have different handlers for each time. That is, diff et. al. handle text files; nibdiff and nibmerge (doesn't exist, but that's the idea) handle nib files; pngdiff and pngmerge handle PNG graphics; etc. Handlers would deal with encoding and diff/merge operations. In the meantime, if you find any problems with what I've got above, feel free to send patches so we can move forward. See also CodeFab's CVS page at http://www.codefab.com/codefab/CVS.html. Thanks, -Fred From wsanchez at apple.com Thu Sep 3 20:10:01 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support Message-ID: <199809040310.UAA23406@scv1.apple.com> On second thought, pax was a bad idea. Try this location instead: ftp://isp.mit.edu/users/tritan/Rhapsody/cvs-1.10-13.tgz and unpack it thusly: cd / tar xvzf cvs-13.tgz Instead of what I said before: | ftp://isp.mit.edu/users/tritan/Rhapsody/cvs-1.10-13.paz. | | To unpack it on Rhapsody, do the following as root: | | cd / | pax -f cvs-13.paz This should be "pax -rz -f cvs-13.paz", anyway. Sorry 'bout that. -Fred From vincent.coetzee at rmb.co.za Fri Sep 4 00:04:32 1998 From: vincent.coetzee at rmb.co.za (vincent.coetzee@rmb.co.za) Date: Thu Nov 3 14:41:29 2005 Subject: Drawing Icons under DR2 PPC Message-ID: <42256675.0026B87B.00@rmb-1.rmb.co.za> Hi there I finally received DR2 PPC after months of waiting. I went to update some of my apps only to find that there are no tools for editing icons (i.e. small tiffs) under DR2. Does anyone know of appropriate Rhapsody or Mac tools for creating the tiff files in the correct format. Thanks Vincent From kcd at jumpgate.com Fri Sep 4 00:13:26 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:29 2005 Subject: fabs used as a function pointer In-Reply-To: <199809031612.MAA14975@onyx.si.edu> References: <199809031612.MAA14975@onyx.si.edu> Message-ID: <199809040713.AAA09570@babylon5.jumpgate.com> Peter Foster wrote: > Here is an interesting bit of code. On RDR2 on an 8600 PPC > double (*f) (double); > > f = fabs; > printf("fabs(-1) = %g\n", fabs(-1.0)); // prints 1 > printf("f(-1) = %g\n", f(-1.0)); // prints -1 ! > > Here fabs works as a function, but does not work when used as a > function pointer. The problem arose when I tried to compile python > 1.5.1, which uses function pointers to make math.h functions into > python math.whatevers. So the bug transfers to python. Other math.h > functions were fine. If you add the compiler option -fno-builtin to force the compiler to not use it's built-in version of fabs(), you'd find that you get -1 for *both* outputs up above. It appears that the library version of fabs() is indeed broken. I'd suggest simply rolling your own version of it, which shouldn't be that hard, and hopefully the version in your code will override the broken library version. -Ken From chris at christianbatchelor.co.uk Fri Sep 4 05:07:56 1998 From: chris at christianbatchelor.co.uk (Christian B) Date: Thu Nov 3 14:41:29 2005 Subject: Drawing Icons under DR2 PPC Message-ID: <199809041204.IAA15933@hil-img-ims-5.compuserve.com> On 4/9/98 8:12 am, vincent.coetzee@rmb.co.za wrote: >Does anyone know of appropriate Rhapsody or Mac >tools for creating the tiff files in the correct format. > Personally,I use Photoshop in Blue Box, saving as TIFF, byteorder for Mac. I transfer the files to DR2 using Fetch. I'm sure there are other apps... Christian B. -------------------------------------------------------------- Christian Batchelor Design Ltd. FileMaker Databases - Yellow Box Development - Mac OS X Member of the FileMaker Solutions Alliance e-mail: chris@christianbatchelor.co.uk website: www.christianbatchelor.co.uk -------------------------------------------------------------- From contact at finindev.com Fri Sep 4 07:02:19 1998 From: contact at finindev.com (Jean-Michel Cazaux) Date: Thu Nov 3 14:41:29 2005 Subject: Sample code to send datas to Excel/Word Message-ID: <01BDD81D.66D49160@JEAN-MICHEL> I'm searching for a sample code of an (OLE ?) link between an YB apps and Excell/Word (the YB apps is to send datas into the Excell doc). I remember reading something somewhere about that, but I can't find anything at the moment. Thanks in advance for your help. __________________________________________________________________________________________ Jean-Michel CAZAUX FININDEV, Conseil en Finances pour les Collectivit?s Locales. 204 Rue Michel Teule - ZAC d'Alco 34080 Montpellier - FRANCE. T?l. +33 (0)4 67 63 66 25 - Fax +33 (0)4 67 63 35 45 e-mail contact@finindev.com From paulrs at lgs-systems.com Fri Sep 4 06:55:05 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:29 2005 Subject: NSMenuPanel Message-ID: <9809041355.AA01624@slab> Hey guys, After some friendly advice from Joakim Johansson and friendly warnings for Andrew Platzer about not using private classes, I'm thinking strongly about rolling my own limited version of NSMenuPanel. One of my unresolved questions is how to present the panel and appropriately cancel the operation. If you remember, I want to put up a contextual menu when the user drags and drops something into a view. There will be a cancel option in the menu, but I want the menu to disappear if the user clicks anywhere outside the menu, including a click that switches to another application. I'm guessing that I should run the panel as modal, but I don't know how to get a mouseEvent that happens outside the window. Do I need to create a subclass of NSApplication which implements a modal method that is cancelled when the mouse is clicked outside the window or the application resigns as the active app? Any thoughts would be greatly appreciated. Regards, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From contact at finindev.com Fri Sep 4 08:16:14 1998 From: contact at finindev.com (Jean-Michel Cazaux) Date: Thu Nov 3 14:41:29 2005 Subject: Sample code to send datas to Excel/Word Message-ID: <01BDD827.B9BBD1E0@JEAN-MICHEL> Going on searching the doc, I finally get the D'OLE programmer documentation. It seems quiet complicated to me (I meen, I only want to send datas to Excel on the same Win32 machine running my app). Does anybody has a sample of code doing something similar ? Thanks in advance. __________________________________________________________________________________________ Jean-Michel CAZAUX FININDEV, Conseil en Finances pour les Collectivit?s Locales. 204 Rue Michel Teule - ZAC d'Alco 34080 Montpellier - FRANCE. T?l. +33 (0)4 67 63 66 25 - Fax +33 (0)4 67 63 35 45 e-mail contact@finindev.com From deirdres at eni.net Fri Sep 4 09:41:25 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:29 2005 Subject: Drawing Icons under DR2 PPC In-Reply-To: <42256675.0026B87B.00@rmb-1.rmb.co.za> Message-ID: At 12:16 AM -0700 9/4/98, vincent.coetzee@rmb.co.za wrote: >I finally received DR2 PPC after months of waiting. I went to update some >of my apps only to find that there are no tools for editing icons (i.e. >small tiffs) under DR2. Does anyone know of appropriate Rhapsody or Mac >tools for creating the tiff files in the correct format. Graphic Converter (under either Mac or BeOS). They are TIFF files with LZW compression (Lempel-Ziv-Welch, the same basic algorithm used in GIF). _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From aep at apple.com Fri Sep 4 11:43:00 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:29 2005 Subject: NSMenuPanel Message-ID: <199809041843.LAA29442@scv1.apple.com> > One of my unresolved questions is how to present the panel and > appropriately cancel the operation. If you remember, I want to put up a > contextual menu when the user drags and drops something into a view. There > will be a cancel option in the menu, but I want the menu to disappear if the > user clicks anywhere outside the menu, including a click that switches to > another application. I'm guessing that I should run the panel as modal, but > I don't know how to get a mouseEvent that happens outside the window. Do I > need to create a subclass of NSApplication which implements a modal method > that is cancelled when the mouse is clicked outside the window or the > application resigns as the active app? If you have your own tracking loop, you will get all the mouse events for the application and so can decide when to hide the window. If not, you could try and override [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] to watch the events go by and decide that you want to hide the modal panel. You will also need to handle the case where the application is deactivated by a mouse click since that doesn't come in as a mouse event (look for the NSApplicationWillResignActiveNotification notification.) Andrew Platzer Application Frameworks Apple Computer, Inc. From rcfa at cubiculum.com Fri Sep 4 10:59:04 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: <199809040229.TAA27814@scv2.apple.com> References: <199809040229.TAA27814@scv2.apple.com> Message-ID: <9809041759.AA03299@kannix.cubiculum.com> Sounds all great, except: > 2) We need to remove the dependancy on an external tar program and > do the archiving before transfers in CVS. Why? I mean the whole idea of the Unix tool approach is that functionality can be shared. If we end up with multiple archiving mechanisms, each package rolling its own, just in order not to depend on "an external program", then what's the point? Or are there features required of this archiver that are fundamentally impossible to achieve with tar? Greetings, Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From chad at pengar.com Fri Sep 4 12:39:36 1998 From: chad at pengar.com (Chad Leigh, Pengar Enterprises Inc and Shire.Net) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: <9809041759.AA03299@kannix.cubiculum.com> Message-ID: >Sounds all great, except: >> 2) We need to remove the dependancy on an external tar program and >> do the archiving before transfers in CVS. > >Why? I mean the whole idea of the Unix tool approach is that functionality >can be shared. If we end up with multiple archiving mechanisms, each package >rolling its own, just in order not to depend on "an external program", then >what's the point? >Or are there features required of this archiver that are fundamentally >impossible to achieve with tar? The need to support non Unix computers. We have a project going on dealing with Rhapsody and NT and VAX/VMS and need to be able to retrieve source code from CVS on all three platforms. Some pieces of source code exist that need to be on all three platforms ( some .h files for example) Chad --------------------------------------------------------------- Chad Leigh Pengar Enterprises, Inc and Shire.Net chad@pengar.com info@pengar.com info@shire.net Full service WWW services from just space to complete sites. Low cost virtual servers. DB integration. Email forwarding -- Permanent Email Addresses. POP3 and IMAP Email Accounts. mailto:info@shire.net for any of these. *************** Macintosh: It Just Works ****************** --------------------------------------------------------------- From rcfa at cubiculum.com Fri Sep 4 12:49:24 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: References: Message-ID: <9809041949.AA03563@kannix.cubiculum.com> > >Or are there features required of this archiver that are fundamentally > >impossible to achieve with tar? > > The need to support non Unix computers. We have a project going on dealing > with Rhapsody and NT and VAX/VMS and need to be able to retrieve source > code from CVS on all three platforms. Some pieces of source code exist > that need to be on all three platforms ( some .h files for example) Tar has been ported to about any platform known to manykind (with the exceptions of VIC-20, C-64 and Apple ][ :-) ) So VMS and NT shouldn't constitute a problem in respect to the use of tar. Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From wsanchez at apple.com Fri Sep 4 12:43:25 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: <199809040229.TAA27814@scv2.apple.com> Message-ID: <199809041943.MAA22710@scv3.apple.com> | Why? I mean the whole idea of the Unix tool approach is that functionality | can be shared. If we end up with multiple archiving mechanisms, each | package | rolling its own, just in order not to depend on "an external program", then | what's the point? 1) Gnu tar and BSD tar are not compatible for filenames > 100. So, for example, my Rhapsody server, which uses BSD tar, doesn't work with your Solaris client, which uses gnutar. 2) CVS has been moving away from external programs for a while. Diff and rcs and now internal ops. That's not my call, but we need to use the same strategy. 3) It's faster that way. 4) It's easier to port to platforms that don't have tar, like the MacOS and Windows, if CVS just knows what to do. 5) The functionality we need is a lot less than tar. We just need to package up a directory and send it. That code could be pretty simple. -Fred From rcfa at cubiculum.com Fri Sep 4 13:25:04 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: <199809041943.MAA22710@scv3.apple.com> References: <199809041943.MAA22710@scv3.apple.com> Message-ID: <9809042025.AA03649@kannix.cubiculum.com> > 1) Gnu tar and BSD tar are not compatible for filenames > 100. > So, for example, my Rhapsody server, which uses BSD tar, doesn't work with > your Solaris client, which uses gnutar. Well, as far as I'm concerned, any tar other than gnutar is just basically broken. I still can't figure out why we keep using archaic versions of tar, given that gnutar is fully backwards compatible and fixes lots of problems the original tar has... Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From wsanchez at apple.com Fri Sep 4 13:34:54 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: <199809041943.MAA22710@scv3.apple.com> Message-ID: <199809042034.NAA42654@scv4.apple.com> | Well, as far as I'm concerned, any tar other than gnutar is just basically | broken. I still can't figure out why we keep using archaic versions of | tar, given that gnutar is fully backwards compatible and fixes lots of | problems the original tar has... I disagree. tar in OS X Server 1.0 will be the OpenBSD pax/tar/cpio. This is POSIX tar format compliant, which is far from archaic. GNU tar uses it's own wierdo format to deal with >100 characters and that's not compatible with the new POSIX tar file format. See the GNU tar docs or a POSIX spec. I believe that means that GNU tar is broken, so forgive me if I don't make GNU tar the default. This is all somewhat irrelevant with respect to the CVS discussion, where my assertion is that there exist different and incompatible versions of tar, and therefore use of tar as an external program to CVS is flawed strategy. -Fred From btoback at optc.com Fri Sep 4 13:49:46 1998 From: btoback at optc.com (Bruce Toback) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support Message-ID: <199809042022.NAA15326@landru.optc.com> Ronald Antony writes: >I still can't figure out why we keep using archaic versions of >tar, ... Well, *I* keep using them because the VIC-20 port of gnutar doesn't yet support audio cassettes. -- Bruce -------------------------------------------------------------------------- Bruce Toback Tel: (602) 996-8601| My candle burns at both ends; OPT, Inc. (800) 858-4507| It will not last the night; 11801 N. Tatum Blvd. Ste. 142 | But ah, my foes, and oh, my friends - Phoenix AZ 85028 | It gives a lovely light. btoback@optc.com | -- Edna St. Vincent Millay From mtrent at msn.fullfeed.com Fri Sep 4 13:59:08 1998 From: mtrent at msn.fullfeed.com (mtrent@msn.fullfeed.com) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support Message-ID: <199809042059.PAA27156@shell1.msn.fullfeed.com> > I disagree. tar in OS X Server 1.0 will be the OpenBSD pax/tar/cpio. This > is POSIX tar format compliant, which is far from archaic. GNU tar uses it's > own wierdo format to deal with >100 characters and that's not compatible > with the new POSIX tar file format. See the GNU tar docs or a POSIX spec. > I believe that means that GNU tar is broken, so forgive me if I don't make > GNU tar the default. So the argument is gnutar is conforms with all the gnutars out there; pax conforms to all the paxes out there. Pax's "Posix standard" tar format is as bad as the older (broken) tar formats by design, and it cannot handle filesystem structures as well as gnutar. In order to get pax do work at all, I've had to use its cpio format. One step forward, three steps backward. Having used pax to do non-trivial things, my money is still on gnutar. My opinion. Mike Trent From toon at omnigroup.com Fri Sep 4 14:18:16 1998 From: toon at omnigroup.com (Greg Titus) Date: Thu Nov 3 14:41:29 2005 Subject: Extending NSParagraphStyle In-Reply-To: <199809032015.NAA19445@ignem.omnigroup.com> References: <199809032015.NAA19445@ignem.omnigroup.com> Message-ID: <199809042118.OAA10267@ignem.omnigroup.com> Peter_Johnson wrote: > I need to track some additional character and paragraph attributes > along with the text using the Yellow Box text system. [...some cut...] > > However, paragraph attributes seem to be altogether different. > Paragraph attributes are stored in an NSParagraphStyle object, not > an NSDictionary. > So, the question is how do I add my own paragraph attributes? I was holding off replying to this to see if anyone had any better ideas, but since I haven't seen any responses yet... I would create a subclass of NSParagraphStyle and then use -poseAs: to make the text system use my subclass everywhere. The only limitation with -poseAs: is that you can't add additional instance variables. The way around this is to keep a global hash table in your subclass which maps paragraph style objects to whatever additional information you need for each style. (Your subclass get/set methods for extra info can then look up the information they need based on 'self'.) You'll need to override NSParagraphStyle's -copyWithZone: and -mutableCopyWithZone: (and possibly the NSCoding methods if you use them) to duplicate the extra hash table information for the copied object, and override -dealloc to remove the hash table entry. This is a fairly common design pattern in Objective-C when you need to extend a class and don't have control over all of the places where instances may be created. Hope this helps, --Greg --------------------- Greg Titus Omni Development Inc. greg@omnigroup.com From ehanson at gene.COM Fri Sep 4 15:27:50 1998 From: ehanson at gene.COM (Eric Hanson) Date: Thu Nov 3 14:41:29 2005 Subject: Bar Code Fonts Message-ID: <980904152754.ZM97171@dhcp131-136.gene.com> Does anyone have a suggested resource from which decent bar code fonts (e.g. Code39) for OS/WO/Rhap can be be located? Or... a resource for a good PS-to-NeXT font conversion utility? Thanks in advance! - Eric Hanson Genentech, Inc. From wsanchez at apple.com Fri Sep 4 15:57:58 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support Message-ID: <199809042257.PAA19984@scv4.apple.com> | So the argument is gnutar is conforms with all the gnutars out there; pax | conforms to all the paxes out there. Pax's "Posix standard" tar format is | as bad as the older (broken) tar formats by design, and it cannot handle | filesystem structures as well as gnutar. In order to get pax do work at all, | I've had to use its cpio format. One step forward, three steps backward. No. The argument is that there are commands called "tar" which do different things, and it is therefore not suitable for CVS wrapper exchange. Please explain to me the POSIX tar format's design and where it is flawed and exactly what filesystem structures is gnutar so splendid with. Perhaps you had problems with prior (buggy) versions of pax, like the one in DR2, which is not equivalent to "it is broken by design". I can walk a copy of the IEEE/POSIX spec to your office and maybe you can teach me all about it. -Fred From rcfa at cubiculum.com Fri Sep 4 16:00:21 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: <199809042034.NAA42654@scv4.apple.com> References: <199809042034.NAA42654@scv4.apple.com> Message-ID: <9809042300.AA03991@kannix.cubiculum.com> you wrote: > | Well, as far as I'm concerned, any tar other than gnutar is just basically > | broken. I still can't figure out why we keep using archaic versions of > | tar, given that gnutar is fully backwards compatible and fixes lots of > | problems the original tar has... > > I disagree. tar in OS X Server 1.0 will be the OpenBSD pax/tar/cpio. This > is POSIX tar format compliant, which is far from archaic. GNU tar uses it's > own wierdo format to deal with >100 characters and that's not compatible > with the new POSIX tar file format. See the GNU tar docs or a POSIX spec. > I believe that means that GNU tar is broken, so forgive me if I don't make > GNU tar the default. Well, this was news to me. Up until not that long ago the only tar that dealt properly with anything longer than 100 char pathnames was gnutar, which is why we had hacks like bigtar in Installer.app, etc. So while I'm glad that POSIX tar has been made capable of dealing with longer path names, I don't quite understand why POSIX then didn't just adopt the same format as the gnu people, and instead used yet another format to fix a problem that was already fixed elsewhere... Of course it's moot to discuss this, since that decision has been made, and now the world has to deal with it. However, since the GNU people so far were strictly trying to be a superset of the POSIX standard, I would expect that they would add support for the POSIX format, while retaining backwards compatibility with their old format by means of an option. So it seems to me, the proper way to solve all this would be to add support for the POSIX format to gnutar (if that's not already done), rather than writing yet another program doing something similar. As far as the diff, et al. moving into CVS proper, I think that might have more to do with the fact that it's easier to resolve ambiguities if the diffing and versioning can be in a bidirectional information interchange. (At least I hope that's what's the motivation, and that they do this to get over some shortcomings of the current standalone diff tools). While just adding an archiving mechanism to CVS may be the quickest way to solve this issue, it will not help with the programming and compatibility isses that are involved with all sorts of other software that uses tar as a slave process. Fixing either gnutar or BSD tar to incorporate backwards compatibility with the other, newer/older format, would fix it all. A perfect example of how seamlessly this can work is the gzip family, that can read both formats (compress and gzip) automatically. I bet, if it weren't for the patent issues (which there are none in the case of tar), gzip would also have a switch to write the old format, if so required. > This is all somewhat irrelevant with respect to the CVS discussion, where > my assertion is that there exist different and incompatible versions of tar, > and therefore use of tar as an external program to CVS is flawed strategy. Yes and no. For one, tar can be fixed as well as there can be functionality added. Also, one could argue, that CVS, being part of the GNU tools, should thus by default use the gnutar, similarly as gnumake is the most natural fit for gcc. Given that Apple supplies the whole toolset on all supported OpenStep/OS-X/WebObjects platforms, the tools used are under full control of Apple, which means compatibility can be ensured. Adding some archiving functionality would also be an Apple-only thing, and thus wouldn't fare much better in overall cross-platform compatibility. at least unless the main CVS maintainers can't be convinced that they should adopt the Apple changes for the general distribution. Greetings, Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From rcfa at cubiculum.com Fri Sep 4 16:38:06 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support In-Reply-To: <199809042257.PAA19984@scv4.apple.com> References: <199809042257.PAA19984@scv4.apple.com> Message-ID: <9809042338.AA04083@kannix.cubiculum.com> > No. The argument is that there are commands called "tar" which do different > things, and it is therefore not suitable for CVS wrapper exchange. gnutar is sometimes named tar, but tar is never named gnutar. Thus as long as gnutar is explicitly used, there is no compatibility problem. tar is fine, as long as it's used in its archaic format (pathnames < 100 chars), and pax should be equally unique. gnutar is however ubiquious, available in source and stems from the same family as cvs. > Please explain to me the POSIX tar format's design and where it is flawed > and exactly what filesystem structures is gnutar so splendid with. I can't tell you the former, since I didn't say anything about this, but I do know that gnutar, without resorting to a cpio like format, can deal with everything a decent file system offers: links (soft and hard), device pseudo-files, regular files, sparse files, all of which are handled not or very poorly by the old standard tar. If, as Mike Trent asserts, the new tar is conceptually "as bad as the older (broken) tar formats by design", except for being able to deal with longer path names, then the shortcomings listed above for old tar would still be found in the new POSIX tar, while these issues have long been solved in gnutar. Greetings, Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From dennyrex at earthlink.net Fri Sep 4 19:15:07 1998 From: dennyrex at earthlink.net (dennyrex@earthlink.net) Date: Thu Nov 3 14:41:29 2005 Subject: dragImage: ... & mouseOffset References: <9809040140.AA01229@kannix.cubiculum.com> Message-ID: <199809050111.SAA15748@ibis.prod.itd.earthlink.net> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1505 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980904/580b0fca/attachment.bin From buck.erik at mcleod.net Fri Sep 4 18:31:18 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:29 2005 Subject: Extending NSParagraphStyle Message-ID: <01bdd86c$e152a7c0$5e2b10d0@default> >I would create a subclass of NSParagraphStyle and then use -poseAs: >to make the text system use my subclass everywhere. The only >limitation with -poseAs: is that you can't add additional instance >variables. The way around this is to keep a global hash table in your >subclass which maps paragraph style objects to whatever additional >information you need for each style. (Your subclass get/set methods >for extra info can then look up the information they need based on >'self'.) > >You'll need to override NSParagraphStyle's -copyWithZone: and >-mutableCopyWithZone: (and possibly the NSCoding methods if you use >them) to duplicate the extra hash table information for the copied >object, and override -dealloc to remove the hash table entry. > >This is a fairly common design pattern in Objective-C when you need >to extend a class and don't have control over all of the places where >instances may be created. > >Hope this helps, > --Greg > >--------------------- >Greg Titus >Omni Development Inc. >greg@omnigroup.com > I could be wrong, but I am pretty sure that poseAs: works fine even if the posing class has additional instance variables. You just have to pose before any instances of the wrong class are created. Call poseAs: from main() before the NSApplication object is created and you should be fine. When instances are created (even by library code), the size of the instance will conform to the size of the posing class because the run-time system has completely replaced the original and uses the posing class's size in alloc. For that matter, it uses the posing class's alloc. From vincent.coetzee at rmb.co.za Sat Sep 5 02:31:23 1998 From: vincent.coetzee at rmb.co.za (vincent.coetzee@rmb.co.za) Date: Thu Nov 3 14:41:29 2005 Subject: Panels and control Message-ID: <42256676.0033864D.00@rmb-1.rmb.co.za> Hi there I am sorry to be a pest on the group, and I am sure that this question has been asked, but I am struggling to understand how Panels fit into the IB environment. I can get panels to work correctly as long as they are activated by menu items or buttons. How does one bring up a panel under program control rather than IB control. I need to authenticate a user before they can do anything in the app. I therefore need a panel that comes up when appDidFinishLaunching is invoked, (or some other event, if someone can suggest a better one). I have tried creating an outlet for my panel (in my controller) , and then using loadNibNamed:owner:, but this does not seem to work, and it requires a separate nib. How does one control a panel, load it and activate it, as well as making it modal, without using IB. Can it be done ? Can one merely use the class ie panel = [[AuthenticationPanel alloc] init]; [panel makeKeyAndOrderFront]; and if so what series of method sends are required to get it working and modal. I have read every document I can lay my hands on, and examined the example code with no luck. Any suggestions. One other question while I am at it. I have created a custom Browser class, (as shown by some helpful person on this group), but I have found that the drawInteriorWithFrame: method is invoked on each cell, before browser:willDisplayCell..., this means that the represented object held in the cell is NULL, since I only set it in willDisplayCell..., this means that my icon in the browser cell is always the default, since the specific object is only set after the initial draw, is there away around this, short of using an active delegate. Many thanks Vincent From Scott_Harrison at apple.com Sat Sep 5 06:17:17 1998 From: Scott_Harrison at apple.com (Scott Harrison) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support Message-ID: <9809050917.AA171921@macavity> >> Please explain to me the POSIX tar format's design and where it is flawed >> and exactly what filesystem structures is gnutar so splendid with. > >I can't tell you the former, since I didn't say anything about this, but >I do know that gnutar, without resorting to a cpio like format, can deal >with everything a decent file system offers: links (soft and hard), device >pseudo-files, regular files, sparse files, all of which are handled not >or very poorly by the old standard tar. If, as Mike Trent asserts, the >new tar is conceptually "as bad as the older (broken) tar formats by design", >except for being able to deal with longer path names, then the shortcomings >listed above for old tar would still be found in the new POSIX tar, while >these issues have long been solved in gnutar. Last time I checked (admittedly a while ago), gnutar was not able to handle links whose names contained > 100 characters. This caused me some problems with Framework installations. I resorted to using /NextAdmin/Installer.app/installer_bigtar instead. Does pax solve this problem? --Scott From sramp at tin.it Sat Sep 5 08:39:48 1998 From: sramp at tin.it (Stefano Rampazzo) Date: Thu Nov 3 14:41:29 2005 Subject: NSArchiver question Message-ID: Hello, please, I need a clarification about the circular reference problem using NSArchiver. I'm trying to write on a file a complex object graph and I use the [NSArchiver archiveRootObject: toFile:] method. Unluckly I've noticed that the encoding sequence is executed twice, while I call [NSArchiver archiveRootObject: toFile:] once. Further during unarchiving I get an inconsistency file error. I've checked several times my initWithCoder and encodeWithCoder methods, but they seem to me to be well balanced. Obviously my objects have outlets referencing other objects involved in the encoding sequence, but I have carefully avoided to encode these outlets. Is this sufficient to avoid circular references ? As usual I really appreciate any suggestions. Thanks Regards Stefano From snoyes1 at .rdc1.az.home.com Sat Sep 5 08:41:48 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:29 2005 Subject: NSArchiver question Message-ID: <19980905154122.AAA22109@CX268689-A> > From: sramp@tin.it (Stefano Rampazzo) > Hello, > > please, I need a clarification about the circular reference problem using > NSArchiver. > I have encoded circular objects several times making sure that I did not think to hard and try to help NSArchiver. Every time I did, it caused problems. I would simplify the code and it would start to work. NSArchiver handles (or seems to for me) circular referencing. > I'm trying to write on a file a complex object graph and I use the > [NSArchiver archiveRootObject: toFile:] method. > Unluckly I've noticed that the encoding sequence is executed twice, while > I > call [NSArchiver archiveRootObject: toFile:] once. I have noticed, through out YB, alot of things seem to get called twice for me also. It troubles me. Is this normal. > Further during unarchiving I get an inconsistency file error. > > I've checked several times my initWithCoder and encodeWithCoder > methods, > but they seem to me to be well balanced. > are you calling super for subclasses of your class, not NSObject? > Obviously my objects have outlets referencing other objects involved in > the > encoding sequence, but I have carefully avoided to encode these outlets. > Is > this sufficient to avoid circular references ? > Try not to do that. When I try to outthink the Archiever the Archiever does not work. NSArchiver is supposed to handle that as far as I know. From buck.erik at mcleod.net Sat Sep 5 09:37:39 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:29 2005 Subject: Panels and control Message-ID: <01bdd8eb$7ebd6ee0$672510d0@default> Preface: I usually hate RTFM answers, but the question being answered is so funadmetally RTFM that the only reason I can imagine for the original poster to ask at all is that his documentation is different from mine. On that assumption I have included the relevant portions of the documentation and reference to other places to look. If I have misunderstood the question and the original poster just wants to know how to programmatically create a window or panel or subclass, I suggest any one of several books on the subject or quite frankly, this is a good first homework assignment. All of the API is documented; there are several examples available, and this excursus will provided valuable insight into exactly what IB is doing for you. Create the panel any way you want. Then use the following information to run the window in a modal event loop: Copied from Apple NSWindow documentation without permission Modal Windows You can make a whole window or panel run in modal fashion, using the application's normal event loop machinery but restricting input to the modal window or panel. Modal operation is useful for windows and panels that require the user's attention before an action can proceed. Examples include error messages and warnings, as well as operations that require input, such as printing or saving a document. There are two mechanisms for operating a modal window or panel. The first, and simpler, is to invoke NSApplication's runModalForWindow: method, which monopolizes events for the specified window until one of the NSApplication methods stopModal, abortModal, or stopModalWithCode: is invoked, typically by a button's action method. The stopModal method ends the modal status of the window or panel from within the event loop. It doesn't work if invoked from a method invoked by a timer or by a distributed object because those mechanisms operate outside of the event loop. To terminate the modal loop in these situations, you can use abortModal. The stopModal method is typically invoked when the user clicks the OK button (or equivalent), abortModal when the user clicks the Cancel button (or presses the Escape key). These two methods are equivalent to stopModalWithCode: with the appropriate argument. See the method descriptions in the NSApplication class specification for more information. The second mechanism for operating a modal window or panel, called a modal session, allows the application to perform a long operation while it still sends events to the window or panel. Modal sessions are particularly useful for panels that allow the user to cancel or modify an operation. To begin a modal session, invoke NSApplication's beginModalSessionForWindow: method, which sets the window up for the session and returns an identifier used for other session-controlling methods. At this point, the application can run in a loop that performs the operation, on each pass sending runModalSession: to the application object so that pending events can be dispatched to the modal window. This method returns a code indicating whether the operation should continue, stop, or abort, which is typically established by the methods described above for runModalForWindow:. After the loop concludes, you can remove the window from the screen and invoke NSApplication's endModalSession: method to restore the normal event loop. The method description for runModalForWindow in the NSApplication class specification includes sample code illustrating a modal session. Note: You can write a modal event loop for a view object so that the object has access to all events pertaining to a particular task, such as tracking the mouse in the view. For an example, see "Mouse Events" in the class specification for NSView. The normal behavior of a modal window or session is to exclude all other windows and panels from receiving events. For windows and panels that serve as general auxiliary controls, such as menus and the Font panel, this behavior is overly restrictive. The user must be able to use menu key equivalents (such as those for Cut and for Paste) and change the font of text in the modal window, and this requires that nonmodal panels be able to receive events. To support this behavior, an NSWindow subclass overrides the worksWhenModal method to return YES. This allows the window to receive mouse and keyboard events even when a modal window is present. If a subclass needs to work when a modal window is present, it should usually be a subclass of NSPanel, not of NSWindow. Modal windows and modal sessions provide different levels of control to the application and the user. Modal windows restrict all action to the window itself and any methods invoked from the window. Modal sessions allow the application to continue an operation while accepting input only through the modal session window. Beyond this, you can use distributed objects to perform background operations in a separate thread, while allowing the user to perform other actions with any part of the application. The background thread can communicate with the main thread, allowing the application to display the status of the operation in a nonmodal panel, perhaps including controls to stop or affect the operation as it occurs. Note that because the Application Kit isn't thread-safe, the background thread should communicate with a designated object in the main thread that in turn interacts with the Application Kit. From dyoung at vviuh221.vvi.com Sat Sep 5 10:01:52 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:29 2005 Subject: NSArchiver question References: <19980905154122.AAA22109@CX268689-A> Message-ID: <9809051701.AA01426@vviuh221.vvi.com> 1) From what I remember the documentation, in NEXTSTEP 3.3, use to say that the -write:(NXTypedStream *) method was called twice. I suspect the same is true for the NSCoder related methods; but on quick glance I couldn't find that in the docs anymore. 2) Definitely don't dereference id ivars, unless that is what you want 3) when appropriate (a) make sure to encode objects conditionally and to encode them non-conditionally only once if it is owned within the graph being encoded, and (b) don't have a archiveRootObject in the NSArchiving writing except at the top node, unless you are sure that you want multiple roots (which is somewhat unlikely). In addition, break in gdb at the archiver inconsistency file error to see where it happens. Also, note that NSCoder model is far from optimal (that is why we wrote our own coder). Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From gerard at ina.fr Sat Sep 5 13:46:43 1998 From: gerard at ina.fr (Gerard Iglesias) Date: Thu Nov 3 14:41:29 2005 Subject: NSArchiver question Message-ID: <199809051922.VAA29222@gaston.ina.fr> It is aboslutly normal that encodeWithCoder: is called twice, it is the way the coding system know if an object need to be really archived: If an obect is only encoded by the conditional method then it will not be archived. The system can handle mutual referencing, one obvious example is the NSView and NSWindow relationship, but the window own the views, hence the window encode a view by the encodeObject: method, and the view don't own the window, hence the view encode the window by the encodeContionalObject: method. The effect of this strategy is that if you want to archive only the view, then the window will not be archived. But the system can handle the case where two objects encode the other by the encodeObject: method (circular reference). The problem is resolved simply by the fact the the system memorize the objects yet encoded, affecting to it an identifiant for the archive, and when the same object is encoded for the second time, only his archive-id is wrote in the file. When you archive a window, there is a circular referencing between his views and itself but the system work very well. I had archived very complex network of object in the past, and sometimes it is very hard to find the errors, you have to be very careful on the logic of your objects network. You have to describe more precisely your problem, maybe I will able to help you. But it is not a problem of circular referencing. Best regards. -- http://www.ina.fr/People/Gerard.IGLESIAS From gerard at ina.fr Sat Sep 5 14:00:28 1998 From: gerard at ina.fr (Gerard Iglesias) Date: Thu Nov 3 14:41:29 2005 Subject: Panels and control Message-ID: <199809051936.VAA29261@gaston.ina.fr> It seems that what you want to do is a modal window, you can do that in the YB with a NSWindow or a NSPanel, you have to use the methods relative to runModal which are in NSApplication, I am not sure because I am at home on a 5400 which will never have MacOSX in it. For you browser question, it seems that you need to set the represented object when the borowser system request to fill the matrix, not after that. Hoping that this will help you. Regards. -- http://www.ina.fr/People/Gerard.IGLESIAS From paulrs at lgs-systems.com Sat Sep 5 11:26:31 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:29 2005 Subject: NSMenuPanel Message-ID: <9809051826.AA02363@slab> Hey guys, I just wanted to thank everyone who helped me with the issue of rolling my own version of an NSMenuPanel. I'm happy to say that it is working quite nicely. The only major sticking point that I had was the issue of closing the window when the user clicked outside the panel. I've included code below which is in our LGSMenuPanel that runs the modal loop. Contrary to information which I had received, the window, when it is running modal, does not seem receive mouse events which are outside its frame, so simply grabbing events in sendEvent: and looking for things outside the windows frame didn't work. I had to purposefully get the next event from the app. You'll notice that I'm looking not just for NSLeftMouseDowns. What I found was that when I looked for just mouse downs, if the user clicked on a window in another app, the apps resigning process did not work and the panel would stay up over top of all windows. The only other trick is to make certain that you register the panel for notification of the app resiging active and abort the modal under this condition. Regards, Paul NS_DURING while (YES) { if ((outcome = [NSApp runModalSession:session]) != NSRunContinuesResponse) { break; } else { NSEvent *theEvent = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSModalPanelRunLoopMode dequeue:NO]; if (([theEvent type] == NSLeftMouseDown) && ![self _eventInWindow:theEvent]) { [self _abortModal]; } } } NS_HANDLER outcome = NSRunAbortedResponse; NS_ENDHANDLER --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From mtrent at msn.fullfeed.com Sat Sep 5 16:01:31 1998 From: mtrent at msn.fullfeed.com (mtrent@msn.fullfeed.com) Date: Thu Nov 3 14:41:29 2005 Subject: CVS 1.10 with wrapper support Message-ID: <199809052301.SAA14632@shell1.msn.fullfeed.com> > Last time I checked (admittedly a while ago), gnutar was not able to handle > links whose names contained > 100 characters. This caused me some problems > with Framework installations. I resorted to using > /NextAdmin/Installer.app/installer_bigtar instead. That was definitely the case with older gnutars. The gnutar that ships in DR2 doesn't seem to suffer from this. You can gnutar up all of ./System/Library and unpack it again without losing the symlinks. It also handles unusually long hard-links pretty well (though I did have a problem with it in one specific instance). The packages that shipped on the DR1 CD were gnutarred. This included developer libraries, tools, docs, and other deep structures. > Does pax solve this problem? pax's default (tar) format does not handle these deep structures correctly. You can use pax's cpio format, though, which seems to work. The DR2 pax will display some scary warnings, but they appear to be cosmetic. . My advice is just to stick with modern gnutars. In every case, if you are concerned with reproducability, double-check your results. MDT From cjohnson at object-works.com Sat Sep 5 17:38:39 1998 From: cjohnson at object-works.com (Chris Johnson) Date: Thu Nov 3 14:41:29 2005 Subject: NSArchiver question References: <9809051701.AA01426@vviuh221.vvi.com> Message-ID: <35F1D98F.43BFB327@object-works.com> David, The Archiver traverses your entire object graph once to make sure that it does not try to archive the same object twice. Once the archiver creates an archival map from this it goes over it again for real and archives everything. Chris Johnson David Young wrote: > 1) From what I remember > the documentation, in NEXTSTEP 3.3, use to say that the > -write:(NXTypedStream *) > method was called twice. I suspect the same is true for the NSCoder related > methods; but on quick glance I couldn't find that in the docs anymore. > > 2) Definitely don't dereference id ivars, unless that is what you want > > 3) when appropriate (a) make sure to encode objects conditionally and to > encode them non-conditionally only once if it is owned within the graph being > encoded, and (b) don't have a archiveRootObject in the NSArchiving writing > except at the top node, unless you are sure that you want multiple roots > (which is somewhat unlikely). > > In addition, break in gdb at the archiver inconsistency file error to see > where it happens. > > Also, note that NSCoder model is far from optimal (that is why we wrote our > own coder). > > Thanks A Bunch! David Young; VVI-DCS > http://www.vvi.com From eric at EMIEng.com Sat Sep 5 17:51:45 1998 From: eric at EMIEng.com (Eric Marshall) Date: Thu Nov 3 14:41:29 2005 Subject: Bar Code Fonts Message-ID: <199809060052.UAA00314@EMIEng.com> > Does anyone have a suggested resource from which decent bar code fonts > (e.g. Code39) for OS/WO/Rhap can be be located? Or... a resource for a > good PS-to-NeXT font conversion utility? I just ordered some fonts from Adobe, and I know they sell one. For font conversions, I just recently had a buddy of mine use Frank Siegert's font converter program on those Adobe fonts I just bought. Here's the URL for his font conversion program: http://www.this.net/~frank/FontConvert.1.52b.NISH.b.tar.gz The resulting converted fonts seem to be working just fine under DR2. From buck.erik at mcleod.net Sun Sep 6 08:07:13 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:29 2005 Subject: NSRange exception with open panel Message-ID: <01bdd9a8$07616b40$852510d0@default> Th every first time the user selects a file in the open panel, the panel "disappears" without selecting any files due to an exception. The exception is an NSRangeException caused by the open panel trying to access the object at index -1 in an NSMutableArray containing 17 items. The users next and subsequent attempts to use the open panel work fine. The exception is raised within the open panel's code and the NSMutableArray is not anything our code passed to the open panel. Has anyone else encountered this ? Is it a known bug ? From jd at value.net Sun Sep 6 18:16:39 1998 From: jd at value.net (Jean Drolet) Date: Thu Nov 3 14:41:29 2005 Subject: NSRange exception with open panel Message-ID: A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2219 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980907/028912ee/attachment.bin From gerard at ina.fr Mon Sep 7 02:58:37 1998 From: gerard at ina.fr (Gerard Iglesias) Date: Thu Nov 3 14:41:29 2005 Subject: [Fwd: Re: CVS 1.10 with wrapper support] Message-ID: <35F3AE4E.D1C8FF4C@ina.fr> I am trying to use this new version, and even in the no clien/sever use I get this error message: cvs [checkout aborted]: -t/-f wrappers not supported by this version of CVS Regards. From vincent.coetzee at rmb.co.za Mon Sep 7 04:45:46 1998 From: vincent.coetzee at rmb.co.za (vincent.coetzee@rmb.co.za) Date: Thu Nov 3 14:41:29 2005 Subject: Bitmaps and Icons Message-ID: <42256678.00407DE7.00@rmb-1.rmb.co.za> Thanks to all those people who sent me info on how to create TIFF files for icons. I have just one question though, if one wants to mask these bitmaps ie create a TIFF file that has a transparent background, how does one do it in something like Photoshop ? Thanks Vincent From stark at easynet.fr Mon Sep 7 08:14:00 1998 From: stark at easynet.fr (stark@easynet.fr) Date: Thu Nov 3 14:41:29 2005 Subject: Loading code from "other" bundles References: <199809031425.QAA03160@hnw.sente.ch> Message-ID: <9809071514.AA02379@easynet.fr> Hi, > You wrote: > > A .app is a bundle as far as NSBundle is concerned, but it is not a > > loadable bundle. If you get down to the Mach-O layer, would find > > that loadable bundles are a particular type of Mach-O file > > (MH_BUNDLE) while those inside .app wrappers are a differnt type > > (MH_EXECUTE). > > > > A MH_EXECUTE file may not be dynamically loaded but a MH_BUNDLE (or > > MH_DYLIB -- ie, a framework) may be dynamically loaded. > > Thanks for the information. > > > So, if you have some code that you want to share between two > > applications, you should put it into a bundle and then have the two > > applications share that bundle. > > Yes, but this is not what I wanted to do, which is a kind of > development tool that would be able to transparently load, analyze > and execute code from any executable (bundle, framework or app). You can do the opposite: your tool could be a framework/bundle that you link with the other application (and that framework/bundle could communicate with your front-end). DYLD_INSERT_LIBRARIES=XXX /NextDeveloper/Demos/Mandelbrot.app/Mandelbrot should do the trick. Cheers, --fred From alviani at ix.netcom.com Mon Sep 7 10:03:49 1998 From: alviani at ix.netcom.com (Frank Alviani) Date: Thu Nov 3 14:41:29 2005 Subject: projectServer Problem Message-ID: <199809071701.MAA08012@dfw-ix15.ix.netcom.com> Hello all, Earlier today while working on my current learning project (DR2 on Intel) I suddenly got the following alert: "The connection to the projectServer process was lost. Use the Indexer in the Tools menu to restart it". Unfortunately, every operation of the Indexer results in the same message - and no connection. How do I reconnect to the projectServer? I already tried restarting PB after restarting the machine. Thanks in advance, Frank Alviani From snoyes1 at .rdc1.az.home.com Mon Sep 7 10:37:58 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:29 2005 Subject: projectServer Problem Message-ID: <19980907173735.AAA26684@CX268689-A> > From: Frank Alviani > [...] > Earlier today while working on my current learning project (DR2 on Intel) > I suddenly got the following alert: "The connection to the projectServer > process was lost. Use the Indexer in the Tools menu to restart it". > > Unfortunately, every operation of the Indexer results in the same message > - and no connection. > > How do I reconnect to the projectServer? I already tried restarting PB > after restarting the machine. > I had this problem in OPENSTEP and it was almost always traced back to a non printable character in a file. This might be a Ctrl-Y or some other character. Use HexEdit to look at your files and see if you have some non-standard character in it. Once in a while, it was caused by a faulty '.h' file. But then it would not compile either. Indexing under RDR2 seems really broken. I get an index very seldom, even on new projects. I have had projects not index on RDR2 (PPC) then index on YB Intel then index on RDR2 only to loose indexing under YB. It is a best random. What you loose by not having the indexer: 1) Class browser. 2) Reparsing of files on save. Project must be reloaded to get new position information on methods. 3) The Red arrows only return to yellow on reload of project. I hope they get this fixed. From eric at EMIEng.com Mon Sep 7 13:48:34 1998 From: eric at EMIEng.com (Eric Marshall) Date: Thu Nov 3 14:41:29 2005 Subject: anybody using lex & yacc under DR2? Message-ID: <199809072049.QAA02196@EMIEng.com> A couple of things are buggin' me. In particular: - ProjectBuilder won't open lex and yacc files - The predefined build rules for lex and yacc files don't run lex and yacc if a lex or yacc file is modified Thanks in advance. Eric Marshall EMI Software Engineering From gerry.hurley at avatarworks.com Sun Sep 6 17:56:57 1998 From: gerry.hurley at avatarworks.com (Gerry Hurley) Date: Thu Nov 3 14:41:29 2005 Subject: Bitmaps and Icons References: <42256678.00407DE7.00@rmb-1.rmb.co.za> Message-ID: <35F32F56.504E23BF@avatarworks.com> vincent.coetzee@rmb.co.za wrote: > > Thanks to all those people who sent me info on how to create TIFF files for > icons. I have just one question though, if one wants to mask these bitmaps > ie create a TIFF file that has a transparent background, how does one do it > in something like Photoshop ? I've used gif files with the transparent colour set to the background (usually white). These are prepared on a Mac using GifBuilder and GIF Convertor, with images pasted in from ClarisWorks. There are probably many good tools available for DR2 as well. GIF files work well in Interface Builder. Gerry Hurley http://www.avatarworks.com/ AVATAR - people friendly groupware From tjw at omnigroup.com Mon Sep 7 22:26:54 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:29 2005 Subject: Extending NSParagraphStyle In-Reply-To: <01bdd86c$e152a7c0$5e2b10d0@default> References: <01bdd86c$e152a7c0$5e2b10d0@default> Message-ID: <199809080526.WAA27528@ignem.omnigroup.com> I'm 99% sure that you are wrong. I'd have to write a program to verify the last 1% :) If you call class_poseAs() (the ObjC runtime function that does the work in -poseAs:) and the subclass has ivars, the ObjC runtime will issue an error and I think your program will exit (not sure on what happens after the error). The issue here is two pronged and you mention the first part -- instances created before the -poseAs: would have the wrong 'isa' and size. The second problem is that the old class might have other subclasses. When you do a -poseAs:, your class becomes the new superclass of the other subclasses of your parent. Clear as mud? Maybe a simple diagram will help those that are reading that haven't thought about this much. Say that our initial class heirarchy looks like: A /|\ B C D If we have B pose as A, then we'd get A | B / \ C D Now, if C or D has ivars of their own, and B has ivars, the methods in C and D that access their ivars (which is done by adding a fixed offset to the beginning of the object) will actually be referencing the ivars in B. This would suck. There are several obvious ways around this manifestation of the 'fragile base class' problem, but they all pretty much suck. -tim Begin forwarded message: Date: Fri, 4 Sep 1998 18:36:53 -0700 (PDT) Reply-To: buck.erik@mcleod.net From: "Michelle L. Buck" To: Multiple recipients of list Subject: Re: Extending NSParagraphStyle >I would create a subclass of NSParagraphStyle and then use -poseAs: >to make the text system use my subclass everywhere. The only >limitation with -poseAs: is that you can't add additional instance >variables. The way around this is to keep a global hash table in your >subclass which maps paragraph style objects to whatever additional >information you need for each style. (Your subclass get/set methods >for extra info can then look up the information they need based on >'self'.) > >You'll need to override NSParagraphStyle's -copyWithZone: and >-mutableCopyWithZone: (and possibly the NSCoding methods if you use >them) to duplicate the extra hash table information for the copied >object, and override -dealloc to remove the hash table entry. > >This is a fairly common design pattern in Objective-C when you need >to extend a class and don't have control over all of the places where >instances may be created. > >Hope this helps, > --Greg > >--------------------- >Greg Titus >Omni Development Inc. >greg@omnigroup.com > I could be wrong, but I am pretty sure that poseAs: works fine even if the posing class has additional instance variables. You just have to pose before any instances of the wrong class are created. Call poseAs: from main() before the NSApplication object is created and you should be fine. When instances are created (even by library code), the size of the instance will conform to the size of the posing class because the run-time system has completely replaced the original and uses the posing class's size in alloc. For that matter, it uses the posing class's alloc. From tjw at omnigroup.com Mon Sep 7 22:29:46 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:29 2005 Subject: Extending NSParagraphStyle In-Reply-To: <199809042118.OAA10267@ignem.omnigroup.com> References: <199809042118.OAA10267@ignem.omnigroup.com> Message-ID: <199809080529.WAA28509@ignem.omnigroup.com> If you want to add ivars, you can attempt to override +allocWithZone: on the superclass (via a category) to return an instance of the subclass instead. This doesn't work in all classes since some classes implement optimized allocating strategies (free lists and the like) by doing interesting goo in +allocWithZone: and -dealloc. This can be a lot cheaper in additional coding complexity and CPU usage at runtime (since you won't have all those hash table operations). -tim From: Greg Titus To: Multiple recipients of list Subject: Re: Extending NSParagraphStyle Peter_Johnson wrote: > I need to track some additional character and paragraph attributes > along with the text using the Yellow Box text system. [...some cut...] > > However, paragraph attributes seem to be altogether different. > Paragraph attributes are stored in an NSParagraphStyle object, not > an NSDictionary. > So, the question is how do I add my own paragraph attributes? I was holding off replying to this to see if anyone had any better ideas, but since I haven't seen any responses yet... I would create a subclass of NSParagraphStyle and then use -poseAs: to make the text system use my subclass everywhere. The only limitation with -poseAs: is that you can't add additional instance variables. The way around this is to keep a global hash table in your subclass which maps paragraph style objects to whatever additional information you need for each style. (Your subclass get/set methods for extra info can then look up the information they need based on 'self'.) You'll need to override NSParagraphStyle's -copyWithZone: and -mutableCopyWithZone: (and possibly the NSCoding methods if you use them) to duplicate the extra hash table information for the copied object, and override -dealloc to remove the hash table entry. This is a fairly common design pattern in Objective-C when you need to extend a class and don't have control over all of the places where instances may be created. Hope this helps, --Greg --------------------- Greg Titus Omni Development Inc. greg@omnigroup.com From csaldanh at computeractive.com Tue Sep 8 06:42:06 1998 From: csaldanh at computeractive.com (Chris Saldanha) Date: Thu Nov 3 14:41:29 2005 Subject: projectServer Problem In-Reply-To: <19980907173735.AAA26684@CX268689-A> References: <19980907173735.AAA26684@CX268689-A> Message-ID: <199809081341.JAA15518@saturn.computeractive.com> You wrote: > > From: Frank Alviani > > How do I reconnect to the projectServer? I already tried restarting PB > > after restarting the machine. > > > I had this problem in OPENSTEP and it was almost always traced back > to a non printable character in a file. This might be a Ctrl-Y or > some other character. Use HexEdit to look at your files and see if > you have some non-standard character in it. Once in a while, it was > caused by a faulty '.h' file. But then it would not compile either. Certain kinds of valid syntax in code also break the indexing. The grammar they use in the indexer seems less robust than the compiler's. For instance, --------------------------------------- static int des_set_key(key, schedule) des_cblock (*key); des_key_schedule schedule; { // etc.... } --------------------------------------- breaks the indexer on OS 4.2 because of the (sytactically valid) brackets around *key, and generates the message you see. The code compiles just fine, though. --Chris ------------------------------------------------------------------------ Chris Saldanha, Software Analyst | 15 Capella Ct. Suite 128 computerActive Inc. | Nepean, ON, Canada K2E 7X1 csaldanh@computerActive.com (NeXT/MIME)| Voice: (613)225-4824 http://www.computerActive.com/ | FAX: (613)225-1670 ------------------------------------------------------------------------ "The telephone was not invented by Alexander Graham Unitel" -Bell Ad From richs at win.bright.net Tue Sep 8 13:09:12 1998 From: richs at win.bright.net (Rich Schroedel) Date: Thu Nov 3 14:41:29 2005 Subject: Employment? Message-ID: <35F58EE7.D32FAF18@win.bright.net> Does anyone know of a job listing for Rhapsody/Mac type jobs? I'm looking for something in the Minneapolis/St.Paul area. Thanks -- Rich Schroedel richs@win.bright.net From alvinj at sdt1.hpl.com Tue Sep 8 12:46:24 1998 From: alvinj at sdt1.hpl.com (Alvin Jee) Date: Thu Nov 3 14:41:29 2005 Subject: Linking object files on NT? Message-ID: <199809081946.MAA16480@sdt1.hpl.com> Hola All! How does one combine two (or more) .o files (object files) into a single .o file with YellowBox on NT? I am porting a project that has many components. Each component is made up of several C source files. The existing make file (that runs under all flavors of UNIX) creates a .o file for each .c file. Then, all the .o files for a component are merged into a single .o file for the component using the linker ld (ld -r -o component.o piece1.o piece2.o....). Then, all the component .o files are linked together to make the final executable. With YellowBox/NT, ld is not the same as ld on MacOS-X or NS, or OS. It doesn't like the -r flag. It also looks like it may be Microsoft's linker and not gnu ld or some derivative. Ugh. Also, does anybody use Win95 for YellowBox development? It seems that make on Win95 is not as happy as make on WinNT even with the proper /bin links. Sh.exe keeps dying with illegal op errors when called from within make. Thanks! --- Alvin Jee mailto:alvinj@sdt1.hpl.com NeXTmail gleefully accepted! Sending bits through the Internet since 1984. From kgb at graduate.net Tue Sep 8 13:03:39 1998 From: kgb at graduate.net (KGB Software) Date: Thu Nov 3 14:41:29 2005 Subject: Multiple windows defined in one nib? Message-ID: Hi, I'm still a Yellow Box newbie, and I have a philosophical question for y'all: When is it appropriate to define several types of windows in a single NIB file, and when is it not? --John Kuszewski From snoyes1 at .rdc1.az.home.com Tue Sep 8 13:17:08 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:29 2005 Subject: Linking object files on NT? Message-ID: <19980908201441.AAA26881@CX268689-A> > From: Alvin Jee > [...] > Also, does anybody use Win95 for YellowBox development? It seems that > make on Win95 is not as happy as make on WinNT even with the proper /bin > links. Sh.exe keeps dying with illegal op errors when called from within > make. > WinNT + YB is much nicer than Win95 + YB. Under NT things work very well. Under Win95 PB seems really crippled with errors on make, gdb, and startup. It works but not well. The developed apps seem really solid under Win95, however From anderkh at texaco.com Tue Sep 8 13:28:33 1998 From: anderkh at texaco.com (Anderson, Ken H) Date: Thu Nov 3 14:41:29 2005 Subject: Multiple windows defined in one nib? Message-ID: <405D056843B6D111A8EB00805F9A432C19EB68@MSX01013> John, The answer (IMHO) depends on what you're using those windows for. Often, you'll have multiple windows defined in one nib file to keep a number of 'swappable' views organized. For instance, the InterfaceBuilder inspector has a pop-up button on it's inspector that can show you multiple inspectors inside the inspector. To make things easy, people usually build these multi-pane inspectors by using multiple panels/windows (they're never shown to a user as a complete window). Often, your main nib file will include an inspector window, and possibly an info panel (unless you placed this in a separate nib). If you have a type of document that uses multiple windows, this might be a reason, but I would recommend against such a plan. It's usually much more elegant (and less confusing) to have only one window represent a document, and use inspectors for any ancillary information. Ken -----Original Message----- From: KGB Software [mailto:kgb@graduate.net] Sent: Tuesday, September 08, 1998 4:10 PM To: Multiple recipients of list Subject: Multiple windows defined in one nib? Hi, I'm still a Yellow Box newbie, and I have a philosophical question for y'all: When is it appropriate to define several types of windows in a single NIB file, and when is it not? --John Kuszewski From dyoung at vviuh221.vvi.com Tue Sep 8 13:49:31 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:29 2005 Subject: Multiple windows defined in one nib? References: Message-ID: <9809082049.AA03350@vviuh221.vvi.com> > When is it appropriate to define several types of windows in a > single NIB file, and when is it not? To me, "define several types" means to define several Obj-C subclasses of NSWindow. Presumably you mean "When is it appropriate to instantiate several windows in one nib file" (?) More than one window is appropriate when the nib resource you are loading requires more than one window to be shown on the screen either at the same time, or at different times. It saves you the hassle of making the window yourself. More than one window is not really needed when you are just defining view components to be switched into one or more on screen windows. In that case, for efficiency reasons you can place all your views on one window and use them when required -- and marking the window as deferred and off-screen. After removing all the views from the window you can release (or close if appropriate) the window, which will mark it for deletion. Making a few Windows per nib is not a lot of overhead IF you mark them as deferred and do not need to order them on screen. When your project gets big then you will want multiple nib files so you can load them incrementally. By breaking out the resources into different nib files you naturally reduce the number of windows per nib file. For example, OpenGraph has about 80 nib files whos resources get loaded one at a time when needed. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From dave.pl at ping.at Tue Sep 8 13:45:49 1998 From: dave.pl at ping.at (Dietmar Planitzer) Date: Thu Nov 3 14:41:29 2005 Subject: ANN: GLUT for MacOS X Server now available Message-ID: <199809082045.WAA29701@pong.Austria.EU.net> Hello All, I just wanted to let you know that GLUT for MacOS X Server / Rhapsody Developer Release 2 is now available from the following site: ftp://ftp.next.peak.org/pub/rhapsody/Developer/Frameworks What's that GLUT thing ?? GLUT stands for OpenGL Utility Toolkit. It was originally developed by Mark J. Kilgard in order to make it possible to write OpenGL programs in a platform independend way. GLUT provides a very rich windowing and input device management API for developing powerful OpenGL programs using only GL and GLUT calls. If you want to learn more about GLUT, have a look at: http://reality.sgi.com/opengl/glut3/glut3.html The distribution consists of the files: 1. MacOSXGLUT-1.0-P-b.tar.gz Precompiled binaries for PowerMacintosh computers. 2. MacOSXGLUT-1.0-PI-s.tar.gz Sources for GLUT, GLE, MUI, a few example programs and the test programs. 3. MacOSXGLUT_Demos-1.0-PI-s.tar.gz Sources of all example programs that come with the standard GLUT distribution. 4. MacOSXGLUT_Data-1.0-PI-b.tar.gz Finally, the texture files for the example programs The file MacOSXGLUT-1.0.README gives more detailed information about it's features and still existing problems which should be solved in a future version. The MacOS X Server port has a number of special features that are unique to this GLUT implementation: Copy to Clipboard. You can copy the contents of the current window, the one which is key, to the pasteboard every time, even while an animation is running. The data is written in TIFF format to the general pasteboard. You can even take a look at the data currently stored on the pasteboard server if you select "Show Clipboard" from the Edit menu. All standard data types are supported: various text formats, EPS, TIFF and sound. Services The contents of the current window can be sent via services to other applications at any time. All applications which are able to accept EPS, TIFF or RTFD data are supported. This mechanismn is very handy - i.e. if you want to send your newest and greatest graphics to your colleagues, simply select "MailViewer->MailTo" from the Services menu, which will bring up the MailViewer application displaying a new letter containing the graphics. Saving Window Contents It is also possible to save the current windows contents to a file on your local disk (URL and thus remote support, will be added in version 1.1). The data will be safed in uncompressed TIFF format. Printing Printing as EPS is also supported. Faxing Although, the necessary code to enable direct faxing from within any GLUT application is there, faxing is broken in RDR2. The problem is the fax panel, which has a bug in the menu creation code. If you have MacOS X Server Beta - give it a try, maybe it works ! MacOSXGLUT supports Mesa version 2.6 and Conix's OpenGL for RDR2. You can choose between the two gl implementatios by simply defining the necessary preprocessor symbol when compiling the framework. The readme file contains more information about this. Another thing mostly interesting to people speaking German, is that a localization for German is included. If someone has selected German as his/her prefered language, all GLUT menus and messages will be displayed in German, otherwise in English. Speaking of localization - if you think that other languages, like French or Japan (would be cool !) should be supported, feel free to send me the localized resources - NIBs and strings file - so that I will be able to include them in version 1.1 ! Have fun with it, Planitzer Dietmar From arti at hawaii.rr.com Tue Sep 8 14:08:19 1998 From: arti at hawaii.rr.com (Art lsbell) Date: Thu Nov 3 14:41:29 2005 Subject: Linking object files on NT? Message-ID: <005c01bddb6c$d2312930$a17ad2cc@bozo.hawaii.rr.com> Steven Noyes wrote: >The developed apps seem really solid under Win95, however Can someone tell me whether YB DR2 fixes a couple of crippling bugs that exist when OSE 4.2 apps are run under 95 but not NT? Tool tips are broken such that instead of a small yellow box opening, what appears to be a small window that can cover up the view to which the tool tip is associated opens instead. It must be closed before the view can be accessed which is a pain that our users have been complaining about. Has this been fixed? Windows with certain properties cannot be re-opened after being miniaturized (minimized). All that opens is part of the top border - no contents :-( We haven't determined what set of properties causes this, but it may affect only windows that can't be resized. I have had to prevent miniaturization under 95 to avoid this problem which is not a good solution for an app with very large windows such as ours. Has this been fixed? Name: Art Isbell Employer: IDX Systems Corporation (for whom I do not speak) Email: arti@hawaii.rr.com Voice: +1 808 526 1226 Voice mail: +1 808 533 1827 US Mail: Honolulu, HI 96813-1021 From ricardo at ccsi.canon.com Tue Sep 8 14:41:15 1998 From: ricardo at ccsi.canon.com (Ricardo Parada) Date: Thu Nov 3 14:41:29 2005 Subject: Linking object files on NT? References: <005c01bddb6c$d2312930$a17ad2cc@bozo.hawaii.rr.com> Message-ID: <199809082138.OAA01515@ccsi.canon.com> > Tool tips are broken such that instead of a small > yellow box opening, what appears to be a small window > that can cover up the view to which the tool tip is > associated opens instead. It must be closed before > the view can be accessed which is a pain that our > users have been complaining about. Has this been > fixed? Don't remember seeing this. However we are using a pretty patched up version of Win95. Actually we did lots of testing and we discovered problems with early versions of Win95. For example, the machine would freeze when running the virus software on a machine with openstep installed, even without running any openstep app. So we're using Win95 RevB or something like that. And I don't know where the SAs got that version from. But that's what we finally determined was a reliable version. And I don't recall this problem you are talking about. We use OPENSTEP 4.2. - ricardo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1046 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980908/af018b9b/attachment.bin From eric at EMIEng.com Tue Sep 8 18:49:53 1998 From: eric at EMIEng.com (Eric Marshall) Date: Thu Nov 3 14:41:29 2005 Subject: any documentation describing nibTool output? Message-ID: <199809090150.VAA01324@EMIEng.com> Does anyone know if there is documentation describing the *output* of nibTool? Right now I'm trying to determine how to lay out an NSMatrix that contains a set of NSButton objects, and I can't seem to find any information in the nibTool output about the size and locations of the NSButtonCell object(s) used within the Matrix. Thanks in advance. Eric Marshall EMI Software Engineering From eric at EMIEng.com Tue Sep 8 18:55:04 1998 From: eric at EMIEng.com (Eric Marshall) Date: Thu Nov 3 14:41:29 2005 Subject: vi & file locking & cc Message-ID: <199809090156.VAA01331@EMIEng.com> The vi that ships with DR2 contains file locking capabilities that prevent (some?) other programs from reading the full contents of the file. All I've been able to find documented about this new vi is the lock/nolock vi commands, and I haven't been able to use them to get what I want done, i.e., to not have vi lock the file so I can use one Terminal window to edit my source and another Terminal window to compile in. Does anyone know if the new vi can do this? If so, I'd love to hear about it. Thanks in advance. Eric Marshall EMI Software Engineering From derek at csarc.otago.ac.nz Tue Sep 8 21:03:16 1998 From: derek at csarc.otago.ac.nz (Derek Rendall) Date: Thu Nov 3 14:41:29 2005 Subject: EOModel problems Message-ID: <9809091603.AA161561@ghnomb> Hi, Running DR2 on PPC I am experiencing some "frustrations". 1) I have some eomodels in frameworks, installed on /Network/Library/Frameworks (where /Network is actually a link to somewhere on our file server). I have set up the framework search path, and the EOProjectSourceSearchPath in the NSGlobalDomain defaults, to point to the /Network/Library/Frameworks location. I want to use inheritance and create relationships across eomodels (in different frameworks), but I am never able to see any of the eomodels in the installed frameworks - just the eomodel I am currently working on. How do I get it to see the models in the installed frameworks? 2) I know that EOModels in frameworks were not "seen" by Interface Builder in OS 4.2, and I am experiencing the same problem in DR2 - is the bug still there, or have I missed a fix? Any help would be most appreciated - does anyone have the above problems resolved for DR2 on PPC? Thanks Derek Rendall Senior Software Engineer Black Albatross University of Otago PO Box 56, Dunedin New Zealand ph +64 +3 479-5468 fax +64 +3 479-9033 http://www.albatross.co.nz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1180 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980909/386a0ad0/attachment.bin From g8ultd at fanniemae.com Wed Sep 9 06:28:34 1998 From: g8ultd at fanniemae.com (Laurent Daudelin) Date: Thu Nov 3 14:41:29 2005 Subject: Employment? In-Reply-To: <199809082057.NAA23080@ignem.omnigroup.com> References: <199809082057.NAA23080@ignem.omnigroup.com> Message-ID: <9809091328.AA25633@mighty.fanniemae.com> On Tue, 8 Sep 1998, in message "Employment?", Rich Schroedel wrote: > Does anyone know of a job listing for Rhapsody/Mac type jobs? I'm > looking for something in the Minneapolis/St.Paul area. Thanks > - -- > Rich Schroedel > richs@win.bright.net > Try . There are some mailing lists there, one for Rhapsody jobs, and another one for NeXTSTEP jobs. Good luck! -Laurent. ===================================================================== Laurent Daudelin Fannie Mae Phone: 202-752-3987 mailto:Laurent_Daudelin@fanniemae.com Fax: 202-752-4207 Usual disclaimers apply From contact at finindev.com Wed Sep 9 07:35:25 1998 From: contact at finindev.com (Jean-Michel Cazaux) Date: Thu Nov 3 14:41:29 2005 Subject: Fed up with Excel and D'OLE !!! Please help... Message-ID: <01BDDC0F.DA719960@JEAN-MICHEL> First of all, thanks a lot to the ones who helped us on the previous post with this subject... Now, I think I'm really near of the goal, I can connect Excel, create or open a workbook, rename a worksheet... and I'm to say this stuff was not that hard to do. But now, I'm struggling to send a (poor) data in a (poor) cell, and this sounds quiet simple regarding what's already done, and I can't succeed doing this !!! My idea is to get a cell from the ExcelWorksheet with the range method and set the value of this cell. But the range method, (declared in ExcelProtocols.h from D'OLE samples) DOES NOT WORK, regardless it seems to be compliant with Excell declaration. When I perform a worksheet.range(@"A1"), I got : ::range:: attribute or selector not recognized in launch window... I tried a very lot of things (change method attributes, , and I don't know at all what I could do... Can anybody who perform such tasks say what it the right method and parameters to get a cell ???? Thanks in advance... PS : we are working with Excel 97... __________________________________________________________________________________________ Jean-Michel CAZAUX FININDEV, Conseil en Finances pour les Collectivit?s Locales. 204 Rue Michel Teule - ZAC d'Alco 34080 Montpellier - FRANCE. T?l. +33 (0)4 67 63 66 25 - Fax +33 (0)4 67 63 35 45 e-mail contact@finindev.com From edream at mailbag.com Wed Sep 9 08:18:54 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:29 2005 Subject: where are the refcounts, etc. ? Message-ID: Hi, I vaguely remember something like this being discussed a while back, and have not been able to find it in the archives. Some newbie questions about memory management: 1. The NSObject protocal includes retain, release, autorelease, etc., but NSObject contains only an isa pointer. Where are the refcounts? 2. Is it possible to get the present refcount of an object? If so, how? If not, why not? 3. Is there some way to examine the Appkit's default autorelease pool? Edward From anderkh at texaco.com Wed Sep 9 08:33:59 1998 From: anderkh at texaco.com (Anderson, Ken H) Date: Thu Nov 3 14:41:29 2005 Subject: where are the refcounts, etc. ? Message-ID: <405D056843B6D111A8EB00805F9A432C19EB69@MSX01013> Ed, To keep the footprint of NSObject to 4 bytes, the retainCount of an object is maintained in a private hash. In fact, if the retainCount is 1, it doesn't even exist in the hash at all! To find out the count, just send any object -retainCount. It returns an integer. To see the current pools, just do: p [NSAutoreleasePool showPools] This will dump all the pools on the pool stack to stdout. Ken -----Original Message----- From: Edward K. Ream [mailto:edream@mailbag.com] Sent: Wednesday, September 09, 1998 11:24 AM To: Multiple recipients of list Subject: where are the refcounts, etc. ? Hi, I vaguely remember something like this being discussed a while back, and have not been able to find it in the archives. Some newbie questions about memory management: 1. The NSObject protocal includes retain, release, autorelease, etc., but NSObject contains only an isa pointer. Where are the refcounts? 2. Is it possible to get the present refcount of an object? If so, how? If not, why not? 3. Is there some way to examine the Appkit's default autorelease pool? Edward From edream at mailbag.com Wed Sep 9 08:47:52 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:29 2005 Subject: Synching NSOutlineView : NSTableView objects Message-ID: Hi, Just before writing a data structure whose GUI is controlled by an NSOutlineView object, it is important to get the proper value of the current row (item) being edited, so that what appears on the screen is what is written to the file. What I want is to force a call to the data source method: outlineView:setObjectValue:forTableColumn:byItem: for the presently selected row (item). It appears that a call to reloadData, followed by a call to editColumn:row:withEvent:select: (where the row parameter specifies the current row), gets the job done, but this seems kludgy. After all, we aren't really telling the outline that the data sources's data has changed, we are requesting the reverse. Shouldn't synching be done explicitly, instead of as a side effect of something else? Any comments or suggestions? Edward -------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) http://www.mailbag.com/users/edream/front.html Apple Computer, right down there with Mercedes Benz. -------------------------------------------------- From seanl at cs.umd.edu Wed Sep 9 10:00:59 1998 From: seanl at cs.umd.edu (Sean Luke) Date: Thu Nov 3 14:41:29 2005 Subject: where are the refcounts, etc. ? In-Reply-To: <405D056843B6D111A8EB00805F9A432C19EB69@MSX01013> Message-ID: Whoa, nelly. On Wed, 9 Sep 1998, Anderson, Ken H wrote: > To keep the footprint of NSObject to 4 bytes, the retainCount of an > object is maintained in a private hash. Since the value has to be stored *somewhere*, at least for retained objects (count > 1), this only buys you efficiency if you have lots of temporary objects (count == 1). Also, how is this hacked to prevent a single global mutex necessary for locking and unlocking the hash table to do retains and releases in a multithreaded environment? > In fact, if the retainCount is 1, it doesn't even exist in the hash at > all! But this means that, without a flag of _some_ sort, to determine if an object has a retainCount of 1, the entire bucket would have to be searched for every release on a temporary object. Searching hash tables for objects that aren't in them is always the worst-case scenario for hash tables. Er... This just doesn't seem right. Is this really how it's set up? Sean Luke seanl@cs.umd.edu > To find out the count, just send any object -retainCount. It returns an > integer. > > To see the current pools, just do: > > p [NSAutoreleasePool showPools] > > This will dump all the pools on the pool stack to stdout. > > Ken > > -----Original Message----- > From: Edward K. Ream [mailto:edream@mailbag.com] > Sent: Wednesday, September 09, 1998 11:24 AM > To: Multiple recipients of list > Subject: where are the refcounts, etc. ? > > > Hi, > > I vaguely remember something like this being discussed a while back, > and have not been able to find it in the archives. > > Some newbie questions about memory management: > > 1. The NSObject protocal includes retain, release, autorelease, etc., > but NSObject contains only an isa pointer. Where are the refcounts? > > 2. Is it possible to get the present refcount of an object? > If so, how? If not, why not? > > 3. Is there some way to examine the Appkit's default autorelease pool? > > Edward > > From anderkh at texaco.com Wed Sep 9 10:14:25 1998 From: anderkh at texaco.com (Anderson, Ken H) Date: Thu Nov 3 14:41:29 2005 Subject: where are the refcounts, etc. ? Message-ID: <405D056843B6D111A8EB00805F9A432C19EB6D@MSX01013> Sean, First off, retained objects do have a retain count of 1, unless you obtained an autoreleased version and then retain it, which is not the case most of the time (or it shouldn't be). Second, I'm sure from a performance perspective, Apple has done everything possible to make it efficient. When I said 'hash', I didn't necessarily mean that type of algorithm, but as a generic term, meaning 'some way of looking things up'. Ken -----Original Message----- From: Sean Luke [mailto:seanl@cs.umd.edu] Sent: Wednesday, September 09, 1998 1:08 PM To: Multiple recipients of list Subject: RE: where are the refcounts, etc. ? Whoa, nelly. On Wed, 9 Sep 1998, Anderson, Ken H wrote: > To keep the footprint of NSObject to 4 bytes, the retainCount of an > object is maintained in a private hash. Since the value has to be stored *somewhere*, at least for retained objects (count > 1), this only buys you efficiency if you have lots of temporary objects (count == 1). Also, how is this hacked to prevent a single global mutex necessary for locking and unlocking the hash table to do retains and releases in a multithreaded environment? > In fact, if the retainCount is 1, it doesn't even exist in the hash at > all! But this means that, without a flag of _some_ sort, to determine if an object has a retainCount of 1, the entire bucket would have to be searched for every release on a temporary object. Searching hash tables for objects that aren't in them is always the worst-case scenario for hash tables. Er... This just doesn't seem right. Is this really how it's set up? Sean Luke seanl@cs.umd.edu > To find out the count, just send any object -retainCount. It returns an > integer. > > To see the current pools, just do: > > p [NSAutoreleasePool showPools] > > This will dump all the pools on the pool stack to stdout. > > Ken > > -----Original Message----- > From: Edward K. Ream [mailto:edream@mailbag.com] > Sent: Wednesday, September 09, 1998 11:24 AM > To: Multiple recipients of list > Subject: where are the refcounts, etc. ? > > > Hi, > > I vaguely remember something like this being discussed a while back, > and have not been able to find it in the archives. > > Some newbie questions about memory management: > > 1. The NSObject protocal includes retain, release, autorelease, etc., > but NSObject contains only an isa pointer. Where are the refcounts? > > 2. Is it possible to get the present refcount of an object? > If so, how? If not, why not? > > 3. Is there some way to examine the Appkit's default autorelease pool? > > Edward > > From hh at mdlink.de Wed Sep 9 11:25:47 1998 From: hh at mdlink.de (Helge Hess) Date: Thu Nov 3 14:41:29 2005 Subject: where are the refcounts, etc. ? References: <405D056843B6D111A8EB00805F9A432C19EB6D@MSX01013> Message-ID: <35F6C82B.8B560216@mdlink.de> Anderson, Ken H wrote: > > Sean, > > First off, retained objects do have a retain count of 1, unless you > obtained an autoreleased version and then retain it, which is not the > case most of the time (or it shouldn't be). This is true for truly temporary, not autoreleased objects, there shouldn't be much objects of that kind, although this depends on the application. Since one often stores/passes objects in some kind of container or custom object the retain count will become very quickly bigger than 1. While I don't think that most object constantly have a retain count bigger than one, I think most objects will have _temporarily_ a retain count bigger than one. This is even worse, because the object has to be added/removed from the table each time it crosses the count-1 barrier. > Second, I'm sure from a performance perspective, Apple has done > everything possible to make it efficient. When I said 'hash', I didn't > necessarily mean that type of algorithm, but as a generic term, meaning > 'some way of looking things up'. A global mapping table implies more or less that you have to maintain a lock in the multithreaded case, which makes the stuff quickly really slow. It is becoming slow anyway for all retain/release operations which are working on retain counts bigger than one (don't underestimate lookup operations ..) I think this is the typical mismatch between space and time. When using a hash-table you gain space and when using a counter in the object you gain time. A 4-byte retain-count in the object consumes only ~4KB for 1000 objects, so in my opinion space is far less important, especially when looking at the MT case. Note that it is not necessary to add an instance-variable to NSObject to store the counter, this is usually done by placing the retain-count before the object-instances, this means when an object is allocated, the object-pointer doesn't point to the beginning of the associated memory-block, but some bytes after this. You may want to take a look at the libFoundation source code to see how it works (libFoundation supports both approaches (and additionally mark&sweep ;-)). Helge -- MDlink online service center http://www.mdlink.de/ From ckane at apple.com Wed Sep 9 11:01:33 1998 From: ckane at apple.com (Chris Kane) Date: Thu Nov 3 14:41:29 2005 Subject: where are the refcounts, etc. ? Message-ID: <199809091807.LAA41276@scv4.apple.com> Ken Anderson is correct. There is a custom hash table off on the side which holds retain counts for objects which don't manage their own retain counts. When a process is multithreaded, there is one global (but relatively cheap) lock that everything goes through to get at this table. There are no additional flags (so yes, to find that the last reference is being eliminated and deallocation of the object is now appropriate, the table is probed for a non-existant object). This all is mitigated in a significant way by allowing objects to manage their own retain count, and then having the most common objects -- instances of concrete string classes, and other collection and 'value' objects (dates, numbers...) -- maintain their own ref counts in internal ivars (which of course still need to lock _some_ lock if multithreaded). Various other Foundation, AppKit, EOF, etc. classes do the same. In practice, in real apps, the external ref count table doesn't show up as a factor in performance. Chris Kane Apple Computer, Inc. From kgb at graduate.net Wed Sep 9 17:47:40 1998 From: kgb at graduate.net (KGB Software) Date: Thu Nov 3 14:41:30 2005 Subject: catching a doubleclick in a table view? Message-ID: Hi, I have a table view of un-editable items. I'd like to allow the user to double-click on an item in the table and have my code respond in some way. How can I do this? IB doesn't list any actions for NSScrollViews or TableColumns. Y'all are a great help! --John Kuszewski From aep at apple.com Wed Sep 9 18:00:53 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:30 2005 Subject: catching a doubleclick in a table view? Message-ID: <199809100059.RAA21878@scv1.apple.com> > I have a table view of un-editable items. I'd like to allow the > user to double-click on an item in the table and have my code respond > in some way. How can I do this? IB doesn't list any actions for > NSScrollViews or TableColumns. In your table view setup code, say [tableView setDoubleAction:@selector(myDoubleClickAction)]; and then check [tableView clickedColumn] and [tableView clickedRow] in your action for which row and column were clicked on. Andrew Platzer Application Frameworks Apple Computer, Inc. From charles at drbs.com Wed Sep 9 20:15:49 1998 From: charles at drbs.com (Charles C. Hocker) Date: Thu Nov 3 14:41:30 2005 Subject: Obj-C syntax question Message-ID: <19980909231809.311bb61b.in@drbs.com> Hello Everyone, I have been working through Scott Anguish's excellent HTMLEdit.app example and I have noticed a some variations in syntax from the Obj-C book and I was wondering if I have missed something. From the Document.m file the following was found... - (NSString *)windowNibName { return @"Document"; } - (void)windowControllerDidLoadNib:(NSWindowController *) aController; { ^^^^^ ... } The question that I have is concerning the semicolon (marked above) at the end of the second declaration. From the "Object-Oriented Programming and the Objective C Language" book, page 69 states: Methods for a class are defined, like C functions, within a pair of braces. Before the braces, they're declared in the same manner as in the interface file, but without the semicolon. I think I have noticed this somewhere else but, I cannot place it at this time. Am I missing something? Charles --------------------------------------------------------------------- Charles C. Hocker charles@drbs.com --------------------------------------------------------------------- From gideon at csarc.otago.ac.nz Wed Sep 9 21:12:29 1998 From: gideon at csarc.otago.ac.nz (Gideon King) Date: Thu Nov 3 14:41:30 2005 Subject: Obj-C syntax question In-Reply-To: <19980909231809.311bb61b.in@drbs.com> Message-ID: <9809101612.AA2938729@oklina> In theory, the semicolon should not be there. In practise it gets ignored by the compiler/parser. "Charles C. Hocker" wrote: > Hello Everyone, > I have been working through Scott Anguish's excellent > HTMLEdit.app example and I have noticed a some variations in syntax > from the Obj-C book and I was wondering if I have missed something. > From the Document.m file the following was found... > > - (NSString *)windowNibName > { > return @"Document"; > } > > - (void)windowControllerDidLoadNib:(NSWindowController *) aController; > { ^^^^^ > ... > } > > The question that I have is concerning the semicolon (marked above) > at the end of the second declaration. From the "Object-Oriented > Programming and the Objective C Language" book, page 69 states: > > Methods for a class are defined, like C functions, within a > pair of braces. > Before the braces, they're declared in the same manner as in > the interface > file, but without the semicolon. > > I think I have noticed this somewhere else but, I cannot place it at > this time. > > Am I missing something? > > Charles > > --------------------------------------------------------------------- > Charles C. Hocker charles@drbs.com > --------------------------------------------------------------------- > > > ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon From zarnuk at zarnuk.com Wed Sep 9 21:12:53 1998 From: zarnuk at zarnuk.com (Paul S. McCarthy) Date: Thu Nov 3 14:41:30 2005 Subject: Obj-C syntax question Message-ID: <01BDDC4F.C1CAC360@NTNWW002> >Charles C. Hocker wrote: >[...]semicolon at the end of the [function header...] >[...]Am I missing something? You're not missing anything. It's a bug in the compiler. It has been there since the dark ages (NeXTstep 1.0, ca 1986). Usually the compiler just completely ignores the erroneous semicolon. However, I strongly recommend removing them whenever you find them. They are incorrect syntax, and other tools (formatters, auto-documenters, source-code analyzers, etc), are not guaranteed to overlook the error. I also recall at least one iteration of the development environment where this bug either (a) generated no code for these functions (so the super class's method was always getting called instead our method), or (b) generated bad code, or (c) crashed the compiler. ---Paul... From jd at value.net Wed Sep 9 21:27:30 1998 From: jd at value.net (Jean Drolet) Date: Thu Nov 3 14:41:30 2005 Subject: Ambiguity in Objective - C ??? Message-ID: A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 709 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980910/4c01dfdf/attachment.bin From anders at milkweed.com Wed Sep 9 21:40:45 1998 From: anders at milkweed.com (Anders Pytte) Date: Thu Nov 3 14:41:30 2005 Subject: Scaling text? Message-ID: <199809100437.AAA17066@mx01.together.net> Friends, For all the capabilities of the OpenStep text system, there seems to be no obvious way to scale text views. This would obviously be a complex undertaking, involving scaling the sizes of the views, containers and glyphs, but is an expected feature of any modern text layout system. Has anyone successfully undertaken this task, who is willing to share their experience with me? Or has anyone thought about doing this and turned back want to tell me why? Or anyone lacking experience have any thoughts anyway? Thanks, Anders. ---------------------------------------------------------------- Anders Pytte Milkweed Software Ferguson Hill Voice: (802) 472-5142 Cabot VT 05647 Internet: anders@milkweed.com ---------------------------------------------------------------- From rcfa at cubiculum.com Wed Sep 9 22:50:55 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:30 2005 Subject: Ambiguity in Objective - C ??? In-Reply-To: References: Message-ID: <9809100550.AA20225@kannix.cubiculum.com> you wrote: > Consider the following message, > > int a =1, b= 3; > [[myClass newObjectOfMyClass] doSomethingWithArg: > [NSNumber numberWithInt: a + b]]; > > In this message both the receiver and the argument must be evaluated. Which > one is evaluated first? On PPC (__MACH__) it seems that the receiver is > evaluated first, on intel (WIN32), the argument is evaluated first. > > The documentation seems mute on this topic. I would consider the documentation INTENTIONALLY mute on that question. Consider this something that's potentially parallel in execution and that's being optimized by the compiler. Such statements should never have side effects that depend on the sequence of the execution, similarly as you should never have logical OR expressions where you assume a particular order (even though such may be defined in a given language, it's logically an incorrect assumption). Your solution is the way to go if things depend on a sequence. In such a case it's also important to DOCUMENT that sequence matters. Greetings, Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From Philippe.Robert at uptime.ch Thu Sep 10 00:05:54 1998 From: Philippe.Robert at uptime.ch (Philippe C.D. Robert) Date: Thu Nov 3 14:41:30 2005 Subject: Obj-C syntax question In-Reply-To: <19980909231809.311bb61b.in@drbs.com> References: <19980909231809.311bb61b.in@drbs.com> Message-ID: <9809100706.AA22275@california.uptime.ch> You wrote: > The question that I have is concerning the semicolon (marked above) > at the end of the second declaration. From the "Object-Oriented > Programming and the Objective C Language" book, page 69 states: Copy & paste zombie...;-) sweet dreams, Phil -- Philippe C.D. Robert OpenStep/WebObjects/Unix Uptime Object Factory Inc http://www.uptime.ch From Ben.Moseley at wdr.com Thu Sep 10 01:15:49 1998 From: Ben.Moseley at wdr.com (Ben Moseley) Date: Thu Nov 3 14:41:30 2005 Subject: Scaling text? References: <199809100437.AAA17066@mx01.together.net> Message-ID: <9809100815.AA03206@ln4d59iwk> Have you tried it? I'd be a bit surprised if it didn't work at all. I remember trying to rotate an NSTextView back in the 4.0 days - and that nearly worked then ( a few redraw glitches - particularly with selection ). Since it's all being done with matrix transformations I'd have thought scaling ought to be a given.... --Ben From dtm at waterw.com Thu Sep 10 02:17:16 1998 From: dtm at waterw.com (David T. McWherter) Date: Thu Nov 3 14:41:30 2005 Subject: Ambiguity in Objective - C ??? In-Reply-To: <9809100550.AA20225@kannix.cubiculum.com> Message-ID: > > int a =1, b= 3; > > [[myClass newObjectOfMyClass] doSomethingWithArg: > > [NSNumber numberWithInt: a + b]]; > > > > In this message both the receiver and the argument must be evaluated. Which > > one is evaluated first? On PPC (__MACH__) it seems that the receiver is > > evaluated first, on intel (WIN32), the argument is evaluated first. > > > > The documentation seems mute on this topic. > > I would consider the documentation INTENTIONALLY mute on that question. > Consider this something that's potentially parallel in execution and that's > being optimized by the compiler. Such statements should never have > side effects that depend on the sequence of the execution, similarly > as you should never have logical OR expressions where you assume a > particular order (even though such may be defined in a given language, > it's logically an incorrect assumption). Your solution is the way to > go if things depend on a sequence. In such a case it's also important > to DOCUMENT that sequence matters. I'd also like to note that this isn't necessarily anything to get all that concerned about. It happens in C all the time. The evaluation order of expressions within the parameter list of a function call is implementation defined, as well. So if you have function A() and function B() that have side effects, it is possible that f( A(), B() ) could give you different result on different compilers/platforms. It would seem to me that with Objective-C, for which AFAIK there is no true standards committee/documentation (aside from that produced by primarily the compiler implementors), the results of all operations will be somewhat implementation defined... -David -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- David T. McWherter dtm@waterw.com From dyoung at vviuh221.vvi.com Thu Sep 10 04:43:18 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:30 2005 Subject: Scaling text? References: <199809100437.AAA17066@mx01.together.net> Message-ID: <9809101143.AA04710@vviuh221.vvi.com> > there seems to be no obvious way to scale text views Change the view's bounds size relative to its frame size. The larger the bounds size the smaller the text. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From anders at milkweed.com Thu Sep 10 05:33:25 1998 From: anders at milkweed.com (Anders Pytte) Date: Thu Nov 3 14:41:30 2005 Subject: Scaling text? Message-ID: <199809101229.IAA30409@mx01.together.net> Friends, Thanks for the help, all who responded. I just didn't realize it would be so easy! I'll give the following a try and if you don't hear from me again about this, you can assume everything went well. I did not find a single word in the text system documentation about scaling. Never occurred to me to just look in NSView. Anders. Can't you just set the scaling on the view? Everything else should just be automatic. As far as the text machinery is concerned, nothing has changed. NSView defines this method, which should work: scaleUnitSquareToSize: _ (void)scaleUnitSquareToSize:(NSSize)newUnitSize Scales the receiver's coordinate system so that the unit square changes to newUnitSize. For example, a newUnitSize of (0.5, 1.0) causes the receiver's horizontal coordinates to be halved, in turn doubling the width of its bounds rectangle. Note that scaling is performed from the origin of the coordinate system, (0.0, 0.0), not the origin of the bounds rectangle; as a result, both the origin and size of the bounds rectangle are changed. The frame rectangle remains unchanged. This method neither redisplays the receiver nor marks it as needing display. You must do this yourself with display or setNeedsDisplay:. This method posts an NSViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so. Otherwise, try -setBoundsSize:(NSSize)newSize; ---------------------------------------------------------------- Anders Pytte Milkweed Software Ferguson Hill Voice: (802) 472-5142 Cabot VT 05647 Internet: anders@milkweed.com ---------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/19980910/dcff9a84/attachment.html From simon at planon.qc.ca Thu Sep 10 05:45:01 1998 From: simon at planon.qc.ca (Simon Glet) Date: Thu Nov 3 14:41:30 2005 Subject: catching a doubleclick in a table view? In-Reply-To: References: Message-ID: <9809101245.AA00302@planon.qc.ca> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 547 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980910/4ee3a29f/attachment.bin From jd at axiosusa.com Thu Sep 10 07:35:54 1998 From: jd at axiosusa.com (Jean Drolet) Date: Thu Nov 3 14:41:30 2005 Subject: Ambiguity in Objective - C ??? Message-ID: --------------------------------------------------------------------- Bonjour... --------------------------------------------------------------------- Thank you for your comment on Re: Ambiguity in Objective - C ???. It is sound advice. However, while the Objective-C "standard" may have advantage on being mute on the topic, at the very least, the "documentation", to be user friendly, should warn programmers about potential pittfalls regarding this and other behaviors that the standard leaves up to the compiler designers. Otherwise, one has to assume a perfect mastery of the standard on the part of programmers in order to detect and prepare for such pittfalls -- and certainly not all programmers master the standard. Also, this case illustrates a subtlety that is not expected in a language that is renowned for its simplicity. I remain convinced that objective-C is much simpler than C++, but this shook my confidence in Objective-C a bit... But, I still love Objective -C and continue to fear C++! Sincerely, J e a n D r o l e t From dyoung at vviuh221.vvi.com Thu Sep 10 08:23:47 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:30 2005 Subject: Ambiguity in Objective - C ??? References: Message-ID: <9809101523.AA04871@vviuh221.vvi.com> In regards to ambiguity. Every C derived language suffers from the ambiguity. And for good reason. It is a potential optimization strategy. (In addition, there is a linker legacy issue). See "C A Reference Manual" by Sam Harbison and Guy Steele; page 189: "In general, the compiler is free to rearrange the order in which an expression is evaluated with the following restriction. The rearrangement may consist only of evaluating the arguments of a function call, or the two operands of a binary operator, in some particular order other than the obvious left-to-right order. (The compiler is under no compulsion ever to use left-to-right order for such operators.)." Also see "The Annotated C++ Reference Guide" by M Ellis and B Stroustrup; page 50 "The order of evaluation of arguments is undefined; take note that compilers differ." AND ... THE MOST IMPORTANT SENTENCE: "All side effects of argument expressions take effect before the function is entered" > In this message both the receiver and the argument must be evaluated. > Which one is evaluated first? On PPC (__MACH__) it seems that the receiver > is evaluated first, on intel (WIN32), the argument is evaluated first. First of all, it doesn't matter that much as long as you take care of side effects. Also, the order you describe is true to the nature of the call stack on win32 linker and stdcall definition. Jean said: > I still love Objective -C and continue to fear C++! C++ is a nice language and does not suffer from object-oriented frailties of obj-c and Java like ref counting and garbage collection to briefly mention a few. ANSI C, obj-c, and c++ all have their own correct domain of uses (which are somewhat orthogonal) and all are nice languages once they are understood. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From rcfa at cubiculum.com Thu Sep 10 07:57:03 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:30 2005 Subject: Ambiguity in Objective - C ??? In-Reply-To: References: Message-ID: <9809101457.AA21431@kannix.cubiculum.com> > I'd also like to note that this isn't necessarily anything to get > all that concerned about. It happens in C all the time. The > evaluation order of expressions within the parameter list of a function > call is implementation defined, as well. So if you have function > A() and function B() that have side effects, it is possible that > f( A(), B() ) > could give you different result on different compilers/platforms. Actually, given that state of C, the behavior of ObjC is quite logical: [a doSomething: b with: c]; is really only syntactic sugar for something like: objc_mesg_send(a, @selector(doSomething:with:), b, c); i.e. a syntactic cover for a regular C function call. (there is a little more to it, and for interested people: refer to the ObjC runtime system documentation). In other words, if f( A(), B()) has in ANSI C an undefined execution order, then by mere logical conseqence, the order of evaluation in objc messaging statements MUST be undefined as well, since it's an ANSI C superset. Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From wsanchez at apple.com Thu Sep 10 10:52:19 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:30 2005 Subject: Obj-C syntax question Message-ID: <199809101752.KAA04888@scv3.apple.com> | The question that I have is concerning the semicolon (marked above) | at the end of the second declaration. You can get away with it because the gcc compiler is leniant. It's very poor coding practice, though. Don't do it. It would be entirely reasonable, for example, for the MetroWerks compiler to barf on this code. -Fred From brianw at sounds.WA.COM Thu Sep 10 11:01:59 1998 From: brianw at sounds.WA.COM (Brian Willoughby) Date: Thu Nov 3 14:41:30 2005 Subject: General hint - Re: Scaling text? In-Reply-To: <199809101229.IAA30409@mx01.together.net> References: <199809101229.IAA30409@mx01.together.net> Message-ID: <199809101802.LAA26098@sounds.WA.COM> Here is an important lesson for all new Mac OS X developers: [ I did not find a single word in the text system documentation [ about scaling. Never occurred to me to just look in NSView. Whenever attempting to learn about a given class, one should ALWAYS read the documentation on EVERY superclass (and then continue up the chain). Until you've become familiar with most of the classes, you'll never fully understand any one class by studying it in isolation without considering its ancestors. The documentation would become prohibitively large if every class also described its inherited behavior. Besides, you're missing out on a key concept in object oriented programming if you don't see the power of keeping each class as simple as possible, yet building a group of classes into a powerful hierarchy. Brian Willoughby Software Design - NEXTSTEP, OpenStep, Rhapsody Sound Consulting Apple Enterprise Alliance Partner NeXTmail welcome From rcfa at cubiculum.com Thu Sep 10 10:51:33 1998 From: rcfa at cubiculum.com (Ronald C.F. Antony) Date: Thu Nov 3 14:41:30 2005 Subject: Ambiguity in Objective - C ??? In-Reply-To: <9809101523.AA04871@vviuh221.vvi.com> References: <9809101523.AA04871@vviuh221.vvi.com> Message-ID: <9809101751.AA21844@kannix.cubiculum.com> > C++ is a nice language and does not suffer from object-oriented frailties of > obj-c and Java like ref counting and garbage collection to briefly mention a > few. You got to be kidding! The whole reason ObjC has ref counting and Java has GC is because the LACK thereof makes a language frail, not the other way round. > ANSI C, obj-c, and c++ all have their own correct domain of uses (which are > somewhat orthogonal) and all are nice languages once they are understood. I wouldn't know where c++ has a use over ObjC (aside from legacy code, that is). I see a point in keeping certain absolutely performance critical things in plain C, but that's why ObjC is ObjC and not SmallTalk, i.e. a proper superset of ANSI C. Ronald ============================================================================== "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." G.B. Shaw | rcfa@cubiculum.com | NeXT-mail welcome From ims at hyper.gr Thu Sep 10 11:24:58 1998 From: ims at hyper.gr (ims) Date: Thu Nov 3 14:41:30 2005 Subject: questions menu, table view Message-ID: hello again, a couple of questions 1) how can we add/remove procedurelly a menu from menu bar. we want to be able to load a menu from a nib file and add it somewhere in a menubar tex menubar : FILE EDIT TOOLS WINDOWS HELP new menubar : FILE EDIT SPECIAL TOOLS WINDOWS HELP 2) how can we implement drag&drop on rows for NSTableView; Has anybody any ideas; Regards NN Nikou Nikolaos for =============================================================== IMS Research & Development | tel. +30 (31) 94 52 98 PRIAMOY 12 | 95 09 03 544 53 THESSALONIKI | fax. +30 (31) 95 09 04 MACEDONIA - HELLAS | kai tou xpovou stnv polh! =============================================================== From gideon at csarc.otago.ac.nz Thu Sep 10 21:40:43 1998 From: gideon at csarc.otago.ac.nz (Gideon King) Date: Thu Nov 3 14:41:30 2005 Subject: IB Palette problem Message-ID: <9809111640.AA434455@oklina> I am creating a palette which just has a button and a comboBox on it, and I am having trouble getting it to resize properly. My palette view does nothing except hold the two subviews. The button has an autoresizingMask of NSViewMaxXMargin | NSViewMaxYMargin and the combobox has NSViewWidthSizable. I also call [self setAutoresizingMask:NSViewWidthSizable]; in my initWithFrame. When I try to use the object in IB, I can resize my view height to bigger than the button and comboBox (but they remain the same size), and I can make the view wider (and the width of the comboBox increases), but never narrower again. What am I missing? Another question - I am using an image on the button, and I'm not sure how you are "supposed" to get the image. What I do in the initWithFrame is: NSImage *buttonImage = nil; NSBundle *myBundle = [NSBundle bundleForClass:[self class]]; NSString *fileLocation = [myBundle pathForResource:@"WhichRecords" ofType:@"tiff"]; if (fileLocation) { buttonImage = [[NSImage alloc]initByReferencingFile:fileLocation]; } which seems to work. Is this the "right" way to do it? ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon From jjfeiler at diga.serv.net Thu Sep 10 21:58:27 1998 From: jjfeiler at diga.serv.net (John Jay Feiler) Date: Thu Nov 3 14:41:30 2005 Subject: questions menu, table view In-Reply-To: References: Message-ID: <9809110458.AA15729@relief.com> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 698 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980910/35c01865/attachment.bin From contact at finindev.com Thu Sep 10 10:04:16 1998 From: contact at finindev.com (Jean-Michel Cazaux) Date: Thu Nov 3 14:41:30 2005 Subject: Controling TextField length without code : A solution... Message-ID: <01BDDCED.CF72F7A0@JEAN-MICHEL> Hi folks, a few weeks ago we discussed about controlling the length of textfield associated to eo objects and more specificaly about preventing the user to overpass the maximum length. As we get a little bit time to search this subject, we found a way to do this. As our knowledge of the kit and of EOF is not as deep as the one's oh most of the guys on this list, but this is A solution and it seems to work, even if it's not the "cleverest" way to do. The key point is to be able to prevent a field to be modified (if this modification is not suitable..). In the EOF/EOAssociation context, the EOControlAssociation is the delegate of the control. We thought to make a category for EOControlAssociation that would handle a TextField delegate method. Unfortunately, it seems there is no delgate method to prevent the control to be modified. After strong use of debugger, we discover that, when the field is edited, it's the delegate of its textView, and the textView sends an appropriate methods to its delegate : - (BOOL)textView:(NSTextView *)aTextView shouldChangeTextInRange:(NSRange)affectedCharRange replacementString:(NSString *)replacementString The second point, wich was easier for us was to get the length of the field defined in the EOModel. At this point, we had to get the entity, that contains the attribute... Getting the entity was easy for textFields associated with EODatabaseDatasource, but we had to add a category on EODetailDatasource. So, after this (perhaps too long and mat be confused) explanation, here is the code for the both categories. @implementation EODetailDataSource (FiDataSourceEntity) - (EOEntity *)entity; // returns the eoEntity for the datasource { EOEntity *masterEntity=nil; if ([[self masterDataSource] isKindOfClass:[EODatabaseDataSource class]]) masterEntity = [(EODatabaseDataSource*)[self masterDataSource] entity]; else if ([[self masterDataSource] isKindOfClass:[EODetailDataSource class]]) masterEntity = [(EODetailDataSource*)[self masterDataSource] entity]; if (masterEntity) // The entity is the destination entity for the relationship 'detailKey' of the master entity - OK ???? return [[masterEntity relationshipNamed:[self detailKey]] destinationEntity]; else return nil; } @end @implementation NSTextField (FiEOFieldLengthControl) -(BOOL)textView:(NSTextView*)aTV shouldChangeTextInRange:(NSRange)aRange replacementString:(NSString*)aString { EODisplayGroup *dispGrp; // DisplayGroup of the association. NSString *key; // Key of the association in the display group EOAttribute *attribute=nil; // Attribute (in the entity) for the association EOControlAssociation *contAss; // The control of the length is only performed for field with an EOControlAssociation, in this case, the association is the delegate the textField if ([[self delegate] isKindOfClass:[EOControlAssociation class]]) { // We get the key for the association in the displayGroup. contAss = [self delegate]; dispGrp = [contAss displayGroupForAspect:@"value"]; key = [contAss displayGroupKeyForAspect:@"value"]; // We get the corresponding EOAttribute regarding if the displayGroup is a "master" display group, or a "detail" displayGroup... if ([[dispGrp dataSource] isKindOfClass:[EODatabaseDataSource class]]) attribute = [[(EODatabaseDataSource*)[dispGrp dataSource] entity] attributeNamed:key]; else if ([[dispGrp dataSource] isKindOfClass:[EODetailDataSource class]]) { if ([(EODetailDataSource*)[dispGrp dataSource] entity]) attribute = [[(EODetailDataSource*)[dispGrp dataSource] entity] attributeNamed:key]; else return YES; // No entity associated with EODetailDataSource (?)... } // The length checking is only performed if the attribute is an NSString if ([[attribute valueClassName] isEqualToString:@"NSString"]) { // If the length of the modified stringValue is bigger than the max authorized length, we beep and cancel the modification... if (([[self stringValue] length] + [aString length] - aRange.length)> [attribute width]) { NSBeep (); return NO; } } } // In other cases, we do nothing... return YES; } @end /*-----------------------------------------------------------------------------------------------------------------------------------------*/ I'll be glad if someone had comments about this, but I'll really be happy if someone had other improvement of this kind for numbers or dates... Feel free to comment, use, distribute or modify this code. I you make improvements, please send them back to the list and to us. Regards. PS : *** This code is provided as-is, and with no warranty of any kind *** PSS : Sorry for my english, I hope everybody interested will understand. __________________________________________________________________________________________ Jean-Michel CAZAUX FININDEV, Conseil en Finances pour les Collectivit?s Locales. 204 Rue Michel Teule - ZAC d'Alco 34080 Montpellier - FRANCE. T?l. +33 (0)4 67 63 66 25 - Fax +33 (0)4 67 63 35 45 e-mail contact@finindev.com From contact at finindev.com Fri Sep 11 02:25:42 1998 From: contact at finindev.com (Jean-Michel Cazaux) Date: Thu Nov 3 14:41:30 2005 Subject: How to change TextView class of an NSScrollView ??? Message-ID: <01BDDD76.EC0A0140@JEAN-MICHEL> Hello again, I built a subclass of NSTextView that I would like to put in our own palette. I put a scrollView in the palette and put ny textView as documentView of the scrollView (with a setDocumentView oin the finishInstantiate method of the palette). All seems to work, I can load the palette, put my TextView in a nib file. But when I save and re-open the document, the document view of the scroll view is NSTextView ???? the scrollView not seems to be able to retain the class of its document view... I think I missed something, but what... Thanks in advance. __________________________________________________________________________________________ Jean-Michel CAZAUX FININDEV, Conseil en Finances pour les Collectivit?s Locales. 204 Rue Michel Teule - ZAC d'Alco 34080 Montpellier - FRANCE. T?l. +33 (0)4 67 63 66 25 - Fax +33 (0)4 67 63 35 45 e-mail contact@finindev.com From peter at oops.se Fri Sep 11 05:30:54 1998 From: peter at oops.se (Peter Lindberg) Date: Thu Nov 3 14:41:30 2005 Subject: Split personality NSString Message-ID: <98Sep11.153338gmt+0100.28689-1@mimer.upnet.se> Hello. Strange things do occur. I have a framework, where one of the headers contains the following declaration: OBJC_EXPORT NSString *USBrowserRootNeededNotification; And it's .m file defines the string as: NSString *USBrowserRootNeededNotification = @"USBrowserRootNeededNotification"; The application that uses the framework works fine when running on DR2/Intel, but when I compile and run on Yellow/NT, the following happens: The string contains @"NXConstantString" when printed using NSLog() from "within the framework", but from "within the app" the result is @"USBrowserRootNeededNotification". Any ideas? Peter. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 700 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980911/c75ed1bd/attachment.bin From contact at finindev.com Fri Sep 11 05:53:05 1998 From: contact at finindev.com (Jean-Michel Cazaux) Date: Thu Nov 3 14:41:30 2005 Subject: Programaticaly applying NSParagraphStyle to NSTextView. Message-ID: <01BDDD93.E2CD5380@JEAN-MICHEL> Helo again-again, is there a simple way (or even a way) to apply a NSParagraphStyle to a TextView by code (specialy tabstops and indentation) ? I can't find a link in the doc betwwen the text system stuff and NSParagraphStyle. I don't think it only designed for fun. Thanks in advance. __________________________________________________________________________________________ Jean-Michel CAZAUX FININDEV, Conseil en Finances pour les Collectivit?s Locales. 204 Rue Michel Teule - ZAC d'Alco 34080 Montpellier - FRANCE. T?l. +33 (0)4 67 63 66 25 - Fax +33 (0)4 67 63 35 45 e-mail contact@finindev.com From edream at mailbag.com Fri Sep 11 09:16:11 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:30 2005 Subject: how does one use version numbers ? Message-ID: Hi all, How does one use version numbers while archiving and dearchiving? I haven't run across any examples of this, though I might have missed something... NSObject contains the + version and + setVersion class methods, and NSCoder contains the - versionForClassName method. My best guess is to use these methods as follows: 1. Define versionForClassName as follows: - (int) versionForClassName: (NSString *className) { if ( className isEqual: @"X" ) return latestClassXVersion ; else if ( className isEqual: @"Y" ) return latestClassYVersion ; ... (one if clause for every class with multiple versions) } (This is a method of the abstract NSCoder class. Do I need to subclass NSArchiver to define this method? Will a Category on NSArchiver do? ) I'm thinking that this method must be used during archiving; I have no idea how to define this method if it is used during unarchiving. 2. Before archiving, call [ aClass setVersion: latestClassVersion ] for each archived class. Isn't this redundant? Why have both - versionForClassName and + version ? 3. When unarchiving, that is, in initWithCoder: for class with multiple versions do something like: - (id) initWithCoder : coder { self = [ [ super init ] retain ] ; switch ( [ [ self class ] version ] ) { case 1 : <<< decode all archived ivars in version 1 >>> break ; case 2 : <<< decode all archived ivars in version 2 >>> break ; ... } return self ; } I'm not sure this will work: will [ [ self class ] version ] return the proper version? Again, this is my best guess, but you can see my confusions... Am I correct that the NSPortCoder class need not be used? Any comments, corrections or examples? Edward From embuck at palmer.cca.rockwell.com Fri Sep 11 09:41:49 1998 From: embuck at palmer.cca.rockwell.com (Erik M. Buck) Date: Thu Nov 3 14:41:30 2005 Subject: how does one use version numbers ? References: Message-ID: <9809111641.AA07414@palmer.cca.rockwell.com> >I'm not sure this will work: will [ [ self class ] version ] return the >proper version? This will NOT work because a subclass that calls your -initWithCoder: will have a [self class] == the subclass and not the class you want. There are lots of examples of versioning in the provided example code. (there used to be at least) Here is another example: /***** * Class initialization * *****/ + initialize { // set current version [GBOp setVersion:2]; // DO NOT CALL [self class]! Used the class name } /***** * Encoding * *****/ - initWithCoder:(NSCoder *) aCoder { self = [super initWithCoder:aCoder]; if ([aCoder versionForClassName:@ "GBOp"] >= 1) { if ([aCoder versionForClassName:@ "GBOp"] >= 2) { // decode version 2 here } else { // decode version 1 here } } else { // decode version 0 here } return self; } - (void)encodeWithCoder:(NSCoder *) aCoder { [super encodeWithCoder:aCoder]; // encode current version here } -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1061 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980911/46eb8735/attachment.bin From erik at object-factory.com Sat Sep 12 08:00:54 1998 From: erik at object-factory.com (Erik Doernenburg) Date: Thu Nov 3 14:41:30 2005 Subject: how does one use version numbers ? Message-ID: <199809121500.RAA01169@chocobo.object-factory.com> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1376 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980912/1510df75/attachment.bin From edream at mailbag.com Sat Sep 12 08:58:05 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:30 2005 Subject: how does one use version numbers ? Message-ID: Once again, thanks to those sending such clear and informative replies. It would seem prudent to define a very simple file header class, whose main purpose is to provide a "formal" root for archived information. With such a class in place, it becomes trivial to add any kind of information to a file; just add the new information to the file header and rev the header's version number. Thanks to all of you, I now have a working app, namely LEO, the literate outliner previously mentioned in this list. See the url in my signature for more details. Cheers, Edward ---------------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) LEO: http://www.mailbag.com/users/edream/front.html Sherlock: http://www.mailbag.com/users/edream/sl_index.html Apple Computer, right down there with Mercedes Benz. ---------------------------------------------------------- From ahoesch at smartsoft.de Sat Sep 12 11:02:54 1998 From: ahoesch at smartsoft.de (Andreas Hoeschler) Date: Thu Nov 3 14:41:30 2005 Subject: [NSFont positionOfGlyph::] works only once! Message-ID: <9809121802.AA00991@smartsoft.de> Hi, I need to know the exact position of an accent glyph over a specific character (glyph) in an attributed string. My current approach is to use NSFont's positionOfGlyph: method. But this method works only once (first call after application start). All following invocations return a different (wrong) value. glyph = [[self class] glyphForAttributedString:[textAttributedString attributedSubstringFromRange:NSMakeRange(index,1)] font:&font]; glyphRect = [font boundingRectForGlyph:glyph]; NSLog(@"glyphRect %@", NSStringFromRect(glyphRect)); tildeGlyph = [[self class] glyphForAttributedString:[[[NSAttributedString alloc] initWithString:[NSString stringWithCharacter:0x007E] attributes:[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]] autorelease] font:&tildeFont]; NSLog(@"tildeGlyph %d", tildeGlyph); tildeRect = [tildeFont boundingRectForGlyph:tildeGlyph]; NSLog(@"tildeRect %@", NSStringFromRect(tildeRect)); tildeShift = [font positionOfGlyph:tildeGlyph forCharacter:0x007E struckOverRect:glyphRect]; NSLog(@"tildeShift %@", NSStringFromPoint(tildeShift)); tildeShift = [font positionOfGlyph:tildeGlyph forCharacter:0x007E struckOverRect:glyphRect]; NSLog(@"tildeShift %@", NSStringFromPoint(tildeShift)); Can anybody explain the following output? What is positionOfGlyph: doing? [5694] glyphRect {x = 0.752; y = -3.264; width = 8.192; height = 10.32} [5694] tildeGlyph 126 [5694] tildeRect {x = 3.216; y = 8.192; width = 7.84; height = 3.311999} [5694] tildeShift {x = -2.288; y = 0.241779} <-- This y-value is correct! [5694] tildeShift {x = -2.288; y = -14.768} <-- Why is this y-value different? The first time (after application start) it evaluates the correct value. All following invocations produces rubbish (or at least values I do not understand). I am currently working with and encountered this problem on OPENSTEP 4.2 Mach, so this problem may already have been solved in Rhapsody. However, any comments would be greatly appreciated. Thank you very much! Andreas Hoeschler -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2110 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980912/281763b2/attachment.bin From alviani at ix.netcom.com Sat Sep 12 16:22:52 1998 From: alviani at ix.netcom.com (Frank Alviani) Date: Thu Nov 3 14:41:30 2005 Subject: Enigmatic Error Message from GDB! Message-ID: <199809122320.SAA00988@dfw-ix8.ix.netcom.com> Hello All, I am working on a logging alert panel as a learning exercise, and as part of my project at home. I have declared the following method: - (void) showError: (NSString *)msg inContext:(NSString *)context This is 1st called during the NSApplicationDidFinishLaunching processing to simplify testing it. I am calling it as follows: [errPanel showError:@"Welcome" inContext:@"Initial testing"]; However, when I get to the point of stepping into this method call, I get the following from GDB: "Did you forget to nest [NSString allocWithZone:NULL] and init? *** -length only defined for abstract class. Define -[NSPlaceHolderString length]!" At this point, GDB is waiting for input, and there's no stack display. Huh? Any insights occur to you experienced YB programmers? (Using explicitly initialized variables yields the same results, by the way) [Also - when GDB reaches a breakpoint or a complaint like this, there is some number following the program name in the line prefix - i.e. ...AMP(1102)... What does the number mean, and how can I use it to get back to meaningful source?] Thanks in advance, Frank Alviani From jperry at wizvax.net Sat Sep 12 21:34:10 1998 From: jperry at wizvax.net (j perry) Date: Thu Nov 3 14:41:30 2005 Subject: [NSFont positionOfGlyph::] works only once! Message-ID: Andreas, I don't really know the answer to your question, but I do note that the rects might look like this: y values -------- 11.504 ----------------- --- | | | | | | 8.192 ----------------- | | 7.056 ----------------- | | | | | | | | | |-- 14.768 | | | | | | | | | | | | | | | 0 - - - - - - - - - - - - - - | | | | | | | -3.264 ----------------- --- which could at least explain where that second y value comes from. Hope this helps, Jeff From mike at lorax.com Sun Sep 13 10:40:36 1998 From: mike at lorax.com (Mike Ferris) Date: Thu Nov 3 14:41:30 2005 Subject: Extending NSParagraphStyle References: <01bdd86c$e152a7c0$5e2b10d0@default> Message-ID: <35FC0394.68C45BE1@lorax.com> I don't know all the gory details here, but I do know that posing as a superclass when your class has extra ivars will break subclassers of the original class. There are several tricks that can allow you to "add ivars" to a class without really adding ivars. Side tables are one. Also, on the original topic, I would recommend, in most cases, that you just define new paragraph level attributes on the attributed string and either subclass NSTextStorage or watch the did process editing notifications to "fix" them like paragraph styles are fixed. This is not hard (although it probably is a couple dozen lines of code), and it is much cleaner than posing. Another possibility (a second choice in most situations in my opinion) would be to subclass NSParagraphStyle and NSTextStorage and override NSTextStorage's fixParagraphStyle... to ensure your subclass is used uniformly thoroughout the NSTextStorage. See TextExtras for an example of implementing did process editing type code. TextExtras can be found at http://www.codefab.com/users/mferris. (Please don't jump all over me for the following opinion.) Posing should be avoided. If there's absolutely no other way, then fine, do it and suffer the consequences. But if there's another way, it is almost always to be preferred. Posing has subtle effects that can come back to bite you if you don't know exactly what you're doing, and it can create very confusing situations for people writing subclasses of the original class. Mike Ferris From alviani at ix.netcom.com Sun Sep 13 11:03:56 1998 From: alviani at ix.netcom.com (Frank Alviani) Date: Thu Nov 3 14:41:30 2005 Subject: Enigmatic Error Message from GDB! Message-ID: <199809131802.NAA08298@dfw-ix11.ix.netcom.com> Steve, Thanks for the reply. I tried your suggestion, but ultimately it turned out I was using appendStringWithFormat: when I meant to use initStringWithFormat: !! Duh!! Now that that's cleared up, I can go on to bigger and better mysteries... Thanks again, Frank Alviani From mike at mx1.winterlink.net Sun Sep 13 11:16:34 1998 From: mike at mx1.winterlink.net (Mike Ferris) Date: Thu Nov 3 14:41:30 2005 Subject: Scaling text? Message-ID: <199809131815.LAA10686@mx1.winterlink.net> The reason the text documentation doesn't really mention scaling is that there's nothing to say beyond the standard NSView scaling capability. NSView's generally, allow abitrary 3x2 transformation matrices. Now, some views handle this sort of thing better than others. The text system handles scaling reasonably well (with some selection display glitches sometimes (sigh)). Rotation is handled less well (mostly in the form of even worse selection display glitches). See TextEdit for an example of how to allow scaling of a text view. This example is good because it shows how to add a scale popup to a scroll view. One thing to note is that the code actually scales the clip view of the scroll view, not the text view itself. This is so that it doesn't affect printing. Mike Ferris From mike at mx1.winterlink.net Sun Sep 13 11:21:06 1998 From: mike at mx1.winterlink.net (Mike Ferris) Date: Thu Nov 3 14:41:30 2005 Subject: questions menu, table view Message-ID: <199809131819.LAA10703@mx1.winterlink.net> One IB option for the menus (although not a perfect one), is to define your "extra" menus as part of your main menu and just remove them and hold on to them until they're needed in your startup code. Adding and removing menus from a menu hierarchy is simple enough. As for the table view question... Implementing dragging of rows will be a non-trivial exercise. If you do it, try to do it in a way that is generixc in case you wever need to do it again. You'll either want to have a special column (with an icon maybe) that people have to start the drag from, or you'll have to subclass NSTableView and override mouseDown:. Getting it to look attractive and give good feedback about what's going on will be the hardest part, I'm sure. Mike Ferris From sramp at tin.it Sun Sep 13 16:36:08 1998 From: sramp at tin.it (Stefano Rampazzo) Date: Thu Nov 3 14:41:30 2005 Subject: PSDoUserPath Message-ID: Hello, please, anybody could kindly explain me why the following code generates an error : { float coords[6]; unsigned char ops[4] = {dps_moveto, dps_lineto,dps_lineto, dps_closepath}; short bbox[4] = {0, 0, 200, 200}; coords[0]=0.0; coords[1]=0.0; coords[2]=200.0; coords[3]=10.0; coords[4]=100.0; coords[5]=200.0; PSsetlinewidth(1.0); PSsetgray(NSBlack); PSDoUserPath(coords, 6, dps_float, ops, 4, bbox, dps_ustroke); } DPS Error: %%[ Error: rangecheck; OffendingCommand: ustroke ]%% while if I declare coords as short it works fine ? { short coords[6] ... PSDoUserPath(coords, 6, dps_short, ops, 4, bbox, dps_ustroke); ... } Thanks in advance. Stefano From Malcolm_Crawford at plsys.co.uk Sun Sep 13 16:00:38 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:30 2005 Subject: PSDoUserPath In-Reply-To: References: Message-ID: <199809132300.AAA00282@jasmine.plsys.co.uk> Stefano wrote: > please, anybody could kindly explain me why the following code generates an > error : > > { > float coords[6]; > unsigned char ops[4] = {dps_moveto, dps_lineto,dps_lineto, dps_closepath}; > short bbox[4] = {0, 0, 200, 200}; > > coords[0]=0.0; > ... > coords[5]=200.0; > > PSsetlinewidth(1.0); > PSsetgray(NSBlack); > PSDoUserPath(coords, 6, dps_float, ops, 4, bbox, dps_ustroke); > } > > DPS Error: %%[ Error: rangecheck; OffendingCommand: ustroke ]%% > > while if I declare coords as short it works fine ? > { > short coords[6] > ... > PSDoUserPath(coords, 6, dps_short, ops, 4, bbox, dps_ustroke); > ... > } > My guess would be because using floats the line you draw falls just fractionally outside the bounding box you define -- you could test this (sorry for not taking the time to do so myself) by defining: short bbox[4] = {-1, -1, 201, 201}; Note also that strictly the ops are chars: char ops[4] = {dps_moveto, dps_lineto,dps_lineto, dps_closepath}; Best wishes, mmalc. From dyoung at vviuh221.vvi.com Sun Sep 13 16:14:33 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:30 2005 Subject: PSDoUserPath References: Message-ID: <9809132314.AA07324@vviuh221.vvi.com> Stefano, > short bbox[4] = {0, 0, 200, 200}; make bbox type float * !!! Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From Malcolm_Crawford at plsys.co.uk Sun Sep 13 16:29:41 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:30 2005 Subject: PSDoUserPath In-Reply-To: <9809132314.AA07324@vviuh221.vvi.com> References: <9809132314.AA07324@vviuh221.vvi.com> Message-ID: <199809132329.AAA00295@jasmine.plsys.co.uk> I wrote: [...] David wrote: > make bbox type float * !!! Hmm, wood, trees, time to get some sleep... Best wishes, mmalc. From kcd at jumpgate.com Sun Sep 13 22:14:18 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809132329.AAA00295@jasmine.plsys.co.uk> References: <199809132329.AAA00295@jasmine.plsys.co.uk> Message-ID: <199809140514.WAA19648@babylon5.jumpgate.com> Is there a way to safely pass a pointer value between threads via DO unchanged? I'm trying to share some data between two threads and was bitten by the fact that passing a pointer to the shared struct was causing the structure to be copied, which was resulting in much unhappiness until I figured out what was going on. My current solution is to just cast the pointer to an unsigned long so that I can pass it to my second thread, but this doesn't seem very elegant. I thought about passing an NSValue object (created using the +valueWithPointer: method), but that causes a runtime error that says it can't encode a void *. Is there some other solution for this? It might be useful if 'byref' worked for generic pointer types as well, and would only be allowed by DO when sending a message to another thread in the same task. -Ken From tjw at omnigroup.com Sun Sep 13 23:15:10 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809140514.WAA19648@babylon5.jumpgate.com> References: <199809140514.WAA19648@babylon5.jumpgate.com> Message-ID: <199809140615.XAA01834@ignem.omnigroup.com> I'm assuming that since you don't want to copy the data that the source thread is done goofing with the data... If this is the case, there are plenty of options: - Create a wrapper object that is in charge of holding onto the memory for your structure. At the bare minimum it could have -init (allocates the struct), -dealloc (deallocates the struct and calls super) and -gimmeThePointer (duh). Pass this through DO. I think the default mode is 'byref', so you shouldn't have to worry about implementing NSCoding. - Manage the memory for the struct using NSData. If the block of memory is 'big' NSData will copy it using the Mach VM primitives rather than doing a byte-by-byte copy. I think 'big' is defined to be more than have a vm page (ie, 4k or bigger). - If you have a pretty simple app that doesn't need to have multiple writers and multiple readers, put the pointer in a global and then send a message w/o any args through DO. Out of all these, I'd probably choose #1. Even if you aren't really in charge of allocating the data (it might be a framebuffer, for example), you can add a -initWithSomePointer: method. -tim Begin forwarded message: Date: Sun, 13 Sep 1998 22:18:20 -0700 (PDT) Reply-To: kcd@jumpgate.com From: "Kenneth C. Dyke" To: Multiple recipients of list Subject: DO vs. shared data between threads X-Nextstep-Mailer: Mail 4.2mach (Enhance 2.0b6) Is there a way to safely pass a pointer value between threads via DO unchanged? I'm trying to share some data between two threads and was bitten by the fact that passing a pointer to the shared struct was causing the structure to be copied, which was resulting in much unhappiness until I figured out what was going on. My current solution is to just cast the pointer to an unsigned long so that I can pass it to my second thread, but this doesn't seem very elegant. I thought about passing an NSValue object (created using the +valueWithPointer: method), but that causes a runtime error that says it can't encode a void *. Is there some other solution for this? It might be useful if 'byref' worked for generic pointer types as well, and would only be allowed by DO when sending a message to another thread in the same task. -Ken From kcd at jumpgate.com Sun Sep 13 23:19:49 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809140615.XAA01834@ignem.omnigroup.com> References: <199809140514.WAA19648@babylon5.jumpgate.com> <199809140615.XAA01834@ignem.omnigroup.com> Message-ID: <199809140619.XAA19716@babylon5.jumpgate.com> "Timothy J. Wood" wrote: > I'm assuming that since you don't want to copy the data that the source > thread is done goofing with the data... If this is the case, there are plenty > of options: > > - Create a wrapper object that is in charge of holding onto the memory for > your structure. At the bare minimum it could have -init (allocates the > struct), -dealloc (deallocates the struct and calls super) and > -gimmeThePointer (duh). Pass this through DO. I think the default mode is > 'byref', so you shouldn't have to worry about implementing NSCoding. Won't this have the exact same problem since DO will munge the return value of -gimmeThePointer and try to copy the struct again? > - Manage the memory for the struct using NSData. If the block of memory is > 'big' NSData will copy it using the Mach VM primitives rather than doing a > byte-by-byte copy. I think 'big' is defined to be more than have a vm page > (ie, 4k or bigger). This seems like a bit of overkill. ;) > - If you have a pretty simple app that doesn't need to have multiple writers > and multiple readers, put the pointer in a global and then send a message w/o > any args through DO. Yeah, that'd work too, but there's a chance I might have more than one of these other threads around. FWIW, I'm just screwing around with async I/O and writing a simplistic file streamer thingy, primarily just for testing out I/O performance stuff. -Ken From tjw at omnigroup.com Mon Sep 14 01:19:29 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809140619.XAA19716@babylon5.jumpgate.com> References: <199809140514.WAA19648@babylon5.jumpgate.com> <199809140615.XAA01834@ignem.omnigroup.com> <199809140619.XAA19716@babylon5.jumpgate.com> Message-ID: <199809140819.BAA19937@ignem.omnigroup.com> >From: "Kenneth C. Dyke" >"Timothy J. Wood" wrote: >> - Create a wrapper object that is in charge of holding onto the memory for >> your structure. At the bare minimum it could have -init (allocates the >> struct), -dealloc (deallocates the struct and calls super) and >> -gimmeThePointer (duh). Pass this through DO. I think the default mode is >> 'byref', so you shouldn't have to worry about implementing NSCoding. > >Won't this have the exact same problem since DO will munge the return value >of -gimmeThePointer and try to copy the struct again? Er, duh. Yeah. What you'd *really* want to do is send the wrapper object bycopy. You'd then implement NSCoding to just encode the pointer (rather than encoding the entire struct). You might have to implement -replacementObjectForPortCoder: to avoid having a proxy sent instead of a copy of your object, but this depends upon whether bycopy or byref is the default. Now that I think about this more, I really don't recall which it is. Just give it a try and if you end up getting a proxy in the other thread (ie, your -encodeWithCoder: and initWithCoder: never get called), then you might want to look at -replacementObjectForPortCoder: to smack the proxy out of the way. Sorry about my poor explanation in the previous message. -tim From andrew at stone.com Mon Sep 14 06:22:55 1998 From: andrew at stone.com (Andrew Stone) Date: Thu Nov 3 14:41:30 2005 Subject: questions menu, table view Message-ID: <199809141323.HAA12702@floyd.stone.com> > As for the table view question... > Implementing dragging of rows will be a non-trivial exercise. If > you do it, try to do it in a way that is generixc in case you wever > need to do it again. To save everyone else the headaches we had getting this right, here's a reorderable tableview. I usually use an NSImageCell as the dataCell of the column with the icon for dragging, and let all the other columns just be "normal" columns. Scott Anguish and Kris Jensen helped me get the look and feel right... Also, it's not currently persistent - you'd override initWithCoder and encodeWithCoder to handle the extra ivars for that. ******* SDMovingRowsProtocol.h ******** /* SDMovingRowsProtocol.h created by andrew on Thu 26-Mar-1998 */ @class SDTableView; @protocol SDMovingRowsProtocol // Which key modifiers enable reordering? OR them together // exp: return (NSCommandKeyMask|NSAlternateKeyMask); // if you want the default behaviour to alas drag cells // pass this pack for #define DRAG_ALWAYS 0 - (unsigned int)dragReorderingMask:(int)forColumn; // Delegate called after the reordering of cells, you must reorder your data. // Returning YES will cause the table to be reloaded. - (BOOL)tableView:(NSTableView *)tv didDepositRow:(int)rowToMove at:(int)newPosition; // This gives you a chance to decline to drop particular rows on other particular // row. Return YES if you don't care - (BOOL) tableView:(SDTableView *)tableView draggingRow:(int)draggedRow overRow:(int) targetRow; // This is optional: the delegate can decide whether it wants to allow a // particular row to be moved //- (BOOL) tableView:(SDTableView *)tableView rowWillMove:(int)draggedRow; // This is optional: the delegate can return an image representing a row //- (NSImage *)tableView:(SDTableView *)tableView imageForRow:(int)aRow; // This is optional: the delegate can refuse to drop a row over another row // - (BOOL) tableView:(SDTableView *)tableView willDepositRow:(int) rowToMove at:(int) newPosition; @end ********* SDTableView.h ********* #import @interface SDTableView : NSTableView { BOOL needsControlKey; // YES if the user needs to hold the control key // to instigate dragging BOOL constrainedMove; // YES if the user wants to constrain the row to // the view int draggedRow; NSImage *rowCache; NSImage *tableCache; } - (BOOL)startRow:(int)start endedAt:(int)end; - (void)setConstrainedMove:(BOOL)flag; - (void)setNeedsControlKey:(BOOL)flag; @end @interface NSObject(SDTableViewDelegate) - (BOOL) tableView:(SDTableView *)tableView rowWillMove:(int)draggedRow; - (NSImage *)tableView:(SDTableView *)tableView imageForRow:(int)aRow; - (BOOL) tableView:(SDTableView *)tableView willDepositRow:(int) rowToMove at:(int) newPosition; @end ************ SDTableView.m ************ #import "SDTableView.h" #import "SDMovingRowsProtocol.h" @interface SDTableView(Private) - (NSImage *)imageForRow:(int)aRow; - (void)drawTableCache:(NSRect)rowRect; - (void)drawRowCache:(NSRect)rowRect; - sizeCacheWindow:cacheImage to:(NSSize)windowSize; - (void)grabTableBits; @end static NSString *PrivateDragPboard = @"SDTableViewPrivatePBoardType"; extern NSEvent *periodicEventWithLocationSetToPoint(NSEvent *oldEvent, NSPoint point) { return [NSEvent otherEventWithType:[oldEvent type] location:point modifierFlags:[oldEvent modifierFlags] timestamp:[oldEvent timestamp] windowNumber:[oldEvent windowNumber] context:[oldEvent context] subtype:[oldEvent subtype] data1:[oldEvent data1] data2:[oldEvent data2]]; } @implementation SDTableView - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent {return YES;} - (id)initWithFrame:(NSRect)fr { [super initWithFrame:fr]; [self registerForDraggedTypes:[NSArray arrayWithObject:PrivateDragPboard]]; return self; } - (id) initWithCoder:(NSCoder *)aCoder { [super initWithCoder:aCoder]; [self registerForDraggedTypes:[NSArray arrayWithObject:PrivateDragPboard]]; return self; } - (void)copy:sender { [[self delegate]copy:self]; } - (void)cut:sender { [[self delegate]cut:self]; } - (void)paste:sender { [[self delegate]paste:self]; } - (BOOL)startRow:(int)start endedAt:(int)end { if (end == -1) return NO; if (end == start) return NO; if ([[self delegate] respondsToSelector:@selector(tableView:willDepositRow:at:)] && ![[self delegate] tableView:self willDepositRow:start at:end]) return NO; // okay to change if ([[self delegate] tableView:self didDepositRow:start at:end]) { [self reloadData]; [self selectRow:end byExtendingSelection:NO]; return YES; } return NO; } #define MOVE_MASK NSLeftMouseUpMask|NSLeftMouseDraggedMask - (BOOL)constrainedMove:(NSEvent *)theEvent { NSPoint mouseDownLocation, mouseUpLocation, mouseLocation; int newRow; NSRect visibleRect, rowRect; NSImage *image = nil; NSWindow *wind = [self window]; float dy, dx; NSEvent *peek,*event; BOOL scrolled = NO; BOOL inTimerLoop = NO; // find the cell that got clicked on and select it mouseDownLocation = [theEvent locationInWindow]; mouseDownLocation = [self convertPoint:mouseDownLocation fromView:nil]; draggedRow = [self rowAtPoint:mouseDownLocation]; // this forces text editing to end [wind makeFirstResponder:wind]; [self selectRow:draggedRow byExtendingSelection:NO]; // this makes sure we get the whole row into the image [self scrollRowToVisible:draggedRow]; // this makes sure the display is up to date [self display]; // copy what's currently visible into the table cache tableCache = [self sizeCacheWindow:tableCache to:[self visibleRect].size]; [self grabTableBits]; // get the image of the table row // first, give the delegate a chance to supply an image if ([[self delegate] respondsToSelector:@selector(tableView:imageForRow:)]) image = [[self delegate] tableView:self imageForRow:draggedRow]; // otherwise, get our own image (the image of the whole row) if (!image) image = [self imageForRow:draggedRow]; rowCache = image; rowRect = [self rectOfRow:draggedRow]; // save the mouse's location relative to the cell's origin */ dy = mouseDownLocation.y - rowRect.origin.y; dx = mouseDownLocation.x - rowRect.origin.x; // we're now interested in mouse dragged events [wind setAcceptsMouseMovedEvents:YES]; // from now on we'll be drawing into ourself // [[NSApp handCursor] push]; [self lockFocus]; event = theEvent; // START LOOP while ([event type] != NSLeftMouseUp) { // erase the active cell using the image in the matrix cache visibleRect = [self visibleRect]; [self drawTableCache:rowRect]; // move the active row mouseLocation = [event locationInWindow]; mouseLocation = [self convertPoint:mouseLocation fromView:nil]; rowRect.origin.y = mouseLocation.y - dy; rowRect.origin.x = mouseLocation.x - dx; // constrain the row's location to our bounds if (NSMinY(rowRect) < NSMinX([self bounds]) ) { rowRect.origin.y = NSMinX([self bounds]); } else if (NSMaxY(rowRect) > NSMaxY([self bounds])) { rowRect.origin.y = NSHeight([self bounds]) - NSHeight(rowRect); } if (NSMinX(rowRect) < NSMinY([self bounds]) ) { rowRect.origin.x = NSMinY([self bounds]); } else if (NSMaxX(rowRect) > NSMaxX([self bounds])) { rowRect.origin.x = NSWidth([self bounds]) - NSWidth(rowRect); } // make sure the cell will be entirely visible in its new location (if // we're in a scrollView, it may not be) if (!NSContainsRect(visibleRect , rowRect)) { // the cell won't be entirely visible, so scroll, dood, scroll, but // don't display on-screen yet [[self window] disableFlushWindow]; [self scrollRectToVisible:rowRect]; [[self window] enableFlushWindow]; // copy the new image to the matrix cache [self grabTableBits]; // note that we scrolled and start generating timer events for // autoscrolling scrolled = YES; if(!inTimerLoop){ [NSEvent startPeriodicEventsAfterDelay:0.1 withPeriod:0.1]; inTimerLoop = YES; } } else { // don't need to scroll if(inTimerLoop){ [NSEvent stopPeriodicEvents]; inTimerLoop = NO; } } // composite the active cell's image on top of ourself [self drawRowCache:rowRect]; // now show what we've done [[self window] flushWindow]; // if we autoscrolled, flush any lingering window server events to make // the scrolling smooth // save the current mouse location, just in case we need it again mouseLocation = [event locationInWindow]; if (!(peek = [[self window] nextEventMatchingMask:MOVE_MASK untilDate:[NSDate date] inMode:NSEventTrackingRunLoopMode dequeue:NO])) { event = [[self window] nextEventMatchingMask:MOVE_MASK|NSPeriodicMask]; } else { event = [[self window] nextEventMatchingMask:MOVE_MASK]; } // if a timer event, mouse location isn't valid, so we'll set it if ([event type] == NSPeriodic) { event = periodicEventWithLocationSetToPoint(event, mouseLocation); } } // END LOOP // mouseUp, so stop any timer and unlock focus if (scrolled && inTimerLoop) { [NSEvent stopPeriodicEvents]; inTimerLoop = NO; PSWait(); scrolled = NO; } [self unlockFocus]; // [[NSApp handCursor] pop]; // find the cell under the mouse's location mouseUpLocation = [event locationInWindow]; mouseUpLocation = [self convertPoint:mouseUpLocation fromView:nil]; newRow = [self rowAtPoint:mouseUpLocation]; if (newRow == -1) { // mouse is out of bounds, so find the row the dragged row covers newRow = [self rowAtPoint:rowRect.origin]; } // we need to shuffle cells if the active cell's going to a new location if (![self startRow:draggedRow endedAt:newRow]) { // go back to the way we were [self display]; } // now redraw ourself // [self display]; // set the event mask to normal [wind setAcceptsMouseMovedEvents:NO]; return YES; } ///////////////////////////////////////////////////////////////////////////// // Using the drag/drop mechanism ///////////////////////////////////////////////////////////////////////////// - (BOOL)copyRow:(int)hitRow toPasteboard:pb { [pb declareTypes:[NSArray arrayWithObject:PrivateDragPboard] owner:self]; return [pb setString:[NSString stringWithFormat:@"%d",hitRow] forType:PrivateDragPboard]; } - (BOOL)unconstrainedMove:(NSEvent *)e { NSPoint mouseDownLocation = [e locationInWindow]; NSWindow *wind = [self window]; NSPasteboard *pb; NSImage *image = nil; NSRect rect; NSPoint lowerLeftCorner; mouseDownLocation = [self convertPoint:mouseDownLocation fromView:nil]; draggedRow = [self rowAtPoint:mouseDownLocation]; pb = [NSPasteboard pasteboardWithName:NSDragPboard]; // this forces text editing to end [wind makeFirstResponder:wind]; [self selectRow:draggedRow byExtendingSelection:NO]; // this makes sure we get the whole row into the image [self scrollRowToVisible:draggedRow]; // this makes sure the display is up to date [self display]; // give the delegate a chance to supply an image if ([[self delegate] respondsToSelector:@selector(tableView:imageForRow:)]) image = [[self delegate] tableView:self imageForRow:draggedRow]; // otherwise, get our own image (the image of the whole row) if (!image) image = [self imageForRow:draggedRow]; rect = [self rectOfRow:draggedRow]; lowerLeftCorner = NSMakePoint(rect.origin.x,rect.origin.y + rect.size.height); if ([self copyRow:draggedRow toPasteboard:pb]) { [self dragImage:image at:lowerLeftCorner offset:NSZeroSize event:(NSEvent *)e pasteboard:pb source:self slideBack:YES]; return YES; } return NO; } - (BOOL) move:(NSEvent *)e { unsigned int flags = [e modifierFlags]; NSPoint mouseDownLocation = [e locationInWindow]; int draggedCol; NSEvent *peek = nil; NSWindow *wind = [self window]; // if the next event is a mouse up, don't drag the row peek = [wind nextEventMatchingMask:MOVE_MASK untilDate:[NSDate dateWithTimeIntervalSinceNow:0.1] inMode:NSEventTrackingRunLoopMode dequeue:NO]; if ([peek type] == NSLeftMouseUp) return NO; mouseDownLocation = [self convertPoint:mouseDownLocation fromView:nil]; draggedCol = [self columnAtPoint:mouseDownLocation]; draggedRow = [self rowAtPoint:mouseDownLocation]; // if the Control key isn't down, show normal behavior if (needsControlKey && !([e modifierFlags] & NSControlKeyMask)) { return NO; } // see if the delegate wants to allow moving the row if (![[self delegate] conformsToProtocol:@protocol(SDMovingRowsProtocol)]) return NO; if (!(flags & [[self delegate]dragReorderingMask:draggedCol]) && ([[self delegate]dragReorderingMask:draggedCol] != DRAG_ALWAYS)) return NO; if ([[self delegate] respondsToSelector:@selector(tableView:rowWillMove:)] && ![[self delegate]tableView:self rowWillMove:draggedRow]) return NO; // if we get here, we can move the row if (constrainedMove) return [self constrainedMove:e]; else return [self unconstrainedMove:e]; } - (void)mouseDown:(NSEvent *)e { if (![self move:e]) [super mouseDown:e]; } - (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)flag { return NSDragOperationCopy|NSDragOperationGeneric|NSDragOperationLink; } extern BOOL IncludesType(NSArray *types, NSString *type) { return types ? ([types indexOfObject:type] != NSNotFound) : NO; } - (BOOL) acceptsTypes:(NSArray *)types forSender:sender { if (IncludesType(types, PrivateDragPboard)) return YES; return NO; } - (unsigned int)draggingEntered:(id )sender { NSPasteboard *pboard = [sender draggingPasteboard]; if ([self acceptsTypes:[pboard types] forSender:sender]) return NSDragOperationGeneric; return NSDragOperationNone; } - (unsigned int)draggingUpdated:(id )sender { NSPoint point = [sender draggingLocation]; NSRect visRect = [self visibleRect]; NSRect scrollRect; float rowHeight = [self rowHeight]; int aRow; point = [self convertPoint:point fromView:nil]; aRow = [self rowAtPoint:point]; if ((aRow == 0) || (aRow == [self numberOfRows]-1)) { [self scrollRowToVisible:aRow]; } else if (point.y < visRect.origin.y + rowHeight/4) { // we need to scroll at top scrollRect = NSMakeRect(visRect.origin.x,(visRect.origin.y-rowHeight),visRect.size.width,rowHeight); [self scrollRectToVisible:scrollRect]; } else if (point.y > ((visRect.origin.y + visRect.size.height) - rowHeight/4)) { // we need to scroll at bottom scrollRect = NSMakeRect(visRect.origin.x,visRect.origin.y+visRect.size.height,visRect.size.width,rowHeight); [self scrollRectToVisible:scrollRect]; } if (![[self delegate] tableView:self draggingRow:draggedRow overRow:aRow]) return NSDragOperationNone; else return NSDragOperationGeneric; } - (BOOL)performDragOperation:(id )sender { int endedAt; NSPoint screenPoint = [self convertPoint:[sender draggingLocation] fromView:nil]; // now the point is in our local coordinates.... endedAt = [self rowAtPoint:screenPoint]; return [self startRow:draggedRow endedAt:endedAt]; } - (id) headerView { return nil; } - (id) cornerView { return nil; } - (void)grabTableBits { // copy what's currently visible into the matrix cache NSRect visibleRect = [self visibleRect]; NSCachedImageRep *tableRep = [[tableCache representations]objectAtIndex:0]; visibleRect = [self convertRect:visibleRect toView:nil]; [tableCache lockFocusOnRepresentation:tableRep]; PScomposite(NSMinX(visibleRect), NSMinY(visibleRect), NSWidth(visibleRect), NSHeight(visibleRect), [[self window] gState], 0.0, 0.0, NSCompositeCopy); [tableCache unlockFocus]; } - (void)grabRowBits { // copy what's currently visible into the row cache NSRect rowRect = [self rectOfRow:draggedRow]; NSCachedImageRep *rowRep = [[rowCache representations]objectAtIndex:0]; rowRect = [self convertRect:rowRect toView:nil]; [rowCache lockFocusOnRepresentation:rowRep]; PScomposite(NSMinX(rowRect), NSMinY(rowRect), NSWidth(rowRect), NSHeight(rowRect), [[self window] gState], 0.0, 0.0, NSCompositeCopy); [rowCache unlockFocus]; } - (NSImage *) imageForRow:(int)aRow { NSSize old = rowCache? [rowCache size] : NSZeroSize; NSRect rowRect = [self rectOfRow:draggedRow]; NSSize rowSize = rowRect.size; if (rowSize.width != old.width || rowSize.height != old.height) { // create the cache window if it doesn't exist NSCachedImageRep *rep; if (rowCache) [rowCache release]; rowCache = [[NSImage allocWithZone:(NSZone *)[(NSObject *)self zone]] initWithSize:rowSize]; rep = [[[NSCachedImageRep allocWithZone:(NSZone *)[(NSObject *)self zone]] initWithSize:rowSize depth:[NSWindow defaultDepthLimit] separate:YES alpha:YES]autorelease]; [rowCache addRepresentation:rep]; } [self grabRowBits]; return rowCache; } - sizeCacheWindow:cacheImage to:(NSSize)windowSize { NSSize old = cacheImage? [cacheImage size] : NSZeroSize; if (windowSize.width != old.width || windowSize.height != old.height) { // create the cache window if it doesn't exist NSCachedImageRep *rep; if (cacheImage) [cacheImage release]; cacheImage = [[NSImage allocWithZone:(NSZone *)[(NSObject *)self zone]] initWithSize:windowSize]; rep = [[[NSCachedImageRep allocWithZone:(NSZone *)[(NSObject *)self zone]] initWithSize:windowSize depth:[NSWindow defaultDepthLimit] separate:YES alpha:YES]autorelease]; [cacheImage addRepresentation:rep]; } return cacheImage; } - (void)drawTableCache:(NSRect)rowRect { NSRect visibleRect = [self visibleRect]; NSRect sourceRect = rowRect; NSPoint origin = rowRect.origin; // adjust composite point: seems to need this! origin.y += rowRect.size.height; // now the cache is just the visibleRect, so we need to adjust the sourceRect: sourceRect.origin.y = NSHeight(visibleRect) + NSMinY(visibleRect) - origin.y; [tableCache compositeToPoint:origin fromRect:sourceRect operation:NSCompositeCopy]; { NSRect myRow = [self rectOfRow:draggedRow]; NSRect clipRow = myRow; myRow.size.height=myRow.size.height+1; myRow.origin.y=myRow.origin.y-1; NSDrawGrayBezel(myRow,myRow); [[NSColor controlShadowColor/*darkGrayColor*/] set]; myRow.origin.x=myRow.origin.x+2.0; myRow.size.width=myRow.size.width-4.0; myRow.origin.y=myRow.origin.y+2.0; myRow.size.height=myRow.size.height-4.0; NSRectFill(myRow); } } - (void)drawRowCache:(NSRect)rowRect { NSRect myRect=rowRect; myRect.origin.y += myRect.size.height; // [rowCache compositeToPoint:rowRect.origin operation:NSCompositeCopy]; [rowCache dissolveToPoint:myRect.origin fraction:0.75]; } - (void)setConstrainedMove:(BOOL)flag { constrainedMove = flag; } - (void)setNeedsControlKey:(BOOL)flag { needsControlKey = flag; } @end ****** Typical Initialization Code to use the SDTableView from GIFfun(tm) ******** // in awakeFromNib or other "early" place, call the initialization code: /// IN IB, you have a tableView ivar, named "tableView", set class to "SDTableView" /// IN IB, name the column with the image: #define I_IMAGE @"Draggable_Image_Column" #define ROW_HEIGHT 32. - (void)setLookAndFeelOfTableView { NSImageCell *ic = [[NSImageCell allocWithZone:[self zone]] initImageCell:nil]; NSTableColumn *tc = [tableView tableColumnWithIdentifier:I_IMAGE]; // Make the tableview constrain movement verticallly: [tableView setConstrainedMove:YES]; // Make the rows taller so we can see our GIFS image: [tableView setRowHeight:ROW_HEIGHT]; // We want the GIF not to be stretched, and we set the TableColumn's cell to our new ImageCell: [ic setImageScaling:NSScaleProportionally]; // or NSScaleToFit [tc setDataCell:ic]; } ***** Typical Delegate Response Code to use the SDMovingRowsProtocol ********* // we only want the image column to be draggable // but if they hold down command key, any column is draggable: - (unsigned int)dragReorderingMask:(int)col; { // DRAG_ALWAYS means do it with no modifier needed at all if (col == IMAGE_COLUMN_NUMBER) return DRAG_ALWAYS; else return NSCommandKeyMask; } // you could actually do some validation here: - (BOOL) tableView:(SDTableView *) tableView draggingRow:(int)draggedRow overRow:(int) targetRow { return YES; } // here we shuffle our data to match the dragging done by the user: - (BOOL)tableView:(NSTableView *)tv didDepositRow:(int)rowToMove at:(int)newPosition { if (rowToMove != -1 && newPosition != -1) { id object = [gifFileArray objectAtIndex:rowToMove]; if (newPosition < [gifFileArray count] - 1) { [gifFileArray removeObjectAtIndex:rowToMove]; [gifFileArray insertObject:object atIndex:newPosition]; } else { [gifFileArray removeObjectAtIndex:rowToMove]; [gifFileArray addObject:object]; } return YES; // ie reload } return NO; } From oloft at tengil5.cs.chalmers.se Mon Sep 14 15:22:53 1998 From: oloft at tengil5.cs.chalmers.se (Olof Torgersson) Date: Thu Nov 3 14:41:30 2005 Subject: Windows-style toolbars Message-ID: <9809150022.AA531353@tengil5.cs.chalmers.se> I'm trying to create a tool bar for the windows version of my app behaving as tool bars usually do. In the tool bar there are buttons for things like cut copy and paste. Now, I would like these buttons to be enabled only when they should. For instance the cut button should only be enabled when some text is selected in the textView that is currently the first responder (There are several textViews in the window). How should this be solved? Olof Torgersson --- Olof Torgersson oloft@cs.chalmers.se Department of Computing Science +46 31 772 54 06 G?teborg University & Chalmers University of Technology S-412 96 G?TEBORG, SWEDEN From arti at hawaii.rr.com Mon Sep 14 15:54:59 1998 From: arti at hawaii.rr.com (Art lsbell) Date: Thu Nov 3 14:41:30 2005 Subject: Windows-style toolbars Message-ID: <010301bde032$b3e46bc0$0779d2cc@bozo.hawaii.rr.com> Olof Torgersson wrote: I'm trying to create a tool bar for the windows version of my app behaving as tool bars usually do. In the tool bar there are buttons for things like cut copy and paste. Now, I would like these buttons to be enabled only when they should. For instance the cut button should only be enabled when some text is selected in the textView that is currently the first responder (There are several textViews in the window). How should this be solved? My solution was to declare validateToolBarButton: in a category on NSObject just as NSMenuValidation's validateMenuItem: is declared. I implemented validateToolBarButtons in an NSView category and invoke it from a NSWindow subclass' overridden update method before invoking super's update (no windowWillUpdate: or NSWindowWillUpdateNotification exists). validateToolBarButtons is implemented following the description in the NSMenuValidation documentation VERY carefully. This works like a charm to keep both menus and tool bar buttons synchronized. Name: Art Isbell Organization: IDX Systems Corporation (for whom I do not speak) Email: arti@hawaii.rr.com Voice: +1 808 526 1226 Voice mail: +1 808 533 1827 US Mail: Honolulu, HI 96813-1021 From kcd at jumpgate.com Mon Sep 14 21:11:54 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809140819.BAA19937@ignem.omnigroup.com> References: <199809140819.BAA19937@ignem.omnigroup.com> Message-ID: <199809150411.VAA20432@babylon5.jumpgate.com> "Timothy J. Wood" wrote: > >From: "Kenneth C. Dyke" > >"Timothy J. Wood" wrote: > >> - Create a wrapper object that is in charge of holding onto the memory for > >> your structure. At the bare minimum it could have -init (allocates the > >> struct), -dealloc (deallocates the struct and calls super) and > >> -gimmeThePointer (duh). Pass this through DO. I think the default mode is > >> 'byref', so you shouldn't have to worry about implementing NSCoding. > > > >Won't this have the exact same problem since DO will munge the return value > >of -gimmeThePointer and try to copy the struct again? > > Er, duh. Yeah. > > What you'd *really* want to do is send the wrapper object bycopy. You'd > then implement NSCoding to just encode the pointer (rather than encoding the > entire struct). Well, as I suspected, this also won't work since encodeValueOfObjcType:at: won't encode a void *. It's just being too smart for it's own good in this case I guess. I suspect thing is why using NSValue didn't work, either. > You might have to implement -replacementObjectForPortCoder: to avoid > having a proxy sent instead of a copy of your object, but this depends upon > whether bycopy or byref is the default. Now that I think about this more, I > really don't recall which it is. Just give it a try and if you end up getting > a proxy in the other thread (ie, your -encodeWithCoder: and initWithCoder: > never get called), then you might want to look at > -replacementObjectForPortCoder: to smack the proxy out of the way. Yeah, you have to implement it, as byref is the default. Apple really ought to document little quirks like this in the ObjC book so you don't pull your hair out when you get a proxy even when you set up the method to be bycopy. ;) -Ken From tjw at omnigroup.com Mon Sep 14 21:17:20 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809150411.VAA20432@babylon5.jumpgate.com> References: <199809140819.BAA19937@ignem.omnigroup.com> <199809150411.VAA20432@babylon5.jumpgate.com> Message-ID: <199809150417.VAA01136@ignem.omnigroup.com> >Well, as I suspected, this also won't work since encodeValueOfObjcType:at: >won't encode a void *. It's just being too smart for it's own good in this >case I guess. I suspect thing is why using NSValue didn't work, either. You don't want to encode 'struct foo *', I think, but rather 'struct foo **'. Anyway, it's worth a try :) -tim From kcd at jumpgate.com Mon Sep 14 21:44:41 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809150417.VAA01136@ignem.omnigroup.com> References: <199809150417.VAA01136@ignem.omnigroup.com> Message-ID: <199809150444.VAA20458@babylon5.jumpgate.com> "Timothy J. Wood" wrote: > >Well, as I suspected, this also won't work since encodeValueOfObjcType:at: > >won't encode a void *. It's just being too smart for it's own good in this > >case I guess. I suspect thing is why using NSValue didn't work, either. > > > You don't want to encode 'struct foo *', I think, but rather 'struct foo > **'. Anyway, it's worth a try :) Okay, that seems to fail in an entirely different way. ;) I simply get back a NULL struct foo **, with no exceptions thrown or anything. I suspect that the NSCoder has no idea what to do with a type encoding of ^^{?}. -Ken From kcd at jumpgate.com Mon Sep 14 22:25:52 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:30 2005 Subject: [Solution] (was DO vs. shared data between threads) In-Reply-To: <199809150417.VAA01136@ignem.omnigroup.com> References: <199809150417.VAA01136@ignem.omnigroup.com> Message-ID: <199809150525.WAA20494@babylon5.jumpgate.com> The trick is to use a union: typedef unsigned char PointerArray[sizeof(void *)]; @interface PointerWrapper { union _wrapper { void *pointer; PointerArray pointerArray; } wrapper; } @end @implementation PointerWrapper - (id)initWithPointer:(void *)thePointer { [super init]; wrapper.pointer = thePointer; return self; } - (void *)pointer { return wrapper.pointer; } - (void)encodeWithCoder:(NSCoder *)coder { [coder encodeValueOfObjCType:@encode(PointerArray) at:&wrapper.pointerArray]; } - (id)initWithCoder:(NSCoder *)coder { [coder decodeValueOfObjCType:@encode(PointerArray) at:&wrapper.pointerArray]; return self; } - (id)replacementObjectForPortCoder:(NSPortCoder *)encoder { if([encoder isByref]) return [NSDistantObject proxyWithLocal:self connection:[encoder connection]]; else return self; } @end From exbang at wanadoo.fr Tue Sep 15 00:07:33 1998 From: exbang at wanadoo.fr (Michel Jullian) Date: Thu Nov 3 14:41:30 2005 Subject: How can I call a C++ DLL from YB-Win ? Message-ID: <35FE1234.4C7F401F@wanadoo.fr> Hi all, I would like the plug-in architecture of my app to be open not only to Objective-C bundles but also to C++ DLLs. I would be extremely grateful for any hints regarding the possibility, and how it can be done, to use a C++ DLL (developed with Visual C++ for example) from YB-Win. -- Greetings, Michel ......................................................................... Michel Jullian Directeur General email mj@exbang.com Exbang Industries S.A. Mas Chauvain route de Villeneuve tel +33(0) 499 529 878 Maurin 34970 Lattes France fax +33(0) 499 529 879 ......................................................................... From tjw at omnigroup.com Tue Sep 15 02:04:18 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:30 2005 Subject: How can I call a C++ DLL from YB-Win ? In-Reply-To: <35FE1234.4C7F401F@wanadoo.fr> References: <35FE1234.4C7F401F@wanadoo.fr> Message-ID: <199809150904.CAA13897@ignem.omnigroup.com> The problem here is that there either isn't a C++ name mangling scheme, or not everyone follows it (I'm not that much of a C++ guru, so I don't know which it is -- I assume the former). C++ calls compiled by G++ will reference different mangled names than those that are produced by VC++. One workaround is to (yuck) write a wrapper API in vanilla C and compile that with VC++. Then, have the rest of your bundle call the vanilla C API. This is obviously pretty gross, but it has worked for me in the past. It would be pretty keen if they added a '-visual-cpp-mangling' option to the G++ shipped with YellowBox, but as far as I know now, there isn't anything like that currently. -tim Begin forwarded message: Date: Tue, 15 Sep 1998 00:11:45 -0700 (PDT) Reply-To: exbang@wanadoo.fr From: Michel Jullian To: Multiple recipients of list Subject: How can I call a C++ DLL from YB-Win ? Hi all, I would like the plug-in architecture of my app to be open not only to Objective-C bundles but also to C++ DLLs. I would be extremely grateful for any hints regarding the possibility, and how it can be done, to use a C++ DLL (developed with Visual C++ for example) from YB-Win. -- Greetings, Michel ......................................................................... Michel Jullian Directeur General email mj@exbang.com Exbang Industries S.A. Mas Chauvain route de Villeneuve tel +33(0) 499 529 878 Maurin 34970 Lattes France fax +33(0) 499 529 879 ......................................................................... From cb at df.lth.se Tue Sep 15 02:14:46 1998 From: cb at df.lth.se (Christian Brunschen) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: <199809150411.VAA20432@babylon5.jumpgate.com> Message-ID: On Mon, 14 Sep 1998, Kenneth C. Dyke wrote: > "Timothy J. Wood" wrote: > > >From: "Kenneth C. Dyke" > > >"Timothy J. Wood" wrote: > > >> - Create a wrapper object that is in charge of holding onto the memory for > > >> your structure. At the bare minimum it could have -init (allocates the > > >> struct), -dealloc (deallocates the struct and calls super) and > > >> -gimmeThePointer (duh). Pass this through DO. I think the default mode is > > >> 'byref', so you shouldn't have to worry about implementing NSCoding. > > > > > >Won't this have the exact same problem since DO will munge the return value > > >of -gimmeThePointer and try to copy the struct again? > > > > Er, duh. Yeah. > > > > What you'd *really* want to do is send the wrapper object bycopy. You'd > > then implement NSCoding to just encode the pointer (rather than encoding the > > entire struct). > > Well, as I suspected, this also won't work since encodeValueOfObjcType:at: > won't encode a void *. It's just being too smart for it's own good in this > case I guess. I suspect thing is why using NSValue didn't work, either. Um, I may be stupid here ... but, basically, pointers should be pretty much cast-compatible with each other, right ? I can see why you don't want to rely on being able to cast a (void *) to and from any sort of (unsigned long long int) or something; but wouldn't it be possible to cast the (void *) to an (unsigned char *) or something, encode _that_, and then on the other end cast it back to (void *) ? (I chose 'unsigned char *' above because that should have the same alignment requirements as a char *, ie, none, so there should not be any problems storing a void * in that; and at the same time it is not a 'char *', so there should be no confusion about trying to send a C string) > > > You might have to implement -replacementObjectForPortCoder: to avoid > > having a proxy sent instead of a copy of your object, but this depends upon > > whether bycopy or byref is the default. Now that I think about this more, I > > really don't recall which it is. Just give it a try and if you end up getting > > a proxy in the other thread (ie, your -encodeWithCoder: and initWithCoder: > > never get called), then you might want to look at > > -replacementObjectForPortCoder: to smack the proxy out of the way. > > Yeah, you have to implement it, as byref is the default. Apple really ought > to document little quirks like this in the ObjC book so you don't pull your > hair out when you get a proxy even when you set up the method to be bycopy. ;) > > -Ken > // Christian Brunschen From ahoesch at smartsoft.de Tue Sep 15 05:54:24 1998 From: ahoesch at smartsoft.de (Andreas Hoeschler) Date: Thu Nov 3 14:41:30 2005 Subject: More about PSDoUserPath Message-ID: <9809151254.AA00444@smartsoft.de> Hi, I have a weird problem with PSDoUserpath. I either get the message Sep 15 13:48:24 [437] DPS Error: %%[ Error: typecheck; OffendingCommand: ustroke ]%% printed to the console or the application dies without a noise. I'm sure the death has somehow to do with Userpath drawing. Unfortunately I have not the smallest idea, what could be wrong with my code. Any hints regarding the above error message would be greatly appreciated. Thanks in advance! Andreas PS: I'm working with OPENSTEP 4.2 Mach -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 572 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980915/1183dcee/attachment.bin From ahoesch at smartsoft.de Tue Sep 15 06:03:24 1998 From: ahoesch at smartsoft.de (Andreas Hoeschler) Date: Thu Nov 3 14:41:30 2005 Subject: More about PSDoUserPath Message-ID: <9809151303.AA00690@smartsoft.de> Hi, >Sep 15 13:48:24 [437] DPS Error: %%[ Error: typecheck; OffendingCommand: ustroke ]%% I just found out, that this problem only occurs, if I make use of the closepath operator. - (void)closepath { ops[numberOfOps++] = dps_closepath; } If I calculate the last line myself and use lineTo instead, it works quite well. Bug or feature? Andreas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 435 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980915/9b85aee2/attachment.bin From simon at planon.qc.ca Mon Sep 14 05:58:21 1998 From: simon at planon.qc.ca (Simon Glet) Date: Thu Nov 3 14:41:30 2005 Subject: PSDoUserPath In-Reply-To: References: Message-ID: <9809141258.AA00279@planon.qc.ca> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1529 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980914/05e13861/attachment.bin From Malcolm_Crawford at plsys.co.uk Tue Sep 15 05:33:26 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:30 2005 Subject: PSDoUserPath In-Reply-To: <9809141258.AA00279@planon.qc.ca> References: <9809141258.AA00279@planon.qc.ca> Message-ID: <199809151233.NAA01089@jasmine.plsys.co.uk> Simon wrote: > I ran into the same problem. The documentation gives an incorect example : > > short coords[6] = {0, 0, 200, 0, 100, 200}; > char ops[4] = {dps_moveto, dps_lineto,dps_lineto, > dps_closepath}; > short bbox[4] = {0, 0, 200, 200}; > > DPSDoUserPath(coords, 6, dps_short, ops, 4, bbox, dps_ustroke); > > If you take a look at DPSDoUserPath's declaration in dpsOpenStep.h there is > an extra argument ! > > APPKIT_EXTERN void DPSDoUserPath( > DPSContext context, > const void *coords, > int numCoords, > DPSNumberFormat numType, > const DPSUserPathOp *ops, > int numOps, > const void *bbox, > DPSUserPathAction action); > I think it's not that the documentation gives the wrong example, it gives the wrong function name. Usually you'd use PSDoUserPath (note the absence of "D"), which is defined (immediately below DPSDoUserPath): APPKIT_EXTERN void PSDoUserPath( const void *coords, int numCoords, DPSNumberFormat numType, const DPSUserPathOp *ops, int numOps, const void *bbox, DPSUserPathAction action); If you really want to know about this stuff, *try* getting hold of the old Adobe Purple Book "Programming the Display PostScript System with NeXTstep" (which I think is sadly now out of print). Best wishes, mmalc. From kcd at jumpgate.com Tue Sep 15 08:18:09 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads In-Reply-To: References: Message-ID: <199809151518.IAA21314@babylon5.jumpgate.com> Christian Brunschen wrote: > On Mon, 14 Sep 1998, Kenneth C. Dyke wrote: > > > "Timothy J. Wood" wrote: > > > >From: "Kenneth C. Dyke" > > > >"Timothy J. Wood" wrote: > > > >> - Create a wrapper object that is in charge of holding onto the memory > > > >> for your structure. At the bare minimum it could have -init (allocates > > > >> the struct), -dealloc (deallocates the struct and calls super) and > > > >> -gimmeThePointer (duh). Pass this through DO. I think the default mode > > > >> is 'byref', so you shouldn't have to worry about implementing > > > >> NSCoding. > > > > > > > >Won't this have the exact same problem since DO will munge the return > > > >value of -gimmeThePointer and try to copy the struct again? > > > > > > Er, duh. Yeah. > > > > > > What you'd *really* want to do is send the wrapper object bycopy. You'd > > > then implement NSCoding to just encode the pointer (rather than encoding > > > the entire struct). > > > > Well, as I suspected, this also won't work since encodeValueOfObjcType:at: > > won't encode a void *. It's just being too smart for it's own good in this > > case I guess. I suspect thing is why using NSValue didn't work, either. > > Um, I may be stupid here ... but, basically, pointers should be pretty > much cast-compatible with each other, right ? Sure, but my fundamental problem was that I needed to pass a pointer via DO without DO knowing I was passing a pointer, since it seems to try really hard to pass whatever it is the pointer points to, rather than the pointer itself (and in most cases, for good reason). > I can see why you don't want to rely on being able to cast a (void *) to > and from any sort of (unsigned long long int) or something; but wouldn't > it be possible to cast the (void *) to an (unsigned char *) or something, > encode _that_, and then on the other end cast it back to (void *) ? > > (I chose 'unsigned char *' above because that should have the same > alignment requirements as a char *, ie, none, so there should not be any > problems storing a void * in that; and at the same time it is not a > 'char *', so there should be no confusion about trying to send a C string) I suspect that if DO wasn't going to send a C string for an unsigned char * that it would then simply "do the right thing" and copy exactly one unsigned char over the network and would still munge the pointer. -Ken From ellis at nfts-createc.org.uk Tue Sep 15 08:15:52 1998 From: ellis at nfts-createc.org.uk (Ellis Pritchard) Date: Thu Nov 3 14:41:30 2005 Subject: How can I call a C++ DLL from YB-Win ? References: <199809150904.CAA13897@ignem.omnigroup.com> Message-ID: <35FE84A8.75843B7@nfts-createc.org.uk> Timothy J. Wood wrote: > It would be pretty keen if they added a '-visual-cpp-mangling' option to > the G++ shipped with YellowBox, but as far as I know now, there isn't > anything like that currently. It sure would be, but it might not solve the problem; it's not just the name mangling, but also the storage that's different; I'd guess that VisualC++ and GNU C++ are worlds apart in terms of how they lay stuff out... Of course, one could write a plug-in compiler for VisualC++ with Objective-C ability (much like Intel have their own assembler you can plug in for e.g. compiling the new Katmai instructions), but I'd doubt Apple would want to do that... Ellis. From erik at object-factory.com Tue Sep 15 08:46:40 1998 From: erik at object-factory.com (Erik Doernenburg) Date: Thu Nov 3 14:41:30 2005 Subject: DO vs. shared data between threads Message-ID: <199809151546.RAA01835@chocobo.object-factory.com> > > (I chose 'unsigned char *' above because that should have the same > > alignment requirements as a char *, ie, none, so there should not be any > > problems storing a void * in that; and at the same time it is not a > > 'char *', so there should be no confusion about trying to send a C string) > > I suspect that if DO wasn't going to send a C string for an unsigned char * > that it would then simply "do the right thing" and copy exactly one unsigned > char over the network and would still munge the pointer. As a hack I've used an `unsigned long' argument and that definitively works. There's one more pitfall, though: If you are passing an object AND your method is `oneway void' (which is common in cases like this) then you should explicitly retain/release the object. I'm using code like this: { /* create job, do something in thread B */ [aJob retain]; [selfInMainThread _postCompletionNotificationForJob:(unsigned long)aJob]; /* do something else */ } - (oneway void)_postJobComplitionNotificationForJob:(unsigned long)aJob { /* do something with job in thread a */ [aJob release]; } good luck erik From buck.erik at mcleod.net Tue Sep 15 08:55:15 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:30 2005 Subject: Windows-style toolbars Message-ID: <01bde0c1$3a813c60$7c2510d0@default> >I'm trying to create a tool bar for the windows version of my app behaving as tool bars usually do. >In the tool bar there are buttons for things like cut copy and paste. >Now, I would like these buttons to be enabled only when they should. >For instance the cut button should only be enabled when some text is selected in the textView that is currently >the first responder (There are several textViews in the window). >How should this be solved? >Olof Torgersson Solve this the same way menus are made context sensitive. Inspector panels are often made context sensitive. Use the responder chain to determine what object would respond to a message sent by the button on the tool bar. If no object would respond then disable the button. If an objects would respond, send some other message like -validateMenuItem: in order to let the object further refine its ability to respond. From michael.renner at cspb.com Tue Sep 15 08:56:21 1998 From: michael.renner at cspb.com (michael.renner@cspb.com) Date: Thu Nov 3 14:41:30 2005 Subject: set macosx-dev digest Message-ID: <0057210001920754000002L142*@MHS> From buck.erik at mcleod.net Tue Sep 15 16:38:26 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:30 2005 Subject: WDC98 CD not readable Message-ID: <01bde101$ef73c300$7b2510d0@default> Has anyone else noticed that none of the QuickTime movies on the 1998 WWDC CD-ROM can be played with Apple's latest QuickTime player for Windows95 ? None of the Power Point presentations look correct in the Office 95 Windows Power Point. Is this a deliberate attempt to break their own cross platform technologies ? Were they never really cross platform ? Was this just an oversight ? From truong at netmagic.net Tue Sep 15 17:08:02 1998 From: truong at netmagic.net (Thai Truong) Date: Thu Nov 3 14:41:30 2005 Subject: WDC98 CD not readable In-Reply-To: <01bde101$ef73c300$7b2510d0@default> Message-ID: Seems to be the same of the Mac side too. I think the keynote video played but the sound was absent. Certain slides of the presentations ran past the bottom of the screen. Sorry, but it is not an Apple conspiracy against Win95. At least I think it is... >Has anyone else noticed that none of the QuickTime movies on the 1998 WWDC >CD-ROM can be played with Apple's latest QuickTime player for Windows95 ? >None of the Power Point presentations look correct in the Office 95 Windows >Power Point. Is this a deliberate attempt to break their own cross platform >technologies ? Were they never really cross platform ? Was this just an >oversight ? From msheets at wwisp.com Tue Sep 15 19:06:26 1998 From: msheets at wwisp.com (Michael Sheets) Date: Thu Nov 3 14:41:30 2005 Subject: WDC98 CD not readable Message-ID: <199809160206.VAA17822@radar.wwisp.com> On 9/15/98 7:16 PM truong@netmagic.net said: >Seems to be the same of the Mac side too. I think the keynote video >played but >the sound was absent. > >Certain slides of the presentations ran past the bottom of the screen. > >Sorry, but it is not an Apple conspiracy against Win95. At least I think >it is... > >>Has anyone else noticed that none of the QuickTime movies on the 1998 WWDC >>CD-ROM can be played with Apple's latest QuickTime player for Windows95 ? >>None of the Power Point presentations look correct in the Office 95 Windows >>Power Point. Is this a deliberate attempt to break their own cross platform >>technologies ? Were they never really cross platform ? Was this just an >>oversight ? This is with Quicktime 3.0? It's required, 2.x won't work. ---> Michael Sheets 5900 Canterbury Run ---> msheets@wwisp.com Pinson, AL 35126 Think Apple. Think Serious. Think Different. From anders at milkweed.com Tue Sep 15 19:20:59 1998 From: anders at milkweed.com (Anders Pytte) Date: Thu Nov 3 14:41:30 2005 Subject: Message-ID: <199809160216.WAA09386@mx01.together.net> Friends, Has anyone noticed that, if, when running ProjectBuilder on PPC, you create a new document based application and build it without any changes, and attempt to run it from ProjectBuilder, that the launch window reports a "nil task path"? Furthermore, if you examine the LaunchOptions/Executables panel, there are no entries! Anyone know why this occurs? Of course you can set your executable manually, but thus is rather a nuisance. At one point I fixed this in another project, but I have no idea how I did that. I would welcome suggestions. Anders. ---------------------------------------------------------------- Anders Pytte Milkweed Software Ferguson Hill Voice: (802) 472-5142 Cabot VT 05647 Internet: anders@milkweed.com ---------------------------------------------------------------- From fan at chem.ucla.edu Tue Sep 15 19:55:28 1998 From: fan at chem.ucla.edu (Paul S. Fan) Date: Thu Nov 3 14:41:30 2005 Subject: Newbie EOF question Message-ID: <199809160255.TAA29520@krypton.chem.ucla.edu> Hi - In trying to work out the Studio example, I ran into the following problem. Within IB, I can't seem to make an association between the textview part of a scrollview in my window to an EODisplayGroup. I double click on the scrollview to get the NSTextView to show up, but then when I try to do control-drag from the NSTextView I get a popup "copy-paste" menu and not the usual control-drag behavior. Could someone tell me what I am doing wrong? Please reply by email and I will summarize if necessary. Thanks, Paul (fan@chem.ucla.edu) From gideon at csarc.otago.ac.nz Tue Sep 15 19:54:04 1998 From: gideon at csarc.otago.ac.nz (Gideon King) Date: Thu Nov 3 14:41:30 2005 Subject: Launch Message-ID: <9809161454.AA048894@oklina> And while we're on the subject, it can also cause grief if you switch from building and app to building a debug (or any other target change), as the launcher is not updated to launch the executable you are building. I'm sure I'm not the only person to have been caught out by this one! > Has anyone noticed that, if, when running ProjectBuilder on PPC, you create > a new document based application and build it without any changes, and > attempt to run it from ProjectBuilder, that the launch window reports a "nil > task path"? Furthermore, if you examine the LaunchOptions/Executables panel, > there are no entries! > > Anyone know why this occurs? Of course you can set your executable manually, > but thus is rather a nuisance. At one point I fixed this in another project, > but I have no idea how I did that. I would welcome suggestions. > > Anders. ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon From cwhite at comnetix.com Tue Sep 15 20:23:46 1998 From: cwhite at comnetix.com (Craig White) Date: Thu Nov 3 14:41:30 2005 Subject: Print Preview on Windows Message-ID: <199809160323.XAA02924@comnetix.com> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 323 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980915/23c163bf/attachment.bin From exbang at wanadoo.fr Wed Sep 16 03:52:09 1998 From: exbang at wanadoo.fr (Michel Jullian) Date: Thu Nov 3 14:41:30 2005 Subject: How can I call a C++ DLL from YB-Win ? References: <35FE1234.4C7F401F@wanadoo.fr> <199809150904.CAA13897@ignem.omnigroup.com> Message-ID: <35FF9851.BD1FD23E@wanadoo.fr> Timothy J. Wood wrote: > C++ calls compiled by G++ will reference different mangled names than > those that are produced by VC++. > > One workaround is to (yuck) write a wrapper API in vanilla C and compile > that with VC++. Then, have the rest of your bundle call the vanilla C API. > This is obviously pretty gross, but it has worked for me in the past. Thanks a lot for answering (and thanks to Ellis too). I am not sure I quite understand your workaround, but I am willing to adopt it if it works, never mind if it is pretty gross :) I gather it is not possible from a PB project to link directly to a C++ vc++ dll, but it can link to a plain C vc++ dll, which in turn can link to a C++ vc++ dll, is that right ? However I am not even able to link to a plain C vc++ dll : it says "link error, unresolved external symbol __imp__NameOfMyFunction__". Could you give more details, or even better post a sample of a combination of a PB app & vc++ C and C++ dll projects illustrating your workaround ? Thanks again. -- Greetings, Michel ......................................................................... Michel Jullian Directeur General email mj@exbang.com Exbang Industries S.A. Mas Chauvain route de Villeneuve tel +33(0) 499 529 878 Maurin 34970 Lattes France fax +33(0) 499 529 879 ......................................................................... From snoyes1 at .rdc1.az.home.com Wed Sep 16 07:35:15 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:30 2005 Subject: How can I call a C++ DLL from YB-Win ? Message-ID: <19980916143441.AAA18533@CX268689-A> > I gather it is not possible from a PB project to link directly to a C++ vc++ > dll, but it can link to a plain C vc++ dll, which in turn can link to a C++ > vc++ dll, is that right ? However I am not even able to link to a plain C vc++ > dll : it says "link error, unresolved external symbol > __imp__NameOfMyFunction__". > > Could you give more details, or even better post a sample of a combination of > a PB app & vc++ C and C++ dll projects illustrating your workaround ? > If it makes you feel better, mangling between Borland/ VC++/ and Watcom were all different. At least enough that tring to mix them with C++ code was imposible. The trick was to use a compiler directive called extern "C"{....} It has been two years since I did this so I might have a quote off or so. But basically, define VC++ code is a '.c' file. That will turn off the mangled outputs of names. Define a series of glue routines that will call the c++ functions. These functions will provide a bridge between the two name spaces. gcc (hopefully. This works between BCC++ -- Watcom 10.6a/11.0 -- and VC++) will see these name spaces. void VCDLLGlue_foo(int, int, double, void *); void VCDLLGlue_fooTwo(double, void *); // // These functions will be defined in a c++ header file // void VCPPDLLGlue_foo(int, int, double, void *); void VCPPDLLGlue_fooTwo(double, void *); void VCDLLGlue_foo(int test, int view, double size, void *windowPointer) { VCPPDLLGlue_foo(test, view, size, windowPointer); } void VCDLLGlue_fooTwo(double size, void *windowPointer) { VCPPDLLGlue_fooTwo(size, windowPointer); } Now, in a seperate file with a 'cpp', that will use mangled names because of its extension, define the two functions VCPPDLLGlue_XXXX. The trick is in the proto-type. The extern "C" directive will turn off name mangled outputs allowing C functions to call C++ functions. IT IS NOT POSSIBLE TO CALL METHODS DIRECTLY. The methods require the mangled names because they represent objects. Think of it as not having an isa pointer. // // These functions will be defined in a c++ header file // extern "C" void VCPPDLLGlue_foo(int, int, double, void *); extern "C" void VCPPDLLGlue_fooTwo(double, void *); // // like wise this could be written // // extern "C" { // void VCPPDLLGlue_foo(int, int, double, void *); // void VCPPDLLGlue_fooTwo(double, void *); // } void VCDLLGlue_foo(int, int, double, void *); void VCDLLGlue_fooTwo(double, void *); void VCPPDLLGlue_foo(int test, int view, double size, void *windowPointer) { // do something in the C++ name space } void VCPPDLLGlue_fooTwo(double size, void *windowPointer) { // do something in the C++ name space } This is not a pretty solution, but I have used it on several occations. I hope this helps. From ahoesch at smartsoft.de Wed Sep 16 09:49:02 1998 From: ahoesch at smartsoft.de (Andreas Hoeschler) Date: Thu Nov 3 14:41:30 2005 Subject: Strokeadjust problem when drawing to screen Message-ID: <9809161649.AA02002@smartsoft.de> Hi, as far as I understand the automatic strokeadjusting of PS Level 2, it only works for strokes. Unfortunately I probably have to use the ufill-operator in order to draw a vector arrow over a glyph, because otherwise filling the peak would be a bit inefficient. Thus instead of drawing a line for the arrow body, I draw the outline of the arrow and later use ufill to fill the userpath. The problem is, that depending on the position of the arrow in userspace, one arrow gets thicker than another, what causes formulas to look very ugly. [An attachment was originally included here] I tried using PSsetstrokeadjsut(int b) with varius arguments, but this does not seem to have any effect on the result. Any ideas are greatly appreciated. Thanks in advance! Andreas -------------- next part -------------- Skipped content of type multipart/mixed From Malcolm_Crawford at plsys.co.uk Wed Sep 16 09:52:05 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:30 2005 Subject: Strokeadjust problem when drawing to screen In-Reply-To: <9809161649.AA02002@smartsoft.de> References: <9809161649.AA02002@smartsoft.de> Message-ID: <199809161652.RAA00815@jasmine.plsys.co.uk> Andreas wrote: > as far as I understand the automatic strokeadjusting of PS Level 2, it only > works for strokes. Unfortunately I probably have to use the ufill-operator > in order to draw a vector arrow over a glyph, because otherwise filling the > peak would be a bit inefficient. Thus instead of drawing a line for the > arrow body, I draw the outline of the arrow and later use ufill to fill the > userpath. The problem is, that depending on the position of the arrow in > userspace, one arrow gets thicker than another, what causes formulas to > look very ugly. > Might I suggest instead creating a font with the arrow symbol, and then calling it with xyshow. Best wishes, mmalc. From deirdres at eni.net Wed Sep 16 10:24:18 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:30 2005 Subject: How can I call a C++ DLL from YB-Win ? In-Reply-To: <35FF9851.BD1FD23E@wanadoo.fr> Message-ID: At 4:06 AM -0700 9/16/98, Michel Jullian wrote: >> One workaround is to (yuck) write a wrapper API in vanilla C and compile >> that with VC++. Then, have the rest of your bundle call the vanilla C API. >> This is obviously pretty gross, but it has worked for me in the past. > >Thanks a lot for answering (and thanks to Ellis too). I am not sure I quite >understand your workaround, but I am willing to adopt it if it works, never >mind if it is pretty gross :) It's actually a good workaround. You'd have routines that are ONLY C. The code would be in a file like: sample.c where the other stuff is in .cp or .cpp files (or whatever). You can then call them from C++ by declaring them extern in the header files: /* sample.h */ #ifdef __cplusplus extern "C" { #endif /* prototypes for your C functions */ void myCfunction(void); #ifdef __cplusplus } #endif _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From zarnuk at zarnuk.com Wed Sep 16 10:43:36 1998 From: zarnuk at zarnuk.com (Paul S. McCarthy) Date: Thu Nov 3 14:41:30 2005 Subject: Strokeadjust problem when drawing to screen Message-ID: <01BDE178.0216DDA0@NTNWW002> > Andreas Hoeschler wrote: > [... trying to add a small arrow above the glyphs in a font... > ...they show up with different widths ...] This is a granularity problem. You are drawing lines that are only a few pixels wide, so rounding differences of even a single pixel show up as 100% or 50% differences in line width. Adjust the coordinates so that you are always consistent about the offset you use from a device pixel boundary (always use floor() for example). If you straddle pixel boundaries in some places, but not others, then the ones that straddle boundaries will show up as one pixel wider than the ones that do not. ---Paul... From Malcolm_Crawford at plsys.co.uk Wed Sep 16 11:09:14 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:30 2005 Subject: Strokeadjust problem when drawing to screen In-Reply-To: References: Message-ID: <199809161809.TAA00877@jasmine.plsys.co.uk> Paul wrote: > > Andreas Hoeschler wrote: > > [... trying to add a small arrow above the glyphs in a font... > > ...they show up with different widths ...] > > This is a granularity problem. You are drawing lines that are only a few > pixels wide, so rounding differences of even a single pixel show up as 100% > or 50% differences in line width. Adjust the coordinates so that you are > always consistent about the offset you use from a device pixel boundary > (always use floor() for example). If you straddle pixel boundaries in some > places, but not others, then the ones that straddle boundaries will show up > as one pixel wider than the ones that do not. > Umm, sorry, but IMHO (unless I've misunderstood your intent) this is exactly the wrong approach. The idea behind PostScript is that it *should* be *device independent*. I presume that your suggested use of floor() is to clip everything to the nearest 1/72" or somesuch? This might just about work on screen for 1:1 drawing, but it is not acceptable for output to high resolution printers, or to any zoomed image. PostScript provides mechanisms for doing what Andreas wants -- in particular if he uses a font "the consistency between images is handled by the font machinery. Each character if positioned at the same point within the device space to ensure the same image is produced regardless of the user space point selected."(*) Furthermore, using a font the image will be cached, and after the first operation will draw up to 1000 times faster then using raw drawing calls. Best wishes, mmalc. (*) Purple book, p126. From pmarton at nm.picker.com Wed Sep 16 11:34:57 1998 From: pmarton at nm.picker.com (Peter F. Martone) Date: Thu Nov 3 14:41:31 2005 Subject: "Disclosure triangle" behavior question Message-ID: For a status UI I need to have a "disclosure triangle" behavior*, but I'm having some difficuly getting it to work and I'm worried it might not be (conveniently) possible. The way my sample works is to have a 250x400 window with three objects: - a checkbox in the always-visible area of the window (hereafter "simple"), to indicate and control the disclosure state (in leau of the actual arrow graphics, which I can't find in any of the 8.1/8.5 resource files-- any pointers?); - a box outline (condensed to look like a horizontal separator) in the disclosure area (hereafter "complex"); and - an information text object in the complex area. (I'm modelling this on the file-copy status window from 8.x.) In the simple state, the window is only 250x200 and only the (unchecked) check box is visible. When the checkbox is changed to the "on" state, the controller takes the window frame, subtracts 200 from the origin.y (to move the whole window down) and adds 200 to the size.height, which provides the illusion of the bottom border of the window dropping down. Unfortunately, the objects in the hidden area don't seem to want to behave. If I detach them (in the inspector "size" view) from the bottom border, going from the first simple state to the first complex state works correctly but all subsequent transitions don't work because on the second state change (complex->simple) the objects all get "pushed/pulled up" to the bottom of the simple area, obscuring my checkbox. It's like they aren't properly anchored to the bottom of the window frame-- but if I try to explicity link them in the inspector and try going from simple to complex nothing in the complex area shows up, since the objects were moved down. I've read the documentation for NSWindow and about the differences between the frame and content areas. If I install my own content view at window creation time via setContentView (which means going outside IB) that won't change anything since my view will get resized to fit the target window. So, the final question is: Is there a way to prevent the content view's size and origin from being changed automatically by the host window to allow for hidden areas which facilitate the "disclosure view"-style of update panel? The irony about this is that since this is a straight forward thing to do on the Mac OS 8.x side-of-the-world I thought it'd be pretty simple for Mac OS X, but since (I think) the window management is more strictly enforced this actually becomes harder. A simple solution could be to just swap a view in and out instead of just leaving it all in the content view, but I just don't like that solution as much. Thanks, Pete (* Used to show extra, non-critical information. Left or right facing is minimize, down is maximize.) -- pmartone@nm.picker.com Pete Martone Picker International, Nuclear Division From sarwat at interlog.com Wed Sep 16 21:28:30 1998 From: sarwat at interlog.com (Sarwat Khan) Date: Thu Nov 3 14:41:31 2005 Subject: Clicking a close box to quit an app Message-ID: Hi. I've built a little app that has only one window. I'd like it so that when you click the close box it will quit the application, but I can't figure out how to do that. The best I've come up with was putting an NSApp terminate call from NSWindowController's windowWillClose. That ends up in an infinite loop. I know I can redirect the Close Window command to terminate: but that's not what I want. Thanks for any help, Sarwat. ............................................................ Sarwat Khan Brampton, Ontario sarwat@interlog.com http://www.interlog.com/~sarwat From kcd at jumpgate.com Wed Sep 16 21:45:31 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:31 2005 Subject: Clicking a close box to quit an app In-Reply-To: References: Message-ID: <199809170445.VAA23515@babylon5.jumpgate.com> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 552 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980916/d186cf79/attachment.bin From ims at hyper.gr Thu Sep 17 00:26:51 1998 From: ims at hyper.gr (ims) Date: Thu Nov 3 14:41:31 2005 Subject: nib files Message-ID: another simple question we have a project on YB and we tried to move it on Rhapsody but it seems that .nib files are not transferable among YB and Rhapsody. Is there any special action we should do; Regards NN Nikou Nikolaos for =============================================================== IMS Research & Development | tel. +30 (31) 94 52 98 PRIAMOY 12 | 95 09 03 544 53 THESSALONIKI | fax. +30 (31) 95 09 04 MACEDONIA - HELLAS | kai tou xpovou stnv polh! =============================================================== From ims at hyper.gr Thu Sep 17 00:26:51 1998 From: ims at hyper.gr (ims) Date: Thu Nov 3 14:41:31 2005 Subject: PB question Message-ID: We want to add a directory under PBs "Other Resources", like".eomodeld" how is it done; Regards NN Nikou Nikolaos for =============================================================== IMS Research & Development | tel. +30 (31) 94 52 98 PRIAMOY 12 | 95 09 03 544 53 THESSALONIKI | fax. +30 (31) 95 09 04 MACEDONIA - HELLAS | kai tou xpovou stnv polh! =============================================================== From C.Ridd at isode.com Thu Sep 17 01:06:38 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:31 2005 Subject: Strange gcc quirk Message-ID: <24918.906019598@isode.com> I'm porting some Unix code written in C to Rhapsody, and have come across a problem that may be a bug in Apple's port of gcc. The problem doesn't occur on gcc 2.7.2 and gcc 2.8.1 on Solaris (nor in other compilers), only it seems on Apple's gcc 2.7.2.1. It might just be that there's some mysterious new Apple parameter to pass to gcc to make it work 'right', but I couldn't find it from Apple's HTML'ized gcc texinfo files. The C code includes several of its own header files (eg and , some of them multiple times. What seems to happen on Rhapsody is that the second time a particular header should be included, it isn't. What makes me think this is an Apple bug is that if I edit the offending header file and declare a static variable in it, cc will now include the file twice, correctly! cc -E reveals in the failure case that the offending header is only getting included the first time. The structure of the files is something like this: -----main.c----- #include /* avoid redefining the same symbol second time round */ #define magic magicxxx #include int baz(void) { ...... } -----my/foo.h----- #include -----my/bar.h----- struct magic { int foo; } ------------------ The command used which causes the error is: cc -fPIC -I../../../h -c main.c (where ../../../h contains and ) The above fragments of files don't reveal the problem unfortunately, but I've not had time yet to analyse what's going on and reduce the problem to a minimal set of files. Any ideas, anyone? Before I download Apple's gcc diffs and try to figure out what's changed? ;-) Chris From ims at hyper.gr Thu Sep 17 02:02:39 1998 From: ims at hyper.gr (ims) Date: Thu Nov 3 14:41:31 2005 Subject: PB question -> solution Message-ID: well, we found that it works, if you have a file with the same extension as the directory you want to add example testDirectory.newExtension/ aFile.newExtension >We want to add a directory under PBs "Other Resources", like".eomodeld" >how is it done; > > Regards NN Nikou Nikolaos for =============================================================== IMS Research & Development | tel. +30 (31) 94 52 98 PRIAMOY 12 | 95 09 03 544 53 THESSALONIKI | fax. +30 (31) 95 09 04 MACEDONIA - HELLAS | kai tou xpovou stnv polh! =============================================================== From sberthet at ina.fr Thu Sep 17 02:34:07 1998 From: sberthet at ina.fr (Sebastien Berthet) Date: Thu Nov 3 14:41:31 2005 Subject: OpenGL for Yellow Box ? Message-ID: <3600D78F.AFB7009A@ina.fr> Hello, We're about to start a project whose display system is based on OpenGL. We'd like to use the Yellow Box, but we will have to make a few hacks to make OpenGL works with. Is there a chance to see OpenGL for the Yellow Box one day ? Any pointers on related articles ? Thanks in advance. Sebastien Berthet sberthet@ina.fr From holger at object-factory.com Thu Sep 17 02:35:47 1998 From: holger at object-factory.com (Holger Hoffstaette) Date: Thu Nov 3 14:41:31 2005 Subject: Clicking a close box to quit an app In-Reply-To: <199809170445.VAA23515@babylon5.jumpgate.com> References: <199809170445.VAA23515@babylon5.jumpgate.com> Message-ID: <199809170935.LAA14659@fafnir.object-factory.com> Kenneth C. Dyke wrote: > Sarwat Khan wrote: > > Hi. I've built a little app that has only one window. I'd like it so that > > when you click the close box it will quit the application, but I can't > > figure out how to do that. The best I've come up with was putting an > > NSApp terminate call from NSWindowController's windowWillClose. That ends > > up in an infinite loop. > > I ran into that problem in G3Control. I just moved the [NSApp > terminate:nil] call to my delegate's windowShouldClose: method, which > avoided the infinite loop. Why didn't you just implement NSApplication's delegate method -(BOOL)applicationShouldTerminateAfterLastWindowClosed: Maybe I misunderstood the original question, but it does work as expected.. Holger From holger at object-factory.com Thu Sep 17 02:48:56 1998 From: holger at object-factory.com (Holger Hoffstaette) Date: Thu Nov 3 14:41:31 2005 Subject: OpenGL for Yellow Box ? In-Reply-To: <3600D78F.AFB7009A@ina.fr> References: <3600D78F.AFB7009A@ina.fr> Message-ID: <199809170948.LAA14672@fafnir.object-factory.com> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 272 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980917/f576acaa/attachment.bin From kc at omnigroup.com Thu Sep 17 02:47:20 1998 From: kc at omnigroup.com (Ken Case) Date: Thu Nov 3 14:41:31 2005 Subject: OpenGL for Yellow Box ? Message-ID: <199809170949.CAA08172@ignem.omnigroup.com> > Is there a chance to see OpenGL for the Yellow Box one day ? Any > pointers on related articles ? Have you read the article "Using Accelerated OpenGL from Yellow Box" by Kenneth Dyke? It's at http://www.stepwise.com/Articles/Technical/YellowBoxGL.html. Ken From kcd at jumpgate.com Thu Sep 17 10:30:38 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:31 2005 Subject: Clicking a close box to quit an app In-Reply-To: <199809170935.LAA14659@fafnir.object-factory.com> References: <199809170935.LAA14659@fafnir.object-factory.com> Message-ID: <199809171730.KAA24970@babylon5.jumpgate.com> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 470 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980917/a32628fb/attachment.bin From exbang at wanadoo.fr Thu Sep 17 10:57:24 1998 From: exbang at wanadoo.fr (Michel Jullian) Date: Thu Nov 3 14:41:31 2005 Subject: How can I call a C++ DLL from YB-Win ? References: Message-ID: <36014D6E.D3842D15@wanadoo.fr> Thanks a lot, Deirdre and Steven, for your precisions concerning Tim's workaround. It works, I am delighted :-) Deirdre Saoirse wrote: > > At 4:06 AM -0700 9/16/98, Michel Jullian wrote: > >> One workaround is to (yuck) write a wrapper API in vanilla C and compile > >> that with VC++. Then, have the rest of your bundle call the vanilla C API. > >> This is obviously pretty gross, but it has worked for me in the past. > > > >Thanks a lot for answering (and thanks to Ellis too). I am not sure I quite > >understand your workaround, but I am willing to adopt it if it works, never > >mind if it is pretty gross :) > > It's actually a good workaround. You'd have routines that are ONLY C. The > code would be in a file like: > > sample.c > > where the other stuff is in .cp or .cpp files (or whatever). You can then > call them from C++ by declaring them extern in the header files: > > /* sample.h */ > > #ifdef __cplusplus > extern "C" { > #endif > > /* prototypes for your C functions */ > > void myCfunction(void); > > #ifdef __cplusplus > } > #endif > _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 > Note: deirdres@eni.net (there is another Deirdre at Epoch!) > #include Steven Noyes wrote: > > > I gather it is not possible from a PB project to link directly to > a C++ vc++ > > dll, but it can link to a plain C vc++ dll, which in turn can link > to a C++ > > vc++ dll, is that right ? However I am not even able to link to a > plain C vc++ > > dll : it says "link error, unresolved external symbol > > __imp__NameOfMyFunction__". > > > > Could you give more details, or even better post a sample of a > combination of > > a PB app & vc++ C and C++ dll projects illustrating your workaround ? > > > > If it makes you feel better, mangling between Borland/ VC++/ and > Watcom were all different. At least enough that tring to mix them > with C++ code was imposible. The trick was to use a compiler > directive called > > extern "C"{....} > > It has been two years since I did this so I might have a quote off > or so. But basically, define VC++ code is a '.c' file. That will > turn off the mangled outputs of names. Define a series of glue > routines that will call the c++ functions. These functions will > provide a bridge between the two name spaces. gcc (hopefully. This > works between BCC++ -- Watcom 10.6a/11.0 -- and VC++) will see these > name spaces. > > void VCDLLGlue_foo(int, int, double, void *); > void VCDLLGlue_fooTwo(double, void *); > > // > // These functions will be defined in a c++ header file > // > void VCPPDLLGlue_foo(int, int, double, void *); > void VCPPDLLGlue_fooTwo(double, void *); > > void VCDLLGlue_foo(int test, int view, double size, void *windowPointer) > { > VCPPDLLGlue_foo(test, view, size, windowPointer); > } > > void VCDLLGlue_fooTwo(double size, void *windowPointer) > { > VCPPDLLGlue_fooTwo(size, windowPointer); > } > > Now, in a seperate file with a 'cpp', that will use mangled names > because of its extension, define the two functions VCPPDLLGlue_XXXX. > The trick is in the proto-type. The extern "C" directive will turn > off name mangled outputs allowing C functions to call C++ functions. > IT IS NOT POSSIBLE TO CALL METHODS DIRECTLY. The methods require > the mangled names because they represent objects. Think of it as > not having an isa pointer. > > // > // These functions will be defined in a c++ header file > // > extern "C" void VCPPDLLGlue_foo(int, int, double, void *); > extern "C" void VCPPDLLGlue_fooTwo(double, void *); > > // > // like wise this could be written > // > // extern "C" { > // void VCPPDLLGlue_foo(int, int, double, void *); > // void VCPPDLLGlue_fooTwo(double, void *); > // } > > void VCDLLGlue_foo(int, int, double, void *); > void VCDLLGlue_fooTwo(double, void *); > > void VCPPDLLGlue_foo(int test, int view, double size, void *windowPointer) > { > // do something in the C++ name space > } > > void VCPPDLLGlue_fooTwo(double size, void *windowPointer) > { > // do something in the C++ name space > } > > This is not a pretty solution, but I have used it on several > occations. I hope this helps. -- Greetings, Michel ......................................................................... Michel Jullian Directeur General email mj@exbang.com Exbang Industries S.A. Mas Chauvain route de Villeneuve tel +33(0) 499 529 878 Maurin 34970 Lattes France fax +33(0) 499 529 879 ......................................................................... From wjs at omnigroup.com Thu Sep 17 13:53:40 1998 From: wjs at omnigroup.com (William Shipley) Date: Thu Nov 3 14:41:31 2005 Subject: Disclosure view suggestions Message-ID: <199809172053.NAA15431@ignem.omnigroup.com> I'm adding a disclosure widget to an app I'm writing for an undisclosed client, and although I haven't done it yet, I've got some pointers that might help. First off, the disclosure triangle icons are already in MacOS X -- they are called: NSTriangleNormalDown NSTriangleNormalRight NSTrianglePressedDown NSTrianglePressedRDown NSTrianglePressedRight You can use any of them just by saying: [cell setImage:[NSImage imageNamed:@"NSTriangleNormalDown"]]; You can't currently use them directly from IB, which is lame. (Hey, IB team -- add the built-in icons to the suitcase, so we can use them!) As you guessed, your approach of setting up a BIG contentView and then resizing the window to show more and less of it isn't the preferred way. OpenStep just isn't designed to handle widgets off-screen very well. Also, it's not a very general approach, as your disclosure object has to know how many pixels to show when it's clicked. My suggestion is you group everything in the "simple" view into one NSBox, and then, in a scratch window, have everything you want in the "complex" view in another box. This allows you to write a much more general disclosure object -- just have an outlet to each box, and when the user presses the button the first time you add the height of the complex box to the window and pop in the complex box, and when she presses it again you remove the second box and size the window up. My version of this is even going to put the views into a splitview, so that the user can change the proportions of them within the window. Good luck! -W From scott_ribe at killerbytes.com Thu Sep 17 17:10:42 1998 From: scott_ribe at killerbytes.com (Scott Ribe) Date: Thu Nov 3 14:41:31 2005 Subject: Metrowerks for C++? Message-ID: >From Metrowerks announcement of CW Pro: New Mac OS X Server C/C++/ObjC command line compiler and runtime libraries, can be used under Projecct Builder. So perhaps there will be a more robust version of C++ available than the version of gcc that Apple ships. Scott Ribe scott_ribe@killerbytes.com http://www.scott.net/~sribe (205) 591-9204 voice (205) 591-8167 fax From snoyes1 at .rdc1.az.home.com Thu Sep 17 19:07:52 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:31 2005 Subject: NSCopying of subclasses Message-ID: <19980918020735.AAA27582@CX268689-A> OK I can't get this to work quite right. To impliment the NSCopying protocol, the docs say subclasses have to call super, which makes since. But what do you do with supers return value. If both the super and sub class allocate an instance, how do you target the supers data to go to the right place. Or is that an aspect of the zone. From gideon at csarc.otago.ac.nz Thu Sep 17 20:44:34 1998 From: gideon at csarc.otago.ac.nz (Gideon King) Date: Thu Nov 3 14:41:31 2005 Subject: ToolTip gotchas Message-ID: <9809181544.AA342741@oklina> I am creating a custom view which has a button and a comboBox in it and wanted to set up tool tips for them. I found out that if you set them up in the initWithFrame: method, they don't work. I guess this is because it is using some sort of runtime notification to display the tooltip. I therefore put the setToolTip in the awakeFromNib. The other problem I encountered is that if you set a tool tip on a combo box, it will not stay popped up for you to make a selection. My guess is that the panel used to display the options is set to hide whenever it is not the front window, and when the tool tip tries to display, away goes the popup panel. I had to use the notifications to find out when the combo box pops up and when it goes away again. See code below. Note that the documentation is wrong about the name of the notifications - they should be: NSComboBoxWillPopUpNotification NSComboBoxWillDismissNotification not: NSComboBoxCellWillPopUpNotification NSComboBoxCellWillDismissNotification While we're talking about documentation, I've been working a lot with EOQualifiers lately, and it's a pain that the documentation will not display in project builder - I have to drag it in to OmniWeb to view it. I haven't checked whether there is updated documentation at the Apple site. ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeComboToolTip:) name:NSComboBoxWillPopUpNotification object:searchCombo]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setComboToolTip:) name:NSComboBoxWillDismissNotification object:searchCombo]; ... - (void)setComboToolTip:(id)sender { [searchCombo setToolTip:@"Enter text to search..."]; } - (void)removeComboToolTip:(id)sender { [searchCombo setToolTip:nil]; } ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon From C.Ridd at isode.com Fri Sep 18 00:46:02 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:31 2005 Subject: Strange gcc quirk In-Reply-To: Your message of "Thu, 17 Sep 1998 09:06:38 BST." <24918.906019598@isode.com> Message-ID: <27276.906104762@isode.com> On Thu, 17 Sep 1998 09:06:38 BST, Chris Ridd wrote: > I'm porting some Unix code written in C to Rhapsody, and have come > across a problem that may be a bug in Apple's port of gcc. The problem > doesn't occur on gcc 2.7.2 and gcc 2.8.1 on Solaris (nor in other > compilers), only it seems on Apple's gcc 2.7.2.1. > > It might just be that there's some mysterious new Apple parameter to > pass to gcc to make it work 'right', but I couldn't find it from > Apple's HTML'ized gcc texinfo files. > > The C code includes several of its own header files (eg and > , some of them multiple times. What seems to happen on > Rhapsody is that the second time a particular header should be > included, it isn't. What makes me think this is an Apple bug is that if > I edit the offending header file and declare a static variable in it, > cc will now include the file twice, correctly! Ken Case suggested I add -traditional-cpp to CFLAGS, to use the normal GNU cpp instead of Apple's one which can cope with precompiled headers and stuff, and lo and behold, it worked properly! So, is this a bug in Apple's cpp-precomp, or just "the way it works"? Chris From C.Ridd at isode.com Fri Sep 18 00:58:35 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:31 2005 Subject: Dynamic libs Message-ID: <27298.906105515@isode.com> Is there any relationship between the apparent version code in a dynamic library's filename (eg libFoo.A.dylib), and the version numbers stored inside a library via ld -current_version X[.Y[.Z]] ? The current_version value looks more powerful than the filename 'version', though it wasn't clear on reading ld(1) that you could link against a library with the same major version but a different minor version (the compatibility_version flag to ld), for example an app could be linked against an 8.1 lib but be satisfied on a system with an 8.0 lib. (Apologies if I've got the precise ld flags slightly wrong, but if you read the man page it'll be fairly obvious which ones I mean.) Thanks, Chris From anders at milkweed.com Fri Sep 18 06:01:21 1998 From: anders at milkweed.com (Anders Pytte) Date: Thu Nov 3 14:41:31 2005 Subject: NSCopying of subclasses Message-ID: <199809181257.IAA05000@mx02.together.net> OK I can't get this to work quite right. To impliment the NSCopying protocol, the docs say subclasses have to call super, which makes since. But what do you do with supers return value. If both the super and sub class allocate an instance, how do you target the supers data to go to the right place. Or is that an aspect of the zone. Steven, I'm not quite an ignoramus (though almost), but I will suggest that [super copy} returns storage for your object as well as the super, but only initializes (or copies) super's members. All you need to do is cast super to self and initialize (or copy) self's members. Anders. ---------------------------------------------------------------- Anders Pytte Milkweed Software Ferguson Hill Voice: (802) 472-5142 Cabot VT 05647 Internet: anders@milkweed.com ---------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/macosx-dev/attachments/19980918/493974dd/attachment.html From gerard at ina.fr Fri Sep 18 07:45:52 1998 From: gerard at ina.fr (Gerard Iglesias) Date: Thu Nov 3 14:41:31 2005 Subject: cvs 1.10.13.1 and client on WindowsNT Message-ID: <36027220.9172B990@ina.fr> I am using the new version of cvs at ftp://isp.mit.edu/users/tritan/Rhapsody/, but I don't know what I need to do to be able to checkout correctly on the NT client side, my server is a 8600/DR2 machine. When I use it as client/server between two MacOS X/DR2 machine it works very well. In fact I need a complete description of what I need to do on the NT side. I saw at http://www.codefab.com/codefab/CVS.html that I need to copy the CVSROOT/cvswrappers on the NT side setting the CVS_CLIENT_WRAPPER_FILE environment variable, but at the end it seems that the tarred file on the server side are de-tared and sent to the client side but the client don't seem to understand what it has to do with these data. I am using the last NT version at: http://download.cyclic.com/pub/cvs-1.10/windows/cvs-1.10-win.zip Do I need to compile the source updated by Wilfredo? Thanks in advance. Sincerely. -- http://www.mediaport.net/People/Gerard.IGLESIAS/ From Joe.Loda at usmail.mpct.com Fri Sep 18 08:32:26 1998 From: Joe.Loda at usmail.mpct.com (Loda, Joe) Date: Thu Nov 3 14:41:31 2005 Subject: Time in YB Message-ID: We're doing a test port of our application to YB NT (DR2) from our OSE4.2 version. In order to get the most precise timestamps possible, we were using gettimeofday to fill in timeval structures. Of course, gettimeofday does not exist in YB. What do you all suggest to get the most precise timestamps on YB/NT? Thanks, Joe --- Joe Loda, mpct Solutions Corporation, Chicago joe.loda@mpct.com (ASCII, MIME) From dyoung at vviuh221.vvi.com Fri Sep 18 09:26:38 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:31 2005 Subject: Time in YB References: Message-ID: <9809181626.AA11002@vviuh221.vvi.com> > Of course, gettimeofday does not exist in YB. Try gettimeofday() with : #import at the top of your source file. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From Joe.Loda at usmail.mpct.com Fri Sep 18 09:20:50 1998 From: Joe.Loda at usmail.mpct.com (Loda, Joe) Date: Thu Nov 3 14:41:31 2005 Subject: Time in YB Message-ID: That worked on OSE4.2, but we no longer have ntunix.h on DR2 for YB/NT. Joe -----Original Message----- From: David Young [mailto:dyoung@vviuh221.vvi.com] Sent: Friday, September 18, 1998 11:27 AM To: Loda, Joe Cc: Multiple recipients of list Subject: Re: Time in YB > Of course, gettimeofday does not exist in YB. Try gettimeofday() with : #import at the top of your source file. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From Dan_Grillo at grillo.net Fri Sep 18 09:47:47 1998 From: Dan_Grillo at grillo.net (Dan Grillo) Date: Thu Nov 3 14:41:31 2005 Subject: Time in YB Message-ID: <199809181647.LAA12062@anise.grillo.net> Loda, Joe writes: > We're doing a test port of our application to YB NT (DR2) from our OSE4.2 > version. In order to get the most precise timestamps possible, we were > using gettimeofday to fill in timeval structures. Of course, gettimeofday > does not exist in YB. What do you all suggest to get the most precise > timestamps on YB/NT? > Here's what we use: void PlatformMisc::GetTimeOfDay(long& seconds, long& microseconds) { #ifdef WIN32 _timeb t; _ftime(&t); seconds = t.time; microseconds = t.millitm * 1000; #else struct timeval t; gettimeofday(&t, NULL); seconds = t.tv_sec; microseconds = t.tv_usec; #endif } --Dan -- Dan Grillo dan@grillo.net 650 917-0685 fax 773 975-1557 From edream at mailbag.com Fri Sep 18 10:01:40 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:31 2005 Subject: Basic Zone question Message-ID: Hi all, I have some legacy C code, part of which is a C class that allows memory to be allocated to a "lifetime" which is eventually deallocated all at once, without having to free individual "objects". Can NSZone be made to accomplish the same thing? What's troubling me is the following description of NSRecycleZone: [quote] NSRecycleZone frees zone after adding any of its pointers still in use to the default zone. (This strategy prevents retained objects from being inadvertently destroyed.) [end quote] Is there a way to force the entire zone to be deallocted, without checking to see whether objects have been freed? Is there, by chance, a way to make "malloc'ed" chunks of memory look like real objects that could then be autoreleased? Edward ---------------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) LEO: http://www.mailbag.com/users/edream/front.html Sherlock: http://www.mailbag.com/users/edream/sl_index.html Apple Computer, right down there with Mercedes Benz. ---------------------------------------------------------- From edream at mailbag.com Fri Sep 18 10:09:48 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:31 2005 Subject: What happens when memory is low ? Message-ID: Hi, In the MacOS world there are several levels of low-memory routines (that don't always seem to work so well, but I digress ). What, if anything, can be done in YB when memory runs low? I haven't found any documentation about this. Is there any? Edward From Malcolm_Crawford at plsys.co.uk Fri Sep 18 10:42:23 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:31 2005 Subject: What happens when memory is low ? In-Reply-To: References: Message-ID: <199809181742.SAA02237@jasmine.plsys.co.uk> Edward wrote: > What, if anything, can be done in YB when memory runs low? > I haven't found any documentation about this. Is there any? > Quitting OmniWeb usually works wonders. Best wishes, mmalc. I'm sorry guys, this really is unfair of me, but I've had an exhausting week and I couldn't summon up the strength to resist that one. OmniWeb really is an excellent product, but it is a bit memory-hungry. More seriously, apart from that, if you're interested in how OS X might handle memory management, take a look at DejaNews in comp.sys.next.* for a note about the shrinking (or otherwise) swapfile posted by Avie Tevanian a while back. From deirdres at eni.net Fri Sep 18 11:10:09 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: What happens when memory is low ? In-Reply-To: <199809181742.SAA02237@jasmine.plsys.co.uk> Message-ID: At 10:56 AM -0700 9/18/98, mmalcolm crawford wrote: >Quitting OmniWeb usually works wonders. >I'm sorry guys, this really is unfair of me, but I've had an exhausting week >and I couldn't summon up the strength to resist that one. OmniWeb really is >an excellent product, but it is a bit memory-hungry. > >More seriously, apart from that, if you're interested in how OS X might >handle memory management, take a look at DejaNews in comp.sys.next.* for a >note about the shrinking (or otherwise) swapfile posted by Avie Tevanian a >while back. Yeah, it is true though. The other thing I found that plagued me was a leak in Resound (if you open a .mp2 file, play it, close it, open and play another, after a while your swap file is HUGE, but if you quit the app between tracks this doesn't happen). Getting a second old Mac running BeOS fixed this one though. :) _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From decker at robdecker.com Fri Sep 18 12:37:27 1998 From: decker at robdecker.com (Robert A. Decker) Date: Thu Nov 3 14:41:31 2005 Subject: Tracking down a crashing problem under deployment? In-Reply-To: Message-ID: I've deployed something and now am having some crashing problems that don't normally occur when I'm testing and just hitting the page myself (it probably has to do with many more users than I can do under testing). What can I do to track this down? I don't see any core dump files (I'm on OpenStep) for my application. How can I get those? After I get them how can I open them in gdb and see a stack trace to see what was called near the time of the crash? thanks, rob -- "Robert A. Decker" rob@robdecker.com http://www.robdecker.com/ Programmer Analyst - Health Media Research Lab University of Michigan Comprehensive Cancer Center "Get A Life" quote #2: "Has anyone seen Chris? I have some last minute instructions for the scene where he wrestles the evil monkey." -Get a Life From tgritton at sprynet.com Fri Sep 18 12:02:12 1998 From: tgritton at sprynet.com (Terry Gritton) Date: Thu Nov 3 14:41:31 2005 Subject: iX3D Ultimate Rez, RDR2 - nogo Message-ID: <199809181910.MAA16680@m2.sprynet.com> 8600/300, RDR2, iX3D Ultimate Rez sigh, such a deal but not only no second monitor, if the card is in a PCI slot (#2) even with no monitor attached RDR2 freezes after 10-20 mouse clicks. So you can't use second monitor in MacOS then boot into RDR2 without removing card. Hope CR1 will fix this. From seanl at cs.umd.edu Fri Sep 18 12:09:38 1998 From: seanl at cs.umd.edu (Sean Luke) Date: Thu Nov 3 14:41:31 2005 Subject: What happens when memory is low ? In-Reply-To: Message-ID: Sorry for a relatively Rhapsody-free post, but since this was posted here I think it's fair to respond. On Fri, 18 Sep 1998, Deirdre Saoirse wrote: > Yeah, it is true though. The other thing I found that plagued me was a leak > in Resound (if you open a .mp2 file, play it, close it, open and play > another, after a while your swap file is HUGE, but if you quit the app > between tracks this doesn't happen). Getting a second old Mac running BeOS > fixed this one though. :) Isn't wonderful that as a developer you never hear a peep of a bug report about a problem for _months_, and only find out about it in the public venue? If you can give me a specific example, I may be able to look into it. Most likely, it's due to our brand-new MP2 loading code. Sean Luke seanl@cs.umd.edu From deirdres at eni.net Fri Sep 18 12:22:36 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: What happens when memory is low ? In-Reply-To: References: Message-ID: At 3:09 PM -0400 9/18/98, Sean Luke wrote: >On Fri, 18 Sep 1998, Deirdre Saoirse wrote: > >> Yeah, it is true though. The other thing I found that plagued me was a leak >> in Resound (if you open a .mp2 file, play it, close it, open and play >> another, after a while your swap file is HUGE, but if you quit the app >> between tracks this doesn't happen). Getting a second old Mac running BeOS >> fixed this one though. :) > >Isn't wonderful that as a developer you never hear a peep of a bug report >about a problem for _months_, and only find out about it in the public >venue? Uh, I posted about it BOTH publically and mentioned it privately. This was in June I believe. I no longer have my Rhapsody mail archives handy (since I'm now using the MacOS on a daily basis). But it is 100% reproduceable. >If you can give me a specific example, I may be able to look into it. >Most likely, it's due to our brand-new MP2 loading code. Actually, this was from the then-current version. I haven't booted into Rhapsody much in the last month. _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From Pradeep.Bashyal at ebs.ac.com Fri Sep 18 12:17:15 1998 From: Pradeep.Bashyal at ebs.ac.com (Pradeep Bashyal - VIA) Date: Thu Nov 3 14:41:31 2005 Subject: Better CLI ? Message-ID: <3.0.5.32.19980918141715.0090cd90@ebsmmfs001.servicenet.net> Hi, Before I digress with my question, I would like to say this is not a flame or a flame bait. I grew up with VMS in college and really liked DCL (the CLI of VMS). Now at work I get to use Solaris, and I find Unix commands to be really obtuse, inconsistent and unfriendly, though I have learned to grep and gawk fine. But, I do wish for a better CLI. Hence I was wondering how hard it would be write another shell (probably similar to DCL) that would run instead of the default shell in MacOS X Server. Would it be just another server on top of Mach ? Does such a beast exist ? It would be nice to have easy to use CLI with the easiest to use GUI. The best of both worlds. Thank you for your time. P From seanl at cs.umd.edu Fri Sep 18 12:38:49 1998 From: seanl at cs.umd.edu (Sean Luke) Date: Thu Nov 3 14:41:31 2005 Subject: What happens when memory is low ? In-Reply-To: Message-ID: On Fri, 18 Sep 1998, Deirdre Saoirse wrote: > Uh, I posted about it BOTH publically and mentioned it privately. [taken off line] > >If you can give me a specific example, I may be able to look into it. > >Most likely, it's due to our brand-new MP2 loading code. > > Actually, this was from the then-current version. I haven't booted into > Rhapsody much in the last month. Ah, The then-current version was for the DR1. There's a new version since. If anyone finds memory problems loading from DR2 using MP2 files, we'd sure like to know. I've also still not heard any mention from Apple about the plans for the SoundKit in CR1...does anyone know what's going to happen here? Sean Luke seanl@cs.umd.edu From edream at mailbag.com Fri Sep 18 14:03:52 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:31 2005 Subject: Basic Zone question Message-ID: Hi, I gather that the "problem", if that is the right word, with Zones is that malloc and alloc always use the current Zone. There is no way to create a "private" zone; the current zone is always having objective-C objects allocated in it, and NSRecycleZone's policy of moving unfreed objects into the default Zone becomes essential. The "lifetime" class that I mentioned is important for applications such as compilers that create huge numbers of small objects. Prof. David Hanson describes such a class (he calls it an "arena") in his book, "C Interfaces and Implementations". David Young points out that using NSData's bytes method allows one to create a "private" pseudo-alloc, and that autoreleasing such data would eliminate the need for any calls to free(). This would not work so well in a compiler because of the overhead in maintaining an autorelease pool containing a great many objects. Edward ---------------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) LEO: http://www.mailbag.com/users/edream/front.html Sherlock: http://www.mailbag.com/users/edream/sl_index.html Apple Computer, right down there with Mercedes Benz. ---------------------------------------------------------- From deirdres at eni.net Fri Sep 18 14:19:00 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: What happens when memory is low ? In-Reply-To: Message-ID: At 1:22 PM -0700 9/18/98, Sean Luke wrote: >> Uh, I posted about it BOTH publically and mentioned it privately. > >[taken off line] Just a correction: Apparently Sean didn't get the information necessary for correcting the problem, though I do remember emailing *someone* about it at length (sorry, I have never migrated all my Rhapsody mail over to the Mac and I can't mount the drive under either Linux or the MacOS to search it). I found a workaround that worked for me (quitting the app between songs) however I switched to using a second computer for audio because I found the mono in DR2 extremely annoying. I've sent him detailed instructions on how to reproduce. If anyone else is having these issues, I can email you about it privately. If I recall, I emailed the other developer about the issue, but not Sean. (this originally came up because I was having "the swapfile ate my hard disk" problems and OmniWeb was also a culprit) _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From robert at brightid.se Fri Sep 18 14:32:01 1998 From: robert at brightid.se (Robert Claeson) Date: Thu Nov 3 14:41:31 2005 Subject: Better CLI ? Message-ID: <003901bde34b$c620e9a0$0c00a8c0@thunder.bright.nu> Pradeep Bashyal - VIA wrote: >I grew up with VMS in college and really liked DCL (the >CLI of VMS). Now at work I get to use Solaris, and I find >Unix commands to be really obtuse, inconsistent and unfriendly, >though I have learned to grep and gawk fine. But, I do wish for >a better CLI. Funny, when *I* had to work on VMS, the first thing I did was writing a CD.COM command so that I could use "cd" like in Unix. Better than writing "SET DEFAULT SYS:[THIS.THAT.AND.THIS]" to change the current directory. >Hence I was wondering how hard it would be write another shell >(probably similar to DCL) that would run instead of the default >shell in MacOS X Server. Would it be just another server on >top of Mach ? Does such a beast exist ? Somebody sure has done it. Back when I worked for Encore, there was a commercial third-party product named VCL (I think) that implemented a DCL look-and-work-alike for Unix. There was also an EDT editor (although I much prefered Emacs or EVE rather than EDT under VMS). I don't remember the name of the company, and I'm not sure whether they're still in business. I haven't seen a PD or GPL or otherwise non-cost available DCL look-alike. From fan at chem.ucla.edu Fri Sep 18 20:42:51 1998 From: fan at chem.ucla.edu (Paul S. Fan) Date: Thu Nov 3 14:41:31 2005 Subject: [summary] Newbie EOF question Message-ID: <199809190342.UAA03472@krypton.chem.ucla.edu> Dear Group - I asked the following question > I would like to turn off the following behavior > in TextEdit - namely, control-click on a TextEdit > document pops up a small "copy-paste" menu. This > behavior is interfering with the normal behavior of > control-drag in Interface Builder when applied to > to a TextView object. A workaround was provided by John Kuszewski. ----------------------------------------------------------- I ran into the same problem a few weeks ago. The way to do it is to change the nib window from instance view to outline view (the little buttons on the top right near the scrollbar). Look at the ScrollView-- it has a filled circle to its left, indicating that it contains other views. Double click there to open it up, et voila! there's the TextView. Now just control-drag from that line of the outline view to the EODisplayGroup, and you're all set. ----------------------------------------------------------- Best, Paul From theisen at akaMail.com Sat Sep 19 13:21:20 1998 From: theisen at akaMail.com (Dirk Theisen) Date: Thu Nov 3 14:41:31 2005 Subject: Coding vs. Java Serialization? Message-ID: <1dfmib9.6f7b06xo3w2qM@ascend-tk-p220.rhrz.uni-bonn.de> Hello! I found the PPL (persistent property list) class in Apples "usefulStuff" directory on ftp. Has anyone used this class extensively? As I understand it, this can be used to achieve some leightweight DB-features. Has anyone used it to archive some "tens of thousands" of objects? I wonder if it can be used in conjunction with Java. Has anyone tried if the java bridge connects the two serialization mechnisms found in OS and in Java? I.e. can I put Java object into a PPL? Regards, Dirk -- No RISC - No fun From sarwat at interlog.com Sat Sep 19 16:32:24 1998 From: sarwat at interlog.com (Sarwat Khan) Date: Thu Nov 3 14:41:31 2005 Subject: Setting ANSI complicance with PB Message-ID: I'm doing a simple ANSI C project in Project Builder (it's an assignment for a comp. sci course). I need to make sure it's ANSI compliant, but I'm unsure of how to configure the makefiles to set gcc (or whatever is being used) to use ANSI compliance. I think normally you'd use gcc -Wall Any tips? ............................................................ Sarwat Khan Brampton, Ontario sarwat@interlog.com http://www.interlog.com/~sarwat From tjw at omnigroup.com Sat Sep 19 19:08:35 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:31 2005 Subject: Basic Zone question In-Reply-To: References: Message-ID: <199809200208.TAA10204@ignem.omnigroup.com> Short answer: Not any more. Long Answer: In the NEXTSTEP 3.3 days, there used to be support for this type of operation in addition to a notion of child-zones. Any zone other than the default was a child of the default. Any child could either be totally torched, or merged into its parent. With the move to OpenStep, these capabilities were either removed or hidden. The primary reason for this, I'm guessing, is that Foundations reference counting scheme (ie, -retain and -release) use a *global* external reference counting table. This means that if you destroyed a zone that had NSObjects in it, you could potentially deallocate objects that still had external references (and hence, entries in the table). This makes sense in a way since the references could be originating from objects outside of the zone. But in many cases, all of the references are internal references. Take for example, the case of building a large parse tree. Only the root of the tree will likely have an external reference while all the others are internal. Some of this could be solved if Foundation used a per-zone external ref count table. Now, this doesn't mean that you have to use NSZone. You could use the low level allocator yourself (vm_allocate()/vm_deallocate(), or better NSAllocateMemoryPages/NSDeallocateMemoryPages). If you have code to free a whole bunch of memory containing suballocations, it sounds like you have your own version of 'malloc' dealing with these 'lifetimes'. If this is the case, it is probably using valloc()/vfree() or sbrk() or some other low level allocator. You might be able to just substitute the NS page functions and off you go. You'll want to avoid attempting to put any Foundation objects in this area though (you'd have to do some work to get that to happen anyway). -tim From: "Edward K. Ream" Subject: Basic Zone question Hi all, I have some legacy C code, part of which is a C class that allows memory to be allocated to a "lifetime" which is eventually deallocated all at once, without having to free individual "objects". Can NSZone be made to accomplish the same thing? What's troubling me is the following description of NSRecycleZone: [quote] NSRecycleZone frees zone after adding any of its pointers still in use to the default zone. (This strategy prevents retained objects from being inadvertently destroyed.) [end quote] Is there a way to force the entire zone to be deallocted, without checking to see whether objects have been freed? Is there, by chance, a way to make "malloc'ed" chunks of memory look like real objects that could then be autoreleased? Edward ---------------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) LEO: Message-ID: At 5:21 PM -0700 9/17/98, Scott Ribe wrote: >>From Metrowerks announcement of CW Pro: > >New Mac OS X Server C/C++/ObjC command line compiler and runtime libraries, >can be used under Projecct Builder. > >So perhaps there will be a more robust version of C++ available than the >version of gcc that Apple ships. > Yes and no. Apparently Metrowerks is not including their C++ standard library with these tools. They have opted to build a carbon-ized version of their Metrowerks Standard Library for MacOSX, but have no plans to support MacOSX Server. So the MW tools will probably work fine, unless you wish to use such basic C++ stuff as iostream, vector, and string. :( It may be possible to take a third-party version of STL (e.g., ObjectSpace) and build it with MW C++, although I haven't tried this. bud ! Dan "Bud" Keith dbk@mcs.com ! "You never can tell what goes on down below. This pool might be bigger than you or I know." - Dr. Seuss From schuerig at acm.org Sun Sep 20 01:14:29 1998 From: schuerig at acm.org (Michael Schuerig) Date: Thu Nov 3 14:41:31 2005 Subject: Metrowerks for C++? In-Reply-To: Message-ID: At 6:20 Uhr +0200 20.09.1998, Dan Keith wrote: > It may be possible to take a third-party version of STL (e.g., >ObjectSpace) and build it with MW C++, although I haven't tried this. CodeWarrior on Mac OS works with the free STLport. Unfortunately that doesn't help much for strings and streams. Michael From Stefan.Boehringer at ruhr-uni-bochum.de Sat Sep 19 10:57:08 1998 From: Stefan.Boehringer at ruhr-uni-bochum.de (Stefan.Boehringer@ruhr-uni-bochum.de) Date: Thu Nov 3 14:41:31 2005 Subject: VM-question Message-ID: <9809201006.AA00314@christine> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 689 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980919/8a22c0fa/attachment.bin From ayoungs at rochester.rr.com Sun Sep 20 08:16:56 1998 From: ayoungs at rochester.rr.com (Andy Youngs) Date: Thu Nov 3 14:41:31 2005 Subject: Perl,MD5,makefiles,GUI from Legacy examples Message-ID: Well I've been trying to get a bunch of things working to no avail MD5 with Perl to run authenticator roadrunner stuff the autoconf stuff where one of the files needs Perl (autoscan) I have the lateset version on Peak site of Perl Perl-5.004_04.1.README Mar 19, 1998 Is this a matter of just updating the Makefile to DR2 (which I'm using) Now the reason I want to use autoscan or attempt it anyway. I want to take Legacy type Solaris ,OS/2 (etc) Ansi C apps and get them compiled on DR2. There is a huge potential here in Rochester NY to show Mac OS X Servers power. I've played around with simple stuff that uses a simple Makefile but we have some stuff that has some Makefiles that are just a nightmare! Another admin type issue but developer related is getting Road runner up with MD5. There's a local version of a Perl authentication script but MD5 refuses to do anything when that line of script is executed. Now the next phase of the Legacy code would be to add yellow Box GUI. Are there any simple example out there that folks can share with me? I have many ideas but want to see what the typical practice in with DR2. I'd be doing my coding in Objective C. Is my thinking correct in taking the legacy main() and turning it into another function like legacymain() and calling it from an Objective c file? References to documentation would be very helpful. I'd also like to say bravo at all the emails I get at all the folks hard work out there! Regards Andy Youngs From richs at win.bright.net Sun Sep 20 15:00:00 1998 From: richs at win.bright.net (Rich Schroedel) Date: Thu Nov 3 14:41:31 2005 Subject: Creating NSImage in off-screen cache Message-ID: <36057ADE.AE012AE6@win.bright.net> In my application, I need to create an NSImage object using off-screen cache. Can anyone point me to a code example of how to do this? The NSImage object is to be used in a view. It's a graph that can take hours to draw, hence the desire to create an image for redisplay. -- Rich Schroedel richs@win.bright.net From oloft at tengil5.cs.chalmers.se Sun Sep 20 15:16:37 1998 From: oloft at tengil5.cs.chalmers.se (Olof Torgersson) Date: Thu Nov 3 14:41:31 2005 Subject: Forcing display Message-ID: <9809210016.AA376932@tengil5.cs.chalmers.se> I load a number of pictures into a custom view using compositeToPoint: However, since it takes a lot of time to load the pictures I would like to show a default image while the images are being loaded. The problem is that the window is not updated until the large pictures are loaded so the deafult image is only displayed just before the large ones are shown. Is there any way to force the view to redraw itself? Sending display has no effect. Olof Torgersson oloft@cs.chalmers.se Department of Computing Science +46 31 772 54 06 G?teborg University & Chalmers University of Technology S-412 96 G?TEBORG, SWEDEN From sarwat at interlog.com Sun Sep 20 13:35:42 1998 From: sarwat at interlog.com (Sarwat Khan) Date: Thu Nov 3 14:41:31 2005 Subject: Setting ANSI complicance with PB Message-ID: Well, I found out that forcing ansi compliance with cc -ansi just won't work. My file included Apple's stdio.h which the compiler barfed on. I think it had trouble with line 338 or so (something before 'int'). I didn't know how to jump to that line number in PB so I didn't bother to find out what it was. It compiled fine without 'ansi. I was trying this out from the shell; I didn't figure out how to get PB to do this. I thought about messing with some of those vars in the makefile.preamble but I didn't bother. There's some descrepencies between cc's -ansi and Metrowerk's "ANSI Strict". The following works in Metrowerks: typedef struct WindowRecord WindowRecord; typedef WindowRecord * WindowPeek; struct WindowRecord {...}; ... sizeof(WindowRecord); It will only work like this when using cc: typedef struct WindowRecord WindowRecord; typedef struct WindowRecord * WindowPeek; struct WindowRecord {...}; ... sizeof (struct WindowRecord); With cc, WindowRecord seems to remain an incomplete type. Which one is right? Like I said, I'm doing this for an assignment and TAs tend to be picky about junk like this. ............................................................ Sarwat Khan Brampton, Ontario sarwat@interlog.com http://www.interlog.com/~sarwat From buck.erik at mcleod.net Sun Sep 20 18:28:26 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:31 2005 Subject: Creating NSImage in off-screen cache Message-ID: <01bde4ff$214c8be0$7e2510d0@default> You have two options for off screen images. The first and best is to take advantage of the fact that NSImage already uses an off screen window to cache its representations before compositing on screen. NSImage *myImage = [[NSImage alloc] initWithSize:NSMakeSize(2000.0, 2000.0)]; [myImage lockFocus]; // Draw to your hart's content [myImage unlockFocus]; The other way is to draw into arbitrary bytes and then load the bytes into an NSImageRep and add the rep to an NSImage instance. If you are using your own rasterization or ding image conversions or something, that is the way you want to go. I strongly suggest RTFM. From buck.erik at mcleod.net Sun Sep 20 18:30:40 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:31 2005 Subject: Forcing display Message-ID: <01bde4ff$71052d40$7e2510d0@default> Draw your default images. The call [self performSelector:@selector(myLongMethod:) withObject:nil afterDelay:0.0]; [[self window] flushWindowIfNeeded]; Load and composite the large images in myLongMethod: which will be called after the window is flushed. From tjw at omnigroup.com Mon Sep 21 01:53:52 1998 From: tjw at omnigroup.com (Timothy J. Wood) Date: Thu Nov 3 14:41:31 2005 Subject: VM-question In-Reply-To: <9809201006.AA00314@christine> References: <9809201006.AA00314@christine> Message-ID: <199809210853.BAA06400@ignem.omnigroup.com> You might be able to use vm_deactivate() to flush the page out, but I'm guessing that remapping is really the best bet. Note that you don't have to remap the entire file (although it shouldn't cost any more). You could just deallocate the one page and the remap that section of the file by using map_fd's support for starting at a given offset and only mapping a give range. You can just request that map_fd map in that one page in the same location that it was before. -tim From C.Ridd at isode.com Mon Sep 21 07:20:59 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:31 2005 Subject: compile c++ in console In-Reply-To: Your message of "Mon, 20 Apr 1998 22:18:44 EDT." Message-ID: <3535.906387659@isode.com> On Mon, 20 Apr 1998 22:18:44 EDT, Aaron Iba wrote: > Hello, I am trying to just get simple c++ programs to compile from the console. > > So far, I create a simple program that include and cout's some > text. It compiles with the command: "cc test.cpp", but I get errors. I > tried passing some arguments, all of which either have no affect or cause > it not to be able to find "iostream.h" Read the documentation on the compiler. I always forget where it is but it's in HTML, and it's on the CD. (Look for a directory called "Compiler".) Try using c++ instead of cc. Try renaming the source file with one of the extensions the compiler is expecting (cpp means a C pre-processor file not C++ source, if I'm not mistaken) Chris From zander at RelevantKnowledge.COM Mon Sep 21 08:38:59 1998 From: zander at RelevantKnowledge.COM (Aleksey Sudakov) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <9809211539.AA00301@RelevantKnowledge.COM> Hello, Could anybody comment on what would it take to make Rhapsody do IP-masquerading? Is RDR 2 kernel good enouth or we should wait well another five years? Regards, Aleksey From edream at mailbag.com Mon Sep 21 09:09:39 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:31 2005 Subject: Do command line args work in YB for Win95? Message-ID: Hi, My app runs fine unless the argv vector is initialized using the "big check mark" in the launch window. In that case the app never appears to load at all! I've removed all code in my app that references arc, argv, so it seems that NSApplicationMain is somehow choking on the command line. It appears that the argv vector is set properly: argv[0] is the app's name, followed by the args that I typed. The behavior is the same no matter what args I pass. Does anyone know what might be going on? Is this a known problem with YB for Win95? As always, thanks for your help. Edward From zander at RelevantKnowledge.COM Mon Sep 21 09:22:42 1998 From: zander at RelevantKnowledge.COM (Aleksey Sudakov) Date: Thu Nov 3 14:41:31 2005 Subject: MiscKit 2.0.5 on RDR 2 Message-ID: <9809211622.AA00327@RelevantKnowledge.COM> Hello again, BTW, MiscKit 2.0.5 do compile on RDR 2 after converting makefiles and minor tweaks in MiscFoundation (Don't forget to change installation directory if you plan to install). Following are the tweak I made to built it 1. Removed MiscFoundation/MiscINET.subproj. It doesn't compile right away and IMHO is obsolete even on OpenStep 4.2. I am not sure whenever I submitted extensions to NSFileHandle inspired by Scott Anguish MiniExamples. 2. Removed MiscSerialPort and MiscXModem. They do not compile right away and as far as I could tell could be easily fixed by including couple more header files, but the real question is "Doesn't NSFileHandle make it obsolete as well?" 3. regexpr.c is broken at line 35 that needs to be commented. If there will be any interest I could upload RDR2/Intel binaries to http://garagesoftware.ml.org Regards, Aleksey From Joe.Loda at usmail.mpct.com Mon Sep 21 09:57:41 1998 From: Joe.Loda at usmail.mpct.com (Loda, Joe) Date: Thu Nov 3 14:41:31 2005 Subject: Help - Crash Message-ID: In trying to port our app over to YB/NT/DR2, we are experiencing the following crash. Our code is trying to do an NSLog from within a +load method. This code, of course, runs fine on OSE4.2 as well as Mach 4.2. Seems to be some real interesting things on the stack just for a simple NSLog. Any ideas? Thanks, Joe --- Program was hung, so we hit ^C --- (gdb) cont Continuing. gdb: interrupted by ^C Program received signal SIGINT, Interrupt. 0x77f6819b in TryEnterCriticalSection () (gdb) bt #0 0x77f6819b in TryEnterCriticalSection () #1 0x77f1c690 in WaitForMultipleObjects () #2 0x3100c212 in _condition_wait_special () #3 0x3100e2ff in __portinfo_wait () #4 0x3100d190 in port_receive () #5 0x3100d37c in msg_receive () #6 0x3100d400 in msg_rpc () #7 0x3100be9e in bootstrap_rpc () #8 0x3100c008 in bootstrap_look_up () #9 0x32034a7a in -[NSConcreteMachDNC sendMessageToServer:] () #10 0x3203470d in -[NSConcreteMachDNC _registerName:object:suspensionBehavior:] () #11 0x3203407e in -[NSDistributedNotificationCenter changedSuspensionBehavior:na me:object:] () #12 0x32036d36 in -[NSNotificationCenter addObserver:selector:name:object:flags: ] () #13 0x320343c7 in -[NSDistributedNotificationCenter addObserver:selector:name:ob ject:suspensionBehavior:] () #14 0x3209b530 in +[NSTimeZone systemTimeZone] () #15 0x3209b5f9 in +[NSTimeZone defaultTimeZone] () #16 0x32091658 in -[NSCalendarDate initWithTimeIntervalSinceReferenceDate:] () #17 0x3209553d in +[NSDate date] () #18 0x320618a7 in _NSDefaultLogCString () #19 0x32061c9f in NSLogv () ---Type to continue, or q to quit--- #20 0x32061c03 in NSLog () #21 0x10096768 in -[ISCEnvironment init] (self=0xd15cf0, _cmd=0x31016f6a) at ISCEnvironment.m:94 #22 0x100969d4 in +[ISCEnvironment instance] (self=0x102c3c88, _cmd=0x1018f509) at ISCEnvironment.m:162 #23 0x10099877 in -[ISCEODatabaseContextDelegate init] (self=0xd15c60, _cmd=0x31016f6a) at ISCEODbContextDelegate.m:138 #24 0x1009982c in +[ISCEODatabaseContextDelegate instance] (self=0x102c50fc, _cmd=0x1018f509) at ISCEODbContextDelegate.m:121 #25 0x10099b14 in +[ISCEODatabaseContextDelegate load] (self=0x102c50fc, _cmd=0x310179ca) at ISCEODbContextDelegate.m:208 #26 0x31005e3d in _objc_call_loads_for_image () #27 0x3100603c in objcInit () #28 0x3100146c in objc_finish_header () #29 0x1018df2b in NSRegisterDLL () #30 0x1018de79 in DllMain@12 () #31 0x1018e247 in _DllMainCRTStartup@12 () #32 0x77f61c3f in TryEnterCriticalSection () #33 0x77f61187 in TryEnterCriticalSection () --- Joe Loda, mpct Solutions Corporation, Chicago joe.loda@mpct.com (ASCII, MIME) From Dan_Grillo at grillo.net Mon Sep 21 09:58:18 1998 From: Dan_Grillo at grillo.net (Dan Grillo) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <199809211658.LAA25405@anise.grillo.net> Aleksey Sudakov writes: > > Could anybody comment on what would it take to make Rhapsody do > IP-masquerading? Is RDR 2 kernel good enouth or we should wait well another > five years? > The Rhapsody kernel is "almost" good enough. If Apple would include the FreeBSD "tun" driver in the Rhapsody kernel, it's easy to write address translation, and it's easy to write a ppp daemon, and it's easy to write a VPN software, all without additional kernel code. See the FreeBSD man pages for tun(4) and pppd(8). For networking, file serving, web serving, time-sharing, etc, I recommend FreeBSD over Rhapsody. I would prefer to recommend Rhapsody. --Dan -- Dan Grillo dan@grillo.net 650 917-0685 fax 773 975-1557 From edream at mailbag.com Mon Sep 21 10:37:50 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:31 2005 Subject: More re: command line args on YB for Win95 Message-ID: Hi, As you will recall, my app will work without command line arguments specified, and hangs with any specified, even though the arguments are used only by NSApplicationMain. It looks as though this is some kind of startup problem; passing an argv vector made "by hand" does not change the symptoms: int main ( int argc, char * argv [] ) { int my_argc = 1 ; char * my_argv = { "path_to_my_app.exe", NULL } ; return NSApplicationMain ( my_argc, my_argv ) ; } Any help would be appreciated. Cheers, Edward From deirdres at eni.net Mon Sep 21 10:42:18 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: <9809211539.AA00301@RelevantKnowledge.COM> Message-ID: At 8:41 AM -0700 9/21/98, Aleksey Sudakov wrote: > Could anybody comment on what would it take to make Rhapsody do > IP-masquerading? Is RDR 2 kernel good enouth or we should wait > well another five years? Are you talking about IP masquerading over a LAN? Because that would require dual ethernet support. I don't know about the changes for Rhapsody, but the Mach kernel used in MkLinux DOES NOT support two ethernet connections. _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From jhendry at cmg.FCNBD.COM Mon Sep 21 10:56:12 1998 From: jhendry at cmg.FCNBD.COM (Jonathan Hendry) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: References: Message-ID: <199809211756.MAA03842@wo1085.cmg.FCNBD.COM> Deirdre wrote: >Are you talking about IP masquerading over a LAN? Because that would >require dual ethernet support. I don't know about the changes for Rhapsody, >but the Mach kernel used in MkLinux DOES NOT support two ethernet >connections. Two ethernet connections worked in Rhapsody DR1, and works in OpenStep 4.2. It's a little messy, though, and DO and NXHosting don't work in this config AFAIK. Don't know about DR2 or the final release. - Jon From Dan_Grillo at grillo.net Mon Sep 21 11:12:47 1998 From: Dan_Grillo at grillo.net (Dan Grillo) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <199809211812.NAA26133@anise.grillo.net> Jonathan Hendry writes: > > Two ethernet connections worked in Rhapsody DR1, and works > in OpenStep 4.2. It's > a little messy, though, and DO and NXHosting don't work > in this config AFAIK. Don't know about DR2 or the final release. Two interfaces have always worked in NEXTSTEP (remember the NeXT Cube token-ring card?), as long as you used static routes. There used to be a bug in the 4.3-based NeXT kernel that running a routing table-maintainer like routed w/multiple interfaces would eventually lock up the kernel. I doubt the 4.4 kernel has this problem. DO/PDO has never worked correctly with multiple interfaces in all configurations. It works if you are careful and understand IP. It's actually a hard problem. Iona's CORBA implementation has the same kinds of issues. N[XS]Hosting works as long has you NXHost to the primary interface on the display machine. --Dan -- Dan Grillo dan@grillo.net 650 917-0685 fax 773 975-1557 From pmeyers at moon.jic.com Mon Sep 21 11:17:27 1998 From: pmeyers at moon.jic.com (Paul A. Meyers) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <199809211814.OAA03584@moon.jic.com> On 9/21/98 1:51 PM Deirdre Saoirse sent this: >At 8:41 AM -0700 9/21/98, Aleksey Sudakov wrote: >> Could anybody comment on what would it take to make Rhapsody do >> IP-masquerading? Is RDR 2 kernel good enouth or we should wait >> well another five years? > >Are you talking about IP masquerading over a LAN? Because that would >require dual ethernet support. I don't know about the changes for Rhapsody, >but the Mach kernel used in MkLinux DOES NOT support two ethernet >connections. > IP Masquerading does not require multiple ethernet support, but does require multihoming. You can use IP Masquerading with a single ethernet adapter (although you take a performance hit because of frequent packet collisions). Paul Meyers pmeyers@moon.jic.com From deirdres at eni.net Mon Sep 21 12:04:30 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: <199809211814.OAA03584@moon.jic.com> Message-ID: At 11:34 AM -0700 9/21/98, Paul A. Meyers wrote: > IP Masquerading does not require multiple ethernet support, but does > require multihoming. You can use IP Masquerading with a single ethernet > adapter (although you take a performance hit because of frequent packet > collisions). This is actually true, though in practice it uses multi-ethernet for the reason you mentioned -- I tend to think of the two together because I work for an ISP and we in practice always use two NIC cards for that. What isn't supported in the Mach kernel used for MkLinux is multiple ethernet (it is multihomed because you can do IP masquerading with PPP and ethernet). I wonder what they changed in the kernel from the one used for MkLinux? There are a lot of people who would really like to fix that. Speaking of which, did they ever get multihoming support in the MacOS? Every time I checked, it kept getting pushed farther out. _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From zander at RelevantKnowledge.COM Mon Sep 21 12:25:21 1998 From: zander at RelevantKnowledge.COM (Aleksey Sudakov) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: <199809211658.LAA25405@anise.grillo.net> References: <199809211658.LAA25405@anise.grillo.net> Message-ID: <9809211925.AA00398@RelevantKnowledge.COM> : Aleksey Sudakov writes: : > Could anybody comment on what would it take to make Rhapsody do : > IP-masquerading? Is RDR 2 kernel good enouth or we should wait well : another : > five years? : > Dan Grillo wrote: : The Rhapsody kernel is "almost" good enough. : : If Apple would include the FreeBSD "tun" driver : in the Rhapsody kernel, it's easy to write : address translation, and it's easy to write a ppp : daemon, and it's easy to write a VPN software, all : without additional kernel code. Any intriguing comments from somebody close to the kernel sources? Deirdre Saoirse-Savino wrote: : What isn't supported in the Mach kernel used for MkLinux is multiple : ethernet (it is multihomed because you can do IP masquerading with PPP and : ethernet). What about RDR2? IP masquerading with PPP and ethernet is what I am primarily is looking for. We've got PPP, but well who doesn't have a LAN at home these days? So I guess only guys at Apple could clear this issue out but they are not authorized to speak. Still anybody got any ideas where could I check how good the kernel is and what is missing? Regards, Aleksey From soward at uky.edu Mon Sep 21 12:21:52 1998 From: soward at uky.edu (John Soward) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading References: Message-ID: <3606A750.D23991F2@uky.edu> Deirdre Saoirse wrote: > > At 11:34 AM -0700 9/21/98, Paul A. Meyers wrote: > > IP Masquerading does not require multiple ethernet support, but does > > require multihoming. You can use IP Masquerading with a single ethernet > > adapter (although you take a performance hit because of frequent packet > > collisions). > > This is actually true, though in practice it uses multi-ethernet for the > reason you mentioned -- I tend to think of the two together because I work > for an ISP and we in practice always use two NIC cards for that. What isn't > supported in the Mach kernel used for MkLinux is multiple ethernet (it is > multihomed because you can do IP masquerading with PPP and ethernet). > Hmm, I'm not sure I see why it would result in frequent collisions. The driver level stuff should only try to send one frame at a time based on the devices MAC address, not it's IP address. I suppose if the various parts weren't implemented correctly...then I suppose mulitple protocols on the same adapter would result in a similar problem. I've not observed higher collision rates on any of my FreeBSD systems with >1 IP per device...but I may be missing something here.. -- John Soward JpS Sr. Systems Programmer 'The Midnight sun will burn you up.' University of Kentucky (NeXT and MIME mail OK) -R. Smith From Dan_Grillo at grillo.net Mon Sep 21 12:33:10 1998 From: Dan_Grillo at grillo.net (Dan Grillo) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <199809211933.OAA26658@anise.grillo.net> > : Aleksey Sudakov writes: > : > Could anybody comment on what would it take to make Rhapsody do > : > IP-masquerading? Is RDR 2 kernel good enouth or we should wait well > : another > : > five years? > Dan Grillo wrote: > : The Rhapsody kernel is "almost" good enough. > : > : If Apple would include the FreeBSD "tun" driver > : in the Rhapsody kernel, it's easy to write > : address translation, and it's easy to write a ppp > : daemon, and it's easy to write a VPN software, all > : without additional kernel code. Aleksey Sudakov writes: > Any intriguing comments from somebody close to the kernel sources? [...] > IP masquerading with PPP and ethernet is what I am primarily is looking for. > We've got PPP, but well who doesn't have a LAN at home these days? > > So I guess only guys at Apple could clear this issue out but they are not > authorized to speak. Still anybody got any ideas where could I check how good > the kernel is and what is missing? The tun driver isn't in RDR2. If you want ppp w/enet and address translation, FreeBSD is your best bet. Linux requires kernel changes to do address translation. Address translation with FreeBSD is this easy if you have a ppp connection and a home lan: 1. get pppd working doing dial on demand (for example, I run ppp -auto my-isp) 2. change it to ppp -alias -auto my-isp --Dan -- Dan Grillo dan@grillo.net 650 917-0685 fax 773 975-1557 From deirdres at eni.net Mon Sep 21 13:51:17 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: <199809211933.OAA26658@anise.grillo.net> Message-ID: At 12:50 PM -0700 9/21/98, Dan Grillo wrote: >The tun driver isn't in RDR2. If you want ppp w/enet and >address translation, FreeBSD is your best bet. Linux >requires kernel changes to do address translation. > >Address translation with FreeBSD is this easy if you have >a ppp connection and a home lan: > >1. get pppd working doing dial on demand (for example, I run ppp -auto my-isp) >2. change it to ppp -alias -auto my-isp Correction: Linux requires a kernel recompile, not changes. You simply have to answer 1/2 billion yes/no questions and it does the configuration for you. Note that this applies to Intel linuxes and not to MkLinux. I haven't installed LinuxPPP myself so I don't know about that. _Deirdre Saoirse-Savino, Software Engineer * Epoch Internet * 949.862.8397 Note: deirdres@eni.net (there is another Deirdre at Epoch!) #include From dev at humph.com Mon Sep 21 15:53:09 1998 From: dev at humph.com (Giuliano Gavazzi (dev)) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: Message-ID: At 8:06 pm +0100 1998/09/21, Deirdre Saoirse wrote: [...] >Speaking of which, did they ever get multihoming support in the MacOS? >Every time I checked, it kept getting pushed farther out. > so you must have been away from MacOS for a "long" time. It is there since OT1.3. And if you add IPNetRouter you can even support mutliple interfaces and do all sort of things between them (even before OT1.3). Who said that OT is dead? But this is MacOSX-dev not MacOS8-dev so I stop here. Giuliano H U M P H || ||| software development of: Java & C++ Client/Human Interface applications. Native Server applications on MacOS - Rhapsody - (Mk)Linux http://www.humph.com/ From deirdres at eni.net Mon Sep 21 16:11:30 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: Message-ID: On Mon, 21 Sep 1998, Giuliano Gavazzi (dev) wrote: > At 8:06 pm +0100 1998/09/21, Deirdre Saoirse wrote: > [...] > >Speaking of which, did they ever get multihoming support in the MacOS? > >Every time I checked, it kept getting pushed farther out. > so you must have been away from MacOS for a "long" time. No, I just haven't had a personal need for it since then. > But this is MacOSX-dev not MacOS8-dev so I stop here. (thus why I trimmed the stuff ). From justin.morgan at axysdev.nwest.attws.com Mon Sep 21 23:14:06 1998 From: justin.morgan at axysdev.nwest.attws.com (Justin Morgan) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <199809212313.QAA03949@lizard.nwest.mccaw.com> [Sorry, this is a bit off-topic of macosx-dev]. Deirdre Saoirse wrote: > Correction: Linux requires a kernel recompile, not changes. You simply > have > to answer 1/2 billion yes/no questions and it does the configuration for > you. Note that this applies to Intel linuxes and not to MkLinux. I haven't > installed LinuxPPP myself so I don't know about that. Actually, according to what I've read, the latest Red Hat Linux 5.1 is supposed to support IP masquerading out of the box. You still have to set up the appropriate configuration files, but you shouldn't have to recompile Red Hat's kernel. From pmeyers at moon.jic.com Mon Sep 21 16:35:34 1998 From: pmeyers at moon.jic.com (Paul A. Meyers) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <199809212332.TAA00279@moon.jic.com> On 9/21/98 3:34 PM John Soward sent this: >Hmm, I'm not sure I see why it would result in frequent collisions. The >driver level stuff should only try to send one frame at a time based on >the devices MAC address, not it's IP address. I suppose if the various >parts weren't implemented correctly...then I suppose mulitple protocols >on the same adapter would result in a similar problem. I've not observed >higher collision rates on any of my FreeBSD systems with >1 IP per >device...but I may be missing something here.. I'm running on a LAN connected to the Internet via cable modem. I've observered what I consider a high rate of collisions (measured by a drop in transfer throughput), and I suspect that as the gateway forwards the packet to the appropriate computer, additional packets are coming in off the cable modem, causing contention on the wire. Using two ethernet adapters on the gateway would alleviate this. I would love to use my Rhapsody box as a gateway, since, well, it is will soon be Mac OS X _SERVER_, but hey, I guess a 6100's good for something, right? Paul Meyers pmeyers@moon.jic.com From bierman at apple.com Mon Sep 21 16:51:20 1998 From: bierman at apple.com (Peter Bierman) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: <199809212332.TAA00279@moon.jic.com> Message-ID: At 4:41 PM -0700 9/21/98, Paul A. Meyers wrote: >On 9/21/98 3:34 PM John Soward sent this: > >>Hmm, I'm not sure I see why it would result in frequent collisions. The >>driver level stuff should only try to send one frame at a time based on > >I'm running on a LAN connected to the Internet via cable modem. I've >observered what I consider a high rate of collisions (measured by a drop >in transfer throughput), and I suspect that as the gateway forwards the >packet to the appropriate computer, additional packets are coming in off >the cable modem, causing contention on the wire. Using two ethernet >adapters on the gateway would alleviate this. So you're saying that adding a second computer to an ethernet increases the collision rate? (Because the modem is talking to CPU1, and CPU2 is talking to CPU1 also.) Well, duh. That has nothing to do with routing or masquerading. Adding a second card is just creating two networks, one per point-to-point link. No surprise that there would be fewer collisions. I'm also rather suspect of your rate of collisions being measured by a drop in throughput. Do you have numbers gathered from an interface stat, or are you just guessing that collisions are going up *abnormally* because throughput went down? What I'm getting at here is that software has *very little* influence on the collision rate. As the other reply said, the card uses the same logic for putting frames on the wire regardless of what it's doing with the data. Test, wait, test, send, colision detect. -pmb -- "UNIX shells in Mac OS X should be unneeded but functional... and have the same installed base as MPW." From cdouty at netcom.com Mon Sep 21 17:05:40 1998 From: cdouty at netcom.com (Chris Douty) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: <199809212313.QAA03949@lizard.nwest.mccaw.com> Message-ID: On Mon, 21 Sep 1998, Justin Morgan wrote: > [Sorry, this is a bit off-topic of macosx-dev]. > > Deirdre Saoirse wrote: > > Correction: Linux requires a kernel recompile, not changes. You simply > > have > > to answer 1/2 billion yes/no questions and it does the configuration for > > you. Note that this applies to Intel linuxes and not to MkLinux. I haven't > > installed LinuxPPP myself so I don't know about that. > > Actually, according to what I've read, the latest Red Hat Linux 5.1 is > supposed to support IP masquerading out of the box. > > You still have to set up the appropriate configuration files, but you > shouldn't have to recompile Red Hat's kernel. Yeah, and it "just works" as they say. Red Hat 5.1 is very nice for setting up a simple PPP gateway/IP translation box for a home LAN. My friends in the ISP biz complain about some kernel bugs and insecurities though. I would like to see OS X be able to perform this function. I would very much like to put all of my machines under one NetInfo database including the gateway/IP translation box. Of course OS X has steeper RAM requirements than Linux and x86 processors must be supported... -Chris -- Christopher Douty - Rogue Engineer trapped in a land of software cdouty@netcom.com "Frequently the messages have meaning; that is they refer to or are correlated according to some system with physical or conceptual entities. These semantic aspects of communication are irrelevant to the engineering problem." -Shannon From deirdres at eni.net Mon Sep 21 17:41:07 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading In-Reply-To: Message-ID: On Mon, 21 Sep 1998, Chris Douty wrote: > Yeah, and it "just works" as they say. Red Hat 5.1 is very nice for > setting up a simple PPP gateway/IP translation box for a home LAN. My > friends in the ISP biz complain about some kernel bugs and insecurities > though. Which is why we install 4.2, a updated recompiled kernel and an updated apache rather than install 5.1 directly. > I would like to see OS X be able to perform this function. I would very > much like to put all of my machines under one NetInfo database including > the gateway/IP translation box. Of course OS X has steeper RAM > requirements than Linux and x86 processors must be supported... Yeppers. Linux (under Intel at least) does have power management for laptops though. That would also be WAY cool for Rhapsody. :) _Deirdre From pmeyers at moon.jic.com Mon Sep 21 18:40:52 1998 From: pmeyers at moon.jic.com (Paul A. Meyers) Date: Thu Nov 3 14:41:31 2005 Subject: IP-masquerading Message-ID: <199809220138.VAA10648@moon.jic.com> On 9/21/98 8:05 PM Peter Bierman sent this: >At 4:41 PM -0700 9/21/98, Paul A. Meyers wrote: >>On 9/21/98 3:34 PM John Soward sent this: >> >>>Hmm, I'm not sure I see why it would result in frequent collisions. The >>>driver level stuff should only try to send one frame at a time based on >> >>I'm running on a LAN connected to the Internet via cable modem. I've >>observered what I consider a high rate of collisions (measured by a drop >>in transfer throughput), and I suspect that as the gateway forwards the >>packet to the appropriate computer, additional packets are coming in off >>the cable modem, causing contention on the wire. Using two ethernet >>adapters on the gateway would alleviate this. > >So you're saying that adding a second computer to an ethernet increases the >collision rate? (Because the modem is talking to CPU1, and CPU2 is talking >to CPU1 also.) > >Well, duh. That has nothing to do with routing or masquerading. Adding a >second card is just creating two networks, one per point-to-point link. No >surprise that there would be fewer collisions. > Look guy, what's with the antagonistic tone? The cable modem sends a packet to CPU1 over the wire and CPU1 subsequently sends the packet to CPU2 over the wire, but at the same time, the modem sends another packet to CPU1. I don't understand why this is so hard to understand. I can *see* the collision light flickering in tandem with the packet lights. I don't feel this relates to Mac OS X anymore, and if you want to continue this discussion then we should continue directly. Paul Meyers pmeyers@moon.jic.com From charles at drbs.com Mon Sep 21 19:28:27 1998 From: charles at drbs.com (Charles C. Hocker) Date: Thu Nov 3 14:41:31 2005 Subject: using apple-generic.make Message-ID: <19980921223052.1b651224.in@drbs.com> Hello everyone, I was digging around the developer section and found the following file: /System/Developer/Makefiles/VersioningSystems/apple-generic.make And I was wondering how it is used. I read the comments and placed the following into my Makefile.preamble: CURRENT_PROJECT_VERSION = 100 COMPATIBILITY_PROJECT_VERSION = 1 VERSIONING_SYSTEM = apple-generic VERSION_INFO_CVS = YES but I am not sure what to do next. On a somewhat related note, I have found the following in some of the examples of source code and was wondering if it is related to the above question: static void *rcs_id = (rcs_id, "$Header: /LocalDeveloper/Source/CVS/OmniGroup/OmniCVSEOModelerBundle/CVSManager.m,v 1.3 1998/03/25 01:18:32 toon Exp $"); If not; what generates the above and what is it used for? I have to admit that I am a novice concering CVS and am still in the process of learning to use it. Thanks, Charles --------------------------------------------------------------------- Charles C. Hocker charles@drbs.com --------------------------------------------------------------------- From kc at omnigroup.com Mon Sep 21 20:58:37 1998 From: kc at omnigroup.com (Ken Case) Date: Thu Nov 3 14:41:31 2005 Subject: [Moderator] Re: IP-masquerading Message-ID: <199809220359.UAA05718@ignem.omnigroup.com> Please take any further discussion of IP masquerading (unless you're implementing it and have development questions) to the MacOSX-admin mailing list. Thanks. Your host, Ken From zander at relevantknowledge.com Mon Sep 21 21:22:55 1998 From: zander at relevantknowledge.com (Aleksey Sudakov) Date: Thu Nov 3 14:41:31 2005 Subject: Displaying HTML in NSTextView MiniExample wanted Message-ID: <9809220022.AA553601@black> Hello, Anybody has a mini example showing how to display NSString containing HTML in NSTextView? Thanks in advance, Aleksey From sanguish at digifix.com Mon Sep 21 22:14:11 1998 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:41:32 2005 Subject: Displaying HTML in NSTextView MiniExample wanted In-Reply-To: <9809220022.AA553601@black> References: <9809220022.AA553601@black> Message-ID: <199809220514.BAA03604@digifix.com> Aleksey Sudakov wrote: > Hello, > > Anybody has a mini example showing how to display NSString containing HTML > in NSTextView? // Convert the NSString to data // (I think this encoding is appropraite) // theData=[string dataUsingEncoding:NSNEXTSTEPStringEncoding]; // make your NSTextStorage.. which happens to be a subclass of NSAttributedSting storageString=[[[NSTextStorage alloc] initWithPath:theData documentAttributes:NULL] autorelease]; [yourTextView setTextStorage: storageString]; From Stefan.Boehringer at ruhr-uni-bochum.de Tue Sep 22 06:00:30 1998 From: Stefan.Boehringer at ruhr-uni-bochum.de (Stefan.Boehringer@ruhr-uni-bochum.de) Date: Thu Nov 3 14:41:32 2005 Subject: VM-question References: <199809210853.BAA06400@ignem.omnigroup.com> Message-ID: <9809221301.AA00779@christine> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1619 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980922/98aeac18/attachment.bin From sfroment at crt.umontreal.ca Tue Sep 22 06:44:14 1998 From: sfroment at crt.umontreal.ca (Serge Froment) Date: Thu Nov 3 14:41:32 2005 Subject: NSOutlineView does retain or not? Message-ID: <000401bde62f$16f44300$b964cc84@gen1.crt.umontreal.ca> Does NSOutlineView retain the object returned by outlineView:objectValueForTableColumn:byItem? My model object used to return the value to NSOutlineView used to look like this: - (NSString*) title { if (title == nil) return [self defaultTitle]; else return _title; } However, since the defaultTitle method did allocate a new string each time it was called, I thought I got a memory leak, so I changed the method above for the following: - (NSString*) title { if (title == nil) return [[self defaultTitle] autorelease]; else return _title; } But once I have done this, my application gets killed when I click on the title cell with the following stack: kill abort _objc_error __objc_error _freedHandler -[NSCell _setContents:] -[NSCell copyWithZone:] -[NSTableView mouseDown:] (etc...) Looks like the title was actually released, right? I thought any object that keep a reference to an object should retain it... Serge From edream at mailbag.com Tue Sep 22 08:03:52 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer Message-ID: Hi, Without any question, my strong preference is to develop apps for Win95 and MacOS X using YB. The design of objective-C, the AppKit and the Foundation are the best I've ever seen. However, I have ongoing concerns about whether it will, in fact, be possible to use these tools to develop real apps for real customers. I have several major worries, all of about equal weight. 1. It must be possible to distribute apps on X and Win95 without having to pay a large (any?) royalty and without the _customer_ having to install anything but a few DLL's. And it must be able to distribute the required DLL's _with my app_. I would like to target all Win95 and Mac OS X customers, not just certified Apple developers, or others having some special relationship with Apple. Let me be clear about this. I can not develop apps unless it is possible to distribute them widely. Without the ability to distribute what I make, the best tools in the world are useless. Without the ability to distribute what I make everywhere, Apple's cross platform strategy is dead. 2a. My apps must work, which means (among other things!) that the compilers, AppKit and Foundation must have "few enough" bugs to produce an acceptable product. The current state of YB for Win95 is not beta quality, not even alpha quality, but very definitely pre-alpha quality. Given that I am using what is nominally the DR2 release, I have great concerns in this area. 2b. I need to know that Apple has a real commitment to making YB truly a cross-platform environment. One respected member of this list has urged me to abandon development for YB for Win95 entirely. That may be wise counsel, but I don't see that as an option, for two reasons: first, if true, it indicates that Apple's last best cross-platform strategy is stillborn. Secondly, Win95 is where the vast majority of my customers are likely to be. 2c. I need to know that Apple is committed to YB on all platforms by _fully staffing_ the development effort on each platform. Perhaps the present poor quality of YB tools is simply an indication of boldness on management's part, but that boldness must eventually translate into staffing at adequate levels. For example, at WWDC 97 I knew that Apple was serious with Mac OS 8 when I saw a slide with "fully staffed" stenciled across the words "Mac OS 8". This is the acid test, and I just don't have a lot of confidence now in YB for Win95. 3. Some sanity must come to file formats. At present it is _impossible_ to transfer files from Rhapsody DR2 on Mac hardware to YB for Win95 except via ftp, which is not an option presently for those without LAN's (Rhapsody DR2 doesn't support modem connections.) As a result, I don't do any development at all on my G3. Presumably Rhapsody CR1 on the Mac will be able to read and write PC files _from the yellow box_, but until that happens cross-platform development remains only a hope. I would hate to abandon YB, for at least two reasons. First, the best alternative on the Win95 side would be VC++, which is vastly inferior to YB. Second, I would probably abandon Mac development altogether; there just isn't time and energy enough to support two code bases. This would be a bitter disappointment, but the conclusions seem clear: unless these concerns are adressed within 6-12 months I will reluctantly pull the plug on YB development. I wanted to start this discussion here on this list for two reasons: 1. This is where the developers are and 2. These are my biggest concerns _as a developer_. If our esteemed moderator wishes, I shall be happy to move this discussion to another venue. Edward ---------------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) LEO: http://www.mailbag.com/users/edream/front.html Sherlock: http://www.mailbag.com/users/edream/sl_index.html Apple Computer, right down there with Mercedes Benz. ---------------------------------------------------------- From sbrandon at music.gla.ac.uk Tue Sep 22 08:03:42 1998 From: sbrandon at music.gla.ac.uk (Stephen Brandon - SysAdmin) Date: Thu Nov 3 14:41:32 2005 Subject: Instance Drawing and NSImage Message-ID: <199809221503.QAA14499@music.gla.ac.uk> Hi, I am converting an app that used to use PS instance drawing (in NS3.x). Because this is supposed to be deprecated, and one is supposed to use NSImage to cache screen real estate, I have started to do the conversion. Unfortunately, this has become FAR more difficult than the original way of doing things. The original method hasn't actually been removed (at least from OS4.2, and I think Rhapsody as well). So I am wondering if I need to do the conversion at all. Here's the problem. NSImage composites to a view, disregarding the size/scale of the coordinate system that it is drawing into -- using its own size, and compositing from the origin that you specify. Scaling the NSImage has no effect on it (because it is a cached image representation). I am using a subview for my drawing that is scaled -- a common enough occurrence I would think. Unfortunately, the cacheImage that I draw into then insists on drawing (compositing) itself unscaled, 1 screen pixel per image pixel. This presents quite a problem. In order to draw into the cacheImage at screen resolution, I would need to scale each and every PS command that I send to it... a massive job, and this defeats the object of scaling the views. What should I do? I imagine that the old PS instance drawing may well disappear in MacOSX, so I want to be future proof. But how else can I create a cacheImage that I can blat back onto a scaled view? Thanks, Stephen Brandon From edream at mailbag.com Tue Sep 22 09:42:37 1998 From: edream at mailbag.com (Edward K. Ream) Date: Thu Nov 3 14:41:32 2005 Subject: NSOutlineView does retain or not? In-Reply-To: <000401bde62f$16f44300$b964cc84@gen1.crt.umontreal.ca> Message-ID: Hi Serge, >Does NSOutlineView retain the object returned by >outlineView:objectValueForTableColumn:byItem? I've been writing an outliner myself, so while I'm still pretty much a newbie I'll give this one a shot. I suspect that outlineView:objectValueForTableColumn:byItem is simply returning whatever object your data source passed it. NSOutlineView does _not_ own those objects, (it didn't alloc them) so it would violate conventions for an NSOutlineView to retain them. In my app, at least, I retain those objects when I create them. Hope this helps. Edward ---------------------------------------------------------- Edward K. Ream Owner: Sherlock Software tm edream@mailbag.com (608)-231-0766 (voice) LEO: http://www.mailbag.com/users/edream/front.html Sherlock: http://www.mailbag.com/users/edream/sl_index.html Apple Computer, right down there with Mercedes Benz. ---------------------------------------------------------- From zarnuk at zarnuk.com Tue Sep 22 09:54:25 1998 From: zarnuk at zarnuk.com (Paul S. McCarthy) Date: Thu Nov 3 14:41:32 2005 Subject: using apple-generic.make Message-ID: <01BDE628.213DCAE0@NTNWW002> > Charles C. Hocker > [...] CVS [...] RCS [...] RCS is the "Revision Control System" it is a source-code version control system. Generally, you use either RCS or CVS, but not both, since they are designed to do the same (similar) job. ---Paul... From sfroment at crt.umontreal.ca Tue Sep 22 11:01:54 1998 From: sfroment at crt.umontreal.ca (Serge Froment) Date: Thu Nov 3 14:41:32 2005 Subject: NSOutlineView does retain or not? Message-ID: <007901bde653$15e2c8a0$b964cc84@gen1.crt.umontreal.ca> Yes, when calling outlineView:objectValueForTableColumn:byItem, the outline view gives me back the object passed by my data source. Then, this object returns a string to the outline view, and I wondered if that string was retained. Now, I am pretty sure it is, because I found my bug: I was allocating the string I passed to the outline view using [NSString stringWithFormat:], and this puppy returns an autoreleased object. Therefore, I should not release it. Actually, there is a document called ObjectOwnership.pdf (in TasksAndConcepts/ProgrammingTopics) that is a must read for newbies like us. I did read it some time ago, but I needed to read it again... Serge -----Original Message----- From: Edward K. Ream To: Multiple recipients of list Date: Tuesday, September 22, 1998 12:43 PM Subject: Re: NSOutlineView does retain or not? >Hi Serge, > >>Does NSOutlineView retain the object returned by >>outlineView:objectValueForTableColumn:byItem? > >I've been writing an outliner myself, so while I'm still >pretty much a newbie I'll give this one a shot. > >I suspect that outlineView:objectValueForTableColumn:byItem is >simply returning whatever object your data source passed it. > >NSOutlineView does _not_ own those objects, (it didn't alloc them) >so it would violate conventions for an NSOutlineView to retain them. >In my app, at least, I retain those objects when I create them. > >Hope this helps. > >Edward > > >---------------------------------------------------------- >Edward K. Ream Owner: Sherlock Software tm >edream@mailbag.com (608)-231-0766 (voice) >LEO: http://www.mailbag.com/users/edream/front.html >Sherlock: http://www.mailbag.com/users/edream/sl_index.html >Apple Computer, right down there with Mercedes Benz. >---------------------------------------------------------- > > From sfroment at crt.umontreal.ca Tue Sep 22 11:14:17 1998 From: sfroment at crt.umontreal.ca (Serge Froment) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer Message-ID: <008201bde654$d071c440$b964cc84@gen1.crt.umontreal.ca> As a developer, I need answers to those question too. I feel that unless Apple do express a strong commitment, very few developers will develop using Yellow Box. This would be a pity since this is the best development environment I seen so far. I am actually evaluating Yellow Box for our future projects. There is no doubt I can prove it is our best solution technically. But managers have other concerns than technical superiority... Serge -----Original Message----- From: Edward K. Ream To: Multiple recipients of list Date: Tuesday, September 22, 1998 11:02 AM Subject: My biggest concerns as a developer >Hi, > >Without any question, my strong preference is to develop apps for Win95 and >MacOS X using YB. The design of objective-C, the AppKit and the Foundation >are the best I've ever seen. > >However, I have ongoing concerns about whether it will, in fact, be >possible to use these tools to develop real apps for real customers. I >have several major worries, all of about equal weight. > >1. It must be possible to distribute apps on X and Win95 without having to >pay a large (any?) royalty and without the _customer_ having to install >anything but a few DLL's. And it must be able to distribute the required >DLL's _with my app_. I would like to target all Win95 and Mac OS X >customers, not just certified Apple developers, or others having some >special relationship with Apple. > >Let me be clear about this. I can not develop apps unless it is possible >to distribute them widely. Without the ability to distribute what I make, >the best tools in the world are useless. Without the ability to distribute >what I make everywhere, Apple's cross platform strategy is dead. > >2a. My apps must work, which means (among other things!) that the >compilers, AppKit and Foundation must have "few enough" bugs to produce an >acceptable product. The current state of YB for Win95 is not beta quality, >not even alpha quality, but very definitely pre-alpha quality. Given that >I am using what is nominally the DR2 release, I have great concerns in this >area. > >2b. I need to know that Apple has a real commitment to making YB truly a >cross-platform environment. One respected member of this list has urged me >to abandon development for YB for Win95 entirely. That may be wise >counsel, but I don't see that as an option, for two reasons: first, if >true, it indicates that Apple's last best cross-platform strategy is >stillborn. Secondly, Win95 is where the vast majority of my customers are >likely to be. > >2c. I need to know that Apple is committed to YB on all platforms by >_fully staffing_ the development effort on each platform. Perhaps the >present poor quality of YB tools is simply an indication of boldness on >management's part, but that boldness must eventually translate into >staffing at adequate levels. > >For example, at WWDC 97 I knew that Apple was serious with Mac OS 8 when I >saw a slide with "fully staffed" stenciled across the words "Mac OS 8". >This is the acid test, and I just don't have a lot of confidence now in YB >for Win95. > >3. Some sanity must come to file formats. At present it is _impossible_ >to transfer files from Rhapsody DR2 on Mac hardware to YB for Win95 except >via ftp, which is not an option presently for those without LAN's (Rhapsody >DR2 doesn't support modem connections.) As a result, I don't do any >development at all on my G3. Presumably Rhapsody CR1 on the Mac will be >able to read and write PC files _from the yellow box_, but until that >happens cross-platform development remains only a hope. > >I would hate to abandon YB, for at least two reasons. First, the best >alternative on the Win95 side would be VC++, which is vastly inferior to >YB. Second, I would probably abandon Mac development altogether; there >just isn't time and energy enough to support two code bases. This would be >a bitter disappointment, but the conclusions seem clear: unless these >concerns are adressed within 6-12 months I will reluctantly pull the plug >on YB development. > >I wanted to start this discussion here on this list for two reasons: >1. This is where the developers are and >2. These are my biggest concerns _as a developer_. > >If our esteemed moderator wishes, I shall be happy to move this discussion >to another venue. > >Edward > > >---------------------------------------------------------- >Edward K. Ream Owner: Sherlock Software tm >edream@mailbag.com (608)-231-0766 (voice) >LEO: http://www.mailbag.com/users/edream/front.html >Sherlock: http://www.mailbag.com/users/edream/sl_index.html >Apple Computer, right down there with Mercedes Benz. >---------------------------------------------------------- > > From robert at brightid.se Tue Sep 22 12:54:05 1998 From: robert at brightid.se (Robert Claeson) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer Message-ID: <00a401bde662$c1245850$0c00a8c0@thunder.bright.nu> Edward K. Ream wrote: >Without any question, my strong preference is to develop apps for Win95 and >MacOS X using YB. The design of objective-C, the AppKit and the Foundation >are the best I've ever seen. It's the same here, although we're targeting WinNT rather than Win95. Solaris and Linux would be nice too. >1. It must be possible to distribute apps on X and Win95 without having to >pay a large (any?) royalty and without the _customer_ having to install >anything but a few DLL's. And it must be able to distribute the required >DLL's _with my app_. I would like to target all Win95 and Mac OS X >customers, not just certified Apple developers, or others having some >special relationship with Apple. Couldn't agree more. >2b. I need to know that Apple has a real commitment to making YB truly a >cross-platform environment. One respected member of this list has urged me >to abandon development for YB for Win95 entirely. That may be wise >counsel, but I don't see that as an option, for two reasons: first, if >true, it indicates that Apple's last best cross-platform strategy is >stillborn. Secondly, Win95 is where the vast majority of my customers are >likely to be. Yup. I expect YB Windows to be here soon, but for how long will they continue to support it? For how long will it keep pace with the new technologies that emerge? >I would hate to abandon YB, for at least two reasons. First, the best >alternative on the Win95 side would be VC++, which is vastly inferior to >YB. Second, I would probably abandon Mac development altogether; there >just isn't time and energy enough to support two code bases. This would be >a bitter disappointment, but the conclusions seem clear: unless these >concerns are adressed within 6-12 months I will reluctantly pull the plug >on YB development. Do you really think that VC++ is an alternative to YB? C'mon, there are far better alternatives. We mainly develop custom applications for enterprise customers, usually in the "mission critical" area. Openstep has been perfect for this, but neither I nor anybody of my clients can really feel confident in the long-term availability of YB on Windows, or Apple's focus on education and publishing, which is very different from the market where the technology is being used today and there exists a large (money-wise) customer base. So, we use YB for those customer projects where the customer mainly uses Mac's. For most everything else, we now use IBM VisualAge Smalltalk. It's targeting the same customers as the old installed base of Openstep. It's been very easy for the non-Smalltalk programmers to learn the new language since the OO syntax of Objective C is based on and very much like Smalltalk, minus the brackets. The class library is also very similar and as rich as that of YB. Furthermore, VA Smalltalk runs on all 32 bit Windows platforms, OS/2, most popular Unix systems and even on mainframes. We still use VC++, though, but only for system-level programming, system services, batch programs and similar things. From deirdres at eni.net Tue Sep 22 13:29:59 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer In-Reply-To: <00a401bde662$c1245850$0c00a8c0@thunder.bright.nu> Message-ID: I, still being a huge C++ fan, don't really like Obj-C so much. And, admittedly, if I were a manager, I'd want something where I would know I could find people to code in it. APL *might* be the tersest language for a project, but I'd still have trouble justifying it. Anyhow, other than that (no language war intended btw), I think yellow box is WAY cool. BTW, has anyone here done any QT (c++ libraries for unix) programming? If so, would you email me privately? I have some questions about it. _Deirdre On Tue, 22 Sep 1998, Robert Claeson wrote: > Edward K. Ream wrote: > >Without any question, my strong preference is to develop apps for Win95 and > >MacOS X using YB. The design of objective-C, the AppKit and the Foundation > >are the best I've ever seen. > > > It's the same here, although we're targeting WinNT rather than Win95. > Solaris and Linux would be nice too. From davem at paradigmdev.com Tue Sep 22 13:43:26 1998 From: davem at paradigmdev.com (Dave MacLachlan) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <57B675B21506D1118BAB0060081C295D5599D8@vserver.paradigm.com> For those of you who're CQF'ing CR1 or if we have any Apple folks here on the list who can talk...is uname going to return Rhapsody as a name in the final release? I'm just wondering for the port I'm doing. Cheers, Dave -------------------------------------------------------------- Dave MacLachlan davem@paradigmdev.com You are standing in an open field west of a white house... From oloft at tengil5.cs.chalmers.se Tue Sep 22 13:55:02 1998 From: oloft at tengil5.cs.chalmers.se (Olof Torgersson) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer In-Reply-To: Message-ID: <9809222255.AA029162@tengil5.cs.chalmers.se> "Edward K. Ream" wrote: > 2a. My apps must work, which means (among other things!) that the > compilers, AppKit and Foundation must have "few enough" bugs to produce an > acceptable product. The current state of YB for Win95 is not beta quality, > not even alpha quality, but very definitely pre-alpha quality. Given that > I am using what is nominally the DR2 release, I have great concerns in this > area. > I have never tried to use Win95 for development (nor do I intend to), but it seems to me that deployment on Win95 works ok. I would be interested in examples of things that don't work when deploying on Win95. Olof Torgersson -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 722 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980922/651de9a1/attachment.bin From webmaster at usjc.uwaterloo.ca Tue Sep 22 14:04:42 1998 From: webmaster at usjc.uwaterloo.ca (JP Rosevear) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer In-Reply-To: Message-ID: >1. It must be possible to distribute apps on X and Win95 without having to >pay a large (any?) royalty and without the _customer_ having to install >anything but a few DLL's. And it must be able to distribute the required >DLL's _with my app_. I would like to target all Win95 and Mac OS X >customers, not just certified Apple developers, or others having some >special relationship with Apple. This was covered at WWDC 98. The royalty as I understand is due to the DPS licensing. Since DPS is being removed, there will be no more royalty. Apple dev people told me YB licensing would change to a low cost annual subscription fee for developers. They didn't say exactly what low cost meant, but they gave the distinct impression that it would less than $1000 (US) and I think lower than that. >2b. I need to know that Apple has a real commitment to making YB truly a >cross-platform environment. One respected member of this list has urged me >to abandon development for YB for Win95 entirely. That may be wise >counsel, but I don't see that as an option, for two reasons: first, if >true, it indicates that Apple's last best cross-platform strategy is >stillborn. Secondly, Win95 is where the vast majority of my customers are >likely to be. I don't know whether Apple will abandon this or not, however in my view, pulling the plug on UB for Win95/NT is almost the same as killing YB entirely. >2c. I need to know that Apple is committed to YB on all platforms by >_fully staffing_ the development effort on each platform. Perhaps the >present poor quality of YB tools is simply an indication of boldness on >management's part, but that boldness must eventually translate into >staffing at adequate levels. Don't forget that once the basics are down, the code base is shared between Mac's and PC's. For instance, PB and IB. >3. Some sanity must come to file formats. At present it is _impossible_ >to transfer files from Rhapsody DR2 on Mac hardware to YB for Win95 except >via ftp, which is not an option presently for those without LAN's (Rhapsody >DR2 doesn't support modem connections.) As a result, I don't do any >development at all on my G3. Presumably Rhapsody CR1 on the Mac will be >able to read and write PC files _from the yellow box_, but until that >happens cross-platform development remains only a hope. I think someone may have written PPP for Rhapsody. But I agree with your point. -JP ============================================================================== JP Rosevear Systems Developer & Webmaster St. Jerome's University Waterloo, ON, N2L 3G3 http://www.sju.uwaterloo.ca (519) 884 8111 x234 mailto:webmaster@sju.uwaterloo.ca From jordan at apple.com Tue Sep 22 14:05:55 1998 From: jordan at apple.com (Jordan Dea-Mattson) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <199809222107.OAA37520@scv1.apple.com> Dear Dave - As Apple announced at MacWorld New York, Rhapsody is a code name for the product that will be known as Mac OS X Server. It will be available for Power Macintosh and PC compatibiles. The technologies in Mac OS X Server will form the basis of Mac OS X. Yours, Jordan ===== Subject: Is the name going to stay the same? Date: 9/22/98 1:54 PM Received: 9/22/98 2:00 PM From: Dave MacLachlan, davem@paradigmdev.com To: Multiple recipients of list, macosx-dev@omnigroup.com For those of you who're CQF'ing CR1 or if we have any Apple folks here on the list who can talk...is uname going to return Rhapsody as a name in the final release? I'm just wondering for the port I'm doing. Cheers, Dave -------------------------------------------------------------- Dave MacLachlan davem@paradigmdev.com You are standing in an open field west of a white house... ===================== Jordan J. Dea-Mattson Partnership & Technology Manager World-Wide Developer Relations Apple Computer, Inc. 408-974-4601 (Phone) 1 Infinite Loop, MS: 303-2EV jordan@apple.com Cupertino, CA 95014 From Philippe.Robert at uptime.ch Tue Sep 22 14:13:36 1998 From: Philippe.Robert at uptime.ch (Philippe C.D. Robert) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer In-Reply-To: <00a401bde662$c1245850$0c00a8c0@thunder.bright.nu> References: <00a401bde662$c1245850$0c00a8c0@thunder.bright.nu> Message-ID: <9809222113.AA00494@uptime.ch> You wrote: > >Without any question, my strong preference is to develop apps for Win95 and > >MacOS X using YB. The design of objective-C, the AppKit and the Foundation > >are the best I've ever seen. > > > It's the same here, although we're targeting WinNT rather than Win95. Solaris and Linux > would be nice too. Have a look at GNUstep (www.gnustep.org)! Solaris, Linux, *BSDs...whatever you want... -Phil --- Philippe C.D. Robert Uptime Object Factory Inc http://www.nice.ch/~phip http://www.uptime.ch From deirdres at eni.net Tue Sep 22 14:52:33 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: <199809222107.OAA37520@scv1.apple.com> Message-ID: He wanted to know what uname would return, not what the official product name was. They're not necessarily the same. :) _Deirdre On Tue, 22 Sep 1998, Jordan Dea-Mattson wrote: > As Apple announced at MacWorld New York, Rhapsody is a code name for the > product that will be known as Mac OS X Server. It will be available for > Power Macintosh and PC compatibiles. > > The technologies in Mac OS X Server will form the basis of Mac OS X. From kc at omnigroup.com Tue Sep 22 14:59:42 1998 From: kc at omnigroup.com (Ken Case) Date: Thu Nov 3 14:41:32 2005 Subject: [Moderator] Re: My biggest concerns as a developer Message-ID: <199809222202.PAA02751@ignem.omnigroup.com> > I wanted to start this discussion here on this list for two reasons: > 1. This is where the developers are and > 2. These are my biggest concerns _as a developer_. I certainly understand your reasons for starting this discussion here, and it's certainly an interesting topic to many of us--but MacOSX-dev is a technical list, not a discussion list. (If we open this list to "developer concerns," we'll end up discussing Apple's financial health, marketshare, and anything else which concerns us as developers.) > If our esteemed moderator wishes, I shall be happy to move this > discussion to another venue. Thanks, please take this discussion to MacOSX-talk. Ken From jordan at apple.com Tue Sep 22 15:09:17 1998 From: jordan at apple.com (Jordan Dea-Mattson) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <199809222210.PAA29720@scv2.apple.com> Dear Deirdre - I missed that. Thanks for calling it to my attention. I am working with him to determine what will be returned. Yours, Jordan ====== Subject: Re: Is the name going to stay the same? Date: 9/22/98 2:52 PM Received: 9/22/98 3:02 PM From: Deirdre Saoirse, deirdres@eni.net To: Jordan Dea-Mattson, jordan@apple.com CC: Multiple recipients of list, macosx-dev@omnigroup.com He wanted to know what uname would return, not what the official product name was. They're not necessarily the same. :) _Deirdre On Tue, 22 Sep 1998, Jordan Dea-Mattson wrote: > As Apple announced at MacWorld New York, Rhapsody is a code name for the > product that will be known as Mac OS X Server. It will be available for > Power Macintosh and PC compatibiles. > > The technologies in Mac OS X Server will form the basis of Mac OS X. ===================== Jordan J. Dea-Mattson Partnership & Technology Manager World-Wide Developer Relations Apple Computer, Inc. 408-974-4601 (Phone) 1 Infinite Loop, MS: 303-2EV jordan@apple.com Cupertino, CA 95014 From gideon at csarc.otago.ac.nz Tue Sep 22 15:13:48 1998 From: gideon at csarc.otago.ac.nz (Gideon King) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer In-Reply-To: Message-ID: <9809231013.AA488834@oklina> JP Rosevear wrote: > > >1. It must be possible to distribute apps on X and Win95 without having to > >pay a large (any?) royalty and without the _customer_ having to install > >anything but a few DLL's. And it must be able to distribute the required > >DLL's _with my app_. I would like to target all Win95 and Mac OS X > >customers, not just certified Apple developers, or others having some > >special relationship with Apple. > > This was covered at WWDC 98. The royalty as I understand is due to the DPS > licensing. Since DPS is being removed, there will be no more royalty. > Apple dev people told me YB licensing would change to a low cost annual > subscription fee for developers. They didn't say exactly what low cost > meant, but they gave the distinct impression that it would less than $1000 > (US) and I think lower than that. > So what are the current licensing costs for YB/Win and OSE 4.2, and where do you buy them? I have looked on the Apple web site, but found nothing useful. ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon From kc at omnigroup.com Tue Sep 22 15:37:33 1998 From: kc at omnigroup.com (Ken Case) Date: Thu Nov 3 14:41:32 2005 Subject: CVS and RCS Message-ID: <199809222240.PAA15179@ignem.omnigroup.com> Charles C. Hocker wrote: > On a somewhat related note, I have found the following in some > of the examples of source code and was wondering if it is related > to the above question: > > static void *rcs_id = (rcs_id, "$Header: > /LocalDeveloper/Source/CVS/OmniGroup/OmniCVSEOModelerBundle/CVSManager.m,v > 1.3 1998/03/25 01:18:32 toon Exp $"); RCS (and, by extension, CVS) allows substitution of special keywords (which are listed in "man co"), including the "$Header$" keyword. In this case, the inclusion of the $Header$ keyword as a constant in a source file allows one to use the "ident" command to identify which version of that source file was used to build a binary. For example, if you run the command "ident /Network/Applications/Internet/OmniWeb.app/OmniWeb", you'll get a list of every $Header$ constant in the application, which tells which versions of each source file went into your copy of OmniWeb. (The 'static void *rcs_id = (rcs_id, "")' part is just a hack to trick the compiler into thinking the constant is used so that it won't give a warning about it being unused. Actually, that particular hack doesn't work any more, which is why you'll find that that newer Omni source code uses the RCS_ID() macro from , which does a more intricate hack to achieve the same end.) Paul S. McCarthy wrote: > RCS is the "Revision Control System" it is a source-code version > control system. Generally, you use either RCS or CVS, but not > both, since they are designed to do the same (similar) job. CVS is actually based on RCS, which means that you can use RCS commands to work with CVS files as long as you're careful not to do anything that would confuse CVS later. (In fact, historically, CVS invoked RCS to do any actual revision control, though later versions of CVS incorporate much of RCS' functionality internally.) Ken From zander at omnigroup.com Tue Sep 22 15:33:12 1998 From: zander at omnigroup.com (Aleksey Sudakov) Date: Thu Nov 3 14:41:32 2005 Subject: Displaying HTML in NSTextView MiniExample wanted Message-ID: <199809222234.SAA00546@white> Aleksey Sudakov wrote: > Anybody has a mini example showing how to display NSString containing HTML > in NSTextView? Scott Anguish wrote: : // Convert the NSString to data : // (I think this encoding is appropraite) : // : theData=[string dataUsingEncoding:NSNEXTSTEPStringEncoding]; : : // make your NSTextStorage.. which happens to be a subclass of NSAttributedSting : storageString=[[[NSTextStorage alloc] initWithPath:theData : documentAttributes:NULL] autorelease]; : [yourTextView setTextStorage: storageString]; Shouldn't it read storageString=[[[NSTextStorage alloc] initWithHTML:theData documentAttributes:NULL] autorelease]; Anybody has any idea why the line above could generate the following? Program generated(1): Memory access exception on address 0x41301fd7 (protection failure). 0x43547401 in -[NSAttributedString(NSAttributedStringKitAdditions) initWithHTML:baseURL:documentAttributes:] () My HTML might not be very clean or do I just misuse NSAttributedString class cluster? Thanks in advance, Aleksey From kgb at graduate.net Tue Sep 22 15:49:14 1998 From: kgb at graduate.net (KGB Software) Date: Thu Nov 3 14:41:32 2005 Subject: A few more EOF questions Message-ID: Hi everybody! Thanks to all the help y'all have given me in the past few week, my EOF app has been coming along nicely. But I've hit a few new snags: 1. I have a single editing context for my entire app, and I want to bring up a database login panel before I load any other nibs. Following SimpleFetch.app's example, my NSApp delegate's startup code includes the line myEditingContext = [[EOEditingContext alloc] init]; which I then set to be my default editing context. But now how do I get at the database adaptor's connectionDictionary to set the values I'd like to get from my login panel? EOEditingContext doesn't seem to provide any methods for getting at the lower layers of objects, so I don't have a way of getting at the database adaptor. 2. I've bumped into a funny problem with EODisplayGroup's setObject: method and event loops. Specifically, I have a nib that needs to be opened with its displayGroup being set to select a particular object. The code looks like -(void) initWithItem: (id) anItem { myWin = [NSBundle loadNibNamed: .....]; [myWin setItem: anItem]; } -(void) setItem: (id) anItem { // myDisplayGroup is an inst var that holds the window's DisplayGroup NSRunAlertPanel(@"got here, blah blah"...); [myDisplayGroup setObject: anItem]; } With that NSRunAlertPanel() call inserted before the setObject line, the window opens, then the panel opens, and after the panel is closed, the correct object is selected in the nib's window. If I comment out the alert panel, then the window opens but it doesn't perform the setObject: command correctly--it selects the first object in its list of displayedObjects. The value of anItem above is coming from another nib's displayGroup's selectedObject. Any ideas of what might be going wrong? 3. (this must be an easy one) I have a number of textFields that are connected to an EODisplayGroup. As I make changes to each one in turn, the displayGroup is updated when the keyboard focus leaves each textField. But if a user edits a field and then closes the window without moving the keyboard focus, those edits don't get sent to the displayGroup. How can I force all the fields to send their current values to the displayGroup at window closing time? Y'all are a great help! Thanks, John Kuszewski From jordan at apple.com Tue Sep 22 15:50:57 1998 From: jordan at apple.com (Jordan Dea-Mattson) Date: Thu Nov 3 14:41:32 2005 Subject: My biggest concerns as a developer Message-ID: <199809222252.PAA21730@scv3.apple.com> Dear Gideon - We are in the process of completing the YBW licensing agreement. It will be avilable shortly. Once it is available, we will post a message to this group. Yours, Jordan ====== Subject: Re: My biggest concerns as a developer Date: 9/22/98 3:33 PM Received: 9/22/98 3:47 PM From: Gideon King, gideon@csarc.otago.ac.nz To: Multiple recipients of list, macosx-dev@omnigroup.com JP Rosevear wrote: > > >1. It must be possible to distribute apps on X and Win95 without having to > >pay a large (any?) royalty and without the _customer_ having to install > >anything but a few DLL's. And it must be able to distribute the required > >DLL's _with my app_. I would like to target all Win95 and Mac OS X > >customers, not just certified Apple developers, or others having some > >special relationship with Apple. > > This was covered at WWDC 98. The royalty as I understand is due to the DPS > licensing. Since DPS is being removed, there will be no more royalty. > Apple dev people told me YB licensing would change to a low cost annual > subscription fee for developers. They didn't say exactly what low cost > meant, but they gave the distinct impression that it would less than $1000 > (US) and I think lower than that. > So what are the current licensing costs for YB/Win and OSE 4.2, and where do you buy them? I have looked on the Apple web site, but found nothing useful. ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon ===================== Jordan J. Dea-Mattson Partnership & Technology Manager World-Wide Developer Relations Apple Computer, Inc. 408-974-4601 (Phone) 1 Infinite Loop, MS: 303-2EV jordan@apple.com Cupertino, CA 95014 From wsanchez at apple.com Tue Sep 22 16:30:56 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <199809222330.QAA33250@scv2.apple.com> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1352 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980922/681a17be/attachment.bin From deirdres at eni.net Tue Sep 22 17:01:00 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: <199809222330.QAA33250@scv2.apple.com> Message-ID: Thanks! It sure does help in building things. Geez, uname -a sure gives a whole heck of a lot more verbose information than the equivalent under MkLinux: [deirdres@deeny RPMS]$ uname -a Linux deeny.eni.net 2.0.33-osfmach3 #1 Thu Jun 11 10:21:31 PDT 1998 ppc unknown (the ppc unknown always bugs me for stuff like Netscape versions) _Deirdre On Tue, 22 Sep 1998, Wilfredo Sanchez wrote: > The kernel's OS string will remain "Rhapsody" and the version will be > "5.2", despite the product name "Mac OS X Server" version "1.0". The > reason for this is that we don't want to break all the stuff that keys off of > this information, such as GNU autoconf, which would drive people like > me batty. From derek at csarc.otago.ac.nz Tue Sep 22 19:53:46 1998 From: derek at csarc.otago.ac.nz (Derek Rendall) Date: Thu Nov 3 14:41:32 2005 Subject: Menu IB bugs? Message-ID: <9809231453.AA468181@logrus> Hi, If you create menus by hand in IB as opposed to creating a new application and using the supplied menus, then you can have some problems. For example, create an New Module -> New Empty. Select Classes tab, then select NSMenu. Instantiate. Now try to add menu items to this new menu - it appears to be virtually impossible (a zero sized area that accepts the menu widgets you want to drop in). On a similar note, you can copy windows etc from one nib to another, but not menus. Are these bugs, or am I missing something (it's not a biggie for me, given New Application does the right thing, but it can be a bit of a pain if you inadvertantly delete an application menu). Thanks Derek Rendall Senior Software Engineer Computer Science Applied Research Centre (aka) Black Albatross University of Otago PO Box 56, Dunedin New Zealand ph +64 +3 479-5468 fax +64 +3 479-9033 http://www.albatross.co.nz From sanguish at digifix.com Tue Sep 22 20:26:35 1998 From: sanguish at digifix.com (Scott Anguish) Date: Thu Nov 3 14:41:32 2005 Subject: Displaying HTML in NSTextView MiniExample wanted In-Reply-To: <199809222234.SAA00546@white> References: <199809222234.SAA00546@white> Message-ID: <199809230326.XAA08491@digifix.com> Aleksey Sudakov wrote: > Shouldn't it read > > storageString=[[[NSTextStorage alloc] initWithHTML:theData > > documentAttributes:NULL] autorelease]; > > Doh! You're correct. From kcd at jumpgate.com Tue Sep 22 22:53:52 1998 From: kcd at jumpgate.com (Kenneth C. Dyke) Date: Thu Nov 3 14:41:32 2005 Subject: Pasteboard Notifications? In-Reply-To: <9809231453.AA468181@logrus> References: <9809231453.AA468181@logrus> Message-ID: <199809230553.WAA23605@babylon5.jumpgate.com> Does anyone know of a way to get some kind of notification every time the general pasteboard changes, even when you aren't the current owner of the data in the pasteboard? I've written this tiny little network paste service that lets you paste from the contents of the pasteboard on another machine. Basically I just defined Cmd-P (capital P) to go out to a specific host and grab the text contents of it's pasteboard (if any) and dump that back into the local pasteboard. It works, but it's not as cool as it could be. If I could get notifications when the local pasteboard changes, I could then 'broadcast' the new types of data available to N other systems (basically turn around and have a server on those machines declare the same data as available and remember who it came from.) Then when the user did a paste I could bring over whatever was on the remote machine. This would also work better since the remote pasteboards would properly reflect the kind of data available on the network 'virtual' pasteboard shared between all the machines. I suppose I could do something evil and always try to make sure my app is the one that 'owns' the data on the pasteboard, and steal back ownership every time someone else declares data to go into it (after copying out the data first), but that seems rather ugly. Thanks, Kenneth From markm at mail.tyrell.com Wed Sep 23 10:43:15 1998 From: markm at mail.tyrell.com (Mark F. Murphy) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: <199809222107.OAA37520@scv1.apple.com> Message-ID: At 2:32 PM -0700 9/22/98, Jordan Dea-Mattson wrote: >As Apple announced at MacWorld New York, Rhapsody is a code name for the >product that will be known as Mac OS X Server. It will be available for >Power Macintosh and PC compatibiles. Cool. MacOS X Server for PC Compatibles. mark --------------------------------------------------------------------------- Mark F. Murphy, Director Software Development Tyrell Software Corp PowerPerl(tm), Add Power To Your Webpage! --------------------------------------------------------------------------- Member of Families Against Internet Censorship: rainbow.rmi.net/~fagin/faic From Dan_Grillo at grillo.net Wed Sep 23 11:43:22 1998 From: Dan_Grillo at grillo.net (Dan Grillo) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <199809231843.NAA11213@anise.grillo.net> Mark F. Murphy writes: > > At 2:32 PM -0700 9/22/98, Jordan Dea-Mattson wrote: > >As Apple announced at MacWorld New York, Rhapsody is a code name for the > >product that will be known as Mac OS X Server. It will be available for > >Power Macintosh and PC compatibiles. > > Cool. > > MacOS X Server for PC Compatibles. > > mark > Actually, it's a pretty bad name... I was explaining Rhapsody/MacOS X Server to a co-worker yesterday, and he parsed it as MacOS (X Server) instead of what we want: (MacOS X) Server Ooops. --Dan -- Dan Grillo dan@grillo.net 650 917-0685 fax 773 975-1557 From deirdres at eni.net Wed Sep 23 12:03:38 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: <199809231843.NAA11213@anise.grillo.net> Message-ID: On Wed, 23 Sep 1998, Dan Grillo wrote: > Actually, it's a pretty bad name... I was explaining Rhapsody/MacOS X Server > to a co-worker yesterday, and he parsed it as > > MacOS (X Server) > > instead of what we want: > > (MacOS X) Server > > Ooops. Yeah, like I said, it confuses the X-windows user as of course it's a client-server GUI system and one runs an X Server and an X Client (and they need not be on the same system...). I guess that there used to be a product called MacX doesn't help either, does it? _Deirdre From icollins at sol.co.uk Wed Sep 23 12:15:23 1998 From: icollins at sol.co.uk (Iain Collins) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <01bde726$834124e0$LocalHost@icollins> -----Original Message----- From: Dan Grillo To: Multiple recipients of list Date: 23 September 1998 19:47 Subject: Re: Is the name going to stay the same? > >Mark F. Murphy writes: >> >> At 2:32 PM -0700 9/22/98, Jordan Dea-Mattson wrote: >> >As Apple announced at MacWorld New York, Rhapsody is a code name for the >> >product that will be known as Mac OS X Server. It will be available for >> >Power Macintosh and PC compatibiles. >> >> Cool. >> >> MacOS X Server for PC Compatibles. >> >> mark >> > >Actually, it's a pretty bad name... I was explaining Rhapsody/MacOS X Server >to a co-worker yesterday, and he parsed it as > > MacOS (X Server) > >instead of what we want: > > (MacOS X) Server > >Ooops. I get this all the time. I like the sound of "OS X Server" though, they can put back the "Mac" part later (when we get to version 2, or should that be IX). Still this is why we have codenames like "Rhapsody" (for confusing co-workers and Apple xenophobes). I tell co-workers: "It's based on NextStep, you remeber, the really neat operating system that the world wide web was invented on?." They almost all parse "world wide web" as "the internet" and they'll nod and hum accordingly, even if they _don't_ know who Tim Burners Lee is. Get's 'em every time! Iain From anderkh at texaco.com Wed Sep 23 13:21:54 1998 From: anderkh at texaco.com (Anderson, Ken H) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <405D056843B6D111A8EB00805F9A432C19EB7E@MSX01013> It should be an issue, since you're supposed to pronounce it 'Ten', not 'Ex'. :) Ken -----Original Message----- From: Dan Grillo [mailto:Dan_Grillo@grillo.net] Sent: Wednesday, September 23, 1998 2:52 PM To: Multiple recipients of list Subject: Re: Is the name going to stay the same? Mark F. Murphy writes: > > At 2:32 PM -0700 9/22/98, Jordan Dea-Mattson wrote: > >As Apple announced at MacWorld New York, Rhapsody is a code name for the > >product that will be known as Mac OS X Server. It will be available for > >Power Macintosh and PC compatibiles. > > Cool. > > MacOS X Server for PC Compatibles. > > mark > Actually, it's a pretty bad name... I was explaining Rhapsody/MacOS X Server to a co-worker yesterday, and he parsed it as MacOS (X Server) instead of what we want: (MacOS X) Server Ooops. --Dan -- Dan Grillo dan@grillo.net 650 917-0685 fax 773 975-1557 From Scott_Harrison at apple.com Wed Sep 23 13:34:04 1998 From: Scott_Harrison at apple.com (Scott Harrison) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: <405D056843B6D111A8EB00805F9A432C19EB7E@MSX01013> Message-ID: <9809231634.AA047544@mithrandir> "Anderson, Ken H" made my mailer see: -> It should be an issue, since you're supposed to pronounce it 'Ten', not -> 'Ex'. :) -> Ooops. I must really be messing up since I call it Mac-O-Sex Server. I never mix it up with an X server though. :-) --Scott From snoyes1 at .rdc1.az.home.com Wed Sep 23 15:09:27 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:32 2005 Subject: Preference on preferences Message-ID: <19980923220818.AAA10243@CX268689-A> I am getting ready to start writing a preferences editor for an application (the application fits into the document paradigm) and was wondering the best way of doing it. Is it better to have a single set of preferences that is shared with all documents (easier to program and easier for the user) or should each document have its own preferences (trickier to program and potentially confusing the the user, but much more flexible). If each document has its own preferences, is there a preferred method of setting "default" preferences that are used for new documents VS setting current document preferences. Also, from an object oriented programming approach, is it better to send out a notification to the main document controller that preferences changed and let it distribute the new data, or have each object that might want to know about a specific preferences register. The first approach tends to limit the objects registering for notifications but requires the main document controller to know inner workings of some of its subordinate objects/controllers. The second one make each object slightly more self contained but couples more objects to the preferences. My previous attempts of doing this have ended up being confusing at best. Any insights would be appreciated. TIA Steven Noyes NoiseTECH snoyes1@home.com From embuck at palmer.cca.rockwell.com Wed Sep 23 17:31:27 1998 From: embuck at palmer.cca.rockwell.com (Erik M. Buck) Date: Thu Nov 3 14:41:32 2005 Subject: Preference on preferences References: <19980923220818.AAA10243@CX268689-A> Message-ID: <9809240031.AA05819@palmer.cca.rockwell.com> Document based preferences are not preferences. They are document attributes and should be saved with the document. User preferences should be stored using the provided preference management objects/APIs. Rather that broadcasting that a preference has changed, simply check the user's preference each time you attempt to perform some preference effected operation in the code. Preferences are stored as a dictionary in memory. The cost of the associative preference look-up is negligible. NSString *fileFormatPreference; fileFormatPreference = [[NSUserDefaults standardUserDefaults] stringForKey:@"FileFormat"]; if ([fileFormatPreference isEqualToString:@"Binary"]) { // Save binary format } else if ([fileFormatPreference isEqualToString:@"ASCII"]) { // Save ACSII format } else if ([fileFormatPreference isEqualToString:@"Both"]) { // Save both formats } else { // Save Binary by default } From kelleysoft at pressenter.com Wed Sep 23 17:43:18 1998 From: kelleysoft at pressenter.com (Greg Betzel) Date: Thu Nov 3 14:41:32 2005 Subject: Preference on preferences In-Reply-To: <19980923220818.AAA10243@CX268689-A> Message-ID: The following is IMHO. It may not be "correct" per se... >Is it better to have a single set of preferences that is shared with >all documents (easier to program and easier for the user) or should >each document have its own preferences (trickier to program and >potentially confusing the the user, but much more flexible). If each >document has its own preferences, is there a preferred method of >setting "default" preferences that are used for new documents VS >setting current document preferences. I'm not certain what all you mean by "preferences", but I'd say one should go both routes. Anything clearly document-specific, like text selection, scroll views, window position, etc etc should be stored in the document. Anything used application-wide that'd either effect the way the app works, or that really isn't document-specific should be maintained by the app. >Also, from an object oriented programming approach, is it better to >send out a notification to the main document controller that >preferences changed and let it distribute the new data, or have each >object that might want to know about a specific preferences register. I'd say that each object interested should register to recieve a "prefs changed" notification. However, the doc controller should do nothing more than send out the notification...any interested objects can then call accessor methods to get the new settings. (Actually, a better way would be to make a separate Preferences object & let that deal with all those prefs issues. Your controllers have better things to worry about. :) ) Greg Betzel Kelley Software From C.Ridd at isode.com Thu Sep 24 00:48:50 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: Your message of "Wed, 23 Sep 1998 20:15:23 BST." <01bde726$834124e0$LocalHost@icollins> Message-ID: <9623.906623330@isode.com> On Wed, 23 Sep 1998 20:15:23 BST, "Iain Collins" wrote: > put back the "Mac" part later (when we get to version 2, or should that be > IX). Still this is why we have codenames like "Rhapsody" (for confusing I hope not, as that would mean the version's gone from 10 down to 9 :-( You mean XI of course. > hum accordingly, even if they _don't_ know who Tim Burners Lee is. Get's 'em Berners-Lee, actually. Sorry to be pedantic! Chris From icollins at scotland.net Thu Sep 24 05:42:02 1998 From: icollins at scotland.net (Iain Collins) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: <9623.906623330@isode.com> Message-ID: > On Wed, 23 Sep 1998 20:15:23 BST, Chris Ridd wrote: > > put back the "Mac" part later (when we get to version 2, or > should that be > > IX). Still this is why we have codenames like "Rhapsody" (for confusing > > I hope not, as that would mean the version's gone from 10 down to 9 :-( Actually that could be a Freudian slip....are Apple missing out a version nine...? Iain, From ims at hyper.gr Thu Sep 24 06:03:58 1998 From: ims at hyper.gr (ims) Date: Thu Nov 3 14:41:32 2005 Subject: Preference on preferences In-Reply-To: <19980923220818.AAA10243@CX268689-A> Message-ID: >I am getting ready to start writing a preferences editor for an >application (the application fits into the document paradigm) and was >wondering the best way of doing it. > >Is it better to have a single set of preferences that is shared with >all documents (easier to program and easier for the user) or should >each document have its own preferences (trickier to program and >potentially confusing the the user, but much more flexible). If each >document has its own preferences, is there a preferred method of >setting "default" preferences that are used for new documents VS >setting current document preferences. Preferences is for the application, something common for all documents. If you want to change something specific for a document create an inspector. Check the ToDo example >Also, from an object oriented programming approach, is it better to >send out a notification to the main document controller that >preferences changed and let it distribute the new data, or have each >object that might want to know about a specific preferences register. > The first approach tends to limit the objects registering for >notifications but requires the main document controller to know inner >workings of some of its subordinate objects/controllers. The second >one make each object slightly more self contained but couples more >objects to the preferences. we are using the second approach. If an object is interest in something I think it should register itself to receive notifications. Regards NN Nikou Nikolaos for =============================================================== IMS Research & Development | tel. +30 (31) 94 52 98 PRIAMOY 12 | 95 09 03 544 53 THESSALONIKI | fax. +30 (31) 95 09 04 MACEDONIA - HELLAS | kai tou xpovou stnv polh! =============================================================== From Joe.Loda at usmail.mpct.com Thu Sep 24 06:06:10 1998 From: Joe.Loda at usmail.mpct.com (Loda, Joe) Date: Thu Nov 3 14:41:32 2005 Subject: Version Numbering in Executables Message-ID: All this recent talk about CVS and RCS reminded me about something we've needed for a while: executable versioning. In other words, given an executable (either app, framework or library), I would like to have some tool that would list all of the version information for each .m that went into constructing it. Extracting the RCS ID from each .m that went into comprising the executable and displaying it would be great. Anyone have any good ideas on how to implement a mechanism like this? I'm primarily interested in NT at the time, if that matters. --- Joe Loda, mpct Solutions Corporation, Chicago joe.loda@mpct.com (ASCII, MIME) From jens at next.cevis.uni-bremen.de Thu Sep 24 07:02:24 1998 From: jens at next.cevis.uni-bremen.de (Jens Breitenborn) Date: Thu Nov 3 14:41:32 2005 Subject: transparent views ? Message-ID: <199809241402.QAA01582@next.cevis.uni-bremen.de> Hi all, is it possible to set the transparency of any given view object ? We are doing image processing on radiological images. And we are investigating the possibility of transparent controls lying half-transparently on top of the image that is going to be processed. I have placed some controls (NSSlider, NSTextField, etc.) in an NSBox object and want to make the NSBox and all of its subviews to be drawn half-transparently in a view object that displays images. I have searched the NSView and NSControl interface but have not found what I am looking for. Any ideas ? Thanks in advance, Jens Breitenborn --------------------------------------------------------------------- Jens Breitenborn MeVis - Center for Medical Diagnostic Systems and Visualization mailto:jensb@mevis.de http://www.mevis.de/~jensb --------------------------------------------------------------------- From nat at object-factory.com Thu Sep 24 07:15:31 1998 From: nat at object-factory.com (Georg Wallmann) Date: Thu Nov 3 14:41:32 2005 Subject: Version Numbering in Executables Message-ID: <199809241415.QAA07656@eggeling.object-factory.com> > > All this recent talk about CVS and RCS reminded me about something we've > needed for a while: executable versioning. In other words, given an > executable (either app, framework or library), I would like to have some > tool that would list all of the version information for each .m that went > into constructing it. Extracting the RCS ID from each .m that went into > comprising the executable and displaying it would be great. > > Anyone have any good ideas on how to implement a mechanism like this? I'm > primarily interested in NT at the time, if that matters. > > --- > Joe Loda, mpct Solutions Corporation, Chicago > joe.loda@mpct.com (ASCII, MIME) You can do something like this: Put this line into every .m file of your programm static char rcs_id__[] = "$Id$"; Then to get the information from the binary say: strings | egrep ' \$Id:' (Does this works under NT ?) ---- What I did in one project, where we deployed multiple versioned binaries in different locations: I collected after the release compile. all the CVS directories in the source tree (the ones containing "Entries", "Repository" et.al.) into one tar archive, which I always installed with the binary. I think it was (If not I hope you get my point...) find . -type d -name CVS -print | tar cvfT foo.tar - To get to the installed version source I simply downloaded that file, unarchived it and said: cvs update This also gave me all the correct headers, and it didn't increase the binary size. Nat! P.S. One might also look into using #ident as a cpp directive (which isn't supported with all compilers, and AFAIK may work just with SCCS not RCS) From nat at object-factory.com Thu Sep 24 09:15:35 1998 From: nat at object-factory.com (Georg Wallmann) Date: Thu Nov 3 14:41:32 2005 Subject: Version Numbering in Executables Message-ID: <199809241615.SAA11463@eggeling.object-factory.com> > From: > Date: Thu, 24 Sep 1998 11:03:13 -0400 > To: nat@object-factory.com > > Er, perhaps I'm missing something here. Why didn't you simply use the cvs > tag command upon a release? If it's to be maintainable release code, then a > tag and a branch would be even better. > > Michael Fox > Sr. Software Engineer > Good point. Keeping the tag in the binary is a better answer to the question asked. In almost all circumstances this will be sufficient to retrieve your version. < long pause > Now that project I mentioned (different company, different people) we were really paranoid (and I think for good reason (different people...)). Tags can be moved and deleted, and if that happened we'd have lost the revision info of that build, if we only had the tag info. Nat! From allan at ali.bc.ca Thu Sep 24 09:34:16 1998 From: allan at ali.bc.ca (Allan Noordvyk) Date: Thu Nov 3 14:41:32 2005 Subject: transparent views ? In-Reply-To: <199809241402.QAA01582@next.cevis.uni-bremen.de> References: <199809241402.QAA01582@next.cevis.uni-bremen.de> Message-ID: <98Sep24.094026pdt.32259@gateway.ali.bc.ca> Jens Breitenborn wrote: > is it possible to set the transparency of any given view > object? I believe only the text cells let you control the transparency of the background. I don't know what will happen if you set the text color to a color with alpha-channel. It would be worth experimenting. Other views (e.g. NSSlider) are even less flexible. However see below. > We are doing image processing on radiological images. And we are > investigating the possibility of transparent controls lying > half-transparently on top of the image that is going to be > processed. > > I have placed some controls (NSSlider, NSTextField, etc.) in an > NSBox object and want to make the NSBox and all of its subviews > to be drawn half-transparently in a view object that displays > images. > > I have searched the NSView and NSControl interface but have not > found what I am looking for. > > Any ideas ? Coincidentally, I considered doing a similar thing for my radiological image viewing application (trying to jam images right up to the edges of the screen, leaving little room for widgets, right?). Although I took another UI route and never followed through with the idea, the only way I could see of doing this was to create custom cell subclasses for each of the basic control views which I was going to use. In each custom cell subclass you would need to override the drawInteriorWithFrame:inView: method to do the semi-transparent drawing over top of the current contents of the given view. If you were to use a bunch of semi-transparent NSImages to represent the various parts of the cell (e.g. the slider knob and sections of its track) the implementation is fairly straightforward, since you can just use the composite methods of NSCell. However, with that approach you'd have less flexibility (e.g. color) than if you simply called the rectangle drawing primitives yourself. You also would want to use your own custom view instead of an NSBox, since you can't make the box totally transparent. But since you just want it to maintain the array of the subviews, its implementation is trivial (ie. it doesn't do anything at all in its drawRect: method). If you want it to draw a semi-transparent border or something like that, this would also be a simple matter of a few calls in its drawRect: method. DISCLAIMER: When I was thinking this through, I was still on NeXTSTEP, so there may be a better way of doing this under the newer OpenStep AppKit. Tschuess! --- Allan Noordvyk, Software Artisan ALI Technologies, Richmond, BC, Canada From deirdres at eni.net Thu Sep 24 10:31:44 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? In-Reply-To: Message-ID: OS/9 was trademarked as I understand it. _Deirdre On Thu, 24 Sep 1998, Iain Collins wrote: > Actually that could be a Freudian slip....are Apple missing out a version > nine...? From robert at brightid.se Thu Sep 24 10:40:00 1998 From: robert at brightid.se (Robert Claeson) Date: Thu Nov 3 14:41:32 2005 Subject: Faxing Message-ID: <022201bde7e2$5ad49bb0$0c00a8c0@thunder.bright.nu> Is there a way to send faxes from a Yellow Box application running under Rhapsody DR2 (to be deployed on Rhapsody Server 1.0) on PPC? PD? Shareware? Commercial app? Built-in function? Oh, and it has to support Japanese. -- Robert Claeson Bright Interactive - Box 20055 - 104 60 Stockholm - Sweden Tel +46 8 4623004 - Mobile +46 708 124100 - Fax +46 8 4623001 E-mail robert@brightid.se - r.claeson@computer.org Web http://www.brightid.se "Saying Windows 95 is equal to Macintosh is like finding a potato that looks like Jesus and believing you've witnessed the second coming." From btoback at optc.com Thu Sep 24 10:43:16 1998 From: btoback at optc.com (Bruce Toback) Date: Thu Nov 3 14:41:32 2005 Subject: Is the name going to stay the same? Message-ID: <199809241712.KAA10523@landru.optc.com> Dierdre writes: >OS/9 was trademarked as I understand it. > >_Deirdre > >On Thu, 24 Sep 1998, Iain Collins wrote: > >> Actually that could be a Freudian slip....are Apple missing out a version >> nine...? I think that version 9 will be the version that's code-named Sonata. Originally, it was Allegro, then Sonata, then Rhapsody; the roadmap still shows another "classic" MacOS release before the customer release of MacOS X, since MacOS X is targeted for G3 machines. (There was a lot of protest about this at WWDC, with attendees saying that high-end 604e machines should also be supported by MacOS X.) -- Bruce -------------------------------------------------------------------------- Bruce Toback Tel: (602) 996-8601| My candle burns at both ends; OPT, Inc. (800) 858-4507| It will not last the night; 11801 N. Tatum Blvd. Ste. 142 | But ah, my foes, and oh, my friends - Phoenix AZ 85028 | It gives a lovely light. btoback@optc.com | -- Edna St. Vincent Millay From arti at hawaii.rr.com Thu Sep 24 11:13:54 1998 From: arti at hawaii.rr.com (Art lsbell) Date: Thu Nov 3 14:41:32 2005 Subject: Version Numbering in Executables Message-ID: <002601bde7e7$17fefb50$a579d2cc@bozo.hawaii.rr.com> Georg Wallmann wrote: > Put this line into every .m file of your programm > >static char rcs_id__[] = "$Id$"; > > >Then to get the information from the binary say: > > strings | egrep ' \$Id:' > >(Does this works under NT ?) Unfortunately not, at least with OPENSTEP Enterprise and CygWin32 UNIX utilities installed. Maybe some DOS command would do this (Ha!). I add the following to the top of each source file so that individual file version info is preserved in each executable: static const char *versionString = "$Header: $ cc: "__DATE__" "__TIME__; inline extern const char *suppressCompilerWarning(void) { return versionString; } I have recently switched from DevMan (RCS-based) to Visual Source Safe which doesn't support the $Id$ keyword, but the idea is the same. I can open an executable in TextEdit and use its Find panel to locate version strings, but that's not nearly as useful as the UNIX "ident" or "strings | egrep ' \$Id:'" output. Anyone have a Windows equivalent? Name: Art Isbell Organization: IDX Systems Corporation (for whom I do not speak) Email: arti@hawaii.rr.com Voice: +1 808 526 1226 Voice mail: +1 808 533 1827 US Mail: Honolulu, HI 96813-1021 From jhendry at cmg.fcnbd.com Thu Sep 24 11:17:58 1998 From: jhendry at cmg.fcnbd.com (Jonathan Hendry) Date: Thu Nov 3 14:41:32 2005 Subject: Version Numbering in Executables In-Reply-To: <002601bde7e7$17fefb50$a579d2cc@bozo.hawaii.rr.com> References: <002601bde7e7$17fefb50$a579d2cc@bozo.hawaii.rr.com> Message-ID: <199809241818.NAA04931@isdnjhendry.cmg.fcnbd.com> > Unfortunately not, at least with OPENSTEP Enterprise and CygWin32 UNIX >utilities installed. Maybe some DOS command would do this (Ha!). How about something based on AIAT? - JH From embuck at palmer.cca.rockwell.com Thu Sep 24 12:06:43 1998 From: embuck at palmer.cca.rockwell.com (Erik M. Buck) Date: Thu Nov 3 14:41:32 2005 Subject: transparent views ? References: <98Sep24.094026pdt.32259@gateway.ali.bc.ca> Message-ID: <9809241906.AA07541@palmer.cca.rockwell.com> Is the solution to the transparent view problem really to use a floating panel with controls ? The panel will never go behind the document. The panel can be moved to avoid obscuring images. If you put fixed position transparent controls over something important, they might obscure information and invite liability. The floating panel with controls could have a transparent background thus allowing the image to show through between the controls. From embuck at palmer.cca.rockwell.com Thu Sep 24 12:58:56 1998 From: embuck at palmer.cca.rockwell.com (Erik M. Buck) Date: Thu Nov 3 14:41:32 2005 Subject: FileMerge.app Message-ID: <9809241958.AA07886@palmer.cca.rockwell.com> For the zillionth time I have been reminded how cool FileMerge.app is. If a few bugs were fixed, this application alone could sell 50,000+ copies at $99 per. This could be one of many vehicles for getting YellowBox frameworks installed on Windows PCs. Integration with CVS would be great! From alvinj at sdt1.hpl.com Thu Sep 24 13:19:09 1998 From: alvinj at sdt1.hpl.com (Alvin Jee) Date: Thu Nov 3 14:41:32 2005 Subject: getwd and chdir? Message-ID: <199809242019.NAA10593@sdt1.hpl.com> Hello all! Which libraries/frameworks do I need to link in on WinNT to get the chdir and getwd type functions? It seems that I have the correct headers being included since I don't get compile-time errors, but the final link complains. BTW this is for a command-line app being ported from UNIXen to YB on NT/95. Thanks! --- Alvin Jee mailto:alvinj@sdt1.hpl.com NeXTmail gleefully accepted! Sending bits through the Internet since 1984. From wsanchez at apple.com Thu Sep 24 13:45:10 1998 From: wsanchez at apple.com (Wilfredo Sanchez) Date: Thu Nov 3 14:41:32 2005 Subject: FileMerge.app Message-ID: <199809242045.NAA21050@scv3.apple.com> | For the zillionth time I have been reminded how cool FileMerge.app | is. If a few bugs were fixed, this application alone could sell | 50,000+ copies at $99 per. This could be one of many vehicles for | getting YellowBox frameworks installed on Windows PCs. Integration | with CVS would be great! He he he... I wrote a number of shell scripts to make CVS easier to use for Core OS users, which is actually what I was hired for. Here's my shell script cvs-view-diffs, which does a little bit of useful stuff along those lines. This isn't part of Rhapsody, since it has a few nits to clean up and I need a little support from FileMerge, but perhaps people will find it useful. Typically usage: cvs co myproject cd myproject cvs-view-diffs -r SomeVersionTag myproject Improvements and feedback welcome. Enjoy, -Fred #!/bin/sh ## # View diffs in FileMerge # Must be run in a working copy. ## # Wilfredo Sanchez Jr. | wsanchez@apple.com # Copyright 1998 Apple Computer, Inc. ## ## # Set up PATH ## MyPath=/usr/bin:/bin; if [ -z "${PATH}" ]; then export PATH=${MyPath}; else export PATH=${PATH}:${MyPath}; fi ## # Usage ## usage () { echo "usage: $(basename $0) [-r [-r ]] [-a ] [files...]"; echo " Compares and using FileMerge with optional ancestor ."; echo " defaults to the version the current working copy is based on."; echo " defaults to the current working copy."; echo " If is the current working copy, then the merge"; echo " directory is set to the current working directory."; exit 2; } abort () { local TmpDir1 TmpDir2 TmpDirA; echo -n "Abort: cleaning up..."; if [ -n "${TmpDir1}" ]; then rm -rf "${TmpDir1}"; fi if [ -n "${TmpDir2}" ]; then rm -rf "${TmpDir2}"; fi if [ -n "${TmpDirA}" ]; then rm -rf "${TmpDirA}"; fi echo "done."; exit 1; } ## # Catch signals ## trap abort 1 2 15 ## # Handle command line ## if [ -z "${TMPDIR}" ]; then TMPDIR=/tmp; fi TmpDir1=${TMPDIR}/cvs-diff-$$-1; TmpDir2=${TMPDIR}/cvs-diff-$$-2; TmpDirA=${TMPDIR}/cvs-diff-$$-A; Revision1=""; Revision2=""; Ancestor=""; if ! args=$(getopt a:r: $*); then usage; fi set -- ${args}; for option; do case "$option" in -a) Ancestor="-r $2"; shift;shift; ;; -r) if [ -z "${Revision1}" ]; then Revision1="-r $2"; elif [ -z "${Revision2}" ]; then Revision2="-r $2"; else "Too many revisions specified."; usage; fi shift;shift; ;; --) shift; break; ;; esac done for file; do if [ ! -e ${file} ]; then echo "`basename $0`: ${file}: No such file or directory."; exit 1; fi done if [ ! -d "CVS" ]; then echo "There is no version here. Exiting."; exit 1; fi ## # Do The Right Thing ## echo -n "Figuring out which files changed..."; if [ -z "${Revision1}" ]; then DiffFiles=$(cvs -fnq update ${Revision1} ${Revision2} $* | egrep -v '^U ' | cut -d ' ' -f 2); else DiffFiles=$(cvs -fq diff --brief ${Revision1} ${Revision2} $* | egrep '^RCS file: ' | cut -d ' ' -f 3); fi echo " done" for File in ${DiffFiles}; do ## # This algorithm may seem overly abmitious, but the problem is that # the cvs diff command doesn't give us the file names we want. The # output of diff prints the filename without a path (relative or # otherwise) and the "RCS file:" output from CVS has what we want -- # almost. The problem is if you have &module in your modules file, # CVS/Repository doesn't necessarily reflect the Repository path for # each subdirectory in '.', and that stinks. So we pick the path apart # until we find the longest matching filename. # In the case where we used update instead of diff, this doesn't do # anything interesting. ## File=$(echo "$File" | sed 's|,v$||'); File=$(echo "$File" | sed 's|^/||'); LastFile=""; while [ ! -f "${File}" ]; do if [ "${LastFile}" = "${File}" ]; then break; fi LastFile=${File}; File=$(echo "${File}" | sed 's|^[^/]*/||'); done # Couldn't find a match; give up. if [ "${LastFile}" = "${File}" ]; then continue; fi ## # Get the orginial version and save it for later use. ## echo -n "Fetching ${File}..."; # If no specified, let's figure out the version ${File} is based on. if [ -z "${Revision1}" ]; then RevisionRight="-r $(grep /$(basename "${File}")/ $(dirname "${File}")/CVS/Entries | sed 's|^[^/]*/[^/]*/||' | sed 's|/.*$||')"; else RevisionRight="${Revision1}"; fi # Get . mkdir -p "${TmpDir1}"/$(dirname "${File}"); cvs -fq update -kb ${RevisionRight} -p "${File}" > "${TmpDir1}/${File}"; # Get , if needed. if [ -n "${Revision2}" ]; then mkdir -p "${TmpDir2}"/$(dirname "${File}"); cvs -fq update -kb ${Revision2} -p "${File}" > "${TmpDir2}/${File}"; fi # Get Ancestor, if needed if [ -n "${Ancestor}" ]; then mkdir -p "${TmpDirA}"/$(dirname "${File}"); cvs -fq update -kb ${Ancestor} -p "${File}" > "${TmpDirA}/${File}"; fi echo " done"; done # It would be cool if I could tell opendiff to tell FileMerge to: # - Not open the "Open" window when launched # - Filter "Added/Deleted" if [ -d "${TmpDir1}" ]; then AncestorArgs=""; if [ -n "${Ancestor}" ]; then AncestorArgs="-ancestor ${TmpDirA}"; fi if [ -d "${TmpDir2}" ]; then opendiff "${TmpDir1}" "${TmpDir2}" ${AncestorArgs}; else opendiff "${TmpDir1}" . -merge . ${AncestorArgs}; fi else echo "No diffs."; fi # Because opendiff returns before the user is done, there is no # way to know when the user has finished viewing the diffs, so # I can't clean up ${TmpDir1}, ${TmpDir2}, and ${TmpDirA} #rm -rf ${TmpDir1} ${TmpDir2} ${TmpDirA}; From kc at omnigroup.com Thu Sep 24 14:52:09 1998 From: kc at omnigroup.com (Ken Case) Date: Thu Nov 3 14:41:32 2005 Subject: [Moderator] Reminder: this list is for developing software Message-ID: <199809242155.OAA23247@ignem.omnigroup.com> Just thought I'd remind people that this list is for developing software. We have two other lists available for other topics, please use them when appropriate. Thanks, Ken P.S. -- Here are two off-topic threads that I'd like to see moved to our other lists: Topic: Is the name going to stay the same? We have the answer to the original developer question ("What does uname return?"); the rest of this thread (e.g., "What happened to 9?") belongs on MacOSX-talk. Topic: Faxing MacOSX-admin would be a better place for this question, since it's seeking a FAX solution rather than asking about developing FAX software. From hh at mdlink.de Thu Sep 24 15:05:42 1998 From: hh at mdlink.de (Helge Hess) Date: Thu Nov 3 14:41:32 2005 Subject: FileMerge.app References: <9809241958.AA07886@palmer.cca.rockwell.com> Message-ID: <360AC236.61027430@mdlink.de> Erik M. Buck wrote: > > For the zillionth time I have been reminded how cool FileMerge.app > is. If a few bugs were fixed, this application alone could sell > 50,000+ copies at $99 per. This could be one of many vehicles for > getting YellowBox frameworks installed on Windows PCs. Integration > with CVS would be great! Some days ago I browsed www.javasoft.com and found a version control system named JavaSafe. It uses RCS as it's basis if I remember right. Anyway, there was a screenshot of 'their' merge window which looked exactly like FileMerge.app .. Maybe it is what you search for (although an ObjC based solution would be better ..). Greetings Helge From arti at hawaii.rr.com Thu Sep 24 15:25:19 1998 From: arti at hawaii.rr.com (Art lsbell) Date: Thu Nov 3 14:41:32 2005 Subject: FileMerge.app Message-ID: <00f801bde80a$36ad5c90$a579d2cc@bozo.hawaii.rr.com> Helge Hess wrote: >Some days ago I browsed www.javasoft.com and found a version control >system named JavaSafe. It uses RCS as it's basis if I remember right. >Anyway, there was a screenshot of 'their' merge window which looked >exactly like FileMerge.app .. >Maybe it is what you search for (although an ObjC based solution would >be better ..). If I'm not mistaken (and it's happened before :-) JavaSafe was formerly DevMan, a NEXTSTEP/OPENSTEP app, before it was purchased by Sun. DevMan used FileMerge for diff displays, so maybe they were able license FileMerge for JavaSafe. DevMan was also aware of ProjectBuilder projects by parsing either Makefile or PB.project for project files. It also could be told about file packages like nibs that should be treated atomically. I wonder whether these capabilities remain in JavaSafe? Name: Art Isbell Organization: IDX Systems Corporation (for whom I do not speak) Email: arti@hawaii.rr.com Voice: +1 808 526 1226 Voice mail: +1 808 533 1827 US Mail: Honolulu, HI 96813-1021 From sarwat at interlog.com Thu Sep 24 17:47:36 1998 From: sarwat at interlog.com (Sarwat Khan) Date: Thu Nov 3 14:41:33 2005 Subject: Problem with reverting an NSDoc. Message-ID: When my document loads data from loadDataRepresentation:ofType:, it needs to put some of the data into the document's corresponding window's objects (duh). So, the data is stored internally in model objects and such and when windowControllerDidLoadNib: is called, it sets the data for the objects in the window.. However, when the revert command is given, I don't get that chance to insert the data at windowControllerDidLoadNib--the window controller already loaded the nib file. I can't do anything (that I'm aware of) from loadDataRep because usually when it's called the window controllers haven't been made yet. Is there a good spot to put the code? Or do I have to call the code from both places when approriate? That's not too bad, but I don't really like it. ............................................................ Sarwat Khan Brampton, Ontario sarwat@interlog.com http://www.interlog.com/~sarwat From dennyrex at earthlink.net Thu Sep 24 21:39:17 1998 From: dennyrex at earthlink.net (dennyrex@earthlink.net) Date: Thu Nov 3 14:41:33 2005 Subject: developing FAX software References: <199809242155.OAA23247@ignem.omnigroup.com> Message-ID: <199809250331.UAA14154@stork.prod.itd.earthlink.net> >Topic: Faxing > MacOSX-admin would be a better place for this question, since >it's seeking a FAX solution rather than asking about developing FAX >software. well I'm seriously in over my head here, but is there an obviuos way to export the fax directory from a netinfo-d fax server (running NeXTSTEP or OPENSTEP) to some place logical on RDR2, such that one could then build a quick and dirty viewer for faxes rec'd on said server? One would need to either change the extension from .fax to .tiff, or instruct the viewer to interpet .fax as .tiff. I have tested that a sample_doc.fax will show up fine in a window that takes .tiffs. The logging and info from the .control file would go into a suitable table view-in-a-panel. Since we don't know what the ultimate outcome from Apple for OSX faxing will be, it may not make sense to design a labor-intensive fancy-app for faxViewing, but for those on existing netinfo networks, it would be nice to be able to view faxes when logged into an RDR2 box. (if this should be retargeted to -admin, what are you all using to veiw faxes? I hate to cross post so I'm posting here.) -rick Rick Sanford Dental Records www.dentalrecords.com dennyrex@earthlink.net From cwolf at wolfware.com Thu Sep 24 16:55:14 1998 From: cwolf at wolfware.com (Christopher Wolf) Date: Thu Nov 3 14:41:33 2005 Subject: (Non)-refreshing behavior with NSComboBox/EOComboAssociations Message-ID: <9809242355.AA140142@Artoo> Anyone else seen this in DR2.... I have an NSComboBox whose options are populated using the "titles" aspect of an EOComboAssoc bound to an attribute of a detail-display group. If the number of items in the detail-display group changes the drop-down list associated with the NSComboBox does not reflect the new number of items.... until the window containing the NSComboBox is resized. I assume something is forgetting to tell the combo-box drop-down list to refresh itself at the appropriate time. Is this a known bug? Are there any good work-arounds? (Telling the combo-box to redisplay itself manually would probably work but then I have to set-up the controller to watch for the displayGroup notifications which kinda defeats the whole purpose....) Thanks, - Chris From Philippe.Robert at uptime.ch Fri Sep 25 00:09:02 1998 From: Philippe.Robert at uptime.ch (Philippe C.D. Robert) Date: Thu Nov 3 14:41:33 2005 Subject: Is the name going to stay the same? In-Reply-To: <199809241712.KAA10523@landru.optc.com> References: <199809241712.KAA10523@landru.optc.com> Message-ID: <9809250709.AA25401@california.uptime.ch> You wrote: > Dierdre writes: > > >OS/9 was trademarked as I understand it. > > > >_Deirdre > > > >On Thu, 24 Sep 1998, Iain Collins wrote: > > > >> Actually that could be a Freudian slip....are Apple missing out a > >> version nine...? > > I think that version 9 will be the version that's code-named Sonata. > Originally, it was Allegro, then Sonata, then Rhapsody; the roadmap still > shows another "classic" MacOS release before the customer release of > MacOS X, since MacOS X is targeted for G3 machines. (There was a lot of The last 'classic' MacOS will be 8.6, not 9 sweet dreams, Phil -- Philippe C.D. Robert OpenStep/WebObjects/Unix Uptime Object Factory Inc http://www.uptime.ch From C.Ridd at isode.com Fri Sep 25 01:28:09 1998 From: C.Ridd at isode.com (Chris Ridd) Date: Thu Nov 3 14:41:33 2005 Subject: Version Numbering in Executables In-Reply-To: Your message of "Thu, 24 Sep 1998 16:15:31 +0200." <199809241415.QAA07656@eggeling.object-factory.com> Message-ID: <11439.906712089@isode.com> On Thu, 24 Sep 1998 16:15:31 +0200, Georg Wallmann wrote: > You can do something like this: > Put this line into every .m file of your programm > > static char rcs_id__[] = "$Id$"; > > > Then to get the information from the binary say: > > strings | egrep ' \$Id:' Use ident(1) instead. Not indent, but ident :-) > (Does this works under NT ?) Probably not. It should be easy to knock up a YB app that knew enough about executable formats to get at this information, though. It's almost an inspector really. Chris From robert at brightid.se Fri Sep 25 03:23:34 1998 From: robert at brightid.se (Robert Claeson) Date: Thu Nov 3 14:41:33 2005 Subject: developing FAX software Message-ID: <00a101bde86e$8d26f8b0$0c00a8c0@thunder.bright.nu> dennyrex@earthlink.net wrote: >Since we don't know what the ultimate outcome from >Apple for OSX faxing will be, it may not make sense to design a >labor-intensive fancy-app for faxViewing, but for those on existing netinfo >networks, it would be nice to be able to view faxes when logged into an RDR2 >box. > >(if this should be retargeted to -admin, what are you all using to veiw >faxes? I hate to cross post so I'm posting here.) I don't know about viewing. I'm the poster of the original message, and I'm not looking for a fax solution like the ones typically found under Windows NT or MacOS. We're developing a c/r application and need to be able to fax confirmations, reports and documents directly from the application, most likely from a server process that picks the information from the database. So I'm looking for a fax component, class or whatever that can be used in an YB application to send faxes. If it's part of a complete fax solution, so be it, but that's actually more than my needs. Oh yes, I still miss the built-in fax functionality that I had in Nextstep. I still miss the built-in ISDN and the Lighthouse apps we used for that matter. Guess things were better in the past. From ddd at cup.hp.com Fri Sep 25 10:26:43 1998 From: ddd at cup.hp.com (Christophe de Dinechin) Date: Thu Nov 3 14:41:33 2005 Subject: Better CLI ? References: <3.0.5.32.19980918141715.0090cd90@ebsmmfs001.servicenet.net> Message-ID: <360BD24B.CAA2AFA1@cup.hp.com> Pradeep Bashyal - VIA wrote: > Hence I was wondering how hard it would be write another shell > (probably similar to DCL) that would run instead of the default > shell in MacOS X Server. Would it be just another server on > top of Mach ? Does such a beast exist ? > It would be nice to have easy to use CLI with the easiest to use > GUI. The best of both worlds. A CLI in Unix is not part of the "core" system. It is just another application. For instance, most Unix systems have more than one of: sh, ksh, csh, tcsh, bash, ... This was almost a wise move in designing Unix. The only major problem with this design (compared to VMS or others) is so-called meta-characters. When you type DEL *.* in DOS, it asks for confirmation. That's because *.* is passed as such to the DOS DEL command, which then expands it to mean "all files in directory". If you type rm * under any Unix, you CANNOT write a rm that asks for confirmation, because the shell does the * expansion, and passes the 332 files of your directory to rm. I once had a file name '-r' in my current directory, and typed something like rm *. Well, -r comes first, so it meant rm -r , so it also erased all subdirectories recursively... Stupid design. Similarly, you can't have something as -? to mean "help" (like in DEL /? in DOS). That's again because ? has to mean "Match a single character". Well, it does that in DOS too. DEL ? will delete any single character file. But the meaning is to DEL, not to the command line, so that you can still have DEL /?. In other words, you can write alternate shells for Unix, and that's relatively easy. This has not to be a Mach server or such a beast, only some other CLI application. But you cannot perfectly mimic VMS behaviour, such as consistent use of a character for options, and things like that. If you choose, say, + as a character for your options, you might still have something like cmd * give you a + on the command line. Note: Don't be confused. I don't like DOS. But VMS was certainly better than Unix for that particular single aspect. Christophe From deirdres at eni.net Fri Sep 25 10:43:01 1998 From: deirdres at eni.net (Deirdre Saoirse) Date: Thu Nov 3 14:41:33 2005 Subject: Better CLI ? In-Reply-To: <360BD24B.CAA2AFA1@cup.hp.com> Message-ID: This reminds me of a guy I know who, as a test of prospective sysadmins, names a file * and sees how long it takes them to remove it -- without removing anything else. Of course rm * doesn't work for that.... _Deirdre On Fri, 25 Sep 1998, Christophe de Dinechin wrote: > I once had a file name '-r' > in my current directory, and typed something like rm *. Well, -r > comes first, so it meant rm -r , so it > also erased all subdirectories recursively... Stupid design. From fabienr at ncmi.com Fri Sep 25 13:25:49 1998 From: fabienr at ncmi.com (Fabien Roy) Date: Thu Nov 3 14:41:33 2005 Subject: Better CLI ? In-Reply-To: <360BD24B.CAA2AFA1@cup.hp.com> References: <360BD24B.CAA2AFA1@cup.hp.com> Message-ID: <199809252026.NAA07921@ignem.omnigroup.com> What about in csh alias rm "rm -i" Fabien --- Fabien L Roy NationsBanc Montgomery Securities, LLC voice: (704)386-75-76 100 North Tryon Street fax: (704)388-95-64 NC1-007-09-08 Charlotte NC 28255 Beeper: 143-9722 (1-800-946-46-46) or http://www.MobileComm.com/message/ email: fabienr@ncmi.com (NeXT/Mime) Pager-email 1439722@mobilecomm.net From ddd at cup.hp.com Fri Sep 25 14:15:14 1998 From: ddd at cup.hp.com (Christophe de Dinechin) Date: Thu Nov 3 14:41:33 2005 Subject: Better CLI ? References: Message-ID: <360C07BB.F1F8F404@cup.hp.com> To list administrator: I know this might seem a bit off topic for macosx-dev, but I think it is worth answering once. To other people: Please don't follow up that thread on macosx-dev. It is not the right place for that. I moved to macosx-talk just for that. Follow up there, thanks John Ray wrote: > >If > >you type rm * under any Unix, you CANNOT write a rm that asks for > >confirmation, because the shell does the * expansion, and passes > >the 332 files of your directory to rm. > > Of course you can... > > Simply count the number of files used as arguments and compare to the number > of files in the directory. > > In pseudo-perl: > > $removecount=@ARGC; > @directory=glob("*"); > $dircount=@directory; > > if ($dircount==$removecount) { > print "Are you sure you want to remove all the files?" > } Smart you :-) Now, what if one of the files is named -r, -i, etc? Remember, rm gets rm -r a b c, and -r is a valid option... Worse: what if a file is named - and the other one -r. Then you get rm - -r, which means remove -r, but not -... OK, you are not concerned with -r. Remember: -f means "no warnings, go ahead". So, what if your first file is named -f? What if I want to test for: rm *.c? Or to give a warning for any form of possibly dangerous shell expansion? OK, rm is not a good example. Let's move to 'mv': how to you have mv *.C *.c work? Under DOS (or at least some DOS clones, not too sure with the M$ one), it does just what you want, namely renaming any file ending with .C using the same name, ending with .c. I want a detailed algorithm of the Unix version, not just a sketchy idea... By the way, if you find one that works always, you might as well go and patent it :-) Oh, by the way, when you are done, write a simple shell script that applies a command recursively to all files in a directory. You see, something like a general '-r' switch. Unix is so cute that you could even call it -r. The only problem is that the simplest version I know which "almost" works (handling . files and directories, knowing about files looking like options of the command it calls, etc) is about 25 lines of shell script, and does not work if there is a circular series of symbolic links (it loops forever, or does not follow symbolic links, your choice). Unix is so great. Fabien L Roy Wrote: > What about in csh > alias rm "rm -i" Any experienced Unix user will tell you: "DON'T DO THAT! BAD IDEA". Apart from the fact that it does then ALWAYS ask, for EACH file, even if I type rm a. It does not see * as a special case. Real life story. In some large french company where I was doing a software install, I go to the system administrator to get the rights to install. The guy had a big 19" screen full of xterms with a # prompt (root). Scary. I tell him: "Aren't you afraid of erasing something by mistake?" Condescending answer: "No, you see", and types rm *. The thing asks for confirmation. He had just your trick. "Yes, but what if you accidentally type \rm *: the \ is dangerously close to the return key, and you can hit it by mistake". Stare, then "Gee, I wonder what it does". And the guy TRIES, in his /bin: \rm *. I quickly got out of the room and sent someone else to install the tape. For a good laugh, please buy the Unix Haters Handbook (http://www.robelle.com/library/smugbook/unixhate.html). Best regards to all of you who tried to answer my quizz. Hope I did not disillusion you too much. The good news for MacOS X is: In the above book, the things that people-who-use-it-and-know seem to hate most about Unix are: - The CLI: MacOS X allows you to do without, and that's GOOD NEWS - X-Window: Mac OS X does not use it - The Unix file system: Mac OS X has something else. Whether it's really better is unknown - System configuration: Mac OS X does a great job at that too. - NFS: Well, this one has been slowly fixed over time. Not perfect yet, but functional. So in the end, we end up with what might be the first usable Unix system. Christophe From robert at brightid.se Fri Sep 25 15:40:31 1998 From: robert at brightid.se (Robert Claeson) Date: Thu Nov 3 14:41:33 2005 Subject: Better CLI ? Message-ID: <000f01bde8d5$818691c0$0a01a8c0@nimm.brightid.se> Deirdre Saoirse wrote: >This reminds me of a guy I know who, as a test of prospective sysadmins, >names a file * and sees how long it takes them to remove it -- without >removing anything else. > >Of course rm * doesn't work for that.... Or, for that matter, creating a file with a slash in the name... From jpitts at atomicpsr.com Fri Sep 25 16:39:55 1998 From: jpitts at atomicpsr.com (James Pitts) Date: Thu Nov 3 14:41:33 2005 Subject: MySQL and PHP Message-ID: <000801bde8dd$cd04c420$0b759bcf@page.atomicpsr.com> I was wondering if there were any efforts to compile MySQL (freeware SQL server) and PHP for Apache (freeware easy web scripting) to MacOS X Server. I'd like to see an alternative to the robust (but rather expensive) WebObjects, as well as an easy-to-use freeware database. I assume that these are primarily run on Linux, but they have been ported to all of the usual suspects. I can see that these tools pose a formidable challenge to MS "Active Server" and SQL attempts, Cold Fusion (which I use a lot), and the hellish Perl-to-database implementations that are out there. What would be really cool is if we could get EOF to be a visual manager for MySQL (its a command line app). I noticed that www.php.net has a binary for FreeBSD 2.2.5, and source code files available of their latest release. MySQL also has source code distribution, and binaries for may platforms. Has anyone successfully gotten PHP or MySQL to run in DR2? Thanks, << james >> From seanl at cs.umd.edu Fri Sep 25 16:40:45 1998 From: seanl at cs.umd.edu (Sean Luke) Date: Thu Nov 3 14:41:33 2005 Subject: Better CLI ? In-Reply-To: Message-ID: On Fri, 25 Sep 1998, Deirdre Saoirse wrote: > This reminds me of a guy I know who, as a test of prospective sysadmins, > names a file * and sees how long it takes them to remove it -- without > removing anything else. > > Of course rm * doesn't work for that.... er... rm "*" ObMacOSXDev: Does there exist a repository of existing Defaults app name keys? I'm concerned about some conflicts I may have. From embuck at palmer.cca.rockwell.com Fri Sep 25 16:58:48 1998 From: embuck at palmer.cca.rockwell.com (Erik M. Buck) Date: Thu Nov 3 14:41:33 2005 Subject: Dev perspective of Better CLI ? References: <360C07BB.F1F8F404@cup.hp.com> Message-ID: <9809252358.AA11010@palmer.cca.rockwell.com> My take on the better CLI thread is below. First, as a general principle, it two or more programs require the same capability, it is usually a good idea to implement that capability in a library that can be shared by the programs. Doing so provides one point of maintenance, reduces over all code, and provides one point for enhancement. This brings with it all of the well known problems with libraries. The first and biggest problem is making developers aware of the existence of the capabilities in the library. Every time I start work on an existing project, I have to learn what capabilities already exist, where, why, and how. If such information is not available, the library might as well not exist because I am doomed to reimplement it. How many times have we developers found access to essential information overly difficult? On the other hand, how many times have we heard another programmer complain about a steep learning curve ? A library is a technique used to promote the reuse of code. The Unix CLI is another technique used to promote the reuse of code. Why embed gzip in every application ? Why not pipe the output from find into grep or sort ? Why have every program expand its arguments when that job can be performed by the shell ? As described in the Better CLI thread, there are indeed problems with having the shell perform expression evaluations prior to sending arguments to programs and also with redirection of I/O between programs. 1) This is I think part of the Shell and an alternate shell does not need to do this 2) None of the standard programs would work in such a shell for the following reasons: A) Unix programmers are used to not having to duplicate argument expansion code in every program created. Therefore, if the shell doesn't do it, no one will. B) Rerursive expansion of expressions, file name completion, io indirection, etc. are extremely powerful. Many standard Unix programs could not work well without the help of other programs like find, sed, grep, awk, more, wc, and sort. How many time have you cursed that some Dos command does not do anything with * as an argument. How about *.foo ? How about f*.gz ? No two programs expand arguments the same way! rename *.C *.c only works, if it works, because it is gratuitously non-standard. From zander at relevantknowledge.com Sat Sep 26 14:04:37 1998 From: zander at relevantknowledge.com (Aleksey Sudakov) Date: Thu Nov 3 14:41:33 2005 Subject: MySQL and PHP In-Reply-To: <000801bde8dd$cd04c420$0b759bcf@page.atomicpsr.com> Message-ID: <9809261704.AA371401@black> > I was wondering if there were any efforts to compile MySQL > (freeware SQL server) MySQL needs libtermcap and as of today nobody ported it to RDR2. An attempt to build PostgeSQL also failed due to lack of complete POSIX support in RDR2. MiniSQL is the only more or less free RDBMs reported to be working on RDR2 and promised to be released around this weekend. > and PHP for Apache (freeware easy web scripting) to MacOS X Server. > I'd like to see an alternative to the robust (but rather expensive) > WebObjects, as well as an easy-to-use freeware database. You may want to check out JavaWebServer servlets (http://jserv.javasoft.com) as a cheap alternative to WebObjects but be warned that you will pretty much get what you paid for. I didn't bother to check both JavaWebServer and apache module to run servlets on RDR2 but both didn't work on RDR1 due to bugs in JavaVM (threads and IP addresses respectively) Regards, Aleksey From theisen at akaMail.com Sun Sep 27 00:58:17 1998 From: theisen at akaMail.com (Dirk Theisen) Date: Thu Nov 3 14:41:33 2005 Subject: MySQL and PHP In-Reply-To: <000801bde8dd$cd04c420$0b759bcf@page.atomicpsr.com> Message-ID: <1dfyrw1.inw6cr26k073M@ascend-tk-p107.rhrz.uni-bonn.de> Hello, James! > I'd like to see an alternative to the robust (but rather expensive) > WebObjects, as well as an easy-to-use freeware database. OpenBase lite is currently in alpha testing (current version seems to be unusable, but there is a Demo of the full version You can work with until it's release). It is a single user DB engine with EOF adapter. It will be free and will work with with Mac OS X and WebObjects. Last I checked, MySQL was shareware? Please correct me, if I'm mistaken. Dirk P.S. I think we should move this thread to the EOF list. From dev at humph.com Sun Sep 27 01:25:23 1998 From: dev at humph.com (Giuliano Gavazzi (dev)) Date: Thu Nov 3 14:41:33 2005 Subject: jserv. Was: Re: MySQL and PHP In-Reply-To: <9809261704.AA371401@black> Message-ID: At 10:21 pm +0100 1998/09/26, Aleksey Sudakov wrote: ... >You may want to check out JavaWebServer servlets >(http://jserv.javasoft.com) as a cheap alternative to WebObjects but be >warned that you will pretty much get what you paid for. > >I didn't bother to check both JavaWebServer and apache module to run >servlets >on RDR2 but both didn't work on RDR1 due to bugs in JavaVM >(threads and IP >addresses respectively) I used jserv for some simple tests in DR2 with apache 1.3.0 and it works. No idea under heavy load or more comprehensive testing. But this perhaps belongs to the admin list. Giuliano H U M P H || ||| software development of: Java & C++ Client/Human Interface applications. Native Server applications on MacOS - Rhapsody - (Mk)Linux http://www.humph.com/ From wchin at acm.org Sun Sep 27 08:36:02 1998 From: wchin at acm.org (Bill Chin) Date: Thu Nov 3 14:41:33 2005 Subject: MySQL and PHP Message-ID: <199809271538.LAA01463@nikita.richmond.net> Aleksey Sudakov wrote: > MiniSQL is the only more or less free RDBMs reported to be working on RDR2 and > promised to be released around this weekend. MiniSQL 1.x seems to work fine, but is extremely limiting (expressions have to be very, very simple). The EOAdaptor (based on Mr. Sudakov's work) right now does not properly handle compound expressions and thus breaks really easily. I have compiled the MiniSQL 2.0.4.1, however, it fails the supplied regression tests. The order by isn't handled properly in some cases. That has gotten in the way of determining if the msync() calls I had to get rid of causes any real problems. The order by failure exists when I tried it on MkLinux. Does it pass on Intel? I don't have a handy Intel box to try it on at the moment. I also tried using the "OLD_CODE" portion of the sort code which uses their own qsort function with no success. If I don't get anywhere on it soon, I'll go ahead and get it running on an OpenBSD/i386 machine and continue to work on the EOAdaptor modifications. ..Bill Chin From paulrs at lgs-systems.com Sun Sep 27 08:35:13 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:33 2005 Subject: Named system bitmaps provided by the AppKit Message-ID: <9809271535.AA03125@slab> Hey guys, The NSImage doc indicates that the +imageNamed: method can be given the name of an image which corresponds to named system bitmaps provided by the AppKit. Does anyone know where I can get a list of the images provided by the AppKit? Is this stuff really public, or is the NSImage doc misleading? I would like to get a pointer to the images used by the buttons in scroll bars. I found the tiff in the AppKit framework which contains these images, but the AppKit itself must somehow pull the individual icons out of the file. Any information would be appreciated. Regards, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From gilesa at geocities.com Sun Sep 27 21:58:36 1998 From: gilesa at geocities.com (Giles Alexander) Date: Thu Nov 3 14:41:33 2005 Subject: Notifications from Threads Message-ID: <199809280459.VAA15226@geocities.com> Hi all, I'm using a thread in an Yellow Box application I'm developing. The thread is started with: NSThread detachNewThreadSelector. The selector waits for a single function call to finich and then posts a notification to: NSNotificationCenter defaultCenter. What I'm really wondering is, will the notification be dealt with in the main thread of the application, or is there a default centre for the thread which handles all notifications? I'm not creating any other notifcation centres. Thanks, Giles Alexander Giles Alexander -- giles@kagi.com If builders built buildings the way programmers wrote programs, the first woodpecker that comes along would destroy all of civilisation. From ttakeo at amtec.co.jp Sun Sep 27 23:47:34 1998 From: ttakeo at amtec.co.jp (tetuya takeo) Date: Thu Nov 3 14:41:33 2005 Subject: Notifications from Threads In-Reply-To: <199809280459.VAA15226@geocities.com> References: <199809280459.VAA15226@geocities.com> Message-ID: <9809280647.AA06997@amtec000.amtec.co.jp> > I'm using a thread in an Yellow Box application I'm developing. The > thread is started with: > > NSThread detachNewThreadSelector. > > The selector waits for a single function call to finich and then posts a > notification to: > > NSNotificationCenter defaultCenter. > > What I'm really wondering is, will the notification be dealt with in the > main thread of the application, or is there a default centre for the > thread which handles all notifications? > > I'm not creating any other notifcation centres. > I think that application has only one defaultCenter. But the defaultCenter is accessible from any threads. That's the problem. If I post notification which has observer like UI object running on main thread, application goes into crash. Notification is not suitable for messaging between threads. To avoid such a problem, we'd better to use D.O. --- Tetuya TAKEO ttakeo@amtec.co.jp (NeXTmail/MIME accepted) From sfroment at crt.umontreal.ca Mon Sep 28 07:21:36 1998 From: sfroment at crt.umontreal.ca (Serge Froment) Date: Thu Nov 3 14:41:33 2005 Subject: Multi-window NSDocument App Message-ID: <00e901bdeaeb$4cfb6580$b964cc84@gen1.crt.umontreal.ca> I am writting a NSDocument application that allows opening two windows for a single document. I override makeWindowControllers in my NSDocument subclass, but both window open immediately, even if the "Visible at launch time" checkbox is unchecked in IB for the windows. (I see no other option that could apply in IB.) How can I have only one window to show up when the user opens a document, with code similar to [InfoPanelController showWindow] to open the second window on user request? Serge From paulrs at lgs-systems.com Mon Sep 28 06:59:15 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:33 2005 Subject: Problems with NSDateFormatter Message-ID: <9809281359.AA03573@slab> Hey guys, I know that I am doing something very stupid, but I just can't see it. Can someone tell me what's going on here? Thanks, Paul (gdb) po [[_yearTextFieldCell objectValue] class] NSCalendarDate (gdb) po [_yearTextFieldCell objectValue] 09/28/1998 09:51 (gdb) po [_yearTextFieldCell formatter] (gdb) po [[_yearTextFieldCell formatter] dateFormat] Y (gdb) po [_yearTextFieldCell stringValue] Y <-------- WHY ISN'T THIS '1998'? --------> (gdb) po [[_yearTextFieldCell objectValue] descriptionWithCalendarFormat:@"Y"] Y <-------- WHY ISN'T THIS '1998'? --------> --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From snoyes1 at .rdc1.az.home.com Mon Sep 28 08:29:41 1998 From: snoyes1 at .rdc1.az.home.com (Steven Noyes) Date: Thu Nov 3 14:41:33 2005 Subject: Problems with NSDateFormatter Message-ID: <19980928152958.AAA22531@CX268689-A> > From: "Paul R. Summermatter" > ... > Hey guys, > > I know that I am doing something very stupid, but I just can't see > it. Can someone tell me what's going on here? > > Thanks, > Paul > > (gdb) po [[_yearTextFieldCell objectValue] class] > NSCalendarDate > (gdb) po [_yearTextFieldCell objectValue] > 09/28/1998 09:51 > (gdb) po [_yearTextFieldCell formatter] > > (gdb) po [[_yearTextFieldCell formatter] dateFormat] > Y > (gdb) po [_yearTextFieldCell stringValue] > Y <-------- WHY ISN'T THIS '1998'? --------> > (gdb) po [[_yearTextFieldCell objectValue] > descriptionWithCalendarFormat:@"Y"] > Y <-------- WHY ISN'T THIS '1998'? --------> > Try setting your format string to "%Y" and not "Y". From paulrs at lgs-systems.com Mon Sep 28 15:32:41 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:33 2005 Subject: Matrices & Changing Selections Message-ID: <9809282232.AA04022@slab> Hey guys, I've been round this bend once before, and it apears that I never got this solved properly. The issue is that I can find no one primitive method which is always called whenever the selection changes in a matrix. In a subclass of NSMatrix which I have written, I need to know whenever the selection is about to change so that I can give the delegate an opportunity to reject the change (I would love to know why NSMatrix doesn't do this by default?). Does anyone know how I can properly manage this without overriding keyDown, mouseDown and all the select... methods on NSMatrix? Thanks, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From aep at apple.com Mon Sep 28 16:03:55 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:33 2005 Subject: Matrices & Changing Selections Message-ID: <199809282303.QAA31618@scv2.apple.com> > I've been round this bend once before, and it apears that I never > got this solved properly. > > The issue is that I can find no one primitive method which is always > called whenever the selection changes in a matrix. In a subclass of > NSMatrix which I have written, I need to know whenever the selection is > about to change so that I can give the delegate an opportunity to reject the > change (I would love to know why NSMatrix doesn't do this by default?). > > Does anyone know how I can properly manage this without overriding > keyDown, mouseDown and all the select... methods on NSMatrix? You should take a look at NSTableView instead for this kind of behaviour. The NSMatrix stuff isn't really well factored for that kind of feature. There are number of internal routines called when setting and clearing the selection but no real chance for rejecting a selection. Alternatively, you could create a custom cell class that can decide whether or not to show a selection and to ignore completely ignore NSMatrix's somewhat poor concept of selection. Personally, I'd go with NSTableView. Andrew Platzer Application Frameworks Apple Computer, Inc. From paulrs at lgs-systems.com Tue Sep 29 05:40:34 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:33 2005 Subject: Drawing vertical text by hand Message-ID: <9809291240.AA04399@slab> Hey all, With OpenStep, the AppKit guys introduced some nice additions to NSString and NSAttributedString which handle the drawing of text in a rect. I do not have a large amount of PS drawing experience, so forgive me if this is a stupid question, but is there a straigtforward way to use these methods to draw text vertically? Is it sufficient/safe to: 1) save the graphics state 2) rotate the axes 3) send the drawInRect: message to my attributed string 4) restore the graphics state Any pointers would be greatly appreciated. Regards, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From marco at sente.ch Tue Sep 29 07:45:46 1998 From: marco at sente.ch (Marco Scheurer) Date: Thu Nov 3 14:41:33 2005 Subject: Loading code from "other" bundles Message-ID: <199809291445.QAA28232@xlthlx.sente.ch> You wrote: >> You wrote: [...] >> Yes, but this is not what I wanted to do, which is a kind of >> development tool that would be able to transparently load, analyze >> and execute code from any executable (bundle, framework or app). > >You can do the opposite: your tool could be a framework/bundle that >you link with the other application (and that framework/bundle could >communicate with your front-end). > >DYLD_INSERT_LIBRARIES=XXX /NextDeveloper/Demos/Mandelbrot.app/Mandelbrot > >should do the trick. > It does, thank you. However, it seems that only frameworks and not bundles can be loaded with DYLD_INSERT_LIBRARIES. This also has the obvious side effect of launching the application, but that's OK for my needs. Marco Scheurer Sen:te From lux at umich.edu Tue Sep 29 08:30:45 1998 From: lux at umich.edu (Joshua Johnson Marker) Date: Thu Nov 3 14:41:33 2005 Subject: App icons for miniaturization Message-ID: I see how to set a window's miniaturized icon - but is there a better way? That is, a better way than doing it programatically? Thanks -- --- Joshua (lux) * HMRL: 734.647.5778 Sorting out my life. . . .in O(n lg n). There's only one way to use 'Windows NT' and 'security' in the same sentence, and this is it. --- Windows '98 -- guaranteed Year 1990 compliant. From lux at umich.edu Tue Sep 29 09:33:33 1998 From: lux at umich.edu (Joshua Johnson Marker) Date: Thu Nov 3 14:41:33 2005 Subject: App icons for miniaturization Message-ID: > I'm not sure what you mean... what is a window's miniaturized icon? > Paul > > I see how to set a window's miniaturized icon - but is there a > >better way? That is, a better way than doing it programatically? > >Thanks Pardon; the mini icon is the tile that appears when you minimize a window and have windowshade turned off; they turn into 48x48 tiles that you can move about. The icon for mailViewer when it is miniaturized shows a mailbox; the flag goes up when you have new mail. This is a good thing. There, obviously we're doing it programmaticaly. But if I just want a simple icon on my miniaturized app window, it seems there should be a simple way. The call is [aWindow -setMiniIcon: (NSImage*)] I think. However, it seems silly to me to set it manually whenever I make a window. I could subclass window, but this, also, seems silly to me. From richs at win.bright.net Tue Sep 29 15:59:34 1998 From: richs at win.bright.net (Rich Schroedel) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives Message-ID: <36116654.E0C2EEE9@win.bright.net> I'm converting Mac code to YB code. Can someone tell me the YB equivalents to the Mac toolbox functions DrawString and DrawChar? -- Rich Schroedel richs@win.bright.net From buck.erik at mcleod.net Tue Sep 29 19:19:13 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:33 2005 Subject: App icons for miniaturization Message-ID: <01bdec18$b7765e00$0d2c10d0@default> -----Original Message----- From: Joshua Johnson Marker To: Multiple recipients of list Date: Tuesday, September 29, 1998 5:43 PM Subject: Re: App icons for miniaturization In Openstep, Project Builder, it was possible to specify document icons and app icons that would be shown in minimized window icons. Has this been removed ? From buck.erik at mcleod.net Tue Sep 29 19:22:04 1998 From: buck.erik at mcleod.net (Michelle L. Buck) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives Message-ID: <01bdec19$1cfb2300$0d2c10d0@default> >I'm converting Mac code to YB code. Can someone tell me the YB >equivalents to the Mac toolbox functions DrawString and DrawChar? >-- >Rich Schroedel >richs@win.bright.net > How about PSshow() and PSxyshow() ? How about NSCell ? How about NSBezierPath append glyph methods ? A small investment in the Postscript Reference manual ? From anderkh at texaco.com Tue Sep 29 19:49:47 1998 From: anderkh at texaco.com (Anderson, Ken H) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives Message-ID: <405D056843B6D111A8EB00805F9A432C19EB8E@MSX01013> Just a little note - I would try to use the graphics functions and objects provided by the appkit, since PostScript will be going away for the release of Mac OS X. Ken -----Original Message----- From: Michelle L. Buck [mailto:buck.erik@mcleod.net] Sent: Tuesday, September 29, 1998 10:39 PM To: Multiple recipients of list Subject: Re: Graphic primitives >I'm converting Mac code to YB code. Can someone tell me the YB >equivalents to the Mac toolbox functions DrawString and DrawChar? >-- >Rich Schroedel >richs@win.bright.net > How about PSshow() and PSxyshow() ? How about NSCell ? How about NSBezierPath append glyph methods ? A small investment in the Postscript Reference manual ? From aep at apple.com Tue Sep 29 19:59:33 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives Message-ID: <199809300259.TAA13826@scv4.apple.com> > >I'm converting Mac code to YB code. Can someone tell me the YB > >equivalents to the Mac toolbox functions DrawString and DrawChar? > >-- > >Rich Schroedel > >richs@win.bright.net > > > How about PSshow() and PSxyshow() ? > How about NSCell ? > How about NSBezierPath append glyph methods ? > > A small investment in the Postscript Reference manual ? Warning Will Robinson! Warning! Don't use raw PostScript! See NSStringDrawing.h in AppKit framework for routines that draw strings. Andrew Platzer Application Frameworks Apple Computer, Inc. From lux at umich.edu Tue Sep 29 20:28:47 1998 From: lux at umich.edu (Joshua Johnson Marker) Date: Thu Nov 3 14:41:33 2005 Subject: Lisp in Rhapsody? Message-ID: Any experience/wisdom on a good rhapsody lisp environment? Or am I cast off to look for BSD source on my own? I couldn't find much of value on the web. Direction would be appreciated. --- Joshua (lux) * HMRL: 734.647.5778 Sorting out my life. . . .in O(n lg n). There's only one way to use 'Windows NT' and 'security' in the same sentence, and this is it. --- Windows '98 -- guaranteed Year 1990 compliant. From gideon at csarc.otago.ac.nz Tue Sep 29 20:39:41 1998 From: gideon at csarc.otago.ac.nz (Gideon King) Date: Thu Nov 3 14:41:33 2005 Subject: Which OS? Message-ID: <9809301539.AA4150116@oklina> Can anyone tell me what the #defines for the different versions of the operating systems/frameworks are? I know that WIN32 is defined for Windoze, and that __MACH__ appears to be defined, but I am wanting to build some code that will just build on: OS4.2 Enterprise OS4.2 Mach YB/Win OS X Server I will need to be able to identify all these in my code. Are there #defines which will suit, or will I have to call uname, and work it out from there? This still wouldn't help me with the OSE/YB differentiation. ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon From gideon at csarc.otago.ac.nz Tue Sep 29 21:25:36 1998 From: gideon at csarc.otago.ac.nz (Gideon King) Date: Thu Nov 3 14:41:33 2005 Subject: Which OS? In-Reply-To: <9809301539.AA4150116@oklina> Message-ID: <9809301625.AA3625118@oklina> Following up on my own message, I have found that (among other things) OS4.2/mach has: -Di386 -DNeXT -Dunix -D__MACH__ -DNS_TARGET=41 -DNS_TARGET_MAJOR=4 -DNS_TARGET_MINOR=1 RDR2/Intel has: -Di386 -DNeXT -Dunix -D__MACH__ -D__APPLE__ -DNS_TARGET=50 -DNS_TARGET_MAJOR=5 -DNS_TARGET_MINOR=0 OSE 4.2 has: -Di386 -DWIN32 -DWINNT -DNeXT_PDO -D_DLL YB/WinNT has: -Di386 -DWIN32 -DWINNT -DNeXT_PDO -D_DLL This allows me to determine the difference between OS4.2, RDR2, and the windows versions, but does not allow me to differentiate between OSE4.2 and YB. Any suggestions? ---------------------------------------------------------------- Gideon King | Phone +64-3-479 9018 Technical Manager | Fax +64-3-479 9033 The Black Albatross | University of Otago | Computer Science Applied | e-mail gideon@csarc.otago.ac.nz Research Centre | NeXT mail, MIME ok. PGP key available. Department of Computer Science | P.O. Box 56 | "Procrastinate now!" Dunedin | New Zealand | WWW access: http://www.csarc.otago.ac.nz/~gideon From kc at omnigroup.com Wed Sep 30 01:25:48 1998 From: kc at omnigroup.com (Ken Case) Date: Thu Nov 3 14:41:33 2005 Subject: Which OS? Message-ID: <199809300825.BAA24756@ignem.omnigroup.com> In , we define values which let you distinguish between the various operating system versions you've mentioned. (To distinguish between OPENSTEP Enterprise 4.2 and Yellow Box, you'd use #ifdef YELLOW_BOX after importing SystemType.h.) The OmniBase framework is free, please feel free to use it directly or borrow from it. You'll find the source code to the OmniBase framework on Omni's developer resources page (http://www.omnigroup.com/DeveloperResources/), and it's quite possibly already installed on your DR2 system (it's one of the frameworks that you must install to use OmniWeb). Hope this helps! Ken From ahoesch at smartsoft.de Wed Sep 30 02:37:40 1998 From: ahoesch at smartsoft.de (Andreas Hoeschler) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives (PostScript in MacOS X) References: <405D056843B6D111A8EB00805F9A432C19EB8E@MSX01013> Message-ID: <9809300937.AA01075@smartsoft.de> A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 477 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980930/f211881d/attachment.bin From Malcolm_Crawford at plsys.co.uk Wed Sep 30 03:18:31 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives (PostScript in MacOS X) In-Reply-To: <9809300937.AA01075@smartsoft.de> References: <9809300937.AA01075@smartsoft.de> Message-ID: <199809301018.LAA01233@jasmine.plsys.co.uk> Andreas wrote: > >Just a little note - I would try to use the graphics functions and > >objects provided by the appkit, since PostScript will be going away for > >the release of Mac OS X. > > Yes, but as far as I have understood things at WWDC98 this is only true for > real PostScript code like PSwraps. My current understanding is, that > functions like PSselectfont(), PSsetlinewidth(),... will be kept and mapped > to Quickdraw in MacOS X. Any comments? > That's my understanding too -- the phrase "The imaging model will remain the same" comes to mind. Best wishes, mmalc. From dtm at waterw.com Wed Sep 30 05:25:35 1998 From: dtm at waterw.com (David T. McWherter) Date: Thu Nov 3 14:41:33 2005 Subject: Lisp in Rhapsody? In-Reply-To: Message-ID: The GNU folk have a Common Lisp implementation (ie: not emacs lisp), but I'd bet you'd have to port it (some assem glue) to Rhapsody. There's a pointer at: ftp://prep.ai.mit.edu/pub/gnu/clisp.README I believe...(the URL is approximative at worst...) -David > Any experience/wisdom on a good rhapsody lisp environment? Or am I > cast off to look for BSD source on my own? > I couldn't find much of value on the web. Direction would be > appreciated. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- David T. McWherter dtm@waterw.com From ahoesch at smartsoft.de Wed Sep 30 07:21:54 1998 From: ahoesch at smartsoft.de (Andreas Hoeschler) Date: Thu Nov 3 14:41:33 2005 Subject: Glyph print problem Message-ID: <9809301421.AA05987@smartsoft.de> Hi, I draw glyphs, that do not correspond to any unicode character, in my textview with the following code. PSselectfont("Symbol", 12.0); [[NSColor blackColor] set]; PSmoveto(aPosition); PSglyphshow("summation"); This approach works great on screen for both the system standard font Symbol and another font called CMEX10 (BlueSkyCM.pkg). But when I send my document to the printer, only the Symbol glyphs are drawn, the CMEX10 glyphs are not. I have no glyphgenerator for the CMEX10 font, but this should not make any difference when addressing the glyphs directly. Any idea, what could cause this problem? Thanks, Andreas From paulrs at lgs-systems.com Wed Sep 30 04:34:11 1998 From: paulrs at lgs-systems.com (Paul R. Summermatter) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives In-Reply-To: <199809300259.TAA13826@scv4.apple.com> References: <199809300259.TAA13826@scv4.apple.com> Message-ID: <9809301134.AA05183@slab> You wrote: [ > >I'm converting Mac code to YB code. Can someone tell me the YB [ > >equivalents to the Mac toolbox functions DrawString and DrawChar? [ > >-- [ > >Rich Schroedel [ > >richs@win.bright.net [ > > [ > How about PSshow() and PSxyshow() ? [ > How about NSCell ? [ > How about NSBezierPath append glyph methods ? [ > [ > A small investment in the Postscript Reference manual ? [ [ Warning Will Robinson! Warning! Don't use raw PostScript! [ [ See NSStringDrawing.h in AppKit framework for routines that draw [ strings. [ [ Andrew Platzer [ Application Frameworks [ Apple Computer, Inc. [ Wait a minute! Since when is PSshow() raw postscript? I thought we need only be concerned about eliminating the pswraps in our code and that calling the postscript functions in psops.h was perfectly acceptable and would migrate just fine. Has that changed, or have I been missing something? Regards, Paul --- Paul Summermatter LGS Systems, Inc. Medical Computing Division 15 TJ Gamester Ave Portsmouth, NH 03801-5871 (603) 433-9822 voice (603) 433-9818 fax (888) 898-6321 pager 8986321@skytel.com paging email paulrs@lgs-systems.com (NeXT or MIME Mail Welcome) http://www.lgs-systems.com From seanl at cs.umd.edu Wed Sep 30 07:20:34 1998 From: seanl at cs.umd.edu (Sean Luke) Date: Thu Nov 3 14:41:33 2005 Subject: Lisp in Rhapsody? In-Reply-To: Message-ID: On Tue, 29 Sep 1998, Joshua Johnson Marker wrote: > Any experience/wisdom on a good rhapsody lisp environment? Or am I > cast off to look for BSD source on my own? I don't know of any UNIX Lisp environment for Rhapsody, and certainly no fully-compleat CLTL2 environment. But I've got a better idea anyway. :-) It didn't run on the DR1 Blue Box, but if it works in CR2, I think that by far your best option would be to use Macintosh Common Lisp. MCL 4.2 is the best Lisp environment in the world right now; certainly heads and toes above Allegro. However, it's one of those few programs that didn't run in the Blue Box, and even if it does now, the Blue Box has a shot of slowing it down. See http://www.digitool.com/ Sean From seanl at cs.umd.edu Wed Sep 30 07:21:49 1998 From: seanl at cs.umd.edu (Sean Luke) Date: Thu Nov 3 14:41:33 2005 Subject: Lisp in Rhapsody? In-Reply-To: Message-ID: On Wed, 30 Sep 1998, David T. McWherter wrote: > The GNU folk have a Common Lisp implementation (ie: not emacs lisp), > but I'd bet you'd have to port it (some assem glue) to Rhapsody. Sadly, GCL is merely CLTL1. Sean Luke seanl@cs.umd.edu From dyoung at vviuh221.vvi.com Wed Sep 30 07:37:59 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives References: <199809300259.TAA13826@scv4.apple.com> Message-ID: <9809301438.AA01196@vviuh221.vvi.com> >> How about PSshow() and PSxyshow() ? > > Warning Will Robinson! Warning! Don't use raw PostScript! > > See NSStringDrawing.h in AppKit framework for routines that draw strings. > > Andrew Platzer > Application Frameworks > Apple Computer, Inc. Yeah, right Andrew. Since when is an application framework a substitute for a true graphics library. The design principles and use criterion are entirely different. I don't think that answer is very good, nor particularly correct. Far be it for *me* to explain what Apple has in mind, but I think that answer should be shored up big time. What I would avoid is using the pswrap preprocessor and any lengthy procedures sent to the interpreter via an DPSWrite* type method. PSshow() should DEFINITELY be a good thing to use. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From sbrandon at music.gla.ac.uk Wed Sep 30 07:56:42 1998 From: sbrandon at music.gla.ac.uk (Stephen Brandon - SysAdmin) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives In-Reply-To: <9809301438.AA01196@vviuh221.vvi.com> References: <9809301438.AA01196@vviuh221.vvi.com> Message-ID: <199809301456.PAA04284@music.gla.ac.uk> What about the instance drawing operators? I know that they are "supposed" to go away according to some docs, but they are still there for now, and by far the easiest way to manage a lot of instance drawing. I am trying to replace instance drawing with AppKit routines, and it's proving very difficult. Can you confirm, Andrew or anybody? Stephen David Young wrote: > >> How about PSshow() and PSxyshow() ? > > > > Warning Will Robinson! Warning! Don't use raw PostScript! > > > > See NSStringDrawing.h in AppKit framework for routines that draw strings. > > > > Andrew Platzer > Yeah, right Andrew. Since when is an application framework a substitute for > a true graphics library. The design principles and use criterion are > entirely different. I don't think that answer is very good, nor > particularly correct. Far be it for *me* to explain what Apple has in mind, > but I think that answer should be shored up big time. > > What I would avoid is using the pswrap preprocessor and any lengthy > procedures sent to the interpreter via an DPSWrite* type method. PSshow() > should DEFINITELY be a good thing to use. > Thanks A Bunch! David Young; VVI-DCS > Hi, I read that it should be possible to recompile standard unix programs on DR2. I tried it with some stuff like mc, fvwm(for use with Xnext) and some other small aps. But I got only a lot of errors. Can someone point me to informations about this. Thanks, Christian -------------------------------------------------------------- Christian Kernbach e-mail: kerniebc@sp.zrz.TU-Berlin.DE Gruenberger Str.22 10243 Berlin Germany From btoback at optc.com Wed Sep 30 08:13:27 1998 From: btoback at optc.com (Bruce Toback) Date: Thu Nov 3 14:41:33 2005 Subject: Lisp in Rhapsody? Message-ID: <199809301442.HAA18442@landru.optc.com> Sean Luke writes: >On Tue, 29 Sep 1998, Joshua Johnson Marker wrote: > >> Any experience/wisdom on a good rhapsody lisp environment? Or am I >> cast off to look for BSD source on my own? > >... I think that by >far your best option would be to use Macintosh Common Lisp. MCL 4.2 is >the best Lisp environment in the world right now; certainly heads and toes >above Allegro. I'd like someone to explain to me (off the list) why I should care. I've tried on three different occasions to learn lisp. The first was in college, when it shared a one-semester course with APL, Simula, Snobol and something else I've forgotten. The most recent was less than a year ago. Each time, I was hoping for an epiphany, an insight into a different way of thinking to solve problems, and each time I've ended by giving up in frustration, thinking I've wasted my time. Could someone tell me where I can find out how to use this language to do things that would be difficult or impossible in more linear programming languages? A lot of bright people and a lot of clever systems use it, so it must be worth pursuing. But I haven't yet heard why or how -- the most detailed explanation I've gotten stated only that it's got a great macro facility, and the power is in the macros that you create. There has to be more to it than that. -- Bruce PS. My most recent effort was with Touretzky(?)'s _A Gentle Introduction to Symbolic Computation_ and GCL. Maybe that's the wrong place to start? - B -------------------------------------------------------------------------- Bruce Toback Tel: (602) 996-8601| My candle burns at both ends; OPT, Inc. (800) 858-4507| It will not last the night; 11801 N. Tatum Blvd. Ste. 142 | But ah, my foes, and oh, my friends - Phoenix AZ 85028 | It gives a lovely light. btoback@optc.com | -- Edna St. Vincent Millay From dyoung at vviuh221.vvi.com Wed Sep 30 08:31:56 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives References: <199809301456.PAA04284@music.gla.ac.uk> Message-ID: <9809301531.AA01269@vviuh221.vvi.com> Stephen, > What about the instance drawing operators? I consider instance drawing inferior. We replaced the instance drawing code in our code sections that used them many years ago. Instance drawing was advertised by NeXT as a PS extension provided uniquely by NeXT. I would use composite methods and appropriate mode flags in your -drawRect: method instead of instance drawing. >From what I know instance drawing was depreciated years ago. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From ammad at stiinc.com Wed Sep 30 08:29:06 1998 From: ammad at stiinc.com (ammad) Date: Thu Nov 3 14:41:33 2005 Subject: Lisp on a Mac References: Message-ID: <36124E42.B393732F@stiinc.com> I remember there being a freeware/shareware lisp for the Mac. Does anyone know where that is, I did some searches and found some documents that talked about it but all the links are not invalid. Thanks, Ammad From Dan_Grillo at grillo.net Wed Sep 30 10:01:11 1998 From: Dan_Grillo at grillo.net (Dan Grillo) Date: Thu Nov 3 14:41:33 2005 Subject: unix code to rapsody ? Message-ID: <199809301701.MAA02500@anise.grillo.net> Christian Kernbach writes: > > Hi, > > I read that it should be possible to recompile standard unix programs on > DR2. I tried it with some stuff like mc, fvwm(for use with Xnext) and some > other small aps. But I got only a lot of errors. Can someone point me to > informations about this. > I've had good luck building apps. If they have a standard confgure setup, it's usually easy; if they have a makefile with systems predefined, start with a a 4.4BSD system (FreeBSD, NetBSD, OpenBSD, BSD/OS) and that should get you at least 90% of the way there. Without knowing your specfic problem it's hard to know the solution. --Dan -- Dan Grillo dan@grillo.net 650 917-0685 fax 773 975-1557 From earle at isolar.Tujunga.CA.US Wed Sep 30 10:42:22 1998 From: earle at isolar.Tujunga.CA.US (Greg Earle) Date: Thu Nov 3 14:41:33 2005 Subject: better CLI? Message-ID: <9809301743.AA19749@isolar.Tujunga.CA.US> [Flogging a non-Rhapsody-related dead horse.] > This was almost a wise move in designing Unix. The only major > problem with this design (compared to VMS or others) is so-called > meta-characters. When you type DEL *.* in DOS, it asks for > confirmation. That's because *.* is passed as such to the DOS DEL > command, which then expands it to mean "all files in directory". If > you type rm * under any Unix, you CANNOT write a rm that asks for > confirmation, because the shell does the * expansion, and passes > the 332 files of your directory to rm. I once had a file name '-r' > in my current directory, and typed something like rm *. Well, -r > comes first, so it meant rm -r , so it > also erased all subdirectories recursively... Stupid design. RTFM tcsh(1): The rmstar shell variable can be set to ask the user, when `rm *' is typed, if that is really what was meant. isolar:1:160 % mkdir rm-star isolar:1:161 % cd rm-star isolar:1:162 % touch foo bar blat isolar:1:163 % set rmstar isolar:1:164 % rm * Do you really want to delete all files? [n/y] n > Similarly, you can't have something as -? to mean "help" (like in > DEL /? in DOS). That's again because ? has to mean "Match a single > character". Well, it does that in DOS too. DEL ? will delete any > single character file. But the meaning is to DEL, not to the > command line, so that you can still have DEL /?. RTFM tcsh(1): run-help (M-h, M-H) Searches for documentation on the current command, using the same notion of `current command' as the completion routines, and prints it. There is no way to use a pager; run-help is designed for short help files. Documentation should be in a file named command.help, command.1, command.6, com- mand.8 or command, which should be in one of the directories listed in the HPATH enviroment vari- able. If there is more than one help file only the first is printed. By default, HPATH should be set to "/usr/share/misc". Unfortunately there's only 3 help files there (for "mail", "more" and "nslookup"). This is clearly a deficiency in the free *BSD's that they don't provide more help files. But while the HELP subsystem in VMS is nice, I'd far rather use tcsh than DCL any day of the week. (Turned my back on VMS 15 years ago, never looked back) - Greg (Who hopes that somebody at Apple was responsible for making sure the behavior of apps in CR1 match their man pages. A lot of the DR2 programs either don't have man pages or they don't match the man page descriptions.) From jakrueg1 at students.wisc.edu Wed Sep 30 11:02:47 1998 From: jakrueg1 at students.wisc.edu (Jeff Krueger) Date: Thu Nov 3 14:41:33 2005 Subject: unix code to rapsody ? In-Reply-To: <199809301701.MAA02500@anise.grillo.net> Message-ID: Hi, Dan Grillo said: >I've had good luck building apps. If they have a standard >confgure setup, it's usually easy; if they have a makefile >with systems predefined, start with a a 4.4BSD system (FreeBSD, NetBSD, >OpenBSD, BSD/OS) and that should get you at least 90% of the way there. Unfortunately the other 10% always seems to be editing the makefiles so they don't try to do the command "ld -lm" because the version of the link editor (ld) that comes with DR2 does not like seem to like the "-m" option. Off the top of my head, it may be a problem with some path not being in your .login file... In any case, if you change it to "ld -l" and it works in most cases. Oftentimes a makefile has a line roughly equivalent to: LDFLAGS = -lm so you can just change it to: LDFLAGS = -l and everything will build and link perfectly. Unfortnately that is quite a pain when trying to compile something that uses imake or multiple makefiles... (try KDE, it was a *big* pain!) If have not actually spent very much time trying to resolve this problem so if anyone else has any input about it, I'd be glad to hear it! Jeff Krueger ------ Jeff Krueger Computer Science Major, UW-Madison jakrueg1@students.wisc.edu jkrueger@cs.wisc.edu jeffk@kagi.com "Is anal-retentive a hyphenated word?" From aep at apple.com Wed Sep 30 11:07:09 1998 From: aep at apple.com (Andrew Platzer) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives (PostScript in MacOS X) Message-ID: <199809301807.LAA27028@scv2.apple.com> Andreas Hoeschler Just a little note - I would try to use the graphics functions and >objects provided by the appkit, since PostScript will be going away for >the release of Mac OS X. Yes, but as far as I have understood things at WWDC98 this is only true for real PostScript code like PSwraps. My current understanding is, that functions like PSselectfont(), PSsetlinewidth(),... will be kept and mapped to Quickdraw in MacOS X. Any comments? The answer is that I don't have an answer right now. As far as I know, no final decision has been made. To be safe, you should assume that the actual calls such as PSsetlinewidth() will not be available or if they are, the may not work exactly the same as real PostScript. (e.g. not all compositing operations may be supported an 'emulated' version of PScomposite()) NSFont, NSColor, NSBezierPath, NSImage classes and the various NSRectFill functions should be sufficient for most applications except graphics intensive ones. (This is just my opinion, not Apple official policy so please don't argue this point.) Using these classes and functions will always work. "Paul R. Summermatter" wrote: Wait a minute! Since when is PSshow() raw postscript? I thought we need only be concerned about eliminating the pswraps in our code and that calling the postscript functions in psops.h was perfectly acceptable and would migrate just fine. Has that changed, or have I been missing something? PSshow is pretty raw since it just passes the command off to the PostScript interpreter. As to whether something has changed, I might be wrong. David Young wrote: Yeah, right Andrew. Since when is an application framework a substitute for a true graphics library. The design principles and use criterion are entirely different. I don't think that answer is very good, nor particularly correct. Far be it for *me* to explain what Apple has in mind, but I think that answer should be shored up big time. What I would avoid is using the pswrap preprocessor and any lengthy procedures sent to the interpreter via an DPSWrite* type method. PSshow() should DEFINITELY be a good thing to use. I certainly don't mean you should use the AppKit for an Illustrator-like graphics program. It is definitely not a full graphics library. Calling PSshow() might not give all that huge an increase performance. The overhead of calling [NSAttributedString drawAtPoint :] which will call PSshow() (or equiv.) may be dwarfed by the time spent sending a Mach message to the WindowServer. And calling [NSAttributedString drawAtPoint :] will get you better looking text. As well an implementation of PSshow() on the new system will probably be slower than calling the new graphics library directly which is what the AppKit may do. So while in Mac OS X Server PSshow() is faster than calling [NSAttributedString drawAtPoint :] in the future, this might be reversed. For anything graphics intensive, my opinion is that you should wait until we publish the new graphics API or at least be very careful about your use of PostScript and be ready to change if necessary. We will probably provide tools to help in any conversion. And definitely don't use pswraps or anything that assumes there is a server application running a PostScript interpreter available. In the end, what I am saying is that you shouldn't assume we will provide an API if we haven't firmly commited to it and I just wanted to make sure someone who might be new to whole Rhapsody thing doesn't spend too much time learning PostScript only to be surprised when it is not there in MacOS X. This is my last comment on this subject. These are my opinions, not Apple official policy. Andrew Platzer Application Frameworks Apple Computer, Inc. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 5167 bytes Desc: not available Url : /mailman/archive/macosx-dev/attachments/19980930/4754a9fe/attachment.bin From Malcolm_Crawford at plsys.co.uk Wed Sep 30 11:36:40 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives (PostScript in MacOS X) In-Reply-To: <199809301807.LAA27028@scv2.apple.com> References: <199809301807.LAA27028@scv2.apple.com> Message-ID: <199809301836.TAA01480@jasmine.plsys.co.uk> Andrew wrote: > The answer is that I don't have an answer right now. As far as I know, no > final decision has been made. To be safe, you should assume that the actual > calls such as PSsetlinewidth() will not be available or if they are, the > may not work exactly the same as real PostScript. (e.g. not all compositing > operations may be supported an 'emulated' version of PScomposite()) > Hmm, since Andrew said (not unreasonably) that's his final word, I wonder if anyone else watching from Apple might be able to comment, or at least pass it up the line that some of us would really like to know the real answer here. My understanding -- based on feedback from WWDC and elsewhere -- was that functions such as PSlineto() would definitely continue to work as advertised. If this is not the case then it would be Useful to know As Soon As Possible. Best wishes, mmalc. From dyoung at vviuh221.vvi.com Wed Sep 30 12:41:16 1998 From: dyoung at vviuh221.vvi.com (David Young) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives References: <199809301836.TAA01480@jasmine.plsys.co.uk> Message-ID: <9809301941.AA01669@vviuh221.vvi.com> > ... Andrew said things about changing API ... Nah, that isn't what I meant. I used PSshow() as a metaphor for whatever functionality Apple does provide. Whether it is called EQDdrawString() or whatever I don't think is the point. The point is will Apple provide a full featured graphics library API where PS*() functions can be mapped into EQD*() functions, either one to one, or one to many, etc. I don't think any programmer realistically expects the new API to start with the prefix of "PS" or be exactly one to one. I do expect the API to be full featured, without having to call obj-c objects and methods. Your original mail suggested that we use AppKit API exclusively, which is too limiting. Thanks A Bunch! David Young; VVI-DCS http://www.vvi.com From dev at humph.com Wed Sep 30 14:08:44 1998 From: dev at humph.com (Giuliano Gavazzi (dev)) Date: Thu Nov 3 14:41:33 2005 Subject: unix code to rapsody ? In-Reply-To: Message-ID: At 7:10 pm +0100 1998/09/30, Jeff Krueger wrote: ... >Unfortunately the other 10% always seems to be editing the makefiles so >they don't try to do the command "ld -lm" because the version of the link >editor (ld) that comes with DR2 does not like seem to like the "-m" option. >Off the top of my head, it may be a problem with some path not being in >your .login file... In any case, if you change it to "ld -l" and it works >in most cases. Oftentimes a makefile has a line roughly equivalent to: > >LDFLAGS = -lm > >so you can just change it to: > >LDFLAGS = -l > well not exactly. "m" is not an option, "l" is. -lm means link with the libm.a library. In Rhapsody libm.a functionality is included in System, I believe. So you can just set LDFLAGS = Giuliano H U M P H || ||| software development of: Java & C++ Client/Human Interface applications. Native Server applications on MacOS - Rhapsody - (Mk)Linux http://www.humph.com/ From lux at umich.edu Wed Sep 30 14:32:21 1998 From: lux at umich.edu (Joshua Johnson Marker) Date: Thu Nov 3 14:41:33 2005 Subject: Lisp results Message-ID: (Cross-post to talk and dev) We interrupt MacOSX-Talk for this special content. We apologize for the interruption; expect content-free activity to resume immediately. Thanks for the replies. Haven't yet had time to investigate, but here is what I learned: ***** > I was able to build scsh (an almost R5RS-scheme + shell functionality). ***** I don't know of any good LISP environment for Rhapsody, but you can find a lot of LISP sources on: http://sunsite.unc.edu/pub/Linux/devel/lang/lisp/ I have compiled guile (a scheme environment) from the GNU distribution on Rhapsody with no problems. And if all you need is an inference engine, you should have a look at CLIPS, at http://www.ghg.net/clips/CLIPS.html . One project we may start one day or another is interfacing Objective C and LISP or Scheme, in the line of what has already been done for Perl or TCL. << That is interesting. >> ***** It didn't run on the DR1 Blue Box, but if it works in CR2, I think that by far your best option would be to use Macintosh Common Lisp. MCL 4.2 is << Yah. MCL is cool. But BB is a hog. . . maybe I'll just buy some more RAM. Still, I'd like to stick with Rhap where I can.>> That's at digitool.com ***** The GNU folk have a Common Lisp implementation (ie: not emacs lisp), but I'd bet you'd have to port it (some assem glue) to Rhapsody. There's a pointer at: ftp://prep.ai.mit.edu/pub/gnu/clisp.README I believe...(the URL is approximative at worst...) << This sounds promising. Anyone done this? >> ***** I don't know of any _nice_ lisp environments for OPENSTEP/Rhapsody. Of course, emacs and ProjectBuilder both have parenthesis matching which is crucial. :-) Xlisp builds easily on OPENSTEP so it should build easily on Rhapsody. I haven't touched Lisp since school. :-) << I poked around for xlisp and haven't yet gotten it, just null pointers. Tonight. >> ***** Saw your post on Lisp... you might try Kawa (Scheme/Rhapsody) - it is very cool. Of course, that isn't Common Lisp. The problem with Lisp is lack of standard tools. [. . . ] it's all so sordid... << This is very true. . . Also, I'll check this out. >> From Malcolm_Crawford at plsys.co.uk Wed Sep 30 14:48:52 1998 From: Malcolm_Crawford at plsys.co.uk (mmalcolm crawford) Date: Thu Nov 3 14:41:33 2005 Subject: Graphic primitives In-Reply-To: <9809301941.AA01669@vviuh221.vvi.com> References: <9809301941.AA01669@vviuh221.vvi.com> Message-ID: <199809302148.WAA01547@jasmine.plsys.co.uk> David wrote: > I don't think any programmer realistically expects the new API to start > with the prefix of "PS" or be exactly one to one. > To reiterate at the risk of simply being repetitive, yes, my understanding from the plan outlined at WWDC was that there would be a one-to-one mapping -- this was the point of using PDF, since its imaging model is the same as that of PostScript. The "only" loss is the interpreted language. There would doubtless be other improvements and enhancements, but the core should remain. Best wishes, mmalc. From cmh