Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline fg_garda  
#1 Posted : Tuesday, May 28, 2013 5:25:50 PM(UTC)
fg_garda

Joined: 3/18/2013(UTC)
Posts: 29

Thanks: 5 times
Hallo,

I'm trying to use some new features like Scene/Menu. I created a very simple Game with a Menu class:

Code:

class HomeMenu : Menu
{
	public HomeMenu(Window window, ContentLoader content) : base(content, new Size(0.3f, 0.1f))
	{
		SetBackground(content.Load<Image>("HomeMenu"));

	 var logo = content.Load<Image>("BaseButton");
	 Add(new DeltaEngine.Scenes.UserInterfaces.TextButton(logo, content));
	 AddMenuOption(logo, () => { window.Title = "Clicked A Button"; }, "TEST A");
	 AddMenuOption(logo, () => { window.Title = "Clicked B Button"; }, "TEST A");
	 Show();
	}
}

class Game : Runner
{
	public Game(ContentLoader content, HomeMenu home)
	{
		this.home = home;
		home.Show();
	}
}	


I've got this error:

Quote:

Autofac.Core.Registration.ComponentNotRegisteredException was unhandled
HResult=-2146233088
Message=The requested service 'DeltaEngine.Scenes.UserInterfaces.Button+UpdateImageAndColor' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
Source=Autofac
StackTrace:
in Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
in Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
in Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
in DeltaEngine.Platforms.AutofacResolver.Resolve(Type baseType, Object customParameter)
in DeltaEngine.Platforms.AutofacStarter.AutofacEntityResolver.Resolve(Type handlerType)
in DeltaEngine.Entities.EntitySystem.GetHandler(Type handlerType)
in DeltaEngine.Entities.EntitySystem.RemoveAndAddUnresolvedEntityHandlers(Entity entity)
in DeltaEngine.Entities.EntitySystem.AddRememberedEntity(Entity entity)
in DeltaEngine.Entities.EntitySystem.AddRememberedEntities()
in DeltaEngine.Entities.EntitySystem.Run()
in DeltaEngine.Platforms.Resolver.RunRunners()
in DeltaEngine.Platforms.Resolver.RunAllRunners()
in DeltaEngine.Platforms.AutofacStarter.TryRunAllRunnersAndPresenters(Action runCode)
in DeltaEngine.Platforms.AutofacStarter.Run(Action runCode)
in DeltaEngine.Platforms.AutofacStarter.Start[AppEntryRunner](Int32 instancesToCreate)
in DeltaEngine.Platforms.App.Start[AppEntryRunner](Int32 instancesToCreate)
in DeltaSaturn.Program.Main() in d:\DevTemp\DeltaSaturn\DeltaSaturn\Program.cs:riga 10
in System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()


If I try the Scene.Tests projects with:

Code:

new MenuTests().ShowMenuWithOneButton(TestWithAllFrameworks.OpenGL);



I've got this:

Quote:

DeltaEngine.Entities.Entity.ComponentNotFound was unhandled
HResult=-2146233088
Message=DeltaEngine.Graphics.Image
Source=DeltaEngine.Entities
StackTrace:
in DeltaEngine.Entities.Entity.Get[T]() in c:\DeltaEngine\Entities\Entity.cs:riga 57
in DeltaEngine.Rendering.Fonts.FontText.Render.RenderText(Entity entity) in c:\DeltaEngine\Rendering\Fonts\FontText.cs:riga 62
in DeltaEngine.Rendering.Fonts.FontText.Render.ReceiveMessage(Entity entity, Object message) in c:\DeltaEngine\Rendering\Fonts\FontText.cs:riga 56
in DeltaEngine.Entities.Entity.MessageAllListeners(Object message) in c:\DeltaEngine\Entities\Entity.cs:riga 217
in DeltaEngine.Rendering.Entity2D.SortAndRender.Handle(List`1 entities) in c:\DeltaEngine\Rendering\Entity2D.cs:riga 118
in DeltaEngine.Entities.EntitySystem.Run() in c:\DeltaEngine\Entities\EntitySystem.cs:riga 208
in DeltaEngine.Platforms.Resolver.RunRunners() in c:\DeltaEngine\Platforms\Resolver.cs:riga 100
in DeltaEngine.Platforms.Resolver.RunAllRunners() in c:\DeltaEngine\Platforms\Resolver.cs:riga 85
in DeltaEngine.Platforms.AutofacStarter.TryRunAllRunnersAndPresenters(Action runCode) in c:\DeltaEngine\Platforms\AutofacStarter.cs:riga 125
in DeltaEngine.Platforms.AutofacStarter.Run(Action runCode) in c:\DeltaEngine\Platforms\AutofacStarter.cs:riga 71
in DeltaEngine.Platforms.AutofacStarter.Start[FirstClass,SecondClass,ThirdClass](Action`3 initCode, Action runCode) in c:\DeltaEngine\Platforms\AutofacStarter.cs:riga 183
in DeltaEngine.Platforms.Tests.TestWithMockResolver.Start[First,Second,Third](Type resolverType, Action`3 initCode, Action runCode) in c:\DeltaEngine\Platforms\Tests\TestWithMockResolver.cs:riga 100
in DeltaEngine.Scenes.Tests.MenuTests.ShowMenuWithOneButton(Type resolver) in c:\DeltaEngine\Scenes\Tests\MenuTests.cs:riga 51
in DeltaEngine.Scenes.Tests.Program.Main() in c:\DeltaEngine\Scenes\Tests\Program.cs:riga 11
in System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()
InnerException:


Any advice? Thanks!

Edited by user Tuesday, May 28, 2013 5:36:32 PM(UTC)  | Reason: Updated code tags

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline elasto  
#2 Posted : Tuesday, May 28, 2013 5:38:27 PM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Hi fg_garda, thanks for reporting the errors you had.

Not sure why the test failed (it's ok for me right now) but Scenes is undergoing heavy development this week anyhow; some new controls including textbox, slider, radiobutton and such are on the way - so hopefully the next release will give everything you need.

On the first issue, yes, we found there can be a problem with classes not being registered when they should, and it's on our list to fix. So it's 'watch this space' for that one.

Thanks again for posting!
Rss Feed  Atom Feed
Users browsing this topic
Guest (2), OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2018, Yet Another Forum.NET
This page was generated in 0.141 seconds.