@Phuket2
Partly to understand the black magic you need to look at what ui._view_from_dict does.
If custom_class is set, the loader checks for the custom class's name in the bindings (or current scope's locals and globals), and if that class is an subclass of View will instantiate it, without arguments. Then it proceeds to set various attributes of this new view, and finally returns the view.
v = ViewClass()
v.frame = _str2rect(view_dict.get('frame'))
v.flex = attrs.get('flex', '')
v.alpha = attrs.get('alpha', 1.0)
v.name = attrs.get('name')
...
return v
...
So the issue is that this creates a whole new instance of our custom class, and returns it... and if the constructor for that class is trying to call load_view, you get an infinite loop. But since we can override the bindings dict, we create a wrapper class whose new constructor simply returns the current instance.
If you also want to be able to use load_view to instantiate the view, rather than use selfwrapper as the custom class name, you would use the actual custom class name, as in my example above. adding self to bindings as you have done is also a good idea, since it lets you reference instance methods as actions.