Re: [IronPython] Using ipy to "control" a form

2008-04-10 Thread Curt Hagenlocher
On Thu, Apr 10, 2008 at 4:37 AM, Greg Akins <[EMAIL PROTECTED]> wrote:
>
> However, I when I executed 'from System.Windows.Forms import Form'
> (instead of *) then form.Show() worked OK.

This may have been a problem with 2.0A6; it seems to work just fine in
2.0B1. Though I'd suggest that importing * from System.Windows.Forms
is not necessarily the best approach (at least in production code),
especially given that it's got over 700 items in its namespace.  Even
when just playing interactively, you risk silently overwriting
previously-defined symbols when you "import *".

--
Curt Hagenlocher
[EMAIL PROTECTED]
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-10 Thread Greg Akins
On Thu, Apr 10, 2008 at 7:38 AM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
>
>  ipyw.exe doesn't give you an interactive console; you need to use it
>  with a script.  It's basically a way of running a Python script
>  without a console.
>

Thanks Curt.

And sorry for not reading farther to self-answer what was probably
obvious.  I'm trying to get little slices of time to work on this, so
I'm firing off these question a little too quickly.



-- 
Greg Akins
Software Development Manager
SSI Services

http://kc.vanadium.com
http://www.pghcodingdojo.org
http://www.insomnia-consulting.org/monologue
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-10 Thread Curt Hagenlocher
On Thu, Apr 10, 2008 at 4:32 AM, Greg Akins <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 9, 2008 at 9:54 PM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
> > Use ipyw.exe with Application.Run().
>
> Nothing appeared when I ran ipyw.  No errors. No output.

ipyw.exe doesn't give you an interactive console; you need to use it
with a script.  It's basically a way of running a Python script
without a console.

--
Curt Hagenlocher
[EMAIL PROTECTED]
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-10 Thread Greg Akins
On Thu, Apr 10, 2008 at 7:21 AM, Greg Akins <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 9, 2008 at 10:15 PM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
>  > On Wed, Apr 9, 2008 at 7:04 PM, Sanghyeon Seo <[EMAIL PROTECTED]> wrote:

>  >  > If what you are trying to do is to play with WinForms from the
>  >  > interactive console, then you may want to study Tutorial/winforms.py
>  >  > carefully. (Or just use it.)
>  >
>  >  I think winforms.py isn't working in IronPython 2.0 beta 1, but this
>  >  is a good idea for 1.x.

The tutorial didn't "work" correctly, but winforms.py seemed to work
OK.  Though I just did a simple form.Show() after executing, it so I'm
not sure that it is working completely.

The portion of the Tutorial that didn't work for me is listed below.
However, I when I executed 'from System.Windows.Forms import Form'
(instead of *) then form.Show() worked OK.


>>> from System.Windows.Forms import *
>>> form = Form()
>>> from System.Windows.Forms import *
>>> from System.Drawing import *
>>> f = Form()
Traceback (most recent call last):
  File , line 0, in ##117
NameError: name 'Form' is not defined



-- 
Greg Akins
Software Development Manager
SSI Services

http://kc.vanadium.com
http://www.pghcodingdojo.org
http://www.insomnia-consulting.org/monologue
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-10 Thread Greg Akins
On Wed, Apr 9, 2008 at 9:54 PM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
> Use ipyw.exe with Application.Run().
>

ipyw.exe didn't seem to work?

C:\Libraries\IronPython-2.0A6\Tutorial>..\Bin\Debug\ipyw.exe

C:\Libraries\IronPython-2.0A6\Tutorial>

Nothing appeared when I ran ipyw.  No errors. No output.


-- 
Greg Akins
Software Development Manager
SSI Services

http://kc.vanadium.com
http://www.pghcodingdojo.org
http://www.insomnia-consulting.org/monologue
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-10 Thread Greg Akins
On Wed, Apr 9, 2008 at 10:15 PM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 9, 2008 at 7:04 PM, Sanghyeon Seo <[EMAIL PROTECTED]> wrote:
>  > 2008/4/10, Greg Akins <[EMAIL PROTECTED]>:
>  >
>  >>  As I initially investigate IronPython, I assumed it would be possible
>  >>  to control a form from ipy
>  >
>  > If what you are trying to do is to play with WinForms from the
>  > interactive console, then you may want to study Tutorial/winforms.py
>  > carefully. (Or just use it.)
>
>  I think winforms.py isn't working in IronPython 2.0 beta 1, but this
>  is a good idea for 1.x.

Thanks, both of you, for the suggestion.

I'll start looking through that Tutorial

-- 
Greg Akins
Software Development Manager
SSI Services

http://kc.vanadium.com
http://www.pghcodingdojo.org
http://www.insomnia-consulting.org/monologue
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-09 Thread Curt Hagenlocher
On Wed, Apr 9, 2008 at 7:04 PM, Sanghyeon Seo <[EMAIL PROTECTED]> wrote:
> 2008/4/10, Greg Akins <[EMAIL PROTECTED]>:
>
>>  As I initially investigate IronPython, I assumed it would be possible
>>  to control a form from ipy
>
> If what you are trying to do is to play with WinForms from the
> interactive console, then you may want to study Tutorial/winforms.py
> carefully. (Or just use it.)

I think winforms.py isn't working in IronPython 2.0 beta 1, but this
is a good idea for 1.x.

--
Curt Hagenlocher
[EMAIL PROTECTED]
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-09 Thread Sanghyeon Seo
2008/4/10, Greg Akins <[EMAIL PROTECTED]>:
>  As I initially investigate IronPython, I assumed it would be possible
>  to control a form from ipy

If what you are trying to do is to play with WinForms from the
interactive console, then you may want to study Tutorial/winforms.py
carefully. (Or just use it.)

-- 
Seo Sanghyeon
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ipy to "control" a form

2008-04-09 Thread Curt Hagenlocher
Use ipyw.exe with Application.Run().

On Wed, Apr 9, 2008 at 6:51 PM, Greg Akins <[EMAIL PROTECTED]> wrote:

> I'm new to IronPython, so please forgive what may be a stupid question
>
> As I initially investigate IronPython, I assumed it would be possible
> to control a form from ipy
>
> So  I try something like
>
> form = Form1()
> form.Show() <- results in an error related to accessing an object
> after it's been destroyed
>
> or
>
> form = Form1()
> Application.Run(form)
>
> Which results in the commandline waiting for Application.Run to return.
>
> Is what I'm trying possible?  Can anyone to point me towards any examples?
>
> --
> Greg Akins
> Software Development Manager
> SSI Services
>
> http://kc.vanadium.com
> http://www.pghcodingdojo.org
> http://www.insomnia-consulting.org/monologue
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Using ipy to "control" a form

2008-04-09 Thread Greg Akins
I'm new to IronPython, so please forgive what may be a stupid question

As I initially investigate IronPython, I assumed it would be possible
to control a form from ipy

So  I try something like

form = Form1()
form.Show() <- results in an error related to accessing an object
after it's been destroyed

or

form = Form1()
Application.Run(form)

Which results in the commandline waiting for Application.Run to return.

Is what I'm trying possible?  Can anyone to point me towards any examples?

-- 
Greg Akins
Software Development Manager
SSI Services

http://kc.vanadium.com
http://www.pghcodingdojo.org
http://www.insomnia-consulting.org/monologue
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com