Bex wrote:I didn't try to replicate your problem but you need to use:
Code: Select all
Script.RegisterEvent newNode, "OnCanEditNode", "OnCanEditSomeNode"
You are great! It does the job. Big thanks!
Anyway, in my opinion this is senseless. If I already registered OnNodeEdited and other events for some node, this means that I want to use those events for that node. If I don't want to use those events anymore, I could use UnRegisterEvents, right? If someone really need to disable only those editing events without unregistering all events, then one could use this OnCanEditNode event, but only in that case - default behavior should be enabled events, not disabled. Old way for defining event functions is more logical to me.
Now, could you tell me how can I check if I registered some event for certain node, without defining some global variable or (even worse) some object? With old functions I could use something like this:
Code: Select all
If oTargetNode.OnDragDrop = "CustomDragDrop" Then
I think that OnCanEditNode should be a read/write property, not event.