dynamic gui's in Kivy - kivy

I am considering diving into Kivy, but i have one question that is very important for my application:
is it possible to generate Kivy guis on the flight. I have seen the kv gui definition language, but in my use case a kivy app would download a gui (e.g. form) definition from a server and generate the gui/form on the flight (on the server the gui definition is also dynamically generated).
What would be the approach to implement this? For example is it possible to access and change the widget/layout tree that is normally generated from the kv definition?
Cheers, Lars

is it possible to generate Kivy guis on the flight
Yes, it is, and it's a very normal thing to do.
kv just lets you define a state of the widget tree, it doesn't set anything in stone. You can use add_widget or remove_widget at any time to change what widgets are displayed.

Related

Modifying Feature name at run time or using environment variable/system property in feature file

I have an automation project that i've recently updated to run both a set of Android and iOS tests in parallel. I've got my report files aggregating ok, but since they're running the same features, the reports at the end can't really identify which ran on Android and which on iOS.
It is a pretty standard Cucumber, Gherkin, Java project. I'm trying to figure out the best way to get the word Android/iOS into the Feature name field, so on the generated report it can be easily identified.
The two options i've thought about are either during the #Before step, to somehow modify the feature name. However, it looks like all of the fields of the Scenario object have getters only.
The second option was if it was possible to reference a system property or environment variable in the .feature file itself. However, I haven't seen any ways that that is possible.
Has anyone tried this before? I can post code as necessary, it is more of a general question of how could I dynamically change a feature name, or alter a feature file itself by environment variable when it runs.
Thanks
I think this similar question may have the answer you're seeking.
Basically, you're going to create your own runner type (or modify the existing one) and inside it set a custom report path.

Unity3d. Instantiate prefabs before runtime with parameters

I've recently started learning unity3d.
I'd like to procedurally generate some stuff (a forest made of tree prefabs) in the editor and then bake on the lighting. So the stuff needs to be instantiated before runtime.
This article was good for showing how to generate stuff before runtime
http://www.scriptocalypse.com/?p=102&cpage=1#comment-258
To summarize, it shows you how to add custom gameobjects to the gameobjects menu so you can instantiate them before runtime.
But you only get a menu option to click. I would like to be able to have more control of variables, so for instance set the radius, intensity and so on and then click a generate button. Any ideas?
I know I could do this by just changing the parameters in the script but a graphical interface like the way unity normally works would end up faster in the long run I think.
Ok, what I wanted was this
Allows you to design your own custom windows in the editor, unity is awesome!

How to create and immediately be able to use spritefonts during runtime?

I'd like to know if it is possible to select a typeface, font size and be able to use it right away during runtime in an XNA application.
If it isn't possible using built-in runtime methods, maybe it's easier (or better, or faster) to do it using some automation software (like autoit) to create spritefont file in the background, and be able to use it afterwards in an XNA app without restarting the app?
I'm going to use this mainly on my own computer for testing and picking fonts, so I'm okay if it requires full VS installation along with XNA framework and any other stuff.
Easy put, it can be done, but you have to use WinForms, link to tutorial in order to load spritefonts. You could do it simpler, by making a couple of spritefonts before you do anything (or create spritefonts for every font you have and add them to the content). This is so, because of how XNA handles spritefonts. As you've seen, SpriteFonts are basically an xml file. This is not how the final binaries are. The final binaries are images containing every character in the font you selected at that size. That way, the gamer doesn't have to have the font installed in order to play your game, and therefore you can do some awesome stuff with fonts and the user can't use that font (unless he rips it).
I have not yet found a tutorial for winforms and spritefonts, but I suppose that the model version needs only a little modification for it to work with spritefonts.

Why is there a required build step for Web UI apps?

Why must we run a build.dart script to develop with web_ui ?
I thought it was an frequent noob question about web_ui but I do not find an answer about that. Maybe I miss some web resources or articles.
With Angular.js or Polymer MDV don't need it, and they use bidirectionnal binding.
With future version of Web_ui or Chronium version, does the build.dart will be still necessary ?
This side of web_ui disappoints me a little bit and I feel it could discourage developers to use it.
Another point is I don't like project organisation with HTML sources in "web" and another "web/out" directory ? Can we configure the script to have another out directory like "templates" for templates and "web" for output ?
Than
If you want to use #observable, then you need to run a code generation step. Because Dart is a more structured language, it's not currently possible to add methods or change structure of an object at runtime. Therefore, we must run through a small code generation step that converts #observable into the code to track and notify for changes.
Polymer doesn't need this because they can alter the object at runtime. Also, Object.observe is landing in V8 (already landed?) which means the runtime performs observability automatically.
We know this is a problem, and we have a few ideas on how to solve it.
Build a devserver that does the building for you automatically.
Implement (eventually) mirror builders, which would allow you to alter program structure at runtime.
Option 1 is a near-term solution, and option 2 is a long-term solution.

Simplest way of localizing InstallShield Registry keys

Which is the simplest way to localize the registry keys based on the selected language of an InstallShield setup?
I am thinking about writing an VBS which sets some properties based on the selected language. These properties could be used from within the registry key dialog of InstallShield. But isn't there a simpler way?
Found a way myself.
Instead of writing a vbscript you can add two components. The first components adds the english registry keys and the second one the german ones. In order to use only the correct component during install you can set the condition of the german component to "ProductLanguage=1031" and the englisch component condition to "ProductLanguage=1033".
Thats all :)
Of course it is arguable whether the use of multiple components or a script which changes properties used by only one component makes more sense but by using multiple components you can create your registry keys through the designer. Using a script which changes properties will certainly lead to more errors since the script has to work and every property has to be set correctly. In my eyes its more simple by using the components way.

Resources