NetTalk Central

Author Topic: WebHandler - ShowInfo - Before Parrent Call - no effect  (Read 4678 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
WebHandler - ShowInfo - Before Parrent Call - no effect
« on: March 05, 2019, 04:43:31 AM »
Hi Bruce

I'm pretty sure there's something here very basic I don't understand.

My goal is quite simple. I just want to set a default div and default time for a ShowMessage. But the code is not executed at all.
What is it that I overlook here ???
Works fine with all the other methods.

p_web.showInfo PROCEDURE(String pInfo,Long pTimer=0,<String pDiv>)

! Start of "NetTalk Method Data Section"
! [Priority 5000]

! End of "NetTalk Method Data Section"

  CODE
  ! Start of "NetTalk Method Executable Code Section"
  ! [Priority 2500]
        ! My code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        pTimer = 500
        pDiv   = 'infodiv'
        !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  ! Parent Call
  PARENT.showInfo(pInfo,pTimer,pDiv)
  ! [Priority 7500]
 
  ! End of "NetTalk Method Executable Code Section"
! Start of "NetTalk Method Routine Section"
! [Priority 5000]

! End of "NetTalk Method Routine Section"


Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: WebHandler - ShowInfo - Before Parrent Call - no effect
« Reply #1 on: March 05, 2019, 04:53:21 AM »
You can't alter string parameters or omittable parameters.
You rather want something like this;

  PARENT.showInfo(pInfo,500,'infodiv')
  return

then the generated parent call;
  ! Parent Call
  PARENT.showInfo(pInfo,pTimer,pDiv)
  ! [Priority 7500]

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: WebHandler - ShowInfo - Before Parrent Call - no effect
« Reply #2 on: March 05, 2019, 06:06:35 AM »
Thanks, but it doesn't work. The code is simply not executed.
Could it be because the method is not virtual?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: WebHandler - ShowInfo - Before Parrent Call - no effect
« Reply #3 on: March 05, 2019, 10:43:52 PM »
>> Could it be because the method is not virtual?

yes! well spotted. I've added ,Virtual to the method for 11.08.
All methods should be ,Virtual, if you spot any that are not please report that as a bug.

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: WebHandler - ShowInfo - Before Parrent Call - no effect
« Reply #4 on: March 05, 2019, 10:52:01 PM »
YES!! I found a bug. For once it wasn't me who had made a mistake ;-)

Thanks Bruce!