× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: RPG,COBOL or JAVA
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 09 Dec 98 22:38:19 +0000

Hello Booth,

Well, you could do that.  Creating a specialised class (mmddyy date) from a 
more generic class (date) but I 
think a more OO approach would be to design a date field that allowed the date 
to be entered in any format 
and which your application could ask for the value in whatever form it 
required.  That way the user enters 
the date in the format of their choice, the date field class verifies it is a 
correct date, and your 
application gets it in the form it requires simply by asking for it.  The date 
field class understands 
everything about dates and can handle the conversions.  You get 
internationalisation as a side benefit.

myDate = theTextDateField.getDateAsMDY();

Which, if you think about it, is very similar to the implementation of L-type 
fields.  The internal 
representation is separate from the external representation and your 
application can see the date in whatever 
form it requires.

Regards,
Simon Coulter.

//----------------------------------------------------------
// FlyByNight Software         AS/400 Technical Specialists
// Phone: +61 3 9419 0175      Mobile: +61 0411 091 400
// Fax:   +61 3 9419 0175      E-mail: shc@flybynight.com.au
// 
// Windoze should not be open at Warp speed.
//--- forwarded letter -------------------------------------------------------
> X-Mailer: MR/2 Internet Cruiser Edition for OS/2 v1.50 b48 
> Date: Tue, 08 Dec 98 20:31:21 -0500
> From: boothm@ibm.net
> To: MIDRANGE-L@midrange.com
> Reply-To: MIDRANGE-L@midrange.com
> Subject: Re: RPG,COBOL or JAVA

> 
> Would an example of this, in RPG, be an... say... L-type date field?  Should 
>I for example have the ability 
to extend the L-date field's function so that I could have a predefined and 
edited mm/dd/yy field for a 
display field?   Would that be an example of the OO concept of which you speak?
> 
> 
> In <872566D4.0052AEB7.00@us.ibm.com>, on 12/08/98 
>    at 09:50 AM, boldt@ca.ibm.com said:
> 
> > For example,
> >rather than using a TextField to display a part
> >number, you would define a new widget called,
> >say, PartNumberField, which extends TextField.
> >This widget would inherit all the functionality
> >of TextField, but would implement the rules
> >specific to part numbers.  This is an incredibly
> >powerful concept 
> 
> -- 
> -----------------------------------------------------------
> boothm@ibm.net
> Booth Martin
> -----------------------------------------------------------

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.