NetTalk Central

Author Topic: Adding new NetWebServerWorker method  (Read 2247 times)

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Adding new NetWebServerWorker method
« on: November 28, 2008, 03:32:14 PM »
I added a new NetWebServerWorker method via the template interface but it is not recognised in the procedure that calls it.  I can see in the code that the new method (_SetViewSQL) is added to the p_web class and I am making the call like this: p_web._SetViewSQL(... but I get an unknown procedure error.  What am I missing?

Thanks,

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: Adding new NetWebServerWorker method
« Reply #1 on: November 28, 2008, 09:51:08 PM »
Hi John,

The parameter being passed into the browse or form or whatever, p_web, is prototyped as an object besed on NetWebServerWorker. So the compiler doesn't know about your extension - because you didn't pass the "derived class".

To do what you want you would need to create a new, derived, NetWebServerWorker in a clw and inc file, and then use that as the base class in the WebHandler, and also use that in the parameter list of the browses etc.

Or perhaps you can describe a bit more about _when_ you're planning to call this method. for example, it sounds like maybe it's just before, or just after the regular call to .SetView, in which case you could add the call, in the WebHandler, in the Setview call that is there.

Cheers
Bruce


jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Adding new NetWebServerWorker method
« Reply #2 on: November 29, 2008, 05:53:18 AM »
Hi Bruce,

Thanks!  I'll create a new derived NetWebServerWorker class. 

John