[Pro] code

how can see all the code of each page of my webside IN freway. Is there some kind of code editor in Freeway ?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Is there some kind of code editor in Freeway ?

Nope - FW generates code but doesn’t let ytou edit it directly.

What you can do is preview in your Browser and View>Source or you can set up your favourite text editor to preview your output.

In the same way you set up a Browser ie File>Preview in Browser>Browser Setup

You can add a text editor to the ‘Browser’ list and then when you Preview you can select your text editor.

TextWrangler is a popular free choice for this Bare Bones Software | TextWrangler is now BBEdit -- and still free! It's time to switch.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

My favorite ‘code editor’ is Coda – it has features like auto-complete and
live-preview which makes the labor of writing code much less work.
Auto-complete insures that I get more accurate code, which even for me is
an important feature. Live preview means I can work through problems faster
and in real time, instead of the nightmarish maze of Edit - Publish -
Preview that only adds to user confusion.

My favorite way to use it with Freeway Pro is to have them running
simultaneously. Build the basic structure with FWP, then switch to Coda and
open the published html file. Then use Coda to adjust the CSS to my liking.
After that it’s easy to copy the proven css back to into Freeway and create
a style with it.

http://www.panic.com/coda/


Ernie Simpson

On Sun, Dec 2, 2012 at 8:23 PM, DeltaDave email@hidden wrote:

Is there some kind of code editor in Freeway ?

Nope - FW generates code but doesn’t let ytou edit it directly.

What you can do is preview in your Browser and View>Source or you can set
up your favourite text editor to preview your output.

In the same way you set up a Browser ie File>Preview in Browser>Browser
Setup

You can add a text editor to the ‘Browser’ list and then when you Preview
you can select your text editor.

TextWrangler is a popular free choice for this
Bare Bones Software | TextWrangler is now BBEdit -- and still free! It's time to switch.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Ernie

After that it’s easy to copy the proven css back to into Freeway and create
a style with it.

Umm, could you please enlighten me as to where to paste it? And how do I create a style with it?

Does it become a new page style? Will Freeway overwrite it?

Upon opening my index page with Coda a message “The file has mixed line endings. Do you want to convert all line endings to LF, the most common line ending in the file?” If I correct this error, how do I get it into my index page? Or do I create a new one?

Sorry if this is basic, but I thought it time I started to learn a bit more.

Thanks

Paul


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ll let Ernie tell you what he had in mind for your styles question, but this part is easy:

On Dec 3, 2012, at 2:58 AM, Swan Photographics wrote:

Upon opening my index page with Coda a message “The file has mixed line endings. Do you want to convert all line endings to LF, the most common line ending in the file?” If I correct this error, how do I get it into my index page? Or do I create a new one?

It’s possible that you have a mixture of line endings depending on the Actions you used in the page, and how they were coded, and the settings in Freeway’s Document Setup dialog.

First, set these preferences for all new documents. To do that, close all currently-open Freeway documents, and select File/Document Setup from the main menu. (This sets the default for all new documents you make after this point – it will not affect documents you have already saved.) Click on the Output tab in the dialog, and set the following preferences:

  • HTML code: More Readable
  • Line feeds: Unix
  • File names: Unix/Windows

There are other preferences, these are the ones you need worry about.

Now, repeat this with your problem document (open the document, then follow the steps above). Publish again, and look at what Coda has to say when you import the file a second time.

If you still see a mix of line-feed types, please write back and list the individual Actions you have applied both to the page and to the elements on the page, and also note whether you copied and pasted any code from anywhere into the Page / HTML Markup or Markup Items dialogs.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So I think when a new version of freeway comes out it would be nice if an “editor” is included so you can see the complete code of a page you generated graphically and make some changes when needed.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve been using this application since 1997, and I sincerely understand your desire, but I also realize that in order to do that, Freeway would have to become a much different (and less useful) application. Freeway’s native file format has almost nothing in common with HTML.

