Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 15 09:45

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jan 15 09:45

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jan 15 09:44

    kevinresol on master

    Bump path-parse from 1.0.6 to 1… Merge pull request #16 from MVC… (compare)

  • Jan 15 09:44
    kevinresol closed #16
  • Jan 15 09:44

    kevinresol on master

    Bump postcss from 7.0.35 to 7.0… Merge pull request #20 from MVC… (compare)

  • Jan 15 09:44
    kevinresol closed #20
  • Jan 15 09:40
    dependabot[bot] edited #16
  • Jan 15 09:40
    dependabot[bot] edited #16
  • Jan 15 09:40
    dependabot[bot] synchronize #16
  • Jan 15 09:40

    dependabot[bot] on npm_and_yarn

    Bump path-parse from 1.0.6 to 1… (compare)

  • Jan 15 09:40
    dependabot[bot] edited #16
  • Jan 15 09:40

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jan 15 09:40
    dependabot[bot] closed #14
  • Jan 15 09:40
    dependabot[bot] edited #14
  • Jan 15 09:40
    dependabot[bot] commented #14
  • Jan 15 09:40
    dependabot[bot] labeled #20
  • Jan 15 09:40
    dependabot[bot] opened #20
  • Jan 15 09:40

    dependabot[bot] on npm_and_yarn

    Bump postcss from 7.0.35 to 7.0… (compare)

  • Jan 15 09:40
    dependabot[bot] edited #16
  • Jan 15 09:40
    dependabot[bot] edited #14
ousado
@ousado
@back2dos at least that's what the MDN documentation suggests
serjek
@serjek

hey guys. I need to make controlled var out of editable that comes from another place. My thinking was to use shared but I can't get it to work. My example:

class ModelA implements Model {
  @:editable var yo:String;
}

class ModelB implements Model {
   @:shared var yo:String;
   @:constant var view:RenderResult = hxx(<MyView yo = $yo/>);
}

class MyView extends View {
   @:controlled var yo:String;
}

var modelA = new ModelA({yo: "default yo"});
var modelB = new ModelB({yo: modelA.yo});

what did I miss?

Juraj Kirchheim
@back2dos
seems fine
what happens? ^^
serjek
@serjek
in fact variable that I'm trying to proxy is MyEnum and here is what I get:
MyEnum should be Null<coconut.data.Variable<MyEnum>> at the line where I create instance of modelB
serjek
@serjek
coconut data is latest from git
serjek
@serjek
perhaps, my haxe is outdated: 4.1.5
Juraj Kirchheim
@back2dos
ah ... yeah ... you'll have to do new ModelB({yo: modelA.observables.yo });
can only make this nicer if this is resolved: HaxeFoundation/haxe#10348
serjek
@serjek
ok cool that worked and I can stay with my good old 4.1.5. can not upgrade because of this: haxetink/tink_core#143
serjek
@serjek
another one: can I pass controlled var to children and control it from there?
serjek
@serjek
to make things worse, value i want to proxy is the enum abstract(String). but nvm, i believe it’s an edge case and easy to make a workaround.
Kevin Leung
@kevinresol
you can manually cast the NEVER as a workaround for now: (Promise.NEVER:Promise<Int>)

another one: can I pass controlled var to children and control it from there?

ya

ousado
@ousado
in @:computed and @:loaded, is $last always the result of the last evaluation, or is it the result of the last evaluation that had a different value?
Juraj Kirchheim
@back2dos
it should be the last evaluation, no matter what
(for @:loadedthe last successfully completed one)
if you do return the same value though, then the change propagation stops there (i.e. if nothing else changed, any binding or view depending on the value will bail out)
serjek
@serjek
thanks Kevin!
Rudy Ges
@kLabz

With

class MyModel implements Model {
  @:editable var foo:String = null;
}

I should be able to do that in a view, right?

@:state var model = new MyModel();
// ...
model.foo.set("bar");

I'm getting String has no field set

ousado
@ousado
@kLabz I think you just assign to @:editable
Rudy Ges
@kLabz
From outside? (edit: indeed, works; thanks)
Also, my components don't re-render when a @:state changes (or its observable fields) changes, somehow Oo
Rudy Ges
@kLabz
Ok that was because of a weird setup
Juraj Kirchheim
@back2dos
well, if it's likely enough to run into, I wouldn't mind a ticket ... to the degree that it's possible and not obstructive, coconut is supposed to tell you that something looks unobservable
Rudy Ges
@kLabz
image.png
WIP masochist project o/
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.