Re: Dabo-users Digest, Vol 64, Issue 40

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

Parent Message unknown Re: Dabo-users Digest, Vol 64, Issue 40

by Steve Rose-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your responses John and Adrian.

When I set the textbox as a dDateTextBox it displays <None> but the other
TBs display correctly,but they are not linked to date fields plus their
textboxes are derived from the dTextBox class.  I checked the MySQL table
structure and the field in question is definitely a DATE data type.  I'm
wondering if dDateTextbox is looking for a DATETIME, not a DATE?

Any ideas appreciated.

On Thu, Oct 29, 2009 at 9:00 AM, <dabo-users-request@...> wrote:

> Send Dabo-users mailing list submissions to
>        dabo-users@...
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://leafe.com/mailman/listinfo/dabo-users
> or, via email, send a message with subject or body 'help' to
>        dabo-users-request@...
>
> You can reach the person managing the list at
>        dabo-users-owner@...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dabo-users digest..."
>
>
> Today's Topics:
>
>   1. Re: Problem with dDateTextBox (Adrian Klaver)
>   2. Re: Problem with dDateTextBox (John)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 29 Oct 2009 08:19:04 -0700
> From: Adrian Klaver <aklaver@...>
> Subject: Re: [dabo-users] Problem with dDateTextBox
> To: Dabo Users list <dabo-users@...>
> Message-ID: <200910290819.04853.aklaver@...>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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@...
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 29 Oct 2009 08:27:15 -0700
> From: John <jfabiani@...>
> Subject: Re: [dabo-users] Problem with dDateTextBox
> To: Dabo Users list <dabo-users@...>
> Message-ID: <200910290827.15307.jfabiani@...>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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
>
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Dabo-users mailing list
> Dabo-users@...
> http://leafe.com/mailman/listinfo/dabo-users
> Searchable Archives: http://leafe.com/archives/search/dabo-users
>
>
> End of Dabo-users Digest, Vol 64, Issue 40
> ******************************************
>


--- 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/28cfef1c0910291039o1b58bb59wf0aaa38cbc1ed44c@...

Re: Dabo-users Digest, Vol 64, Issue 40

by jfabiani :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 29 October 2009 10:39:05 am Steve Rose wrote:
>  I'm
> wondering if dDateTextbox is looking for a DATETIME, not a DATE?

Not the problem IMO.  I use DATE as my data type always for dates.  If the
backend has the column data type as DATE it should work.

How about providing your bizobj class - maybe we see something in the code.  
Also does the calendar work for the control in question?

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/200910291059.52294.jfabiani@...

Re: Dabo-users Digest, Vol 64, Issue 40

by Adrian Klaver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


----- "Steve Rose" <gnateater@...> wrote:

> Thanks for your responses John and Adrian.
>
> When I set the textbox as a dDateTextBox it displays <None> but the
> other
> TBs display correctly,but they are not linked to date fields plus
> their
> textboxes are derived from the dTextBox class.  I checked the MySQL
> table
> structure and the field in question is definitely a DATE data type.
> I'm
> wondering if dDateTextbox is looking for a DATETIME, not a DATE?
>
> Any ideas appreciated.
>

Do you know and/or can show what format your dates are returned as? The reason I ask is because of the information fromm the dDateTextBox docs.

http://paul.dabodev.com/doc/api/dabodoc/dabo.ui.uiwx.dDateTextBox.dDateTextBox.html

StrictDateEntry

Specifies whether date values must be entered in strict ISO8601 format. Default=False.

If not strict, dates can be accepted in YYYYMMDD, YYMMDD, and MMDD format,
which will be coerced into sensible date values automatically.



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/1262348857.2011471256839778438.JavaMail.root@...

Re: Dabo-users Digest, Vol 64, Issue 40

by jfabiani :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 29 October 2009 11:09:38 am Adrian Klaver wrote:

> ----- "Steve Rose" <gnateater@...> wrote:
> > Thanks for your responses John and Adrian.
> >
> > When I set the textbox as a dDateTextBox it displays <None> but the
> > other
> > TBs display correctly,but they are not linked to date fields plus
> > their
> > textboxes are derived from the dTextBox class.  I checked the MySQL
> > table
> > structure and the field in question is definitely a DATE data type.
> > I'm
> > wondering if dDateTextbox is looking for a DATETIME, not a DATE?
> >
> > Any ideas appreciated.
>
> Do you know and/or can show what format your dates are returned as? The
> reason I ask is because of the information fromm the dDateTextBox docs.
>
> http://paul.dabodev.com/doc/api/dabodoc/dabo.ui.uiwx.dDateTextBox.dDateText
>Box.html
>
> StrictDateEntry
>
> Specifies whether date values must be entered in strict ISO8601 format.
> Default=False.
>
> If not strict, dates can be accepted in YYYYMMDD, YYMMDD, and MMDD format,
> which will be coerced into sensible date values automatically.
>
>
>
> Adrian Klaver
> aklaver@...

Maybe but "StrictDateEntry" about data entry (I think) and not about
displaying the data.
Displaying dates can be set with something like
dabo.settings.dateFormat = "%m/%d/%y"

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/200910291114.56573.jfabiani@...

Parent Message unknown Re: Dabo-users Digest, Vol 64, Issue 40

by Adrian Klaver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




----- "John" <jfabiani@...> wrote:


> >
> >
> http://paul.dabodev.com/doc/api/dabodoc/dabo.ui.uiwx.dDateTextBox.dDateText
> >Box.html
> >
> > StrictDateEntry
> >
> > Specifies whether date values must be entered in strict ISO8601
> format.
> > Default=False.
> >
> > If not strict, dates can be accepted in YYYYMMDD, YYMMDD, and MMDD
> format,
> > which will be coerced into sensible date values automatically.
> >
> >
> >
> > Adrian Klaver
> > aklaver@...
>
> Maybe but "StrictDateEntry" about data entry (I think) and not about
> displaying the data.
> Displaying dates can be set with something like
> dabo.settings.dateFormat = "%m/%d/%y"
>
> Johnf

Did not think about it that way, thanks. The whole formatting thing got me to thinking. I know MySQL allows 00/00/00 and empty strings as dates but Python does not, just wondering if that could be part of the problem.


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/826307332.2023271256841144742.JavaMail.root@...