Think of it in terms of QuarkXPress or InDesign. Neither of those applications save their files in PostScript format, rather they have their own binary format that they use to save the page layout instructions. When you print from one of them to a desktop printer, they make optimized PostScript or PCL for that printer. When you ship your file off to a service bureau or printer, they use that same file to generate 9,600ppi color-separated bitmaps of the artwork for their imagesetters. Horses for courses, as Richard Logan often says.

Back in Freeway, you need to absorb the understanding that Freeway is an idiot-savant when it comes to HTML. It can write it perfectly, but it cannot read it at all. (There is an HTML Import feature built in – the less said about that “feature” the better, IMO.) Changes made to the generated HTML from a Freeway document are noted by Freeway as “damage” to those files, and they are replaced by whatever Freeway generated the first time on the next publish.

From the same layout, Freeway can output HTML3.2 (useful for HTML Mail), HTML 4.01 Transitional, HTML 4.01 Strict, XHTML 1.0 Transitional, and XHTML 1.0 Strict code. This is exactly the same trick as our QuarkXPress file and the desktop vs. service bureau print model. Think of Publish in Freeway as Print in any other application.

But this feature request (being able to absorb round-trip changes made to the generated HTML) would also mean cutting out another of Freeway’s more useful features and downgrading it to something akin to Dreamweaver or any other HTML Editor application.

In order for this to work, you would need to freeze the Freeway layout to HTML code, then stir around that code to make further changes to the layout. Freeway’s strong suit is that it throws out all of the previous HTML for a page when you make a 1px change in any direction. This results in smaller, more logical code output, because instead of altering a lot of elements to make a single change, you’re starting over from first principles and making the whole thing over.

Imagine if you had a grid of images on the page, and one of them was out of alignment with the others. Your layout might be in a table, and there might be a bunch of extra table code to allow that one image to buck the rest of the grid. When you re-aligned the page, Dreamweaver wouldn’t sense that the grid was now a lot simpler, it would just mess around with the dimensions of those extraneous table cells to make the layout fit. Freeway would throw it all out and start over with a much simpler table. This is why Generators are far superior to Editors for many design-side comparisons. (Editors totally whip Generators’ asses when it comes to find-and-replace-type changes, though.)

Before I come off as an apologist for Freeway, let me explain that I use both Freeway and a traditional text editor for my work. I write database application code for most of my living, and use Freeway for layouts and prototypes (hardly ever for production). Freeway taught me much of what I know about how to write clean, logical HTML code that doesn’t fall apart in aging browsers. But there are a lot of things that it struggles to do at all, let alone do well. I have written a lot of server-side code that attempts to do what Freeway does on the desktop – translating databases into well-constructed HTML pages. So I know a lot more about what’s going on beneath the waves in Freeway than the average pixel-pusher. But I am pretty sure I would not want to use a Freeway that did understand HTML enough to do what you’re requesting – it would be an improvement in a few small areas, but it would be a virtual lobotomy in many others.

Walter

On Dec 3, 2012, at 11:30 AM, Artivideo wrote:

So I think when a new version of freeway comes out it would be nice if an “editor” is included so you can see the complete code of a page you generated graphically and make some changes when needed.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

but is it possible to remove code added using the “HTML markup” ???


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

but is it possible to remove code added using the “HTML markup” ???

The process is the same as when you added the code using this method - just the reverse.

Adding Markup comes in 2 flavours:

Page>Html Markup and then choosing where to add ie

before <html>, after <html>, before <head>, after <head>, etc. etc.

Or

Insert>Markup Item which gives you a dialogue box into which you paste/type your code and then you can subsequently position that Markup item where you want it to appear on your FW page.

Have you added code you want to remove?

If you have code added using the 1st method then when you go back into Page>Html Markup the picker/selector where you added the code will be underlined.

Like this

If you have added code using the second method then you should see something like this on your FW page

Double clicking it will open it for editing or you can select and delete.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter

The preferences were already set as per your instructions.

Page actions are “Relative Page Layout”, “Meta Plus” and “Freecounter 2 -page”

Other Actions: “Twitter Follow Button” and “Facebook Like Box”

I “Published” and “saved”. I opened my index file from the Site Folder with Coda2 and the Error warning appeared again. This time I elected to have Coda2 fix the errors and I ‘Saved’ and closed Coda.

