Why doesn't CodenameOne Picker show chosen list items after GUI Builder? - codenameone

I am beginning to learn cn1 and am having a bit of an issue in the new GUI builder. It seems that when I add list items (text) to a picker in the GUI builder and save, they do not appear afterwords in the simulator.
If I go back to the GUI builder, they are still under listed items.
Does this mean the GUI build is only the face of the app, and all items must be added later in code, or am I doing something wrong?

I see the problem, it's a regression in the Picker class. It was caused because of a fix to a different problem. I fixed this in this commit https://github.com/codenameone/CodenameOne/commit/03f82ece7500d4ad57c8f30825fb401431adf798
The fix will be available next week. In the meantime as a workaround you can go into the source code of the form. You would need to expand folded code if it's folded and you would see code similar to this:
gui_Picker.setPropertyValue("Strings", new String[]{"Red", "Green", "Blue", "Yellow"});
gui_Picker.setType(4);
Just copy the setPropertyValue line and paste it in the second constructor under the initGuiBuilderComponents(resourceObjectInstance); line.
The bug is that the setType call erases the value.

Related

sortablejs not working within SharePoint (webpart)

I have an application where items can be dragged and dropped between two lists. For this I use react-sortablejs (which uses sortablejs).
When I start my React application normally (in dev mode or deployed standalone) the drag and drop works as desired.
However, as soon as I embed the application in a SharePoint page (using webpart), the drag and drop feature starts to go haywire: the first drop works as desired, but all subsequent drops of the same item result in strange behavior, primarily duplication of the item.
After some debugging, it looks to me like the item remains in the old list and therefore an error occurs when the item is "pushed back" or a duplicate occurs because another item is pushed into the same list.
I therefore don't think that this is a problem of the library itself (also because I haven't found any similar error messages about this), but that it has something to do with SharePoint. I noticed in another context that classic context menus with absolute positioning also cause problems because event.pageX and event.pageY contain different values.
Anyway, at the moment I have no clue to get to the bottom of this problem, so I'm hoping that anyone might have had similar experiences before. Maybe this ticket will help someone else who runs into similar problems in the future.
My problem went away after setting forceFallack to true

View new warnings for this build in Warning Next Generation Plugin

Warnings Next Generation plugin contains very useful graphs showing new warnings in this build
Anyone know how to see which warnings make up the new warnings? I can't figure it out via the UI and docs. I have the source and that'll be my next step of no one knows. There's an API too.
Above the table we see two charts. If we click on the arrow for the donut chart we can view the Reference Comparison and if we click on the part of the donut pertaining to the items for which we care, then the table changes what it displays.
In this case, I care about New items so I click on the tiny sliver at 12 o'clock on the donut and see just that one new item.
This is either a brilliant design or a horrible one. A coworker figured it out. I didn't see it even after looking through the code.

Change Textview's Text Upon Change of ComboBoxText Selection - Gtk+ 3.0 in C

I am building a GUI program that allows users to choose between a few software profiles for them to get written to their USB drive. I have chosen GTK+ 3.0 in C, and my supervisor is aware of my chosen method, so I am not changing it.
What I am trying to do is really quite simple but I'm still having trouble finding a comprehensive answer.
I want to be able to allow the user to select a (text) entry in the combo box and have the corresponding description show up in the frame/textview. The description in the textview should change properly to be the description for that combo box entry (the one selected).
My UI is mostly contained within a Glade file. Currently, the UI is functional but changing between combo box entries does nothing to the textview.
EDIT: I removed the posting of my code because it's too long and maybe it was throwing people off. Apologies. I can post things at request. Thanks.

Changed label text on form, designer shows new text, running program shows old text

I change the text property of labels on a windows form. The form displays the correct new labels when displayed in the VS 2010 forms designer. I also change the color of the font.
When I run the program, the window displays the old text values instead of the new text values. The form displays the new font color on the labels.
There seems to be no occurrences of the old text value in the source code. Where is the old text value still hiding?
I clean the solution and rebuild it, but nothing changes.
A colleague observed that this is an artifact of converting projects from VS2005 to vs2008 to VS2010 and suggested a "brute force" corrective measure.
It actually worked.
1) Create a new blank form in the project.
2) In the original form, using the forms designer "Edit" menu, use the "select all" and "copy" actions. This copies all forms objects into the clipboard.
3) Paste the clipboard into the blank form.
4) Copy (most of) the program code from the old form into the new form, excluding anything generated by the forms designer.
5) Delete the old form from the project. Make changes as necessary to use the new form
Not very elegant, but good for meeting a deadline.
Thank you J.H!
Epilog:
"Brian" and "Blogbeard" both had the right direction in suggesting a hidden resource file.
Early in the execution of the code lay a method call to an obscure subsystem that no one knew anything about. That subsystem turned out to be a defunct language translation module which was supposed to translate all of the labels in a form from a native language to a target language.
It was configured to keep the original labels and their translations in a file outside the scope of the IDE. Changes in the form itself were completely ignored if the translator found the label name in its file.
Moving the form contents to another package effectively disabled the translator.
The elegant solution turned out to a three-line change that removed the method call to the translator. (it was no longer required in the application)

Generating output in a Windows Form App

I am working on a windows form app like most development it is usually useful to see output. I am wondering what methods you use to see output in a windows form app.
PS. I am new to visual studio in general.
You can set some Labels around and display text on them:
Label.Text = "Some Text";
And DataGridView controls for information from tables, and for a better insight, you can set breakpoints in your code by clicking the far-left part of your code editing area. When the program reaches to that point it'll stop and you can hover your variables and objects for a better view of their insides...
Oh, and also VS has a "Locals" window when you run your project, that shows all the objects and variables being used and some information about them.
the user interface (a grid or other
controls on a form)
a report (like Crystal)
a file (.txt)
a database table updated

Resources