[Gambas-user] Class info contradicts by Gambas added class info
Willy Raets
willy at ...2734...
Sat Sep 20 00:28:16 CEST 2014
On za, 2014-09-20 at 00:09 +0200, Benoît Minisini wrote:
> Le 19/09/2014 22:30, Tobias Boege a écrit :
> > On Fri, 19 Sep 2014, Willy Raets wrote:
> >> Hi all,
> >>
> >> I have this Gambas library.
> >> I have made sure classes have their description (using ''' at the
> >> beginning) and public functions/methods have their description (using ''
> >> just before the function/method)
> >>
> >> I have this exported class named Update.
> >> When typing Update in an application using the library the help shows up
> >> with info on the class Update (see Screenshot01.png)
> >>
> >> I can correctly see my info, being:
> >> "Update provides methods for handling your application updates, version
> >> checking,
> >> provide online information from (rich) text files and show changelog.
> >> This class is not creatable."
> >>
> >> But I can also see that Gambas seems to add stuff:
> >> "This class can be used like an object by creating an hidden instance on
> >> demand.
> >> This class is creatable."
> >>
> >> Now these two are a contradictions. My help info says:
> >> "This class is not creatable."
> >> Gambas adds info:
> >> "This class is creatable."
> >>
> >> The class Update is an exported class, but all functions and methods are
> >> Static. (see Screenshot02.png)
> >> No instances can be made of the class nor of it's public
> >> functions/methods.
> >>
> >> I noticed this in Gambas 3.5.4, had a look (in VM) at an installed
> >> Gambas 3.5.90 (#rev.6469), but there the info is the same.
> >>
> >> Shouldn't a class with Create static NOT show the added Gambas info on
> >> being able to be created, or am I misunderstanding something?
> >>
> >
> > I think you can instantiate your class, even if everything is static in
> > there and you have Create Static set -- the instance you get from New would
> > just be rather useless. (IIRC I tried that a few days ago: I tried to create
> > an object of a module, and it worked!) The only thing which would forbid
> > instantiation is the Create Private keyword.
> >
>
> Indeed. I removed the constraint where a class without dynamic variable
> is not instanciable. But I don't know why I suddenly found that useful...
>
I remember it not being there (I mean the added info for a static class)
in previous Gambas version before 3.5.x
Anyway, the help info and wiki are in contradiction (see my previous
answer). Seems either one of them needs to be changed.
And since it is of no use to instantiate a static class, I would prefer
the added help info to be gone.
But I'll leave it up to you to see what is best as you have the best all
over view on the matter and maybe added it for some good reason.
--
Kind regards,
Willy (aka gbWilly)
http://gambasshowcase.org/
http://howtogambas.org
http://gambos.org
More information about the User
mailing list