I have a MainView.ux with a MainView.js included.
In the MainView I’m also including NewsItem.ux (like in the SocialMedia-Sample).
Now I’m trying to get access from the NewsItem.ux to a function that’s in the MainView.js
What need I to do? At the moment, it’s crashing, when NewsItem.ux is calling a function from MainView.js (can’t find it - "Callback not found: … ")
Including the same .js-File maybe could work? But I think thats probably not soo good, if I also want to gain access to same Objects and Lists… ?
Hi! Not 100% clear on what you mean here. Maybe you could post some code to illustrate? Thanks
Sure, I will try to give a simple sample of what I mean:
<Page ux:Name="main_page" Background="#34495e">
part of NewsItem.ux:
<StackPanel ux:Class="NewsItem" Margin="0,14,0,10">
I hope that’s a bit more clear now.
So, I included the MainView.js in the MainView.ux - and want to get access to a function in the MainView.js from the NewsItem.ux - but that’s not working.
This should “just work”, there must be some details you are not showing that is making it break.
Did you remember to add
… that’s it. I just forget this one function in the module.exports… Thanks.