ftp.nice.ch/pub/next/developer/languages/cows/COWS.1.4.s.tar.gz#/COWS/Palettes/COWS_MiscPalette.rtf

This is COWS_MiscPalette.rtf in view mode; [Download] [Up]

Copyright © 1994 by Sean Luke

COWS_MiscPalette.palette
COWS Version 1.4
May 20, 1994


The COWS MiscPalette contains miscellaneous extra libraries and objects, mostly experimental and only included with the release to show some interesting extra stuff one might do with COWS.  Currently, two objects inhabit this palette:  The COWS Object Library and the COWS Extended Math Library.


The COWS Object Library
Guus C. Bloemsma

Guus' library is designed to allow one to issue Obj-C methods to objects using COWS.  It's not intended as a mainstream library, but as an interesting way to incorporate COWS into an application.  Well done, Guus!

Documentation on the COWS Object Library is found in the Palettes Directory as COWS Object Library.rtf.

Guus suggests attaching the Object Library into Fred and trying out the following script:

(function test variable window menu menucell do
	(set window (to "Window" "alloc"))
	(to window "init")
	(to window "makeKeyAndOrderFront:" 0)
	
	(set menu (to "Menu" "alloc"))
	(to menu "initTitle:" "Mymenu")
	(to menu "orderFront:" 0)
	
	(set menucell (to menu "addItem:action:keyEquivalent:" "To Front" "orderFront:" 0))
	(to menucell "setTarget:" window)
	
	(set menucell (to menu "addItem:action:keyEquivalent:" "Close" "close" 0))
	(to menucell "setTarget:" window)
	
	(to menu "display")
	)

Guus' notes:

Be careful, closing twice will crash Fred. The menu comes up in the bottom-left corner of the screen.  I depend on Michal's StringNodes, so it might not work with Sean's version of 1.4. (But I guess it will) 


The COWS Extended Math Library
Michal Jaegermann, mangled by Sean Luke

This library fills all the UNIX and C math functions that were left out of the COWS Standard and Math libraries.  Thanks to Michal Jaegermann for his great PERL script which generates math libraries automagically!

Rather than explain each of the below functions, we list them here with their formats.  For explanations of each function, see the man page of the equivalent C or UNIX function.

exp			
	(exp value)

expm1			
	(expm1 value)

log1p			
	(log1p value)

ldexp			
	(ldexp value)

lgamma			
	(lgamma value)

erf			
	(erf value)

erfc			
	(erfc value)

j0			
	(j0 value)

j1			
	(j1 value)

jn			
	(jn n-value value)

y0			
	(y0 value)

y1			
	(y1 value)

yn			
	(yn n-value value)

hypot			
	(hypot x-value y-value)

cbrt			
	(cbrt value)

rint			
	(rint value)

copy-sign			
	(copy-sign x-value y-value)

drem			
	(drem x-value y-value)

logb			
	(logb value)

scalb			
	(scalb value n-value)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.