Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28444] TiAPI: Missing setters with 2 arguments

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2021-05-12T21:53:35.000+0000
Affected Version/sRelease 10.0.0
Fix Version/sRelease 10.0.0
ComponentsAndroid, iOS
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2021-05-12T15:22:06.000+0000
Updated2021-05-12T21:53:35.000+0000

Description

Description

There are a handful of setters with 2 arguments missing since the setter/getter removal, these should still be maintained as they are not simple setters. * Android ** -Ti.UI.Slider.setValue- (2 arg version is iOS only I think, so maybe mark iOS only?) documentation is invalid here * iOS ** -TiUI.Picker.setValue- documentation is invalid here **- Ti.UI.TabGroup.setToolbar- documentation is invalid here ** Ti.UI.Window.setToolbar ** -Ti.UI.iOS.SplitWindow.setToolbar- documentation is invalid here ** Ti.UI.iOS.SplitWindow.setShowMasterInPortrait ** Ti.UI.iOS.SplitWindow.setMasterIsOverlayed
var win1 = Ti.UI.createWindow();
var tab1 = Ti.UI.createTab({
  window: win1,
  title: 'Tab 1'
});
var win2 = Ti.UI.createWindow({
  backgroundColor: 'yellow'
});
var tab2 = Ti.UI.createTab({
  window: win2,
  title: 'Tab 2'
});
var tabGroup = Ti.UI.createTabGroup();
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();


setTimeout(() => {
  console.log('ListSection')
  var vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables', items: [] })
  console.log(vegSection.setItems);

  console.log('Slider')
  var slider = Ti.UI.createSlider()
  console.log(slider.setValue)

  console.log('WebView')
  var wv = Ti.UI.createWebView()
  console.log(wv.setHtml)

  if (OS_ANDROID) {

  } else if (OS_IOS) {
    console.log('Picker')
    var picker = Ti.UI.createPicker()
    console.log(picker.setValue)
  
    console.log('TabGroup')
    console.log(tabGroup.setToolbar)

    console.log('Window')
    console.log(win1.setToolbar)


    console.log('SplitWindow')
    var splitWin = Ti.UI.iOS.createSplitWindow({
      detailView: win1,
      masterView: win2
    });
    console.log(splitWin.setToolbar)
    console.log(splitWin.setShowMasterInPortrait())
    console.log(splitWin.setMasterIsOverlayed)
  }
}, 2500)

Steps to reproduce

Actual

Some logs show undefined

Expected

No logs should show undefined

Comments

  1. Ewan Harris 2021-05-12

    https://github.com/appcelerator/titanium_mobile/pull/12806
  2. Ewan Harris 2021-05-12

    Window.setToolbar test - No error thrown, toolbar should be at bottom of Window
       var win = Ti.UI.createWindow({backgroundColor: 'white'});
       var nav = Ti.UI.createNavigationWindow({window: win}); 
       win.setToolbar([Ti.UI.createButton({title: "Toolbar"})],{animated: false});
       nav.open();
       
    SplitWindow.setShowMasterInPortrait/setMasterIsOverlayed - Click detail window, main should show, click main and detail should move
       var detail = Ti.UI.createWindow({ backgroundColor: 'white' });
       var label1 = Ti.UI.createLabel({ text: 'Detail View' });
       detail.add(label1);
       var detailNav = Ti.UI.createNavigationWindow({ window: detail });
       var main = Ti.UI.createWindow({ backgroundColor: 'gray' });
       var label2 = Ti.UI.createLabel({ text: 'Main View' });
       main.add(label2);
       var mainNav = Ti.UI.createNavigationWindow({ window: main });
       var splitWin = Ti.UI.iOS.createSplitWindow({
           detailView: detailNav,
           masterView: mainNav
       });
       splitWin.open();
       detail.addEventListener('click', () => {
         splitWin.setShowMasterInPortrait(true, {animated: true})
       })
       main.addEventListener('click', () => {
         splitWin.setMasterIsOverlayed(true, {animated: true})
       })
       
    The rest are docs fixes so no code tests
  3. Christopher Williams 2021-05-12

    merged to master and 10_0_X branch for 10.0.0 target.

JSON Source