Open postite opened 3 years ago
what haxe version?
hello kevin . I run haxe 4.1.4
I reckon this is about transitivity.
Can you try adding @:transitive
to tink.template.Html
?
@:transitive
(:public static function render():)
<div id="home" class="page">
<p>oh!</p>
</div>
(:end:)
is it where @:transition should be placed ? because it's causing compiler to not compile and stays forever at "building" status . I hate when it does this...
it is for the abstract Html
ah ! oh !
package tink.template;
import tink.HtmlString;
import tink.htmlstring.HtmlBuffer as Buf;
@:transitive
abstract Html(HtmlString) from HtmlString to HtmlString { ...
I've done this ... but no change ... I don't get what @:transitive does ... so I'm completely lost here :)
Anyway, if this problem is particular for tink_web, I suggest you use the @:html
metadata instead
@:get("/")
@:html(_ -> Home.render())
public function index(){
return Promise.NOISE;
}
ok nice to know. It doesn't work in my case cause i'm using static extensions ( like : Home.render().withLayout().addAction(Command1).render() ) but i'll go without. btw , your exemple doesn't not render anything. It seems This one does :
@:get("/")
@:html(_ -> views.Home.render()) // full path
public function index(){
return Promise.NOISE.next(n->{hip:"hop"}); // need a next ! ?
}
thx for your efforts :) .
I think this is a bug because Noise will produce empty http response but I think it should respect the html request.
Code pointer for contributors:
compiles with error. tink.core.Promise should be tink.io.RealSource
workaround :
but it shouldn't behave like this huh ?