File: programming/apps/AngelTemplate.zip/AngelTemplate/Plugin SDK/SamplePluginFieldType/SamplePluginTemplateField.m


//
//  SamplePluginTemplateField.m
//  SamplePluginFieldType
//
//  Created by Uli Kusterer on 22.10.06.
//  Copyright 2006 M. Uli Kusterer. All rights reserved.
//
 
// -----------------------------------------------------------------------------
//	Headers:
// -----------------------------------------------------------------------------
 
#import "SamplePluginTemplateField.h"
// -----------------------------------------------------------------------------
//	load:
//		Register our field type(s) with AngelTemplate:
// -----------------------------------------------------------------------------
"Sample"];
}
 
// -----------------------------------------------------------------------------
//	* CONSTRUCTOR:
// -----------------------------------------------------------------------------
// Save away the owning field so we can later ask it for info:
		owningField = inOwningField;	// Don't retain, it's our owner, so we'd get a retain circle.
// -----------------------------------------------------------------------------
//	Read from file:
// -----------------------------------------------------------------------------
// Still have enough data in file for this?
// Not enough data? Just use default (would be cooler to try to read what data we have and pad the rest with zeroes if that made sense for your data type).
// Append our size anyway, so AngelTemplate knows we need more data and can tell user.
}
 
 
// -----------------------------------------------------------------------------
//	Append to file (save):
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//	Provide our value in a way suitable for display:
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//	Accept changes from the user:
// -----------------------------------------------------------------------------
"value"// -----------------------------------------------------------------------------
//	Return our item in some property list representation for Plist-Export:
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//	Apply a sensible default value for new files:
// -----------------------------------------------------------------------------
 

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.