#
#	Like XtAppInitialize, but loads the Table widget, and enables EditRes
#
function XrerInitialize	# var app-name app-title [args ...]
{
	typeset editres
	typeset toplevel

	#
	#	Load the Table widget
	#
	libload /usr/local/X/lib/Table.so
	widload xmpTable

	#
	#	Do regular initialization
	#
	XtAppInitialize $@

	#
	#	Enable EditRes
	#
	#		There is a bit of treachery here, using the ability
	#		of wksh to call C functions.
	#
	findsym _XEditResCheckMessages editres	# get addr of function

	eval call handle_to_widget "$2" \$$1	# convert to widget ptr
	toplevel=$RET

	# A bit of a lie about the types...
	call XtAddEventHandler @ulong:$toplevel @ulong:0 @ulong:1 \
		@ulong:$editres @ulong:0
}
