Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ahmad K. Bawaneh
    @vegegoku
    maybe use pastebin or any other tool to reproduce the case
    aallnneess
    @aallnneess
    Hm. That’s a very big project now. The Tree class is over 500 lines in size. So I didn't want to post big code because of this small issue. Because, I just don't understand why TreeItems don't have a wrap option - and doesn't respond to wrap CSS commands.
    Justin Hickman
    @jhickman
    You'd just have to look in chrome dev tools to see what the output HTML and CSS is. Typically, you can tweak it from there to what works, and then apply to your CssResource
    That seems more of an HTML/CSS issue than GWT-specific
    Colin Alworth
    @niloc132
    @andreififiita at runtime in the browser you can check for the $gwt_version of any running gwt app
    from the classpath you can check the About class i believe, but since you have both gwt-dev and gwt-user, you need to further make sure that those match (there is a About.properties file that it reads from), in com.google.gwt.dev
    (if it builds, they probably match)
    aallnneess
    @aallnneess
    @jhickman ah okay that helps a bit thanks
    AndreiF
    @andreififiita
    @niloc132 hi. i was searching about that, but in superdev mode i see no variable $gwt_version
    VM6221:1 Uncaught ReferenceError: $gwt_version is not defined
    at <anonymous>:1:1
    Colin Alworth
    @niloc132
    @andreififiita unless you've heavily modified your linker, it is there
    oh, it isnt in the top window
    it is in the gwt "frame" or whatever context it runs in
    AndreiF
    @andreififiita
    oooooh right, i forgot about that
    Colin Alworth
    @niloc132
    look inside the .cache.js file, should be one of the very first commands
    custom gwt builds will of course have custom versions, iirc all of google's internal builds always used version 0.0.0
    AndreiF
    @andreififiita
    @niloc132 got it!. It was there. inside the .cache.js file and the i printed the variable inside the frame
    Btw, why does gwt need the frame?
    Is there an explanation in the docs?
    Colin Alworth
    @niloc132
    you don't always need it - but it guards against your own code stomping on some external js
    like if gwt decided to name something $, but you already had jquery on the page
    AndreiF
    @andreififiita
    I mean why does gwt loads all code within that frame by default, and not directly in top window
    Ah ok, so it is good patterns / practice
    Colin Alworth
    @niloc132
    using modern modules would make this easier, but gwt2 at least doesnt assume modern js
    AndreiF
    @andreififiita
    And not for "technical" reasons / constraints
    I see, yes
    Colin Alworth
    @niloc132
    correct, you can build a linker that dumps stuff in the top level window
    there may be other reasons that aren't coming to be right away, probably related to hoisting, other js toolkits monkey patching objects that dont belong to them, etc
    AndreiF
    @andreififiita
    @aallnneess i think you can apply a css property, something like "line-break: anywhere" and/or "white-space: normal". Check out the css docs about those. But first, apply a class (gwt styleName) first to control your items properly (from the design persective i mean)
    @aallnneess also, in css you might use "overflow: hidden" togheter with "text-overflow: ellipsis" to slice the text at the end if that is your desire
    @niloc132 i understand
    aallnneess
    @aallnneess
    @andreififiita yes, it was a ** mistake on myside: white-space: nowrap....
    so, i can try as long as the sun shines today with this code snipped in my css class..... :D
    know it works fine
    thanks @all
    AndreiF
    @andreififiita
    @aallnneess aaa of course... the good ol' inherited nowrap, which in 25K lines of css it is hard to find. Very useful tip: use chrome's dev tools, the tab "Computed" (after "Styles", before "Layout")
    search and check for white-space whenever you find this, and then whn you hove the mouse on top, you will see a small arrow, click on it and it will take you to the class/css selector where that instruction is applied
    Rafat J. Al-Barouki
    @rjeeb
    how can I convert byte[] to Blob?
    Rafat J. Al-Barouki
    @rjeeb
    following does that:
          ArrayBuffer arrayBuffer = new ArrayBuffer(bytes.length);
          Uint8Array buffer = new Uint8Array(arrayBuffer);
          buffer.set(TypedArray.SetArrayUnionType.of(bytes));
          BlobPropertyBag options = BlobPropertyBag.create();
          options.setType("application/octet-stream");
          Blob blob =
              new Blob(
                  new Blob.ConstructorBlobPartsArrayUnionType[] {
                    Blob.ConstructorBlobPartsArrayUnionType.of(buffer)
                  },
                  options);
    Stanislav Spiridonov
    @foal
    Hi, the gwt-safehtml-processor 1.0.0-RC1 o maven central contains a reference to the parent with dev version. https://repo1.maven.org/maven2/org/gwtproject/safehtml/gwt-safehtml-processor/1.0.0-RC1/gwt-safehtml-processor-1.0.0-RC1.pom
    Frank Hossfeld
    @FrankHossfeld
    Thanks for reporting, will take a look ...
    Stanislav Spiridonov
    @foal
    :thumbsup:
    cyberquarks
    @cyberquarks
    @rjeeb I have this JSNI code var blob = new Blob([javaScriptObject], {type: "application/octec-stream"}); where it can work to create a Blob from a Javascript object.
    Just Js.cast it before sending to the JSNI and I think that should work
    Colin Alworth
    @niloc132
    @cyberquarks what is "javaScriptObject" in this? it looks like it is probably a Uint8Array, which assuming you made it the same way (wrapping a byte[] array) would be pretty much exactly what rafat did, which he said worked?
    cyberquarks
    @cyberquarks
    Yeah, I didn't see that, you're right
    Colin Alworth
    @niloc132
    @cyberquarks but was it a uint8array, or something else just cast to JSO?
    cyberquarks
    @cyberquarks
    as far as I remember, it was uint8array
    Colin Alworth
    @niloc132
    ok cool