Ticket Created
over 4 years ago

WERETECH-9934

Impossible to pushView from TextPickerDelegate.onTextEntered

I tried to push a Progressbar from TextPickerDelegate.onTextEntered, but the ProgressBar doesn't appear on screen on the device, while it does on the simulator.

Through trial and error I was able to work around the issue by pushing the view twice:

function onTextEntered(text, changed)
{
	var progressBar = new WatchUi.ProgressBar("Searching...", null);
	WatchUi.switchToView(progressBar, SearchProgressDelegate(), WatchUi.SLIDE_IMMEDIATE);
	WatchUi.pushView(progressBar, new SearchProgressDelegate(), WatchUi.SLIDE_IMMEDIATE);
	return true; // This is not documented in the SDK!!!
}

It also seems that there's a different behavior for return true/false that is not documented in the SDK.

Parents
  • What device?

    in the API guide, switchToView has this:

    Prior to ConnectIQ 3.1, this method only supported switching to user-defined View objects, and would only accept InputDelegate or BehaviorDelegate objects as delegates for the pushed View.

    The ProgressBar is probably considered a system view.

    I'm not sure why you're doing both a switch and a push.

Comment
  • What device?

    in the API guide, switchToView has this:

    Prior to ConnectIQ 3.1, this method only supported switching to user-defined View objects, and would only accept InputDelegate or BehaviorDelegate objects as delegates for the pushed View.

    The ProgressBar is probably considered a system view.

    I'm not sure why you're doing both a switch and a push.

Children