Benoît Minisini wrote:
> In Gambas 3, the /control directory must be put inside the "Project" section.

Okay, that worked. I was using the control directory automatically
created when I first created the project. Thanks.

> Please provide the details of what you have done, and maybe I will tell you.

I'm referring to code used when programming the component itself.

For example, in the component code:

Public Sub _new(lVal1 As Long, lVal2 As Long, Optional lVal3 As Long)

If I make the component and try to use it in a project, I have to also
pass the parent container name. So, if I use:

oVar = New ComponentName(lVal1, lVal2, lVal3, FMain)

It works fine. But if I try to leave out the *optional* argument:

oVar = New ComponentName(lVal1, lVal2, FMain)

I will get "Not enough arguments" from the IDE. If I try:

oVar = New ComponentName(lVal1, lVal2, , FMain)

I will get "Unexpected Comma" from the IDE. And, of course, if I pass 
NUll as the optional argument, it's the incorrect data type for the 
argument. I understand why I'm getting the messages I'm getting. I'm 
just asking is there any way to use an *optional* argument to the _new 
sub of a component.

This isn't something critical. This is just a personal project I chose
to do as an exercise, to get familiar with Gambas. I always do stuff
like this whenever I'm learning a new language or (in this case) IDE, etc.

------------------------------------------------------------------------------
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
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to