<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>程序如此灵动！ &#187; bug</title>
	<atom:link href="http://newsn.net/tag/bug/feed" rel="self" type="application/rss+xml" />
	<link>http://newsn.net</link>
	<description>苏南的网络日记本本  O(∩_∩)O  哈哈~</description>
	<lastBuildDate>Mon, 13 Jul 2009 02:59:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>andlinux2中用cake bake 命令生成的文件用Eclipse（win版）保存出错</title>
		<link>http://newsn.net/20090626/685.html</link>
		<comments>http://newsn.net/20090626/685.html#comments</comments>
		<pubDate>Fri, 26 Jun 2009 01:53:22 +0000</pubDate>
		<dc:creator>苏南</dc:creator>
				<category><![CDATA[IT.IT]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[easyeclipse]]></category>

		<guid isPermaLink="false">http://newsn.net/20090626/685.html</guid>
		<description><![CDATA[不知道系统出了什么问题，andlinux2下用cake bake生成的文件用windows下的easyeclipse不能编辑保存了，提示“save could not be completed”，很是郁闷。以下是改问题的相关解决过程：
 
一、文件截图      &#160; &#160; 用其他软件编辑都能保存，就是 eclipse （win）不能保存…，真是郁闷。     二、问题解决      发现居然是文件属性的问题，在cmd下面执行attrib命令，结果如下：          这些不能编辑的文件都有个 &#34;system&#34; 属性，当去掉这个属性的时候，Eclipse就能顺利编辑保存了。     &#160; 这个问题出的很奇怪，但是目前也只能这样。     三、使用linux下面的Eclipse    不过还好，用linux下面的Eclipse没有这个问题，我已经改用linux下的Eclipse了，在andlinux下面的启动菜单里面加了个Eclipse的快捷方式，很简单，就能启动了。不用到console下面去敲命令行。哈哈 [...]]]></description>
		<wfw:commentRss>http://newsn.net/20090626/685.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cakephp的debugkit在ie下的再次修正</title>
		<link>http://newsn.net/20090623/616.html</link>
		<comments>http://newsn.net/20090623/616.html#comments</comments>
		<pubDate>Tue, 23 Jun 2009 03:39:15 +0000</pubDate>
		<dc:creator>苏南</dc:creator>
				<category><![CDATA[IT.IT]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[debugkit]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://newsn.net/20090623/616.html</guid>
		<description><![CDATA[Cakephp的debugkit在ie下面已经修正一次，可以正常显示toolbar，今天用了一下，发现还是有点问题，不能点击开具体页面中的小箭头显示详细内容，就再次修正增加了个event的target属性，具体如下：
 
一、写在前面      在msdn上面看到了这篇文章，应该是对ie下面的prototype进行修正的比较权威的文章。网上的文章都是在讲如何让ff支持ie的属性的，这里反其道而行，讲ie如何支持ff的属性。     http://msdn.microsoft.com/en-us/library/dd229916(VS.85).aspx
二、本次更新主要修改的问题     &#160; 这里的小箭头不能点开。    
三、增加后的代码     plugins\debug_kit\vendors\js\js_debug_toolbar.js
if (document.all){
	Event.prototype.preventDefault = function () {
	  this.returnValue = false;
	};
	Object.defineProperty(Event.prototype, 'target', {
	  get: function() {
	    return this.srcElement;
	  }
	});
}
这里面已经包含了上次对debugkit的更新修正。使用方法一样，放到这个js文件的开头就行了。
  这段JS的功用是： 
当前浏览器是IE(document.all)的时候,使得event这个类先增加一个方法叫做preventDefault，然后增加一个属性值叫做target。因为这2个东东都是ff特有的，ie不认识，而这个debugkit又是针对ff所写的，所以有此hook。
]]></description>
		<wfw:commentRss>http://newsn.net/20090623/616.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>在IE下面使用Cakephp的debug kit插件</title>
		<link>http://newsn.net/20090605/537.html</link>
		<comments>http://newsn.net/20090605/537.html#comments</comments>
		<pubDate>Fri, 05 Jun 2009 10:02:50 +0000</pubDate>
		<dc:creator>苏南</dc:creator>
				<category><![CDATA[IT.IT]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[debugkit]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://newsn.net/20090605/537.html</guid>
		<description><![CDATA[Cakephp下面有个debugkit插件，是用来显示相关调试信息的。而且据说得到了Cakephp的作者之一的mark story的大力推荐，但是这个东东在ie下面却是不能使用的。本文说明如何在ie下面使用这个东东。

 

一、使用debugkit     官方网站是：http://thechaw.com/debug_kit/versions     写本文时，这个插件的最新版本是1.1。它的安装和使用很简单，     官方的readme是：
Installation
------------
 * Copy the files in this directory into app/plugins/debug_kit
 * Include the toolbar component in your app_controller.php:
	var $components = array('DebugKit.Toolbar');
 * Set debug mode to at least 1.
下载的脚本放置到app目录下的plugins目录就行了，然后在AppController里面用components来引入就行了。具体见图：

然后就会在你的app界面上出现如下toolbar。

点击对应的东东就可以显示相关的信息了。
关于debug的级别是在config/core.php 中用Configure::write(&#8217;debug&#8217;, 2);来控制的，注意修改就行啦。
但是这个toolbar有个致命的问题，就是在ie下面不能正常使用。
二、针对ie的修改
经过查看报错信息，发现原来是ie下不能识别event.preventDefault();的缘故。为了兼容IE，特地修改了ie下的event的prototype，让他支持event.preventDefault()方法。如下：
Event.prototype.preventDefault = function () {
  this.returnValue = [...]]]></description>
		<wfw:commentRss>http://newsn.net/20090605/537.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>firefox下javascript的getyear函数出错的解决方案</title>
		<link>http://newsn.net/20090515/423.html</link>
		<comments>http://newsn.net/20090515/423.html#comments</comments>
		<pubDate>Fri, 15 May 2009 13:27:08 +0000</pubDate>
		<dc:creator>苏南</dc:creator>
				<category><![CDATA[IT.IT]]></category>
		<category><![CDATA[代码修改]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://newsn.net/20090515/423.html</guid>
		<description><![CDATA[一、问题描述     &#160;&#160;&#160;&#160;&#160; 最近需要在个项目里面写个函数获取当前时间。没有想到，获取当前年份的函数在firefox下面出错，难道是ie和ff下的js解释引擎不一样导致的？找个问题还是头一次碰到。主要是getyear返回值不一致造成的。在ie下getyear得到的是2009，而ff下面得到的是109。

 

二、代码片段             其实也是很简单的东东，基本代码如下：     var now= new Date();     var year=now.getFullYear();     //firefox cant use getyear     var month=now.getMonth()+1;     var day=now.getDate(); [...]]]></description>
		<wfw:commentRss>http://newsn.net/20090515/423.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>第一次写blog,竟然想写点这样的事情..呵呵</title>
		<link>http://newsn.net/20070303/325.html</link>
		<comments>http://newsn.net/20070303/325.html#comments</comments>
		<pubDate>Sat, 03 Mar 2007 08:24:13 +0000</pubDate>
		<dc:creator>苏南</dc:creator>
				<category><![CDATA[IT.IT]]></category>
		<category><![CDATA[IT评论]]></category>
		<category><![CDATA[点滴生活]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://newsn.net/archives/668</guid>
		<description><![CDATA[又是session的问题，   昨天看了观里的系统，发现了一个session的问题，    这个问题ｎ年前在学校的站点上面发现过一回，    顺便做了点小的&#34;改善&#34;，哈〔低调低调。。。〕    ps:等漏洞修补了，我再说说是什么问题，呵呵。    ====    当告知chuckliu漏洞后，居然意外被邀请参加下周六的网站七周年聚会，    哈，不错的主意，估计顺便可以看看许多未曾谋面的网友了，    估计有：the naked ape,北京偏北,marry,杨叶青and so on..    哈哈，顺便还能回学校看看老师，非常不错的主意。
]]></description>
		<wfw:commentRss>http://newsn.net/20070303/325.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
