[Gambas-user] Gambas IDE 1.9.49-2 New Function formating.

Andreas Kostyrka yacc143 at ...626...
Mon Jun 25 12:41:56 CEST 2007


Trouble is that New is also a function. NEW is a keyword that can be only
used in an assignment.
New is the function to use instead in all other places.

>From the docs that were installed with Gambas:

New
Syntax
Object = New ( Class [ , Constructor parameters... ] )
 Instantiates the class Class.
 This routine works exactly like the NEW operator, except that the class
name is specified at runtime and not at compile time.
 If you want to specify the observer that will receives all the events
generated by the newly created object, you must use the Object.Attach static
method.

Andreas

2007/6/23, Charlie Reinl <Karl.Reinl at ...9...>:
>
> Salut Andreas,
>
> new is a gambas KEYWORD, and so it is changed by the IDE.
> UpperCase, and a leading, trailing space.
>
>
>
> Amicalment
> Charlie
>
>
> Am Samstag, den 23.06.2007, 01:54 +0200 schrieb Andreas Kostyrka:
> > Hi!
> >
> > I'm wondering if this is a known bug, or what I'm doing wrong?
> >
> > $entries.Add(New("ABC", arg1))
> >
> > gets changed by the IDE to
> >
> > $entries.Add( NEW ("ABC", arg1))
> >
> > which is an Error :(
> >
> > TIA,
> >
> > Andreas
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> 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