Conversion from CF10

I am converting a legacy app (that has been running under ACF10 - Fusebox
4) to Lucee.

One of the very first errors I received was regarding this bit of code:--------------------
function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = url & “&br=1”;
s.tooltip = tooltip;

return s;
}

It would throw an error on the line:
s.url = serialize(url) & “&br=1”;

and the error it would throw is:
Use Built-In-Function “serialize(Struct):String” to create a String from
Struct

So - I edited this function to:

function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = serialize(url) & “&br=1”;
s.tooltip = tooltip;

return s;
}

And that seemed to fix the issue for THAT error.

But - as all the fuseactions/fusearguments are passed in the URL - I am
finding more and more of these “Use Built-in Function…” errors that all
have some relation to the URL.

Has anyone else seen this issue with older FuseBox applications running
under Lucee?

I can post other code examples - if that would help…

I’m surprised that works in CF10, if url is indeed a struct that is being
passed into that function. Logically, string concatenation shouldn’t work
with a struct, but maybe ACF coerces it some way.

If it is a string, then I’d suggest changing the url argument to another
name so Lucee doesn’t treat it as the url scope.

Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamediaOn Sat, Feb 27, 2016 at 7:42 PM, Sid Wing <@Sid_Wing> wrote:

I am converting a legacy app (that has been running under ACF10 - Fusebox
4) to Lucee.

One of the very first errors I received was regarding this bit of code:

function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = url & “&br=1”;
s.tooltip = tooltip;

return s;
}

It would throw an error on the line:
s.url = serialize(url) & “&br=1”;

and the error it would throw is:
Use Built-In-Function “serialize(Struct):String” to create a String from
Struct

So - I edited this function to:

function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = serialize(url) & “&br=1”;
s.tooltip = tooltip;

return s;
}

And that seemed to fix the issue for THAT error.

But - as all the fuseactions/fusearguments are passed in the URL - I am
finding more and more of these “Use Built-in Function…” errors that all
have some relation to the URL.

Has anyone else seen this issue with older FuseBox applications running
under Lucee?

I can post other code examples - if that would help…


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/9bcdb723-4fff-4e4d-bcf5-1c5280d718a8%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9bcdb723-4fff-4e4d-bcf5-1c5280d718a8%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

I’m not familiar with Fusebox, but are you trying to add the URL scope
or the argument named url? if it’s the argument, then do:

s.url - arguments.url & “&br=1”;

on a separate subject – you’d get better performance if you modify your
code like so:

function br_link(fuseaction, title, url, tooltip)
{
var s = {

fuseaction : arguments.fuseaction
,title : arguments.title
,url : arguments.url & “&br=1”
,tooltip : arguments.tooltip
};
return s;
}

if you want to squeeze even more performance then you can get rid of the
local variable “s”, and simply do:

return { … };

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 2/27/2016 10:42 AM, Sid Wing wrote:

I am converting a legacy app (that has been running under ACF10 -
Fusebox 4) to Lucee.

One of the very first errors I received was regarding this bit of code:

function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = url & “&br=1”;
s.tooltip = tooltip;

return s;
}

It would throw an error on the line:
s.url = serialize(url) & “&br=1”;

and the error it would throw is:
Use Built-In-Function “serialize(Struct):String” to create a String
from Struct

So - I edited this function to:

function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = serialize(url) & “&br=1”;
s.tooltip = tooltip;

return s;
}

And that seemed to fix the issue for THAT error.

But - as all the fuseactions/fusearguments are passed in the URL - I
am finding more and more of these “Use Built-in Function…” errors
that all have some relation to the URL.

Has anyone else seen this issue with older FuseBox applications
running under Lucee?

I can post other code examples - if that would help…


Love Lucee? Become a supporter and be part of the Lucee project today!


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/9bcdb723-4fff-4e4d-bcf5-1c5280d718a8%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9bcdb723-4fff-4e4d-bcf5-1c5280d718a8%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.