Trying to pass data from picker to mapAnnotation

You must Login before you can answer or comment on any questions.

Hey friends!

Here is my situation.

I am creating a new mapAnnotation, and giving it a rightButton. When the clickSource is the right button it opens a new window and creates a tableView layout so you can add information to the point. Inside this new window, I have 3 pickers to select some data, and a "confirm information" button. The problem I am having is getting the data from the 3 pickers to pass to the mapAnnotation point.

if (clickSource == 'rightButton'){
 
 
var detailWindow = Titanium.UI.createWindow({  
  backButtonTitle: 'Back'
});
 
// =====Pickers and tableView gets set up here. Too long to include all of it.=====
 
var button = Ti.UI.createButton({
    title: 'Confirm Game Information',
    height: 40,
    width: 225
    });
 
    detailWindow.add(button);
        button.addEventListener('click', function()
        {
            Titanium.API.info('Picker value is - ' + sportPickerValues.title);
            Titanium.API.info('Picker value is - ' + pickerValues.title);
            Titanium.API.info('Picker value is - ' + datePicker.title);
        });
 
 
detailWindow.add(tableView);  
      detailWindow.open({
        animate: true,
        fullscreen: true
      });
    tableView.add(button);
The error I get is:

message = "Result of expression 'eventObject.rowData' [undefined] is not an object.";

in regards to these lines here:

tableView.addEventListener('click', function(eventObject){
    if (eventObject.rowData.className == "valueRow")
    {
        pickerView.animate(slideOut);
        datePickerView.animate(slideOut);   
        sportPickerView.animate(slideIn);
    }
and my picker values come back as undefined.

Any insight on where to look? Any help would be much appreciated, and I posted code that I thought was relevant, if more pieces of the puzzle are needed, let me know.

-Andrew

Your Answer

Think you can help? Login to answer this question!