Using Slider on LiveCard - google-glass

Is there a way to use a Slider on a Livecard ? I've been using them on Activities, but on Livecards I just need to publish a RemoteView on the timeline, so there is no Activity to pass to the Slider.

Unfortunately, this is not possible. Sliders will need a view for the Slider.from(View v) call.

Related

Foundation 6 drilldown menu: add back event to custom button

The default js-drilldown-back button is not the way I like it.
Instead of having an entire li element for the back functionality I would like to trigger the back event on a custom element.
How to achieve this?
The documentation is everything but clear to me on how to do it: https://get.foundation/sites/docs/drilldown-menu.html#_back
$('#element').foundation('_back', $elem);
What is #element and what is $elem in this context?
For the time being I created an (ugly) workaround:
I let foundation render the default back button but I hide it via css.
My custom back button then triggers that button's event:
$('.drilldown .back').on('click', function(){
$(this).closest('.submenu').find('.js-drilldown-back > a')[0].click();
});
Not great, not terrible.

Watchkit popToRootController not working

I am using a vertical page direction on my watch app, and I have a button that opens a new interface, which opens the third interface also from a button, this is done by using the modal view, and in the third interface i am calling popToRootController, because i want to go back to the first interface, but this is not working, have anyone same issue?
You need to use dismiss if you present view controllers modally using presentControllerWithName.
You can use popToRootController or popController if you present the view controllers hierarchically using pushControllerWithName.
You can read more on the Apple Interface Navigation guide.
In your example if you want to dismiss twice, you will have to pass a delegate or closure with the context to your second controller. Then you can call the delegate method or closure after dismiss() on the third controller. The implementation of the delegate method or closure will be another dismiss().

Get data from Double click on non-editable Kendo Scheduler

I tried to get the data for empty kendo scheduler. Mean no event. I try to extract atleast start time, end time and date. I off the editable. mean I not use the window that kendo provided. I try to custom by using bootstrap modal.
here is my event delegate
$("#scheduler").delegate('.k-event', "click", function (e) {
debugger;
});;
I can get the event on this scheduler, but i cant extract data without event.
To get the underlying event object from event element you can get it's data-uid attribute and pass it to the occurrenceByUid method. Demo is available in the method description (check the link).

Sending Ember Highcharts events back to parent component

I'm using Ember 2.3 and have built a controller around Ember Highcharts. When a chart point is clicked I send that event back to the controller via the following nasty bit of code added to the highcharts configuration object:
Graph.__container__.lookup('controller:accounts.account.outlets.outlet.ratings').send('pointClick', event);
(I know this is fundamentally wrong and should be using getOwner.lookup for the container reference)
This works without issue, but I'm now refactoring this controller to a component and can't think how to pass the graph event back to the component as components are not registered in the app container.
Any pointers to how to achieve this would be very much appreciated!
Thanks.
UPDATE
I've just discovered that I can send an action to a component from the Highcharts event function:
Graph.__container__.lookup('component:ratingsGraph').send('pointClick', event)
But this seems to create a new instance of the component, rather than send to the existing instance. I guess that makes sense as components aren't singletons.
Very frustrating!
Some days you can't see the wood for the trees!
Instead of defining the highcharts event function in the highcharts configuration parameters, I simply defined it within the component and passed it to highcharts. This enabled me to use a closure to hold reference to the defining component.
Doh!

Add mouse click event to QGraphicsView created with QtCreator

Is there a way to create a event to the QGraphicsView created without creating another class and inheriting the QGraphicsView?
I want to know if there's a way to do something like that:
ui->gView->AddEvent(click, functionName);
Thanks.
If you want to handle mouse click event for the view, install an event filter to the view and watch for MouseButtonPress event.