[ 8 posts ]

Dmitri Snytkine

  • Username: lampcms.com
  • Joined: Thu Aug 27, 2009 6:04 am
  • Posts: 94
  • Location: Poconos, PA
  • Twitter: snytkine
  • GitHub: snytkine
  • Gists: snytkine
  • Offline
  • Profile
Tags:

What does the YUI~dump mean?

Post Posted: Sun Mar 27, 2011 1:18 pm
+0-
What is the meaning of this type wave thing in documentation:
http://developer.yahoo.com/yui/3/api/YUI~dump.html

What does it mean: Class YUI~dump
What's the deal with ~
This is the first time I see this in any documentation.

Also, the real question is how to use the dump in logging?
Suppose I want to get contents of the object
Should I use Y.log(Y.dump(o)) <- This does not work by the way, says "Object [object Object] has no method 'dump'"

So how do I use dump?
Thanks.

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile
Tags:

Re: What does the YUI~dump mean?

Post Posted: Sun Mar 27, 2011 2:59 pm
+0-
You just need to use the "dump" module.

Code:
YUI().use('dump', function (Y) {
    var o = {
        hello: 'world'
    };
    Y.log(Y.dump(o));
});

Dmitri Snytkine

  • Username: lampcms.com
  • Joined: Thu Aug 27, 2009 6:04 am
  • Posts: 94
  • Location: Poconos, PA
  • Twitter: snytkine
  • GitHub: snytkine
  • Gists: snytkine
  • Offline
  • Profile

Re: What does the YUI~dump mean?

Post Posted: Sun Mar 27, 2011 3:18 pm
+0-
Thank you. I liked it better in YUI2 when it was something like Y.Lang.dump()

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile
Tags:

Re: What does the YUI~dump mean?

Post Posted: Sun Mar 27, 2011 3:23 pm
+0-
Actually, it's still there. Y.Lang.dump === Y.dump.

Dmitri Snytkine

  • Username: lampcms.com
  • Joined: Thu Aug 27, 2009 6:04 am
  • Posts: 94
  • Location: Poconos, PA
  • Twitter: snytkine
  • GitHub: snytkine
  • Gists: snytkine
  • Offline
  • Profile

Re: What does the YUI~dump mean?

Post Posted: Sun Mar 27, 2011 3:27 pm
+0-
Do you mean, in YUI3 I can use Y.Lang.dump just like in YUI2? Do I have to load any modules?

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: What does the YUI~dump mean?

Post Posted: Sun Mar 27, 2011 3:30 pm
+0-
You can use Y.Lang.dump() but you still need to load the "dump" module

Nick Husher

YUI Contributor

  • Offline
  • Profile

Re: What does the YUI~dump mean?

Post Posted: Thu Apr 28, 2011 12:36 pm
+0-
It's my understanding that the tilde (~) character is a YUI3 convention for "this thing hangs directly off the YUI object you get back from the use function, even though it's a separate module."

So YUI~dump gives you Y.dump
YUI~oop gives you Y.extend, Y.augment, etc.

Nick Husher

YUI Contributor

  • Offline
  • Profile
Tags:

Re: What does the YUI~dump mean?

Post Posted: Thu Oct 06, 2011 6:02 am
+0-
The tilde was just a convention in documentation to indicate that the module attached functions directly to the YUI instance rather than providing a separate namespace.

This is a moot point, though; the tilde notation has been removed from the latest YUI documentation. This is the current style for displaying module-based extensions to the YUI instance.
  [ 8 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum