Where is CreatePresenter in MvxWpfSetup? - mvvmcross

I'm looking at...
How to implement Close button in MVVMCross WPF application?
I'm trying to create simple WPF app that more or less mimics a droid app and has a back navigation. I'm trying to override CreatePresenter but I can't find it! I've looked in the classes on github but it is not there either.
https://github.com/MvvmCross/MvvmCross/blob/b1cb973062b2eb8149f0934f331c4006bc61fa3c/Cirrious/Cirrious.MvvmCross.Wpf/Platform/MvxWpfSetup.cs
I'm confused. What am I missing here?

The presenter is a constructor parameter - see https://github.com/MvvmCross/MvvmCross/blob/b1cb973062b2eb8149f0934f331c4006bc61fa3c/Cirrious/Cirrious.MvvmCross.Wpf/Platform/MvxWpfSetup.cs#L25

Related

How do I add a google map to a lit-element?

I know google-maps component is a polymer 3 component, but it seems to depend on all the Polymer 3 stuff, Polymer project says start with lit-element (polymer 3+), so I want to use lit-element, but want a map on my component. How do I do this?
Background:
If you read the roadmap here - https://www.polymer-project.org/blog/2018-05-02-roadmap-update it says don't start a new project with Polymer 3, instead start with Lit-Element.
It also talks about the future of elements - https://www.polymer-project.org/blog/2017-11-27-future-of-elements.html where they are not doing much with them right now until they rewrite them.
So given this, right now if we are trying to build a component using Lit-Element, how do we incorporate google maps, I cant find a single example anywhere. I tried to use the Polymer Google Map component and it is not compatible and has a bunch of errors.
Take a look at this:
https://github.com/jakelheknight/google-maps-limited
Not much out there but this is probably what you are looking for.
Some time ago I rewrited Polymer Google Map component to use Lit instead. You may take a look: lit-google-map

Add Swing objects in Play 2.0 framework

Good afternoon,
I want to know if it will be possible to add Scala Swing objects (especially JFrame objects) in a Play 2.0 application, I look for something like this but I haven't found nothing.
I need a Text Area that the user can write, and after that when he/she submit, I need to create an instance of a Scala class which after that it will show in a JFrame are (if I can) something related with the textarea input.
I can do the textarea form with HTML but the other part I don't know how to do it if not with JFrames.
Are many other ways to do this?
The example of what I can do is (it's a App related on Lambda Calculi):
x ---> create a Var elemnt and display it in a JFrame
\x.x ----> create a Abs(Var,Var) element and display it in a JFrame
...
Can anyone help me?
Thanks in advance
Piotr's comment is correct; the two technologies (HTML and Swing) are very separate. I'm not sure exactly what you're trying to accomplish; however, it sounds like what you want to do is possible via Javascript. A good tutorial for Javascript can be found here: http://www.codecademy.com/tracks/javascript. Javascript is also very easy to integrate into a Play project; you can place your Javascript files in your project's /public folder and reference them from your HTML files using <script> tags.

Bind TreeView.SelectedItem to a property in the ViewModel in a WinRT app

In my Windows Store XAML app I’m using the TreeView control from the WinRTXamlToolkit and I’m attempting to two-way bind the SelectedItem property to a property on a ViewModel.
Out of the box, the SelectedItem property is read only and this makes sense because the control supports Virtualization.
I have seen some folk work around this with things like attached properties, helper methods and so forth, a great example of which is seen in this question
WPF MVVM TreeView SelectedItem
But all of the questions/solutions are not based on WinRT and all of my attempts to rework the solution code for a WinRT app have proven fruitless.
So, my question is, is this possible in a WinRT app? What am I missing?
Thanks
I'd skip trying to come up with a bindable property globally for the view model and instead use the IsSelectedBindingPath and IsExpandedBindingPath properties of the TreeView as in the debugging tools' example of the control's usage. Then when you want to select/expand an item from the view model - use a method similar to SelectItem() in my view model where I essentially set IsExpanded/IsSelected to true in item/node view models throughout the path from the root of the view model tree and load the content of the tree if the nodes in the expected path do not exist.

mvvmcross Custom binding supressed by Linking optimisation to device

In the Touch version of my app, I've defined a custom binding for the 'selected' property on a UIButton and use that to mimic the ToggleButton behaviour which is available in Android (to have the same UX in both platforms). This additional binding works perfectly fine in the simulator, but not when deploying to device. I've figured out already that this is again the famous linking optimisation problem as the binding does work when I change the Linker behaviour to 'don't link'.
Question, what do I need to include in the LinkerPleaseInclude to preserve my custom binding when deploying to device ? The UIButton in included there but only using the TouchUpInside event which therefore works fine on device - just my custom binding doesn't.
Thx
It's pretty simple. Without any code example I can only suggest you search for UIButton in the LinkerPleaseInclude file and make sure you have something like:
var button = new UIButton();
button.Select += (s,a) => {}
Just need to reference the event so the compiler knows about it...

ChartboostX not loading more apps

I am using this wrapper someone recommended for my iOS cocos2dx game link. It works when I call the showInterstitial() method, but when I try to use the showMoreApps the dialog appears for a split second and then disappears.
In my AppDelegate::applicationDidFinishLaunching() I do this
ChartboostX::sharedChartboostX()->setAppId("REDACTED");
ChartboostX::sharedChartboostX()->setAppSignature("REDACTED");
ChartboostX::sharedChartboostX()->startSession();
ChartboostX::sharedChartboostX()->cacheMoreApps();
And then when I want to call the showMoreApps I do this
ChartboostX::sharedChartboostX()->showMoreApps();
Have a look at my wrapper for Chartboost. It has been updated to use the latest version of the Chartboost SDK and works perfectly in my cocos2D-x game. I have not finished the android documentation yet but you can probably work it out yourself if you need to. The documentation for iOS is almost finished and quite easy to follow.(FYI the class ADELLE is the chartboost delegate and is an objective C++ class so you can use C++ in it as you normally would mixed in with the objective C. This is the same for AdWrapper.mm)
Check it out and see if it works for you.
https://github.com/Lochlanna/Chartboost-Cocos2D-x