<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Not directly, you can use Silverlight to connect to a web
service which uses a database.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>db40 got my attention a while ago for somehow hearing that it worked
in SL, and stores everything in IsolatedStorage, but I never investigated it.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@lists.ironpython.com
[mailto:users-bounces@lists.ironpython.com] <b>On Behalf Of </b>Andrew Evans<br>
<b>Sent:</b> Thursday, May 14, 2009 3:59 PM<br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> Re: [IronPython] Doing Simple Math In Silverlight<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Just a quick question also<br>
<br>
is it possible to connect to a mysql database through silverlight and Iron
Python<br>
<br>
And if so anyone have an example<br>
<br>
<br>
*cheers <o:p></o:p></p>
<div>
<p class=MsoNormal>On Thu, May 14, 2009 at 3:34 PM, Andrew Evans <<a
href="mailto:andrew.canit@gmail.com">andrew.canit@gmail.com</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>Hey guys thank you<br>
<br>
and thanks Michael will look into whitespace and error handling :-)<br>
<br>
just wanted it to work :-P<o:p></o:p></p>
<div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br>
<br>
<o:p></o:p></p>
<div>
<p class=MsoNormal>On Thu, May 14, 2009 at 3:21 PM, Michael Foord <<a
href="mailto:fuzzyman@voidspace.org.uk" target="_blank">fuzzyman@voidspace.org.uk</a>>
wrote:<o:p></o:p></p>
<div>
<p class=MsoNormal>Andrew Evans wrote:<o:p></o:p></p>
<p class=MsoNormal>Hello<br>
<br>
I am trying to perform some math operations in Silverlight<br>
<br>
inputNum1 and inputNum2 are of TextBox<br>
<br>
inputNum1 = TextBox()<br>
inputNum2 = TextBox()<br>
<br>
result0 = int(inputNum1) + int(inputNum2)<o:p></o:p></p>
</div>
<p class=MsoNormal>That's because you can't cast text boxes to integers!<br>
<br>
You need something like:<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br>
result0 = int(inputNum1.Text) + int(inputNum2.Text)<o:p></o:p></p>
</div>
<p class=MsoNormal>You'll probably want to strip whitespace and also handle the
error case where what the user has entered is not a valid integer.<br>
<br>
HTH<br>
<br>
Michael<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'> res0.Text =
str(result0)<br>
<br>
I get the following error<o:p></o:p></p>
</div>
<p class=MsoNormal><<a href="http://go.microsoft.com/fwlink/?LinkID=124807"
target="_blank">http://go.microsoft.com/fwlink/?LinkID=124807</a>>
TypeError: expected int, got TextBox<br>
<br>
Any ideas<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com"
target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<o:p></o:p></p>
<p class=MsoNormal><br>
<br>
-- <br>
<a href="http://www.ironpythoninaction.com/" target="_blank">http://www.ironpythoninaction.com/</a><br>
<a href="http://www.voidspace.org.uk/blog" target="_blank">http://www.voidspace.org.uk/blog</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com"
target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</body>
</html>