Skip to content

Commit f5fd893

Browse files
committed
doc
1 parent 81dc468 commit f5fd893

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

resources/doc/browser.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
},
9898
"select": {
9999
"syntax": "select {name}",
100-
"description": "This declares a ~m:<select>~ variable. You can either attach it to a corresponding element in the HTML or create a new element; see ~l:attach~ and ~l:create~",
100+
"description": "This declares a ~m:<select>~ variable. You can either attach it to a corresponding element in the HTML or create a new element; see ~l:attach~ and ~l:create~.%0a%0aThe ~m:select~ element is a dropdown list. There is no corresponding ~m:option~ element; instead, to construct the element you must create a JSON array containing the elements of the list, then use ~l:set!set Select from List~, where ~m:Select~ and ~m:List~ are the relevant variable types.",
101101
"examples": "select CountryList"
102102
},
103103
"span": {
@@ -192,7 +192,7 @@
192192
},
193193
"set": {
194194
"syntax": "set [the content of] {target} from {source}%0aset [the] title to {title}%0aset [the] content of {element} to {value}%0aset [the] id of {element} to {id} [as {selected}]%0aset [the] text of {button}/{input}/{span}/{label} to {text}%0aset [the] size of {input} to {size}%0aset attribute {name} of {element} to {value}%0aset style {name} of {element}/body to {style}%0aset [the] styles of {element} to {styles}%0aset [the] default of {select} to {value}%0aset {select} from List [as {value}]",
195-
"description": "The ~m:set~ command is the most heavily used in _**EasyCoder**_ (and in English generally). The examples above cover all of the different variants. In many of them, ~m:the~ is optional, but it~sq~s always best to include it as an aid to readability.%0a%0aAlso note that the only way to assign classes to elements is by using ~m:set attribute~. All elements are given ids when they are ~l:create!created~.%0a%0aThe form ~m:set {select} from {list} as {selected}~ loads a ~l:select|k|browser~ element from an array and optionally sets one of them to be the selected value. Note that the values must be strings; if you are using numbers then add them to the list as ~m:`` cat N~ to force them to become strings.%0a%0a~m:set~ is also used in other packages, for example in ~l:set|k|core!core~.",
195+
"description": "The ~m:set~ command is the most heavily used in _**EasyCoder**_ (and in English generally). The examples above cover all of the different variants. In many of them, ~m:the~ is optional, but it~sq~s always best to include it as an aid to readability.%0a%0aAlso note that the only way to assign classes to elements is by using ~m:set attribute~. All elements are given ids when they are ~l:create!created~.%0a%0aThe form ~m:set {select} from {list} as {selected}~ loads a ~l:select|k|browser~ element from a json array and optionally sets one of them to be the selected value. Note that the values must be strings; if you are using numbers then add them to the list as ~m:`` cat N~ to force them to become strings.%0a%0a~m:set~ is also used in other packages, for example in ~l:set|k|core!core~.",
196196
"examples": "set the content of TargetDiv from SourceDiv%0aset the title to `My First EasyCoder Page`%0aset the content of Link to `Click for more`%0aset the id of ContentDiv to `ec-contents`%0aset the text of HelpButton to `Help`%0aset the size of NameField to 40%0aset attribute `class` of MainText to `normal-text`%0aset style `display` of ButtonPanel to `none`%0aset style `text-align` of body to `center`%0aset the styles of TextPanel to `flex:2;font-weight:bold;margin-top:1em`%0aset the default of Countries to `Spain`%0aset Months from MonthList as `March`"
197197
},
198198
"trace": {

resources/doc/core.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@
360360
"syntax": "length of {value}",
361361
"description": "Measures a text variable.",
362362
"examples": "put the length of Name into Length"
363+
},
364+
"uuid": {
365+
"syntax": "uuid",
366+
"description": "Generates a UUID - a random string with a very low probability of being repeated. This is usually enough to ensure global uniqueness for most projects.%0a%0aIn some cases it may be easier to use a value composed of some local feature plus a timestamp, for example%0a%0a~m:MyEmailAddress cat now~%0a%0awhich combines the user~sq~s email address with the current time, guaranteeing a new unique value every second (assuming only one person has the use of that email address). If the rules are kept to, these values are globally unique.",
367+
"examples": "put uuid into Key"
363368
}
364369
},
365370
"conditions": {

resources/doc/json.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
},
6565
"json index": {
6666
"syntax": "[the] json index of {item} in {array}",
67-
"description": "",
67+
"description": "Returns the zero-based index of the element in the array, or -1 if it is not present.",
6868
"examples": "put the json index of `August` in Months into Index"
6969
}
7070
},
71-
"conditions": {}
71+
"conditions": "{}"
7272
}

0 commit comments

Comments
 (0)