Re: Elemental2 and widgets

2020-06-21 Thread Gordan Krešić

On 21. 06. 2020. 08:55, Vegegoku wrote:

sorry, i meant to say : That will *NOT* do the required wiring

On Saturday, June 20, 2020 at 1:55:20 PM UTC+3, Vegegoku wrote:

That will do the required wiring to make elements behave like widgets,
it will not wire events correctly nor it will wire the attach/detach,
you can do it but it is not a simple task, thats why elemento moved the
issue the lib user instead of solving it in the lib itself.


Could you be a bit more specific?

So far, I've tested with only a very simple hierarchy:

	RootPanel -> SimpleLayoutPanel -> [widget/Domino border] -> GridLayout -> 
other Domino elements


and I didn't see any problems, neither with event handling (click listeners 
on GridLayout children) nor with GridLayout.onDetached (didn't test onAttached).


So, where I can expect problems to start manifesting?

Also, back to my initial question: ss there any "best practice" for 
graduately migrating widget-based app to DominoUI?


-gkresic.

--
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/bdc0f30a-fd9e-29c5-a2b7-f0afede76545%40steatoda.com.


Re: StyleInjector chokes on startup

2020-06-21 Thread Gordan Krešić

I'll take the blame for code design, no questions about that :)

Do you think it's worth filing a bug report or this is too much of an edge 
case in a code that is going away soon anyway? Note that I didn't test 
against org.gwtproject.core.client.Scheduler only 
com.google.gwt.core.client.Scheduler (and they do differ, at least regarding 
scheduleFinally).



On 19. 06. 2020. 09:42, Thomas Broyer wrote:

Yes, we can probably consider that a bug in GWT.
I'd also call this pattern of doing real work in a static initializer a code 
smell: 
http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/
While still a flaw considering the above link, it's however a common 
practice to call `ensureInjected()` from the class constructor (ideally, 
you'd rather call it in a lifecycle method, such as Activity#start, or 
Widget#onAttach); and that would likely fix your issue here.


On Thursday, June 18, 2020 at 8:33:06 PM UTC+2, Gordan Krešić wrote:

On 18. 06. 2020. 20:25, Gordan Krešić wrote:
 > Probably unrelated with StyleInjector but with Scheduler.scheduleFinally

Ok, I've put a most basic repro case to prove that this is a Scheduler
issue:

public class Foo {

 static {
 Scheduler.get().scheduleFinally(() ->
GWT.log("Finally!"));
 }

}

Now initialite Foo on startup (in EntryPoint.onModuleLoad() for example),
but "Finally!" will be printed only *after* first event loop, like
described:

Scheduler.get().scheduleFixedDelay(() -> {
 return false;
}, 0);

 -gkresic.

--
You received this message because you are subscribed to the Google Groups 
"GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to google-web-toolkit+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/1ecd7663-8a5a-449e-aef5-4008d3735433o%40googlegroups.com 
.


--
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/a5d5da00-838b-ae4d-2ecd-f78c0d5dd522%40steatoda.com.