PyGtk, The Widget that have default choice like RadioButton - pygtk

How to Create RadioButton object that have default choice? perhaps there is a another way than my way. I want to share the class I created. my widget is SpecificToggleWidget i hope, maybe can useful for someone.

this is The SpecificToggleWidget. code of this module and example are very long so i shared link instead of sharing in here.
https://drive.google.com/drive/folders/0ByGGW28GJgmod1ROMUxVQzd0RE0?usp=sharing

Related

Sitefinity: How to use ExpandableObjectConverter with new interface

I have created an expandable follow the document below:
https://knowledgebase.progress.com/articles/Article/how-to-use-expandableobjectconverter
It's working, but when I switch to the new interface(new UI) it is not working.
Could you help me to fix it?
new interface
old interface
expected with new interface
If you want to have the UI looks like the one in point 3 of your screenshots, then you should not use a class property and the ExpandableObjectConverter.
Instead in your controller create the individual properties, maybe add a Category attribute to them.
Update: Documentation: https://www.progress.com/documentation/sitefinity-cms/autogenerated-widget-property-editors

Shopify/Liquid related

I'd like to know how I could possibly rearrange the order of a list in Shopify. Now please do note that I have to use the default methods in Liquid as my boss doesn't let me create my own ones. And I also need to override the default order which is set in the admin panel. So is there a way to override it or how could I do it in Javascript? Thanks in advance, regards.
[SOLUTION] I used the tinysort JQuery plugin (http://tinysort.sjeiti.com/)
$(document).ready(function() {
$('table.tables').tsort({data:'price', order:'asc'});
});
This is if you have tables with the class "tables" and with the attribute data-price. The .ready is so that all DOMs and everything will be loaded before we execute the sorting. Hope someone will find this helpful.

Search usages of Subclass's method

I have parent class Parent with method getToken(). And I have its child class - ChildA and ChildB, which don't override method getToken().
How I can search usages of method getToken() which used by instance of class ChildA?
Sorry for my English. Thanks!
As I spent half an hour to find the exact solution through all complicated and outdated documentations and examples, I just put the full answer using SSR here (Intellij 15.0.5):
Open SSR dialog (Edit > Find > Search Structurally...) and input template in screenshot, then click on "Edit variables..." to see the second dialog and edit the "Expression type (regexp)" as shown:
and if you want to include subclasses of ChildA too, just check the box "Apply constraint within type hierarchy" bellow the expression type:
You can add getToken() to ChildA, perform the search only for this method, then delete it. Another way is to use Structural Search and Replace.
Intellij asks about this if you use Ctrl+Alt+Shift+F7 for the search. First you have to explicitly override the method in the subclass/subinterface though, as CrazyCoder suggested.

FindRow with text values inside span attributes

I am using Watin to find rows in a jQuery table. However, jQuery sets some of its text in a cell within a span class. Watin does not work in these cases.
WebBrowser.Current.Table("grid").FindRow("Liza", columnNum)
The above code works for:
<td>Liza</td>
but not for:
<td><span>Liza</span></td>
Any clue how I can tweak the Watin code to work with span classes?
You might want to try using the Text property to identify
WebBrowser.Current.Table("grid").FindRowInOwnTableRows(t => t.Text.Trim()== rowidentifier, columnNum);
I had some similar issues, my recommendation is to create a helper class that's available to all your specs and you add helper functions there, such as removeHtml, wait for async request, this kind of thing. a good starting point would be these methods http://www.dotnetperls.com/remove-html-tags
So on your tests you can do something like
// where .NoHTML() is a extension method in your helper class
WebBrowser.Current.Table("grid").FindRow(value.NoHTML(), columnNum)
This might not be the exact answer, but I hope it helps

dojo: how to i know all the extension points of a widget

Say for example that i have a grid (dojox.grid.DataGrid). I want to know all the extension points available on that grid.
When checked with the dojo api doc in events section of the grid i cant find the extension points, (say for example extension point onBeforeRow is not listed in that event section).
Thanks in advance.
pretty much every public method is an extension point, in that you can dojo.connect to it. The "on" pattern indicates an event pattern, and there's no formal declaration beyond the naming pattern AFAIK.