MVVMCross How does this View get linked to the ViewModel? - xamarin

I'm trying to figure out why I get an error message about not being able to find the right ViewModel when I'm running my iOS app.
The question I have is when I look at this example I don't understand where MainMenuView gets bound to MainMenuViewModel.
Can someone answer this for me?
Thanks,
PkL728

They are bound by class names: for XXXView should be corresponded XXXViewModel

Just want to add to the answer: double-check the names of the views after renaming (even Resharper renaming is not perfect). Spent several dozens of minutes (and a beer can), catching similar MvvmCross's error Could not find view for %ViewModelName%.

I'm getting this on a project that I've just upgraded to MvvmCross 4. I don't have much experience with MvvmCross, and the project hasn't been maintained for a few years, so it's possible something else is wrong.
I ended up hard coding the mappings in Setup::InitializeViewLookup because I don't have time to waste on it anymore.

For anyone who ends up here having the same problem I had. I was getting this error in an Android project because my (properly named) view was extending Activity and not MvxActivity (happens easily when you use Xamarin Studio's "Add Android Activity" feature)

Related

Xcode 6.1.1 Storyboard changes layout when I re-open the project

When I open xcode and create layout everything looks pretty much like it should (meaning that the storyboard view controller looks pretty much like the preview)
But when I close out of xcode and re-open it... the view looks like this. This is concerning not just because its difficult to work on, but also because it seems that the storyboard file knows these aren't where they should be. If I click on any individual element it is looking for me to update the constraints for this new layout which is completely inaccurate.
I've tried moving all the items back to the middle, and re-laying out the whole thing, but this takes about 5+ minutes each time I want to make a change. I'm wondering if there is a way to reset the storyboard back to what it should be, or if there is some setting that I have wrong which would result in this change. Any help would be greatly appreciated!
UPDATE!
Ok so I discovered now that I can "Update Frame" to fix the layout. Still not sure why the layout is getting messed up in the first place.
That seems like a bug in xCode 6.1.x (prior to v6.3.xx), which was resolved in a meanwhile.
Here is the official reference :
http://adcdownload.apple.com//Developer_Tools/Xcode_6.3_beta/Xcode_6.3_beta_Release_Notes.pdf
Definite solution of this problem :
You need to update xCode to v6.3 which successfully resolves this problem

How to use Xcode Utility view?

Sorry for such a basic question.
After using MS Visual Studio for 15 years, I recently moved to Apple and its Xcode. So I am really newbie in this new tool. I can work with some very basic parts of utilities as Referencing outlets or such stuff, but there are a lot of other stuff there that I had never seen in Visual Studio (as file owner, accessibility reference, ...)
I am looking for a good tutorial on that. Any one knows any? Any suggestions will be appreciated.
Apple has very helpful documentation about their technologies: OSX and iOS
The best place to start using Xcode is Xcode 4 User Guide and Xcode Quick Start Guide
This is something like Properties menu in VS. the only difference is that you can simply change to Assistant editor and hold control+drag from each one directly to your code.
Remember this is based on MVC ( Model= data, View= what you see and Controller)
In fact view and model are almost separated and controller is the connector between them:
this may help in the picture above: everything is counted based on Controller: OUT-let can remind you OUT of controller: I mean commands from controller to something. and sender means what sends messages TO the controller. These will make codes just like delegate coding in Visual Studio when you drag and drop an object to the window and double click on them. The (id)sender is counterpart of (void)sender in VS.
watch the Stanford iOS class on iTunesU. It is very good and if you know programming it will be very fast. Make sure you watch the fall 2011 version, it is about iOS5 and xcode4.

Adding Custom Objects in Xcode 4.3

I'm working with Objective-C and Xcode for about a year. I customise a lot of generic objects. Few days ago one of my friend asked me a question, but I couldn't answer him. So I try to do something my self. For example:
I created this Custom View:
How can I add this View to the Object Library?. Here:
I don't really know why do I need this. But I decide to figure out how to do this. I hope you could help me with this.
Thanks in advance!
I don't think this will work. You are putting buttons on "top" of a custom view placeholder. The custom view placeholder is used to be able to use - yeah you guessed right - custom user defined views.
So of which class would your view-with-5-buttons-on-top be? I think you are running into a dead end, because that's just not the way to do it in Xcode. If you want to design your custom view graphically, just create a NIB file for it.
I don't think that you can add your own view objects into the object library. Everything I know of are user-defined code snippets which will show up on the right.
Edit
There were things called IB plugins in Interface Builder and Xcode versions prior to 4.
Those were discontinued in Xcode 4 as can be read here for example :
http://xcodebook.com/2011/03/no-interface-builder-plugin-support-in-xcode-4/
Further searches for IB plugin gives a lot more guys telling the same.
Best,
Flo

ASP.NET MVC 3: External component has thrown an exception

Set up:
New MVC 3 project, using existing database. Created an EF file (edmx), used the automatic generator to create the POCO classes and DbContext, then deleted the edmx.
Scaffolded a number of controllers and views, using -Repository -Force -Area -ModelType flags from the Package Manager Console command line.
Problem:
When running the app I get the following error:
External Component has thrown an exception.
Right. Fat lot of use. Stopped and started Cassini. No joy. Closed and opened VS2010. No joy.
Can't think what else can be wrong. No one else seems to have the problem (according to Google).
Question:
What the heck is wrong?! Any suggestions?
OK, I restarted the computah and the problem went away.
Just like that.
As if by magic.
First thing I should've tried, isn't it?
|||||||||||
0 0
|
vvvvvvvvvvv
___________
^^^^^^^^U^^
(Self portrait of the Web Developer as an aging man)
Three hours of my life. Vaporised. No page, no pay. No pay, no dinner. No dinner, no web developer. No web developer, no page. The circle of life and death. Ying and Yang. The Tao.
Should've carried on doing Mathematical Physics. At least no one is to blame when the Universe doesn't do what the client expects.
In case it helps anyone: I had this problem and found an error in a bug partial view. After fixing the bug in the partial, the error went away.
It happens when inside View1 you render #Html.Partial(View2, model) and pass a viewmodel that the View2 does not acccept (at least when the viewmodel is templated).

Can anyone explain why my workflow designer is so messed up?

I'm trying to learn TFSBuild 2010 and workflows and I found using the designer was very confusing. Then I realized from seeing screenshots of other peoples workflows, my designer is clearly messed up. Take a look at this:
http://imgur.com/uoKJ8.png
Something is very strange here. As I click on each task the borders for that task show up but this can get extremely confusing when there is a lot going on.
Yes, your designer is messed up. Why? Dunno.
First thing I'd do is update your graphics card. WPF is sensitive to bad video drivers.
Second is to go to Tools-Options and check out the Workflow options. You can change the "theme" of the workflow there. Change the theme, restart it and see if that makes a difference. If it works, you can try going back to the other theme.
Lastly, I'd definitely open a Connect on this. Check for the link under the Help menu.
Could it be that the XAML file for your workflow has invalid markup and is corrupted? Does it look the same when you create a new/empty workflow?
I'd say that if its happening for all workflows, including new ones, then you probably should try posting on a Microsoft help forum like this one.
Can you show your XAML file? Seems that it has more to do with the rendering of the Rehoster.

Resources