I am using Vaadin 7.4 and I try to handle the situation, when a user want to close the editor when editing a row.
While trying this, the method setEditorEnabled(false) throws an IllegalstateException. I did not want to handle this Exception, so I check, if isEditorActive(). When it is active, I cancel the editor.
if(getGrid().isEditorActive())
{
getGrid().cancelEditor();
}
getGrid().setEditorEnabled(editMode);
setEditButtonDescription(editMode);
getAppendButton().setVisible(editMode);
getDeleteButton().setVisible(editMode);
getResetButton().setVisible(editMode);
getSaveButton().setVisible(editMode);
My problem is, that after the cancelEditor() call, the setEditorEnabled(false) is not working. The grid is still editable.
When I does not call the cancelEditor() method, the setEditorEnabled(false) is working.
Does anyone know, where I made a mistake?
Maybe there is another solution for the problem or I just have to catch the exception.
Thanks
This issue is fixed in Vaadin 8.5.1.
Related
DukeScript is quite clever in the way it handle changes to the Model so that code is hot-swapped at runtime, see for example here.
One thing it doesn't seem to handle at Runtime though is changes to the HTML layout. Given it runs in a WebView, a kind of a browse, it would nice just to be able to reload the page without having to stop and restart the app.
So, I've tried adding a "reload" button, but I can't find an easy way to do that after the initialization:
BrowserBuilder
.newBrowser()
.loadPage("pages/index.html")
.loadClass(Main.class).
invoke("onPageLoad", args).
showAndWait();
showAndWait() does what it's supposed to do, it doesn't return until the browser is closed. There doesn't seem any way to act on the underlying instance of a WebView and its thread.
Ha ha, simple but effective solution:
Reload
Note: Toni Epple says NetBeans would just detect the change, no reload needed.
When I try to open one of my forms in the designer, it says, "Object reference not set to an instance of an object." It does not provide a way to continue, and it does not give me any clue as to what is causing the error.
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
The code compiles and runs perfectly. Cleaning, rebuilding, closing, reopening haven't worked. All the other forms open fine.
I don't even know what information is relevant. What recourse do I have to debug this?
This will sound silly. The form is apparently a duplicate for a work in progress and the build action was set to None. Setting it to Compile caused the designer to act as normal.
It would be nice if the designer would at least point you in the right direction. Problem solved.
This is because there is' an exception in the event "Load" of the form.
Place the code inside a "try .. catch" block to see the exception
I focus on a cocoa app supported on 10.6, and I use cell-based NSTableView.
I custom the NSCell so that it can display image and text.
The Problem here is : when I set the doubleClickAction to the tableview, it did not respond.
I have already found it due to the custom cell. I guess the cell stops the responding chain, but I don't know how to fix it. I search the document, and I've no idea which method to be overridden.
Please give some guides and Thanks!
For anyone coming across this question as I did, the solution in my case was a missed call to:
[self.tableView setTarget:self]; //This was missed
[self.tableView setDoubleClickAction:#selector(doubleClick:)];
I was working on creating my custom "Button" class... Im not using CCMenuItems because I need some flexibility in my buttons.
My implementation is the following:
DMenuButton : CCSprite <CCTargetedTouchDelegate>
When created, the button receives a target and selector, and builds an NSInvocation. When touched, the invocation is called. I will use this buttons mainly to go from one layer to another.
The problem is that when going from a layer to the next, and then back to the previous, something strange occurs: either no sprites are loaded into the next view or an EXC_BAD_ACCESS error is thrown.
Can anyone help me with this?
Thanks!
PS: My theory is that it has to do with the NSInvocation and the "dealloc" method.
Am I doing something wrong?
I'd like to simplify the TodoMVC app for meteor. There is currently some observe that should not be needed I think. I simplified a bit successfully, but when I try to simplify it further the updating doesn't work properly.
For instance, it should get selected when I click on all the items in the todo list but doesn't. When I refresh the page it is selected though.
Edit: Got rid of an unrelated error, thanks to #TomColeman.
I'm seeing that error before the patch is applied. It's due to the Meteor.flush on line 74.
I'm not sure why that flush is needed? (I'm also not sure why there's an error either).
Turns out it simply was because the correct html is checked="checked", not simply checked.