From: SourceForge.net <no...@so...> - 2009-07-13 12:33:21
|
Feature Requests item #2549883, was opened at 2009-01-30 18:23 Message generated for change (Settings changed) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=2549883&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 21. [namespace] Group: None >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Don Porter (dgp) Assigned to: Donal K. Fellows (dkf) Summary: Tcl_CreateEnemble() lacks ClientData,Tcl_CmdDeleteProc args Initial Comment: Seems there's no way when creating an ensemble command to set a Tcl_CmdDeleteProc. Either a revised interface permitting that, or some advice in the documentation about how to proceed in light of this disability (delete trace? CmdInfo manipulation?) would be in order. ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2009-07-13 13:33 Message: Can also use Tcl_SetEnsembleParameterList to install global extra arguments to every subcommand. If that's not sufficient, it really is time to get busy with TclOO instead. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-02-23 10:51 Message: There is one way to do it now: attach the clientData to the individual subcommands in the ensemble. But the C OO routines are probably easier overall, especially if you're not interested in supporting inheritance. Everything in the OO code is NRE-enabled. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-01-31 18:09 Message: The intended use case was to convert the slave interp command returned by [interp create] into an ensemble. The motivation for that was to assist the NRE-enabling of [$slave invokehidden] to fix Tcl Bug 2486550. Since I opened this, I've learned more about NRE and it's now clear that conversion to an ensemble is not necessary, and not really even very helpful in tackling 2486550, so this particular motivating case is no longer active. Now consider it just a feature request for extensions. If an extension wants to create an object-like command, is there a recommended way to build on Tcl_CreateEnsemble() to achieve that? Or is it recommended to use the OO C routines instead? ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-01-31 15:26 Message: Try explaining the use-case for this significant increase in complexity first. :-) ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-01-30 19:21 Message: well, access to these things is denied because the ensemble machinery itself is making use of them. So what's the way to implement an object-like command? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-01-30 19:18 Message: Also no way to set a ClientData. Without these things, appears very hard to use the public access to ensemble machinery to create an object-like command. Maybe I'm barking up the wrong tree, and should be putting oo facilities to work instead? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-01-30 18:24 Message: This disability leaks through to the internal TclMakeEnsemble() utility as well. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=2549883&group_id=10894 |