^ i can call window.prompt with a hard coded strin...
# javascript
a
^ i can call window.prompt with a hard coded string but not the string I want from a kotlin object, get
Copy code
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
k
Can you please provide a complete reproducible example of code?
a
it's basically just this example https://github.com/Kotlin/kotlin-fullstack-sample/tree/master/frontend but trying to call window.prompt(str, str)
b
@aa What exactly did you write?
window.prompt(str, str)
? If so, what is type of
str
?
a
window.prompt("hi", "there") works great. But window.prompt("hi", str) where str is a val of type String doesnt
a
hmm i see what you are saying, and good point, your simple example works. But inside something with kotlinx.html i get
Copy code
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public var CommonAttributeGroupFacade.id: String defined in kotlinx.html
public var CommonAttributeGroupFacade.id: String defined in kotlinx.html
:frontend:compileKotlin2Js FAILED
b
Do you refer to
id
? Looks like the problem is there.
Could you share your version of kotlin-fullstack-sample or something else to reproduce the problem?
a
ahhh, i see my mistake. thank u 🙂
i was calling .id on an something and that was just the wrong name, error msg confused me