Hello!
(I'm new to the list and to TextMate. Let me know if this has already been covered.)
Version 1.5 (906) --
Problem: Web Preview does not reflect changes made in a CSS file to which an open, previewed HTML documents refers.
Steps:
Open separately a HTML file and then a CSS file that's used by that document. Evoke Web Preview on the html document. Switch to the CSS document and change something that will effect the visual presentation of the html document.
Pause, waiting for something to happen. ... Nothing Happens. Web Preview does not change; Save the CSS document. ... Web Preview does not change; Switch to the HTML document and make a small change ... the change to the html is immediately available, but the change to the CSS file does not appear; Close the Web Preview window, save the html file, reopen Web Preview ... The change to the CSS file remains invisible to Web Preview; Open the Drawer on the Web Preview window and press the "Refresh Now" button ... No Change -- modification to the CSS file still is not reflected;
QUIT TextMate, reopen the two files in question and apply Web Preview to the HTML document.
--> NOW, the changes in the CSS document are properly reflected.
Clearly, Something Is Wrong Here.
It is as if Web Preview has CACHED the CSS file and is using the cached version, rather than the current version, when it parses (or whatever) the HTML file for preview.
The current behavior substantially reduces the value of Web Preview. I hope we can get a fix soon. After the skiing trip of course! ;)
Related to this, I'd really like a "persistent" Web Preview when using a Project. Consider the simplest example: one CSS file and one HTML file open in a project. I select the HTML file and choose Web Preview. I switch to the CSS file to make some edits and ... WHAT! the Web Preview window disappears.
Of course, what I need is for the Web Preview of the HTML file to STAY OPEN open while I edit the CSS file. And for it to reflect changes to the appearance of the HTML file as I make changes in the CSS file. I imagine that this situation may apply to editing other sorts of "include" files (PHP?). When I make changes to ANY TYPE of file to which an open HTML file refers, a Web Preview of that HTML file should be updated, AND include the changes to the included files.
Thanks,
eo
That's exactly what's happening. WebKit caches files like this by default. What allan should do is invalidate the cache each time he refreshes the Web Preview.
And as for detecting updates to the CSS file and refreshing the web preview automatically, that's a bit more complicated. I'm not sure if that should even be attempted.
On Jan 8, 2006, at 7:17 PM, Eric O'Brien wrote:
It is as if Web Preview has CACHED the CSS file and is using the cached version, rather than the current version, when it parses (or whatever) the HTML file for preview.
Kevin Ballard wrote:
And as for detecting updates to the CSS file and refreshing the web preview automatically, that's a bit more complicated. I'm not sure if that should even be attempted.
If there is a hook in WebKit to let TextMate know which files are loaded, it definitely should – not each time the file is changed, but each time TextMate does change it. How else should we use TM for CSS development?
regards, Christopher
And as for detecting updates to the CSS file and refreshing the web preview automatically, that's a bit more complicated. I'm not sure if that should even be attempted.
In BBEdit this works! The Web Preview will be updated each time you save the CSS file which is 'used' by the HTML file in the Preview.
This one little (but major) thing that don't let me kill BBEdit from my Applications Folder! I would love to do that and sooo much!
-Nico
I do agree, as it speeds up preview. This way I can toy around with CSS without having to hit reload ... one of the few features I miss in TM ....
'K
On 16.01.2006, at 23:00, Nico Rohrbach wrote:
And as for detecting updates to the CSS file and refreshing the web preview automatically, that's a bit more complicated. I'm not sure if that should even be attempted.
In BBEdit this works! The Web Preview will be updated each time you save the CSS file which is 'used' by the HTML file in the Preview.
This one little (but major) thing that don't let me kill BBEdit from my Applications Folder! I would love to do that and sooo much!
-Nico
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
Note that in Soryou's Soryu@serenity.de message of January 12, the suggestion
## Refresh Running Browser(s)
Change Scope to `text.html, source.css` so the Browser can be refreshed when editing the CSS file.
DOES WORK on running browsers!! :) Wheee!
The built-in "Web Preview" remains, unfortunately, broken in this respect. Plus, the Web Preview window vanishes when you select a different document.
* sigh * Almost there. [Should I "upgrade" BBEdit, or... buy TextMate? Still undecided. Still Wishing.]
eo
On Jan 16, 2006, at 2:36 PM, Kai Vermehr wrote:
I do agree, as it speeds up preview. This way I can toy around with CSS without having to hit reload ... one of the few features I miss in TM ....
'K
On 16.01.2006, at 23:00, Nico Rohrbach wrote:
And as for detecting updates to the CSS file and refreshing the web preview automatically, that's a bit more complicated. I'm not sure if that should even be attempted.
In BBEdit this works! The Web Preview will be updated each time you save the CSS file which is 'used' by the HTML file in the Preview.
This one little (but major) thing that don't let me kill BBEdit from my Applications Folder! I would love to do that and sooo much!
-Nico