[Gambas-user] chop project

Charlie Reinl Karl.Reinl at ...9...
Wed Sep 23 11:13:56 CEST 2009


Am Mittwoch, den 23.09.2009, 04:22 +0200 schrieb Jean-Yves F. Barbier:
> Hi people,
> 
> I wonder if it is possible to chop a big project into some smaller ones?
> 
> My only problem is to keep a kinda global class linked to all sub-projects
> in oder to "pass" parms from one sub-project to another; is there a manner
> to do that or not?
> 
> JY

Salut Jean-Yves,

Poseidon the father of gambas, raised gambas-components for that.

And that is what I do. My programs are compiled as components, so I can
use them as program, embed then in other programs or just call them from
an other program.
To unify the args[], all these programs have a String[]Array PROPERTY
called CallingArgs[] in which I fill at start up the Application.Args. 
Now I can overwrite it at the caller.

Here an Example.

PUBLIC SUB btnPrint_Click()
DIM args AS String[]
DIM $TheCalledTwo AS FViewer		
   IF NOT IsNull($TheCalledTwo) THEN $TheCalledTwo.close()
   $TheCalledTwo = NEW FViewer  <-- calling the FViewer-Component which
 				has a Form and can be called 
   'txtFile.Text
   TRY $TheCalledTwo.CallingArgs.Clear()
   args = gettingArgusPreview()
   $TheCalledTwo.CallingArgs = args <-- filling the args[]
   $TheCalledTwo.Show		    <-- and make visible	
END
 
Have fun
Charlie





More information about the User mailing list