Author Topic: Code Generation MustOverride  (Read 3028 times)

dubem1

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Code Generation MustOverride
« on: December 15, 2003, 08:32:14 am »
Hello,

In a class, I have a method that should be MustOverride.  So I add a tagged Value MustOverride =True.

When I Generate the code in VB.Net,  the MustOverride keyWord is there but the method also have a "End Function".
In fact, when a method is MustOverride, there is no code in it and adding a "end function" line cause a syntax Error.  Is there a way to tell the generation code to not add the "End function" line when a method is MustOverride?

Thank you
Martin Dube

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Code Generation MustOverride
« Reply #1 on: December 15, 2003, 09:13:44 pm »
I think that the Sparx folks may have to have a go at this. It appears that the

  Operation Body

template substitution macro doesn't check for MustOverride when it is generating
the body. I'm thinking that if MustOverride is specified then the entire body generation
should be aborted!?

Jim

Sam_Mancarella

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Code Generation MustOverride
« Reply #2 on: December 21, 2003, 07:56:57 pm »
Yes this is correct.

The modified Operation Body template should appear as follows at the end of this post. We shall make this template available in the default templates in the next immediate build (657)

Seasons Greetings & many thanks for your support
Sam Mancarella

--== Begin ==--
%PI=""%
%if opTag:"delegate" == "true"%
%endTemplate%

%if opTag:"MustOverride" == "true"%
%endTemplate%

%if opAbstract == "T"%
%endTemplate%

..... remainder of template....