Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

[Markup] Value Key #15

Closed
karai17 opened this issue Jan 15, 2015 · 3 comments
Closed

[Markup] Value Key #15

karai17 opened this issue Jan 15, 2015 · 3 comments
Labels

Comments

@karai17
Copy link
Member

karai17 commented Jan 15, 2015

Should there be a value key, or should value (and sometimes children) simply be the sequential second key? Or perhaps both, with value overriding a sequential value?

-- value key
{ "text", value="Some text", id="important_textbox", class={"class1", "class2"},
    { "text", value="Some child" },
}

-- sequential key
{ "text", "Some text", id="important_textbox", class={"class1", "class2"},
    { "text", "Some child" },
}

-- priority key
{ "text", "Some text", value="This takes priority!", id="important_textbox", class={"class1", "class2"},
    { "text", "Some child" },
}
@adrix89
Copy link

adrix89 commented Jan 15, 2015

If you can do whatever.value to set it that would make more sense then whatever[2]
If you are setting the value with a function then there is no point for an extra value field.
Priority override makes sense technically since the important one is the value as that would be changed but maybe it doesn't make sense in terms of clarity.

@karai17
Copy link
Member Author

karai17 commented Jan 15, 2015

Well, it wouldn't be whatever[2], this is strictly for markup. See the
above examples.
On Jan 15, 2015 3:12 AM, "adrix89" notifications@github.com wrote:

If you can do whatever.value to set it that would make more sense then
whatever[2]
If you are setting the value with a function then there is no point for an
extra value field.


Reply to this email directly or view it on GitHub
#15 (comment).

@karai17
Copy link
Member Author

karai17 commented Jan 16, 2015

I've decided to go with the priority bit. You can use either element[2] or element.value to assign a value where element.value takes priority in the case that both are given.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants