标签归档:列表

CSS Sprites样式生成工具

推荐一个CSS Sprites样式生成工具
作者主页:http://www.cssforest.org/blog/index.php?id=129

这是一个基于Adobe AIR的工具,需要下载AIR运行时

使用效果图:
css_sprite

操作说明:
载入图片后,双击新增一个区域,设置每个区域的类名等属性,最后可以导出css列表
更多说明可以参考主页内容

TIdFTP的DirectoryListing使用问题

IdFTP1.List;
ShowMessage(IntToStr(IdFTP1.ListResult.Count));
ShowMessage(IntToStr(IdFTP1.DirectoryListing.Count));

前者是正确的数值,后者是0。
看了一下网上的代码都是List完了就直接用,DirectoryListing会自动解析ListResult

放狗搜了半天,终于找到原因,原来是Indy10的一个设计上的变化,以下引用官网内容:

TIdFTP.DirectoryListing is returning nothing for my FTP server. Why?

We restructured the way FTP directory listing is done. The code is now a plug in system with various parsers in their own units which register themselves into a framework. To add support for a particular type of FTP server, you simply add the parser unit to one of your program unit’s uses clause.

To add the Unix directory list parser, add IdFTPListParseUnix to your unit’s clause. To add support for Microsoft Windows NT IIS FTP server, add IdFTPListParseWindowsNT to your uses clause. You can also add many other parsers we include in the Indy packages. By convention, they are named IdFTPListParser followed by the server type. You do not need to add IdFTPListParseBase to your uses clause because IdFTP uses that unit. If you wish to use all of Indy’s FTP List parser classes, just add the IdAllFTPListParsers unit to your uses clause.

We admit this new design is not as intuitive as the older one but this has many advantages for us such as:

• The FTP list parsing code is now much easier to maintain than the same code in a non-modular design in one unit which would be at least 150KB total.

• You now can add support for only the FTP servers you want your program support to support.

• You can now write your own custom parser classes and plug those into the standard FTP parsing list framework.

搜了一下IdFTPListParse有关的unit,有一大坨,要写个比较通用的FTP Client估计都得引进去吧……
idftplistparse.JPG