Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2015-07-20
15:53 • Ticket [1773103fff] enhancement for namespace ensemble usage reporting statu... artifact: 4d9dc6291e user: dgp
2012-09-14
15:59 • Ticket [1773103fff]: 4 changes artifact: 12518386e8 user: dkf
15:56 • Ticket [1773103fff]: 4 changes artifact: 385c2f9862 user: dkf
15:39 • Ticket [1773103fff]: 4 changes artifact: 6229f318d6 user: nijtmans
2012-05-26
20:16 • Ticket [1773103fff]: 4 changes artifact: 44f00da8d3 user: dkf
2009-07-27
01:28 • Ticket [1773103fff]: 5 changes artifact: e0bfe6f2e2 user: dkf
01:28 • Ticket [1773103fff]: 4 changes artifact: 869c68c5ea user: dkf
2009-07-14
17:54 • Ticket [1773103fff]: 2 changes artifact: fbe7e8d066 user: dkf
2008-02-11
01:49 • Ticket [1773103fff]: 4 changes artifact: 551d0f173d user: wiede
2008-01-21
22:02 • Ticket [1773103fff]: 4 changes artifact: 0cf93d3588 user: dkf
2008-01-19
00:40 • Ticket [1773103fff]: 4 changes artifact: 92fbf97bf6 user: wiede
2007-12-30
22:40 • Ticket [1773103fff]: 4 changes artifact: a334b38684 user: dkf
2007-08-13
21:13 • Ticket [1773103fff]: 1 change artifact: 132f038e58 user: msofer
14:04 • New ticket [1773103fff]. artifact: ea52ea7c23 user: wiede

enhancement for namespace ensemble usage reporting

Open1773103fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 11 years ago
Descriptionplain2007-08-13 14:04:17
If an namespace ensemble command is invoked without a subcommand the normal Tcl_WrongNumArgs message is called.  For Itcl I would need to do a different reporting. It would work if at the beginning if aan unknown handler exists that would be called instead:

    if (objc < 2) {

+        if (ensemblePtr->unknownHandler != NULL) {
+            goto unknownOrAmbiguousSubcommand;
+        }

        Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?argument ...?");
        return TCL_ERROR;
    }
msofer Ticket [1773103fff]: 1 change [History diff]2007-08-13 21:13:02
dkfplain2007-12-30 22:40:08
Logged In: YES 
user_id=79902
Originator: NO

I'm more likely to do this as an extra flag bit
wiedeplain2008-01-19 00:40:34
Logged In: YES 
user_id=558925
Originator: YES

An extra flag would be fine with me. Are there any plans already if/when to add such a flag?
dkfplain2008-01-21 22:02:00
Logged In: YES 
user_id=79902
Originator: NO

I've no plans on this one way or the other at the moment.
wiedeplain2008-02-11 01:49:57
Logged In: YES 
user_id=558925
Originator: YES

Having spent some thoughts again on the problem, I think a good solution would be if I could get something like an ensemble "wrongNumArgs" handler similar to the ensemble unknown handler which should be settable via an option.
dkf Ticket [1773103fff]: 2 changes [History diff]2009-07-14 17:54:44
dkfplain2009-07-27 01:28:29
Update: it would have been nice to have had this when reworking [history] as an ensemble. I found a (horrific) workaround, but this would have been far more elegant.
dkfplain2009-07-27 01:28:57
Update: it would have been nice to have had this when reworking [history] as an ensemble. I found a (horrific) workaround, but this would have been far more elegant.
dkfplain2012-05-26 20:16:49
IP - Comment Removed: 82.42.214.208
nijtmansplain2012-09-14 15:39:37
Ping!
Is this still being considered?
dkfplain2012-09-14 15:56:51
It might actually be done as part of TIP #380.
dkfplain2012-09-14 15:59:39
Oops, that was just for TclOO, not [namespace ensemble].
dgpplain2015-07-20 15:53:44
I'm coding an Itcl workaround for this, but sending
missing subcommand errors to the unknown dispatcher
would be a much better idea.  It appears to be specced
to handle that case.
Log in (anonymous is fine) to add a comment.