integrate contrib

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

integrate contrib

rsantiagopaz
please I need a little help about integrate contributions to my project.
I start with a basic project, then uncomment the jobs section, and add the reference to Dialog contrib:

  "jobs" :
  {
    // Uncomment the following entry to add a contrib or library to your
    // project; make sure to adapt the path to the Manifest.json; if you are
    // using a contrib: library, it will be downloaded into the path specified
    // by the 'cache/downloads' config key
    "libraries" :
    {
      "library" :
      [
        {
          "manifest" : "contrib://Dialog/trunk/Manifest.json"
        }
      ]
    },

    // If you want to tweak a job setting, see the following sample where
    // the "format" feature of the "build-script" job is overridden.
    // To see a list of available jobs, invoke 'generate.py x'.
    "build-script" :
    {
      "compile-options" :
      {
        "code" :
        {
          "format" : false
        }
      }
    }
  }


But when I compile the project I get a warning like:
...

============================================================================
    INITIALIZING: PEDIATRAS
============================================================================
>>> Configuration: config.json
>>> Jobs: source
>>> Resolving config includes...
  - ! Shadowing job "libraries" with local one
  - ! Shadowing job "build-script" with local one
>>> Resolving jobs...
>>> Incorporating job defaults...
>>> Resolving macros...
>>> Resolving libs/manifests...

...


I cant understand this message. What is wrong? Where I can get a detailed example about how integrate contribs and run the demos? I was trying with several contrib, but always get a similar warning.
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

Christian Hagendorn
Administrator
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

rsantiagopaz
But I can't use the Dialog library. For example, if I add this line to my application.js (same like de Demo application)

dialog.Dialog.init();

all my application dissapear from the browser. Nothing happens. I compile, the warning is show, but the application dont run.



If I use this only line
dialog.alert( "Hello World!" );
The application run until this line, and throws the error: "ReferenceError: dialog is not defined"

If I erase all references to dialog namespace, the application run normally, of course.




I make a basic project with create-application.py, then uncomment the config.json:

{
  "name"    : "prueba",

  "include" :
  [
    {
      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
    }
  ],

  "export" :
  [
    "api",
    "build",
    "clean",
    "distclean",
    "fix",
    "info",
    "inspector",
    "lint",
    "migration",
    "pretty",
    "profiling",
    "source",
    "source-all",
    "test",
    "test-source",
    "translation"
  ],

  "let" :
  {
    "APPLICATION"  : "prueba",
    "QOOXDOO_PATH" : "../../qooxdoo-1.1-sdk",
    "QXTHEME"      : "prueba.theme.Theme",
    "API_EXCLUDE"  : ["qx.test.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*"],
    "LOCALES"      : [ "en" ],
    "CACHE"        : "${TMPDIR}/cache",
    "ROOT"         : "."
  },

  // You only need to edit the remainder of this file, if you want to customize
  // specific jobs, or add own job definitions.


  "jobs" :
  {
    // Uncomment the following entry to add a contrib or library to your
    // project; make sure to adapt the path to the Manifest.json; if you are
    // using a contrib: library, it will be downloaded into the path specified
    // by the 'cache/downloads' config key
    "libraries" :
    {
      "library" :
      [
        {
          "manifest" : "contrib://Dialog/trunk/Manifest.json"
        }
      ]
    }

    // If you want to tweak a job setting, see the following sample where
    // the "format" feature of the "build-script" job is overridden.
    // To see a list of available jobs, invoke 'generate.py x'.

    "build-script" :
    {
      "compile-options" :
      {
        "code" :
        {
          "format" : false
        }
      }
    }
  }

}







I have another problem: I cant run the demos.
When run the demos I get this warning, and nothing happens:

!!! Invalid include block: [u'dialog.demo.Demo', u'qx.theme.Modern']
Expression gives no results. Malformed entry: dialog.demo.Demo


My knowledge on these topics is weak, ok. My poor english is a great problem too.
I was reading all documentation about in Qooxdoo.org, and some threads in this forum, and I was trying all the variations, but I cant get any result.
I dont known what is wrong. But If I have a little reference to a running basic example, i can deduce how to work correctly.
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

panyasan
Hi,

I was just testing the Dialog contrib - the demo builds and runs fine for me.
Have you tried to do ./generate.py distclean and redownload the contrib? Maybe it did not fully download the first time for some reason...

