NetTalk Central

Author Topic: Anyone hvaing issues using CHT classes within NetTalk Web Procs?  (Read 5311 times)

random69

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
I've been trying to instantiate a CHT (Handy Tools) class - either HndDisk or HndDiskEx - both static at compile AND dynamic. Anytime the program reaches the point of instantiation, it GPFs - the constructor for that class does NOT even get a chance to run.

I've even tried putting the class into a different proc called from the Web Proc. No such luck.

I can put it on the Web Server Window Proc - no problems there. No problems in non-web applications too.

Specifically, the NetWebForm procedure. Also checked it out in a NetWebSource procedure.

Has anyone had any similar issues? Or what makes the Web Form/Source Procedures different from any other procedure? What's the call chain when calling these?

I'd HATE to duplicate/implement the needed utilities from the CHT. So any help or even a direction to try would be great.

TIA.

Alan Telford

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Anyone hvaing issues using CHT classes within NetTalk Web Procs?
« Reply #1 on: January 06, 2008, 12:01:12 PM »
I've got no issues using CHT classes in my app.
I suggest you take one of the example web apps and add CHT to this, just to check it works ok.
Then (assuming it works) find out what's different in your app.

Alan

random69

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Anyone hvaing issues using CHT classes within NetTalk Web Procs?
« Reply #2 on: January 07, 2008, 09:49:05 AM »
Alan,

Please let me know how you are doing it and how you are adding the classes to the websource/webform procedures.

I just tried with the BasicBrowseAndForm example and have the same problem.

For the example... CHT control panel was added. EmbedDiskFunctions added to the MailboxWebForm procedure. Since this does not generate code - I add the declaration locally to the procedure. And then it gpfs when that form is brought up.

However, simply adding a global variable of the HndDisk class (never even using it) will stop it from GPF'ing and all is well.

C6 9056

Thanks!


Alan Telford

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Anyone hvaing issues using CHT classes within NetTalk Web Procs?
« Reply #3 on: January 07, 2008, 12:39:53 PM »
I use a small utility template of mine described in my *old* http://www.clarionmag.com/cmag/v2/v2n8busobjects.html clarion mag article.
You don't need to use the template.
    1. switch to module view, and add the line
INCLUDE('hndutil.inc'),ONCE
    2. select your procedure (eg MailboxesFormControl) and in the local data embed put
HUtil                HNDUtil

Compile and you're away.

To test I added a field on the general tab.
use equate = hutil_test
Type = display
text = 'Path='&hutil.slashpath( path())

Cheers,
Alan

random69

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Anyone hvaing issues using CHT classes within NetTalk Web Procs?
« Reply #4 on: January 07, 2008, 02:51:38 PM »
Well, it looks like I was "schooled" today. :)

I was including the hnddisk.inc in the LOCAL data area for the procedure, not at the module.

In fact, I had no idea that you could do that from the Module tab.

Great big thanks....I owe you a beer.

Cheers!

Dave