On 4/26/07, Jason C Reynolds <[EMAIL PROTECTED]> wrote: > MainApp > contentHolder = new Canvas(); > this.addChild(contentHolder); > contentScreen = new SampleScreen(); > contentHolder.addChild(contentScreen); // HERE is what I want to work, > contentScreen extends UIComponent - so in my mind it should work (show up on > screen). > > SampleScreen > question = new Text(); > question.text = "some text"; > this.addChild(question); // HERE is the other change from the working version.
So if you add the Text object directly to the Canvas, it works, but, if there's a UIComponent in between, it doesn't. Canvas => UIComponent => Text // doesn't work Canvas => Text // works Suggestions: 1) Check question.parent.parent ... is it pointing to the Canvas? 2) Compile with -debug and see if you're getting a runtime error (and see the stack trace) 3) Are you overriding measure() in your UIComponent? If not, at least set its width and height explicitly.