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-8825: BlackBerry: Implement UI.OptionDialog #54

Merged

Conversation

alexandergalstyan
Copy link

Reviewers: DavidC, HarutM

ChangeLog:

  • Implemented native DropDown, Option classes
  • Implemented selectedIndex, options, title property and methods
  • Updated yaml doc for OptionsDialog

Test Cases:

  • Build tibb.
  • Build tibbtest.
  • In the java script, instance optiondialog object on some event.
  • Show optionDialog.
  • Make sure mentioned methods work.

Reviewers: DavidC, HarutM

ChangeLog:
- Implemented native DropDown, Option classes
- Implemented selectedIndex, options, title property and methods
- Updated yaml doc for OptionsDialog

Test Cases:
- Build tibb.
- Build tibbtest.
- In the java script, instance optiondialog object on some event.
- Show optionDialog.
- Make sure mentioned methods work.
for (unsigned int i = 0; i < uiLength; ++i)
{
Handle<Value> l = array->Get(Integer::New(i));
String::Utf8Value v8UtfString(Handle<String>::Cast(l));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should check that each array entry can be cast to a string successfully, e.g. if (l->IsString()) etc...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@dcampbell-macadamian
Copy link

reviewed

@@ -128,7 +134,7 @@ properties:

- name: selectedIndex
summary: Defines the default selected option.
platforms: [android]
platforms: [android, blackberry]
type: Number
availability: creation

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're the first to update yml files, also update the docgent.py to contain the DEFAULT_BLACKBERRY_SINCE = "2.1" and add blackberry to the DEFAULT_PLATFORMS.

You'll also need to make use of DEFAULT_BLACKBERRY_SINCE in a similar fashion to DEFAULT_MOBILEWEB_SINCE

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Reviewers: DavidC, HarutM

ChangeLog:
- Modify docgen.py script for blackberry platform needs.
- Updated yaml doc for OptionsDialog upon comments.
- Minor changes upon comments.

Test Cases:
- Build tibb.
- Build tibbtest.
- In the java script, instance optiondialog object on some event.
- Show optionDialog.
- Make sure mentioned methods work.

- Run docgen.py script
- Make sure documentation includes appropriates changes for blackberry platform
@jpl-mac
Copy link

jpl-mac commented May 18, 2012

validate.py in apidoc reports the following:

Titanium/UI/OptionDialog.yml:
    x Titanium.UI.OptionDialog
        x selectedIndex
            x platform specifier "blackberry" is not valid. Valid platforms are: ['android', 'iphone', 'ipad', 'mobileweb'].

Probably just need to add blackberry in the proper list inside the script


On BlackBerry the control consists of a title bar and an expandable list of options.
The purpose is to give the app developer a simple way to let the user select one of many options.
The list expands/collapses when tapping on the title bar, and collapses when tapping on an option in the list.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the other descriptions, this should cover where the option dialog is displayed on the screen, for iOS and Android it's in the middle or against an edge. It's appropriate to describe the same sort of info for the BB. If it can be displayed anywhere in the screen, then just say so.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Reviewers: DavidC, HarutM

ChangeLog:
- Minor fixes
- Updated yaml doc for OptionsDialog. Added ipad platform

Test Cases:
- Build tibb.
- Build tibbtest.
- In the java script, instance optiondialog object on some event.
- Show optionDialog.
- Make sure mentioned methods work.
@alexandergalstyan
Copy link
Author

Updated.

Reviewers: DavidC, HarutM

ChangeLog:
- Add blackerry platform in supported platforms in validate.py script
- Updated yaml doc for OptionsDialog. Added ipad platform

Test Cases:
- Build tibb.
- Build tibbtest.
- In the java script, instance optiondialog object on some event.
- Show optionDialog.
- Make sure mentioned methods work.
@alexandergalstyan
Copy link
Author

Fixed missed comments

@dcampbell-macadamian
Copy link

approved

@jpl-mac
Copy link

jpl-mac commented May 22, 2012

Nothing to add for me

Alex, it seems pretty clear that this control will need to use a modal dialog in the future, I expect dialogs to be available in R6.
Can you make sure to capture that information in the jira ticket for what still needs to be implemented for this control please?

Thanks

…berry' into dropdownBranch

Conflicts:
	blackberry/tibb/NativeControlObject.cpp
	blackberry/tibb/NativeControlObject.h
	blackberry/tibb/TiUIBase.cpp
@alexandergalstyan
Copy link
Author

Code merged with upstream.

alexandergalstyan added a commit that referenced this pull request May 23, 2012
TIMOB-8825: BlackBerry: Implement UI.OptionDialog
@alexandergalstyan alexandergalstyan merged commit 3f48558 into Macadamian:blackberry May 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants