// Copyright © 1993 - 1996 Apple Computer, Inc. All rights reserved.
/*
	package and part stuff
	
	Includes:
		part frame additions
		InstallScript
		RemoveScript	

 */


// These calls to SetPartFrameSlot need to be done after the layout has
// been compiled, which is why this file is last in the build sequence.

SetPartFrameSlot('PreeferFormulaItem, GetLayout("PreeferFormulaItem"));
SetPartFrameSlot('PreeferAutoPrefsItem, GetLayout("PreeferAutoPrefsItem"));


InstallScript := func(partFrame)
begin
	// NOTE: only auto parts would register their prefs with the
	//			system, and only if there was no other way to present
	//			preferences. This is done here for demonstration purposes
	//			only.
	RegPrefs(kAppSymbol, partFrame.PreeferAutoPrefsItem);

	// register the formula.
	// NOTE: can not use GetLayout directly in a form part installScript
	//       since the InstallScript is EnsureInternal'd. If we did do
	//       a GetLayout call, the layout would be copied into the NS Heap!
	RegFormulas(kAppSymbol, partFrame.PreeferFormulaItem);

end;


RemoveScript := func(partFrame)
begin
	// NOTE: only autoparts need to register system prefs... see above
	UnregPrefs(kAppSymbol);

	//unregister the formula
	UnregFormulas(kAppSymbol);

end;
