← Back to team overview

mugle-dev team mailing list archive

Re: GameEditBuilder

 

Ok I hadn't realised before that a new user would be added to the database
if the login doesn't exist yet. So no I am following what you suggest. I
mainly need Eclipse to do the debugging. Otherwise I am happy to go the
command line way.

What about using a subtype of List for the achievement service?


On Thu, May 19, 2011 at 4:08 PM, Prageeth Silva <prageethsilva@xxxxxxxxx>wrote:

> I've tried to debug my code with Eclipse which after some initial struggle
>> worked fine. So I found that somehow in GameVersionServiceImpl.write() the
>> user I logged in with (matt@xxxxxxxxxxx) was always identified as a
>> GUEST. I figured that this was the reason I was never able to actually
>> change any objects on the server. So I tried to log in with other users and
>> realised that I was always logged in as a GUEST. This was the first thing
>> that didn't make sense. Remark: I was actually able to load the GameEdit
>> form properly.
>>
>
> I had this problem once too, but that is because initially your database
> has no users.
> Try nuking the database first "ant nuke" and then try the following steps.
>
> Once you are in dev mode and on the home page, click on the "Populate
> Database" button. This basically adds the users and sets their Roles
> appropriately. Otherwise, what happens is the moment you log in and the
> database is empty, the username gets added to the database as a GUEST.
> This is the reason you keep getting matt@xxxxxxxxxxx as GUEST rather than
> ADMIN.
>
>
>
>>
>> Then I added an anchor with a link to the GameEditBuilder for the test
>> game to different spots in the menu. Very strangely, these anchors didn't
>> turn up, even after a full clean of the project in Eclipse. I also realised
>> during debugging that somehow a reload of the page would not go through
>> MugleUiBuilder.buildToolsPanel(). This was the second thing that didn't make
>> sense.
>>
>> I left Eclipse and went back to building the project with ant from the
>> command line which is probably the way to go. Now I do get to see these
>> anchors I have created. But when I open
>> http://127.0.0.1:8080/#!/test/test/+edit<http://127.0.0.1:8080/#%21/test/test/+edit>I get this message: The response could not be deserialized
>>
>> The code for loading the achievements is the following one:
>>         game.getAchievements(
>>                 new AsyncCallback<Set<Achievement>> () {
>>
>>             public void onFailure(Throwable error) {
>>                 containerPanel.add(new Label(error.getMessage()));
>>             }
>>
>>             public void onSuccess(Set<Achievement> result) {
>>                 achievements = new ArrayList<Achievement>();
>>                 achievements.addAll(result);
>>             }
>>         });
>>
>> I will try on and see what I can make of this but maybe you have an idea
>> where these problems might come from, as strange as they are.
>
>
> OK seems like this is an issue I found out last night while fixing
> something else. I'm not quite sure why this happens, but I think it's
> because Set<T> does not implement either a Serializable or IsSerializable.
> The only way I can think of is to change Set<Achievement> to
> HashSet<Achievement> as HashSet is a concrete class that implements
> Serializable. I haven't fully tested this, but I believe this should fix the
> bug. Please note that by changing the appropriate service in shared, you may
> have to change the corresponding method interface on the ServiceAsync and
> ServiceImpl.
>
> If Jens is unsure as to how the services work, then could Scott/Matt change
> them as I can't commit any changes I make via proxy. :(
>
> --
> *Prageeth Silva*
>

Follow ups

References