func (ps *Sheet) Apply(obj interface{}, setMsg bool) (bool, error) {
	applied := false
	var rerr error
	for _, sl := range *ps {
		app, err := sl.Apply(obj, setMsg)
		if app {
			applied = true
		}
		if err != nil {
			rerr = err
		}
	}
	return applied, rerr
}
/////////////////////////////////////////////////////////////////////
Sheet
Apply applies entire sheet to given object, using param.Sel's in order
see param.Sel.Apply() for details.
returns true if any Sel's applied, and error if any errors.
If setMsg is true, then a message is printed to confirm each parameter that is set.
It always prints a message if a parameter fails to be set, and returns an error.
package params
import (
	"fmt"
	"log"
	"reflect"
	"strconv"
	"strings"
	"github.com/goki/gi/gi"
	"github.com/goki/ki/kit"
)
func (pr *Params) TargetType() string {
	for pt := range *pr {
		return strings.Split(pt, ".")[0]
	}
	return ""
}
func (pr *Params) Path(path string) string {
	return strings.Join(strings.Split(path, ".")[1:], ".")
}
func (pr *Params) Apply(obj interface{}, setMsg bool) error {
	objNm := ""
	if stylr, has := obj.(Styler); has {
		objNm = stylr.Name()
	} else if lblr, has := obj.(gi.Labeler); has {
		objNm = lblr.Label()
	}
	var rerr error
	for pt, v := range *pr {
		path := pr.Path(pt)
		err := SetParam(obj, path, v)
		if err == nil {
			if setMsg {
				log.Printf("%v Set param path: %v to value: %v\n", objNm, pt, v)
			}
		} else {
			rerr = err  
		}
	}
	return rerr
}
func (ps *Sel) Apply(obj interface{}, setMsg bool) (bool, error) {
	if !ps.TargetTypeMatch(obj) {
		return false, nil
	}
	if !ps.SelMatch(obj) {
		return false, nil
	}
	err := ps.Params.Apply(obj, setMsg)
	return true, err
}
func (ps *Sel) TargetTypeMatch(obj interface{}) bool {
	trg := ps.Params.TargetType()
	if stylr, has := obj.(Styler); has {
		tnm := stylr.TypeName()
		if tnm == trg {
			return true
		}
	}
	tnm := kit.NonPtrType(reflect.TypeOf(obj)).Name()
	return tnm == trg
}
func (ps *Sel) SelMatch(obj interface{}) bool {
	stylr, has := obj.(Styler)
	if !has {
		return true  
	}
	gotyp := kit.NonPtrType(reflect.TypeOf(obj)).Name()
	return SelMatch(ps.Sel, stylr.Name(), stylr.Class(), stylr.TypeName(), gotyp)
}
func SelMatch(sel string, name, cls, styp, gotyp string) bool {
	if sel == "" {
		return false
	}
	if sel[0] == '.' {  
		return ClassMatch(sel[1:], cls)
	}
	if sel[0] == '#' {  
		return name == sel[1:]
	}
	return styp == sel || gotyp == sel  
}
func ClassMatch(sel, cls string) bool {
	clss := strings.Split(cls, " ")
	for _, cl := range clss {
		if strings.TrimSpace(cl) == sel {
			return true
		}
	}
	return false
}