Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

Customize Registeration Process Options
Constructor
Posted: Wednesday, October 14, 2009 2:29:25 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi
IOC?....International Olympic Committee?...lol...just kidding....okay poor joke...but what does IOC stand for?


Inversion of Control (IoC)/Dependancy Injection (DI)

Take a look at:

http://dimecasts.net/Casts/CastDetails/41

http://dimecasts.net/Casts/CastDetails/33


You could also chech this video called 'Introduction to NHibernate: Collection Relationships' (I made a post this earlier) :
http://dimecasts.net/Casts/CastDetails/63


There are other videos also.

bheeks
Posted: Wednesday, October 14, 2009 2:46:16 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Oh yes of course..the opposite to MVC

Thanks...will go through this

Regards
bheeks
Posted: Wednesday, October 14, 2009 6:21:56 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi Constructor

Hope you are well.

Why did you use the Common interface in the Module Controller class?
Constructor
Posted: Wednesday, October 14, 2009 6:31:54 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi Constructor

Hope you are well.

Why did you use the Common interface in the Module Controller class?


This would be a question for Martijn. He is the Cuyahoga dev so all questions regarding Cuyahoga architecture would best be addressed to him happy
bheeks
Posted: Monday, October 19, 2009 2:15:19 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi Costructor

I have managed to create my own data driven module, but I am having a slight problem.....Once installed, it is still reading as inactive
I have checked the DB and autoactive is set to true on the module

Regards

Constructor
Posted: Monday, October 19, 2009 3:48:56 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi Costructor

I have managed to create my own data driven module, but I am having a slight problem.....Once installed, it is still reading as inactive
I have checked the DB and autoactive is set to true on the module

Regards



In the modules list uncheck and then re-check the activation check box. See if that works. If you get an error at the top of the screen post it. It should work if all your POCO and mappings are ok.
bheeks
Posted: Monday, October 19, 2009 6:31:21 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

I have checked and unchecked the active status check box....once I check it it comes up with this error "An error occured: Loading failed for University. Value cannot be null. Parameter name: classType " . I have checked if the module service entry is in the database and it is in there. Any ideas?

Regards
Constructor
Posted: Monday, October 19, 2009 8:49:08 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:

Hi

I have checked and unchecked the active status check box....once I check it it comes up with this error "An error occured: Loading failed for University. Value cannot be null. Parameter name: classType " . I have checked if the module service entry is in the database and it is in there. Any ideas?

Regards


Check in your cuyahoga_moduleservice table and check the 'classtype' value: (something like this)

Code:
Cuyahoga.Modules.University.DataAccess.UniversityDao, Cuyahoga.Modules.University


and check that it is exactly the same as your class name.

Also check your 'servicetype' (again something like this)

Code:
Cuyahoga.Modules.University.DataAccess.IUniversityDao, Cuyahoga.Modules.University


They have to appear in your SQL Install script exactly (case sensitive) as they are in existence. I have made this mistake.

Check your DataAccess filenames against the install script / database.

So you should have in your DataAccess folder files 'UniversityDao' and 'IUniversityDao' (case sensitive). Not 'UniversityDAO' or anything else. Reference your file precisely.

bheeks
Posted: Tuesday, October 20, 2009 6:48:38 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi C

Hope you are well.

Thanks again for all your help and effort

I have attached the University module, hopefully some fresh eyes could do the trick

Regards
Bheeks

File Attachment(s):
Cuyahoga.Modules.University.rar (938kb) downloaded 70 time(s).


Constructor
Posted: Tuesday, October 20, 2009 2:22:13 PM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
A couple of things I found.

Firstly, I can not see why you called the person class and mapping files 'IPerson'. I renamed those.

The problem was that you did not have the 'UniverityDao.cs' file in the correct namespace. Although it was in the correct folder, the namespace did not reflect this. The 'IUniverityDao.cs' was in the correct namespace.

It was:

Code:
namespace Cuyahoga.Modules.University


should be

Code:
namespace Cuyahoga.Modules.University.DataAccess


Also changed the install and uninstall a little.

Now installs/activates and uninstalls. The rest is up to you happy

File Attachment(s):
Cuyahoga.Modules.University.zip (46kb) downloaded 72 time(s).


bheeks
Posted: Wednesday, October 21, 2009 11:45:01 PM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thanks a lot....shu..I did not even notice that. Definitely will not make that mistake again.

I really appreciate all the effort. Wonders of what a fresh pair of eyes could do.... happy

Regards
bheeks
Posted: Friday, October 23, 2009 1:47:29 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

After installing that module and when setting it to active it gives an error saying UniversityClass.hbm.xml does not want to compile. I tried redoing it and comparing it to other hbm.xml files, but no joy


Regards
Constructor
Posted: Friday, October 23, 2009 3:31:21 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi

After installing that module and when setting it to active it gives an error saying UniversityClass.hbm.xml does not want to compile. I tried redoing it and comparing it to other hbm.xml files, but no joy
Regards


The NHibernate mapping files need each to have their build actions set to 'Embedded Resource'. If not you get errors. (Check previous page of posts). happy

Click the mapping file and go to its properties. Set the build action from there.
bheeks
Posted: Friday, October 23, 2009 5:18:01 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thanks for the reply.

That is the first thing I checked as I remembered you had a nightmare full of nhibernate errors when you first created this type of file happy....hence they are all set to embedded resource

Regards
bheeks
Posted: Friday, October 23, 2009 6:27:43 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

I found the problem. Again my naming of the department class was incorrect in the mapping file. It was Department instead of UniversityDepartment - wink

Regards
bheeks
Posted: Monday, October 26, 2009 2:33:04 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi Constructor

I seemed to have run into another problem after installing the University Module. I have uploaded the latest build of the university module with a pic of the Error. It seems that when return the University ModuleType into the declared variable, it returns NULL. Any ideas?

Regards

File Attachment(s):
Cuyahoga.Modules.University.rar (950kb) downloaded 72 time(s).

bheeks attached the following image(s):
ModuleReturnNull.JPG

Constructor
Posted: Monday, October 26, 2009 3:58:29 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
Try something like:

Code:
namespace Cuyahoga.Modules.University.Web
{
    public partial class University : BaseModuleControl
    {
        private UniversityModule _Module;

        protected void Page_Load(object sender, EventArgs e)
        {
            this._Module = this.Module as UniversityModule;
        }

        OTHER CODE.....

}



Rebuild your solution.
Check your post build events paths.
bheeks
Posted: Monday, October 26, 2009 5:42:33 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Yip..that worked. Thanks again for taking me through this. Really appreciate it. I just need to get my head around the mappings file, most of my errors were in there

Regards
Constructor
Posted: Monday, October 26, 2009 7:06:06 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi

Yip..that worked. Thanks again for taking me through this. Really appreciate it. I just need to get my head around the mappings file, most of my errors were in there

Regards


Check this: http://nhforge.org/doc/nh/en/index.html#quickstart-mapping

Keep the mapping simple. Use the correct types like:

Quote:

< property name="Title" column="title" type="String" length="100" />


not like this

Quote:

< property name="Title" column="title" type="String(100)" />


or simpler even:

Quote:

< property name="Title" column="title" type="String" />
< property name="TotalUnits" column="units" type="Int32" />



Refer to the reference material and keep it as simple as required. You can get on to joined subclasses etc later (using the content item etc..)

Use reference to find the mapping equivalents to your database cols.
bheeks
Posted: Friday, October 30, 2009 6:44:52 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thanks for this and the advice

Regards
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.