Bixby 显示枚举数据中的选择框
以下是我的枚举模型:Bixby 显示枚举数据中的选择框,bixby,bixbystudio,Bixby,Bixbystudio,以下是我的枚举模型: enum (Station) { description (List of station in Bart Schedule) symbol (12th St. Oakland City Center) symbol (16th St. Mission) } 我试图在选择框值中显示上面的枚举模型,但它没有反映 input-view{ match: Station(Station) message(Where would you like to boa
enum (Station) {
description (List of station in Bart Schedule)
symbol (12th St. Oakland City Center)
symbol (16th St. Mission)
}
我试图在选择框值中显示上面的枚举模型,但它没有反映
input-view{
match: Station(Station)
message(Where would you like to board from?)
render{
// auto-complete
selection-of (Station){
where-each (Station) {
single-line{
text{
value{
template ("#{value(Station)}")
}
}
}
}
}
}
}
请让我知道我做错了什么?
提前感谢。这里有一种方法: 定义一个运行中的默认init,并为其提供选择值。渲染块不会自动显示所有可能的枚举值。在Github下载这个
action (ActionDisplayGrade) {
description (__DESCRIPTION__)
type (Search)
collect {
input (grade) {
type (EnumGrade)
min (Required) max (One)
default-init {
intent {
goal: ActionGetAllEnumGrade
}
}
}
}
output (TypeTxt)
}
还请注意,您的输入视图代码可能有效,但不建议使用该样式。代码中有三种电台的定义,每种定义都替换以前的定义。最好这样编码:
input-view{
match: Station(this)
message(Where would you like to board from?)
render{
// auto-complete
selection-of (this){
where-each (item) {
single-line{
text{
value{
template ("#{value(item)}")
}
}
}
}
}
}
}
输入视图看起来不错。您可以将您的操作代码添加到描述中吗?