masked control problem

Hi,

I am currently unsubscribed from this list, so if you decide answer on this letter, please write to my private email (bashu@yandex.ru).
I have create masked text control, see the code:

self.weight_box = masked.TextCtrl(self, mask="#{3}.#{2}",
                                   excludeChars="", formatcodes = 'F_R',
                                   includeChars="", validRegex="",
                                   validRange='', choices='',
                                   choiceRequired = True,
                                   defaultValue = '000.00')

Then I enter some data into it, for example '4.00'. I got it by GetValue method and store somewhere. After this I trying set this data (4.0) back by SetValue method of masked control and I got this:

...
   File "/usr/lib/python2.3/site-packages/wx-2.6-gtk2-unicode/wx/lib/masked/textctrl.py", line 200, in SetValue
     value, replace_to = self._Paste(value, raise_on_invalid=True, just_return_value=True)
   File "/usr/lib/python2.3/site-packages/wx-2.6-gtk2-unicode/wx/lib/masked/maskededit.py", line 5686, in _Paste
     valid_paste, replacement_text, replace_to = self._validatePaste(paste_text, sel_start, sel_to, raise_on_invalid)
   File "/usr/lib/python2.3/site-packages/wx-2.6-gtk2-unicode/wx/lib/masked/maskededit.py", line 5565, in _validatePaste
     raise ValueError('"%s" cannot be inserted into the control "%s"' % (paste_text, self.name))
ValueError: "0004.0" cannot be inserted into the control "maskedTextCtrl"

I dont know how to solve this. Please give me some advice. Any help is apreciable.
Thanks and sorry for my english.

Hi,

