Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Scriptaculous Effect duration in Hosted mode
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jdwyah  
View profile  
 More options Jan 5 2007, 3:31 pm
From: "jdwyah" <jdw...@gmail.com>
Date: Fri, 05 Jan 2007 20:31:00 -0000
Subject: Scriptaculous Effect duration in Hosted mode
I'm using & loving the the gwt-widget Effect class, but have been
bumping into problems using EffectOptions.

This works fine and dandy in IE7 && FF, but not in Hosted mode.

Effect.move(leftCloud, new EffectOption[] {
                                        new EffectOption("x",-1000),
                                        new EffectOption("y",0),
                                        new EffectOption("duration",5.0)
                        });

If I get rid of the options it works fine in hosted mode as well.

Effect.moveBy(leftCloud, 0,-1000);

Here's wrapping leftCloud in a DIV.

myThing= new SimplePanel();
PNGImage lc = new PNGImage(Manager.myConstants.clouds_src(),120,120);
lc.setStyleName("H-Clouds");
lc.setWidth("1000");
lc.setHeight("100%");
leftCloud.add(lc);

leftCloud.setWidth("1000");
leftCloud.setHeight("100%");

add(leftCloud,0,0);

Any ideas? Scriptaculous 1.6.0 & 1.7.0

This is the error:
[ERROR] Uncaught exception escaped
java.lang.NullPointerException: null
        at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(ModuleSpaceIE6.java :377)
        at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeVoid(ModuleSpaceIE6. java:283)
        at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.jav a:127)
        at org.gwtwidgets.client.wrap.Effect.move(Effect.java:235)

but as I say, when I compile to JS to use Firebug and see what it's all
about, everything works like a champ.

-J


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mooreds  
View profile  
 More options Jan 18 2007, 1:54 pm
From: "mooreds" <moor...@gmail.com>
Date: Thu, 18 Jan 2007 10:54:24 -0800
Local: Thurs, Jan 18 2007 1:54 pm
Subject: Re: Scriptaculous Effect duration in Hosted mode

Hi jdwyah,

I'm running into the same problem with opacity, and see this exception
in hosted mode only:

[WARN] Exception thrown into JavaScript
java.lang.NullPointerException: null
        at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(ModuleSpaceIE6.java :377)
        at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeVoid(ModuleSpaceIE6. java:283)
        at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.jav a:127)
        at org.gwtwidgets.client.wrap.Effect.opacity(Effect.java:288)
        at org.gwtwidgets.client.wrap.Effect.opacity(Effect.java:285)

I looked at the org.gwtwidgets.client.wrap.Effect.opacity method, and
it looks like:
---------------
    private native static void opacity (Element element,
JavaScriptObject opts)
/*-{
        $wnd._nativeExtensions = false;
        new $wnd.Effect.Opacity(element, opts);
    }-*/;
---------------

So, it looks like it's failing on the native call.  I load the
effects.js and prototype.js files into the HTML file that I'm running
in hosted mode, but perhaps the hosted browser isn't seeing those
files.

I'm using Scriptaculous 1.6.5 and gwt-widgets 0.1.3.  GWT version
1.2.22.  I have IE 6 running on my computer and don't see any
javascript errors there (when I compile to javascript).

Did you ever get this problem solved?

I searched on the bug list and didn't see anything.  

Thanks,
Dan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mooreds  
View profile  
 More options Jan 18 2007, 2:14 pm
From: "mooreds" <moor...@gmail.com>
Date: Thu, 18 Jan 2007 11:14:41 -0800
Local: Thurs, Jan 18 2007 2:14 pm
Subject: Re: Scriptaculous Effect duration in Hosted mode

mooreds wrote:
> I searched on the bug list and didn't see anything.

Err, I searched on both the GWT bug list and the gwt-widgets sf bug
tracker...

Dan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jdwyah  
View profile  
 More options Jan 19 2007, 11:01 am
From: "jdwyah" <jdw...@gmail.com>
Date: Fri, 19 Jan 2007 16:01:29 -0000
Local: Fri, Jan 19 2007 11:01 am
Subject: Re: Scriptaculous Effect duration in Hosted mode
Hey there.

Solution of the moment is just to wrap the call. Since it works fine in
FF & IE when it's compiled to JS and only fails in hosted development
mode I'm just writing a "compatibility mode" for my calls which doesn't
use the fancy EffectOptions.

