From: Davide C. <dp...@un...> - 2008-07-08 15:41:33
|
I think this was a file that John Jones wrote originally, so perhaps he knows where they are used. I am not aware of any that use it, and don't see any by grepping the libraries. The error was probably introduced by me last summer when I was trying to encapsulate the initialization code and make sure it runs from the _init() routine rather than in the .pl file itself. As for whether there is a better way, currently this is the right way to do it. One of the things that came out of the AIM conference is that there needs to be a better way to add features to a context (rather than just load a completely new context). I have some ideas for that, but haven't completed the work on it. After that, it would be reasonable to make this a "context patch" rather than a separate context, but for now, this is the right way. I think the name change to contextCombinatorics would be fine. Davide On Jul 8, 2008, at 11:09 AM, Mike Gage via activitymail wrote: > Log Message: > ----------- > fixed typo by changing all references to IntegerFunction or > IntegerFunctions to the plural > > The typo gave an immediate error when IntegerFunctions2::Init was > called instead of > IntegerFunction2::Init while the internal name of the package was > integerFunction2. > The external name of the context was IntegerFunctions and > everything has been changed > to match that. > > The fact that this bug has existed so long leads me to believe that > this context is not > much used. Is there an alternative or better way to include C(n,k) > and P(n,k) as > functions in the context? I'd also suggest changing the name to > something like > contextCombinatorics since I think this is more likely to show up > when someone searches > for C(n,k) or P(N,k) functionality using a keyword search. This > would be feasible > if the current contextIntegerFunctions has not be used very much. > > -- Mike Gage and Noah Bennett > > Tags: > ---- > rel-2-4-patches > > Modified Files: > -------------- > pg/macros: > contextIntegerFunctions.pl > > Revision Data > ------------- > Index: contextIntegerFunctions.pl > =================================================================== > RCS file: /webwork/cvs/system/pg/macros/contextIntegerFunctions.pl,v > retrieving revision 1.1.6.2.2.1 > retrieving revision 1.1.6.2.2.2 > diff -Lmacros/contextIntegerFunctions.pl -Lmacros/ > contextIntegerFunctions.pl -u -r1.1.6.2.2.1 -r1.1.6.2.2.2 > --- macros/contextIntegerFunctions.pl > +++ macros/contextIntegerFunctions.pl > @@ -46,7 +46,7 @@ > > sub _contextIntegerFunctions_init {context::IntegerFunctions2::Init > ()}; # don't reload this file > > -package context::IntegerFunction2; > +package context::IntegerFunctions2; > our @ISA = qw(Parser::Function::numeric2); # checks for 2 numeric > inputs > > sub C { > @@ -69,8 +69,8 @@ > $context->{name} = "IntegerFunctions"; > > $context->functions->add( > - C => {class => 'context::IntegerFunction2'}, > - P => {class => 'context::IntegerFunction2'}, > + C => {class => 'context::IntegerFunctions2'}, > + P => {class => 'context::IntegerFunctions2'}, > ); > > main::Context("IntegerFunctions"); > > ---------------------------------------------------------------------- > --- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > OpenWeBWorK-CVS mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-cvs > > |