Page 2 of 4

PostPosted: Tue Aug 26, 2008 3:39 pm
by Silvio
Function FeedPuching( cURL )
local oHyperlink
oHyperlink :=CreateObject( "Microsoft.XmlHttp" )
oHyperlink:Open( "GET", cURL, .F. )
oHyperlink:Send( "" )
cResponseText := oHyperlink:ResponseText
oHyperlink:end()
return cResponseText

it is write ?

it make error
Application
===========
Path and name: C:\work\errori\feedrss\feedrss.Exe (32 bits)
Size: 1,414,144 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 08/26/08, 17:38:34
Error description: Error Microsoft.XmlHttp/16389 E_FAIL: END
Args:

Stack Calls
===========
Called from: win32ole.prg => TOLEAUTO:END(0)
Called from: feedrss.prg => FEEDPUCHING(210)
Called from: feedrss.prg => (b)FEEDLOADERARRAY(120)
Called from: MSGRUN.PRG => (b)MSGRUN(0)
Called from: DIALOG.PRG => (b)TDIALOG:TDIALOG(0)
Called from: => TDIALOG:DISPLAY(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: MSGRUN.PRG => MSGRUN(0)
Called from: feedrss.prg => FEEDLOADERARRAY(120)
Called from: feedrss.prg => FEEDREADER(33)






Why not re - pubblish the good source code here thanks

PostPosted: Tue Aug 26, 2008 3:54 pm
by James Bott
Remove this line:

oHyperlink:end()

Regards,
James

PostPosted: Tue Aug 26, 2008 5:00 pm
by Silvio
ok now run

BUT

I I try with my XML page
and I write

iif( !file("feeds.arr") , ;
EK_SAVEARR( { "http://www.teramoest.it/dblog/feedrss.asp", ;
"http://rss.terra.com.br/0,,EI4795,00.xml" }, "feeds.arr" ), "" )

and it make this error
Application
===========
Path and name: C:\work\errori\feedrss\feedrss.Exe (32 bits)
Size: 1,450,496 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 08/26/08, 18:57:34
Error description: Error BASE/1004 Class: 'NIL' has no exported method: TEXT
Args:
[ 1] = U

Stack Calls
===========
Called from: => TEXT(0)
Called from: feedrss.prg => FEEDLOADERARRAY(136)
Called from: feedrss.prg => FEEDREADER(34)




please my url is right
http://www.teramoest.it/dblog/feedrss.asp

PostPosted: Tue Aug 26, 2008 6:09 pm
by Rochinha
Silvio,

Download and install MS SOAP Toolkit.

hERE

PostPosted: Tue Aug 26, 2008 11:01 pm
by Silvio
why ?

PostPosted: Tue Aug 26, 2008 11:47 pm
by James Bott
Because the SOAP toolkit code must be on the computer that is running the code he posted. This is similar to MAPI being required to use code that accesses MAPI mail client software. MAPI comes installed by default with Windows. SOAP isn't installed by default, so you must install it.

James

PostPosted: Wed Aug 27, 2008 9:42 am
by Silvio
ok I download it

I installed this soapsdk

I restart my computer and run the rdd lector

NOT RUN OK
same error!

PostPosted: Wed Aug 27, 2008 10:23 am
by Andrés González
To Enrico:

Code: Select all  Expand view
OLE class has automatic destructor.


That's not true take a look of this message:

Image

That means automatic destroyer no longer exist. You must destroy the object in a class like this:
Code: Select all  Expand view
::object:=nil

I'm talking about TOLEAUTO from xHarbour.

PostPosted: Wed Aug 27, 2008 11:26 am
by Andrés González
Rochiha, the program run ok and look marvellous, but why i have to comment this lines to run de program, where are they defined. See "*"

Code: Select all  Expand view
    oFRLbx:nStyle        := 1
     oFRLbx:nLineStyle    := 10
     *oFRLbx:nHeaderStyle  := 2
     *oFRLbx:nHeaderHeight := 20
     *oFRLbx:nLineHeight   := 15
     oFRLbx:lMChange      := .f.
     *oFRLbx:lOnlyBorder   := .f.
     *oFRLbx:lAdjLastCol   := .f.
     *oFRLbx:Set3DStyle()
     // -> Cabecalho
     oFRLbx:nClrBackHead  := nRGB(194,218,242)
     // -> Linha divisora
     *oFRLbx:nClrLine      := nRGB(194,218,242)
     // -> Cores das linhas Texto e Fundo
     // -> Cor do cursor com foco
     oFRLbx:nClrForeFocus := CLR_BLACK
     oFRLbx:nClrBackFocus := nRGB(194,218,242)
     // -> Cor do cursor sem foco
     *oFRLbx:nClrNFFore    := CLR_BLACK
     *oFRLbx:nClrNFBack    := nRGB(194,218,242)
     oFRLbx:SetFont( oFntLBX )

PostPosted: Wed Aug 27, 2008 11:27 am
by Enrico Maria Giordano
That message warns for a problem in your code. OLE class *has* automatic destructor.

EMG

PostPosted: Wed Aug 27, 2008 11:37 am
by Andrés González
Yes Enrico the program warm me that I have to destroy the objects created with tOleAuto. Means that all the destroyed objects in tOleAuto are no automatic. I try with openoffice and if I create and object openoffice i must end the object like Antonio say " object:=nil ", because if you don't do so and you only creates the object without destroy it at the wnd:end(), the program warm you like I tell you before.
Code: Select all  Expand view
METHOD Writer( cFile, lVisible ) CLASS TOpenOffice

   LOCAL cUrl, oDoc, oTxt, aArg := {}
   ::New()
   IF !::lOpen; RETURN NIL; ENDIF
   DEFAULT lVisible := .T.
   IF cFile == NIL
      cUrl  := "private:factory/swriter"
   ELSE
      cUrl  := "file:///" + cFile
   ENDIF
 
   IF !lVisible
      AAdd( aArg, ::GetPropertyValue( "Hidden", .T. ) )   //Le asigna la propiedad de que este escondido
                                                          //(Ojo no puedes  volverlo a mostrar) para
                                                          //ejecutarse mas rapido. Ejemplo: realizar un
   ENDIF

   oDoc := ::oDesktop:LoadComponentFromUrl( cUrl, "_blank", 0, aArg )   
   
   RETURN oDoc

METHOD New() CLASS TOpenOffice
   // Par usar cualquier aplicativo de OpenOffice lo primero que se tiene que hacer es cargar el ServiceManager
   // una vez se tiene capturado se debe instanciar el objeto Destop y finlamente el Despachador

   IF ::oDesktop != NIL; RETURN SELF; ENDIF
   IF ::oService != NIL; RETURN SELF; ENDIF

   ::lOpen := .T.
   TRY
      ::oService := TOleAuto():New( "com.sun.star.ServiceManager" )
   CATCH
      MsgStop( "No se puede iniciar el servicio manager" )
      ::lOpen := .F.
   END
   
   IF ::lOpen
      ::oDesktop := ::oService:CreateInstance( "com.sun.star.frame.Desktop" )
      ::oDisp    := ::oService:CreateInstance( "com.sun.star.frame.DispatchHelper" )
   ENDIF
   RETURN  SELF


I have to destroy de objects like this:


Code: Select all  Expand view
METHOD Finaliza() CLASS TOpenOffice
    ::oDesktop:=nil
      ::oDoc:=nil
      ::oDisp:=nil
      ::oService:=nil
Return nil


If I don't do so the progam crash at the end when you try to exit with oWnd:End(), and show you the advise showed before.

PostPosted: Wed Aug 27, 2008 11:52 am
by nageswaragunupudi
>
hat's not true take a look of this message:
>

There was this problem for a short while in xharbour. This problem does not exist anymore now, with latest CVS or the xhabour provided with FWH now. I too had this problem more than a month back. Its no more there.

Mr Enrico is correct. XHarbour automatically destroys the Ole objects when all references to that object go out of scope.

PostPosted: Wed Aug 27, 2008 12:03 pm
by Andrés González
Ok my version is from July, must be that problem, but I thought that was a xHarbour problem in tOleAuto class not from FWH. Sorry Enrico was my fault I'll try to upgrade xHarbour.

PostPosted: Wed Aug 27, 2008 12:29 pm
by Andrés González
Still the same problem, upgraded to 23/08/08 xharbour and the same problem if I don't destroy de objects with ::Object:=nil, the program advise me:

Destructors disabled! Destructor of class "TOLEAUTO' can't be executed.

PostPosted: Wed Aug 27, 2008 12:32 pm
by nageswaragunupudi
We dont even have to set the object := nil.

We can keep creating objects, use them and forget them. Thats all and we dont need to do anything more. xHarbour ( and I am sure Harbour too ) does a great job cleaning up the mess we create.

My large production applications run on Oracle and hundreds of objects keep getting created. The program works fine.

I can not answer why are you still having the problem. I am now using the xharbour provided by fivewin and I am not having any problem. Please recheck whether you upgraded everything properly or not.