npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hxextjs

v0.0.2

Published

Ext JS 4.0 Externs for haXe

Downloads

5

Readme

This Repo is no longer maintained (IMPORTANT)

To anyone coming looking for ExtJS externs for Haxe - be warned - I am not maintaining this. I only ever got this working to a very basic level and there were issues with ExtJS using a different object model to Haxe, and I never ended up using it in my project so these issues remained unresolved.

I've left the github project up in case anyone wants to take it further, and it seems some people have had some luck:

https://groups.google.com/forum/#!topic/haxelang/JUzl1WNwHmU

you could try contacting them directly. I think this is the way to go: fix buildjs to build better externs, and then use a custom JS generator to work with ExtJS's object model... but it's not an effort I'm likely to be part of.




Ext JS 4.0 Externs for haXe

Here is my attempt at creating Ext JS externs for haxe. They compile correctly at the moment but expect errors. Hopefully with time I will be able to weed them out and have it working properly.

Kudos goes to Joshua Granick for his excellent tool to read jsduck documentation, which Ext JS uses, and turn it into haxe externs:

  • http://www.joshuagranick.com/blog/2011/10/14/use-buildjs-to-make-externs-for-haxe-js-automatically/

There were still a few glitches, but overall this saved a lot of time. Hopefully it will create something functional in the end.

The example

The example I have compiled is in main.js, and can be viewed from index.html. I have tried to build the code from this tutorial:

  • http://www.sencha.com/learn/a-basic-login/

Other than removing the server side bits, there are some things that need recoding. For example, the tutorial tries to reference "login" in the same statement that defines "login", which haxe can't accept. Will have to figure out another way to code this.

Steps for getting this far

If you want to help with the effort, here are the steps for getting this far:

  • Download the latest ext-4.* source
  • Use jsduck to create the JSON documentation for Ext JS
  • Use buildjs to create the externs from the JSON files
  • Make some changes that are required for the library to compile in haxe
  • Build a sample project

Most of these can be done by some handy shell scripts:

  • ./generateExterns.sh to download extjs, and generate externs using ''jsduck'' and ''buildjs''
  • Make custom changes to a few files, as documented below
  • ./packageForHaxeLib.sh to package the new externs for haxelib and submit them.

Run jsduck to generate the JSON documentation

# Run this from the root of the repository
jsduck ext-4.0.7/src --export=full --output jsduck-json/ --images download/docs/images --pretty-json

Run buildjs to generate the haxe externs

# Run this from the root of the repository
haxelib run buildjs externs -extjs jsduck-json/ haxe/

Build example

# Run this from the root of the repository
haxe build.hxml

Changes required after building the project

Had to modify these things:

  • change ext/Array.hx to have a type parameter in the class definition
  • commented out "name" property in ext/env/Browser.hx
  • commented out "name" property in ext/env/OS.hx
  • removed package "core" in "import ext.core.Element;" in ext/AbstractComponent.hx
  • rename "ext/String.hx" to "ExtString.hx" - to stop it getting confused and expecting this instead of a normal string.
  • in "ext/Ext.hx" change method "onReady()", final 2 parameters should be optional. (Line 120)
  • rename "ext/String.hx" to "ext/ExtString.hx" (they're all static and shouldn't be needed in haxe, and it gets confused with the haxe String class)

Licence

These externs and related haxe code are licenced under BSD. The ExtJS library itself you can get from Sencha, and is usually available under either GPL or a commercial licence.