On Mon, 2012-06-18 at 22:39 +0930, Bruce wrote:
> Try this:
> Create a new command line project in the IDE.
> Add a new class "Application" with the following contents
>
> ' Gambas class file
>
> Create Static
> Inherits Application
> Export
>
> Static Public Hello As String = "Hello from South Australia"
>
> Save and reload the project.
> In MMain.Main type the following:
>
> ?appl[Enter].he
>
> ( see screenshot appended)
> Now that, to me, looks like we have successfully overridden the
> Application class, but look what happens when you run it.
>
Let me rephrase that (sometimes the keyboard is quicker than the mind.)
Try this:
Create a new command line project in the IDE.
Add a new class "Application" with the following contents
' Gambas class file
Create Static
Inherits Application
Static Public Hello As String = "Hello from South Australia"
Save and reload the project.
In MMain.Main type the following:
?appl[Enter].he
( see new! screenshot appended)
Now that, to me, looks like we have successfully overridden the
Application class, but look what happens when you run it.
What you should see is a very correct error message saying that Hello
is an unknown method in Application. That is because it hasn't been exported.
But when I go back and export the class, then I get the Multiple Inheritance
error.
B
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user