Ok Great. I will try this first thing when I get home tonight. On Tue, Sep 15, 2009 at 11:05 AM, David Pollak < feeder.of.the.be...@gmail.com> wrote:
> > > On Tue, Sep 15, 2009 at 7:18 AM, Jack Widman <jack.wid...@gmail.com>wrote: > >> I did not try it without the package statement. The class is located in >> the snippet folder. It was just pointed out to me that it must be in the >> comet folder. > > > Actually, it doesn't matter what folder it's in, but the package my be > specified correctly or Lift won't know how to find the code. > > In your code above, there is no package declaration, so the code is not > going to have any package. > > Please take the package line from your snippet file, copy it into your > Clock file and change "snippet" to "comet" and it should work. > > >> >> >> On Tue, Sep 15, 2009 at 10:15 AM, Naftoli Gugenheim <naftoli...@gmail.com >> > wrote: >> >>> >>> Did you leave out the package statement? Where is the .class file >>> outputted? >>> I think the browser is complaining that the error message xml has an >>> unbound prefix. >>> >>> >>> ------------------------------------- >>> Jack Widman<jack.wid...@gmail.com> wrote: >>> >>> And here is the error again: >>> Error! >>> XML parsing failed >>> >>> XML parsing failed: syntax error (Line: 13, Character: 4) >>> >>> Reparse document as HTML >>> Error:undeclared XML namespace prefix used in attribute name >>> Specification:http://www.w3.org/TR/xml-names11/#nsc-NSDeclared >>> 10: <body> >>> 11: >>> 12: <!--FIXME - comet type: Full(com.authoritude.snippet.Clock) name: >>> Full(Other) Not Found --> >>> 13: <clk:time>Missing Clock</clk:time> >>> 14: >>> 15: >>> 16: <script type="text/javascript"> >>> >>> On Tue, Sep 15, 2009 at 8:32 AM, Jack Widman <jack.wid...@gmail.com> >>> wrote: >>> >>> > Here is the complete code for my Clock example >>> > *class* >>> > >>> > import scala.xml._ >>> > import net.liftweb.http.S >>> > import net.liftweb.http.CometActor >>> > import net.liftweb.http.SessionVar >>> > import net.liftweb.util._ >>> > import _root_.scala.xml._ >>> > import _root_.net.liftweb.util.Helpers._ >>> > import scala.actors._ >>> > >>> > >>> > >>> > >>> > class Clock extends CometActor { >>> > override def defaultPrefix = Full("clk") >>> > >>> > def render = bind("time" -> timeSpan) >>> > >>> > def timeSpan = (<span id="time">{timeNow}</span>) >>> > >>> > ActorPing.schedule(this, Tick, 10000L) >>> > >>> > override def lowPriority : >>> > PartialFunction[Any, Unit] = { >>> > case Tick => { >>> > partialUpdate(SetHtml("time", >>> > Text(timeNow.toString))) >>> > ActorPing.schedule(this,Tick, 10000L) >>> > } >>> > } >>> > } >>> > >>> > case object Tick >>> > >>> > *markup - (I have also tried it with just *type="Clock" since the >>> package >>> > is in my Boot class) >>> > >>> > <lift:surround with="default" at="content"> >>> > <lift:comet type="com.authoritude.snippet.Clock" name="Other"> >>> > <clk:time>Missing Clock</clk:time> >>> > </lift:comet> >>> > </lift:surround> >>> > >>> > >>> > On Tue, Sep 15, 2009 at 8:25 AM, Jack Widman <jack.wid...@gmail.com >>> >wrote: >>> > >>> >> The package is correct. Here is the error >>> >> XML parsing failed: syntax error (Line: 13, Character: 4) >>> >> >>> >> Reparse document as HTML >>> >> Error:undeclared XML namespace prefix used in attribute name >>> >> Specification:http://www.w3.org/TR/xml-names11/#nsc-NSDeclared >>> >> 10: <body> >>> >> 11: >>> >> 12: <!--FIXME - comet type: Full(com.authoritude.snippet.Clock) >>> name: >>> >> Full(Other) Not Found --> >>> >> 13: <clk:time>Missing Clock</clk:time> >>> >> 14: >>> >> 15: >>> >> 16: <script type="text/javascript"> >>> >> I tried it both with the full class name and just Clock. I get the >>> same >>> >> error in both cases. >>> >> Its seems to be saying clk is an undeclared namespace? >>> >> >>> >> >>> >> On Tue, Sep 15, 2009 at 4:46 AM, Timothy Perrett >>> <timo...@getintheloop.eu >>> >> > wrote: >>> >> >>> >>> >>> >>> Its telling you that the class Clock could not be found - if i were >>> >>> you, check the package definitions on the clock class to make sure >>> its >>> >>> in the right namespace. >>> >>> >>> >>> Cheers, Tim >>> >>> >>> >>> On Sep 15, 3:38 am, jack <jack.wid...@gmail.com> wrote: >>> >>> > I compiled the comet Clock app and used the following markup >>> >>> > >>> >>> > <lift:surround with="default" at="content"> >>> >>> > <lift:comet type="Clock" name="Other"> >>> >>> > <clk:time>Missing Clock</clk:time> >>> >>> > </lift:comet> >>> >>> > </lift:surround> >>> >>> > >>> >>> > I also used the standard default.html >>> >>> > >>> >>> > When I ran it, I got the error >>> >>> > >>> >>> > XML parsing failed: syntax error (Line: 13, Character: 4) >>> >>> > >>> >>> > Error:undeclared XML namespace prefix used in attribute name >>> >>> > Specification:http://www.w3.org/TR/xml-names11/#nsc-NSDeclared >>> >>> > 10: <body> >>> >>> > 11: >>> >>> > 12: <!--FIXME - comet type: Full(Clock) name: Full(Other) Not >>> Found >>> >>> > --> >>> >>> > 13: <clk:time>Missing Clock</clk:time> >>> >>> > 14: >>> >>> > 15: >>> >>> > 16: <script type="text/javascript"> >>> >>> > >>> >>> > Any ideas? >>> >>> >>> >>> >>> >>> >> >>> > >>> >>> >>> >>> >>> >> >> >> > > > -- > Lift, the simply functional web framework http://liftweb.net > Beginning Scala http://www.apress.com/book/view/1430219890 > Follow me: http://twitter.com/dpp > Git some: http://github.com/dpp > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---