.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Spell Guide Beta-0 (http://forum.shrapnelgames.com/showthread.php?t=36617)

lch November 15th, 2007 05:10 AM

Re: Spell Guide Beta-0
 
Quote:

Snoddasmannen said:
Actually I'm putting the firstChild of a dom document, ie the spelldiv, into another document. The resulting dom tree is obviously correct, but Mozilla isn't updating it correctly for some reason.

Doesn't make any sense to me why I would need to specify the destination document of a node at the time of creation, but on the other hand XSLTProcessor is a mozilla invention so they can do whatever they want with it.

That has nothing to do with the XSLTProcessor or Mozilla, but that is coming directly from the standard for DOM. You *always* have to import your nodes into the document first with DOM if you want to use them. Even though Mozilla isn't doing what you want, they're doing it very correctly here.

jimkehn November 15th, 2007 11:55 AM

Re: Spell Guide Beta-0
 
i.e. 7 or whatever the newest version is. running xp.

jimkehn November 15th, 2007 11:58 AM

Re: Spell Guide Beta-0
 
Can you post that as a stand alone executable that we could download to our hard drive??? This looks like a really neat tool that we could use.

Snoddasmannen November 15th, 2007 01:31 PM

Re: Spell Guide Beta-0
 
Quote:

lch said:
That has nothing to do with the XSLTProcessor or Mozilla, but that is coming directly from the standard for DOM. You *always* have to import your nodes into the document first with DOM if you want to use them.


Good to know! I guess Opera automagically imported it in the replaceChild function.

Quote:

Even though Mozilla isn't doing what you want, they're doing it very correctly here.

I'm not necessarily as enthusiastic about the way ff did this at you are, but let's leave it at that http://forum.shrapnelgames.com/images/smilies/happy.gif When I do things right, they seem to work in both Opera and Firefox.

Not so much for IE though I'm afraid jimkehn http://forum.shrapnelgames.com/images/smilies/frown.gif As I mentioned before, I may rewrite the page to add support for all kinds of clients, but right now I'll continue on this track and try to keep supporting Firefox as well as Opera.

Next up I'll try to add some handling of the national spells, they are just mixed in with all the others right now which is quite annoying.

Quote:


Can you post that as a stand alone executable that we could download to our hard drive??? This looks like a really neat tool that we could use.


That would indeed be a neat tool to have as a standalone, but quite a different beast from a web interface. Not on my roadmap I'm afraid.

lch November 15th, 2007 01:42 PM

Re: Spell Guide Beta-0
 
Quote:

Snoddasmannen said:
I'm not necessarily as enthusiastic about the way ff did this at you are, but let's leave it at that http://forum.shrapnelgames.com/images/smilies/happy.gif When I do things right, they seem to work in both Opera and Firefox.

I'm not enthusiastic about it, but as you confirm yourself, what Firefox does is strictly adhering to the standards while Opera does a little extra to fix possibly corrupt code. That's bad, though, because then people will stick to writing corrupt code. Which will then prolly only work in Opera. Thank god for standards! Without them you'd have to do exceptions for every browser, operating system, day of the week and lunar phase in your code. Just like some years back when Microsoft and Netscape battled against each other who could invent the best new tags for HTML. No thanks. http://forum.shrapnelgames.com/image...ies/tongue.gif

lch June 1st, 2008 08:10 AM

Re: Spell Guide Beta-0
 
Quote:

Zentar said:
The concept is great and I like that it does searches for specified spell requirements, but I get this message when using it on my MAC "Exception while loading: TypeError: Null value". I am part of the 75%.

That is because the code requires that the browser has support for the XSLTProcessor. KHTML, which is being used by Konqueror and Safari, does not. I think that support for MSIE can be added quite easily by adding the following code snippet from the XMLHttpRequest Wikipedia page: <font class="small">Code:</font><hr /><pre>/**
* Bridge XMLHTTP to XMLHttpRequest in pre-7.0 Internet Explorers
*/
if( typeof XMLHttpRequest == "undefined" ) XMLHttpRequest = function()
{
try{ return new ActiveXObject("Msxml2.XMLHTTP.6.0") }catch(e){}
try{ return new ActiveXObject("Msxml2.XMLHTTP.3.0") }catch(e){}
try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){}
try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){}
throw new Error("This browser does not support XMLHttpRequest or XMLHTTP.")
};</pre><hr />I didn't get to test it, though.

Unless KHTML implements XSLTProcessor support, this page won't work for Konqueror and Safari. But in case Snoddasmannen wants to add support for them, I think that a cross-browser wrapper library named Sarissa takes care to add just this functionality for browsers.

Snoddasmannen June 1st, 2008 05:08 PM

Re: Spell Guide Beta-0
 
lch, does IE really have XSLTProcessor, or some ActiveX equivalent? If not it will take more than wrapping around XHR :/

Anyway, if I'm going to spend some time making this thing work for everybody then I think I might as well just move all the logic to the server side, with a simple form interface. Not many will be able to tell the difference, and even fewer care about it http://forum.shrapnelgames.com/images/smilies/happy.gif Plus I really dislike browser specific workarounds ... I'm happy that this code is running in both Opera and FF without any iffery.

But instead of working on the spell guide, I spent time rewriting my map generator instead. Now with fractals http://forum.shrapnelgames.com/images/smilies/wink.gif If it gets good, I'll release the source.

Edi June 1st, 2008 06:34 PM

Re: Spell Guide Beta-0
 
Quote:

Burnsaber said:
Extremely funky. I can see that Edi has helped you out a bit. The words "true" and "false" are in finnish!

That effect number -5 (summon unique) seems promising.. Very promsing indeed..

That's a function of what language your software is in. He has it showing TRUE/FALSE.

lch June 2nd, 2008 07:49 AM

Re: Spell Guide Beta-0
 
Quote:

Snoddasmannen said:
lch, does IE really have XSLTProcessor, or some ActiveX equivalent? If not it will take more than wrapping around XHR :/

I honestly have no idea about MSIE, I'm on Linux. Maybe the Microsoft FAQ can help you on that. Here's a code listing how to do the same transformation on both the Gecko engine and Internet Explorer: http://michael-steiner.net/JavaScript_XSLT.php

For perfect wrapping in any JavaScript browser, I guess you should use Sarissa like I wrote before.

Quote:

Snoddasmannen said:
But instead of working on the spell guide, I spent time rewriting my map generator instead. Now with fractals http://forum.shrapnelgames.com/images/smilies/wink.gif If it gets good, I'll release the source.

Hurry up then! http://forum.shrapnelgames.com/images/smilies/cool.gif

Renojustin June 2nd, 2008 08:12 AM

Re: Spell Guide Beta-0
 
Quote:

DrPraetorious said:
It's an english word http://forum.shrapnelgames.com/images/smilies/happy.gif. It's the antonym of "bonus".

Benign -&gt; Malign
Bonus -&gt; Mallus
etc.

So a curse or detriment would be a mallus. If you look in the damage column, you'll get a better explanation.

Actually, it's "malus". And it's Latin.


All times are GMT -4. The time now is 04:32 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.