When closing Freeway a warning appeared that 'An HTML file not belonging to this… will be overwritten". So I agreed and closed my Freeway Document. Now when I open my index page in Coda, the previous warning about line endings does not appear. And the index page in Freeway is normal. Everything appears OK. Does this mean it has somehow corrected the errors?

A couple of other pages also had the ‘Line ending’ error, which also appear to be fixed now after applying the above steps.

So, in this case it appears there was no need to Cut, Paste, and create a new style. But I have a gut feeling that it won’t always be this easy.

Here is a link to my index page if it is of any help www.swanphotographics.com

Thanks

Paul

On 04/12/2012, at 2:11 AM, Walter Lee Davis email@hidden wrote:

I’ll let Ernie tell you what he had in mind for your styles question, but this part is easy:

On Dec 3, 2012, at 2:58 AM, Swan Photographics wrote:

Upon opening my index page with Coda a message “The file has mixed line endings. Do you want to convert all line endings to LF, the most common line ending in the file?” If I correct this error, how do I get it into my index page? Or do I create a new one?

It’s possible that you have a mixture of line endings depending on the Actions you used in the page, and how they were coded, and the settings in Freeway’s Document Setup dialog.

First, set these preferences for all new documents. To do that, close all currently-open Freeway documents, and select File/Document Setup from the main menu. (This sets the default for all new documents you make after this point – it will not affect documents you have already saved.) Click on the Output tab in the dialog, and set the following preferences:

  • HTML code: More Readable
  • Line feeds: Unix
  • File names: Unix/Windows

There are other preferences, these are the ones you need worry about.

Now, repeat this with your problem document (open the document, then follow the steps above). Publish again, and look at what Coda has to say when you import the file a second time.

If you still see a mix of line-feed types, please write back and list the individual Actions you have applied both to the page and to the elements on the page, and also note whether you copied and pasted any code from anywhere into the Page / HTML Markup or Markup Items dialogs.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s an odd one. I doubt that forcing Freeway to overwrite the file made any difference, although if the issue was with Coda, it might have caused Coda to drop its cache of the file and really look at the original on disk another time.

I own Coda, but I don’t use it all that often, so I haven’t encountered this particular combination before.

I have seen Actions create mixed-ending pages, owing to some code in Freeway that insists on mixing “Classic Mac” line-endings with Unix Mac OS X line-endings when an Action contains or creates line-breaks in its output. I’ve also had some huge issues within Actions when creating external files – setting the correct character encoding on those is a science project.

Walter

On Dec 4, 2012, at 4:54 AM, Swan Photographics wrote:

Hi Walter

The preferences were already set as per your instructions.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I use Coda (v1 & 2) exclusively and on the rare occasion I’ve opened a FW-generated html file I always get the same warning (below) and also the resulting “overwrite” alert when I save the FW file but I’ve never encountered any FW issue by changing the line endings.

Todd

Upon opening my index page with Coda a message “The file has mixed line endings. Do you want to convert all line endings to LF, the most common line ending in the file?”


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Todd and Walter for your input and feedback.

Now I’ll just wait patiently for Ernie (or somebody else) to help explain how easy it is to copy and paste the corrected code back into Freeway.

Paul

On 05/12/2012, at 1:02 AM, Todd email@hidden wrote:

I use Coda (v1 & 2) exclusively and on the rare occasion I’ve opened a FW-generated html file I always get the same warning (below) and also the resulting “overwrite” alert when I save the FW file but I’ve never encountered any FW issue by changing the line endings.

Todd
http://xiiro.com

Upon opening my index page with Coda a message “The file has mixed line endings. Do you want to convert all line endings to LF, the most common line ending in the file?”


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m sorry to delay a reply, partly because of my schedule but mainly
because I’m trying to get a read on what you do know about page code and
specifically how Freeway Pro writes it. You seem to know enough to fiddle
around in Coda, but that you have to ask how to make styles in FWP has
given me seriously long pause about how to answer your question.

If you know enough to use Coda, then you must understand the basic syntax
or logic of html and css. For example,

h1 { color: red; }

