[Gambas-user] Passing a Form as a parameter question.
Benoit Minisini
gambas at ...1...
Mon Aug 11 00:25:15 CEST 2008
On samedi 09 août 2008, richard terry wrote:
> I've separated out the code that accesses my databases schemas, into
> different modules for maintainability purposes, which I append with the
> letters DBI (which stands for in my terminology - database interface - I'm
> not using the built-in datacontrols)
>
> The module may for example retrieve data which is then is loaded into a
> popup column view on the calling form as per the attatched png, and return
> a collection
>
> eg In the calling form:
>
> Public sub SomeSub()
> mycollection = modWhateverDBI.WhateverSubRoutine(columnview1)
> End
>
>
> Works fine as per the piccie
>
> Now, in some situations as well as retrieve the list, I want to do multiple
> things to the calling form on the fly if certain other factors are
> fullfilled once the data is retrieved, so in this case my calling construct
> looks like this.
>
> Public Sub Whatever()
>
> modWhateverDBI.WhateverSubRoutine(Me)
>
> End
>
> ie, I"m passing a reference to the entire form.
>
> So Questions:
>
> 1) What exactly are you passing when you reference anything, is it just a
> memory address? which points to the form?
Yes.
>
> 1) Does this entail any performance overhead, as opposed to passing just a
> single control, or parameter?
No, provided that you do not use the anonymous Object datatype, which is
slower that a statically defined datatype.
Regards,
--
Benoit Minisini
More information about the User
mailing list