Robert's eSearch Widget

774
3
Jump to solution
02-19-2014 07:54 PM
LefterisKoumis
Occasional Contributor III
[ATTACH=CONFIG]31600[/ATTACH]

After spending quite bit of time, I am still puzzled by a line of code that I saw in the eSearch widget. The line in question is actually located in the SearchWidgetFixedDG.mxml code. I attached a screenshot of it. So, if any of the Flex experts or Robert himself can explain what is the purpose of the line "fl", I'd really appreciate it. Obviously the compiler understands it, since it doesn't raise any error flags.

This is very unusual for me to see a variable that is "hanging" by itself.

Thank you.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Lefteris,

    That line and the line above are leftover from some development/testing.

There are times when you can do something similar to this in development and it will have a purpose. Here is an example:

import com.esri.ags.layers.FeatureLayer; FeatureLayer;
This forces the compiler to use the import without warning that it is not used. This is sometimes needed in the parent component of another component to prevent a memory leak issue (if you receive a warning about this possible memory leak issue). We can see this in a viewer file called ForcedImports.as

I am working on a 3.6.2 release this week, so thanks for letting me know about this.

View solution in original post

0 Kudos
3 Replies
LoganLehman
New Contributor
I am very interested to see if this is something special in itself. Just because the compiler doesn't complain doesn't mean it wasn't accidental (or even better, Robert just wants to mess with people's heads). As far as I know this doesn't do anything, but I would love to hear from Robert as well.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lefteris,

    That line and the line above are leftover from some development/testing.

There are times when you can do something similar to this in development and it will have a purpose. Here is an example:

import com.esri.ags.layers.FeatureLayer; FeatureLayer;
This forces the compiler to use the import without warning that it is not used. This is sometimes needed in the parent component of another component to prevent a memory leak issue (if you receive a warning about this possible memory leak issue). We can see this in a viewer file called ForcedImports.as

I am working on a 3.6.2 release this week, so thanks for letting me know about this.
0 Kudos
LefterisKoumis
Occasional Contributor III
Lefteris,

    That line and the line above are leftover form some development/testing.

There are times when you can do something similar to this in development and it will have a purpose. Here is an example:

import com.esri.ags.layers.FeatureLayer;
FeatureLayer;
This forces the compiler to use the import without warning that it is not used. This is sometimes needed in the parent component of another component to prevent a memory leak issue (if you receive a warning about this possible memory leak issue). We can see this in a viewer file called ForcedImports.as

I am working on a 3.6.2 release this week, so thanks for letting me know about this.


Thank you Robert. I didn't know that you can do that with raising error flags.
0 Kudos