is a css Tag style for the first-level html header element, with the Color
property set to Red. In Freeway Pro, there is no “cut & paste” needed as
the style can be created and edited directly through controls in the Style
Editor. In this manner, Freeway Pro has controls for most style properties
– background-color, font-size, font-style, etc. Some properties are not so
clearly labeled, as with “leading” which is line-height, or “space-after”
which is margin-bottom. This can be worked out and learned. Attributes for
which no Freeway Pro controls exist can be added through the Extended
interface in the Style editor, as with

a { text-decoration: none; }

in FWP becomes a new Tag style in the Style Editor window

tag: a
name: (empty)

and in the Style Editor Extended attribute window

name: text-decoration
value: none

Now this is a good example of a style made in Coda that can be transferred
to FWP, although it is short enough to more easily just type. When I do
this, I will drag the FWP design window down to reveal the Coda window
behind it, then select menu Edit > Styles so I can see what I’m trying to
type. For longer styles, it is literally easier to copy and paste - the tag
name to the new style tag field (or class name to the new style name field)
then either apply the appropriate FWP attribute control or create the
attribute in the Extended Style Editor, copy the name to the name field and
value to the value field. Simple enough?

However, Freeway Pro also writes styles in different places in the html it
creates - for example, div elements have their styles written inline with
the element… such as

<div id="name1a" style="height: 100px; background-color: yellow;

border: 1px solid black;"> contents

So if you add or alter the css style code to that element in Coda, the best
way to handle it in Freeway Pro is again to locate that element in FWP and
use the built-in controls if possible. And, just like with the Style
Editor, you can add style options to that element through the menu Item >
Extended window (choose the Div Styles pane).

I am only using tools like Coda to quickly imagine how the code should work
then working in FWP to achieve that same result. So, knowing how Freeway
Pro produces your page code gives you some idea how to then make FWP write
its code the way you want it to.

I hope this gets you started.


Ernie Simpson

On Tue, Dec 4, 2012 at 10:26 AM, Swan Photographics <
email@hidden> wrote:

Now I’ll just wait patiently for Ernie (or somebody else) to help explain
how easy it is to copy and paste the corrected code back into Freeway.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks that helps :slight_smile:

On 3 Dec 2012, 10:56 pm, DeltaDave wrote:

but is it possible to remove code added using the “HTML markup” ???

The process is the same as when you added the code using this method - just the reverse.

Adding Markup comes in 2 flavours:

Page>Html Markup and then choosing where to add ie

before , after , before , after , etc. etc.

Or

Insert>Markup Item which gives you a dialogue box into which you paste/type your code and then you can subsequently position that Markup item where you want it to appear on your FW page.

Have you added code you want to remove?

If you have code added using the 1st method then when you go back into Page>Html Markup the picker/selector where you added the code will be underlined.

Like this

If you have added code using the second method then you should see something like this on your FW page

Double clicking it will open it for editing or you can select and delete.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Ernie

Your reply is greatly appreciated.

I have no illusions about my lack of knowledge or experience with coding, and your perception of such is 100% correct.

Being a photographer, I’ll use the analogy that I feel using Freeway is much like using a new digital camera on AUTO. It does a good job that most users will be happy with, but the results could be better if the time was taken to understand the process of why and how, rather than just accepting what is often a compromise.

The number of posts I see here with questions such as “how do I”, resulting in answers containing code, seem to indicate that much like using a camera on Semi-Auto or (gasp) full Manual there is much to learn, but the results could well be worth the effort.

Viewing the source code from a Freeway generated page is probably like reading the Metadata/EXIFdata generated by digital cameras. All the information is there, but useless if you don’t know how to read it and what it means or does.

I have asked myself a few times whether I should just accept the AUTO settings in Freeway (the easiest outcome) or be daring, lash out, and throw (some) caution to the wind and get my hands dirty.

So I have Coda2 on a seven day trial, to see whether it is worth the investment, in an effort to help me understand, learn and implement some “Manual” settings. I guess I should also start a learning about HTML5, and I have noted the two books on web design you recommended in another post.

