Quantcast

Any datepicker examples?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Any datepicker examples?

Fernando Cassia
Hi there,

I have a friend who's coming from a Python background, and would like
to dabble in Jython.
Are there any samples online for instance for generating a simple
Jython JAR that calls datepicker API to select a certain date, then
does something with that?

My intention is to encourage him to get into jython rather than to
scary him, to the simpler the sample code is, the better...

For instance I told him to get Netbeans and the Jython plug-in,
although I'm not sure if the one on the Netbeans Plugins page works
well with 2.7x

Thoughts? Comments? Thanks...
FC

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Any datepicker examples?

Curtis Rueden
Hi Fernando,

> I have a friend who's coming from a Python background, and would like
> to dabble in Jython. Are there any samples online for instance for
> generating a simple Jython JAR that calls datepicker API to select a
> certain date, then does something with that?

The SciJava Jython script language plugin [1] supports a special parameter syntax, which lets you specify inputs of various types, including dates (harvested under the hood using JDatePicker).

Here is a sample script:

  # @Date date
  print("You chose: " + str(date))

But that is not exactly vanilla Jython.

I looked at calling JDatePicker directly, but it is a little involved since you have to set up your Swing components and such. Probably not the friendliest intro to Jython for your friend. Does it have to be date picking specifically?

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden



On Wed, Mar 8, 2017 at 8:11 PM, Fernando Cassia <[hidden email]> wrote:
Hi there,

I have a friend who's coming from a Python background, and would like
to dabble in Jython.
Are there any samples online for instance for generating a simple
Jython JAR that calls datepicker API to select a certain date, then
does something with that?

My intention is to encourage him to get into jython rather than to
scary him, to the simpler the sample code is, the better...

For instance I told him to get Netbeans and the Jython plug-in,
although I'm not sure if the one on the Netbeans Plugins page works
well with 2.7x

Thoughts? Comments? Thanks...
FC

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Loading...