Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17450

Re: No Function Google Script

Path csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Stefan Weiss <krewecherl@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: No Function Google Script
Date Tue, 04 Dec 2012 09:35:22 +0100
Organization albasani.net
Lines 27
Message-ID <k9kckb$964$1@news.albasani.net> (permalink)
References <e4354d0c-6035-437c-9bb4-fe138c989387@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net +SyOCp3HTLzPjhTCbZoD64H7Paf2cYrL2vpvc3pddbjBUX4WI0rztuCRn4P/Dkh8LBYTXm5c7lVqJo7wh1hgvA==
NNTP-Posting-Date Tue, 4 Dec 2012 08:35:23 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="BaOj9pZGTn5fcYmwWqzlc8OTVYJEQogMIEhDihSay6+lJJVnhh1/zWckCbYYXhF4usHpoZ1mvg7k0qYfYxZ2GEzDYQLGsrxgOpwo4+iugwO2a5XT4rRN4elixmRBMhr3"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
In-Reply-To <e4354d0c-6035-437c-9bb4-fe138c989387@googlegroups.com>
Cancel-Lock sha1:diDdPqGlGiRMr8ynQWA+jkIDZx4=
Xref csiph.com comp.lang.javascript:17450

Show key headers only | View raw


On 2012-12-04 06:19, k wrote:
> I am trying to save this as a web app to attach to Google sites but
> it says I need a function can some one please help me understand and
> change my code to make it work.
> 
> var y=178;
> var draw = function() {
>     background(133, 142, 245);
>     textSize(40);
>     text("Snow",70,180);
> //cloud
> noStroke();
> ellipse(93,10,100,100);
[snip rest]

None of the functions background(), textSize, text(), noStroke(),
ellipse(), etc, are native JavaScript. This looks like Processing.js;
did you forget to load a library?

By the way,

> for (var i = 0; i < 1; i+=1){

this loop is pointless, it just means "do once".


- stefan

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

No Function Google Script k <kalezwe@gmail.com> - 2012-12-03 21:19 -0800
  Re: No Function Google Script Stefan Weiss <krewecherl@gmail.com> - 2012-12-04 09:35 +0100

csiph-web