SapphireSteel Forum
Welcome, Guest. Please login or register.
August 22, 2017, 08:46:37 AM

Login with username, password and session length
Search:     Advanced search
Welcome to the SapphireSteel forum - for discussion of the Sapphire and Amethyst IDEs
4074 Posts in 848 Topics by 708 Members
Latest Member: dcham_inbsys
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Amethyst
| | |-+  Amethyst Beta 8
« previous next »
Pages: [1] Print
Author Topic: Amethyst Beta 8  (Read 6172 times)
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 947



« on: April 21, 2010, 07:55:37 AM »

Now available: http://www.sapphiresteel.com/Adobe-Flex-and-Flash-In-Visual
Logged
nig3d
Newbie
*
Posts: 29


« Reply #1 on: April 22, 2010, 07:03:10 AM »

Hi guys,

I was looking forward for this. Fantastic work with the colors.
Although I have already the first problem Sad.
The library that used to compile now doesn't compile anymore because it's looking for the main .as even if it's a library a not an application!
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 947



« Reply #2 on: April 22, 2010, 07:27:17 AM »

It is quite possible that old projects may no longer work correctly (the project file definition usually changes from beta to beta though this will not, of course, happen in the final release  Cheesy ). Can you try using the Amethyst Project Importer (File/New etc.) to convert the project in place. Give it a new project name. This will create a new Amethyst project file but won't change your source code. Your old project will still be there just in case you need it. Or you could import the entire project to a different location if you prefer. Set the import/convert options in the last page of the importer.

Please let us know if that solves the problem.

best wishes

Huw
Logged
drowhunter
Newbie
*
Posts: 15


« Reply #3 on: April 22, 2010, 08:55:39 AM »

Could this by the eagerly awaited version that is compatible with VS2010?
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 947



« Reply #4 on: April 22, 2010, 09:25:32 AM »

Not yet. We'll probably release our VS2010 version in a couple of weeks.
Logged
nig3d
Newbie
*
Posts: 29


« Reply #5 on: April 23, 2010, 03:57:07 AM »

It is quite possible that old projects may no longer work correctly (the project file definition usually changes from beta to beta though this will not, of course, happen in the final release  Cheesy ). Can you try using the Amethyst Project Importer (File/New etc.) to convert the project in place. Give it a new project name. This will create a new Amethyst project file but won't change your source code. Your old project will still be there just in case you need it. Or you could import the entire project to a different location if you prefer. Set the import/convert options in the last page of the importer.

I did it, but I get this:

      Building SWC for Framework
C:\Program Files\MSBuild\SapphireSteel Software\1.0\Amethyst.targets(157,2): error MSB4044: The "CompcCompilerTask" task was not given a value for the required parameter "MainFile".
Done building project "Framework.amproj" -- FAILED.

Build FAILED.
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #6 on: April 23, 2010, 09:30:21 AM »

You might have to put in the MainFile by hand.

I've changed the Library MSBuild task to expect a 'main file' and it must have one. The 'main file' in a library is slightly different from the main file in a normal application: in a library it defines the one file that must be included and that you can use as a 'jumping off point' to haul in everything that the library should have in it. You can forcibly include others if you want, but normally one file is sufficient.

So I think that all you need to do is select a file that acts as the 'base' of the library and mark that as the main file (right click on the file node and select 'set as Main File').

This is set automatically when you create a new project but when you import a project, the importer doesn't normally have this information, and so you have to set it manually.

Dermot
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #7 on: April 23, 2010, 09:33:08 AM »

On VS2010 - I'm scheduled to start that next week (once we've got Flex 4 done).

We'll probably put it out as an 'edge' as soon as we've got something decent, so you'll be able to try it out in the near future (famous last words?).

Dermot
Logged
nig3d
Newbie
*
Posts: 29


« Reply #8 on: April 23, 2010, 04:07:36 PM »

You might have to put in the MainFile by hand.

I've changed the Library MSBuild task to expect a 'main file' and it must have one. The 'main file' in a library is slightly different from the main file in a normal application: in a library it defines the one file that must be included and that you can use as a 'jumping off point' to haul in everything that the library should have in it. You can forcibly include others if you want, but normally one file is sufficient.

So I think that all you need to do is select a file that acts as the 'base' of the library and mark that as the main file (right click on the file node and select 'set as Main File').

This is set automatically when you create a new project but when you import a project, the importer doesn't normally have this information, and so you have to set it manually.

Dermot

sorry, is this supposed to be the solution to be able to "select" the files that I want to be compiled in the swc? If yes, I didn't understand how this mainfile should be made.
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #9 on: April 26, 2010, 08:10:20 AM »

For a library, the 'mainfile' can work in two ways:

1) it can contain a simple class like:

Code:
package {
class A extends B { ...

Here, the mainfile contains the code for the class A and this references class B. The linker will then grab both classes (and any other classes referenced in the code) and put them into the output SWF and SWC. You dont need to do anything else.

2) the file contains code like

Code:
package {
internal class FrameworkClasses {
import mx.binding.ArrayElementWatcher; ArrayElementWatcher;
import mx.binding.BindabilityInfo; BindabilityInfo;
        ...

(this is taken from the Adobe FrameworkcCasses.as file in the SDK: on my machine it's in C:\Program Files\Flex 3 SDK\frameworks\projects\framework\src)

Here, the classes that are to end up in the library are 'referenced' by the odd looking 'import' followed by the class name. The linker will then pull all of those classes into the output SWF inside the SWC. This is the best technique to use for a large and complicated library like the Framework.swc.

Additionally, there are two other features which you may be interested in:

1) if you make the BuildOptions of a file 'Exclude', it will insert an '-externs MyClass' (for a file MyClass.as) which will exclude the symbol (i.e. class) from the linker and so that should exclude that class.
2) if you make the BuildOptions of a file 'Resource', the file will be included in the resulting SWC - but not linked in to the SWF. It will be included like a file in a zip file (which is what an SWC file is anyway). This may be useful for thinks like png image files and css files.

Dermot
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!