Problem with dDateTextBox

View: New views
3 Messages — Rating Filter:   Alert me  

Problem with dDateTextBox

by Steve Rose-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a form in which one of the textboxes displays a date value from a
MySQL table. If I create the textbox like this:
dateTB =
dabo.ui.dTextBox(self,RegID='dateTB',DataSource=bzs,DataField='S_Date',Width=80),
the date displays correctly. However, if I try to create a textbox from a
dDateTextBox class like this:
dateTB =
dabo.ui.dDateTextBox(self,RegID='dateTB',DataSource=bzs,DataField='S_Date',Width=80),
the textbox displays <None>. What is different about the dDateTextBox class
that might cause this problem?

Platform: Win
Python Version: 2.5.1 on win32
Dabo Version: Version 0.9.2; Revision ~5437
UI Version: 2.8.7.1 on wxMSW

Steve Rose


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/28cfef1c0910261842s5a88f65dtba08cbd3cf3e1138@...

Re: Problem with dDateTextBox

by Adrian Klaver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 26 October 2009 6:42:23 pm Steve Rose wrote:

> I have a form in which one of the textboxes displays a date value from a
> MySQL table. If I create the textbox like this:
> dateTB =
> dabo.ui.dTextBox(self,RegID='dateTB',DataSource=bzs,DataField='S_Date',Widt
>h=80), the date displays correctly. However, if I try to create a textbox
> from a dDateTextBox class like this:
> dateTB =
> dabo.ui.dDateTextBox(self,RegID='dateTB',DataSource=bzs,DataField='S_Date',
>Width=80), the textbox displays <None>. What is different about the
> dDateTextBox class that might cause this problem?

Is it displaying <None> for all values in the table?

>
> Platform: Win
> Python Version: 2.5.1 on win32
> Dabo Version: Version 0.9.2; Revision ~5437
> UI Version: 2.8.7.1 on wxMSW
>
> Steve Rose
>
>




--
Adrian Klaver
aklaver@...


_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/200910290819.04853.aklaver@...

Re: Problem with dDateTextBox

by jfabiani :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 26 October 2009 06:42:23 pm Steve Rose wrote:

> I have a form in which one of the textboxes displays a date value from a
> MySQL table. If I create the textbox like this:
> dateTB =
> dabo.ui.dTextBox(self,RegID='dateTB',DataSource=bzs,DataField='S_Date',Widt
>h=80), the date displays correctly. However, if I try to create a textbox
> from a dDateTextBox class like this:
> dateTB =
> dabo.ui.dDateTextBox(self,RegID='dateTB',DataSource=bzs,DataField='S_Date',
>Width=80), the textbox displays <None>. What is different about the
> dDateTextBox class that might cause this problem?
>
> Platform: Win
> Python Version: 2.5.1 on win32
> Dabo Version: Version 0.9.2; Revision ~5437
> UI Version: 2.8.7.1 on wxMSW
>
> Steve Rose

Just a guess could it be because the underlying data field(S_Date) is a
varchar and not a date field.

Johnf




_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/200910290827.15307.jfabiani@...