#176 Debugging of objects

Version 2.x
closed-fixed
Editor (144)
5
2005-12-23
2005-11-12
No

Currently in order to check the status of any object I
had to rely on alert() and it was a bitch. Fortunately
at last I've found the existence of FCKDebug and it
surely will help me a lot.

I think that adding this function will surely help
other people to check the properties of any object at
any time:

if ( FCKConfig.Debug )
{
FCKDebug.OutputObject = function( anyObject, color )
{
if ( ! FCKConfig.Debug ) return ;

var message, s;
if ( anyObject != null ) {

message = 'Properties of: ' + anyObject + "</b><br
/>\n";
for (var prop in anyObject)
{
s=anyObject[prop] + "";
message += "<b>" + prop + "</b> = " +
s.replace(/</g, "&lt;") + "<br />";
}

message += "<b>";
} else {
message = 'NULL'
}

if ( !this.DebugWindow || this.DebugWindow.closed )
this.DebugWindow = window.open( 'fckdebug.html',
'FCKeditorDebug',
'menubar=no,scrollbars=no,resizable=yes,location=no,toolbar=no,width=600,height=500',
true ) ;

if ( this.DebugWindow.Output)
this.DebugWindow.Output( message, color ) ;
}
}
else
FCKDebug.OutputObject = function() {}

yeah, I'm a bad boy and I use code injection to close
the <b> tag added in fckdebug.html->CheckMessages()

Discussion

  • Frederico Caldeira Knabben

    • assigned_to: nobody --> fredck
    • status: open --> open-fixed
     
  • Frederico Caldeira Knabben

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks