Skip to forum content

Mif

— mystic javascript interface

You are not logged in. Please login or register.


Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields labelled (Required) must be completed before the form is submitted.

Required information for guests



Captcha image. Turn pictures on to see it.
Required information
Optional post settings

Topic review (newest first)

1

Hi,

In case someone needs to validate on rename, just do something like:

tree.addEvent('rename', function (node, name_new, name_old) {
    // do validation here
});

where tree is an instance of Mif.Tree

2

there is no build-in validation functionality

3

Not again. I'm answering my own question. node.recursive() works for counting the child nodes.  lol lol lol

4

Hi,

  • Is there a way to count child nodes of any given parent?

  • How can I validate the node's new name on rename()? I think I can just call rename() and restore the previous name if the validation fails, but perhaps there's already a built-in functionality for this?

Regards,

[ simon.cpu ]