Re: Power Objects Question

From: Gordon E. Hooker <gordonh_at_acslink.net.au>
Date: 1995/12/17
Message-ID: <4b29mo$3et_at_peg.apc.org>#1/1


mikek_at_krt.com (Michael Kranzdorf) wrote:

>In article <4ar6r4$k8_at_peg.apc.org>, gordonh_at_acslink.net.au wrote:
>
>> 1. If you set the format string for a string value (say to upper case)
>> that value is not sent back to the database in upper case.
>>
>> I can't see for the life of me why you can't set the string to upper
>> or lower case and not expect it to put in the database as upper
>> or lower case. (That is why you set a format mask at the front
>> end).
>
>I disagree - format is a display property, not a field property. What if
>you retrieve a lowercase string from the database - what should happen?
>How would dates and currency work?
>
>how about using something like:
> postchange()
> self.value=ucase(self.value) 'this will convert and commit data in the db
> inherited.postchange()

Point taken but, I believe there should be a property that will enforce the ucase, lcase, InitCaps for insertion into the database. Why code something if you don't have to?

Most front end tools do what I am asking Power Objects to do.

>
>> 2. The property DATASIZE returns rubbish...
>>
>> I was trying to use the field property DATASIZE in a
>> PostChange() method to test the size of a string entered.
>> With a DATASIZE on a string field set to 5 the value returned
>> was 41. To prove this point I entered the following Oracle Basic
>> code to a click method for a button on the form.
>>
>
>You want LEN() not DATASIZE()

Why would I want to use the LEN() function in this case I want the flexibility to check the actual length of the string against the DataSize.

>
>From the OPO ehelp:
>
>"DATASIZE: (the number of bytes reserved for the value held in the
>control). The default DataSize is 41. If you enter no value for DataSize,
>or if you enter a value less than 41, the DataSize property is set to 41
>bytes."

What I am saying is this should not be the case...

If that is the case then that functionality is worthless. If I want to restrict the datasize of a string to less than 41 then I should be able to do this using the datasize property.

My take on this is; The property is available at runtime, therefore it should be useful!!!!

It is not useful I the system over-rides what I need if the value is less than 41, and can be used if the value is 41 or greater. This just doesn't make sense.

>
>Michael Kranzdorf mikek_at_krt.com
>Kranzco Realty Trust http://www.krt.com 610.941.9292

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Gordon E. Hooker MACS PCP
25 Clarke Street Ripley Queensland Australia Phone 61-7-32940555
Email gordonh_at_acslink.net.au
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ It is far far better to remain silent and appear a fool then to open ones mouth and remove all doubt.

Anon. Received on Sun Dec 17 1995 - 00:00:00 CET

Original text of this message