Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 01 07:29
    back2dos synchronize #91
  • May 01 07:29

    back2dos on v1

    Add key value iterator to Child… (compare)

  • Apr 28 23:26
    dependabot[bot] labeled #30
  • Apr 28 23:26
    dependabot[bot] opened #30
  • Apr 28 23:26

    dependabot[bot] on npm_and_yarn

    Bump cross-fetch from 3.1.4 to … (compare)

  • Apr 28 21:11
    dependabot[bot] labeled #29
  • Apr 28 21:11
    dependabot[bot] opened #29
  • Apr 28 21:11

    dependabot[bot] on npm_and_yarn

    Bump async from 2.6.3 to 2.6.4 … (compare)

  • Apr 26 13:20
    darmie opened #94
  • Apr 10 17:59
    dependabot[bot] labeled #28
  • Apr 10 17:59
    dependabot[bot] opened #28
  • Apr 10 17:59

    dependabot[bot] on npm_and_yarn

    Bump minimist from 1.2.5 to 1.2… (compare)

  • Apr 02 18:09
    back2dos synchronize #91
  • Apr 02 18:09

    back2dos on v1

    Slightly better Attribute imple… (compare)

  • Mar 31 09:19
    kevinresol commented #59
  • Mar 31 09:18
    kevinresol commented #59
  • Mar 29 16:28
    back2dos opened #82
  • Mar 26 17:48
    dependabot[bot] labeled #23
  • Mar 26 17:48
    dependabot[bot] opened #23
  • Mar 26 17:48

    dependabot[bot] on npm_and_yarn

    Bump minimist from 1.2.5 to 1.2… (compare)

Kevin Leung
@kevinresol
Anyway I think you can manually forward them
class MyView extends View {
    public var div:DivElement;
    function render() '<div ref=${element -> div = element}/>';
}

class Wrapper extends View {
    public var ref:DivElement;
    function render() '<MyView ref=${myView -> ref = myView.div}/>';
}
Juraj Kirchheim
@back2dos
you can do Renderer.getNative(this) in viewDidRender to get the native thing even if there's indirection via a child
use with caution though ;)
ousado
@ousado
(how) does cix support custom properties/CSS variables? ( https://developer.mozilla.org/en-US/docs/Web/CSS/var() )
can I make it swallow arbitrary strings somehow?
Juraj Kirchheim
@back2dos
well, you can, but it ain't pretty
raw("something here") is usable as a value and will generate something here
but if you can open an issue, ideally with a short summary of what's required to support at least the most useful features of css vars, I can look into it ;)
ousado
@ousado
@back2dos awesome, thanks! I think the vars are simple substitutions, and the only "feature" (that I've seen) is a fallback in case the given name evaluates to something invalid. as in var( --my-var, fallbackvalue )
Juraj Kirchheim
@back2dos
so ... allow --ident in value place and allow for a var builtin and that's it?
Rudy Ges
@kLabz
Might want something to declare/update a var too? (so --ident: any value)
Wait, you need to allow var(--ident) / var(--ident, any fallback value, including comma) in value place, not --ident
Juraj Kirchheim
@back2dos
well, --ident: value is incidentally supported, because property names starting with dash are allowed for the purpose of vendor prefixed things
Juraj Kirchheim
@back2dos
anyway, I suppose it's best I read up on it ... seems like these days it's pretty standard anyway ^^
Rudy Ges
@kLabz
Didn't prevent me from forgetting about fallback in haxe-react-css xD
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!