c# - Trying to implement a CustomObjectEvent handler -
i'm following guide except i'm writing code objects rather documents. here code:
using cms.treeengine; using cms.settingsprovider; [customobjectevents] public partial class cmsmoduleloader { /// <summary> /// attribute class ensures loading of custom handlers /// </summary> private class customobjecteventsattribute : cmsloaderattribute { /// <summary> /// called automatically when application starts /// </summary> public override void init() { // assigns custom handlers appropriate events objectevents.getcontent.execute += category_get_content; //error here } private void category_get_content(object sender, documenteventargs e) { // add custom actions here } } } the line above throwing compile time error:
error 1 cannot convert method group 'category_get_content' non-delegate type 'cms.settingsprovider.simpleobjecthandler'. did intend invoke method? c:\applications\development\kentico6\webpartdev\wwwroot\app_code\blank site\searchbycategory.cs 22 40 c:...\wwwroot\
any ideas?
i had change documenteventargs objecteventargs in category_get_content method.
Comments
Post a Comment