I suggest making the following changes:<br><br>Make idL a public member<br>Place frmStart in a variable instead of idL itself (I am pretty sure setvariable isn't making a reference to your variable, just to the value of it)
<br><br>So something like<br>...<br>public string idL;<br>...<br>engine.SetVariable(&quot;frm&quot;, this);<br>...<br><br>frm.idL = &quot;Hello World!&quot;<br><br><div><span class="gmail_quote">On 10/6/06, <b class="gmail_sendername">
ANNA CHAPOVALOV</b> &lt;<a href="mailto:anfaleo@gmail.com">anfaleo@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>I'm a newbee in IP, so sorry if i ask (maybe) dumb questions....<br><br>I'm using IP for scripting in a c# app. I have something like this:<br><br>public partial class frmStart : Form<br>&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string idL;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ......<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ......<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void frmStartBatch_Load(object sender, EventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; idL = &quot;&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; engine = new PythonEngine();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; engine.ImportSite();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; engine.SetVariable(&quot;idL&quot;, idL );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; engine.ExecuteFile(&quot;ip.py&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //At this point i would aspect that idL has the value passed in ip.py scrypt.. but it still has &quot;&quot;... 
<br>}<br>}<br><br>Here's my ip code:<br><br>idL = &quot;Hello World!&quot;<br><br>Is it ok? How come? I've found some workarounds...&nbsp; but still curious why it happens. <br><br>Other thing i've noticed is that if i have a class (i've tried with a form class), if i pass it (this) as variable to a ip script, not all it's widgets and attrs are avaible... is this linked with the .NET attributes issues?
<br><br>thanks!!<br>

<br>_______________________________________________<br>users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:users@lists.ironpython.com">users@lists.ironpython.com</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br><br><br></blockquote></div><br>