Re: Importing custom modules in Gjs

2012-08-05 Thread Emmanuele Bassi
hi; On 5 August 2012 15:02, alex diavatis wrote: > I am starting an App with Gjs and Clutter but I am stacked as I cannot > import custom classes in gjs path, from inside the application and not from > /usr/bin/gjs > > I am trying something like: > > const Me = imports.searchPath.unshift('.'); >

Re: Importing custom modules in Gjs

2012-08-05 Thread Jasper St. Pierre
On Sun, Aug 5, 2012 at 11:18 AM, Florian Müllner wrote: > > On Aug 5, 2012 4:02 PM, "alex diavatis" wrote: >> let black_c = new Clutter.Color( {red:0, blue:0, green:0, alpha:255} ); >> >> and I cannot find a way to call this variable from my main.js file. > > Variables declared with "let" are lim

Re: Importing custom modules in Gjs

2012-08-05 Thread alex diavatis
On Sun, Aug 5, 2012 at 6:18 PM, Florian Müllner wrote: > > On Aug 5, 2012 4:02 PM, "alex diavatis" wrote: > > let black_c = new Clutter.Color( {red:0, blue:0, green:0, alpha:255} ); > > > > and I cannot find a way to call this variable from my main.js file. > > Variables declared with "let" are

Re: Importing custom modules in Gjs

2012-08-05 Thread Florian Müllner
On Aug 5, 2012 4:02 PM, "alex diavatis" wrote: > let black_c = new Clutter.Color( {red:0, blue:0, green:0, alpha:255} ); > > and I cannot find a way to call this variable from my main.js file. Variables declared with "let" are limited in scope; use "var" or "const" if you want to access it from a

Re: Importing custom modules in Gjs

2012-08-05 Thread alex diavatis
Here it is, http://pastebin.com/Qb1E3sZZ On Sun, Aug 5, 2012 at 6:10 PM, alex diavatis wrote: > Hello Jasper, > > I tried also this and it doesn't work, > I tried many things I am stacked on it for an hour, give me please a sec > to paste-bin all the code > > Thank you for the help > > > > On Sun

Re: Importing custom modules in Gjs

2012-08-05 Thread alex diavatis
Hello Jasper, I tried also this and it doesn't work, I tried many things I am stacked on it for an hour, give me please a sec to paste-bin all the code Thank you for the help On Sun, Aug 5, 2012 at 6:08 PM, Jasper St. Pierre wrote: > On Sun, Aug 5, 2012 at 11:01 AM, alex diavatis > wrote: > >

Re: Importing custom modules in Gjs

2012-08-05 Thread Jasper St. Pierre
On Sun, Aug 5, 2012 at 11:01 AM, alex diavatis wrote: > Hello Jasper, > > On Sun, Aug 5, 2012 at 5:57 PM, Jasper St. Pierre > wrote: > >> You need to import Clutter as well: >> >> const Clutter = imports.gi.Clutter; > > > Of course I have Clutter imported. > I just can't find a way to call black_

Re: Importing custom modules in Gjs

2012-08-05 Thread alex diavatis
Hello Jasper, On Sun, Aug 5, 2012 at 5:57 PM, Jasper St. Pierre wrote: > On Sun, Aug 5, 2012 at 10:02 AM, alex diavatis > wrote: > > Hello, > > > > I am starting an App with Gjs and Clutter but I am stacked as I cannot > > import custom classes in gjs path, from inside the application and not >

Re: Importing custom modules in Gjs

2012-08-05 Thread Jasper St. Pierre
On Sun, Aug 5, 2012 at 10:02 AM, alex diavatis wrote: > Hello, > > I am starting an App with Gjs and Clutter but I am stacked as I cannot > import custom classes in gjs path, from inside the application and not from > /usr/bin/gjs > > I am trying something like: > > const Me = imports.searchPath.u

Importing custom modules in Gjs

2012-08-05 Thread alex diavatis
Hello, I am starting an App with Gjs and Clutter but I am stacked as I cannot import custom classes in gjs path, from inside the application and not from /usr/bin/gjs I am trying something like: const Me = imports.searchPath.unshift('.'); const myConf = Me.conf; which imports the conf.js file,