[Gambas-user] Internal compiler error with New

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Jan 27 23:17:06 CET 2014


Maybe it's my sleep deprivation, but I can't understand connection between
unreferenced array and this. How unreferenced array would help in this? By
definition, if you can't refer to it, how you can use it?

Jussi


On Mon, Jan 27, 2014 at 11:40 PM, Tobias Boege <taboege at ...626...> wrote:

> On Mon, 27 Jan 2014, Jussi Lahtinen wrote:
> > Well ok, but I don't think that should be allowed syntax (at least I
> don't
> > see any usage for it).
> >
>
> I do: the PathWatch class in gb.inotify or generally every object like
> this:
>
> --8<-[ MyObject.class
> ]-----------------------------------------------------
> Private $cObjects As New Collection
>
> Public Sub _new(Name As String)
>   $cObjects[Name] = Me
>   Print "Hi, I'm";; Name;; "and I'm now referenced."
> End
>
> Static Public Sub _get(Name As String) As MyObject
>   Return $cObjects[Name]
> End
>
> --8<------------------------------------------------------------------------
>
> Maybe MyObject sets itself up for sending events or something in _new().
> Then you really only need to create the thing (with an event name) and
> forget about it in the main program.
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list