Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMOB-9805 Blackberry: Implement UI.View.show #88

Merged
merged 2 commits into from
Jul 6, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 14 additions & 5 deletions blackberry/tibb/TiUIBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ void TiUIBase::onCreateStaticMembers()
TiGenericFunctionObject::addGenericFunctionToParent(this, "addEventListener", this, _addEventListener);
TiGenericFunctionObject::addGenericFunctionToParent(this, "hide", this, _hide);
TiGenericFunctionObject::addGenericFunctionToParent(this, "removeEventListener", this, _removeEventListener);
TiGenericFunctionObject::addGenericFunctionToParent(this, "show", this, _show);
setTiMappingProperties(g_tiProperties, sizeof(g_tiProperties) / sizeof(*g_tiProperties));
TiObject* value = TiPropertyGetObject::createGetProperty(this, "children", this, _getChildren);
TiPropertyGetFunctionObject::addPropertyGetter(this, value, "getChildren");
Expand Down Expand Up @@ -315,7 +316,7 @@ void TiUIBase::onAddEventListener(const char* eventName, Handle<Function> eventF
eventFunction->SetHiddenValue(String::New("_event_id_"), Integer::New(id));
}

void TiUIBase::onRemoveEventListener(const char* eventName, Handle<Function> eventFunction)
void TiUIBase::onRemoveEventListener(const char*, Handle<Function> eventFunction)
{
HandleScope handleScope;
NativeObject* no = getNativeObject();
Expand Down Expand Up @@ -346,7 +347,7 @@ void TiUIBase::onRemoveEventListener(const char* eventName, Handle<Function> eve
no->removeEventHandler(v8id->Value());
}

Handle<Value> TiUIBase::_add(void* userContext, TiObject* caller, const Arguments& args)
Handle<Value> TiUIBase::_add(void* userContext, TiObject*, const Arguments& args)
{
HandleScope handleScope;
TiUIBase* obj = (TiUIBase*) userContext;
Expand Down Expand Up @@ -375,7 +376,7 @@ Handle<Value> TiUIBase::_add(void* userContext, TiObject* caller, const Argument
return Undefined();
}

Handle<Value> TiUIBase::_addEventListener(void* userContext, TiObject* caller, const Arguments& args)
Handle<Value> TiUIBase::_addEventListener(void* userContext, TiObject*, const Arguments& args)
{
HandleScope handleScope;
// JavaScript usage:
Expand All @@ -397,7 +398,7 @@ Handle<Value> TiUIBase::_addEventListener(void* userContext, TiObject* caller, c
return Undefined();
}

Handle<Value> TiUIBase::_hide(void* userContext, TiObject* caller, const Arguments& args)
Handle<Value> TiUIBase::_hide(void* userContext, TiObject*, const Arguments&)
{
HandleScope handleScope;
TiUIBase* obj = (TiUIBase*) userContext;
Expand All @@ -406,7 +407,7 @@ Handle<Value> TiUIBase::_hide(void* userContext, TiObject* caller, const Argumen
return Undefined();
}

Handle<Value> TiUIBase::_removeEventListener(void* userContext, TiObject* caller, const Arguments& args)
Handle<Value> TiUIBase::_removeEventListener(void* userContext, TiObject*, const Arguments& args)
{
HandleScope handleScope;
// JavaScript usage:
Expand Down Expand Up @@ -440,3 +441,11 @@ Handle<Value> TiUIBase::_getChildren(void* userContext)
}
return array;
}

Handle<Value> TiUIBase::_show(void* userContext, TiObject*, const Arguments&)
{
TiUIBase* obj = (TiUIBase*) userContext;
NativeObject* no = obj->getNativeObject();
no->setVisibility(true);
return Undefined();
}
3 changes: 2 additions & 1 deletion blackberry/tibb/TiUIBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ class TiUIBase : public TiObject
static VALUE_MODIFY _valueModify(int propertyNumber, TiObject* value, void* context);
static Handle<Value> _add(void* userContext, TiObject* caller, const Arguments& args);
static Handle<Value> _addEventListener(void* userContext, TiObject* caller, const Arguments& args);
static Handle<Value> _getChildren(void* userContext);
static Handle<Value> _hide(void* userContext, TiObject* caller, const Arguments& args);
static Handle<Value> _removeEventListener(void* userContext, TiObject* caller, const Arguments& args);
static Handle<Value> _getChildren(void* userContext);
static Handle<Value> _show(void* userContext, TiObject* caller, const Arguments& args);
};

#endif /* TIUIBASE_H_ */