I have this HTML: <canvas id="viewport" width="800" height="550"></canvas>
I need to get this canvas. How i can get it? var canvas = $(canvas).get(0); var ctx = canvas.getContext("2d"); to smalltalk code in Amber -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Does this work? canvas := ('#viewpoint' asJQuery) at: 0. ctx := canvas getContext: '2d'.
2013/4/4 XumuK <[hidden email]> I have this HTML: <canvas id="viewport" width="800" height="550"></canvas> Sincerely yours, Apostolis Xekoukoulotakis You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Yes, it does with a small modification. Change #at: to #get: like the following: canvas := '#id' asJQuery get: 0. Cheers, Nico On Apr 5, 2013, at 12:05 AM, Apostolis Xekoukoulotakis <[hidden email]> wrote:
-- Nicolas Petton http://www.nicolas-petton.fr -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Thanks a lot)
пятница, 5 апреля 2013 г., 2:38:27 UTC+4 пользователь nicolas petton написал: -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Sorry, but how i can convert
пятница, 5 апреля 2013 г., 2:52:09 UTC+4 пользователь XumuK написал: Thanks a lot) You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |