Simple RSS reader for your applications...
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
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
Falconi Silvio
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
Falconi Silvio
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- Andrés González
- Posts: 625
- Joined: Thu Jan 19, 2006 10:45 am
- Location: Mallorca
To Enrico:
That's not true take a look of this message:
That means automatic destroyer no longer exist. You must destroy the object in a class like this:
I'm talking about TOLEAUTO from xHarbour.
Code: Select all
OLE class has automatic destructor.
That means automatic destroyer no longer exist. You must destroy the object in a class like this:
Code: Select all
::object:=nil
Saludos
Andrés González desde Mallorca
Andrés González desde Mallorca
- Andrés González
- Posts: 625
- Joined: Thu Jan 19, 2006 10:45 am
- Location: Mallorca
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
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
Andrés González desde Mallorca
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Andrés González
- Posts: 625
- Joined: Thu Jan 19, 2006 10:45 am
- Location: Mallorca
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.
I have to destroy de objects like this:
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.
Code: Select all
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
Code: Select all
METHOD Finaliza() CLASS TOpenOffice
::oDesktop:=nil
::oDoc:=nil
::oDisp:=nil
::oService:=nil
Return nil
Saludos
Andrés González desde Mallorca
Andrés González desde Mallorca
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
>
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.
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
G. N. Rao.
Hyderabad, India
- Andrés González
- Posts: 625
- Joined: Thu Jan 19, 2006 10:45 am
- Location: Mallorca
- Andrés González
- Posts: 625
- Joined: Thu Jan 19, 2006 10:45 am
- Location: Mallorca
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
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.
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
G. N. Rao.
Hyderabad, India