just a quick question here:
Isn't it time to think about a central repository for modules, libs,
and extensions?
Though Perl is shunned by most Python users, I have always liked CPAN
as a dedicated place to search for and submit useful addons ...
I like the wiki, but I quite often find useful stuff that is not
listed in the wiki (http://wiki.wxpython.org/index.cgi/wxPythonPit_20Libs).
Looking forward for your ideas,

Cheers,

S.

                            mailto:pdftex@the-shelter.de

you mean something like the Python Cheese Shop?

···

On 2/9/06, the_shelter <pdftex@the-shelter.de> wrote:

Hi,

just a quick question here:
Isn't it time to think about a central repository for modules, libs,
and extensions?
Though Perl is shunned by most Python users, I have always liked CPAN
as a dedicated place to search for and submit useful addons ...
I like the wiki, but I quite often find useful stuff that is not
listed in the wiki (http://wiki.wxpython.org/index.cgi/wxPythonPit_20Libs).
Looking forward for your ideas,

Cheers,

S.

                            mailto:pdftex@the-shelter.de

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hello Peter,

Thursday, February 9, 2006, 1:33:11 PM, you wrote:

you mean something like the Python Cheese Shop?
PyPI · The Python Package Index

Yop, but maybe a little more user friendly, sub-categorized, etc ...
Compare this:

to this:

See what I mean?

Hello,

you could begin adding your discoveries to the wiki wxPythonPit_20Libs. :slight_smile:

Maybe with that, other people are inspired to
add their useful stuff also.

(I personally don't like the wiki not so much;
the editing is long winded and the appearance is
also not my taste).
Escpeciall the wxPythonPit Apps Page looks ugly. :slight_smile:
(not to blame anyone of course).

So the wxPythonPit_20Libs and the wxPythonPit Apps could be
enhanced and better strucured (divide in categories,
creating a table, ...).

For me applies:
I have some kind of "scratchpad" file,
where I log important and interesting stuff
about pyhton and wxPython unordered.
but with a good find functionality
(regular expressions) sometimes, I find
relativly quick the needed information)

This I also do for samples, interesting apps, ...

···

On Thu, 9 Feb 2006 12:58:28 +0100, the_shelter <pdftex@the-shelter.de> wrote:

Hi,

just a quick question here:
Isn't it time to think about a central repository for modules, libs,
and extensions?
Though Perl is shunned by most Python users, I have always liked CPAN
as a dedicated place to search for and submit useful addons ...
I like the wiki, but I quite often find useful stuff that is not
listed in the wiki (http://wiki.wxpython.org/index.cgi/wxPythonPit_20Libs).
Looking forward for your ideas,

Cheers,

--
Franz Steinhaeusler

Hi Basil,

Basil Shubin wrote:

Hi,

I am currently unsubscribed from this list, so if you decide answer on this letter, please write to my private email (bashu@yandex.ru).
I have create masked text control, see the code:

self.weight_box = masked.TextCtrl(self, mask="#{3}.#{2}",
                                  excludeChars="", formatcodes = 'F_R',
                                  includeChars="", validRegex="",
                                  validRange='', choices='',
                                  choiceRequired = True,
                                  defaultValue = '000.00')

Then I enter some data into it, for example '4.00'. I got it by GetValue method and store somewhere. After this I trying set this data (4.0) back by SetValue method of masked control and I got this:

...
  File "/usr/lib/python2.3/site-packages/wx-2.6-gtk2-unicode/wx/lib/masked/textctrl.py", line 200, in SetValue
    value, replace_to = self._Paste(value, raise_on_invalid=True, just_return_value=True)
  File "/usr/lib/python2.3/site-packages/wx-2.6-gtk2-unicode/wx/lib/masked/maskededit.py", line 5686, in _Paste
    valid_paste, replacement_text, replace_to = self._validatePaste(paste_text, sel_start, sel_to, raise_on_invalid)
  File "/usr/lib/python2.3/site-packages/wx-2.6-gtk2-unicode/wx/lib/masked/maskededit.py", line 5565, in _validatePaste
    raise ValueError('"%s" cannot be inserted into the control "%s"' % (paste_text, self.name))
ValueError: "0004.0" cannot be inserted into the control "maskedTextCtrl"

Your value is not matching the definition of your mask="#{3}.#{2}" = 3.1 but your value is 4.0!

For numeric values you might be better of using masked.NumCtrl - check the wxPython demo under More Windows/Controls it also shows you have to set the control pro grammatically.

See you
Werner

···

I dont know how to solve this. Please give me some advice. Any help is apreciable.
Thanks and sorry for my english.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi,

the_shelter wrote:

Hi,

just a quick question here:
Isn't it time to think about a central repository for modules, libs,
and extensions?
Though Perl is shunned by most Python users, I have always liked CPAN
as a dedicated place to search for and submit useful addons ...
I like the wiki, but I quite often find useful stuff that is not
listed in the wiki (http://wiki.wxpython.org/index.cgi/wxPythonPit_20Libs).
Looking forward for your ideas,

I think that page would be more useful if people finding things would just add a small reference to that page on the wiki. I don't think having some other repository will solve the problem of not finding things, that is why I just recently added some XML stuff to that page, also I am not involved in the dev of those libs/modules.

See you
Werner

···

Cheers,

S.

                           mailto:pdftex@the-shelter.de

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

I think the repository is a great idea, but I prefer the firefox
extensions as an example:
https://addons.mozilla.org/extensions/showlist.php?application=firefox&category=Developer%20Tools

wxPython modules can use screenshots for quick impressions. But
probably this will stay a dream ....

Stani

···

On 2/9/06, Werner F. Bruhin <werner.bruhin@free.fr> wrote:

Hi,

the_shelter wrote:

>Hi,
>
>just a quick question here:
>Isn't it time to think about a central repository for modules, libs,
>and extensions?
>Though Perl is shunned by most Python users, I have always liked CPAN
>as a dedicated place to search for and submit useful addons ...
>I like the wiki, but I quite often find useful stuff that is not
>listed in the wiki (http://wiki.wxpython.org/index.cgi/wxPythonPit_20Libs).
>Looking forward for your ideas,
>
>
I think that page would be more useful if people finding things would
just add a small reference to that page on the wiki. I don't think
having some other repository will solve the problem of not finding
things, that is why I just recently added some XML stuff to that page,
also I am not involved in the dev of those libs/modules.

See you
Werner

>Cheers,
>
>S.
>
> mailto:pdftex@the-shelter.de
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
>For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

--

http://pythonide.stani.be/screenshots
http://pythonide.stani.be/manual/html/manual.html

I agree, it will remain a dream... at least until we figure out how to
clone Robin. :slight_smile:

Or maybe if someone at Google takes something like this for their 20%...

Peter

···

On 2/9/06, SPE Stani's Python Editor <spe.stani.be@gmail.com> wrote:

I think the repository is a great idea, but I prefer the firefox
extensions as an example:
https://addons.mozilla.org/extensions/showlist.php?application=firefox&category=Developer%20Tools

wxPython modules can use screenshots for quick impressions. But
probably this will stay a dream ....

Werner F. Bruhin пишет:
...

Your value is not matching the definition of your mask="#{3}.#{2}" = 3.1 but your value is 4.0!

For numeric values you might be better of using masked.NumCtrl - check the wxPython demo under More Windows/Controls it also shows you have to set the control pro grammatically.

Oops I miss this widgets when look at wxPython demo. NumCtrl is exactly what I need!
Thank a lot!