Book a Demo

Author Topic: errors actionscript  (Read 4694 times)

mschipperheyn

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
errors actionscript
« on: December 28, 2005, 01:53:53 am »
Generated actionscript methods create a method signature with "void" in stead of "Void".

When you generate code and start working on the code. If you then click generate code again, EA will overwrite your created code without asking. At least we should get a warning.

The synchronize package contents allows you to choose between source=>model and reverse, but does not have a source<=>model option, which is what you want. Any merge conflicts can be highlighted in the code much the same way cvs merge conflicts are highlighted.

Kind regards,

Marc

mschipperheyn

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: errors actionscript
« Reply #1 on: December 28, 2005, 02:38:54 am »
Well, actually, "generate source code"has this option (synchronize model and code), but it doesn't work. It just overwrites all your code. Good thing I backed up! Jeez, guys.

Also, you keep having to specify the destination path. It doesn't remember this.

Is this a beta or something?

Marc

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: errors actionscript
« Reply #2 on: December 28, 2005, 01:19:54 pm »
Generated actionscript methods create a method signature with "void" in stead of "Void".

"void" is just the default return type when creating a new method, regardless of language.  So either set the return type (you'll find "Void" in the list) or modify the code templates to check for "void" and replace it with "Void".

When you generate code and start working on the code. If you then click generate code again, EA will overwrite your created code without asking. At least we should get a warning.

Well, actually, "generate source code"has this option (synchronize model and code), but it doesn't work. It just overwrites all your code.


Interesting.  The only time EA doesn't prompt to overwrite code (when it's going to) in my experience is when 'Overwrite code' is selected in the package generation dialog.  Other than that the options for your class, and model determine if EA should overwrite.  Try selecting Generate for a single class, clicking advanced and seeing if that class is set to overwrite or synchronise?

The synchronize package contents allows you to choose between source=>model and reverse, but does not have a source<=>model option, which is what you want. Any merge conflicts can be highlighted in the code much the same way cvs merge conflicts are highlighted.

You are right here.  There isn't any option to go both ways, but it is deliberate. Code engineering relies on either updating the model from code, or the code from the model.  Perhaps a merge between code and model is something we will implement in the future.  In the mean time the following might be useful.
  • Tools | Options | Attribute/Operations | On forward synch, prompt to delete code features not in model.
  • Project | Source Code Engineering | Import Source Directory | Remove Classes not found in code.
Also, you keep having to specify the destination path. It doesn't remember this.

I haven't seen this.  Could you give some detailed steps of what you are doing?

mschipperheyn

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: errors actionscript
« Reply #3 on: December 29, 2005, 12:10:20 am »
Also, you keep having to specify the destination path. It doesn't remember this.

I haven't seen this.  Could you give some detailed steps of what you are doing?

>Ok. I created a custom package and put all my diagrams and classes in there. When I right click on the root package and select source code engineering. Select Generate Source code. The auto generate files is off which is ok, but the Root directory is empty even though I specified it on previous ocassions.

BTW, the same kind of thing happens when I select Project=>Documentation=>Rich Text Format Report. The output file keeps having to be specified every time.

At a project level, you would want these selections to be remembered.

Kind regards,

Marc

TimWash

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
  • Bad news does not get better with age!
    • View Profile
Re: errors actionscript
« Reply #4 on: December 30, 2005, 09:29:15 pm »
Hello Marc, what build are you using?  I am using build 781 and the RTF documentation path is remembered for me.  In fact, I cannot reproduce the behavior you mention for your problem with the RTF documentation.

Take care,

Tim
Tim Stevens
Programmer/Analyst
VB.NET, VB6, VBA, T-SQL, ActionScript, ColdFusion

rathomas@provismed

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: errors actionscript
« Reply #5 on: January 16, 2006, 09:56:01 am »
We just paid the to update to version 6.0 - build 781 and are experiencing the same issues with regards to Actionscript code generation as other posts:

- 'Void' should be corrected in the default templates shipped.  Most people writing code already don’t have the time to finish their own apps, let along having to rewrite the templates for their IDE for basic functionality to work correctly.  This is not BETA software.

- When using the export Dialog, the default path is not saved.

- When you select multiple class elements, you cannot export them.. the option is not available in the context menu.

- We are getting a '?' at the beginning of the file any time the code has been exported to actionscript

- Also the exporter is adding unsupported options into the class declaration like 'class Logical Model.bike'.  



Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: errors actionscript
« Reply #6 on: January 16, 2006, 01:33:11 pm »
- 'Void' should be corrected in the default templates shipped.  Most people writing code already don’t have the time to finish their own apps, let along having to rewrite the templates for their IDE for basic functionality to work correctly.  This is not BETA software.

No, it's not beta software.  The templates do not refer to void at all.  If you read my previous post you will see that if 'void' is being generated it is because that is what the return type is set to.  My suggestion for editing the templates was to account for this user error.

- When using the export Dialog, the default path is not saved.

Which dialog are you using?

The only one I can think of that would be doing something like this is the package generation dialog.  If you select 'Auto Generate Files' EA fills in defaults.  Then if you select 'Retain Existing File Paths' EA does not keep the default file paths.  Instead it retains what was already there, even if it was nothing.  In this case it's doing the right thing.

- When you select multiple class elements, you cannot export them.. the option is not available in the context menu.

It's not in the context menu, but you can generate using the same keyboard shortcut. (Ctrl+G)

- We are getting a '?' at the beginning of the file any time the code has been exported to actionscript

I haven't seen it, but it could be to do with a unicode byte order marker at the start of the file.

- Also the exporter is adding unsupported options into the class declaration like 'class Logical Model.bike'.  

Actually, Actionscript 2 supports this style of package declaration.  You example isn't generated because the namespace path includes a space.  But it is appropriate to generate the package name according to the way your model is set up.

Look at http://sparxsystems.com.au/EAUserGuide/index.html?namespaces.htm to see how to control namespace generation.

rathomas@provismed

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: errors actionscript
« Reply #7 on: January 24, 2006, 08:28:08 pm »
The Actioncript template should produce a valid return Type.  EA should also default to a valid return type for your default language.  The problem is that EA defaults to 'void' where AS2.0 needs 'Void' with a capitol

We are getting added charachters in the source files like this '?'.  Somtimes you will get somthing like' ~`?' It is always is written at the beginning of the file.  So, when you generate code then sychronize, EA will throw an error until you go and pull the '?' out of each source file.  Any Ideas?  We are using the windows version.

?///////////////////////////////////////////////////////////
//  ConnectLocation.as
//  Macromedia ActionScript Implementation of the Class ConnectLocation
//  Generated by Enterprise Architect
//  Created on:      20-Jan-2006 3:41:48 PM

Thanks for our help,

Ryan Thomas