Re: [Gambas-user] Inheriting, wrapping and casting

2014-04-17 Thread Bruno Félix Rezende Ribeiro
Em Thu, 17 Apr 2014 21:13:41 +0200 Fabien Bodard escreveu: > Well ... I'm surely not good as you are but I didn't understand the > meanning of castup or down... What is it for ? Let me give you an abstract example. Suppose we have the class 'SuperClass' which implements the function 'Frobnicate

Re: [Gambas-user] Inheriting, wrapping and casting

2014-04-17 Thread B Bruen
I don't believe there is a need for "castUp" as the object can be referenced as any parent type up the chain. Dim hChild as CChild Dim hParent as CParent hChild= New CChild hParent = hChild However, there is a use for a generalised castDown method. We have quite

Re: [Gambas-user] Inheriting, wrapping and casting

2014-04-17 Thread Fabien Bodard
Well ... I'm surely not good as you are but I didn't understand the meanning of castup or down... What is it for ? Le 17 avr. 2014 21:02, "Bruno Félix Rezende Ribeiro" a écrit : > Hello Gambas fellows! > > Suppose we are overriding the class 'Variant[]' to add the event > 'Update' which will be r

[Gambas-user] Inheriting, wrapping and casting

2014-04-17 Thread Bruno Félix Rezende Ribeiro
Hello Gambas fellows! Suppose we are overriding the class 'Variant[]' to add the event 'Update' which will be raised after the completion of any method which could possibly modify the array structure. In particular, we need to override appropriately any function that happens to do so. For exposi

Re: [Gambas-user] Calling a function via variable name

2014-04-17 Thread Randall Morgan
Thanks Tobi, I stumbled onto the idea in #2 myself. I also thought about creating an Gene class that uses and index value to call one of it's many methods. The methods being encoded in the dna array. Thanks for the ideas and the code! On Thu, Apr 17, 2014 at 3:20 AM, Tobias Boege wrote: > On

Re: [Gambas-user] Calling a function via variable name

2014-04-17 Thread Tobias Boege
On Wed, 16 Apr 2014, Randall Morgan wrote: > I'm hoping someone here can help me. I am trying to port a genetic program > from C to Gambas 3. The original code passes various function as pointers > in an array. They are then called using the function pointer. How can I > best pass functions around