[ 12 posts ] Go to page 1, 2 Next

Andrew Wooldridge

  • Username: triptych
  • Joined: Wed Oct 28, 2009 9:10 am
  • Posts: 80
  • Twitter: triptych
  • GitHub: triptych
  • Gists: triptych
  • IRC: triptych
  • Offline
  • Profile

Issue with progressmeter

Post Posted: Mon Nov 30, 2009 1:00 am
+0-
I'm able to instantiate the progressmeter just fine using this however when I try to add an animation to it via .get - the anim property returns null. I can provide an example if you havent already encountered this.
Basically I took the animation example from the YUI site and tried to wrap it with the YUI3->2 code. The progressmeter shows up, but I'm unable to add an animation to the value change.

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Mon Nov 30, 2009 4:37 am
+0-
I made a version of ProgressBar for YUI3. It lies in my fork, not in YUI3 master:

http://github.com/Satyam/yui3/tree/mast ... ogressbar/

It is native YUI3 and it should work without any wrapping. In that same fork you should be able to find the source and even the same examples as for the 2 version, except the ranking example, which uses the DataTable, not yet available in YUI3.

Caridy Patino

YUI Contributor

  • Username: caridy
  • Joined: Mon Dec 08, 2008 5:40 pm
  • Posts: 493
  • Location: Miami, FL
  • Twitter: caridy
  • GitHub: caridy
  • Gists: caridy
  • IRC: caridy
  • YUI Developer
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Mon Nov 30, 2009 8:59 am
+0-
triptych wrote:
I'm able to instantiate the progressmeter just fine using this however when I try to add an animation to it via .get - the anim property returns null. I can provide an example if you havent already encountered this.
Basically I took the animation example from the YUI site and tried to wrap it with the YUI3->2 code. The progressmeter shows up, but I'm unable to add an animation to the value change.


Hey Andrew, can you provide a link to your example? Or at least a link to the example (from YUI 2) that you're trying to port? I really want to see what is happening here, to see if there is any problem with the wrapper.

Best Regards,
Caridy

Andrew Wooldridge

  • Username: triptych
  • Joined: Wed Oct 28, 2009 9:10 am
  • Posts: 80
  • Twitter: triptych
  • GitHub: triptych
  • Gists: triptych
  • IRC: triptych
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Thu Dec 03, 2009 10:52 am
+0-
Here's the code I'm trying to use:

Code:
var progressBar = new YAHOO.widget.ProgressBar({anim:true}).render('pbContainer');
var anim = progressBar.get('anim');
anim.duration = 3;
anim.method = YAHOO.util.Easing.bounceBoth;


The bar shows up, but anim is coming back NULL.

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Thu Dec 03, 2009 11:03 am
+0-
That is usually an indication that it couldn't find the Animation utility. If it had found Animation, it would have returned the instance so you can set the animation parameters. If it returns null it is because it couldn't find any Animation object to instance. Have you listed it in the use method?

Caridy Patino

YUI Contributor

  • Username: caridy
  • Joined: Mon Dec 08, 2008 5:40 pm
  • Posts: 493
  • Location: Miami, FL
  • Twitter: caridy
  • GitHub: caridy
  • Gists: caridy
  • IRC: caridy
  • YUI Developer
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Thu Dec 03, 2009 11:03 am
+0-
Hey Andrew,

Can I see the whole block? remember that animation module in YUI 2 is called "animation", in YUI 3 is called "anim", so, don't get confused during the "use" call.

Best Regards,
Caridy

Andrew Wooldridge

  • Username: triptych
  • Joined: Wed Oct 28, 2009 9:10 am
  • Posts: 80
  • Twitter: triptych
  • GitHub: triptych
  • Gists: triptych
  • IRC: triptych
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Thu Dec 03, 2009 11:29 am
+0-
I'll bet that's it. I'm trying to use the YUI3 animation with YUI2 module instead of bringing in YUI2's animation. I'll try that.

Andrew Wooldridge

  • Username: triptych
  • Joined: Wed Oct 28, 2009 9:10 am
  • Posts: 80
  • Twitter: triptych
  • GitHub: triptych
  • Gists: triptych
  • IRC: triptych
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Thu Dec 03, 2009 1:50 pm
+0-
Yep, that was the issue - I was trying to use animation in the YUI2 widget, but I had not loaded the YUI2 animation (I had loaded the YUI3 animation upstream). It works fine now!

Caridy Patino

YUI Contributor

  • Username: caridy
  • Joined: Mon Dec 08, 2008 5:40 pm
  • Posts: 493
  • Location: Miami, FL
  • Twitter: caridy
  • GitHub: caridy
  • Gists: caridy
  • IRC: caridy
  • YUI Developer
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Thu Dec 03, 2009 2:41 pm
+0-
Cool, the wrapper is good then :-)

Best regards,
Caridy

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Issue with progressmeter

Post Posted: Thu Dec 03, 2009 3:00 pm
+0-
The wrapper IS good, no question about it. Enhorabuena
  [ 12 posts ] Go to page 1, 2 Next
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