aino-komal / mvp4g

Automatically exported from code.google.com/p/mvp4g
0 stars 0 forks source link

How to create a child Module from another child Module? #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. I created the child Module(B) by extending child Module(A) and mention
the child Module(B) name inside the child Module(A) Event Bus.  
2. I created method with setParentModule(childModule(A))
3.

What is the expected output? What do you see instead?

Excpected output:To load a child Module from another child module

Error: Failed to instantiate the child module(B) Impl. But the history
converter works (convertToToken) works fine but the child Module (B) Impl
fails to instantiate due to being abstract class.

What version of the product are you using? On what operating system?
mvp4g 1.1.0 . Linux Fedora

Please provide any additional information below.
I suppose Inheritance property from the child Module(A) is not being
implemented for the child Module(B)..

Original issue reported on code.google.com by jiunara...@gmail.com on 21 May 2010 at 11:55

GoogleCodeExporter commented 9 years ago
Why do you try to extend a child module? Could you post your code?

The child module is an interface that Mvp4g will implement. The only method you 
provide is the setParentModule that allows the framework to know the class of 
parent 
module.

In your case if module A is the parent of module B, then module A should have 
this 
method:
//I assume that parent of Module A is the main module
void setParentModule(Mvp4gModule parentModule);

and module B should have this method:
void setParentModule(ModuleA parentModule);

Original comment by plcoir...@gmail.com on 21 May 2010 at 12:35

GoogleCodeExporter commented 9 years ago
I tried to extend a child Module as I was working on how to achieve creation of 
child
module from another child Module. 

With this comment I attached the code to achieve creation of child module from
another child module.

The error I faced were:
1. When I didn't extend the child Module
   10:52:42.945 [ERROR] [trialmvp4g] Line 37: The method setParentModule(IssueModule)
in the type ActionModule is not applicable for the arguments (Mvp4gModule)

2. When I extend the child module
10:54:57.527 [ERROR] [trialmvp4g] Line 15: The type ActionModuleImpl must 
implement
the inherited abstract method IssueModule.setParentModule(Mvp4gModule)

Original comment by jiunara...@gmail.com on 26 May 2010 at 5:36

Attachments:

GoogleCodeExporter commented 9 years ago
Me too face the same problem .. Have any solution for this?

Original comment by stsiva...@gmail.com on 26 May 2010 at 5:45

GoogleCodeExporter commented 9 years ago
An issue has been reported for case 1: Issue 25 
(http://code.google.com/p/mvp4g/issues/detail?id=25). You can download the last 
snapshot of Mvp4g 1.2.0, the issue has been solved.

Case 2 will not work because setParentModule allows you to configure the parent 
module but ActionModule & IssueModule can't have the same parent module since 
ActionModule is a child of IssueModule.

Original comment by plcoir...@gmail.com on 27 May 2010 at 1:09

GoogleCodeExporter commented 9 years ago
I went through the Mvp4g 1.2.0. I can't get the idea of activate and deactivate
concept from the Mvp4gModules example. It enhances the history converter and 
added a
new gin and guice. Could you help me in explaining the new attribute of Event
annotation "activate " and "deactivate"?

Original comment by jiunara...@gmail.com on 27 May 2010 at 11:05

GoogleCodeExporter commented 9 years ago
Here is the discusion about this feature:
http://groups.google.com/group/mvp4g/browse_thread/thread/76e36c0cbc59d3ec/c2211
f3944
c9f6a9?lnk=gst&q=activate#c2211f3944c9f6a9

Let me know if you have any question, thanks

Original comment by plcoir...@gmail.com on 28 May 2010 at 11:29

GoogleCodeExporter commented 9 years ago

Original comment by plcoir...@gmail.com on 13 Sep 2010 at 5:16