Gambas Documentation
Como se hace...
Compilación e instalación
Componentes
Controls pictures
Descripciones del Lenguaje
Developer Documentation
Componentes adicionales de Gambas
Cómo programar componentes en C/C++
Cómo programar componentes en Gambas
Índice Alfabético de la Interfaz de Programación de Gambas
Índice por Categorías de la Interfaz de Programación de Gambas
Name
ARG
BEGIN_METHOD_VOID
BEGIN_PROPERTY
END_METHOD
GB.Add
GB.Alloc
GB.Application.Name
GB.Application.Title
GB.Array.Count
GB.CheckPost
GB.CurrentComponent
GB.Detach
GB.ExistClass
GB.ExistFile
GB.FileName
GB.Free
GB.FreeArray
GB.FreeString
GB.GetClass
GB.GetClassName
GB.GetEnum
GB.GetEvent
GB.GetFunction
GB.GetTempDir
GB.GetTime
GB.GetUnknown
GB.Is
GB.ListEnum
GB.LoadComponent
GB.NewString
GB.NextEnum
GB.Propagate
GB.Push
GB.Realloc
GB.Ref
GB.ReleaseFile
GB.ReturnFloat
GB.ReturnLong
GB.ReturnObject
GB.StopAllEnum
GB.StopEnum
GB.StoreObject
GB.StoreString
GB.StoreVariant
GB.System.Language
GB.Unref
GB.Watch
GB_ARRAY
GB_FLOAT
GB_HOOK_LOOP
GB_HOOK_MAIN
GB_HOOK_POST
GB_HOOK_TIMER
GB_STRING
GB_T_BOOLEAN
GB_T_BYTE
GB_T_DATE
GB_T_FLOAT
GB_T_INTEGER
GB_T_LONG
GB_T_SHORT
GB_T_SINGLE
GB_T_STRING
GB_T_VARIANT
GB_TIMER
PROP
VPROP
Documentacion y Recetas
Documentación del Entorno de Desarrollo
Fragmentos de código
Glosario
Índice del Lenguaje
LÉEME
Licencia del Wiki
Manual del Wiki
Mensajes de Error
Pendiente de traducción
Registrarse
Repositorio de Aplicaciones
Tutoriales
Últimos cambios

GB.New

int GB.New ( void **object , const char *class , const char *name , void *parent )

Creates a new object given its class name.

  • object will receive a reference to the newly created object.

  • class is the name of the class to instanciate.

  • name is the name used for attaching the object to its event observer.

  • parent is the event observer of the object.

The name and parent arguments can be null. In that case, the object will not have any event observer.

This function can create objects whose class has been explicitely declared not instanciable.

If the class is instanciable, this function has exactly the same effect as using the NEW instruction in the Gambas program.

The new object has an initial reference count of zero. So you must reference it you need to keep it. This is not necessary if you return the object immediately with GB.ReturnObject.

See also