Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Thank you for the best reply I've ever had to a forum question - it's extremely comprehensive and legible and answers my query thoroughly..."

Geography

Where in the world do Tek-Tips members come from?
oakgrove (Programmer)
24 May 05 23:47
I have found that I can't deploy code in a com object that trys to use the _reportlistener.vcx. For example:

The following code produces the report using the vfp classes on my development machine but does not when deployed to a test machine. Instead lolistener = .f.

CODE

    define class getstream as custom OlePublic
    . . .
    lctheoutput=""
    loListener = .null.
    Set Classlib To _reportlistener.vcx Additive
    loListener = Createobject("htmllistener")
    IF TYPE("lolistener") <> "O" then
         CLOSE TABLES all
         RETURN "Createobject('htmllistener') does not create an Object"
    ELSE   
    Report Form regionbudget.frx Object loListener
    lctheoutput=Filetostr(loListener.targetfilename)
    return lctheoutput
    . . .
    enddefine
 

The project includes classes: _htmllistener.vcx and _fixcursor.vcx

I Shield redistributables include: Gdiplus.dll, msvcf71.dll, MSVFP 9 Report Apps,  MSVFP 9 Runtime Libs and MSXML4.0 twice.

Any help would be greatly appreciated. I am greatly stuck.
 

Oakgrove Computer Grouper
Lansing, MI

VolkerStamme (Programmer)
25 May 05 6:23
oakgrove,

You could include something like

CODE

LOCAL lcError
lcError = "no error"
ON ERROR lcError = trans( Error()) + "-" + Message() + "-";
  + trans( lineno())
and return this string together with your other return string, might help you to narrow down. Also, there's quite a bit of conditional code in these classes, depending on _VFP.Startmode. And finally, the startup directory of your server is not the app dir, its Windows/System32. In case some class is looking for some files...
Hope that helps.

Volker/
oakgrove (Programmer)
25 May 05 7:28
Thanks for the reply.
1.Actually I do have the error check in the code. It tells me that "lolistener is not an object" when the "Repo Form ..." line trys to execute.
2.The location of files in directories may well be part of the problem. I would have thought that I Shield would put them in the correct place. Otherwise .
3.I am not familier with the effect of _VFP.Startmode and how it might effect execution. Can you expand on this?

Oakgrove Computer Grouper
Lansing, MI

VolkerStamme (Programmer)
25 May 05 7:43
as for 1.:
This is the code in the htmllistener.init():

CODE

IF DODEFAULT()
   THIS.AppName = OUTPUTHTML_APPNAME_LOC
ELSE
   RETURN .F.   
ENDIF
Sorry, I haven't followed it up through the complete inheritance hierarchy. But since no object is beeing created the "return .F." part ran, in other words some init() in one of the parent classes of the htmllistener failed. I'm afraid you'll have to trace...

As for 2.:
That would only have an effect if any code refers to files in some AppDir-relative path, something like "use dbf\tablex".

And 3.:
_VFP.Startmode (or Application.Startmode) is a value between 0 and 5 telling you how your app was started, i.e. 0 = you're in the development environment, 2 = Out of process server etc. Have a look at the help file, the page is called "StartMode Property". In the classes you use this property is used to determine whether output (e.g. Messagebox()) is allowed - which it isn't when the app runs as a COM server.

Personally I would go with ( 1. ) first and find the class that refuses to instantiate. That will most likely tell you where/what the problem is. Good luck.

Volker/

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close