public static void doMove(Widget w, int x, int y,int duration){

  if(GWT.isScript()){
    Effects.moveBy(w,new EffectOptions( duration, x, y etc);
  }else{
    Effects.moveBy(w,x,y);
  }


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mooreds  
View profile  
 More options Jan 19 2007, 4:47 pm
From: "mooreds" <moor...@gmail.com>
Date: Fri, 19 Jan 2007 13:47:23 -0800
Local: Fri, Jan 19 2007 4:47 pm
Subject: Re: Scriptaculous Effect duration in Hosted mode
Thanks.  This won't really work for me, as I am trying to debug some of
the behavior of effect queueing.

I investigated further and it appears that the buildOptions method in
the org.gwtwidgets/client/wrap/Effect.java file is to blame.  The
javascript object that is created there is not available in the Opacity
method in scriptaculous/effects.js (again, only in hosted mode).  I
have some ideas on how to fix this (change the gwt-widget library,
create my own options JavaScript object and try with that), but am not
sure if I'll have time to investigate them.

Thanks for your workaround.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shyamal  
View profile  
 More options Jan 19 2007, 8:55 pm
From: "shyamal" <spain...@hotmail.com>
Date: Fri, 19 Jan 2007 17:55:32 -0800
Local: Fri, Jan 19 2007 8:55 pm
Subject: Re: Scriptaculous Effect duration in Hosted mode
I will appreciate it if you guys can show me some examples of
Scriptaculous scale Effect and sample code. I have so far been unable
to scale successfully although other effects like fade and squish work
fine. I am trying to scale a panel with several image widgets on it.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
seb2nim  
View profile  
 More options Mar 19 2007, 9:22 am
From: "seb2nim" <seb.le...@gmail.com>
Date: Mon, 19 Mar 2007 13:22:11 -0000
Local: Mon, Mar 19 2007 9:22 am
Subject: Re: Scriptaculous Effect duration in Hosted mode
Hi,

I found something weird in GWT widgets library. It's just as if
options didnt worked... I suggest you just to try to put a duration
option that is not ambigous : lets say 10 seconds, or set a boolean
option to non-default value. You'll see, it didnt work.

The mistake is in the way EffectOption are builded.

I suggest you to just re-wrap the library and making the above
modifications... That worked fine for me. Actually, i completely re-
write this wrapping, adding more usefull classes to manage callback
and effects transitions. Plus, i'm curently working on queue and
parallel.

/*

The EffectOption class revisited

*/

public class EffectOption {
        private String name;

        private Object value;

        public EffectOption(String name, String value) {
                this.name = name;
                this.value = value;
        }

        public EffectOption(String name, double value) {
                this.name = name;
                this.value = new Double(value);
        }

        public EffectOption(String name, int value) {
                this.name = name;
                this.value = new Integer(value);
        }

        public EffectOption(String name, float value) {
                this.name = name;
                this.value = new Float(value);
        }

        public EffectOption(String name, boolean value) {
                this.name = name;
                this.value = new Boolean(value);
        }

        public EffectOption(String name, Callback callback) {
                this.name = name;
                this.value = callback;
        }

        public String getName() {
                return name;
        }

        public Object getValue() {
                return value;
        }

}

/*

The Effect class "JavaScriptObject buildOptions(EffectOption[] opts)"
's method revisited

*/

private static JavaScriptObject buildOptions(EffectOption[] opts) {
        JavaScriptObject jso = createJsObject();
        for (int i = 0; i < opts.length; i++) {
                Object value = opts[i].getValue();
                if (value instanceof Callback) {
                        addCallback(jso, opts[i].getName(), new CallbackDelegate((Callback)
value));
                } else if (value instanceof Integer) {
                        addOption(jso, opts[i].getName(), ((Integer) value).intValue());
                } else if (value instanceof Float) {
                        addOption(jso, opts[i].getName(), ((Float) value).floatValue());
                } else if (value instanceof Double) {
                        addOption(jso, opts[i].getName(), ((Double) value).doubleValue());
                } else if (value instanceof Boolean) {
                        addOption(jso, opts[i].getName(), ((Boolean)
value).booleanValue());
                } else {
                        addOption(jso, opts[i].getName(), value);
                }
        }
        return jso;


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jeffmaury@jeffmaury.com  
View profile  
 More options Mar 20 2007, 4:09 pm
From: "jeffma...@jeffmaury.com" <jeffma...@gmail.com>
Date: Tue, 20 Mar 2007 20:09:29 -0000
Local: Tues, Mar 20 2007 4:09 pm
Subject: Re: Scriptaculous Effect duration in Hosted mode
I think there is also a bug in the GWT hosting mode: it seems it fails
if one of the argument passed to a JSNI method as a '.' inside. As and
the duration is a double, it almost met this condition.

Jeff

On Mar 19, 2:22 pm, "seb2nim" <seb.le...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google