The other problem of course is that time is slipping by, and I’m already having more than one “late life crisis”:slight_smile: Too many “buckets” left, and more being added.

Thanks for your help and guidance.

Paul

On 05/12/2012, at 6:36 AM, Ernie Simpson email@hidden wrote:

I’m sorry to delay a reply, partly because of my schedule but mainly
because I’m trying to get a read on what you do know about page code and
specifically how Freeway Pro writes it. You seem to know enough to fiddle
around in Coda, but that you have to ask how to make styles in FWP has
given me seriously long pause about how to answer your question.

If you know enough to use Coda, then you must understand the basic syntax
or logic of html and css. For example,

h1 { color: red; }

is a css Tag style for the first-level html header element, with the Color
property set to Red. In Freeway Pro, there is no “cut & paste” needed as
the style can be created and edited directly through controls in the Style
Editor. In this manner, Freeway Pro has controls for most style properties
– background-color, font-size, font-style, etc. Some properties are not so
clearly labeled, as with “leading” which is line-height, or “space-after”
which is margin-bottom. This can be worked out and learned. Attributes for
which no Freeway Pro controls exist can be added through the Extended
interface in the Style editor, as with

a { text-decoration: none; }

in FWP becomes a new Tag style in the Style Editor window

tag: a
name: (empty)

and in the Style Editor Extended attribute window

name: text-decoration
value: none

Now this is a good example of a style made in Coda that can be transferred
to FWP, although it is short enough to more easily just type. When I do
this, I will drag the FWP design window down to reveal the Coda window
behind it, then select menu Edit > Styles so I can see what I’m trying to
type. For longer styles, it is literally easier to copy and paste - the tag
name to the new style tag field (or class name to the new style name field)
then either apply the appropriate FWP attribute control or create the
attribute in the Extended Style Editor, copy the name to the name field and
value to the value field. Simple enough?

However, Freeway Pro also writes styles in different places in the html it
creates - for example, div elements have their styles written inline with
the element… such as

contents

So if you add or alter the css style code to that element in Coda, the best
way to handle it in Freeway Pro is again to locate that element in FWP and
use the built-in controls if possible. And, just like with the Style
Editor, you can add style options to that element through the menu Item >
Extended window (choose the Div Styles pane).

I am only using tools like Coda to quickly imagine how the code should work
then working in FWP to achieve that same result. So, knowing how Freeway
Pro produces your page code gives you some idea how to then make FWP write
its code the way you want it to.

I hope this gets you started.


Ernie Simpson

On Tue, Dec 4, 2012 at 10:26 AM, Swan Photographics <
email@hidden> wrote:

Now I’ll just wait patiently for Ernie (or somebody else) to help explain
how easy it is to copy and paste the corrected code back into Freeway.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So I have Coda2 on a seven day trial

But you don’t even need Coda when you can have TextWrangler for free.

Especially starting out you really only need a plain text editor and Coda’s bells and whistles may confuse things for you.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ll look at Textwrangler again.

Thanks

On 05/12/2012, at 10:00 AM, DeltaDave email@hidden wrote:

So I have Coda2 on a seven day trial

But you don’t even need Coda when you can have TextWrangler for free.

Especially starting out you really only need a plain text editor and Coda’s bells and whistles may confuse things for you.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dave, does Textwrangler do the auto complete stuff that Coda does? For me
that is an important feature that improves both my coding and my typing
skills. And the live preview.


Ernie Simpson

On Tue, Dec 4, 2012 at 8:31 PM, Swan Photographics <
email@hidden> wrote:

I’ll look at Textwrangler again.

Thanks

On 05/12/2012, at 10:00 AM, DeltaDave email@hidden wrote:

So I have Coda2 on a seven day trial

But you don’t even need Coda when you can have TextWrangler for free.

Especially starting out you really only need a plain text editor and
Coda’s bells and whistles may confuse things for you.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Todd here, I think Dave is sleeping.

TextWrangler: No native autocomplete but there is a plugin, I believe, and no live preview.

Todd

Dave, does Textwrangler do the auto complete stuff that Coda does? For me
that is an important feature that improves both my coding and my typing
skills. And the live preview.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options