Thanks, Bill, that gives me the necessary clue...

With JHS, the IJT file has got to reside in ~addons/labs/labs/graphics/...
rather than its own addons folder.

Having moved a copy of d3.ijt there, and updated VERSION in
~addons/labs/labs/manifest.ijs
a new build of the "labs/labs" addon has been built.
Once PacMan has been called (menu: link > jal)
the new lab appears in the menu: studio > labs...
  graphics: D3 - How to use with JHS
and it seems to work.

Just one bug in the Lab itself, which seems to be a JHS bug:

When I run the Lab, this is what appears in the session...

----------
Lab: D3 - how to use with JHS
To advance the lab, press Ctrl-. in JHS or Ctrl-J in Gtk.
On a tablet your mileage may vary.

── (1 of 4) Introduction ────────────────────────────────────

D3 is a graphics package written in Javascript.

Here's a demo of how to use it with JHS.
)

── (2 of 4) Activate the Addon: graphics/d3 ─────────────────

Having used Package Manager to install the Addon:
graphics/d3, activate it in the usual way...
)
   require 'graphics/d3'

── (3 of 4) Demo ────────────────────────────────────────────

The Addon comes with a demo.

This creates three new windows in the browser. In each window
you will see a button to plot the graphic. Click the button.
)
   load 'graphics/d3/demo'

── (4 of 4) Demo (ctd) ──────────────────────────────────────

Open the demo and study it...
)
   open 'graphics/d3/demo'
graphics/d3/demo
----------

All steps work ok except (4 of 4)...

The sentence:
   load 'graphics/d3/demo'
does indeed produce 3 valid D3 windows, which proves that it has found
the script: demo.ijs.
However the sentence:
   open 'graphics/d3/demo'
produces a bad link, with the error message: WARNING: file read failed!
On the other hand, if I enter:
   open '~addons/graphics/d3/demo.ijs'
...this produces a valid link:
~addons/graphics/d3/demo.ijs
...which displays the contents of the script: demo.ijs correctly.

I would have thought that if:
   load 'graphics/d3/demo'
is able to read the script successfully, then
   open 'graphics/d3/demo'
...should do so too.



On Sat, Oct 20, 2012 at 3:33 AM, bill lam <bbill....@gmail.com> wrote:
> Browsing the jijx.ijs, it shows control file is not needed becuase
> jhs will scan for ijt files itself.  Try run
>
> getlabs_jijx_''
>
> or re-start jhs if that fails.
>
> (untested)
>
> Птн, 19 Окт 2012, Ian Clark писал(а):
>> Nice demo! And convenient to study & adapt.
>>
>> IMO, ~addons/graphics/d3 -is not the right place to install this
>> package, except as an interim measure. Feel that ~addons/ should only
>> be for stuff downloaded by Package Manager.
>>
>> At risk of being called a busybody, I've taken the contents of your
>> zipfile, added a manifest.ijs (plus a stub-version Lab called d3.ijt
>> and a new script: demo.ijs) and uploaded it to svn.
>>
>> Into: demo.ijs I've put your trial sentences...
>>
>> load 'graphics/d3'
>> d3heatmap makesampledata_d3heatmap_''
>> d3boxplot makesampledata_d3boxplot_''
>> d3treeview makesampledata_d3treeview_''
>> d3treeview_dir jpath'~user'
>>
>> The upshot is, users can now use Package Manager to download a new
>> Addon (JHS only) called: 'graphics/d3' .
>>
>> Once this Addon is installed, all you have to do now is:
>>
>>    load 'graphics/d3/demo'
>>
>> for 3 new browser windows to be created, displaying your plots.
>>
>> @Bill --how do I add a new Lab to the "studio > labs" dropdown menu in
>> jijx? (The way I do it for GTK hasn't worked for JHS.)
>>
>> On Fri, Oct 19, 2012 at 8:02 PM, Jordan Tirrell <jordantirr...@gmail.com> 
>> wrote:
>> > Fixed it. Changing the extension from the default .md to .txt forces github
>> > to display it as plain txt.
>> >
>> >
>> > On Fri, Oct 19, 2012 at 2:57 PM, Raul Miller <rauldmil...@gmail.com> wrote:
>> >
>> >> Since underscores are special in markdown, maybe they need to be
>> >> prefixed with a backslash?
>> >>
>> >> --
>> >> Raul
>> >>
>> >> On Fri, Oct 19, 2012 at 2:55 PM, Devon McCormick <devon...@gmail.com>
>> >> wrote:
>> >> > Yes - the advice is a little garbled.  It looks like it's supposed to
>> >> > read like this:
>> >> >
>> >> > load 'graphics/d3'
>> >> >
>> >> > d3heatmap makesampledata_d3heatmap_ ''
>> >> >
>> >> > d3boxplot makesampledata_d3boxplot_ ''
>> >> >
>> >> > d3treeview makesampledata_d3treeview_ ''
>> >> >
>> >> > d3treeview_dir jpath'~user'
>> >> >
>> >> > The underscores seem to have vanished from the text shown at Github.
>> >> >
>> >> > On Fri, Oct 19, 2012 at 2:27 PM, Mike Day <mike_liz....@tiscali.co.uk>
>> >> wrote:
>> >> >> Jordan,
>> >> >>
>> >> >> I've had a quick try and am puzzled by the advice:
>> >> >>
>> >> >> load 'graphics/d3' d3heatmap makesampledata/d3heatmap/'' d3boxplot
>> >> >> makesampledata/d3boxplot/'' d3treeview makesampledata/d3treeview/''
>> >> >> d3treeview_dir jpath'~user'
>> >> >>
>> >> >> I think your original is all displayed at github.com in one line.
>> >> >>
>> >> >> Presumably some line-endings are missing;   I've
>> >> >> tried breaking up the rubric,  without success so far.
>> >> >>
>> >> >> Any further guidance as to how to separate the
>> >> >> components of the above would be welcome.
>> >> >>
>> >> >> Thanks for posting your code.
>> >> >>
>> >> >> Mike
>> >> >>
>> >> >>
>> >> >> On 19/10/2012 6:11 PM, Jordan Tirrell wrote:
>> >> >>>
>> >> >>> https://github.com/jordantirrell/D3-for-J
>> >> >>>
>> >> >>>
>> >> >>> On Fri, Oct 19, 2012 at 12:52 PM, Ian Clark <earthspo...@gmail.com>
>> >> wrote:
>> >> >>>
>> >> >>>> I think the problem is that, for security reasons, attachments with
>> >> >>>> ".zip" are purged from wiki pages unless you have certain rights over
>> >> >>>> the page. Chris will confirm.
>> >> >>>>
>> >> >>>> Why not github? (The other code samples linked are on github.)
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>> On Fri, Oct 19, 2012 at 5:41 PM, Jordan Tirrell <
>> >> jordantirr...@gmail.com>
>> >> >>>> wrote:
>> >> >>>>>
>> >> >>>>> I put it up on the wiki
>> >> >>>>> http://www.jsoftware.com/jwiki/JordanTirrell/D3examples with the
>> >> >>>>
>> >> >>>> scripts in
>> >> >>>>>
>> >> >>>>> a zip file. The file uploads successfully, is downloadable by other
>> >> >>>>
>> >> >>>> users,
>> >> >>>>>
>> >> >>>>> and then disappears within a minute or so. Any ideas?
>> >> >>>>>
>> >> >>>>> I was thinking about posting it up on github anyway, since I'd like
>> >> to
>> >> >>>>> include more of the D3 library.
>> >> >>>>> .
>> >> >>>>>
>> >> >>>>> On Thu, Oct 18, 2012 at 1:50 PM, Ian Clark <earthspo...@gmail.com>
>> >> >>>>
>> >> >>>> wrote:
>> >> >>>>>>
>> >> >>>>>> I for one would appreciate that.
>> >> >>>>>>
>> >> >>>>>> Not in quantity. Just one or two, for a demo. As a Lab, perhaps...?
>> >> >>>>>>
>> >> >>>>>> On Wed, Oct 17, 2012 at 7:17 PM, Jordan Tirrell <
>> >> >>>>
>> >> >>>> jordantirr...@gmail.com>
>> >> >>>>>>
>> >> >>>>>> wrote:
>> >> >>>>>>>
>> >> >>>>>>> We have scripts for a few of the D3 examples (boxplot, US counties
>> >> >>>>>>
>> >> >>>>>> heatmap,
>> >> >>>>>>>
>> >> >>>>>>> and tree) where you simply give it the data in jhs and the
>> >> >>>>
>> >> >>>> visualization
>> >> >>>>>>>
>> >> >>>>>>> pops open in a new window.
>> >> >>>>>>>
>> >> >>>>>>> I probably have to clean them up and untie them from our other
>> >> systems
>> >> >>>>>>
>> >> >>>>>> but
>> >> >>>>>>>
>> >> >>>>>>> I could put them up on the wiki.
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >> ................................
>> >> >>
>> >> >> ----------------------------------------------------------------------
>> >> >> For information about J forums see http://www.jsoftware.com/forums.htm
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Devon McCormick, CFA
>> >> > ^me^ at acm.
>> >> > org is my
>> >> > preferred e-mail
>> >> > ----------------------------------------------------------------------
>> >> > For information about J forums see http://www.jsoftware.com/forums.htm
>> >> ----------------------------------------------------------------------
>> >> For information about J forums see http://www.jsoftware.com/forums.htm
>> >>
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to