Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

addtodelegate suggestion

edited February 2007 in Vanilla 1.0 Help
hi! i'm new to this community and also to vanilla. but in the past 2 weeks i read many lines of code in vanilla and extensions. the framework and the forum are both realy great. but i also have a new suggestion: the predefinedattributes extension is implemented in one class. to add new delegate's the auther made many small functions like this: function PredefinedAttributes_AddToApplicationForm($ApplyForm) { $pa = new PredefinedAttributes($ApplyForm->Context, $ApplyForm->Applicant); $pa->AddToApplicationForm(); } $Context->AddToDelegate('ApplyForm', 'PostInputsRender', 'PredefinedAttributes_AddToApplicationForm'); wouldn it be easier to just make a: $pa = new PredefinedAttributes(); and then $Context->AddToDelegate('ApplyForm', 'somedelegate', Array(&$pa, 'functionname1')); $Context->AddToDelegate('ApplyForm', 'somedelegate', Array(&$pa, 'functionname2')); //and so on... the change is done in the Framework.Class.Delegation.php file: on line 36 i just destinguish between string or array if (is_string($this->Delegates[$DelegateName][$i])) $this->Delegates[$DelegateName][$i]($this); else if (is_array($this->Delegates[$DelegateName][$i])) call_user_func($this->Delegates[$DelegateName][$i], $this); else fatal error any more ideas? :) regards, J.
This discussion has been closed.