[Pro] TagWrap & CrowBar Breaking

Hello Freeway Actions Builders

We have come across an issue where two actions we have been using are breaking, Tag Wrap and Crowbar. I believe we see where the issue is in regards to the TagWrap action, but thought it better to share our findings so everyone could benefit. As for CrowBar not sure what is going on under the hood of it’s action.

__________TagWrap ______________________________________________

ISSUE: Tag Breaks Away From Item
When an absolute item with the TagWrap Action is on a page using RPL, the form tag that is entered through the action is breaking away from the item and getting randomly placed elsewhere.

POSSIBLE ACTION FIX: By changing line 15 from “fwBeforeEndBody” to “fwAfterEndHTML” in the action we seem to have been able to fix the issue. Hope this is helpful. Look forward to an update on the Forge.

CrowBar (Item & page actions affected only)___

ISSUE: When applying the actions, Item or Page, the code entered in the End setting is out of order in the final output if all its child items are not inline. Can this be fixed or is it a limitation of the action?


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

I have not tested either Action in the presence of RPL. I cannot begin to guess what might be happening, as that Action does some serious heavy lifting. You don’t mention if your second issue has anything to do with RPL, so I need clarification on that point.

In general, Actions also do not operate in a strict order, there seems to be some “black box” behavior to do with the order that Actions are added to objects, page vs. item Actions, the filename of the Action, where it was installed… all this beyond the normal parts of Action interaction which the developer CAN control – namely which callback they invoke their magic from within.

TagWrap does one simple thing. It places a user-specified string of text before and after the element it is applied to. It does not (and I can certainly understand any confusion, given the name) wrap an element with a full-blown tag as Freeway understands that term. It also does not do anything that might signal to Freeway that the bit of text should be considered part of the element it wraps, such that they would be moved together rather than separately.

RPL takes apart the entire page, re-assigns hierarchy, creates new tags (real tags – that’s the important part here) to wrap the parts of the page you have drawn in Freeway, and otherwise does so many things at once that it’s a serious miracle unto itself. I cannot imagine that TagWrap would survive this process at all, since it is injecting plain text into the output stream.

Your solution is just kicking the problem down the processing stream a bit. Any other Action that was looking for the wrapper code during the output process will miss it, because that code won’t be there yet. I can certainly make this change, but it may have unintended consequences.

Crowbar assumes (when you are applying it in an inline context) that the Action is either the first or the last or the only “character” on a line of text. It looks up one level to its surrounding container element, renders that element to HTML, counts characters, and then moves itself outside of the either the first or last character of that rendered HTML (or, in the case of being the only thing on the line, removes the entire container tag). If you can post an example, made like this: one DIV with the Action not used at all, and an inline image box where the Action would be, and one DIV that is an exact duplicate of the first, but with the addition of the Action (replacing the inline image), I may be able to help further. I need to see where you started, and what you’re expecting to happen, before I can begin to diagnose this.

Walter

On Jul 16, 2013, at 2:21 PM, TeamSDA wrote:

Hello Freeway Actions Builders

We have come across an issue where two actions we have been using are breaking, Tag Wrap and Crowbar. I believe we see where the issue is in regards to the TagWrap action, but thought it better to share our findings so everyone could benefit. As for CrowBar not sure what is going on under the hood of it’s action.

__________TagWrap ______________________________________________

ISSUE: Tag Breaks Away From Item
When an absolute item with the TagWrap Action is on a page using RPL, the form tag that is entered through the action is breaking away from the item and getting randomly placed elsewhere.

POSSIBLE ACTION FIX: By changing line 15 from “fwBeforeEndBody” to “fwAfterEndHTML” in the action we seem to have been able to fix the issue. Hope this is helpful. Look forward to an update on the Forge.

CrowBar (Item & page actions affected only)___

ISSUE: When applying the actions, Item or Page, the code entered in the End setting is out of order in the final output if all its child items are not inline. Can this be fixed or is it a limitation of the action?


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 need to see where you started, and what you’re expecting to happen, before I can begin to diagnose this.

