void TiUITableViewRow::initializeTiObject(TiObject* parentContext) {
    if (isInitialized()) return;
    TiUIBase::initializeTiObject(parentContext);
    NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_TABLE_VIEW_ROW, this);
    setNativeObject(obj);
    obj->release();
}
Esempio n. 2
0
void TiResultSetObject::initializeTiObject(TiObject* parentContext) {
    if (!isInitialized()) {
        TiProxy::initializeTiObject(parentContext);
        NativeResultSetObject* obj = (NativeResultSetObject*)getNativeObjectFactory()->createNativeObject(N_TYPE_RESULTSET, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiGeolocation::initializeTiObject(TiObject* parentContext) {
    if (isInitialized()) {
        return;
    }

    TiProxy::initializeTiObject(parentContext);
    NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_GEOLOCATION, this);
    setNativeObject(obj);
    obj->release();
}
void TiUIAlertDialog::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiProxy::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_ALERTDIALOG, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiTCPSocketObject::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiIOStreamObject::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_TCPSOCKET, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiMapView::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiUIBase::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_MAPVIEW, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiUITextArea::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiUIBase::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_TEXT_AREA, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiUIImageButton::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiUIBase::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_IMAGE_BUTTON, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiAnnotationObject::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiUIBase::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_ANNOTATION, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiVideoPlayerObject::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiUIBase::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_VIDEOPLAYER, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiAudioRecorderObject::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiUIBase::initializeTiObject(parentContext);
        NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_AUDIORECORDER, this);
        setNativeObject(obj);
        obj->release();
    }
}
void TiAccelerometer::initializeTiObject(TiObject* parentContext) {
    if (isInitialized()) {
        return;
    }

    TiProxy::initializeTiObject(parentContext);
    NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_ACCELEROMETER, this);
    setNativeObject(obj);
    obj->release();
}
void TiUIBase::initializeTiObject(TiObject* parentContext)
{
    if (!isInitialized())
    {
        TiProxy::initializeTiObject(parentContext);
        /* Don't create a native view object for derived classes */
        if (string("View") == getName())
        {
            NativeObject* obj = getNativeObjectFactory()->createNativeObject(N_TYPE_VIEW, this);
            setNativeObject(obj);
            obj->release();
        }
    }
}