Custom spinner component

I would really like to get into development in a big way. I’ve downloaded the SDK and am reading the manual right now.
I think that the next step is going to be to actually create and upload something custom into the designer.
The challenge that brought me to look into javascript and eclipse weeks ago was the idea of modifying the standard spinner component to have a weighted acceleration that would be dependant on the amount of time the use holds the input.
I am looking forward to the component vision module section of the manual and hope it leads me toward a successful trial of the SDK system.
( I was assuming that I could import the Ignition spinner and add some event handler onto the action listeners for the inputs that effect the arrows and their durations.)
Anyone have any suggestions?
I really have a limited knowledge of java and I have only sampled Eclipse, pydev, and windowBuilder plugIns in the past.
I am going through the helloworldComponent example script now making some changes.

Step one is probably going to be to build the component you want completely outside of Ignition, using plain Java.

Then, when you have it working as you want, you can make a module to add it as a component. I’m not really an expert on component building, but I think the easiest thing to do is extend AbstractVisionPanel, add your customized spinner to that panel, and then expose the properties you want through the getter/setter style defined for JavaBeans (the programmer’s guide talks about this).

My main point: if you don’t have a lot of experience with Java, be careful not to get overwhelmed by nuances of working on a module. Start with stand alone proofs of concept, and go from there.

Good luck,

C:\Users\AJ\IgnitionSDK_workspace\example\Build\build-component-example.xml:105: Specified module file does not exist.

I was trying to upload the component-example build file…
Keep getting this error. Does it matter that I’m not doing this on my server, but on a computer on the same network?

I’m now seeing this one too

C:\Users\AJ\IgnitionSDK_workspace\example\Build\build-weather.xml:60: The following error occurred while executing this line:
C:\Users\AJ\IgnitionSDK_workspace\example\Build\build.xml:41: Error running javac.exe compiler

Have you modified the build file at all? The posted snippet seems to have the “local.gateway.url” property expanded, but not the other properties. Are you just running the “deploy” target, or are you running the full “BuildAndInstall”?

At any rate, it’s failing on the part that deploys to the development Ignition, saving you the time of manually installing each update. Try running just the “build” target. If that works, you can just install the module manually, or go further and try to figure out why the deployment is failing.


I had modified the files a little bit, yes.
Now I reset them to the defaults and ran build-component-example to see this error:

Buildfile: C:\Users\AJ\IgnitionSDK_workspace\example\Build\build-component-example.xml
[delete] Deleting directory C:\Users\AJ\IgnitionSDK_workspace\example\Build\bin
[echo] ComponentExample
[echo] Build date: 09/10/2012 02:24 PM
[echo] Build version: 1
[echo] Compiling ComponentExample_Client
[mkdir] Created dir: C:\Users\AJ\IgnitionSDK_workspace\example\Build\bin\ComponentExample_Client\bin
[javac] C:\Users\AJ\IgnitionSDK_workspace\example\Build\build.xml:41: warning: ‘includeantruntime’ was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to C:\Users\AJ\IgnitionSDK_workspace\example\Build\bin\ComponentExample_Client\bin

C:\Users\AJ\IgnitionSDK_workspace\example\Build\build-component-example.xml:59: The following error occurred while executing this line:
C:\Users\AJ\IgnitionSDK_workspace\example\Build\build.xml:41: Error running javac.exe compiler

and if I do as you say to only Build.
I get the exact same thing

The JDK either isn’t installed, or isn’t the Java that’s currently on your path. When running from eclipse, you need to add it under Windows->Preferences… Java->Installed JREs. You probably have a JRE set as a default. You may need to add the JDK and then select it.

If that still doesn’t work, right click on the target (build and deploy) and select “External Tools Configuration”. Look at the JRE tab, and select the JDK that you previously set up.

Good luck,

I have JRE7…
What JDK should I be using? Where would I get it?

I still haven’t figured this out.

			memoryinitialsize="128m" memorymaximumsize="512m" debuglevel="lines,vars,source">

seems to be the problem line…
I have jre7 as the default

I’m afraid you’re jumping into the deep end of the pool. The Ignition SDK really isn’t a great place to start learning Java, it really requires a fair bit of experience to be effective in. I’d highly recommend working through some online tutorials, perhaps some focused on Eclipse. As I mentioned in the first post, it’s going to be better if you make the component that you wan’t completely outside of Ignition, and then worry about integration later.

Leaving Ignition totally out of the picture, getting the JDK set up is going to be fundamental to any Java tutorial. Unfortunately we’re just simply too busy to help you get running from the ground up. In the context of this thread, it’s like this: ANT can’t find the Java compiler, which is part of the JDK. With that information and Google, I’m sure you can figure it out.

Oracle’s Java site is probably also a good place to start, I’m sure you can find many resources there: