Hi list,
I might be tired, but how can I render a checkbox? html input type: 'checkbox'; checked: 'true' Thanks! |
[:html | html input type: 'checkbox';
at: 'checked' put: 'checked'. ] appendToJQuery: 'body' asJQuery
On Thu, May 10, 2012 at 7:22 PM, Alex Schenkman <[hidden email]> wrote: Hi list, |
actually:
html input
type: 'checkbox'; at: 'checked' put: 'checked'.
is obviously enough.On Fri, May 11, 2012 at 1:08 AM, Amber Milan Eskridge <[hidden email]> wrote:
|
is with: not required then to render the element?
I thought so after reading Seaside's book on the Canvas.
On Friday, May 11, 2012 1:08:47 AM UTC+2, Amber Milan Eskridge wrote: actually: |
No, #with: is not required. The Amber canvas is a bit different from the Seaside canvas.
Nico
2012/5/11 Alex Schenkman <[hidden email]> is with: not required then to render the element? |
The Amber canvas creates the nodes immediately in the DOM. This is why you can do things like this:
| myInput | myInput := html input element.
and use that myInput as an instance var or whatever. On Sat, May 12, 2012 at 2:22 PM, nicolas petton <[hidden email]> wrote: No, #with: is not required. The Amber canvas is a bit different from the Seaside canvas. |
And you can manipulate the DOM element attached to the canvas tag with jQuery:
div := html div. div asJQuery ... Cheers, Nico
2012/5/13 Amber Milan Eskridge <[hidden email]> The Amber canvas creates the nodes immediately in the DOM. This is why you can do things like this: |
In reply to this post by Amber Milan Eskridge
On May 11, 1:08 am, Amber Milan Eskridge
<[hidden email]> wrote: > actually: > html input > type: 'checkbox'; > at: 'checked' put: 'checked'. > is obviously enough. Hi, Where that code could be written? I mean: if I type it in a workspace i get an error (html is nil and does not understand #input). So I suppose I can type somethimg like your example code inside a method that take html as a parameter (like #renderOn: does). Is this correct? Sorry for the naive question, but I am triyng to understand a bit more about "the magic" of that parameter ... Gabriele. |
gcambi <[hidden email]> writes:
Hi! Indeed, html rendering is done in renderOn: methods of widgets. See the Counter class for example. Then you can add the widget to the page with jQuery: Counter new appendToJQuery: 'body' asJQuery In a workspace, you can do: [:html | html h1: 'hello world'] appendToJQuery: 'body' asJQuery HTH, Nico > On May 11, 1:08 am, Amber Milan Eskridge > <[hidden email]> wrote: >> actually: >> html input >> type: 'checkbox'; >> at: 'checked' put: 'checked'. >> is obviously enough. > > Hi, > > Where that code could be written? I mean: if I type it in a workspace > i get an error > (html is nil and does not understand #input). > > So I suppose I can type somethimg like your example code inside a > method that take html > as a parameter (like #renderOn: does). > > Is this correct? Sorry for the naive question, but I am triyng to > understand a bit more > about "the magic" of that parameter ... > > Gabriele. -- Nicolas Petton http://nicolas-petton.fr |
Free forum by Nabble | Edit this page |