Comments (9)
Huh, I was pretty sure it works and comments are allowed anywhere.
I think comments are necessary - they are the only link between DTD files and Java code. If you want to see the full documentation about a certain attribute or tag, you can CTRL click
it in most IDEs, check out the name of the Java class in its comment and then go through LML sources.
I can, however, make it optional to generate comments.
from gdx-lml.
Use Dtd#saveSchema(LmlParser, Appendable)
if you want to generate DTD with comments; use Dtd#saveMinifiedSchema(LmlParser, Appendable)
instead.
This fix will be included in 1.6
version. Use 1.6.1.9.2-SNAPSHOT
for now.
from gdx-lml.
If I understood correctly, you altered the 1.6.1.9.2-SNAPSHOT
to use this format:
<!-- CellSizeLmlAttribute -->
<!ATTLIST visslider size CDATA #IMPLIED>
<!-- TreeNodeLmlAttribute -->
<!ATTLIST visslider node CDATA #IMPLIED>
Because that's how my DTD got generated now.
Intellij froze for a bit after generating the file (perhaps because it's massive - it loads all the attributes and tags instantly, though!), but the result is this thing of beauty:
No more red spots!
I'd suggest leaving this as an option in 1.6, since we get to keep the comments.
Finally, thanks for how quickly you sorted this. It makes LML much much friendlier to use!
from gdx-lml.
Yes, I implemented it as you suggested and this is the default generation mode right now. I tested the generated DTD files (both with and without comments) with an external DTD validator and they seem to be correct.
from gdx-lml.
(By the way - you seem to have only 1 root actor in this template: table
. In this case you don't need :noop
root. :noop
is a utility when you need to create a list of actors that should be added directly to stage with a single template - for example, a Table
as background and a Window
for actual GUI. Your template could look like this:
<?xml ...?>
<!DOCTYPE table SYSTEM "lml.dtd">
<table fillparent="true" align="top>
...
</table>
Not that your approach is wrong or anything, but keep in mind that you don't have to flood every template with :noop
, especially since every macro parsing has some [small] overhead.)
from gdx-lml.
Thanks for the tip! I actually added the file header and the <:noop>
root tag to the file template in IntelliJ because I'm lazy, but I suppose most of my templates will end up having a relevant root element anyway so I'll change that!
from gdx-lml.
BTW, have you tried looking into my other extensions? I really appreciate the input of users other than myself, as I'm clearly biased and focused on the features that _I_ needed, which makes it harder to find bugs or lousy documentation. For example, I never needed DTD (having implemented gdx-lml
, I pretty much memorized most of Scene2D API), and now it turns out it had some issues.
It would be great if you had a look at gdx-autumn
(dependency injection with component scanning) and gdx-autumn-mvc
(model-view-controller semi-framework on top of LibGDX) - you can start with this and this example. I think it makes it much easier to build applications, and the slightly longer initial loading time due to reflection use is a small price to pay.
But, obviously, I'll say things like that, as I'm the author. Oh, well.
from gdx-lml.
I looked into autumn-mvc
but decided against using it in my current project for fear of getting stuck at some point (I'm not too experienced and abstracting too much functionality makes it harder to get over some walls).
But since you seem to be actively maintaining this extensions (and willing to help) I will definitely look into it soon.
Right now I'm working on a desktop application and intend on using LML actively (it's truly awesome, thank you for this), so you can count on my input on it in the near future!
from gdx-lml.
Fair enough. Well, thanks for you help with LML. If you have any problems (with gdx-lml
or any other library) don't hesitate to create issues.
from gdx-lml.
Related Issues (20)
- Better websocket error handling
- Inconsistent behavior with percentage values HOT 1
- [WebSocket] get the nvmWebsocket instance HOT 14
- [Autumn] Components initiated 2 times HOT 3
- Window element disappears when changing skin HOT 5
- How to dispose batch of stage? HOT 2
- kiwi logger can not be used with LML Basic Template HOT 1
- pls help me the gwt websoket Thread is not supported HOT 5
- Why the background cover the LmlView HOT 4
- websocket with GWT HOT 7
- Access object field in a loop HOT 4
- FastClasspathScanner is outdated -- consider porting to ClassGraph
- gdx-lml multiple (Sub)View classes for a single view HOT 2
- Project still active? HOT 1
- Using gdx-websocket to connect to a Socket.IO server HOT 4
- List of lml tags HOT 2
- Tag Creation At Runtime HOT 14
- Invalid enum ordinal HOT 4
- Malformed snapshot JAR HOT 8
- Autumn as used in Liftoff not working due to incorrect include 1.9.1.9.6 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdx-lml.