Shoutbox

Debug.Clear(); - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! General (/forumdisplay.php?fid=23)
+----- Thread: Debug.Clear(); (/showthread.php?tid=79539)

Debug.Clear(); by SuNcO on 12-01-2007 at 11:44 PM

This is not a bug, just a suggestion

Can we have a Clear method on Debug ?

Debug.Clear();


RE: Debug.Clear(); by CookieRevised on 12-02-2007 at 12:11 AM

cool (y)...

PS: you could already do it using some Windows APIs though. But simply Debug.Clear() would be much easier :D

On the same 'debug window' note: I really miss timestamps :p


RE: Debug.Clear(); by vikke on 12-02-2007 at 12:22 AM

And I want to (in the latest beta) be able to clear the contents of the Debug Information inside the script editor. This is only possible by disabling the Debug Information, and enabling it again, really annoying.


RE: Debug.Clear(); by SuNcO on 12-02-2007 at 03:04 AM

Ehmm.. i think you can click on Debug (ComboBox) and click on "Clean debug window" option ^o)

Btw.. im wondering why can't do this..

function OnEvent_ChatWndCreated(ChatWnd) {
  var Contacts = ChatWnd.Contacts;
  for (i = 0; i < Contacts.Count(); i ++) {
    contacto = Contacts[i];
    Debug.Trace(contacto.Email);
  }
}

I think is much easier then Enumerator


RE: Debug.Clear(); by Patchou on 12-02-2007 at 04:56 AM

vikke : will be done. Just press Esc or Backspace in the editor debug window (next beta) to clear it.

I'll see about adding a Clear() API.


RE: RE: Debug.Clear(); by CookieRevised on 12-02-2007 at 05:25 AM

quote:
Originally posted by SuNcO
Ehmm.. i think you can click on Debug (ComboBox) and click on "Clean debug window" option ^o)
Yes you can, for the standalone debug window. Vikke's suggestion is about the debug window in the script editor itself.




------------------------------------------------------------

[OFF TOPIC]

quote:
Originally posted by SuNcO

Btw.. im wondering why can't do this..

function OnEvent_ChatWndCreated(ChatWnd) {
  var Contacts = ChatWnd.Contacts;
  for (i = 0; i < Contacts.Count(); i ++) {
    contacto = Contacts[i ];
    Debug.Trace(contacto.Email);
  }
}

I think is much easier then Enumerator
1) ChatWnd.Contacts isn't an array. It is an enumeration object.
2) Enumerations is equally easy and long as your code to program.
3) Enumerations are much more safer for stuff like that. In fact, your code will not show all contacts if a contact was added during the for...loop. The same problem will happen when you are actually manipulating the items and some item gets deleted from the list. In that case your i value will be bigger than the value of Contacts.Count resulting in an error and failure of the script.
4) In short: avoid using arrays for stuff like this.

[/OFF TOPIC]

RE: Debug.Clear(); by markee on 12-02-2007 at 08:01 AM

quote:
Originally posted by CookieRevised
I really miss timestamps
That would be great! It would also help break up the messages a bit more.  It may also be nice to use a rich edit control rather than just an edit control so that we can use colours to quickly tell the difference between the messages without reading it fully (may also make it easier to get people to look through their logs when they have a problem).
RE: RE: Debug.Clear(); by vikke on 12-02-2007 at 10:02 AM

quote:
Originally posted by Patchou
vikke : will be done. Just press Esc or Backspace in the editor debug window (next beta) to clear it.
Thanks, works great! :)
RE: Debug.Clear(); by CookieRevised on 12-02-2007 at 01:34 PM

quote:
Originally posted by Patchou
vikke : will be done. Just press Esc or Backspace in the editor debug window (next beta) to clear it.
but isn't 'Del' more logical?

(this is also what is used in other programs to clear non-editable textboxes... goes in the same line for when you want to delete a selection. So I think it is more logical than using Esc or Backspace.)

(and maybe also enabling this in the standalone debug window would be cool :D => ps: also by using DEL you wont conflict with the already closing of the window by pressing ESC)...
RE: Debug.Clear(); by Patchou on 12-02-2007 at 04:18 PM

Alright for Del instead of Esc.


RE: Debug.Clear(); by Spunky on 12-02-2007 at 04:21 PM

quote:
Originally posted by markee
It may also be nice to use a rich edit control rather than just an edit control so that we can use colours to quickly tell the difference between the messages without reading it fully (may also make it easier to get people to look through their logs when they have a problem).

I tried to make a little debug window for my own script and I don't think you could tell a rich edit box to actually use colour... It just displayed it. I don't think I was doing anything wrong and it was set to use rich text mode. It would be good if errors and event traces were in different colours as well as the starting/stopping of a script
RE: Debug.Clear(); by Patchou on 12-07-2007 at 03:32 AM

Debug.ClearDebuggingWindow() added in v4.50.


RE: Debug.Clear(); by SuNcO on 12-07-2007 at 04:12 AM

Nice ;)


RE: Debug.Clear(); by Felu on 12-08-2007 at 05:10 PM

quote:
Originally posted by Patchou
Alright for Del instead of Esc.
Del and Esc both work in Build 307, I thought only del was supposed to do that.
quote:
Originally posted by Patchou
Debug.ClearDebuggingWindow() added in v4.50.
Works fine :). Only clears the main debugging window and not the built into the editor.(I think its on purpose, but still wanted to confirm).

Oh btw no action on adding timestamps? It'll make stuff easier.
RE: Debug.Clear(); by markee on 12-09-2007 at 02:02 AM

quote:
Originally posted by Felu
Oh btw no action on adding timestamps? It'll make stuff easier.
You can always do it yourself by adding an extra unction to your script...

* markee makes a note to do that himself
RE: Debug.Clear(); by Felu on 12-09-2007 at 02:17 AM

quote:
Originally posted by markee
quote:
Originally posted by Felu
Oh btw no action on adding timestamps? It'll make stuff easier.
You can always do it yourself by adding an extra unction to your script...

* markee makes a note to do that himself
You can't do that for Event logging, can you :P?
RE: Debug.Clear(); by CookieRevised on 12-09-2007 at 03:42 AM

quote:
Originally posted by Felu
quote:
Originally posted by markee
quote:
Originally posted by Felu
Oh btw no action on adding timestamps? It'll make stuff easier.
You can always do it yourself by adding an extra unction to your script...

* markee makes a note to do that himself
You can't do that for Event logging, can you :P?
nope... and that's exactly why it would be usefull.... to debug scripts which need a long time to run (or if you're away from your computer to constantly stare at the debugging window until something happens)