Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Testing non visual project
Wed, Apr 9 2014 3:47 AMPermanent Link

Ronald

Hi,

I created a non visual project with one test function. I created a .html
that loads the script and tried the testfunction. In the dedugger I get an
error. This is the test.html:

<!doctype html>
<html>
<head>
<script src="nv.js"></script>
</head>
<body spellcheck="false" onload="nv_load()" onunload="nv_unload()">
<form method="post">
<input name="Button1" onclick="alert(GetIt('haha'));" type="button"
value="button"></form>
</body>
</html>

If I looking in the nv.js file, I cannot find the function GetIt(). Where
did it go of do I have the wrong expectations with the non visual project?

Greetings,
Ronald
Wed, Apr 9 2014 6:06 AMPermanent Link

Matthew Jones

I don't understand all these parts enough, but my thinking is that the compiler
eliminates the unused functions, so it presumably thinks that your function is not
used. Did you write that HTML, or was it generated by EWB?

/Matthew Jones/

(I'm away until next week now, so may not be able to respond further.)
Fri, Apr 11 2014 3:16 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< If I looking in the nv.js file, I cannot find the function GetIt(). Where
did it go of do I have the wrong expectations with the non visual project?
>>

Matthew is correct - if the function isn't called from within your project,
then the EWB compiler will remove it from the emitted code.  The compiler
cannot resolve references that are in the HTML instead of the actual project
source code.

Tim Young
Elevate Software
www.elevatesoft.com


Image