We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import cax from './index'
export default class poker extends cax.Group { constructor() { super() const bitmap = new cax.Bitmap('../../image/user_avatar_test.png') bitmap.scaleX = bitmap.scaleY = 0.5 this.add(this.bitmap) } }
error: Cannot set property 'parent' of undefined;at "pages/live/live" page lifeCycleMethod onLoad function TypeError: Cannot set property 'parent' of undefined at poker.add (http://127.0.0.1:35894/appservice/components/cax/index.js:298:35) at new poker (http://127.0.0.1:35894/appservice/components/cax/poker.js:29:11) at r.onLoad (http://127.0.0.1:35894/appservice/pages/live/live.js:67:17) at r. (
The text was updated successfully, but these errors were encountered:
@JasonMiss 你的代码写错了,居然把 undefined的东西add到group里。修改:
this.add(this.bitmap)
改成
this.add(bitmap)
Sorry, something went wrong.
No branches or pull requests
import cax from './index'
export default class poker extends cax.Group {
constructor() {
super()
const bitmap = new cax.Bitmap('../../image/user_avatar_test.png')
bitmap.scaleX = bitmap.scaleY = 0.5
this.add(this.bitmap)
}
}
error:
Cannot set property 'parent' of undefined;at "pages/live/live" page lifeCycleMethod onLoad function
TypeError: Cannot set property 'parent' of undefined
at poker.add (http://127.0.0.1:35894/appservice/components/cax/index.js:298:35)
at new poker (http://127.0.0.1:35894/appservice/components/cax/poker.js:29:11)
at r.onLoad (http://127.0.0.1:35894/appservice/pages/live/live.js:67:17)
at r. (
The text was updated successfully, but these errors were encountered: