InvokeAction yields App Crash - windows-phone-8

using V2.0.0.5 - beta (not via nuget but compiled source).
All through out the application I am using Multi-View over single ViewModel. On one particular view now after a conversion from SQLCE to SQLite, I am getting either a race condition or invalid contextual return when it builds up the on the InvokeAction. One thing I am noticing is a ArgumentException on System.Windows.ni.dll and well the part of the problem is the Telerik Control primitives.dll... RadTransitionControl
The only difference between this view and another with almost exactly the same build out is the way I populate the view. The view is using a "non-table" viewmodel that I built up to show some related information between 2 related tables. When I selected one of the elements in the boundlist it presents RadMenu (edit/delete) selecting edit works goes into the method expected, using the data passed in from the selection event I am able to re-hydrate the dataitem in question to respective objects. And populate the view but it dies before completing the transition from view to view.
The thing that blows my mind here is that I am using that control all over for Transistions from one view piece to another, if I change the control to ContentControl it works just fine. Other views that have that control work as expected. Any ideas?

Moving some of the code around and separating some of the bundled code resulted in this not occurring guess problem fixed...

Related

Exception Breakpoint fires when copying View Controller between projects

I've customized a tutorial and am trying to import it into my project. After copying one View Controller Scene from Document Outline into my main project, it's throwing an exception without any description of the issue. The View Controller is subclassed, so I've made sure to import the associated Swift file and set it in Document Attributes.
I don't know how to troubleshoot this one.
===EDIT===
I'm at a total loss here. I created a new project and was able to import, build, and run the project. The only difference between my main project and the new one is the VC is not the initial View Controller.
The tuturial was written in XCode 11 and Swift 4. I haven't upgraded yet, but again I was able to import into a new project w/o issue.
Check the Connections inspector (the last option on the right sidebar) and make sure there are no connections with exclamation marks (!) after them.
If there are errors, check in the Identity inspector (the third option from the left on the right sidebar) if the class of the view controller is correct.
If the connections are not needed anymore (you gave the outlet a new name etc.), remove them by clicking on the X next to them.

List box is not updating in Windows Phone 8

I am developing one application, in that I have 3 pages. In first page I have List Box with some data and in 3rd page I have application bar for navigating to first page. I will get the list box data from the server. Whenever I am binding the List Box with server data, it is rendering properly but if the user navigate from 3rd page to 1st page using application bar then List box is not updating with fresh data, it is still displaying old data. If user comes to first page using back key press then new data is rendering.
I am using observable collection to bind List Box data and used NavigationService.Naviagte() for navigation.
Help me to resolve this issue.
Thanks in advance.
I am not very sure about your problem because you haven't cleared the whole context. But assuming that your data is refreshing on back key press, I can suggest you use NavigationService.GoBack() instead of NavigationService.Naviagte(). The former method call is equivalent to back key press. NavigationService.Naviagte() creates another instance of the page in the memory while NavigationService.GoBack() takes you back to the previous instance. Hope this helps.
As I understand everything is fine when you start. But the update is not happening upon second return, i.e. Through navigation.
My thought is that all your code to do this is in the constructor, and since the page is not removed from memory the constructor will not be called.
Two solutions move the code to a loaded event. Simply in the constructor write this.loaded += eventname;
Or you could put code in the onnavigatedto event. Write as a new function protected override onnavigatedto.
Putting it in the navigatedto, would probably make your app less responsive if you do server calls. If you have the code in the loaded event then the information will be uploaded when it is done. Which means the user will have a moment with old information. You could then introduce a waiting screen if it is an issue.

How to check if UiInstance is running?

