Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Colin Alworth
    @niloc132
    having a jdk preview doesn't help us, we need solid support in JDT (not just a preview, for example)
    norzak
    @norzak
    Is there a faster way to convert Int8ArrayNative to byte[]?
    norzak
    @norzak
    Same question for elemental2 Int8Array to byte[]
    Colin Alworth
    @niloc132
    @norzak c.g.g's Int8ArrayNative and elemental2's Int8Array are the same type in plain JS
    if you are just iterating the contents of the byte[], you can just do a Js.uncheckedCast to get from either to byte[] (but not vice versa)
    if however you are actually serializing this via gwt-rpc or doing anything else which will call array.getClass() and expect a byte[] type back, then you must instantiate the byte[] in java and copy the values over
    norzak
    @norzak
    @niloc132 thanks for the reply. not vice versa part is the one I wanted. Anyways, thanks for the info on gwt-rpc.
    Colin Alworth
    @niloc132
    @norzak can you clarify on what you're trying to do? if you're saying that you did want the "turn byte[] into typedarray" (i'm not quite sure what you were saying there), you might be able to find a way, such as creating a typed array, casting to byte[], populating it through something, and then consuming it that way
    but it will really depend on what exactly you had in mind
    (and as ever, measure, then cut, the naive implementation of what you're thinking on might already be pretty good)
    norzak
    @norzak
    @niloc132 sorry for the late reply. I think what I have is already the only way to implement using GWT on array conversions. On the other hand, I hit a very peculiar exception today. Knowing JavaScript is not a concurrent runtime, I am getting an interesting "Uncaught Error: java.util.ConcurrentModificationException" on my compiled javaScript application. How is that event possible? probably the iterator of the array list, very interesting.
    Colin Alworth
    @niloc132
    @norzak without threads, you can still hit a CME by modifying while iterating
    most commonly you have a for-each loop on a collection, and within that loop, modify the collection
    if you add an item to a list, does it skip that? does it go back and iterate it? etc
    java semantics, even within a single thread, are to throw that exception to indicate it was modified during iteration
    norzak
    @norzak
    @niloc132 just looked at the AbstractHashMap code, I am deleting while iterating. Interestingly bytecode version never complained about it because deleting while iterating in a single thread should be okay to my understanding.
    norzak
    @norzak
    @niloc132 I have fixed it. Still very interesting to see that the iteration is not very reliable.
    Colin Alworth
    @niloc132
    at least as of java8, java.util.HashMapHashIterator.nextNode() can hit this just if the modcount doesnt match, same as gwt
    i.e. "if you modified the underlying map more after the iterator was created, we will throw an exception"
    norzak
    @norzak
    @niloc132 thanks for the heads up :)
    Colin Alworth
    @niloc132
    final automated tests running on jetty+htmlunit upgrade (not yet tried other things like asm, will try it out later), it'll need some manual tests next. anyone interested right away in a build that can do this, get a little more testing in before i put up a patch for review?
    Daniel Korbel
    @masterdany88
    Hi Guys. Do YOu have any idea how to put compilation date time and machine to html/ ui
    ?
    I am thinking about resources and resources filters
    Ahmad K. Bawaneh
    @vegegoku
    I use a TextResource with the Last build on : ${maven.build.timestamp} and make sure filtering is enabled in maven
    <resources>
                <resource>
                    <directory>src/main/resources</directory>
                    <filtering>true</filtering>
                </resource>
            </resources>
    Frank Hossfeld
    @FrankHossfeld
    In case you are using Nalu and your context extends AbstractModuleContext-class, you get it from the context.
    Ahmad K. Bawaneh
    @vegegoku
    @FrankHossfeld How do you set it in the context class?
    Frank Hossfeld
    @FrankHossfeld
    The nalu processor set the timestamp when generating the applicationImpl-class.
    Daniel Korbel
    @masterdany88
    My context class implements IsContext
    import com.github.nalukit.nalu.client.context.IsContext;
    Daniel Korbel
    @masterdany88
    I change and it works greate :D
    I am getting 2021-09-09 13:54:03.704000000
    but getApplicationVersion returns: APPLCIATIOPN-VERSION-NOT-AVAILABLE
    how to set up version
    ?
    Frank Hossfeld
    @FrankHossfeld
    answered in the Nalu room
    Colin Alworth
    @niloc132
    This message was deleted
    zhivko
    @zhivko
    Hey guys I am trying to include collabora in my gwt application - and I think I am experiencing SOP (Same Origin Policy) problems, since collabora that is loaded in iframe wont open...
    Any idea how I can get around this problem?
    image.png
    It looks like:
    Frank Hossfeld
    @FrankHossfeld
    It looks like your parent app tries to set focus on a TextArea inside the iFrame.
    raovikas
    @raovikas
    Hi Guys , I have to send some object from one view to another view so I am using EventBus for it in GWT MVP(Place/Activity) application . But if I refresh the page it lost its UI state , I want that if user refresh the browser UI state should not lost . How I can achieve it into GWT . @niloc132 @FrankHossfeld @vegegoku @tbroyer can anyone guide on it ?
    Thomas Broyer
    @tbroyer
    Depends what kind of "UI state" you're talking about. You could add it to your place (ah, if only PlaceController had a replace in addition to goTo…), or save it in sessionStorage and restore it on activity start.
    raovikas
    @raovikas
    I have Form , to fill the fields with values , I getting object from another View using EventBus but if I refresh the page in that case I do not have that object and form fields become empty on page refresh
    raovikas
    @raovikas
    @tbroyer PlaceController do not have replace
    Frank Hossfeld
    @FrankHossfeld
    Yep, that mentioned Thomas. And as Thomas wrote , the only way to fulfill your request is using a sessionStorage. You can use a Singleton to store your form data inside you GWT application, but keep in mind, doing a reload on place 2 will destory your stored data and you need to go back to the first place and the user needs to enter the data again!
    Frank Hossfeld
    @FrankHossfeld
    Ok, just see, that you want to handle a reload. Then you need any kind of sessiuonStorage. Please ignore my comment using a singleton.
    raovikas
    @raovikas
    ok thanks
    zhivko
    @zhivko
    Do you think gwt blocks access and execution of JS that is loaded part of iframe?