ooops!!! I misunderstood! you meant how to verify that it is actually
showing everything up on screen! sorry my bad...how is it verified at
the moment? I mean whatever unit test exists now will perfectly do the
job with my modified version...remember...I just changed (first data) to
(some #(when-not (nil? %) %) data) ....it should work like a charm!
Unfortunately i don't have a CA!
Jim
On 18/06/12 22:58, Jim - FooBar(); wrote:
First of all thanks both of you...As far as the tests go It is
ridiculously easy to reproduce the 'bad behaviour' simply by passing a
seq of maps (or records) where the first element is nil...my addition
simply looks for the first element that is not nil and uses that
instead of 'first'. if none is found then the original behaviour
(empty table) will occur but this time is not 'bad' - is indeed
correct (there is no data)...
I'm not really expecting quick turnarounds from core...I'm already
using the modified version of old-table-model in my namespace...btw,
since I didin't modify 'inspect-table' I don't really need it in my
namespace I only need the modified table-model...how can I :require or
:use clojure.inspector (so i can call 'inspect-table') but have my
modified table-model overwrite the one in clojure.inspector? I was
expecting to be done automatically cos I've seen the "var is being
replaced" warning in core.logic...however for the inspector it throws
an exception "var already refers to
clojure.inspector/old-table-model"...any ideas? Will it work if I
exclude that var?
Jim
On 18/06/12 21:30, Andy Fingerhut wrote:
Agreed with everything Sean said, except I wanted to point out that
making a unit test for functions that create GUI windows might be a
little bit out of the beaten path of the existing unit tests. There
may be a way to create a unit test that calls inspect-table with
arguments that make it throw an exception with the current version,
and doesn't with Jim's proposed new version, but not sure about that.
Also, Jim, don't expect a quick turnaround on changes to Clojure
core. They can take a while to get in. If you really like using
your improved version of inspect-table and want to use it, put it in
your own local library and use it (or make your own local modified
version of Clojure for your own use).
Andy
On Jun 18, 2012, at 12:07 PM, Sean Corfield wrote:
JIRA - http://dev.clojure.org/jira/browse/CLJ (since this is a "core"
Clojure namespace).
If you have a CA on file, you can create a patch and attach it to the
ticket. If you don't have a CA on file, you can outline what you think
needs to be done (as you have below) and someone with a CA on file can
create a patch based on your suggestions, along with additional unit
tests to show that the behavior would be correct (should be easy to
create a test that fails now but would pass after this change?).
Sean
On Mon, Jun 18, 2012 at 11:22 AM, Jim -
FooBar();<jimpil1...@gmail.com> wrote:
the very first let binding in clojure.inspector/old-table-model
should be:
row1 (some #(when-not (nil? %) %) data)
instead of
row1 (first data)
simply because it will fail if the (first data) returns nil...
where do we submit minor improvements like this?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en