From: Andreas K. <aku...@sh...> - 2006-08-14 06:46:06
|
> Andreas Kupries wrote: > > The new proposal basically provides communication channels with an > > option to set an interpreter for execution. This is the link command > > of the original proposal. The implementations of safeBasic and safe > > commands of the original become so trivial in the new scheme that > > providing special commands for them is not worthwhile. I.e. > > > > comm::comm new FOO -interp [interp create -safe] > > or comm::comm new FOO -interp [safe::interpCreate] > > > Looks good. Just rename -ipevents option to -interp_events or > -ievents. What is the problem with 'ip' ? > > The protocol command of the original proposal also reduces to 'create > > an empty interpreter and set aliases into it'. For the case of linking > > the aliases to a second interpreter 'interp alias' is still the best > > way of doing it, reducing this further to 'create an empty interp'. We > > can do a command for that, this is however quite general and unrelated > > to comm. Anybody with an idea where to place such command ? (Maybe a > > package "interp" ?) > > > Can you provide an example of how you intend to use this. As such, it > could be just a sub-command "comm::comm link ..." but I can't say much > without understanding how it is going to be used. The case of 'create an empty interpreter and set aliases into it', subcase 'the are aliases into the main interp, and a snit object' snit::type FOO { component comm constructor {...} { set comm [comm::comm new ${selfns}::comm \ -interp [XXXX $self {list of methods}]] return } } where XXXX is the command creating a an interpreter, clearing it of all commands, procedures, and namespaces, and then creating aliases for all methods in the list which redirect the commands to the newly created FOO instance. The other case, 'create an empty interp' is for the general case, where the aliases go into some other interpreter, and not an object. set empty [XXXX] set execution [interp create ...] interp alias $empty .... $execution ... ... comm::comm new FOO -interp $empty Here XXXX is the command to create an interpreter and clear it of all commands, procedures, and namespaces. > > + > > +This isecure setup can be changed by the user via the two options > > > Typo: isecure -> insecure. Fixed in my local copy. -- So long, Andreas Kupries <aku...@sh...> <http://www.purl.org/NET/akupries/> Developer @ <http://www.activestate.com/> ------------------------------------------------------------------------------- |