Walter

Hey Walt,

Bernard here. The issue we are having happens when we apply Crowbar to a DIV that has child items inside of it. In the action UI, we are able to select where we want the code to be added to (Beginning or Ending). When we choose to add the code to the end, the code is still added to the beginning of the DIV. The only way it will go to the end is if all the child items were built inline. Just to clarify, this happens without the use of RPL.

In my example link below, Container01 and Container02 both have the action applied the same way. In Container01, the image is dropped inline. In Container02,the image is dropped absolute. The code is added to the end of the DIV only if the items are all inline.

(Live Lights | 30 Years of Creativity)

  • Is this an issue, or a technical limitation?

  • In regards to TagWrap, what are some actions the fix will break?

Thanks,
Bernard


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

On Jul 17, 2013, at 10:56 AM, TeamSDA wrote:

I need to see where you started, and what you’re expecting to happen, before I can begin to diagnose this.

Walter

Hey Walt,

Bernard here. The issue we are having happens when we apply Crowbar to a DIV that has child items inside of it. In the action UI, we are able to select where we want the code to be added to (Beginning or Ending). When we choose to add the code to the end, the code is still added to the beginning of the DIV. The only way it will go to the end is if all the child items were built inline. Just to clarify, this happens without the use of RPL.

In my example link below, Container01 and Container02 both have the action applied the same way. In Container01, the image is dropped inline. In Container02,the image is dropped absolute. The code is added to the end of the DIV only if the items are all inline.

(Live Lights | 30 Years of Creativity)

  • Is this an issue, or a technical limitation?

It’s strange, that’s what it is. If you applied the Action at the box level (as an Item Action) then it should respect the settings in the Action interface. Could you please try this same construction in Freeway 5.5? Maybe there’s a regression between the two major versions w/r/t this part of the Actions API.

  • In regards to TagWrap, what are some actions the fix will break?

No idea, it would depend on what sort of thing the Actions were doing. I tend to try wherever possible to do the following things when mucking around with the page in an Action: 1. Leave everything as tags, not as rendered HTML text, and 2. Do my work as early as possible, so I don’t override another Action’s effects. Actions are supposed to cooperate, and to leave the document in an editable state for the next Action. Anything that hacks the document too extremely will make it impossible to overlap Actions on an element or on the page itself. See Source Code Snooper for the most extreme example of that effect extant. Once you apply that, it’s game over for any other Action – or even for the design interface itself. You take Freeway and turn it into BBEdit.

Walter


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

Hi Walt . . . Dave here, thank you for getting back to Bernard so helpful. Allow me to address this as he is busy with a couple other things.

  1. Regarding TagWrap, I see what you are saying about the fix method that we provided. If you have another method or do update the action please advise otherwise we are going to modify for our internal use until such time a better solution arises.

  2. As for testing CrowBar in FW Pro 5.5 we have just upgraded all our computers with fresh installs of the latest OS as well as all our software so we will not be able to do this. Also just so you are aware, the issue is present in both the Item action and the Page action.

Kind Regards, Dave


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

On Jul 17, 2013, at 3:00 PM, TeamSDA wrote:

Hi Walt . . . Dave here, thank you for getting back to Bernard so helpful. Allow me to address this as he is busy with a couple other things.

  1. Regarding TagWrap, I see what you are saying about the fix method that we provided. If you have another method or do update the action please advise otherwise we are going to modify for our internal use until such time a better solution arises.

  2. As for testing CrowBar in FW Pro 5.5 we have just upgraded all our computers with fresh installs of the latest OS as well as all our software so we will not be able to do this. Also just so you are aware, the issue is present in both the Item action and the Page action.

You might want to try the inline version, then, and see if that can do what you need. Not sure, though.

Walter

Kind Regards, Dave


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 Walt . . . Yes the inline part works, thats why we did not mention it. Let us know and thanks.

Regards, Dave


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