bixby: Audio is playing message twice while on selection page (simulator) - bixby

My capsule was working good and still working good if used on BixbyStudio-6.8.1-r19f.7483-win but after the latest update, my capsule is reading message twice on selection page. My message is
Please select one of the following
it is showing proper on the screen but while reading, it is reading like
Please select one of the following ... press back if you want to pick
up where you left off ... Please select one of the following
The message "press back if you want to pick up where you left off" keep changing in every hit. Sometimes it says
what you you like to do next
Every other message is good but this is happening on selection page.
My selection code is
input-view {
match: FoodChoiceResult (this)
render {
if (size(this.multiple_choice)>0){
selection-of (this) {
navigation-mode {
read-many {
page-size (3)
page-content{
underflow-statement (This is the final set)
item-selection-question (Please select one of the following)
overflow-statement (That's all I have)
}
}
}
has-details (false)
where-each (item) {
layout-macro (food-type-summary) {
param (singleFoodItem) {
expression (item)
}
}
}
}
}
}
}
please suggest if this is issue from end.

Yes, this one is on us.
IDE simulator has this issue. There is a bug. Our IDE engineers are working toward a solution.
Meanwhile on-device testing should be ok, voice output should only speak once and with no additional content.
Sorry about the inconvenience.
I will post updates regarding this issue here.
===
IDE release version 6.14.0 should fix this issue, please verify.

Related

Adaptive Card QuickView Navigation not firing

Ok, so I'm just getting started with adaptive cards and downloaded the PNP ACE project (Git Hub Link) to use as a jumping off point. Started the project up and ran gulp serve.... everything seemed great.... until I tried to click either the View Items or Add Item buttons on the CardView. Both of these buttons fire QuickViews, but when you click them nothing happened. Tried 2 different browsers, no errors registered in the console, it just acts like there isn't an action tied to the buttons.
So, thinking "well maybe something got screwed up in a commit", I started a brand new project using yeoman.
Got the project set up, building and served it up; EXACT SAME PROBLEM!! The button in the default ACE project template didn't work either. I can't figure out what gives.
Here is the function for the button that the template created :
public get cardButtons(): [ICardButton] | [ICardButton, ICardButton] | undefined {
return [
{
title: strings.QuickViewButton,
action: {
type: 'QuickView',
parameters: {
view: QUICK_VIEW_REGISTRY_ID
}
}
}
]};
That looks just like the PNP example (and every other example I've seen online). Even the quickViewNavigator is populated the same. Here is the one from the template project (class definitions removed to save space):
const CARD_VIEW_REGISTRY_ID: string = 'JasonAdaptiveTest_CARD_VIEW';
export const QUICK_VIEW_REGISTRY_ID: string = 'JasonAdaptiveTest_QUICK_VIEW';
public onInit(): Promise<void> {
this.state = { };
this.cardNavigator.register(CARD_VIEW_REGISTRY_ID, () => new CardView());
this.quickViewNavigator.register(QUICK_VIEW_REGISTRY_ID, () => new QuickView());
return Promise.resolve();
}
So what gives? Why do these not work? Is there some NPM package that may be missing?
Well, found the line buried in the tutorials that explains my problem. A single note, in a page that isn't necessarily about quick views.
Note
ACE interaction is disabled while in Edit mode. The Workbench or Page must be >in Preview or Read mode to interact with the ACE.

Tauri : How to open webpage when cliking on the menu

I'm trying to make a small tauri app with the same menu on the top of each page. I followed this tutorial, "Adding the menu to all windows" section. I can see the menu, I can quit the app with it, but I can't find out how to go to another hmtl page when cliked.
I've got this piece of code but I have no idea what to put under "accel"
.on_menu_event(|event| {
match event.menu_item_id() {
"quit" => {
std::process::exit(0);
}
"close" => {
event.window().close().unwrap();
}
"accel" => {
//not working, as you can imagine
//tauri::WindowUrl::App("index.html".into());
//I would like tauri to display index.html in the main window
}
_ => {}
}
})
Does someone has an idea on how to do that ? I've found dozen of example code with menus but none showed what I'm looking for (or I'm unable to point out the line I need)
Thanks for your help !
I finally got the answer from the tauri discord chat, I hope it can be useful to someone?
window.eval("window.location.replace('your.url')");
made the job

Closing an Imgui window: this seems like it should be easy. How does one do it?

I have started using the imgui system for visualizing "whatever". I am in my first few hours, and am running up against what seem to be common snags.
However, although I can see some pretty good support for the C++ versions of ImGui (which I'll transition to eventually), the python imgui content is mostly obscured.
What I am looking for is the solution to the following problem:
while not glfw.window_should_close(window):
...
imgui.new_frame()
imgui.begin("foo-window", closable=True)
imgui.end()
Everything works fine. However, the window doesn't close. I understand that the window doesn't close because it is always created every loop.
What I am looking for is:
How do I detect and identify that the particular window has been closed, and block it from being re-generated?
I'm not at all familiar with the imGui for Python, but if it at all follows the similar pattern as in imGui for c++, then you need to follow this pattern:
static bool show_welcome_popup = true;
if(show_welcome_popup)
{
showWelcomePopup(&show_welcome_popup);
}
void showWelcomePopup(bool* p_open)
{
//The window gets created here. Passing the bool to ImGui::Begin causes the "x" button to show in the top right of the window. Pressing the "x" button toggles the bool passed to it as "true" or "false"
//If the window cannot get created, it will call ImGui::End
if(!ImGui::Begin("Welcome", p_open))
{
ImGui::End();
}
else
{
ImGui::Text("Welcome");
ImGui::End();
}
}
JerryWebOS's answer is basically correct, but to add to that here's the python version. Note that the documentation for pyimgui is a good source to find answers to questions like this one.
https://pyimgui.readthedocs.io/en/latest/reference/imgui.core.html?highlight=begin#imgui.core.begin
imgui.begin() returns a tuple of two bools: (expanded, opened).
You can use this to detect when the user closes the window, and skip rendering the window in the next frames accordingly:
window_is_open = True
while not glfw.window_should_close(window):
...
imgui.new_frame()
if window_is_open:
_, window_is_open = imgui.begin("foo-window", closable=True)
...
imgui.end()

Can't get range from a defined name

Excel 2016 (Office 365) 32 bits, 16.0.6965.2115, Visual Studio 14.0.25425.01 Update 3
I'm quite sure the statement below used to work, but now it doesn't work anymore:
var range = ctx.workbook.names.getItem("Countries").getRange();
I get an error stating that there is no support for getRange method, but it should be supported as documented here.
What am I'm doing wrong?
--- EDIT: this is the code I'm using ---
function paintRange() {
Excel.run(function (ctx) {
var range = ctx.workbook.names.getItem("Countries").getRange();
range.format.fill = "green";
return ctx.sync();
}).catch(function (error) {
app.showNotification("Error", error);
})
}
paintRange is attached to a button. There is a global scope defined name called Countries.
I don't have any more details of the error besides the one I mentioned, I also tried opening the quick watch window to get more clues.
UPDATE: The issue is fixed with an update to the CDN. You should be able to use namedItem.getRange() now. Thanks for reporting the issue, and allowing us to do a quick turn-around on it.
================
Felipe, looks like you're absolutely right. This is definitely a bug. Let me talk to the right folks to get this regression fixed as soon as we can. I'll see if we can put in some processes to avoid this in the future, as well.
From an immediate-workaround perspective, two options:
Use the BETA CDN (esp if it's for an in-development add-in, rather than a production one). That URL is: https://appsforoffice.microsoft.com/lib/beta/hosted/office.js
Do a temporarily filling in of the inadvertently-removed getRange functionality. Inside of Office.initialize, include the following code:
if (!Excel.NamedItem.prototype.getRange) {
Excel.NamedItem.prototype.getRange=function () {
return new Excel.Range(this.context,
OfficeExtension.ObjectPathFactory.createMethodObjectPath(
this.context, this, "GetRange",
OfficeExtension.OperationType.Read, [], false, true, null
)
);
};
}
The workaround in #2 should not cause harm even after the functionality is restored, but I would none-the-less recommend making a mental note to remove this after we've fixed the issue. I'll update this thread once we have fixed the underlying bug, hopefully within a weeks' time (as a very rough estimate, pending any complications that might delay it).
Thanks for bringing it to our attention -- both the individual bug, and the underlying process that let the regression to this one API go unnoticed.

"immediate_failed" - Could not automatially log in the user

I have a problem when I developed my website with Google+ sign-in:
I did step by step that the doc told me but I always failed at step4:
https://developers.google.com/+/web/signin/
the result was always ""immediate_failed" - Could not automatially log in the user", I just don't kown why, can anyone help me, thanks very much! :-(
Note that in the sample code you pointed to, the "immediate_failed" check is commented out. This is intentional, since the first time a user encounters the Sign-in button on the page, it will fail.
The reason it fails is that when the page first loads, before the user even presses the button, a request is sent to Google to determine if the user has already logged in (via Google or another site, for example). If they are - there is no need for them to log in again, so the button never needs to be shown. But if they have not been logged in already, you will get the "immediate_failed" response, and will need to either show (or not clear) the button.
tl;dr - Don't worry aout getting immediate_failed when the page first loads. This is normal.
As a workaround I use gapi.auth.authorize method in the gapi.auth.signIn callback. Here is my code:
gapi.auth.signIn({
'callback': gPlusLoginCallback
});
function gPlusLoginCallback(authResult) {
if (authResult['status']['signed_in']) {
doSmth(authRes['access_token']);
} else if (authResult['error'] == "immediate_failed") {
gapi.auth.authorize({
client_id: gplusClientId,
scope: 'https://www.googleapis.com/auth/plus.login email',
immediate: true
}, function (authRes) {
if (authRes['status']['signed_in']) {
doSmth(authRes['access_token']);
}
});
}
}
function doSmth(accessToken){
//Do smth
}
Change this setting "immediate: true", to be false " immediate: false".
But if you like to make more complex implementation look at the first sample here https://developers.google.com/api-client-library/javascript/start/start-js. You have to calls to Google's "gapi.auth.authorize({...", the first one with "immediate: true", and the second one with "immediate: false".
The question is old but I faced this issue recently.
In my case, it was because I specified the URI parameter prompt to none. I guess Google doesn't like that if the user has never been logged to your platform before.
Whenever I changed that to consent or totally removed it, it worked great.
In my case, the error was because of explicitly specifying the authorization parameter prompt to 'none',similar to a previous answer.
It worked for me by specifying prompt=None or as per the official docs,you may skip this parameter.

Resources