Announcement

Collapse
No announcement yet.

[CLOSED] [#586] [1.10] [Ignore] attribute doesn't work on methods

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [#586] [1.10] [Ignore] attribute doesn't work on methods

    Although the documentation on the [Ignore] attribute says that it may be applied to methods, it doesn't seem to work

    In the following example, no output will be generated because the whole class is ignored (this part works fine):

    [Ignore]
    public class IgnoredClass
    {
        public void Go() { }
    }
    But in the next example, I would expect a class to be generated in the JavaScript but without a"Go" method -

    public class ClassWithIgnoredMethod
    {
        [Ignore]
        public void Go() { }
    }
    This does not work, though, it generates the following:

    Bridge.define('Demo.ClassWithIgnoredMethod', {
        go: function () {
        }
    });
    Also, the first sentence in the documentation about this attribute is not very clear:

    Use of the Ignore Attribute will instruct the Bridge Compiler to including this member or type definition in the JavaScript file
    Should it be something more like

    Use of the Ignore Attribute will instruct the Bridge Compiler to exclude this member or type definition from the JavaScript file
    ?
    Last edited by geoffrey.mcgill; 2016-03-15 @ 05:04 PM.

    #2
    Hi ProductiveRage,

    Thanks for pointing out the poor comment in the Ignore Attribute Reference. I have revised the statement.

    I'm reviewing the whole document.

    We are investigating the Method + IgnoreAttribute issue.

    Comment


      #3
      The entire Attribute Reference knowledge base article was reviewed and lots of revisions were made.

      I've also created a GitHub Issue to track the IgnoreAttribute problem with not ignoring Methods. See Issue #586.

      Related to this thread, as of v1.10, we are renaming the IgnoreAttribute to ExternalAttribute. See Issue #573.

      Comment


        #4
        We found another related issue, #587.

        If the extern modifier is applied to a Member, then it should be ignored by the compiler.

        [UPDATE] #587 issue is related to Live compiler not Bridge itself, marked in GitHub as invalid.
        Last edited by Leonid; 2015-11-17 @ 05:08 PM. Reason: Updated according to changes in GitHug issue #587

        Comment


          #5
          Hi ProductiveRage!

          We have included the fix into release1.10 branch.

          Please note we have renamed the IgnoreAttribute to ExternalAttribute in this release (i.e. IgnoreAttribute marked as obsolete).
          Last edited by Leonid; 2015-11-17 @ 06:19 PM.

          Comment

          Working...
          X