Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Declare view in window2 and access it in index

$
0
0

Hi all,

I have two windows: index and toolbar

in toolbar.xml I have declared the following:

<Alloy>
    <Window class="container">
            <View id="addTextView" bottom="0" left="0" width="62.5" height="60" zIndex="5">
                <ImageView image="/images/layout/toolbar/phone.png" bottom="10" left="20" zIndex="5">
                    <Require type="view" src="index" id="toolBarOne"/>
                </ImageView>
            </View>
    </Window>
</Alloy>
And now in index.js I want to add this view containing the view, what have I done wrong? I´m trying this way (I have a mainview declared in index.xml):
$.mainView.add($.toolBarOne);
I get the following error message: [ERROR] : Script Error = -[NSNull krollObjectForBridge:]: unrecognized selector sent to instance 0x36b8678 at index.js (line 58).

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>