I found the reason... it was because I defined OnCreateNodeClass event handler in a frame, but in the form's .lfm file, OnCreateNodeClass was set to nil under inherited TreeView1 (I should have pressed the place in the object inspector inadvertently).
What would you recommend in these cases? I have similar experiences, and in those situations, I opened .lfm file, and removed the parts of "inherited .... ". Is this the only way? Or would you recommend to re-assign in the forms' event handlers again, e.g. in this case, form1.oncreatenodeclass = frame1oncreatenodeclass, etc. ? It is possible but in this case I have to look for all event handlers defined in the frame, and assign all of them on the form.