Opened 12 years ago

Closed 12 years ago

#2342 closed defect (fixed)

Memo example on page61 of Dojo Book

Reported by: guest Owned by: bill
Priority: high Milestone: 1.0
Component: Doc parser Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

Suggested changes to Memo example on page61 of Dojo Book:

1) add to the top of Memo.js the line:

dojo.provide("acme.widget.Memo");

2) Following that, add the line:

dojo.require("dojo.widget.*");

(Would get error message without this line.)

3) In dojo.widget.defineWidget, change under widget name and class

"acme.Memo",

to

"acme.widget.Memo",

4) Also in dojo.widget.defineWidget, change:

templatePath: dojo.uri.dojoUri("src/widget/Memo.html"), templateCssPath: dojo.uri.dojoUri("src/widget/Memo.css"),

to

templatePath: dojo.uri.dojoUri("../acme/widget/templates/Memo.html"), templateCssPath: dojo.uri.dojoUri("../acme/widget/templates/Memo.css"),

5) in file Memo.html, change the line:

<div class="title">$\{this.title\}</div>

to

<div class="title">${this.title}</div>

6) list the exact paths of the files

for example, if dojo path is HTML/dojo/dojo.js, then use:

HTML/acme/widget/Memo.js HTML/acme/widget/templates/Memo.html HTML/acme/widget/templates/Memo.css HTML/acme/tests/TestMemo.html

This info came from: http://www.nabble.com/custom-Memo-widget%3A-how-to-load-it--tf2869807.html, post by John Li.

Change History (4)

comment:1 Changed 12 years ago by guest

Strange, some hard returns and were omitted from above. 2, 4 & 5 are easier to read in the referenced email. For 6), note that there are 4 file names listed there.

comment:2 Changed 12 years ago by bill

Milestone: 1.0
Owner: changed from Neil Roberts to bill

comment:3 Changed 12 years ago by guest

Could you change component from Documentation to book? Thanks!

comment:4 Changed 12 years ago by dante

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.