diff --git a/Classes/css/core/Context.java b/Classes/css/core/Context.java new file mode 100644 index 0000000..3c7ee4e --- /dev/null +++ b/Classes/css/core/Context.java @@ -0,0 +1,20 @@ +package Classes.css.core; + +import java.util.HashMap; + +public class Context{ + + /* Context data (associative array) */ + private static HashMap attr = new HashMap(); + + /* Add data */ + public static void bind(String index, Object data){ + Context.attr.put(index, data); + } + + /* Fetch data */ + public static Object get(String index){ + return Context.attr.get(index); + } + +} diff --git a/Classes/css/core/Ruleset.java b/Classes/css/core/Ruleset.java index 065abb8..5d5a219 100644 --- a/Classes/css/core/Ruleset.java +++ b/Classes/css/core/Ruleset.java @@ -65,7 +65,7 @@ public class Ruleset { /* (x) If nothing custom -> suppose java fx rule */ else - new_rule = (Rule) new JavaFX(l_side, (String) r_side[0]); + new_rule = (Rule) new JavaFX(l_side, r_side[0].toString());