this addentry blog page have made scratch , there underlying problems code particularly clear button supposed clear text entered when button clicked on doesn't work have saved html file problem. also 1 other problem submit button works doesn't pass of text index file have written php , reason whenever click on submit button redirects me index page without posting entry have made. <!doctype html> <html> <head> <script> function message() { alert("clear form?"); } </script> <style> body {background-color: beige;} h1 {color: black;} p {color: black;} textarea { width: 50%; height: 150px; padding: 12px 20px; box-sizing: border-box; border: 2px solid #ccc; border-radius: 4px; background-color: white; font-size: 16px; resize: none; } div { padding-left: 20px; } </style> </head> <meta charset="utf-8"> <link rel="stylesheet" href="....
i want print values of properties of class. fun print() { val cl = this::class cl.declaredmemberproperties.filter {it.visibility != kvisibility.private}.foreach { println("${it.name} = ${it.get(this)}") } } when try build code compiler error: error:(34, 40) kotlin: out-projected type 'kproperty1<out someclass, any?>' prohibits use of 'public abstract fun get(receiver: t): r defined in kotlin.reflect.kproperty1' when change this class name someclass fine fun print() { val cl = someclass::class cl.declaredmemberproperties.filter {it.visibility != kvisibility.private}.foreach { println("${it.name} = ${it.get(this)}") } } so problem compiler changers type of this::class kclass<out someclass> instead of using kclass<someclass> . idea why happen? the reason difference that, when use someclass::class reference, sure class token representing someclass , not 1 of possible...
Comments
Post a Comment