How to check if a UiInstance is already running? I need to know so that I know whether to use UiApp.getActiveApplication() or UiApp.createApplication(); The issue is that the functions may not be called in a particular order.
No offense but this question doesn't make a lot of sense to me... There can be only one UiApp instance and in a standalone app it must start with a doGet() so I wonder how you could start an app without starting by the app creation ?
Once you have created this instance it lives as long as you close your browser window of you hide all the possible source of user actions (for example hiding all the widgets or disabling all the buttons) and everything that happens in between is either the result of a handler call or a direct function call in the script, all of which are necessarily subsequent and therefor using getActiveApplication().
If I missed something (which is entirely possible of course) please explain.
Edit : following your comment :
In case you use UiApp embedded in a document the situation is a bit different but not so much :
2 different cases :
Dialogs :each time you create a new one it will appear "over" the existing one but won't be "aware" of it, i.e none of the first UI values will be available to the next one. So it's a better idea to close each one before creating a new one (app.close();return app;) otherwise you'll have to manually close each "layer" successively since I guess it wouldn't be a good idea to keep the dialog on the screen all along :-)
Data passing from one instance to the other must be handled using some kind of storage.
Sidebar : what I'd suggest is to create a starting UI in the sidebar that creates the Ui (showing a welcome message or a menu for example) and let all the other function get this Ui Instance using getActiveApplication() , that will avoid the UI "flashing" while it's been redrawn and allow you to play with all the values all along.
In both case the choice is really yours but the practice I suggest works better and gives you full control on what happens.

Error using Dynamic Data Filtering: missing datasource

I am trying to use the ASP.NET Dynamic Data Filtering project, but I'm running into a problem during the configuration.
I'm following the instructions on the author's blog, and everything works like described. Then it tells me to change the datasource using the designer view. I am told to select the "GridDataSource" in the "Configure data source" wizard. This option is not there though.
I get all of the classes in my project, including the DataContext that was generated by Linq. When I choose "Show only DataContext objects", the dropdown ("Choose your context object:") is completely empty.
When I turn of the checkbox and choose my DataContext class, I get asked which table I want and all that. But, as the whole purpose of a Dynamic Data site is NOT to use one single table, that's not much help.
So I've looked at the instructions again and copied the resulting datasource from the example:
<asp:DynamicLinqDataSource ID="GridDataSource" runat="server"
EnableDelete="True" EnableUpdate="True"></asp:DynamicLinqDataSource>
Which is exactly what I had, without the "WhereParameters" nodes in there.
Now, when I run the list page however, I get an exception about a missing datasource from the filtering component. Of course when I remove the DynamicFilterRepeater, it works again.
This is the meat of the exception:
[InvalidOperationException: Missing DataSource]
Catalyst.Web.DynamicData.DynamicFilterRepeater.GetTable() in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:74
Catalyst.Web.DynamicData.DynamicFilterRepeater.GetFilters() in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:81
Catalyst.Web.DynamicData.DynamicFilterRepeater.OnInit(EventArgs e) in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:106
How do I make the DynamicFilterRepeater recognize my datasource?
I'm using VS2010 Pro, on a Win7 machine.
have you looked at the sample project you get when you download the source code.
Have a look at my blog post here Dynamic Data Filtering – Installation

First page of MS Access Report does not seem to call On Page Event

I have coded a MS Access 2000 report that displays a calendar with one month per page and projects added to particular days. The only data in the underlying record source is a list of months. The structure is created via the On Page event, which also reads in other data.
When this report is opened, I've noticed that the On Page event does not seem to be triggered for the first page. (I attribute this to the fact that On Page in reports is activated when a page is cached rather than when a page is displayed, such as On Current for Access forms.)
When the report is displayed my work around is to use the On Activate event to force the On Page subroutine to run even though that event has not been called. However when the report is exported it does not trigger the On Activate event and the first page of the export is in one of two formats:
1) if the report was open in Access (ie On Activate had been triggered previously) the first page is identical to either the page after the one being displayed or the last page, except with the correct month (which comes from the underlying record source)
2) if the report was not open in Access the first page contains just the structure within the report design view (ie lots of empty boxes)
My best workaround is to force a (otherwise pointless) cover page to ensure the first page contains nothing that needs code to run, but this is far from ideal. Can I force the code to run for the first page of an export? Or maybe I'm misunderstanding how On Page works and I need to restructure my code? (I've also noticed that On Page seems to run twice for the last page).
I would recommend restructuring your code so that you build your data in one query, multiple queries, or in VBA, and then open the report with the new datasource. I might still have Access 2000 at home to check, but at work I can test both 2003 and 2007, and in both versions, the OnPage event fired before each page was displayed. If you are experiencing different behavior, I suspect it's because Access isn't sure how to handle what you are asking it to do.
Typically a report like the one you are describing would be designed the other way around: the datasource for the report would contain all the project information. Is there something about the data you're trying to display that prevents you from building a query that would contain all of it?
Have you considered the Format event for the various sections, especially the Detail section? Format or Print are a more usual events for manipulating reports.