Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 19 08:30
    hkollmann labeled #10203
  • Jun 19 08:30
    hkollmann labeled #10205
  • Jun 19 08:30
    hkollmann labeled #10206
  • Jun 19 08:28
    hkollmann labeled #10211
  • Jun 18 16:30
    derrell commented #10222
  • Jun 18 15:54
    derrell commented #10222
  • Jun 18 15:29
    derrell commented #10222
  • Jun 18 11:53
    derrell opened #10222
  • Jun 18 09:36
    rad-pat opened #10221
  • Jun 18 08:13
    rad-pat commented #10200
  • Jun 17 14:30
    johnspackman commented #10200
  • Jun 17 14:14
    rad-pat commented #10200
  • Jun 17 10:37
    kekewind starred qooxdoo/qooxdoo
  • Jun 17 09:33

    hkollmann on npm_and_yarn

    (compare)

  • Jun 17 09:33

    hkollmann on master

    Bump normalize-url from 4.5.0 t… (compare)

  • Jun 17 09:33
    hkollmann closed #10219
  • Jun 17 09:27
    level420 edited #10220
  • Jun 17 09:26
    level420 edited #10220
  • Jun 17 09:25
    level420 opened #10220
  • Jun 17 08:20
    cboulanger commented #10132
Christian Boulanger
@cboulanger
You could put a break point there and look at the values.
Scott Knick
@sknick
OK Can't even get my server to serve the non-source version locally. Weird.
Christian Boulanger
@cboulanger
It should work. I was experimenting with separate apps in pop-up windows which connected to the same backend as the main app and I remember I could do that.
(It would be grander if qooxdoo supported extending its runtime into separate browser window instances but unfortunately that's currently impossible)
Scott Knick
@sknick
Well, attempting to switch did at least lead me to realizing I was stupidly referring to the old version of the admin app in a separate repo.
But I did get the build version served up once I figured that out and it has the same issue.
Ya, qx.$$libraries in index.js is always not set.
Not sure if that's part of the problem?
Scott Knick
@sknick
I do end up with this on load, which looks wrong:
image.png
The transpiled dir works out because I'm serving the admin app's transpiled stuff from transpiled/admin:
router.PathPrefix("/transpiled/admin/").Handler(http.FileServer(http.Dir(settings.AdminUIRoot)))
Christian Boulanger
@cboulanger
Yes. You probably get the same if you do, in the wb console, console.log(qx.util.ResourceManager.getInstance().toUri("qx/decoration/Modern/window/close-active.png")) (with an icon you actually use)
Derrell Lipman
@derrell
@sknick Are you serving the output of qx compile --target=build or are you serving the output of qx deploy?
Scott Knick
@sknick
qx compile --watch
Derrell Lipman
@derrell
That's the source version, unless you've specified in compile.json that the default target is build
Scott Knick
@sknick
Nope, it's the source, which is what I'm trying to debug now.
image.png
Derrell Lipman
@derrell
oh, ok
Scott Knick
@sknick
@cboulanger I get qx/decoration/Modern/window/close-active.png
Christian Boulanger
@cboulanger
The relative path is indeed wrongly calculated - all apps should be on the same level though, regardless whether one is the "main" one
@sknick you need to use a picture you actually use in your app, this was just an example from my own app. I get "https://example.com/myapp/../resource/qx/decoration/Modern/window/close-active.png"
Scott Knick
@sknick
OK, same kind of thing:
icon/32/apps/utilities-text-editor.png
Christian Boulanger
@cboulanger

The relative path is indeed wrongly calculated - all apps should be on the same level though, regardless whether one is the "main" one

Might this be the problem? You are trying to put the "main" app and the admin app at different levels.

Scott Knick
@sknick
Ya, dunno... Are you saying I should put them both in subdirs?
Derrell Lipman
@derrell
@sknick is creating two completely independent apps, with two completely independent compile.json files. I've never done that (for the same server). I always create multiple apps within the same compile.json
Scott Knick
@sknick
Maybe I just need to take that approach?
Christian Boulanger
@cboulanger
I think the way it works that you would have https://example.org/main and https://example.org/admin by just having a "main" and an "admin" app in your compile.json
Qooxdoo is opinionated this way because of the way stuff is compiled.
Scott Knick
@sknick
OK, I'll look into that perhaps. I've gotta run, but I'll check back in case John provides an epiphany.
Thanks guys!
Henner Kollmann
@hkollmann
@sknick You should put both applications in one compile.json file. One of them could be marked as default. compiler always settles the resources in the root and the applications in subfolders. So the resources are shared.
For the default app a special index.html in the root is created.
So what you describe is by design
if you really want to have 2 different apps you need to copy them in 2 diffferent folders and write your own index.html in the root which do the redirection.
Christian Boulanger
@cboulanger
@sknick @hkollmann Or create compeletely different projects in separate folders, which have no resource overlap. But that seems inefficient.
Henner Kollmann
@hkollmann
That's what i said last in cleaner words..
John Spackman
@johnspackman

@sknick i hope I didn't forget a crucial detail before! Here’s what one of my startup pages looks like:

        <script type="text/javascript">
        (function(){
            var src = “/path/to/output-directory/my-application-name/index.js";

     if (window.qx === undefined)
       window.qx = {};
     qx.$$appRoot = "/path/to/output-directory/my-application-name/";
                var elem = document.createElement('script');
                elem.setAttribute('src', src);
                var parent = document.getElementById("gw-app-container");
                parent.appendChild(elem);
        })();
        </script>

The page that this appears in is called something like /my-application-name.html - what happens is that in the loader for the Qooxdoo application, qx.$$appRoot becomes qx.$$resourceRoot, and qx.$$resourceRoot is used to prefix the resource paths

You should not need to set qx.$$appRoot because it should be calculated correctly from tthe path to the script source (ie <script src="/path/to/output-directory/my-application-name/index.js”> is all that the loader should need), but the reason that I specify it here is so that I can support older versions of IE (which I probably don’t need to support now, but the code’s not need to be changed)

i’ve got to go shortly but will try and check back in later
In your examples, your /admin.html would have <script src="/path/to-output-directory/admin/index.js"> and your /userapp.html would have <script src="/path/to-output-directory/userapp/index.js"> - note that you have to place the entire build directory (or the result of qx deploy) in your web server as /path/to/output-directory
Scott Knick
@sknick
Great info! I'll try the single compile.json and see how things look.
Scott Knick
@sknick
Wow... That was so easy! I combined the applications into one directory and added both to the compile.json and... and... it just works!
Great job, guys! Love this.
Scott Knick
@sknick
It's super slick how the default application is served from the root too.
This is in a source build at least.
Christian Boulanger
@cboulanger
@sknick :+1:
Marcel
@marcelr
Is ECMA6 "new Map()" (or WeakMap) allowed in current qooxdoo?
event/Manager.js uses linear lookup like "for (var i=0, l=entryList.length; i<l; i++) {}"
As a Map key can be of type function pointer, porting would speed up functions like removeListener()
Currently the browser freezes for 45 seconds in our application which seems to be related to the linear search
Christian Boulanger
@cboulanger
@marcelr Starting with v7 (i.e. the current "master" branch), we are supporting ES6. A PR implementing a better lookup for event handling would be highly welcome. Of course, you must make sure that this change is working with/is reflected in the qooxdoo test suite.
John Spackman
@johnspackman
@marcelr how many event listeners do you have? It would be a VERY large list to cause the browser to freeze for 45s. Are you able to create a reproducable test case?