Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #2001 (closed enhancement: fixed)

Opened 14 years ago

Last modified 13 years ago

tango.text.Arguments: help method which includes argument aliases

Reported by: gavin Assigned to: Marenz
Priority: minor Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: arguments Cc:

Description

The existing 'help' method passes the arguments to a delegate accepting the argument's name and the help text for it. The suggested additional 'help' method also passes any aliases specified for the argument to the delegate.

Attachments

Arguments.d (1.5 kB) - added by gavin on 10/12/10 11:39:49.
Arguments.d.patch (0.8 kB) - added by Marenz on 01/27/11 18:03:45.
As kris suggested
Arguments.d.2.patch (1.0 kB) - added by Marenz on 01/28/11 11:48:01.
New patch writes aliases to a public array. instead of help, opApply can be used now
Arguments.d.3.patch (0.7 kB) - added by Marenz on 02/11/11 15:37:31.
makes name, help and bogus public

Change History

10/12/10 11:39:49 changed by gavin

  • attachment Arguments.d added.

(follow-up: ↓ 2 ) 10/14/10 17:28:05 changed by kris

it should pass the entire Argument object instead, imo

01/27/11 18:03:45 changed by Marenz

  • attachment Arguments.d.patch added.

As kris suggested

(in reply to: ↑ 1 ) 01/27/11 18:15:27 changed by Marenz

Replying to kris:

it should pass the entire Argument object instead, imo

I did the patch just now without really thinking. @Kris: How does passing the entire Argument object help in getting the aliases?

--Marenz

01/28/11 11:48:01 changed by Marenz

  • attachment Arguments.d.2.patch added.

New patch writes aliases to a public array. instead of help, opApply can be used now

01/28/11 19:31:47 changed by Marenz

  • status changed from new to assigned.
  • owner changed from community to Marenz.

01/28/11 19:35:46 changed by Marenz

  • status changed from assigned to closed.
  • resolution set to fixed.

02/01/11 16:08:29 changed by Marenz

  • status changed from closed to reopened.
  • resolution deleted.

While adjusting our code to this patch, I noticed that the name and text members of Argument are private, which means I can't use opApply. Suggestions? Make them public or provide getter? (with .dup or without?)

--marenz

02/11/11 15:37:31 changed by Marenz

  • attachment Arguments.d.3.patch added.

makes name, help and bogus public

02/11/11 20:03:51 changed by kris

should only expose name and help

03/03/11 12:44:07 changed by Marenz

  • status changed from reopened to closed.
  • resolution set to fixed.