C.
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

Thomas Herchenroeder
In reply to this post by rsantiagopaz
I tried to re-create the issue from a standard gui skeleton, and it
worked for me.

I created the skeleton, add the contrib:// entry in the config.json,
like you did, added the following lines to my Application.js

      dialog.Dialog.init();
      dialog.alert("Hiho Cosmos!");

, ran 'generate.py source' and opened source/index.html in a browser. It
first displays a blocker with the alert window on top of it. When I
click Ok, the window and the blocker are removed and the normal "First
Button" appears.

> But I can't use the Dialog library. For example, if I add this line to my
> application.js (same like de Demo application)
>
> dialog.Dialog.init();
>
> all my application dissapear from the browser. Nothing happens.

Which browser are you using? Can you test in another browser (I used FF)?

> If I use this only line
> dialog.alert( "Hello World!" );
> The application run until this line, and throws the error: "ReferenceError:
> dialog is not defined"

That wont work. You need the call to 'dialog.Dialog.init()' before using
'dialog.alert()', as the init() call creates the alert() method on the
package.

As 'dialog' on it own is only a "name space" (in qooxdoo lingo), it will
only be created by qooxdoo if a proper class from this name space is
also included in the app. Since this is not the case with a sole
'dialog.alert()', you get this 'dialog is not defined'.

> I have another problem: I cant run the demos.
> When run the demos I get this warning, and nothing happens:
>
> !!! Invalid include block: [u'dialog.demo.Demo', u'qx.theme.Modern']
> Expression gives no results. Malformed entry: dialog.demo.Demo

What did you do to run it? It worked for me. I went to
Dialog/trunk/demo/default, ran 'generate.py source' and opened
source/index.html in a browser. Worked like a charm.

Can you be more specific about what you did?

T.

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

rsantiagopaz
Thanks for all. Some your comments made me think about some wrong settings in my Eclipse. Now is working all.



I suppose this warning:

============================================================================
    INITIALIZING: PRUEBA
============================================================================
>>> Configuration: config.json
>>> Jobs: source
>>> Resolving config includes...
  - ! Shadowing job "libraries" with local one
>>> Resolving jobs...

is normal.
If are any way for avoid this warning, it would be good to know how is the correct way
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

Thomas Herchenroeder
i wanted to recommend the '-q' option of the generator to you, but i
just saw that it doesn't work as advertised anymore :-(.
i've opened a bug for this (#3722).

t.

On 05/20/2010 05:30 AM, rsantiagopaz wrote:

>
> Thanks for all. Some your comments made me think about some wrong settings in
> my Eclipse. Now is working all.
>
>
>
> I suppose this warning:
>
> ============================================================================
>     INITIALIZING: PRUEBA
> ============================================================================
>>>> Configuration: config.json
>>>> Jobs: source
>>>> Resolving config includes...
>   - ! Shadowing job "libraries" with local one
>>>> Resolving jobs...
>
> is normal.
> If are any way for avoid this warning, it would be good to know how is the
> correct way

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

rsantiagopaz
I understand you thron7-2, using the quiet mode. But I meant another thing, please sorry.
I try reformulate better the question:
Which is the standard or correct form to structure my project and which is the correct form to write correctly my config.json, Manifest.json, etc, for add any number of libraries and not get this warning.


Or maybe this simple warning is TOTALLY normal and intended, like Christian say, there are not another way to do this.
Reply | Threaded
Open this post in threaded view
|

Re: integrate contrib

Thomas Herchenroeder
>
> I understand you thron7-2, using the quiet mode. But I meant another
> thing,
> please sorry.
> I try reformulate better the question:
> Which is the standard or correct form to structure my project and which is
> the correct form to write correctly my config.json, Manifest.json, etc,
> for
> add any number of libraries and not get this warning.
>
>
> Or maybe this simple warning is TOTALLY normal and intended, like
> Christian
> say, there are not another way to do this.

Yes, that's the point. We deliberately shadow jobs, that's a basic
technique, which is also the recommended way for users to customize
existing jobs. The warnings are just to make sure you don't shadow an
existing job *accidentially*, when you chose a name for an own job that by
chance matches that of a pre-defined one. That's all.

T.


------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel