I am trying to print a custom paper ; however , when I create a new paper size with the class PrintHelper to access the private constructor of Paper
Paper customPaper = PrintHelper.createPaper("105MMx22MM", 105, 22, Units.MM);
I receive the following error message in the console :
cannot access class com.sun.javafx.print.Units
I am using javafx 11.0.2 , and this is my VM option:
-p
"C:\Users\...\AdditionalLib\javafx-sdk-11.0.2\lib"
--add-modules
javafx.fxml,javafx.controls,javafx.graphics
add --add-exports javafx.graphics/com.sun.javafx.print=ALL-UNNAMED into VM option should fix the problem .
Generally , if the JavaFX rises some error which looks like :
module <javafx.some-module> does not export <some-packet> to unnamed module
should be resolved by :
--add-exports <javafx.some-module>/<some-packet>=ALL-UNNAMED
Related
I'm following the socially app tutorial : https://www.angular-meteor.com/tutorials/socially/angular2/3-way-data-binding
but i'm having an error at step 3 : Cannot find module ../../both/collections/parties.collection. Note that typings and typings-core are both installed and i can see them under the node_modules.
So what is causing the error ?
here's my structure :
parties.collection.ts is under myApp/both/collections/
My main component file calling the parties.collection.ts is under myApp/client/imports/app:
import { Parties } from '../../both/collections/parties.collection';
Add another ../ to the path, the tutorial has it demonstrated incorrectly.
I'm new to Android development and test, currently I'm training to make a test scripts under Python and then use monkeyrunner to run them.
As said in MonkeyDevice official documentation , the [getProperty()][1] and [getSystemProperty()][2] should return you a value that depends on property variable name you pass for them. Each time I got only 'None' value. Any idea or trick?!
The simple code I'm using :
from com.android.monkeyrunner import MonkeyDevice,MonkeyRunner
device = MonkeyRunner.waitForConnection()
print device.getSystemProperty('version.sdk')
Regards,,,
You need to specify the property group. For example:
print device.getSystemProperty('build.version.sdk')
for whatever reason both getProperty() and getSystemProperty() don't work for me but you can run:
$ adb shell getprop
which returns a complete list of attributes/values
I'm trying to create a benchmark for part of my 2D game framework (It's a QML extension) and I'm having problems to set a declarative script property of a QOBject.
The property declaration:
Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript NOTIFY scriptChanged)
And one of my attempts to change the script is something like this:
ScriptBehavior *behavior = new ScriptBehavior(entity);
QDeclarativeProperty(behavior, "script").write("console.log(1);");
But it doesn't work (Run the benchmark, but don't write anything to te console).
I've tried to use setProperty and manually create a QDeclarativeScriptString and set the property, but nothing works.
When I try to create the QDeclarativeScriptString, It fails:
The code:
ScriptBehavior *behavior = new ScriptBehavior(entity);
QDeclarativeScriptString scriptString;
scriptString.setScript("console.log(1)");
behavior->setScript(scriptString);
The output:
QFATAL : UpdateBenchmark::behavior() Received signal 11
FAIL! : UpdateBenchmark::behavior() Received a fatal error.
Loc: [Unknown file(0)]
Any help?
Thanks
I am using products.sqlalchemypas-1.0-py2.6.egg for authenticating user from MSSQL Table. Authentication work as expected but now I'm trying implementaing groups plugin to
get groups from different table. What happening is when I'm trying to loggin its giving me error saying AttributeError: getGroupsForPrincipal.
Error Traceback is ..
2012-02-21T15:33:14 INFO Zope Ready to handle requests
2012-02-21T15:39:25 ERROR Zope.SiteErrorLog 1329838765.580.598770330561 http://localhost:8060/dev/login_form
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.BaseRequest, line 596, in traverse
Module Products.PluggableAuthService.PluggableAuthService, line 235, in validate
Module Products.PluggableAuthService.PluggableAuthService, line 735, in _findUser
Module Products.PluggableAuthService.PluggableAuthService, line 668, in _getGroupsForPrincipal
AttributeError: getGroupsForPrincipal
My defination in plugin.py is ...
def getGroupsForPrincipal(self, principal=getSecurityManager().getUser().getId(),request=None):
"Getting groups from SIMS"
import pdb; pdb.set_trace()
groups = []
results = self.simsGroupForUser(username=principal)
for row in results.dictionaries():
group = row.get('group')
groups.append(group)
return groups
Don't know why its not able to reach this method in plugin.py however there is implatemented block where I did define this interface to implement resulting showing groups interface in my acl_user pas object.
[added]
I've tried to import my plugin in debugger and tried to reach this method and have same error so I dont know Do I need to define anything specifically to pick this method in my pas. I did define in my implements class to impelement IGroupsPlugin.
Any comment is great help as always.
I don't think you method definition does what you expect it to. principal=getSecurityManager().getUser().getId() will calculate the default parameter at import time rather than at method execution time.
Just found that My file has wrong indentation, that why it was giving attributes error. Thanks all for your time and comments.
I have a DLL in wich I would like to take a reference to a QObject and manipulate it, without actually creating an interface. So, I included "Qt/qobject.h" and compiled, but the compiler (Visual Studio 2008 pro) gives me syntax errors. It looks like it doesn't recognize the QThread object. How do I use a QObject in my dll? Is this even possible? Do I have to start my program from a Qt app? I'm actually trying to set a system-wide hook and get 3rd application QWidgets to manipulate... Any idea how I can use QObject in my dll?
Here are the errors:
1>------ Build started: Project: FroggerDLL, Configuration: Debug Win32 ------
1>Compiling...
1>FTClient.cpp
1>c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(154) : error C2059: syntax error : 'type'
1>c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(154) : error C2238: unexpected token(s) preceding ';'
1>c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2144: syntax error : 'int' should be preceded by ')'
1>c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2144: syntax error : 'int' should be preceded by ';'
1>c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2059: syntax error : ')'
1>c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2208: 'int' : no members defined using this type
1>FroggerDLL - 6 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========
Any help would be greatly appreciated,
Thanks
Dave
What's on line 154? Mine is just the declaration
QThread* thread() const;
but that's 4.5.1 on Linux so it might be different. The first reference to anything involving the token type is on line 204 which is a variable of type Qt::ConnectionType.
BTW. I just tried compiling the following on my system ( in the file incqobj.cpp )
include <QOObject>
QObject myQOject;
with
g++ -I/usr/lib/qt4/include -I/usr/lib/qt4/include/QtCore -c incqobj.cpp
and it compiled fine so it should be as simple as that.
Edit: Since Jesse confirms that it works for him on Windows I'm tempted to say that you've got a non-Qt macro coming in and interfering. One thing you could do is a sanity check on what the compiler is actually seeing by getting VS to only produce the preprocessed source rather than do the compilation.
I haven't used VS in years but I think the option is \E maybe?
[Edit: see the 2nd comment by Jesse, it should be /E] It may also be an explicit option now in the compiler properties which can be set for that source file. Can't remember where it puts the output either so you may need to hunt around for it a bit! If you get that going though you can check to see if the code looks right at the part that would correspond to line 154 in the original QObject header.
Thanks for all the help, solution: I had to include the Qt headers before all my other includes, and it now compiles.
Thanks again!
Try including QThread?
#include <QThread>
Qt uses forward declaration extensively and sometimes you need to include extra headers.
EDIT:
Do you set any defines? Here is what I have for my 2003 Qt commercial (4.3.4) project (executable that links to Qt dlls):
QT_LARGEFILE_SUPPORT
QT_DLL
QT_GUI_LIB
QT_CORE_LIB
QT_THREAD_SUPPORT
QT_NETWORK_LIB