[ocemp-devel] forwarded from pygame, in case you are not reading it
Status: Beta
Brought to you by:
marcusva
From: Laura C. <la...@op...> - 2007-02-22 05:01:01
|
------- Forwarded Message Date: Wed, 21 Feb 2007 19:11:45 -0800 (PST) From: Matthieu TC <mat...@ya...> Subject: Re: [pygame] textboxes and buttons (solved) To: pyg...@se... MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Sender: own...@se... Precedence: list Reply-To: pyg...@se... I suprisingly solved the problem. It was one of encoding. I replaced: self._text = self._text[:self._caret] + event.unicode + self._text[self._caret:] with self._text = self._text[:self._caret] + str(event.unicode) + self._text[self._caret:] in ocempgui's Editable.py, and everything seems dandy once everything is cx_freezed. BTW, pgu had a similar problem, throwing an "unknown encoding: latin-1". - -matt - ----------------------- Thanks. I'm using ocempGUI and its documentation is somewhat better than pgu's so it's going pretty well. I have one problem though. Whenever I cx_freeze my application anbd try it out, as soon as I attempt to enter anything in a textbox, I get a "Fatal Python Error: (pygame parachute) Segmentation Fault". I traced ocempgui's code and found out the segmentation fault is thrown very close to but after self.dirty = True in Editable.py -> notify() I'm guessing another thread picks that up and something goes awry in the drawing. Has anyone cx_freezed a ocempgui app successfully? - -matt >> The two main GUI toolkits for pygame seem to be OcempGUI and pgu >>Take a look at these, but if you just need two textboxes for a login, it'd probably be easier just to >>code them yourself, rather then trying to learn a new library. >I don't know of a standard way of doing this in PyGame, but OCempGui >is in fact a nice GUI toolkit for PyGame. >http://ocemp.sourceforge.net/gui.html >Chris ------- End of Forwarded Message |