NetTalk Central

Author Topic: Copy button not working-EXAMPLE ATTACHED  (Read 5937 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Copy button not working-EXAMPLE ATTACHED
« on: May 23, 2012, 04:11:07 PM »
I don't know why but copy buttons on two of my browses are not working.

I have checked everything I can think of to no avail.

The record gets created but the values for the fields are not copied across.    

Here's the code from the PreCopy routine in one of my forms:

PreCopy  Routine
  p_web.SetValue('UpdateCOMPLAINTS_form:ready_',1)
  ! Start of "On Copy : Form begins"
  ! [Priority 5000]

  ! End of "On Copy : Form begins"
  p_web.SetSessionValue('UpdateCOMPLAINTS_CurrentAction',Net:CopyRecord)
  p_web.setsessionvalue('showtab_UpdateCOMPLAINTS',0)
  p_web._PrimeFile(COMPLAINTS,false,0)
  Ans = Net:ChangeRecord
  p_web.SetSessionValue('UpdateCOMPLAINTS:Primed',1)
  p_web._PreCopyRecord(COMPLAINTS,CM2:KeyComplaintId,Net:Web:Autonumbered)
  ! here we need to copy the non-unique fields across
  If not CM2:DateOfComplaint
    p_web.SetSessionValue('CM2:DateOfComplaint',TODAY())
    CM2:DateOfComplaint = TODAY()
  end
  ! Start of "Pre Copy After Primes"
  ! [Priority 5000]

  ! End of "Pre Copy After Primes"
  do SetFormSettings

Is there anything there that may suggest what is wrong?

Thanks!!

Don
« Last Edit: May 25, 2012, 03:02:40 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Copy button not working
« Reply #1 on: May 24, 2012, 04:18:03 AM »
After quite a few hours of testing, I have discovered what I think I causing my COPY issue.

I generated a completely new browse and form.

Copy now works.

I discovered that the browse really doesn't effect copying so I starting modifying the form until the copy stopped working.

When I embedded a browse on to the form, the copy function stopped working.

So, copy does not work with a form with a child procedure.

Just tested with the "Basic Browse and Form" example app.  I can reproduce the issue.

EDIT:  Just went back to NT 6.27 and the copy feature works there.  Changed to NT 6.28, does not work.  So the copy feature (form with child procedures) stopped working in 6.28.

Don
« Last Edit: May 24, 2012, 04:52:59 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Copy button not working-CAUSE FOUND
« Reply #2 on: May 24, 2012, 06:04:53 AM »
excellent - please post your example so I can duplicate.

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Copy button not working-CAUSE FOUND
« Reply #3 on: May 24, 2012, 06:30:42 AM »
EDIT:  Example App Attached

Hey Bruce,

Go to the Basic Browse and Form example app.

Add a procedure to the mailboxes form.  I simple embedded the mailboxes browse into the form.

Copy stops working.

My suspicion is this feature added in build 6.28:
Add (internal): New method _PrimeFile instead of generating Access:File.PrimeRecord in code.

Because, it seems variables are not being properly primes IF the form has embedded/child procedures.

Don

[attachment deleted by admin]
« Last Edit: May 25, 2012, 03:02:06 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Copy button not working-EXAMPLE ATTACHED
« Reply #4 on: June 25, 2012, 09:37:30 AM »
Hello Bruce,

Any movement on this issue?  

Thanks,

Don
.
« Last Edit: June 26, 2012, 05:16:32 PM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Copy button not working-EXAMPLE ATTACHED
« Reply #5 on: June 26, 2012, 05:20:33 PM »
?
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Copy button not working-EXAMPLE ATTACHED
« Reply #6 on: June 26, 2012, 11:02:24 PM »
yes, I've been working on it.

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Copy button not working-EXAMPLE ATTACHED
« Reply #7 on: June 27, 2012, 02:10:22 AM »
Awesome.  That's all I needed to know.

Thanks,

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Copy button not working-EXAMPLE ATTACHED
« Reply #8 on: June 27, 2012, 02:30:06 AM »
done for 6.35

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Copy button not working-EXAMPLE ATTACHED
« Reply #9 on: June 27, 2012, 02:34:09 AM »
Thanks so much Bruce!! 

Your support for NT6 has been exceptional! 

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Copy button not working-EXAMPLE ATTACHED
« Reply #10 on: June 28, 2012, 02:55:59 AM »
Yep.  Fixed.  THANK YOU!!!
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11