TIP #10000 Version 1.142: Dummy Proposal for Testing Editing Interfaces

This is not necessarily the current version of this TIP.


TIP:10000
Title:Dummy Proposal for Testing Editing Interfaces
Version:$Revision: 1.142 $
Authors: Don Porter <dgp at users dot sourceforge dot net>
nobody at nowhere dot com
Andreas Kupries <akupries at westend dot com>
Donal K. Fellows <fellowsd at cs dot man dot ac dot uk>
Andreas Kupries <a dot kupries at westend dot com>
dgp at user dot sourceforge dot net
Richard Suchenwirth <richard dot suchenwirth at kst dot siemens dot de>
Kevin B KENNY <kennykb at acm dot org>
Jeff Hobbs <hobbs at users dot sourceforge dot net>
Test User <test at example dot com>
New User <newbie at example dot com>
Working User <thisworks at example dot com>
Vince Darley <vincentdarley at users dot sourceforge dot net>
Fabrice Pardo <Fabrice dot Pardo at l2m dot cnrs dot fr>
Don Porter <dgp at users dot sf dot net>
Donal K. Fellows <donal dot k dot fellows at man dot ac dot uk>
Joe Mistachkin <joe at mistachkin dot com>
State:Draft
Type:Informative
Vote:Pending
Created:Sunday, 03 December 2000

Abstract

This proposal has no content. It exists only to provide a document on which testing of and practice using of the TIP editing interfaces can take place.

Rationale

This document serves a purpose similar to the Graffiti page (http://purl.org/thecliff/tcl/wiki/34.html) at the Tcl'ers Wiki [1].

It will also be useful for testing the web editing interface proposed in TIP #13.

Test

Here's a simple edit test.

Test of italic, bold and mixed 'bold and italic' text.

Subsection test

foobarsoom

Subsubsection test

spong wibble

depth test

depth test

foo bar spong

some more test stuff

Reference Implementation

A reference implementation does not yet exist.

Copyright

Public domain

----------------------------------

Abstract

This TIP proposes a -namespace option for the interp invokehidden subcommand to allow hidden commands to be invoked in the specified namespace context in the slave interpreter.

Rationale

Safe interpreters and namespaces have been useful and important features of Tcl since version 8.0. However, it can sometimes be difficult to use them together effectively. For example, while you can invoke a hidden command in a safe interpreter with interp invokehidden, such as source, you cannot specify the target namespace context where the command should be invoked. Using the interp eval subcommand is not an option because that, by design, does not allow hidden commands to be invoked. In addition, since the interp invokehidden subcommand expects a command name, namespace eval and similar constructs that would typically be used to change the target namespace context cannot be used.

Specification

interp invokehidden path ?-global? ?-namespace namespace? hiddenCmdName ?arg ...?

The interp invokehidden subcommand would continue to function as the current documentation dictates with the following notable exceptions:

Example Usage

The following example scripts illustrates how this feature might be used.

################################################
# file inside.tcl
################################################

set x "this is a test from inside [namespace current]."

################################################
# file invoke.tcl
################################################

set i [interp create -safe]
set file [file join [file dirname [info script]] inside.tcl]

interp invokehidden $i -namespace ::test::foo::bar source $file

set result [interp eval $i [list set ::test::foo::bar::x]]

# should be: "this is a test from inside ::test::foo::bar."
puts stdout $result

Proposed C API Changes

The following additions/changes would be made to the private Tcl C API:

Reference Implementation

A reference implementation of this TIP is availble at:

http://sf.net/tracker/?func=detail&aid=981841&group_id=10894&atid=310894

Copyright

This document has been placed in the public domain.


Powered by TclThis is not necessarily the current version of this TIP.

TIP AutoGenerator - written by Donal K. Fellows