I have a dataservice with todo's, if someone else clicked the checkbox (at another device) I want to disable it with state 'checked'.
My problem is that even the checked state is true, it turns to unchecked in the ui when it was switched to 'checked AND disabled'
for me it seems like a bug, but maybe I missed somewhat?
thx...
Pitt
Related
I have an application which worked well so far.
Today I have updated my ubuntu to 18.04 and therefore reinstalled all software components, including Qt.
Now I experience a pretty wired behavior.
When I compile my application in debug build, everything is correct. When I switch to release build some combo boxes become invisible.
What is strange is, that events still work, the comboboxes are still there (but invisible).
I know this because I use an installEventFilter()
with if(event->type() == QEvent::Enter) which changes some other widgets if I hover the combo box with the mouse. Although the combo boxes are invisible the events still work when I hover the area where the combo box would be located.
Unfortunately, I do not know what makes this issue, so I cannot reproduce it in a minimal example.
My question is: Did anybody experience something like this before?
And: Where should I start to look for the error?
(I cannot debug it because everything is correct for debug builds)
By the way: I do not know if this is related but when I first tried to run the application I got an error that gl/gl.h was missing. After asking my friend google for help I found out that OpenGL was missing, so I installed it.
I would go and look for uninitalized variables when setting the properties of the combobox. Usually in debug even unitialized variables are set to some fixed value.
Or maybe you are setting properties in an assert that is not compiled in the release build? E.g. like this
Q_ASSERT(...)
that code in between the () will just be skipped during a release build.
I am not sure what the state of click is with the new version 0.3.0 but even with fastclick. On click event handlers are really slow to respond. Sometimes the first few clicks are just ignored.
Fastclick seems to ignore taps that the browser perceives to be a touchmove. See pull request for the needed changes for this to work https://github.com/Famous/famous/pull/421
how can i access the content property of a controller within the chrome debugger.
I really try to find a way to debug my application. So far i can't find a way to do that.
Thank you
Alex
add the statement
debugger;
in the method you want to debug,
Open Google Chrome, CTRL+SHIFT+i
Hit the URL of your application, navigate to the state where you think the code would run
Google Chrome automatically stops at the debugger; statement and focuses you to the sources/scripts tab as you can see in the picture
Inside the Watch expression tab click on the "+" too evaluate code in your case it would be
this.get("content");
As long as you have this breakpoint you can switch to the console panel and execute the code in that context, whenever you are done you can either close the panel by clicking CTRL+SHIFT+I or the close button down there, you can add breakpoints manually by clicking on the line number as well , Hope this helps
For more info
I'm using Ember Extentions which is not ready yet but certainly usable.
There are 2 possibilities
Use the Ember Inspector Tool for Chrome: It is not officially released yet, but from what i have heard it seems usable. I had no time to try it myself yet, but here is an article telling you how to install and use it.
Get access to your controller in the console of your browser. And then examine it as you like. Here is the code to get access to your controller.I use it myself in my app for debugging:
// i assume that your Ember.Application is stored in the global var App
var App = Ember.Application.create({
getController : function(name){
return this.__container__.lookup("controller:" + name);
}
});
// now you can use it like this. To get the users controller (App.UsersController) just use this in the console:
App.getController("users")
I'm in the process of looking into auto-enabling an IE9 toolbar so the user does not need to click the enable button, and I noticed another company used the following method.
Delete the registry key HKCU\Software\Microsoft\Internet Explorer\ApprovedExtensionsMigration\
Create a new key under HKCU\Software\Microsoft\Internet Explorer\ApprovedExtensionsMigration\
Add my toolbar's CLSID string value HKCU\Software\Microsoft\Internet Explorer\ApprovedExtensionsMigration{XXXXXXX....-XXXX}
x. Internet Explorer 9 automatically enables my toolbar and proceeds as if the user had clicked enable.
I have not found any documentation for this method, but I believe the way this works is Internet Explorer 9 believes the toolbar is going from IE8->IE9, and enables the toolbar. Should this method be considered unsafe for use (too hacky and will instantly get flagged by anti-virus), or is this considered a valid way of auto-enabling a toolbar?
Also, does anyone know if this method works in Internet Explorer 10?
Can't find any resources about this method. Viruses will use this method for sure (see http://www.threatexpert.com/report.aspx?md5=bde1312b225ad987b57b1dbef0885817 which is an identified virus that do exactly that), but since this registry is deleted (or at least the Time Stamp value is changed) in legitimate scenarios, it is possible that anti-viruses will not freak out, as they don't want to create false positives.
Regardless, what you are trying to do feels bad.
Also you should consider other users on the machine (not currently logged in).
We are using Eclipse API in our RAP application.This uses Eclipse Modeling Frame Work.
When a page gets edited, Model Becomes Dirty and as a Result,Save Button gets Enabled.
In our editor pages, when ever there is an error in the Page, we set the Validation flag of the Editor page to false, which would in turn display red colored marks on the page.Then usually save button is also becoming enabled.
But, I want to change this behavior.When some error mark appears on the page, I don't want to get the save button enabled,.It shouldn't allow the user to save the model in the error stage.
The save button should be disabled, How can I achieve this.
Kindly clear my doubt.
The editor generated by EMF uses a commandstacklistener to fire a PROP_DIRTY to the editor. If this property is fired, the underlying framework will ask the editors #isDirty Method for the dirty state. This is the place where you can implement your logic.
#Override
public boolean isDirty() {
Diagnostic diagnostic = validateMyModel();
return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded() && diagnostic.getSeverity() == Diagnostic.OK;
}
This case doesn't cover the usecase, that the editor could have been already dirty when the user makes a not-valid edit on the model.
But that is not the best way IMHO. Because if the user closes the editor all changes of the model are lost, without any notification (because of the missing dirty-flag). So he probably did 100 valid modifications, 1 invalid and loses his changed model.
A better way is to show a warning-message if the user wants to save the dialog. If there are errors in the dialog the editor cannot change its state from dirty to not-dirty and the user has to
correct all erros or
close the editor and looses all his changens
To achieve that you have to implement in your doSave(IProgressMonitor progressMonitor) method a dialog to show the errors. The more tricky part is to override the default-behavior of closing a dirty editor. The workbench will show a dialog with, Yes, No and Cancel
To override this behavior you have to implement the interface org.eclipse.ui.ISaveablePart2 in your editor to override the promptToSaveOnClose() method. In this method there must be again your logic that checks for errors in the model. If there are errors, this method has to return ISaveablePart2.CANCEL so that editor is not closable as long as there are errors in the dirty model.
HTH Tom