On Thu, Jun 17, 2010 at 11:50 PM, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Hi,
>
> 2010/6/18 Wilson MacGyver <wmacgy...@gmail.com>:
>> ^ was deprecated in 1.1 as per release note below
>> The ^ reader macro has been deprecated as a shortcut for meta in the
>> hopes that it can eventually replace the #^ reader macro.
>
> No, it's not that gray: in 1.2 (so in clojure master, and all new
> branches like prim, equal, etc.), ^ now has the same semantics as #^.
> #^ is still working as usual, but becomes deprecated. The behaviour of
> the old ^, as mentioned by Howard, requires the explicit (meta ) call.
>
> Howard, another point to have in mind in 1.2: some libraries from
> clojure contrib have partially migrated to clojure. For example I/O
> stuff has appeared in clojure.java.io. String manipulation stuff also.
> As a result, you may encounter warnings in your own code, or in
> libraries you use which may not yet have migrated to 1.2 (which is to
> be expected, since 1.2 is not out), or not be prepared for 1.2 (by
> avoiding 'use-ing foreign namespaces, but rather using aliases). The
> warnings will tell you when a var is re-def-ined (this is a new
> feature, which may or may no stay in core : before this warning
> feature, you just wouldn't have been able to compile the code,
> redefinitions of vars bound to external namespaces vars was an error.
> The new "warning only" behaviour tries to enhance the user experience:
> allow the code to run, until everybody has removed the warnings in new
> versions of their code).
>

Right, I'm working through that code right now.

What's really got me worried is this:

Exception in thread "main" java.lang.IllegalArgumentException: Wrong
number of args (3) passed to: cascade$link (views.clj:25)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:5373)
        at clojure.lang.Compiler.analyze(Compiler.java:5187)
        at clojure.lang.Compiler.analyze(Compiler.java:5148)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3054)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:5368)


Problem is, cascade/link does take 3 args:

(defmacro link
  "Creates a link to a view or action function. Additional path info
data may be specified (as a seq of
  data items),
  as well as query parameters (as a map whose keys are strings or
keywords and whose values are converted to strings.).
  Uses standard keys from the env map. The resulting link is returned
as a string."
  ([env function]
    (link env function nil))
  ([env function extra-path-info]
    (link env function extra-path-info nil))
  ([env function extra-path-info query-parameters]
    `(link-path ~env (link-map-from-function ~function
~extra-path-info ~query-parameters))))


And the call looks kosher:

(defaction increment-count
  {:path "count/increment"}
  [env]
  [count :int]
  (send-redirect env (link env show-counter [(inc count)])))  ;
view.clj, line 25

> HTH,
>
> --
> Laurent
>
> --
> 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



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-- 
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

Reply via email to