Hi!
I am trying to produce the html content: <p>hello <a href="http://world.org">world</a></p> I tried the following: MyWidget>>renderOn: html | p | p := html p. p with: 'hello '. (p href: 'http://world.org') with: 'world'. But obviously it does not work. The link does not show up. The following does a bit better: MyWidget>>renderOn: html html p: 'hello '. (html a href: 'http://world.org') with: 'world'. But there the link is outside the paragraph. By the way, is there a way to see the generated html? "View source" within Safari gives me what the index.html content is. Firefox or Chrome produces better debugging support? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
Hi Alexandre!
The canvas works pretty much like in Seaside, except that it manipulate live DOM elements. renderOn: html html p with: [ html a href: 'http://www.google.fr'; with: 'Google] The webkit inspector allows you to see the DOM as it is. Firefox also has Firebug, or in the latest version builtin development tools. Cheers, Nico
-- Nicolas Petton
http://www.nicolas-petton.fr On Apr 16, 2012, at 3:32 PM, Alexandre Bergel wrote:
|
Thanks Nicolas, it works.
Yeah, I knew that my question was from a newbie :-) If there is a FAQ where I can put this code snippet into, then I will do it. Cheers, Alexandre On 16 Apr 2012, at 08:44, Nicolas Petton wrote: > Hi Alexandre! > > The canvas works pretty much like in Seaside, except that it manipulate live DOM elements. > > renderOn: html > html p with: [ > html a > href: 'http://www.google.fr'; > with: 'Google] > > The webkit inspector allows you to see the DOM as it is. Firefox also has Firebug, or in the latest version builtin development tools. > > Cheers, > Nico > -- > Nicolas Petton > http://www.nicolas-petton.fr > > On Apr 16, 2012, at 3:32 PM, Alexandre Bergel wrote: > >> Hi! >> >> I am trying to produce the html content: <p>hello <a href="http://world.org">world</a></p> >> >> I tried the following: >> MyWidget>>renderOn: html >> | p | >> p := html p. >> p with: 'hello '. >> (p href: 'http://world.org') with: 'world'. >> >> But obviously it does not work. The link does not show up. >> >> The following does a bit better: >> MyWidget>>renderOn: html >> html p: 'hello '. >> (html a href: 'http://world.org') with: 'world'. >> >> But there the link is outside the paragraph. >> >> By the way, is there a way to see the generated html? "View source" within Safari gives me what the index.html content is. Firefox or Chrome produces better debugging support? >> >> Cheers, >> Alexandre >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
Free forum by Nabble | Edit this page |