Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 01 02:52
    emugel commented #90
  • Dec 01 02:13
    kevinresol commented #92
  • Dec 01 01:54
    emugel commented #92
  • Dec 01 01:46
    emugel commented #92
  • Dec 01 01:42
    emugel commented #92
  • Dec 01 01:42
    emugel commented #92
  • Dec 01 01:42
    emugel commented #92
  • Dec 01 01:32
    kevinresol commented #92
  • Dec 01 01:31
    emugel commented #92
  • Dec 01 01:31
    emugel commented #92
  • Dec 01 01:29
    emugel commented #92
  • Dec 01 01:29
    emugel commented #92
  • Dec 01 01:19
    emugel commented #92
  • Dec 01 01:15
    emugel commented #92
  • Dec 01 01:13
    emugel commented #92
  • Dec 01 01:10
    emugel edited #92
  • Dec 01 01:09
    emugel commented #92
  • Nov 30 16:01
    back2dos commented #92
  • Nov 30 15:36
    emugel edited #92
  • Nov 30 15:34
    emugel edited #92
Juraj Kirchheim
@back2dos
what's avalonia? ^^
does that mean coconut actually builds on hxcs? :D
Rudy Ges
@kLabz
Yep it's the one
And yeah seems like it builds on hxcs now x)
Juraj Kirchheim
@back2dos
nice :)
Rudy Ges
@kLabz
I can't get much more than that atm though xD
Juraj Kirchheim
@back2dos
well, it's almost enough to make a counter example, which is the true purpose of all UI frameworks!
Rudy Ges
@kLabz
Nope it breaks with a view xD tried the counter :P
Juraj Kirchheim
@back2dos
ohno
Rudy Ges
@kLabz
Eh, got it to run but now I need to fix timers x)
Rudy Ges
@kLabz
Timers are fixed but I still have a variance issue in AutoObserver with SubscriptionTo's cast failing :/
Juraj Kirchheim
@back2dos
anyone ever played with coconut + some 3d engine (perhaps via react)?
I thought I saw some comment somewhere, but can't find it again
@kLabz have you tried -D erase-generics or whatever it was called?
24 replies
Kevin Leung
@kevinresol
I tried coconut+haxeui+heaps some time ago
Rudy Ges
@kLabz
Hmm not sure, will try tonight
Kevin Leung
@kevinresol
I also used coconut + react + threejs
Juraj Kirchheim
@back2dos
was that any good? ^^
Kevin Leung
@kevinresol
It works. Using react-three-fiber which I think is a custom reconciler specifically for threejs
It is declarative and can fit into an existing react app
But it only cover the core types. Plugins and such will still need manual work using refs etc
Kevin Leung
@kevinresol
But tbh I didn't do very complex stuff with it. I'm using it to display some 3D models plus some basic camera control.
Rudy Ges
@kLabz
If material-ui users have an opinion about this: kLabz/haxe-material-ui#21 please share (there if possible?)
(cross-posting this here too since I think @kevinresol at least uses/used material-ui but isn't in haxe-react gitter if I'm not mistaking)
Rudy Ges
@kLabz
Welp, gave up on hxcs and hxcpp targets for now x)
Found https://nodegui.org/ which has react wrappers and uh seems to work fine so far (will start writing proper externs and porting my app)
Should work fine with coconut too, if some of you want to write "native" (Qt) applications using coconut and js target (nodejs bindings for qt)
Kevin Leung
@kevinresol
awesome
does it run a v8 to script the native Qt?
Rudy Ges
@kLabz
Seems like it yeah
Should be fast enough, it's no electron x)
Rudy Ges
@kLabz
Not covering qtquick (so so material design etc) nor mobile atm though
Rudy Ges
@kLabz
Any idea why I get "Markup literals must be processed by a macro" when I add -lib coconut.react-dom to a react project? (that uses -D react-auto-jsx to wrap all @:markup expr in render in a jsx() call)
Also, should I use View instead of ReactComponent pretty much everywhere? (except externs)
Juraj Kirchheim
@back2dos
not necessarily ... coconut views are a bit heavier (particularly memory wise), but are pretty good at avoiding rerenders
as for the error, no idea ... please raise an issue in coconut.react-core
But yeah, had nodegui on my radar for a while now: MVCoconut/coconut.ui#83 ^^
Rudy Ges
@kLabz
It works nicely so far :P
Uldis Baurovskis
@hansagames

Hi, struggling a bit with coconut.ui for feathersui,
there are lot of object properties in feather framework, for example, layout, at the moment I create them as properties and then set their values in render method that is not very convient, but I could not find any other way. Maybe someone have better ideas how to handle such complex propreties in hxx?
Example code:

class TestView extends View {
    final verticalLayout = new VerticalLayout();
    public function render() {
        verticalLayout.gap = 10.0;
        return hxx('
            <LayoutGroup layout=${verticalLayout}>
                <TranslatedText
                    textId="game_play_content_1_text"
                    textCollection="rules"
                    style="rulesText"
                />
            </LayoutGroup>
        ');
    }
}

In react I add such stuff in constructor but as I understand coconut view can not have custom constructor

Scott
@scottPlusPlus
Is there a way to check I have haxeshim installed correctly? Anything I need to do other than
yarn global add haxeshim
Clark Jones
@clarkjones
Hi @kevinresol, Are there any known issues with vdom and storybook? Not sure what I'm missing here but I can't seem to get my components to display using storybook-coconut. The story nav is there and render functions are being called but not actually displaying. I had this working at one point with an older version of haxe and coconut though
Kevin Leung
@kevinresol
not sure... I only used react recently...
5 replies
Emugel
@emugel
say instead of a @:computed variable, one uses a function f(x:X):Promised<Y> (because computed properties can't have parameters). Would returning Promised<Y>provide automatic updates in the views? Or should one instead return Observable then bind it?
Kevin Leung
@kevinresol
you can keep track of the parameter and thus the result
@:editable var param:X;
@:computed var result:Promised<Y> = f(param);
but usually you don't want to produce Promised manually
but produce them via @:loaded instead
@:editable var param:X;
@:attr f:X->Promise<Y>;
@:loaded var result:Y = f(param);
Emugel
@emugel
right but then you need as many @:editable and @:computed entries as your variable X can take. So for 3 values you end up with 6 lines
or same in the second example. If you loaded a table, and you want to select a cell from this table, then you have to use a function
Kevin Leung
@kevinresol
you need to keep track of the selection somewhere anyway
I mean you will need a @:editable or @:observable for the cell address anyway