Skip to content

Unable to use @html, @touch widgets #15

Description

@jakub-g

Trying to use a widget from the library other than @aria, like

{@touch:Dialog {
} /}

results in an error message:

Template error: found widget library 'touch', which is undeclared in the wlibs parameter of the 'Template' statement.

but since in the template view, there's no {Template} statement, it's impossible to add wlibs by the user.

I'm wondering if it wouldn't be better to not do any magical insertion of {Template} in TPL, or wrapping the code in the tpl script in a function call, but just initialize the textareas with the full skeletons needed?

Regarding tpl scripts, with the default value of

({
    $classpath:'InstantTemplateScript',
    $prototype : {
      myMethod: function() {
      }
    }
})

there's a warning in the last line about missing semicolon. But when one inserts it, there's a parse error, probably because the code from the textarea is then appended to the function name and evaled, so there's sth like someFunc(({ // json here });)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions