[IronPython] Users Digest, Vol 42, Issue 25

Vadim Khaskel vkhaskel at hotmail.com
Sat Jan 19 01:27:34 CET 2008


Here is my project tree:
 
webA1
+ Form1
+ Form2
   Program.py
   StartIt.py
 
Form1, Form2 and StarIt are in  class webA1: # namespace
 
Form1.py
 
...
def _button2_Click(self, sender, e):
          StartItK.newWinOpen()
...
 
StarIt.py:
 
import Form2
 
class webA1:
          class StartItK:
          ...
          def newWinOpen():                
                  newf=Application.Run(webA1.Form2())
 
-----------------------------------------------------------------
 
when I run application - I get Unhandled exeption - "name StartItK not defined
 
Detailes:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************IronPython.Runtime.Exceptions.PythonNameErrorException: name 'StartItK' not defined   at IronPython.Runtime.Operations.Ops.CheckInitializedOrBuiltin(Object o, ICallerContext context, String name)   at Form1._button2_Click$f188(FunctionEnvironment16Dictionary $env, Object self, Object sender, Object e) in Form1.py:line 126   at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, Object arg0, Object arg1, Object arg2)   at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, Object[] args)   at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args)   at IronPython.Modules.ClrModule.ReturnChecker.RuntimeChecker.Call(Object[] args)   at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args)   at IronPython.Modules.ClrModule.ArgChecker.RuntimeChecker.Call(Object[] args)   at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args)   at IronPython.Runtime.Types.ReflectedEvent.EventDispatcher.Call(Object[] args)   at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args)   at IronPython.Runtime.Operations.Ops.Call(Object func, Object arg0, Object arg1)   at System.Void(Object, EventArgs)##65(Object , Object , EventArgs )   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ButtonBase.WndProc(Message& m)   at System.Windows.Forms.Button.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************mscorlib    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------webA1    Assembly Version: 0.0.0.0    Win32 Version: 0.0.0.0    CodeBase: file:///C:/Documents%20and%20Settings/vkhask/My%20Documents/IronPython%20Studio/webA1/webA1/bin/Debug/webA1.exe----------------------------------------IronPython    Assembly Version: 1.1.0.0    Win32 Version: 1.1.1    CodeBase: file:///C:/Documents%20and%20Settings/vkhask/My%20Documents/IronPython%20Studio/webA1/webA1/bin/Debug/IronPython.DLL----------------------------------------IronMath    Assembly Version: 1.1.0.0    Win32 Version: 1.1.1    CodeBase: file:///C:/Documents%20and%20Settings/vkhask/My%20Documents/IronPython%20Studio/webA1/webA1/bin/Debug/IronMath.DLL----------------------------------------System    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------snippets1    Assembly Version: 0.0.0.0    Win32 Version: 1.1.1    CodeBase: file:///C:/Documents%20and%20Settings/vkhask/My%20Documents/IronPython%20Studio/webA1/webA1/bin/Debug/IronPython.dll----------------------------------------System.Xml    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------System.Data    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------System.Configuration    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.Drawing    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Windows.Forms    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------Accessibility    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll----------------------------------------ArtOfTest.WebAii    Assembly Version: 1.0.500.0    Win32 Version: 1.0.500.0    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ArtOfTest.WebAii/1.0.500.0__4fd5f65be123776c/ArtOfTest.WebAii.dll----------------------------------------
************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.
For example:
<configuration>    <system.windows.forms jitDebugging="true" /></configuration>
When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.
 
 
 
 
 
 
 
> From: users-request at lists.ironpython.com> Subject: Users Digest, Vol 42, Issue 25> To: users at lists.ironpython.com> Date: Fri, 18 Jan 2008 16:08:50 -0800> > Send Users mailing list submissions to> users at lists.ironpython.com> > To subscribe or unsubscribe via the World Wide Web, visit> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com> or, via email, send a message with subject or body 'help' to> users-request at lists.ironpython.com> > You can reach the person managing the list at> users-owner at lists.ironpython.com> > When replying, please edit your Subject line so it is more specific> than "Re: Contents of Users digest..."> > > Today's Topics:> > 1. invoking new form (Vadim Khaskel)> 2. Re: invoking new form (Dino Viehland)> > > ----------------------------------------------------------------------> > Message: 1> Date: Fri, 18 Jan 2008 23:19:00 +0000> From: Vadim Khaskel <vkhaskel at hotmail.com>> Subject: [IronPython] invoking new form> To: <users at lists.ironpython.com>> Message-ID: <BAY101-W30489D17AC41929E9209CCCA420 at phx.gbl>> Content-Type: text/plain; charset="windows-1252"> > > Hi all,> > I?m trying to invoke a form from python module (mod1) (which is not in the same name space as Form1 class like this:> #in mod1> def newWinOpen():> Application.Run(Form2()) #I did import Form2 into this module#> > Doesn?t work?> > in my next attempt I put mod1 where I calling Form2 put into the same namespace as Form1 and Form2> > > In this case namespace class in Form1 doesn't see the mod1...> > > What is the right way to do that....???> > Thank you,> > Vadim> _________________________________________________________________> Climb to the top of the charts!? Play the word scramble challenge with star power.> http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan> -------------- next part --------------> An HTML attachment was scrubbed...> URL: http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20080118/87e30be6/attachment.html > > ------------------------------> > Message: 2> Date: Fri, 18 Jan 2008 15:22:41 -0800> From: Dino Viehland <dinov at exchange.microsoft.com>> Subject: Re: [IronPython] invoking new form> To: Discussion of IronPython <users at lists.ironpython.com>> Message-ID:> <7AD436E4270DD54A94238001769C222701041BC43AC3 at DF-GRTDANE-MSG.exchange.corp.microsoft.com>> > Content-Type: text/plain; charset="us-ascii"> > What happens when you do this? Is an exception thrown? Does it just hang waiting w/ nothing happening? Also, are you doing this from the console or from modules which just get executed stand alone (e.g. ipy foo.py)?> > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Vadim Khaskel> Sent: Friday, January 18, 2008 3:19 PM> To: users at lists.ironpython.com> Subject: [IronPython] invoking new form> > Hi all,> > I'm trying to invoke a form from python module (mod1) (which is not in the same name space as Form1 class like this:> #in mod1> def newWinOpen():> Application.Run(Form2()) #I did import Form2 into this module#> > Doesn't work...> > in my next attempt I put mod1 where I calling Form2 put into the same namespace as Form1 and Form2> > > In this case namespace class in Form1 doesn't see the mod1...> > > What is the right way to do that....???> > Thank you,> > Vadim> > ________________________________> Climb to the top of the charts! Play the word scramble challenge with star power. Play now!<http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan>> -------------- next part --------------> An HTML attachment was scrubbed...> URL: http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20080118/acd7c2df/attachment.html > > ------------------------------> > _______________________________________________> Users mailing list> Users at lists.ironpython.com> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com> > > End of Users Digest, Vol 42, Issue 25> *************************************
_________________________________________________________________
Climb to the top of the charts!  Play the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080119/ba2976cc/attachment.html>


More information about the Ironpython-users mailing list