Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OvcPictureField RangeLo/RangHi Errors

7 views
Skip to first unread message

Benny Bech

unread,
Jan 3, 2003, 4:26:27 AM1/3/03
to
I have the same problem, when changing the PictureMask property.
I have tracked the problem dow to the following (but i havent try'ed to
solve it).

In OvcEf.TOvcBaseEntryField.efChangeMask method the following lines are:
{save the current field value in tmp buffer}
efTransfer(@Buf, otf_GetData);

{change the mask}
StrLCopy(efPicture, Mask, MaxPicture);
efPicLen := StrLen(efPicture);

{reset the field to its former value}
efTransfer(@Buf, otf_SetData);

in the last line the following method is called
OvcPb.TOvcPictureBase.pbInitPictureFlags;

in this the following lines are:
FillChar(pfPicFlags, MaxLength+1, pflagLiteral);
for I := 0 to MaxLength-1 do
if efNthMaskChar(I) in PictureChars then

but MaxLength is the length of the OLD picture mask, and then it makes a
wrong efEditSt.

I think if migth be efPicLen to be used instead of MaxLength in
pbInitPictureFlags, but it could also be MaxLength should be set in
efChangeMask, i don't know, but i hope som others can correct the problem,
because it is very annoying.


Regards
Benny Bech
Plass Data

"Hartmut Matzke" <Hartmut...@aucos.de> skrev i en meddelelse
news:qB1lVe$pCHA...@tpsmail01.turbopower.net...
> The problem is if the parent (e.g. a groupbox) has is VISIBLE property
set,
> but the parent of the groupbox (e.g. a form) is not visible at that time.
> Your recomendation maybe is a workaround by instead of using one line of
> code in 3.08 now I need to do a lot more coding and which is more
> complicated find all the places in old code.
>
> I hope somebody from TurboPower will respond to this, because this is not
> the first message for this new behaviour.
>
> Hartmut
>
> "Brad Miller" <Br...@CAMAvision.COM> schrieb im Newsbeitrag
> news:GYQOQu6p...@tpsmail01.turbopower.net...
> > I ran into something very similar.
> >
> > Make sure you set:
> > OvcPicturefield.DataType := pftLongInt; { Or what ever type is
> should
> > be }
> > OvcPictureField.DecimalPlaces:=0;
> > OvcPictureField.PictureMask := tMask;
> > Before you set the ranges.
> >
> > That seemed to cure the problem for me. Also make sure your current
> version
> > of Orpheus is: V4.05
> >
> > Hope this helps,
> > Brad
> >
> > "Hartmut Matzke" <Hartmut...@aucos.de> wrote in message
> > news:URDfQn6p...@tpsmail01.turbopower.net...
> > > If I am trying to set RangeLo/RangeHi properties for a numeric field
> type
> > > within a Create-Routine and the initial value of the picturefield is
> Zero
> > > then I am getting a message "A invisible or disabled window ca't get
the
> > > focus" (~ translated from german). See the following code snipped.
> > > Everything worked fine with O3.08. In 4.0x in the Rangexxx-Methods
there
> > was
> > > some code added which tries to set the focus to the ovc-control. This
> > causes
> > > now problem in existing projects.
> > >
> > > Any suggestions ?
> > >
> > >
> > > Hartmut
> > >
> > > constructor TForm2.Create(AOwner: TComponent);
> > > begin
> > > Inherited Create(aOwner);
> > > OvcPictureField1.RangeLo := '1';
> > > // OvcPictureField1.AsString := '1';
> > > OvcPictureField1.RangeHi := '110';
> > > end;
> > >
> > >
> > >
> >
> >
>
>


0 new messages