Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:15
    greenkeeper[bot] commented #5428
  • 04:15

    greenkeeper[bot] on can-observable-array-1.0.6

    fix(package): update can-observ… (compare)

  • Nov 19 17:27
    greenkeeper[bot] labeled #5428
  • Nov 19 17:27
    greenkeeper[bot] opened #5428
  • Nov 19 17:27

    greenkeeper[bot] on can-observable-array-1.0.5

    fix(package): update can-observ… (compare)

  • Nov 19 16:49
    cherifGsoul opened #5427
  • Nov 19 16:39

    cherifGsoul on obserbale-properties-update-debugging-guid

    (compare)

  • Nov 19 16:39

    cherifGsoul on master

    Remove ViewModel wording from d… Fix observable properties wordi… Fix typo and 2 more (compare)

  • Nov 19 16:39
    cherifGsoul closed #5425
  • Nov 19 16:29
    cherifGsoul synchronize #5425
  • Nov 19 16:29

    cherifGsoul on obserbale-properties-update-debugging-guid

    Fix another typo (compare)

  • Nov 19 15:25
    cherifGsoul synchronize #5425
  • Nov 19 15:25

    cherifGsoul on obserbale-properties-update-debugging-guid

    Fix typo (compare)

  • Nov 19 10:20
    greenkeeper[bot] labeled #5426
  • Nov 19 10:20
    greenkeeper[bot] opened #5426
  • Nov 19 10:19

    greenkeeper[bot] on can-attribute-observable-2.0.2

    fix(package): update can-attrib… (compare)

  • Nov 18 21:05

    nlundquist on master

    Update dist for release (compare)

  • Nov 18 21:05

    nlundquist on v6.2.6

    Update dist for release 6.2.6 (compare)

  • Nov 18 20:22
    cherifGsoul review_requested #5425
  • Nov 18 20:22
    cherifGsoul commented #5425
Gregg Roemhildt
@roemhildtg
image.png
Kevin Phillips
@phillipskevin
ios safari you mean?
Gregg Roemhildt
@roemhildtg
Well, the same issue also appears in firefox, chrome, on iphone and ipad
Kevin Phillips
@phillipskevin
all browsers on ios use the same javascript engine
what does your template look like for the <option>s?
Gregg Roemhildt
@roemhildtg
<select {($value)}="value" class="form-select form-control" name="{{properties.name}}">
    {{#each properties.options}}
        <option value="{{value}}">{{label}}</option>
    {{/each}}
</select>
Kevin Phillips
@phillipskevin
ok, I don't see anything obvious. can you submit an issue also?
Gregg Roemhildt
@roemhildtg
Sure. It is related to the promise I mentioned. Providing an array list that is available immediately works.
Kevin Phillips
@phillipskevin
ok, how is the promise specified?
in your VM
Gregg Roemhildt
@roemhildtg
I'm passing an object to a component that has a .optionsPromise property
So I can pass either options or optionsPromise
canjs/canjs#3427
Frank Lemanschik
@frank-dspeed
https://www.npmjs.com/package/landscaper should be moved to a public accessible place so that some one can work more easy with it :)
AntonProkofyev
@AntonProkofyev

Hi guys, i have a question
i have simple connect like
let userConnection = connect( [url, constructor], { url: { getData: 'GET /user' } });
which returns someting like {name: 'Name'}

i have wm

let AppViewModel = DefineMap.extend( {    
    user: {
        get: function (lastSetValue, resolve) {
            userConnection .get().then(resolve);
        }
    }
});

let appVM = new AppViewModel({});

i'm using simple template like {{user.name}}. But when i get response i can see name but i can also see
Uncaught (in promise) TypeError: Cannot define property _instanceDefinitions, object is not extensible define-helpers.js:17.
Am i doing anything wrong with asynchronous getters? May be someone know why is this error appears?

Frank Lemanschik
@frank-dspeed
ithink its because user.name
is not a property
but my english is to bad to explain you that better and shorter simply wait for some one but it looks like your doing it wrong
AntonProkofyev
@AntonProkofyev
mmm i got response {name: 'Name'} from the server and i see Name on the page
Kevin Phillips
@phillipskevin
can you put a breakpoint in define-helpers and see what property is being set?
Frank Lemanschik
@frank-dspeed
i can't tell you more i never used it like you do
with the lastSetValue and resolve
i return the value and i get the value
Kevin Phillips
@phillipskevin
take a look at canjs/can-route#98
see if it is the same thing you are doing @AntonProkofyev
Frank Lemanschik
@frank-dspeed
@phillipskevin couldn't he directly return the promis and don't use resolve?
i think he could simply return userConnection.get() ?
Kevin Phillips
@phillipskevin
he could, but it would make the template more complicated
and not fix this problem
Frank Lemanschik
@frank-dspeed
why would that affect the template
i always return pormis
and get directly the value
Kevin Phillips
@phillipskevin
you have to do user.value.name in the template
AntonProkofyev
@AntonProkofyev
mmm let me check
Frank Lemanschik
@frank-dspeed
hmmm i always do this each stuff for user.value
Kevin Phillips
@phillipskevin
@AntonProkofyev the way your code is, user.name is fine
Frank Lemanschik
@frank-dspeed
and that works great
ah
Kevin Phillips
@phillipskevin
you can do it that way, @frank-dspeed
Frank Lemanschik
@frank-dspeed
then i have no value when i use his code style
interristing
Kevin Phillips
@phillipskevin
using the async getter with resolve, you don't have to do it that way
user is the value if you use resolve
Frank Lemanschik
@frank-dspeed
but then i can also do no waiting like if isResolved right?
because i only get the value
i understand the diffrence is getting a promis or a value i understand
Kevin Phillips
@phillipskevin
right
Frank Lemanschik
@frank-dspeed
do you know a code that would allow me to change the value every x secunds?
Kevin Phillips
@phillipskevin
I usually do promises like this:
    userPromise: {
        get: function () {
            return userConnection.get();
        }
    },
    user: {
        get: function(last, resolve) {
            this.userPromise.then(resolve);
        }
    }