- Details
- Written by: Stanko Milosev
- Category: Delphi
- Hits: 4629
If CreateProcess doesn't work:
if CreateProcess ... then ... else //it doesn't work strLog := SysErrorMessage(GetLastError ); //information why it doesn't work
- Details
- Written by: Stanko Milosev
- Category: Delphi
- Hits: 4996
To create RSS XML file, with OmniXML, you can use following code:
uses rrRss, OmniXML, SysUtils, Windows, OmniXMLProperties;
...
var
rss: TRSS;
...
rss := TRSS.Create;
rss.XMLDoc.PreserveWhiteSpace := False; //for XML to be "human readable"
rss.Version := '2.0'; //RSS version
//adding channel
rss.Add;
rss.Channel[0].Title := 'channel name';
rss.Channel[0].Link := 'link';
rss.Channel[0].Description := 'description';
...
//adding RSS feed
rss.Channel[0].Items.Add;
//it depends of RSS reader will consider this property
rss.Channel[0].Items[0].Guid.Value := 'guid';
rss.Channel[0].Items[0].Title := 'title';
//link where will be full article
rss.Channel[0].Items[0].Link := 'http://www.rsslink.com';
//content of RSS which will be shown in RSS reader
rss.Channel[0].Items[0].Description := 'description';
rss.Channel[0].Items[0].Category := 'test';
//date of publish
rss.Channel[0].Items[0].PubDate := 'ned, 05 jul 2009 17:00:23 +0200';
//because of FireFox, without this in FF don't want to work
rss.Channel[0].Items[intItemCount].Enclosure.Url := 'http://www.milosev.com';
//ofIndent also needed for XML to be "human readable"
if not rss.SaveToFile(strFileName, ofIndent) then
raise Exception.Create(rss.LastError);
RSS specification can be found here. pubDate must follow RFC822 specification.
Code taken from OmniXML\demo\properties.
If you need in RSS description to put line break, or something similiar, try CDATA, for example:
<description><![CDATA[ <p>There once was a man from nantucket<br> Who kept all his fish in a bucket</p> ]]></description>
If link is same in RSS then it is possible that some RSS readers will show RSS feed as read (not unread), because, idea of RSS is to get small part of log (news) you need, and then to go on a link to see all news.
Taken from here.
- Details
- Written by: Stanko Milosev
- Category: Delphi
- Hits: 4345
I will not explain how to create component templates, since all is already described here.
You will need file, in WinXP:
%userprofile%\Application Data\Borland\BDS\5.0\bds.dct
To modify existing template, you do same thing, except when you click on create template, you give it same name.
- Details
- Written by: Stanko Milosev
- Category: Delphi
- Hits: 4197
Yesterday, while I was reinstalling a components, my Delphi 2007 suddennly looked like Delphi 7, with undocked IDE, I don't know what happened, but I was able to change like it is described here, I just clicked Embedded designer check box, restarted Delphi, then again, clickedĂ Embedded designer check box and restarted Delphi, now everything is back to normal.
Update: today this happened again. Since upper link is not working anymore I will write here (for D2009):
Tools->Options->VCL Designer -> Embedded designer