Greetings,
I've been using TextMate for several months, and I'm now starting my first multi-file project using the TextMate project interface.
I've encountered what appears to me as a substantial bug (see title). I opened a ticket with a full description last week, but have received no reply so far. Here's the "Summary" from the start of that ticket:
"Summary: At first, TM's Web Preview reads linked css stylesheet in the HTML header correctly, but then will not update when the stylesheet is changed. Browsers don't have this problem and show the new data as expected. (TM Web Preview seems to get 'stuck' using its original cached value, even when those values no longer exist in the css file. ) "
Here's the full description, including my Troubleshooting attempts and exact steps to reproduce the bug:
http://macromates.com/ticket/show?ticket_id=79950679
In addition I'm puzzled by the fact that I've found an exact description of the bug reported in this list in 2006. And there are no replies to that report either! Strange.
Doesn't anyone besides me need to use the (wonderful) Live Web Preview with linked external style sheets?
Or am I missing some hidden command or path configuration that will allow this to work?
Best Regards,
Steven Rowat
Here's what I was able to reproduce in 10.5.1 on an Intel Mac:
Changing the linked CSS file doesn't force a refresh in the Live Web Preview, but clicking the refresh button gets the changes correctly. Changing the name of the linked stylesheet in the HTML header removes styles as expected. It seems to get the newest version of the stylesheet file when it is changed back, though.
My guess is that the Live Preview Window can't automatically update when you change the CSS file because it's only watching for changes to the HTML file.
Hope this gives you some clues.
itp
On Feb 10, 2008, at 12:29 PM, Steven Rowat wrote:
Greetings,
I've been using TextMate for several months, and I'm now starting my first multi-file project using the TextMate project interface.
I've encountered what appears to me as a substantial bug (see title). I opened a ticket with a full description last week, but have received no reply so far. Here's the "Summary" from the start of that ticket:
"Summary: At first, TM's Web Preview reads linked css stylesheet in the HTML header correctly, but then will not update when the stylesheet is changed. Browsers don't have this problem and show the new data as expected. (TM Web Preview seems to get 'stuck' using its original cached value, even when those values no longer exist in the css file. ) "
Here's the full description, including my Troubleshooting attempts and exact steps to reproduce the bug:
http://macromates.com/ticket/show?ticket_id=79950679
In addition I'm puzzled by the fact that I've found an exact description of the bug reported in this list in 2006. And there are no replies to that report either! Strange.
Doesn't anyone besides me need to use the (wonderful) Live Web Preview with linked external style sheets?
Or am I missing some hidden command or path configuration that will allow this to work?
Best Regards,
Steven Rowat
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 10 Feb 2008, at 21:49, Ian Potter wrote:
[...] My guess is that the Live Preview Window can't automatically update when you change the CSS file because it's only watching for changes to the HTML file.
Yeah, it is only watching the actual buffer, not referenced resources like style sheets, scripts, images, a.s.o.
Hi,
On 10 Feb 2008, at 21:49, Ian Potter wrote:
[...] My guess is that the Live Preview Window can't automatically update when you change the CSS file because it's only watching for changes to the HTML file.
Allan wrote:
Yeah, it is only watching the actual buffer, not referenced resources like style sheets, scripts, images, a.s.o.
Aha, thanks, I hadn't even noticed the (cleverly disguised?) recycle button in the upper right of the Web Preview Page. That works! All that bug reporting for nothing... :-)
But: OTOH, the Refresh button in the side panel doesn't update the external css changes.
So the "Refresh" button is different from the 'recycle' button in some way - I guess the "Refresh" won't reload the buffer unless there's an HTML change, while the "recycle" is a forced reload regardless?
Steven Rowat
On Feb 10, 2008, at 12:29 PM, Steven Rowat wrote:
Or am I missing some hidden command or path configuration that will allow this to work?
I think I've mentioned it before, but I use my own little omni-preview passthrough script available here: http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient.tmbund...
Be warned it's extremely janky and lame. But it works really well for me for what it does.
For HTML If you have a TM_PROJECT_SITEURL env var set it'll change the base of your html doc to use that. It makes all external Javascript and CSS urls unique to avoid caching.
It converts markup and textile on the fly. It also has some stuff in there for previewing Ruby on Rails rhtml files somehow, but I forget how that works. It also has my blog template hardcoded so I can preview a blog post as it would look on my blog. for general source files it'll do a live diff between your unsaved document and your saved document. Clicking on a line will take you to that line in your source. For Javascript it'll run the script and catch and write out any errors in execution. Doesn't work very well.
It's all just based on the current scope, so you should be able to just set up the filter once and forget about it.
This is really old code, so I'm really not sure what half of it does anymore, but I find it to be EXTREMELY handy.
—Thomas Aylott – subtleGradient—