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

2008-11-10:

[13:08] <jirkap> zumbrunn > [continuing conversation from yesterday morning] hi, thanks for reply. I am trying to make a script that recognizes *.css files instead of *.skin files that include css code.
[13:10] <jirkap> What I did was: a skin in Global, that calls a macro which lists available *.css files and writes them back
[13:13] <jirkap> However, I have not got more further than to list the css files and write them back (at the end I used a prototype name as you suggested to access folders).
[13:16] <jirkap> So, now all I have is a proper link tag in host/whatever/ pointing to '../whatever/file.css' (let's say the prototype and it's inheritant have the same name), but the css file is obviously not being processed..
[13:17] <jirkap> I am just trying things though, I definitely may be wrong..
[13:20] <jirkap> The point of this is to make css files in Dreamweaver (I forced it to recognize skin files, but it won't work with skins containing only css code)
[14:27] <zumbrunn> jirkap, if your goal is simply to have different static css files that you maintain using dreamweaver, then you could just place them in your application's static mountpoint directory
[14:30] <zumbrunn> but you probably know that already and are trying to do more than that
[14:33] <zumbrunn> if you want dynamically generated css files, you can create them as skins and define actions with a file name like "file.css.action" or file_css.action, which then just render that skin and set the content type appropriately
[14:35] <zumbrunn> hi jirkap
[14:36] <zumbrunn> if you haven't already, see the log for my reply
[14:36] <zumbrunn> an example:
[14:36] <zumbrunn> file_css_action = function(){res.contentType='text/css'; res.write(this.renderSkinAsString('file.css'));};
[14:36] <zumbrunn> if you have a skin called "file.css.skin"
[14:45] <jirkap> well, :) I did what you suggested, now I am getting your style at welcome/code/HopObject
[14:46] <jirkap> I don't understand how that is possible
[14:49] <zumbrunn> hmm
[14:49] <zumbrunn> at localhost:8080/welcome/code/HopObject ?
[14:49] <zumbrunn> or what do you mean by welcome/code/HopObject ?
[14:52] <jirkap> no, at [host]/myapp/whatever I get the Welcome app css file located at welcome/code/HopObject :)
[14:52] <zumbrunn> what's the file name inside welcome/code/HopObject ?
[14:53] <jirkap> styles_css.skin (I check that by saving the page from Firefox)
[14:54] <zumbrunn> and you get it at [host]/myapp/whatever/styles.css ?
[14:54] <jirkap> yes
[14:54] <zumbrunn> ok, good
[14:54] <zumbrunn> that makes sense
[14:54] <jirkap> :))
[14:54] <zumbrunn> if your app uses welcome/code/HopObject as a code repository
[14:54] <jirkap> I am all ears
[14:55] <zumbrunn> what do you have defined for your app "myapp" inside apps.properties ?
[14:56] <jirkap> myapp
[14:56] <jirkap> myapp.mountpoint = /myapp
[14:56] <jirkap> myapp.static = apps/myapp/static
[14:56] <jirkap> sandra.staticMountpoint = /myapp/static
[14:57] <jirkap> myapp.staticIndex = true
[14:57] <jirkap> myapp.repository.0 = apps/myapp/
[14:57] <jirkap> myapp.repository.1 = modules/helmaTools.zip
[14:58] <zumbrunn> for the future, the pastebin works better for that: http://helma.pastebin.com/
[14:58] <zumbrunn> instead of pasting here
[14:59] <jirkap> oh, I was curious what it was for, now i know
[14:59] <zumbrunn> :-)
[14:59] <zumbrunn> so, no myapp.repository line pointing to welcome/code
[15:00] <zumbrunn> respectively apps/welcome/code
[15:00] <jirkap> http://helma.pastebin.com/m3a634380
[15:00] <zumbrunn> then what you described doesn't make sense to me
[15:01] <zumbrunn> are you sure the css data you are seeing is coming from the welcome/code/HopObject directory?
[15:04] <jirkap> Well, I cannot be sure, BUT, I saved the page I access at myapp/whatever/ and in its linked folder is present a file.css which has the same content as the one in welcome/code/HopObject/styles_css.skin..
[15:05] <jirkap> that's really strange, I am not aware of any connection between the two apps and do not understand how could they see each other
[15:06] <jirkap> I mean, if would do anything wrong, the style just would not be processed, right?
[15:07] <zumbrunn> if you don't mind, paste the full content of your apps.properties file in the pastebin once
[15:08] <zumbrunn> yes, certainly, your app shouldn't magically inherit anything from the welcome app
[15:08] <jirkap> here you go http://helma.pastebin.com/d1cacefd8
[15:10] <zumbrunn> change myapp.mountpoint = /myapp to myapp.mountpoint = /myapp/ once
[15:10] <zumbrunn> (with the slash at the end)
[15:10] <jirkap> ok..
[15:12] <jirkap> still the same result
[15:13] <zumbrunn> what happens when you comment out the "welcome" line
[15:13] <zumbrunn> changing it to...
[15:13] <zumbrunn> #welcome
[15:14] <jirkap> the style is gone..
[15:14] <zumbrunn> weird
[15:15] <zumbrunn> (but good)
[15:15] <jirkap> :)
[15:16] <zumbrunn> do you by any chance in some way include the apps/welcome/code repository inside your myapp app?
[15:17] <zumbrunn> using app.addRepository() ?
[15:18] <jirkap> I only did this in a macro: app.addRepository('modules/helma/File.js'); - but the macro is not called anymore, it just sits there
[15:19] <zumbrunn> plus that wouldn't include apps/welcome/code, so that's not what the problem was
[15:19] <zumbrunn> plus, if that was the problem, commenting out the welcome app wouldn't have fixed it
[15:21] <jirkap> hmm, I only refer to the welcome app by myself when learning, but I have not added any connection between the two
[15:22] <zumbrunn> well, somehow you found an interesting way to do it :-)
[15:23] <jirkap> :)
[15:35] <jirkap> Chris > so, the style_css_action is somehow called automatically? I don't see it called anywhere.
[15:37] <zumbrunn> an incoming request always resolves to an "action"
[15:38] <zumbrunn> which in helma is called "main"
[15:38] <zumbrunn> so, /myapp/whatever/ is the same as /myapp/whatever/main
[15:39] <zumbrunn> and /myapp/whatever/style.css would look for an action called style.css_action
[15:39] <zumbrunn> or style_css_action
[15:40] <zumbrunn> or, you can define these actions using .hac files instead of defining a function in a .js file
[15:40] <zumbrunn> then it would be a file called style.css.hac or style_css.hac
[15:41] <zumbrunn> http://helma.zumbrunn.com/intro/actions
[15:41] <jirkap> hm, then I have no idea what I do wrong.. it just does not work (at least not the way it is supposed to)
[15:42] <zumbrunn> what do you have inside your myapp directory now?
[15:46] <zumbrunn> you probably need to backstep a bit and simplify what you have in there
[15:47] <zumbrunn> afk, for 15 minutes... brb
[15:58] <jirkap> the style is accesible. when i let it to be rendered as a string in main_action, its content is being displayed. but somehow it does not react to call defined in a skin...
[16:21] <zumbrunn> skins are not directly callable, if that's what you are expecting
[16:22] <zumbrunn> you have to define an action to handle the request
[16:22] <jirkap> no, I just wanted to make sure the file is visible.. it works now though, I will have to review some things..

 

 

In the channel now:

Logs by date: