Re: Problem to derive a base class in C++ or in Lua

"[email protected]" <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <8115244.112235.1249756542611.JavaMail.www@wwinf8204>
Hello again

I've tryied another time with a different lua code : 

function derived:__init(name)
--super(name)
print 'derived init'
self.name = name
end

This code works. But if I uncomment the call to super, it doesn't. I've called super first as said in documentation. With this in mind, I've tryied another search on google for that problem. I've found a post by Daniel Wallin explaining that super has been deprecated. So with calling in my C++ code 
luabind::disable_super_deprecation();

My code works.

I've read the documentation that is in the source, and it has another version than the one on the web site. I'll try that tomorrow to check that, but I'm confident.

May be it could be wise to update documentation on web site. 

Thanks again for your help

François




> Message du 08/08/09 20:13
> De : "[email protected]" 
> A : [email protected]
> Copie à : 
> Objet : Re: [luabind] Problem to derive a base class in C++ or in Lua
>
> 
Hello Jim
Thank you for answering me, but it wasn't that. If I change my lua code to this : 

function derived:__init(name) super(name)
end

It's still doesn't work

By the way, I've just copied the example in the site.

Does someone has another idea

Thanks in advance.

François

> Message du 08/08/09 19:48
> De : "James Porter" 
> A : [email protected]
> Copie à : 
> Objet : Re: [luabind] Problem to derive a base class in C++ or in Lua
>
> 
> [email protected] wrote:
> > As I'm a complete beginner with LuaBind, I suppose my mistake is 
> > obvious, but I don't see it.
> [snip]
> > In this code, if b is a lua_testclass, there is no error.
> 
> The __init function for derived doesn't take any arguments, so that's 
> the first thing I'd fix.
> 
> - Jim
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
> 
> 

> 
> Créez votre adresse électronique [email protected]
> 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
> >
> [ (pas de nom de fichier) (0.4 Ko) ]
> [ (pas de nom de fichier) (0.2 Ko) ]

 Créez votre adresse électronique [email protected] 
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.