This is Palettes...Delegates...and-good-code-practices in view mode; [Up]
Date: Sun 20-Dec-1991 18:38:27 From: fletcher@socrates.umd.edu (Charles Fletcher) Subject: Palettes...Delegates...and good code practices Well I have moved into trying to write palettes (I have already blown away IB a few times.) I have looked at the examples that exist but it is easy to put in code that really messes things up. For example, my palette needs a stream which gives it the PS code to view. The correct way to (in a generic fashion) ask for the stream is given in the (NeXT Advantage) Plotter example with the use of a delegate. I was able to get my code running fine, even used it in an application for a test. However, when I use the IB test mode -- BOOM. (I know why) I have also devised ways of "getting around things" -- like how the -drawSelf method is invoked before you want to draw something (or even have anything to draw.) My concern is this--I am developing good *working* code, but is it good code (to make portiable, etc.) I look at a lot of examples and get ideas, but I'm not always sure why they did what they did. I would like to hear from several programmer giving some tips to develop good NeXT code. If there are enough tips and interest, I'll summarize here on the net. Thanks for your help and tips, Charlie
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.