How to wrap a event parameter in JSNI

2011-12-23 Thread Lonewolf
I am porting same very handy Canvas and Animation libraries to GWT
using the JSNI feature. Being the first library I am wrapping I could
use a little assistance with this particular constructor:



/**
* This is passed as the parameter to onPress, onMouseMove, onMouseUp,
onMouseDown, and onClick handlers on
* DisplayObject instances.
* By default, mouse events are disabled for performance reasons. In
order to enabled them for a specified stage
* set mouseEventsEnabled to true on your stage instance.
* @class MouseEvent
* @constructor
* @param {String} type The event type.
* @param {Number} stageX The mouseX position relative to the stage.
* @param {Number} stageY The mouseY position relative to the stage.
* @param {DisplayObject} target The display object this event relates
to.
* @param {MouseEvent} nativeEvent The native DOM event related to this
mouse event.
**/
var MouseEvent = function(type, stageX, stageY, target, nativeEvent) {
  this.initialize(type, stageX, stageY, target, nativeEvent);
}
var p = MouseEvent.prototype;



You can view the entire class here: http://easeljs.com/docs/MouseEvent.js.html

My question is, how do I go about passing the event from GWT and
successfully feed it to the JSNI constructor for this class?

FYI: I have forked Timknip's GWT port of Easeljs (0.2.1) and i'm
updating it to include the latest Easel features (0.4.0).
https://github.com/timknip/easel-gwt

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Why the form isn't getting submitted?

2008-12-14 Thread LoneWolf

Hey,
I'm trying to use FormPanel to submit values to a servlet:
+
form = new FormPanel();
form.setAction(/webcontext/command);
form.setMethod(FormPanel.METHOD_POST);
form.setEncoding(FormPanel.ENCODING_URLENCODED);
form.addFormHandler(this);
// controls table is created with FlexTable controlsTable =
new FlexTable();
form.setWidget(controlsTable);
groupName = new Label(Group name:);
group = new TextBox();
group.setName(groupName);
submit = new Button(Create Group);
submit.addClickListener(this);
cancel = new Button(Cancel);
cancel.addClickListener(this);

// Then I'm adding the labels and form's controls to the controlsTable

public void onClick(Widget sender) {
if (sender == submit)
form.submit();
else
this.hide(true);
}
++
But when clicking on Create Group button, no request is made to the
servlet (proofed by FireBug and the debugger).
Why my for isn't getting submitted?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Annoying issue, integrating with Hibernate

2008-12-07 Thread LoneWolf

Hey,
Our application is using Hibernate 3 as the persistence mechanism, and
of course we have one-to-many relationship.
The problem is when trying to pass a domain object that has a list of
lazy initialized objects back to the browser, I got this exception:

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
'org.hibernate.collection.PersistentSet' was not included in the set
of types which can be serialized by this SerializationPolicy or its
Class object could not be loaded. For security purposes, this type
will not be serialized.

Yes, I understand this exception but to overcome this issue?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



How to overcome this warning (upgrading issue)?

2008-12-02 Thread LoneWolf

Hey,
I want to upgrade my GWT application from GWT 1.4.6 to GWT 1.5.3
What I'm facing is this warning:

[WARN] 'mydomain.UsersList' is not a generic type; only generic types
can be parameterized
com.google.gwt.core.ext.typeinfo.BadTypeArgsException:
'mydomain.UsersList' is not a generic type; only generic types can be
parameterized

Here is my code:


//In the RPC interface
/**
 * * @gwt.typeArgs mydomain.Users
 */
public UsersList loadUsers(int start);

public class UsersList implements IsSerializable {
  private ListUsers users;


Would you please tell me how to overcome this?
Thanks for your time.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Upgrading to GWT 1.5 roadmap

2008-11-26 Thread LoneWolf

Hey,
We have an application coded and compiled using GWT 1.4
We want to employ GWT 1.5 (themes and performance gains), how to
upgrade to 1.5?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Upgrading to GWT 1.5 roadmap

2008-11-26 Thread LoneWolf

Oops,
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=ReleaseNotes_1_5_UpgradeGuide
Thanks :shame:

On Nov 26, 2:08 pm, LoneWolf [EMAIL PROTECTED] wrote:
 Hey,
 We have an application coded and compiled using GWT 1.4
 We want to employ GWT 1.5 (themes and performance gains), how to
 upgrade to 1.5?
 Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



How to get date fields?

2008-10-09 Thread LoneWolf

Hey,
How to get year, month of year, day of month in GWT application?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to get date fields?

2008-10-09 Thread LoneWolf

Date.getDay() return day of week, I need day of month

On Oct 9, 2:15 pm, Isaac Truett [EMAIL PROTECTED] wrote:
 java.util.Date (yes, the deprecated methods)

