[Gambas-user] need a hand

Benoit Minisini gambas at ...1...
Wed Apr 28 00:11:42 CEST 2004


On Tuesday 27 April 2004 23:52, ron wrote:
> On Tuesday 27 April 2004 22:57, Charlie Reinl wrote:
> > Salut,
> >
> > 	have a problem with my xTableView !
> >
> > 	If I call it in the Startup Class it works.
> > 	(FMain or FOther1 as Startup	Class)
> >
> > 	But if I call from FMain by menu 'Others/Other 1' I'v get an Error
> > 	 'Invalid object'
> >
> > 	I don't understand, where I do wrong ?
> > 	See attachement CVTest1-0.0.5.tar.gz
> >
> > Amicalement
> > Charlie
>
> I choose in menu the Other entry
>
> Got a error in Fother1.class
>
> DIM iCounte AS Integer
>   iCounte = 2
>   Other1 = NEW XTableView("Other1",FOther1) AS "Other1"
>   WITH Other1
>       .X = 0	<--------------
>
> The *Other1* is in single step not made
> You mean with 'FOther1' actual 'ME' and I change it to ME
> Did resolve the problem here.
> But I don't understand what the whole program should do.
> Therefore I'm not able to tell the result is what you want.
>
> Ron
>

Actually there is a bug in 0.92. When you use FOther1 (a class name) in a 
expression or as an argument, it is not replaced by its automatically created 
instance.

But there is also a bug in your program! You call FOther1.Run, and in 
FOther1.Run, you create a new instance of FOther1 (the class).

Then, you create a XTableView IN FOther1 (the automatic instance), which is 
different from the FOther1 instance you created in FOther1.Run.

So, ron is right: replace FOther1 by ME. Or remove your Run static method and 
calls FOther1.ShowModal directly.

In two words, be careful between FOther1 (the class) and FOther1 (the 
automatic instance) !! :-)

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list