Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Class definition is not found

$
0
0
Re: Class definition <mysubclassed-wwserver> is not found</mysubclassed-wwserver>
Web Connection
Re: Class definition is not found
12/02/2011
04:22:10 PM
3DH0Z33UH Show this entire thread in new window
From:
To:
Attachments:
None

You should load class libraries in the OnLoad() so the SET PROCEDURE TO stuff gets loaded when running as a COM object. COM never gets to the main PRG.

You should check if something in your OnLoad is blowing up though - server errors during startup often fail silently (or with a Wait Window).

+++ Rick ---


I'm replying to myself but I wanted to mention that I did NOT put the SET PROCEDURE TO "just after DO WConnect", I put it where there are comments for it in the OnLoad portion. However, since that wasn't working, did move it to just after DO WConnect and that seems to have made it start working.

I created a new project using the wizard named BaseApp. I moved all the files out of \wconnect to \baseapp. I added the following to the wconnect_override.h file that's in \baseapp:

#UNDEFINE WWC_SERVER
#DEFINE WWC_SERVER BaseServer

I created a subclass of wwServer named BaseServer that changes SetLogging and LogRequest.
I added SET PROCEDURE TO BaseServer ADDITIVE in the appropriate place just after DO WConnect in BaseAppMain.prg.

I executed the following at the dot prompt:

COMPILE \wconnect\classes\*.prg
COMPILE CLASSLIB \wconnect\classes\*.vcx
COMPILE \baseapp\*.prg

When I run the app from the Project pane it works and handles the hit. When I try to run the EXE, I get "Class definition BASESERVER is not found"

I'm missing something _very_ simple and basic I'm sure but I'm just not seeing what. I thought it might be that the wconnect.h file that's in \wconnect is calling the wconnect_override.h file that's in \wconnect that isn't specific to my app but I tried deleting that wconnect_override.h so I only have the one in \baseapp and I even copied wconnect.h into \baseapp and neither of those did the trick.

What did I miss?





Rick Strahl
West Wind Technologies

Where do you want to surf today?
Reader Version: 5.0

from Maui, Hawaii



Viewing all articles
Browse latest Browse all 10393

Trending Articles