How do you use setInitialMenuItem for Google Glass menus, and do you have example code? - google-glass

Google Glass online documentation mentions the method but with minimal documentation:
https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/view/MenuUtils
Should this be called from onOptionsItemSelected or onCreateOptionsMenu?
Any example code would be most appreciated.

You should call this method from onCreateOptionsMenu or onPrepareOptionsMenu in order to set the menu item that will be initially visible when the user asks for the menu to be displayed. If you call it from onOptionsItemSelected, then it will be too late, since the menu was already displayed and interacted with.

Related

How to take user input using C/AL in NAV 2016?

Suppose I want to write a simple addition program using C/AL in NAV 2016.
How can I dynamically ask user to enter the two numbers?
In Microsoft Dynamics AX we use "dialog" class for this purpose.
I need some code reference or the description to approach such process.
In Dynamics NAV do not have something like Dynamics AX dialog class.
In this case you need create a page with your fields to user complete the info.
Then in other page call this new page to open it and the user can complete de info or add in MenuSuite to access.
Example:
Page 88000 Calculator
Variables
Action and Action code
Page running
Then you can create a menuSuite for this page or write this code in other page to open it
PAGE.RUNMODAL(88000);
You can use
Page object as described in other answer. But to get values from it to calling function you would need to create source table for that page. Or throw some function to it like GetValues.
Use dialog.input. It may be obsolete though.
Use dialog class from windows .net library. Will not work in web client though.
Depending on situation report’s request page might be a good option.
To help you better please describe the requirement you stumbled upon.

How do I invoke an ActiveX control's property page?

I have created an ActiveX control that uses five different colors. I would like to the control's property page to let the user choose the R, G and B values for each of the five colors. That won't be a problem. My problem is: how do I display the property page? For the sake of this question, let's say I want to connect it to the control's double-click event. The user would double-click on the control and the property page dialog box would appear. What code would have to be in the event handler to do that?
And yes, I know I'm working with antique technology. So is the rest of my company, and far too many other companies.
In case it matters, I'm writing the control in C++ using Visual Studio 2012.
As I was about to ask this question over on reddit since I don't have an answer here yet, it occurred to me that one would want to invoke a control's property page from the control's container, not the control itself. So, I went to my test application, typed my instance's variable name, and Intellisense showed me that the control has a property named ShowPropertyPages().

How to test menu item using Jubula

I'm a beginner for developing intelliJ plugins. I've already established connection from Jubula to my AUT.
I want to write a test suite, to check the availability of a sub menu item in intelliJ.
Please assist me.
If you don't want to dig too deep into Jubula, then all you have to do is use the Observation Mode (camera icon) and record clicking on your menu item.
When the test is executed it will do exactly the same; it will mark the test failed if the menu can not be clicked.
There's also a cheat sheet on how to test menus available via Help/Cheat Sheets. The documentation for testing menus is here:
https://testing.bredex.de/files/content/software/documentation/reference/components/ch03s02s05.html
(the link to each action description is at the bottom of the page)

BlackBerry Cascades UI File Selection

I have set up a BlackBerry Cascades-UI project. I am using QML to define the look and feel of the user interface. I need to provide the user a method of selecting an image from the device photo gallery after the screen has been touched.
Does anyone have any idea on how to provide a list on the screen with all the images in the gallery and their appropriate names after a touch event has been triggered?
Perhaps someone would like to know even though nobody answered.
There currently is no Photo Gallery dialog (though it is announced and will probably be released in an update in the near future). However, it is possible to invoke a native file selection dialog from another thread. For more information about this, go to the support forums for Cascades and find a topic called: "Using native filebrowse and filesave dialog in Cascades".
Here is a link.
on beta 3, you can use file picker to select file(s)

windows forms, how to launch a separate window with datagridview?

I've some data that can be shown on grid attached on a panel. When user clicks some button i'm showing this panel. Now i wanted to launch this grid in a separate window(should be a child to existing window) and want to make the grid editable, click controls...etc, is it possible?
thanks in advance.
You should be able to achieve this effect by placing your grid on a separate form, complete with editing stuff. Disable the form and set its parent, (see control.parent), to be the main form panel. When the user wants to edit it, set the grid-form parent to nil and enable it.
Not actually tried this with WinForms, but it works fine with Delphi VCL so worth a test if no better answers are forthcoming
Rgds,
Martin