Skip to content

FAQ Trouble Shooting

mgmhunt edited this page Mar 9, 2015 · 14 revisions

Frequently asked Questions, Problems and possible solutions...

Questions that frequently come up in IRC. Reminders of approaches to take when trouble-shooting or bug fixing.

Please add more.


Almost Anything

  • Is the view initialized? Check the initialize tickbox on the view inspector. (The Initialize Viewmodel checkbox on a view just means the View is initializing the Viewmodel instead of Controller.)

  • Is it a single element? Does the element have an instance? If not add an instance on the SubSystem instances node. Then ensure the view inspector is set to use that via 'Force Resolve' option.


The bindings on my view don't seem to be working?
I alter them and the 'changed' methods don't seem to be called...

  • The bind checkboxes are ticked on the view inspector?

  • The view diagram definitely contains the relevant Bindings and is saved & compiled?

  • Have you overridden the Bind() method in the view?


public override void Bind ()
{
 base.Bind(); // Essential!
}

If yes, ensure that the base.Bind(); is present. The same is true for most other overridden Unity methods, like Start, Update, etc. If you override them on your views, make sure to do the base calls, otherwise parts of uFrame will not be able to function properly.


My controller is not initializing values correctly

  • If you have the Initialize ViewModel option checked on a view in the inspector, that view will be handling the ViewModel's initialization instead of the controller's initialize override.

Cannot find prefabs to add to a collection

Exception: Could not find view prefab  `Course`
  • Make sure your prefab is in a folder named "Resources".

Can't create ViewModels from a different controller

Getting one or both of the following errors?

Expression denotes a `type', where a `variable', `value' or `method group' was expected
The type `CourseSettingsViewModel' does not contain a constructor that takes `1' arguments

You can fix this by injecting the controller you'd like to use:

[Inject] public MyController MyController { get; set; }

Problems with External Sub-Systems/Graphs

Not recommend to use External Sub-Systems at the moment (currently uFrame 1.5). This may change with later release.


Can't compile from uFrame editor

Error such as: Invert.uFrame.Code.Bindings.ViewCollectionBindingGenerator.CreateMembers

Try adding a dummy View to any Element to force the Designer to refresh itself.