html() method in Quill formula.js - mathjax

In the Quill editor, I try to adapt the formula module for using it with MathJax.
I do not understand what is the html() method used in the Formula class : https://github.com/quilljs/quill/blob/develop/formats/formula.js
Moreover, it seems never being called. Is anyone has an idea of what this method is for?

Related

Is it possible to get intellisense to work with Geb page objects?

I am guessing this is more of a groovy issue due to the geb implementation, but I'm wondering if there is any way to get intellisense to work with the geb page objects. I am also new to Java/Groovy (primarily C# development in the past) so there could be some things I'm just not quite understanding. I'm using Intellij, but I'd be happy if there is any IDE that could give me what I wanted.
As far as I can tell, Geb's implementation is that they have a Browser Class with a Page property and any methods or properties that are executed without the context of a specific Page instance will at runtime trigger a MissingMethod or MissingProperty exception, which Geb handles and re-routes to a corresponding method or property in the Page class that is currently set via the Page property in the Browser Class.
What this means for development is that when we're creating test cases, the IDE is unaware of which page instance is the current Browser Page property, thus no intellisense.
We experimented with creating instances of the pages and explicitly calling them, and also making our helper functions within the page classes static, both of which led to other issues.
For our shop, this is pretty much a deal breaker, but before we give up I wanted to see if any Geb or Groovy experts could offer some advice on how to get intellisense working, or could give us an indication of whether it is even possible.
EDIT: I found within the geb documentation a section on Strong Typing and IDE support that looked promising: http://www.gebish.org/manual/current/ide-and-typing.html#ide_support however, the examples provided fail. I pasted the example directly from geb documentation below, with comments showing where/why it fails:
HomePage homePage = browser.to HomePage //browser.to returns null, so this fails
homePage.loginButton.click()
LoginPage loginPage = browser.at LoginPage //browser.at returns boolean so this fails
SecurePage securePage = loginPage.login("user1", "password1")
//The only thing that I got to work, which seems messy is:
browser.to HomePage
HomePage homePage = browser.page
homePage.loginButton.click()
Ok... So, I had an old version of Geb somehow being pulled from my gradle cache. After fixing that problem and actually using Geb 0.9.2, the documented usage worked correctly: http://www.gebish.org/manual/current/ide-and-typing.html#ide_support

How to make JavaFX TableView cells editable?

There are a lot of tutorials, And a lot of suggestions to achieve this by extending JavaFX cells to make them editable. A good one is this stackoverflow question.
But the official tutorials uses a method call to create the callback without writing all that code, By calling
lastNameCol.setCellFactory(TextFieldTableCell.forTableColumn());
However when I do this in my code (FormTokens is my "model"):
// At beginning of class declaration
#FXML private TableColumn<FormTokens, String> valuColumn;
// Later at initialization
valuColumn.setCellFactory(TextFieldTableCell.forTableColumn());
Compiler says:
The method
setCellFactory(
Callback<TableColumn<FormTokens,String>,TableCell<FormTokens,String>>)
in the type TableColumn<FormTokens,String>
is not applicable for the arguments
(Callback<TableColumn<Object,String>,TableCell<Object,String>>)
If I remove the method call mentioned above everything works well except that TableView cells are not editable. What am I doing wrong?
edit: I just found this: Javafx TableView can not be edited But there are no solutions. How do I cast Callback<TableColumn<Object,... to Callback<TableColumn<FormTokens,...?
Specify the exact type explicitly for generic parameter as
valuColumn.setCellFactory(TextFieldTableCell.<FormTokens>forTableColumn());

Purpose and use of properties 'action', 'actionListener', 'actionListeners'

In a button I can see three properties action, actionListener & actionListeners. I tried to use the actionListener property by creating a class implementing java.awt.event.ActionListener and implementing actionPerformed method and then calling the class using expression language. But nothing happened.
Even the documentation on these properties is cryptic. Can anyone explain how these properties are used and their purpose?
I think you need to use "javax.faces.event.actionlistener" and it uses processAction method. I assume you know though that xpages uses xp:eventHandler's instead of the vanilla JSF 1.1 attributes you mentioned.

Pharo: #subclass:instanceVariables... message personalized

I am fighting against the Object message #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category, in order to manipulate subclasses of an specific class.
I have RareClass with a class method #subclass:coposes...etc and want to do:
RareClass
subclass: #RareSubclass
composes: #SomeMagic
instanceVariableNames: ''
classVariableNames: ''
in the browser.
whether this method should return a class, (and i think it does) it is not working at all, im getting parsing errors when i try to 'save'...
I guess you are using OmniBrowser with the Refactoring Engine loaded?
The Refactoring Engine enforces the standard class templates to enable undo on any action performed in the browser. Obviously that cannot work with custom class definitions.
As a workaround you can do one of the following:
Use the traditional browser that has no undo functionality (evaluate Browser open),
Get rid of the refactoring functionality in OmniBrowser by unloading the package "OB-Reactory", or
Update the code in RBAddClassChange to support your use case.

UITableView "Bind()" methods - any tutorials or examples out there?

I have just noticed that UITableView comes with a couple of Bind() methods. Looks like that's an alternative to implementing UITableViewSource over and over again, or am I wrong?
Does anybody have samples? Also any other samples of binding would be interesting, like binding a textfield to a model using MonoTouch.
René
The method you're looking at is:
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Protocols/NSKeyValueBindingCreation_Protocol/Reference/Reference.html
This has nothing to do with UITableView or UITableViewSource data binding.

Resources