 On Thu, Oct 9, 2008 at 5:53 AM, LoneWolf [EMAIL PROTECTED] wrote:

  Hey,
  How to get year, month of year, day of month in GWT application?
  Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to get date fields?

2008-10-09 Thread LoneWolf

Thanks all :)

On Oct 9, 2:57 pm, Isaac Truett [EMAIL PROTECTED] wrote:
 http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html#getDate()

 On Thu, Oct 9, 2008 at 8:55 AM, LoneWolf [EMAIL PROTECTED] wrote:

  Date.getDay() return day of week, I need day of month

  On Oct 9, 2:15 pm, Isaac Truett [EMAIL PROTECTED] wrote:
   java.util.Date (yes, the deprecated methods)

   On Thu, Oct 9, 2008 at 5:53 AM, LoneWolf [EMAIL PROTECTED] wrote:

Hey,
How to get year, month of year, day of month in GWT application?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: I got UnsatisfiedLinkError

2008-10-08 Thread LoneWolf

Is it well supported? what about the community? is it stable as they
said?

On Oct 8, 1:50 pm, Lothar Kimmeringer [EMAIL PROTECTED] wrote:
 LoneWolf schrieb:

  For me it is mysterious, because when I was using Ubuntu 7.10, every
  thing was going ok but when I installed a fresh copy of Ubuntu 8.04 ,
  I got the exception.

 Most likely Ubuntu 8.04 is only shipped with the Standard C++
 Library Version 6.

  After running this command:
  sudo apt-get install libstdc++5
  Every thing is ok now.

 Good.

  BTW, do use openSuse 11? I'm curious about it and I need developer's
  opinion regarding it.

 We have it running on one server. What exactly do you want to
 know? VMWare doesn't run very well on it, because the version
 1.0.x needs 32 Bit Perl for the administrative tools which
 I don't find anywhere in the package-manager of SuSE (only
 the shared libraries, no binaries). So you can start Guests,
 but can't make any backups of them...

 Java works.

 Regards, Lothar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



I got UnsatisfiedLinkError

2008-10-08 Thread LoneWolf

Hey,
I'm trying to run GWT in the hosted mode (external Tomcat container):
=
path id=gwt.classpath
pathelement location=${src.dir}/
pathelement location=${classes.dir}/
pathelement location=${gwt.home}/gwt-user.jar/
pathelement location=${gwt.home}/gwt-dev-linux.jar/
/path
target name=Run-GWT
java classpathref=gwt.classpath fork=true
classname=com.google.gwt.dev.GWTShell
arg line=-logLevel DEBUG/
arg line=-noserver/
arg line=-port 8080/
arg line=home.html/
/java
/target
=
But I got this exception:
java.lang.UnsatisfiedLinkError: /media/sda4/Frameworks/gwt-
linux-1.4.61/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open
shared object file: No such file or directory


Platform:
Java 1.6.0_06
Ubuntu 8.04
GWT 1.4.61

Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: I got UnsatisfiedLinkError

2008-10-08 Thread LoneWolf

For me it is mysterious, because when I was using Ubuntu 7.10, every
thing was going ok but when I installed a fresh copy of Ubuntu 8.04 ,
I got the exception.
After running this command:
sudo apt-get install libstdc++5
Every thing is ok now.
BTW, do use openSuse 11? I'm curious about it and I need developer's
opinion regarding it.
Thanks.

On Oct 8, 1:20 pm, Lothar Kimmeringer [EMAIL PROTECTED] wrote:
 LoneWolf schrieb:

  But I got this exception:
  java.lang.UnsatisfiedLinkError: /media/sda4/Frameworks/gwt-
  linux-1.4.61/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open
  shared object file: No such file or directory

 What's mysterious about this error-message? The shared
 library libstdc++.so.5 can't be found, i.e. you have to
 install it.

  Any ideas?

 Install the library. Ubuntu should provide some kind
 of package-manager to do this (I use SuSE, so I can't
 tell in detail how to do this. Look for Standard C++
 Library Version 5. It's possible that other libraries
 are missing as well, you can check in advance by entering
 ldd /media/sda4/Frameworks/gwt-linux-1.4.61/mozilla-1.7.12/libxpcom.so
 or just wait for the next error-message coming up
 after the install of beforementioned library.

 Regards, Lothar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---