Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tathata

Pages: [1]
1
General Board / Re: ActionScript 3 (Another one)
« on: April 05, 2006, 09:35:50 am »
Your right they both produce the same results.  The * isn't necessary but undoubtably going to be used.

One last request.  Could we get the "... (rest)" parameter added too?  Again this isn't necessary as you can already get at each functions parameters through the arguments variable however this again is something new to AS3 as another way of writting the function parameters.  I have a feeling I am going to run into this sooner or later when I try to import someone elses code :-/

Heres an example:
public function traceArgArray(x: int, ... args):void {
    for (var i:uint = 0; i < args.length; i++) {
       trace (args);
   }
}

Thanks much!!
Lance

2
General Board / Re: ActionScript 3 (Another Parse Problem)
« on: April 04, 2006, 05:01:06 pm »
Just found another parse problem.  The following line of code produces a "Unexpected symbol: *" when you try to import it.

In AS3 the * tells the compiler that you ment to leave the property untyped and to accept any type you pass to it.  Becuase AS3 doesn't have method overloading this is necessary.

protected function setProperty(property:String, newValue:*):void
{
//....
}

Thanks,
Lance


3
General Board / Re: ActionScript 3
« on: April 04, 2006, 04:33:29 pm »
Quote
For more information on how namespaces (in the normal sense, not actionscript 3 sense) are handled in EA please see http://www.sparxsystems.com.au/EAUserGuide/index.html?namespaces.htm.


I think I just got it working.  I was setting the Namespace root on the package above 'com' but when I generate code by right clicking on the class it doesn't output the package and namespace.  However if I generage code from from the package level it does output the package and namespace just fine.

So this just seems to be my misunderstanding of how to use the program properly.

Quote
I can confirm that the scope on the interface is missing, we'll add that in our next release.


Sounds great!  Over all it is working very well :-D

Thanks,
Lance

4
General Board / Re: ActionScript 3
« on: April 04, 2006, 02:37:18 pm »
Ok, after some more testing the package statement followed by the full namespace is required.  Does anyone have a suggestion how to get this to show up when generating code?  Again I do have a Namespace root set up already but still no namespace being output.

Also we need to have access modifiers before all "class" or "interface" statements.  My understanding is that all interfaces and classes in AS3 can only be marked public but even so the compiler says it can't find my interface unless you put the public access modifier before the interface declaration.

I have modified my base code export template to convert the classScope property in the Class Declaration script so it now puts the proper scope before these.  However after doing this EA can no longer import them! :-(

Thanks,
Lance

5
General Board / Re: ActionScript 3
« on: April 04, 2006, 12:53:45 pm »
Well, I found a new help file one the web site.  Didn't notice that this isn't included with the patch files.

AS3 is listed in the new docs along with some specifics about it.

For some reason my code is still coming out as:

interface IProjectPhase
{
    function get id(): String;
   
    function get name(): String;
}//end IProjectPhase

Where I would expect it to be:

package com.md.tt3.vo
{
    public interface IProjectPhase
    {
         function get id(): String;
   
         function get name(): String;
    }//end IProjectPhase
}


I set the namespace root but still no package statement.

I guess the package statement might not be necissary and I will try to compile the code shortly and see if the compiler complains.  Also it probably isn't important that the interface statement has an access level specified as the language doesn't allow you to have private classes or interfaces.  The above code I was expecting would have been the code the Flex Builder2 Beta2 would have output which may change in the future anyway ;-)

However it is important to note that the code I expected will not import into EA properly because it gets hung up on the public access level being set on the interface.  However the Flex2 compiler currently doesn't have a problem with it and the Flex2 builder actually puts it in there when you create a new interface file.

If I run into any further problems I will post an update.

Thanks,
Lance

6
General Board / ActionScript 3
« on: April 04, 2006, 11:46:10 am »
Just downloaded the latest patch for EA 6.1 (789).  According to the change list it says it has ActionScript 3 support but when I try to generate code I end up with only ActionScript 2 code.  Also when I try to import ActionScript 3 code I get the following parse error: Unexpected symbol: interface

I did go into Tools > Options > Source Code Engineering > ActionScript and changed "Default Version" to 3.0.

Since AS3 support is so new it doesn't look like the docs have been updated.  Is there something else I am missing?  I would really love to test this out!

Thanks,
Lance

7
General Board / Re: Configuring Local Directories
« on: June 23, 2004, 06:46:22 am »
Excelent!

Thank you for all the help!

I have been using EA for a couple weeks now and it is really a great program and the support I have received from the forum has helped a lot!!

8
General Board / Configuring Local Directories
« on: June 18, 2004, 08:31:49 am »
I have created my own language datatypes and code generation template for ActionScript 2.0.

I would like to setup a local directory for my "user defined language".  When I open the local directory configuration window I only get options for setting up local directories for the built in languages.

Is there any way to do this or should this be a new feature request?

9
Yeah, your right.  I wasn't setting up the language datatypes before importing.

After recreating the datatypes in the new file it imports the code template fine.  :)

Is there any way of exporting the datatypes?  Looking through the Export Reference Data list I don't see anything that looks like you can :(  Recreating the language datatypes ever time i create a new project just seems like an unecessary step.

Thanks for you help!

10
I have been working on a code template for ActionScript2 and I would like to import the template into another project.

I read and fallowed the instructions in the help doc several times.  The process of exporting and importing the reference data and selecting the desired code template works without producing any errors, however my newly imported code template doesn't show up in my new project after importing it!!

Maybe I am simply missing a step, but I fallowed the directions in the help and haven't been able to produce the desired result.

Anyone have a sugestion?  This issue and the previous post about the use of %packagePath% are the only 2 issues in deciding weather to purchase EA for our development process.

Thanks for you help,
Lance

11
That fixed it, Thanks!

12
I am working on a code generation template for ActionScript 2.0.  Most of my template is working just fine with the exception of the %packagePath%

The packagePath should be outputing "net.test" but instead is only outputting "net"

Here is a snippet of my AS2 file that was generated from my template.
---------------------------------------

class net.MyASClazz
{
     public function MyASClazz()
     {

     };

}; //end MyASClazz

----------------------------------------

The line "class net.MyASClazz" should read "class net.test.MyASClazz"!!

If I try outputting C# code file it outputs the name space just fine!!

Here is the section from my template that should generate the proper name space path (note most of the code was barrowed from the C# template code).

************************
$name = %packagePath%
%if packageIsFirstNonEmpty != "T"%
$name = %packageName%
%endIf%

%if elemType == "Interface"%

%PI=""%
$name = "interface "+$name+"."+%className%
%endTemplate%

%PI=""%
$name = "class "+$name+"."+%className%

$name
***************************

I have been reading documentation and looking at other code generation templates but I just can't get it figured out!  No matter what I have tried %packagePath% only gives me the first package name and drops everything in the middle!

Can someone give me a hand sorting this problem out??

Thanks!!

Pages: [1]