ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pythoncard
pythoncard
RE: [Pythoncard-users] Text Area
by Moors, Phil other posts by this author
Dec 18 2002 7:22PM messages near this date
RE: [Pythoncard-users] Text Area | RE: [Pythoncard-users] Text Area - resend
On Wed, 18 Dec 2002, Kevin Altis wrote:

>  Phil, that works fine on my system, Windows 2000.

I'm on Redhat 8.0, fully patched.
 
>  Sigh, that you can no longer use Ctrl+C to copy read-only text from the
>  wxTextCtrl when it is read-only. I'm going to have to make a custom dialog
>  with a Copy system info to clipboard option.
>  
>  So, do other PythonCard samples work? 

Yes. I have to change my LANG ev from en_US.UTF-8 to en_US. I also get 
this message everytime I start a PyCard application:

	wxWindows warning: Widget styles disabled due to buggy GTK theme.

But, the sample applications work.

>  How about the wxPython demo? 

Works fine.

>  If other PythonCard samples work and you're
>  on Linux or Mac OS X, is the
>  
>  #!/usr/bin/python  different?

This is okay. FYI, textRouter.py has /usr/local/bin/python.

>  That won't be used on Windows. When you say that text doesn't
>  show up do you mean that the app window comes up fine, but then you can't
>  type text in the field or something else? 

The text is never (visibly?) written to the text area. I've altered the 
block by adding a print statement:

     def on_Area51_mouseClick(self, event):
         print "Here I am!"
         self.components.Area51.text = "Hello."

When I activate 'redirect stdout' nothing ever appears in the shell. I 
also tried importing log and adding a log.info("blah") and I never see a 
logfile created. How can tell if I am getting to this block of code?

> If there is a traceback error when the app runs, then what is it.

No traceback. Runs clean.
 
>  Finally, for people posting sample programs, it is probably simpler to
>  attach a zip file with all required files and then show a portion of the
>  problem code in the email with your question. That way there won't be any
>  email wrapping or differences introduced via copy and paste, filenames, etc.
>  when trying to recreate the files for testing. Zip files can have the line
>  endings converted when unzipped, so it takes care of the cross-platform
>  issues too.

Will do.

Phil

>  
>  > -----Original Message-----
>  > From: pythoncard-users-admin@[...].net
>  > [mailto:pythoncard-users-admin@[...].net]On Behalf Of Moors,
>  > Phil
>  > Sent: Wednesday, December 18, 2002 9:56 AM
>  > To: PythonCard Users
>  > Subject: [Pythoncard-users] Text Area
>  >
>  >
>  >
>  > I think maybe something is wrong with my installation. Or, I'm doing
>  > something really dumb. Is there anything wrong with the following
>  > minimal?
>  > I can't get any text to show up.
>  >
>  > #!/usr/bin/python
>  >
>  > """
>  > __version__ = "$Revision: 1.6 $"
>  > __date__ = "$Date: 2002/07/29 17:44:55 $"
>  > """
>  >
>  > from PythonCardPrototype import model
>  >
>  > class Minimal(model.Background):
>  >
>  >     def on_menuFileExit_select(self, event):
>  >         self.Close()
>  >
>  >     def on_Area51_mouseClick(self, event):
>  >         self.components.Area51.text = "Hello."
>  >
>  > if __name__ == '__main__':
>  >     app = model.PythonCardApp(Minimal)
>  >     app.MainLoop()
>  >
>  > Here's the resource file:
>  >
>  > {'stack':{'type':'Stack',
>  >           'name':'Minimal',
>  >     'backgrounds': [
>  >     {'type':'Background',
>  >           'name':'bgMin',
>  >           'title':'Minimal PythonCard Application',
>  >           'position':(630, 166),
>  >           'size':(288, 260),
>  >
>  >         'menubar': {'type':'MenuBar',
>  >          'menus': [
>  >              {'type':'Menu',
>  >              'name':'menuFile',
>  >              'label':'&File',
>  >              'items': [
>  >                   {'type':'MenuItem',
>  >                    'name':'menuFileExit',
>  >                    'label':'E&xit\tAlt+X',
>  >                   },
>  >               ]
>  >              },
>  >          ]
>  >      },
>  >          'components': [
>  >
>  > {'type':'TextArea',
>  >     'name':'Area51',
>  >     'position':(40, 10),
>  >     'size':(200, 200),
>  >     'backgroundColor':(255, 255, 255),
>  >     },
>  >
>  > ] # end components
>  > } # end background
>  > ] # end backgrounds
>  > } }
>  



Phil Moors
Systems Manager
RCI Group, Inc.
508 McCormick Drive
Glen Burnie, MD  21061

-- 
Every program has (at least) two purposes:
	the one for which it was written and another for which it wasn't.




-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
T H I N K G E E K . C O M       http://www.thinkgeek.com/sf/
_______________________________________________
Pythoncard-users mailing list
Pythoncard-users@[...].net
https://lists.sourceforge.net/lists/listinfo/pythoncard-users
Thread:
Moors, Phil
Kevin Altis
Moors, Phil
Kevin Altis
Kevin Altis

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved