Filter.Load() is always valid

var filter = DOpus.Create().Filter();
filter.load('nonexistent_filter');
DOpus.Output(filter.valid + ' : "' + String(filter) + '"');

filter.valid is True even for filters that don’t exist.

It's because a filter that doesn't load is just an empty filter, which is still valid. In the next beta we'll make the Load method itself return true or false to indicate success or failure.

2 Likes