xsharp.eu • Using DTP:IsNone - Page 4
Page 4 of 5

Using DTP:IsNone

Posted: Mon Jun 24, 2019 2:54 pm
by wriedmann
Hi Karl-Heinz,
this seems to be a bad thing: on both sides there were made enhancements and bug fixes, but not the same....
So the VO SP4 and the X# versions of the GUI libraries show a different behavior....
This could be a problem since some calls have been changed like the ones in the TabControl class.
Wolfgang

Using DTP:IsNone

Posted: Mon Jun 24, 2019 7:22 pm
by Chris
BiggyRat wrote:Oops... sorry...
Thanks, it runs now! And it seems to work well, I see the value is updated in the DBF file, when you press the commit button.
Is it that you expect the control to show different values when you press the skip buttons? This will not work for this control, because it is included in a different (embedded) window than the one where the skip buttons are. The two windows have different dbf files associacted with them, when you move the record in the parent one, this does not move the record in the other as well.

Did I understand correctly that this is the problem you were facing? If yes, then assume what you want to have is a master-details style window, so when you move through records in the "master" window, you want to show only records associated with it in the "details" window. Have a look into the SetRelation() methods in the help file on how to do that.

Apologies if I misunderstood you, in that case please further explain!

Using DTP:IsNone

Posted: Mon Jun 24, 2019 10:37 pm
by Jamal
Chris,

The relationship is not working because he's missing the CDX files.

BTW, I updated post that has the MyTimePicker class, but here are the changes.

Code: Select all

ACCESS SelectedTime CLASS MyTimePicker
 LOCAL lpSysTime is _WINSYSTEMTIME
 LOCAL cResult  as string
 MemClear( @lpSysTime , _sizeof( _WINSYSTEMTIME ) )

 // must pad 0 to time portions to proper 24 hour time format.  Jamal
 IF DateTime_GetSystemtime( self:handle() , @lpSysTime ) == GDT_VALID
   cResult := PadL(NTrim(lpSysTime.wHour),2,"0") + ":" +  PadL(NTrim(lpSysTime.wMinute),2,"0") + ":" + PadR(NTrim(lpSysTime.wSecond),2, "0")   
 ELSE
   cResult := null_string
 ENDIF 

RETURN cResult

Using DTP:IsNone

Posted: Tue Jun 25, 2019 12:28 am
by BiggyRat
Hi Chris, Jamal must be correct if the relationship isn't working, it does here. The relationship is made by the CLCODE field in both databases.

The actual problem is this:
Record 1 has no time value in the JOBTIME field
Record 2 HAS a time in the JOBTIME field.

Record 1 should display the DTP as a "null" value , and record 2 should display it's date value. Correct?

If I click on Record 1 to set the NULL time, commit it then skip to the next record, record 2 ALSO displays as a NULL_DATE. In other words, the DTP checkbox does not set/reset per record. Is that any clearer?

Using DTP:IsNone

Posted: Tue Jun 25, 2019 12:51 am
by Jamal
But you are not setting the value of JOBTIME.
You are using DateTimePicker1 instead of JOBTIME!! How do you expect it to change when skipping records?

Edit: Besides you have JOBTIME field on the form but it's off screen and hidden. I had to select it in window properties, delete it then rename DateTimePicker1 to JOBNAME, and the field value changes upon skipping.
biggyrat1.png
biggyrat1.png (55.6 KiB) Viewed 486 times

Using DTP:IsNone

Posted: Tue Jun 25, 2019 1:02 am
by Jamal
Video of skipping!

Not sure why it is not playing the GIF file!

Using DTP:IsNone

Posted: Tue Jun 25, 2019 1:07 am
by BiggyRat
That is not the problem Jamal. Just to satisfy myself, I did as you suggested, and it made exactly 0% difference. The records have always skipped properly. THIS is the problem...

If I click on Record 1 to set the NULL_DATE, commit it then skip to the next record, record 2 ALSO displays as a NULL_DATE. In other words, the DTP checkbox does not set/reset per record. Is that any clearer?

Using DTP:IsNone

Posted: Tue Jun 25, 2019 1:09 am
by BiggyRat
Because it's a .png file perhaps?

Using DTP:IsNone

Posted: Tue Jun 25, 2019 2:41 am
by Jamal
BiggyRat wrote:THIS is the problem...

If I click on Record 1 to set the NULL_DATE, commit it then skip to the next record, record 2 ALSO displays as a NULL_DATE. In other words, the DTP checkbox does not set/reset per record. Is that any clearer?
Can you send another AEF with all included files to mimic the problem?

Using DTP:IsNone

Posted: Tue Jun 25, 2019 2:59 am
by BiggyRat
Certainly. Here you go...