Simple RSS reader for your applications...

Postby Silvio » Tue Aug 26, 2008 3:39 pm

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
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby James Bott » Tue Aug 26, 2008 3:54 pm

Remove this line:

oHyperlink:end()

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Silvio » Tue Aug 26, 2008 5:00 pm

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
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Rochinha » Tue Aug 26, 2008 6:09 pm

Silvio,

Download and install MS SOAP Toolkit.

hERE
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Silvio » Tue Aug 26, 2008 11:01 pm

why ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby James Bott » Tue Aug 26, 2008 11:47 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Silvio » Wed Aug 27, 2008 9:42 am

ok I download it

I installed this soapsdk

I restart my computer and run the rdd lector

NOT RUN OK
same error!
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Andrés González » Wed Aug 27, 2008 10:23 am

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.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Postby Andrés González » Wed Aug 27, 2008 11:26 am

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 )
Last edited by Andrés González on Wed Aug 27, 2008 11:27 am, edited 1 time in total.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Postby Enrico Maria Giordano » Wed Aug 27, 2008 11:27 am

That message warns for a problem in your code. OLE class *has* automatic destructor.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Andrés González » Wed Aug 27, 2008 11:37 am

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.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Postby nageswaragunupudi » Wed Aug 27, 2008 11:52 am

>
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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Andrés González » Wed Aug 27, 2008 12:03 pm

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.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Postby Andrés González » Wed Aug 27, 2008 12:29 pm

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.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Postby nageswaragunupudi » Wed Aug 27, 2008 12:32 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests