The XXX are just names that I need to keep confidential.
Compiling module com.XXX.XXX.XXX_Test
Validating newly compiled units
Ignored 12 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Scanning for additional dependencies: file:/D:/Eclipse/Indigo/Workspace/XXX%20Test/src/com/XXX/XXX/client/Restlet.java
Computing all possible rebind results for 'com.wai.XXX.client.proxy.DonglesProxy'
Rebinding com.XXX.XXX.client.proxy.DonglesProxy
Checking rule <generate-with class='org.restlet.rebind.ClientProxyGenerator'/>
[ERROR] Errors in 'file:/D:/Eclipse/Indigo/Workspace/XXX%20Test/src/com/XXX/XXX/client/proxy/DonglesProxy.java'
[ERROR] Line 11: No source code is available for type org.restlet.resource.ClientProxy; did you forget to inherit a required module?
[ERROR] Unable to find type 'com.XXX.XXX.client.proxy.DonglesProxy'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
Here is what the console tells me when I try to do a GWT Compile on my project. What I don't understand that I've included the 'org.restlet.jar' into the buildpath of the project and have the following imports in the DonglesProxy source code:
import org.restlet.resource.ClientProxy;
import org.restlet.resource.Put;
Anyone any ideas?
I'm new to Java and the whole Web Application process so my knowledge is a bit lacking. This is actually someone else's project that has been left unfinished so I'm trying to debug/understand someone else code whilst learning as I go along...nightmare :(
Any help would be greatly appreciated!
Cheers
Kev
You must use :
import org.restlet.client.resource.ClientProxy;
import org.restlet.client.resource.Get;
import org.restlet.client.resource.Post;
import org.restlet.client.resource.Result;
to define the proxies; Take notice of the "client" part;
The referenced imports must be part of the GWT distribution;
You have to add it to your projects xml file. That is to com.XXX.XXX.XXX_Test.gwt.xml or something like that.
You have to add this line there,
<inherits name='org.restlet.whateverClass.xmlfilename />'
This means you are pointing to the xml file named xmlfilename.xml at the path org.restlet.whteverclass
So say for example if i am using sencha ui libraries jar, I will add,
<inherits name='com.sencha.gxt.ui.GXT' />
So here there will should be a xml file called GXT.xml at the path 'com.sencha.gxt.ui'
Related
I'm trying to implement drag and drop using this tutorial. In this tutorial i have to create a refs like this list = createRef<RecyclerListView<any, any>>() (line no 55), which is giving me syntex error: unexpected token. What i understand is that, they are using .tsx extension (don't know what for) but i'm using .js extension, which maybe the reason why this code not working in my end, and not finding any solution of that. Can anyone help me out on that? Thank you
.tsx extension is for Typescript files. Javascript is not a typed language. To put it simply, Typescript was built to make Javascript look like a typed language. Whatever you put in <> after createRef, specifies the type of the ref that is being created and you can only use types in Typescript files (.ts and .tsx). If you want to move to Typescript, you'll have to do some setup and change your file extensions to .tsx. Otherwise, if you'd like to stay on .js, just ignore the types in the tutorial and instead write list = createRef().
Im attempting to update an old version of the selenium-tcl package to work with the new W3C WebDriver (or Selenium 4.0).
Original packages uses a few mixins for the webdriver class.
So I modeled what I saw and created a mixin file named mixin_action_chains.tcl [1] which has a mixin class called Mixin_Action_Chains.
Whenever I attempt to use it I get the error:
% package require selenium
::selenium::Mixin_Action_Chains does not refer to an object
Im not sure why I've modeled it pretty much exactly as I have seen in the other files such as mixin_for_scrolling.tcl [2]* file. What am I missing.
Here is the entire GitHub Repo
Im not sure what else must be done for TclOO. Any thoughts.
Thanks
Im not sure what else must be done for TclOO. Any thoughts.
Update
pkgIndex.tcl: The placement of the mixin-defining script mixin_action_chains.tcl is wrong, it comes after the mixin has already been required in the previously sourced script webdriver.tcl, like entering directly:
% oo::class create C {
mixin ::not::defined
}
::not::defined does not refer to an object
You need to change the order of source command calls in the package ifneeded script.
For the records
Still, in the original version, there were unbalanced curly braces and brackets in your script, which broke sourcing of the file for me:
https://github.com/SavSanta/w3cselenium-tcl/pull/1
I am trying to do a POC on Typescript with AngularJS and Grunt. I did not find a lot of documentation that clearly explains the process.
I see that when I add the all the typescript references in _all.ts, It just works. But I need to understand the why. Who parses the _all.ts to make it work?
Folder Structure
anggen
-.tmp
-app
-blocks
-common
-images
...
-styles
-404.html
-_all.ts
-app.ts
-favicon.ico
-index.html
-bower_components
-node_modules
-test
-typings
-.bowerrc
-.editorconfig
-.gitattributes
-.gitignore
-.jscsrc
-.jshintrc
-.travis.yml
-.yo-rc.json
-bower.json
-Gruntfile.js
-package.json
-README.md
-tsd.json
-tslint.json
TypeScript landscape has evolved quite a lot. _all.ts is a very old workflow (before tsconfig.json became a thing). The compiler would parse it to find all the files that make the compilation context
For new code
* One should use tsconfig.json
* Use modules (recommend --module commonjs)
* Use a module loader (recommend webpack).
A foobar package
foobar
__init__.py
foo.py
bar
bar.py
Inside the __init__.py
from . import foo
from . import bar
Even though bar is not a package or a sub-package, it is still imported as a module (lolwut). I checked the import type by doing print(type(bar)) inside the __init__.py and it printed <class 'module'>... that's it. What's going on here? It is a module object, so I did print(dir(bar)) and the output was ['__doc__', '__loader__', '__name__', '__package__', '__path__', '__spec__']. Now, what's even more confusing to me is the __path__ variable in this. Isn't that a package-only thing?
Is this what's known as a namespace-package? I am thinking that it isn't, nevertheless I tried one more thing inside that __init__.py file - added a line import bar.bar. It ended in an ImportError. So, to sum up my question, what is this module useful for? Why did Python import this in the first place?
There's an amazing tutorial on this entire topic by David Beazley. I have watched the whole thing a while ago, but I guess I should watch it again to recollect everything.
From the docs
A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. Within a module, the module’s name (as a string) is available as the value of the global variable __name__.
...
Packages are a way of structuring Python’s module namespace by using “dotted module names”. For example, the module name A.B designates a submodule named B in a package named A.
...
Packages support one more special attribute, __path__. This is initialized to be a list containing the name of the directory holding the package’s __init__.py before the code in that file is executed. This variable can be modified; doing so affects future searches for modules and subpackages contained in the package.
While this feature is not often needed, it can be used to extend the set of modules found in a package.
So yes, the __path__ variable is applied to the modules inside a package as well and those modules are treated as 'submodules of a package'
Edit
In Python 2.x, that package with the from . import bar would return an ImportError at that line. On Python 3.x the modulefoobar.foo has a type of <module 'foobar.foo' from '../py/foobar/foo.py'> and the foobar.bar of <module 'foobar.bar' (namespace)>.
Apparently, it appeared here
Regular packages will continue to have an init.py and will reside in a single directory. Namespace packages cannot contain an init.py
I'm working on a Windows Forms solution with many winform ui projects.
There is a class library project that contains some custom shared controls, named MyControls.
Now, when I create a control in MyControls
that is composed of one or more controls in the same project, I run into problems.
I either get compilation warnings: warning CS0436: The type 'MyType' in 'path-to\MyType.cs' conflicts with the imported type 'MyType' in 'MyControls.dll'. Using the type defined in 'path-to\MyType.cs'. Or I get a bunch of different compilation errors, all pointing to "MyControls.dll" (error CS0234 - "are you missing an assembly reference?").
I get either the errors, or the warnings, never both.
How to solve this?
Note
I added visual-studio-2010 because that's the version I experienced the problems with. No idea if this relates to other versions too.
I found that Visual Studio adds a self-reference to MyControls when I drop a control from the MyControls project on another control in MyControls:
<Reference Include="MyControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
My current work-around is to manually delete this reference from the MyControls.csproj using a text editor.
When I've done this, everything works fine, until I drop another control that triggers a self reference.
Better solutions are appreciated!
you can make a small and "legal" change in your solution and get the "legal" solution... lets say your project name is: "project01"
go to references folder in your project - one of your references called "project01" - just remove it...
the the warning is very fair! you design a form and in the other hand import your project as a reference!
I know this thread is a bit old, but I just went looking for a solution to this issue, and it seems that MS doesn't have anything other than what Marijn suggested earlier:
https://connect.microsoft.com/VisualStudio/feedback/details/613502/automatically-add-self-reference
Hopefully it's fixed in VS 2012.