Hopbot log for 2007-11-12 - Helma IRC channel: #helma on irc.freenode.net

2007-11-12:

[2:52] <kuccello> zumbrunn - I am getting an error in the getFeed(url) function from the article. Specifically the line that has "var input = new SyndFeedInput();" I would like to know if this is infact a valid line of code. It appears that it is using a Java style object constructor on a Java object.
[2:53] <kuccello> I get a ReferenceError "SyndFeedInput" is not defined.
[2:54] <kuccello> I have the rome lib loaded etc. just wondering if I need to prefix the new call with a "Packages.com.rome.api.... etc"
[11:15] <zumbrunn> kuccello, you don't need the Packages... prefix, since in an earlier line SyndFeedInput is set to point directly to that class inside the Packages
[11:18] <zumbrunn> btw, I was just contact by Stephan regarding something else (the author of the article)
[11:18] <zumbrunn> so, he knows now that there is some confusion about the article and he'll look into it
[11:19] <zumbrunn> he might drop by here later
[13:28] <kuccello> numbrunn - fyi: I changed the line "var input = new SyndFeedInput();" to "var input = new Packages.com.sun.syndication.io.SyndFeedInput();" and it now runs to another point in the program. I think I am rounding on a solution here.
[13:29] <zumbrunn> don't understand why that would make a difference...
[13:29] <zumbrunn> you have an earlier line setting SyndFeedInput, right?
[13:29] <zumbrunn> var SyndFeedInput = Packages.com.sun.syndication.io.SyndFeedInput
[13:29] <kuccello> nope, just SyndFeed
[13:29] <zumbrunn> oh, that's why then
[13:30] <kuccello> ok, thouhgt that might be it
[13:30] <kuccello> getting the same thing for Entry now but will try the same fix
[13:30] <zumbrunn> the listing in the article has that line
[13:30] <kuccello> maybe I miss typed it
[13:32] <kuccello> I'm now at this error: Java constructor for "com.sun.syndication.feed.atom.Entry" with arguments "com.sun.syndication.feed.synd.SyndEntryImpl" not found.
[13:36] <zumbrunn> from the listings in the article I can't see any place where Entry is defined
[13:36] <zumbrunn> something must be missing for sure, unless I'm blind
[13:36] <kuccello> I don't think it is anywhere
[13:37] <kuccello> I'm looking through the rome api docs to see what type of object I should instatiate
[13:40] <kuccello> is the renderSkinAsString method in the HelmaTools.zip?
[13:41] <zumbrunn> no, it's built-in to the helma environment by default
[13:41] <kuccello> what should I look for to fix this error:TypeError: Cannot find function renderSkinAsString.
[13:42] <kuccello> this is the offending line: list += entries[i].renderSkinAsString("entry");
[13:42] <zumbrunn> you are probably calling the renderSkinAsString method on an object that is not a HopObject
[13:43] <zumbrunn> right, so entries[i] is not a HopObject
[13:43] <zumbrunn> renderSkinAsString exists both as a global function and as a method of the HopObject prototype
[13:44] <kuccello> here is the code I have in show.hac of the Feed object http://helma.pastebin.com/m5231756c
[13:44] <kuccello> how can I use it as a global call on an entry?
[13:46] <zumbrunn> looks like Entry is intended to be another prototype - but isn't mentioned in the article
[13:47] <zumbrunn> in the working code of this rssreader app, there is probable a Entry directory as well
[13:47] <zumbrunn> (or there is global code that defines an Entry prototype, like they did it for Feed)
[13:48] <kuccello> ok that makes sense, I'll see what I can do with that
[13:49] <zumbrunn> btw, Stephan said that the magazine's editor made some modifications to the app
[13:50] <zumbrunn> it's not exactly what he had submitted to the magazine
[13:50] <kuccello> before or after publishing it? ;-)
[13:50] <zumbrunn> lol
[13:50] <zumbrunn> dunno
[13:52] <kuccello> ok, I'm a little stumped on this: if I have the new Entry object and I want to create entries like "result[i] = new Entry(entries.get(i));" do I need to have a macro.js in the Entry directory that defines the constructor?
[13:53] <zumbrunn> good point
[13:53] <zumbrunn> normally, constructors for HopObject prototypes wouldn't take arguments
[13:54] <kuccello> thats what made me think it might be a Rome Entry object
[13:54] <kuccello> but then the entry.skin file can execute
[13:55] <zumbrunn> yep, hmm
[13:58] <kuccello> do you have Stephan's email addr? would you email it to me?
[14:02] <kuccello> I have the app working - sort of
[14:02] <kuccello> Its not rendering any errors
[14:03] <kuccello> but its not listing the entries in the feed (might be my skin file)
[14:05] <zumbrunn> I just pinged Stephan again
[14:05] <kuccello> I'm sending you what I have via email
[14:06] <kuccello> let me know when you get it
[14:06] <zumbrunn> got it
[14:07] <kuccello> I included the sql for the table creation
[14:08] <kuccello> I don't know how to get the list of entries to display - see the feed.skin in the Feed dir
[14:08] <kuccello> and also the show.hac
[14:13] <kuccello> maybe its the type.properties I need to adjust in Entry? some form of parent child relationship?
[14:13] <zumbrunn> your feed.skin looks more like a skin for the individual entries
[14:14] <zumbrunn> but telling from show.hac, you want it to output the accumulated list of entries
[14:14] <kuccello> ya
[14:14] <zumbrunn> so, in show.hac, you could set res.data.list = list
[14:14] <kuccello> I keep thinking of jsp logic
[14:14] <kuccello> ok
[14:15] <zumbrunn> and then in feed.skin use <% response.list %>
[14:16] <kuccello> now I got a list of the same feed about 10 times... hmm one sec...
[14:17] <kuccello> I need to figure out a better/more correct entry.skin
[14:19] <kuccello> ya, its definitly the entry.skin - I need to find out how/what to pull from the Entry object to display... not sure of its attributes though
[14:22] <kuccello> if I have an instatiated Java object can I just call its getters? also with a HopObject (Entry) do I have to define its attributes in the type.properties (and do I just assign them?)
[14:24] <zumbrunn> btw, if you want send {list:list} along as second argument in the renderSkin method, then you can use <% param.list %> inside the skin and you do not need to set res.data.list ...I see you had it have that way
[14:25] <kuccello> bingo!
[14:25] <zumbrunn> you only need to define the properties in type.properties if Entry objects are to be persisted in the relational db
[14:26] <kuccello> I have it working. I'll send to you
[14:26] <zumbrunn> :-)
[14:28] <kuccello> its sent
[14:28] <kuccello> :-)
[14:28] <kuccello> thanks for the help
[20:48] <peter_12_> http://paste.lisp.org/display/50719

 

 

In the channel now:

Logs by date: