|
View:
New views
15 Messages
—
Rating Filter:
Alert me
|
|
|
Buggy class attributesHi there!
I'm using MTASC for a while now (currently MTASC 1.12 under Ubuntu), and in some of my ActionScript projects a very ugly bug occurs (two variables are not equal but they should have the same values). After some tries I now have a simple AS class to demonstrate this bug (see files attached). I compiled it with this command: mtasc -header 200:200:31 -main -swf ConstantValues.swf -strict ConstantValues.as As you can see, the variable a has the value "undefined" - but it should have the value "42", as "a" is defined before "A". Is this a bug of the MTASC compiler or a bug of the ActionScript 2.0 interpreter by Adobe? Thanks in advance & nightly greetings from Germany Marc Reichelt || http://www.marcreichelt.de/ class ConstantValues { public static var a : Number = A; private static var A : Number = 42; public static var B : Number = 42; private static var b : Number = B; private function ConstantValues() { // create text field _root.createTextField("tf", 0, 5, 5, 200, 200); var tf : TextField = _root.tf; tf.text += String(a == A) + "\n"; // shows "false" - WTF? tf.text += String(b == B) + "\n"; // shows "true", as it should be // show variables tf.text += "\na = " + a + "\nA = " + A + "\nb = " + b + "\nB = " + B; // note that "a" is undefined! } public static function main() : Void { var cf : ConstantValues = new ConstantValues(); } } -- MTASC : no more coffee break while compiling |
|
|
Re: Buggy class attributesNot sure about your analysis. When "a" is defined, "A" does not have any
value. I am not sure that a run-time should be expected to predict what the future value of "A" might be when evaluating "a=A". At the time when "a" is defined and assigned a value, "A" is undefined. How could the runtime know that "A" was about to be given the value of 42. What if the code was public static var a : Number = A; private static var A : Number = 42; public static var B : Number = 42; private static var b : Number = B; A=43; Would you expect "a" to automatically pick up the value 43 ? How far into the future would you expect "a" to track "A". public static var a : Number = A; public static var B : Number = 42; private static var b : Number = B; private static var c : Number = 43; private static var d : Number = 44; private static var A : Number = c+d; // sets a to 87 or private static var A : Number = c+d+a; sets a to 87 plus 87 plus 87 plus 87 ... plus 87 and so on. This would make programming an interesting art. It is better to have the runtime to use the value at the time of assignment rather than predicting future values. Or just set all undefined or poorly defined variables to the mystical value of 42. IMHO: public static var a : Number = A; does correctly set "a" to undefined in spite of the imminent change in "A"'s value, since "A" is undefined at the the instant in time when "a" is defined. Ron Marc Reichelt wrote: > Hi there! > > I'm using MTASC for a while now (currently MTASC 1.12 under Ubuntu), and > in some of my ActionScript projects a very ugly bug occurs (two > variables are not equal but they should have the same values). > > After some tries I now have a simple AS class to demonstrate this bug > (see files attached). > > I compiled it with this command: > mtasc -header 200:200:31 -main -swf ConstantValues.swf -strict > ConstantValues.as > > As you can see, the variable a has the value "undefined" - but it should > have the value "42", as "a" is defined before "A". > > Is this a bug of the MTASC compiler or a bug of the ActionScript 2.0 > interpreter by Adobe? > > > Thanks in advance & nightly greetings from Germany > > Marc Reichelt || http://www.marcreichelt.de/ > > ------------------------------------------------------------------------ > > class ConstantValues { > > public static var a : Number = A; > private static var A : Number = 42; > > public static var B : Number = 42; > private static var b : Number = B; > > private function ConstantValues() { > // create text field > _root.createTextField("tf", 0, 5, 5, 200, 200); > var tf : TextField = _root.tf; > > tf.text += String(a == A) + "\n"; // shows "false" - WTF? > tf.text += String(b == B) + "\n"; // shows "true", as it should be > > // show variables > tf.text += "\na = " + a + "\nA = " + A + "\nb = " + b + "\nB = " + B; > // note that "a" is undefined! > } > > public static function main() : Void { > var cf : ConstantValues = new ConstantValues(); > } > > } > -- MTASC : no more coffee break while compiling |
|
|
Re: Buggy class attributesHi Ron,
> Not sure about your analysis. When "a" is defined, "A" does not have any > value. I am not sure that a run-time should be expected to predict what > the future value of "A" might be when evaluating "a=A". No, I don't want MTASC to predict the future for me. I want ActionScript to act more like Java (the order of class attributes and functions should be irrelevant). I write some valid Java code: public class JavaPlayer { /* ... */ // this is valid private int status = STOPPED; // here some constants public static final int STOPPED = 0; public static final int PLAYING = 1; public static final int PAUSED = 2; /* ... */ } This is senseful: The initial status value of this player is STOPPED (0). The expression "STOPPED" is parsed correctly. In ActionScript this is very confusing: class ASPlayer { /* ... */ // status will have the value "undefined" private var status : Number = STOPPED; // here some constants public static STOPPED : Number = 0; public static PLAYING : Number = 1; public static PAUSED : Number = 2; /* ... */ } So the variable STOPPED does not exist when status is defined. The confusing thing is: The definition of status is ok, because the variable STOPPED is valid in this context (so MTASC shows no error), but it then has a different value! Maybe MTASC should create a traversal order for classes and class attributes? The traversal order here could be: PLAYING, PAUSED, STOPPED, status. Other classes should also be notified, e.g. the constants are in a class named "Constants": Constants.PLAYING, Constants.PAUSED, Constants.STOPPED, ASPlayer.status To complete, there may be complex expressions. Or MTASC could show an error when parsing this, because STOPPED is not defined when status is defined. What about the official compiler by Adobe? How does it handle these situations? Regards Marc Reichelt || http://www.marcreichelt.de/ -- MTASC : no more coffee break while compiling |
|
|
Re: Buggy class attributes> Or MTASC could show an error when parsing this, because STOPPED is not
> defined when status is defined. > > What about the official compiler by Adobe? How does it handle these > situations? There's always the following case that doesn't work : class A { static var a = b; static var b = a; } Globals initialization order is still an open problem in programming languages. There are tricks to sort the fields, but you can't guarantee that everything will get initialized correctly, especialy if statics are initialized with static function calls, it's impossible to track dependencies. The choice made by MTASC (and I think Adobe compiler too) is to let the user decide the order by simply writing its statics in the order they will be initialized. OTOH haXe (http://haxe.org) has a two-pass initialization. First all methods are defined then all statics are initialized, with some heuristic to sort them. Nicolas -- MTASC : no more coffee break while compiling |
|
|
Re: Buggy class attributesHi Nicolas,
> There's always the following case that doesn't work : > > class A { > static var a = b; > static var b = a; > } > > Globals initialization order is still an open problem in programming > languages. There are tricks to sort the fields, but you can't guarantee > that everything will get initialized correctly, especialy if statics are > initialized with static function calls, it's impossible to track > dependencies. The case you described is illegal, because there would be no traversal order (it would be infinite) - the Java compiler recognizes that. The following would be illegal in Java, too: class A { private static int a = b; private static int b = 0; } But the following is legal: class A { private static int a = 0; private static int b = a; } And this is the case I described (which is legal in Java): class A { private int a = b; private static int b = 0; } This is because in Java the class attributes (static) are defined _before_ the object attributes (non-static). This could be an easy solution, also for MTASC. > The choice made by MTASC (and I think Adobe compiler too) is to let the > user decide the order by simply writing its statics in the order they > will be initialized. I only have Flash MX installed on Windows (and don't use it very often), so I don't have the possibility to check this. Anyone here what can look how the Adobe compiler for AS2 compiles my example I first sent ("ConstantValues.as")? Regards Marc Reichelt || http://www.marcreichelt.de/ -- MTASC : no more coffee break while compiling |
|
|
Re: Buggy class attributesMarc Reichelt a écrit :
> Hi Nicolas, > >> There's always the following case that doesn't work : >> >> class A { >> static var a = b; >> static var b = a; >> } >> >> Globals initialization order is still an open problem in programming >> languages. There are tricks to sort the fields, but you can't guarantee >> that everything will get initialized correctly, especialy if statics are >> initialized with static function calls, it's impossible to track >> dependencies. > > The case you described is illegal, because there would be no traversal > order (it would be infinite) - the Java compiler recognizes that. You can have more complex cases that uses static methods : class A { static function init(flag) { switch( flag ) { case 1: return x; case 2: return y; default: return 0; } } static var x = init(null); static var y = init(1); } That case is valid but you can't really know if it is until you execute the code of the "init" method. It's also difficult to know from this definition which order should be done. Nicolas -- MTASC : no more coffee break while compiling |
|
|
mtasc and mx package with MM errorsHi there!
I use the webserviceconnector and have really no time to loose in my project... when I check my code, it's ok, but when I compile, mtasc doesn't "want to", and tells me several errors in the MM code... now it's in mx.data.binding.Binding... where should I find a correct mx package, and is it a good solution to copy it directly into the stp8 folder ? thw PiR -----Message d'origine----- De : mtasc-bounces@... [mailto:mtasc-bounces@...] De la part de Nicolas Cannasse Envoyé : mercredi 8 août 2007 12:29 À : MotionTwin ActionScript2 Compiler List Objet : Re: [mtasc] Buggy class attributes Marc Reichelt a écrit : > Hi Nicolas, > >> There's always the following case that doesn't work : >> >> class A { >> static var a = b; >> static var b = a; >> } >> >> Globals initialization order is still an open problem in programming >> languages. There are tricks to sort the fields, but you can't guarantee >> that everything will get initialized correctly, especialy if statics are >> initialized with static function calls, it's impossible to track >> dependencies. > > The case you described is illegal, because there would be no traversal > order (it would be infinite) - the Java compiler recognizes that. You can have more complex cases that uses static methods : class A { static function init(flag) { switch( flag ) { case 1: return x; case 2: return y; default: return 0; } } static var x = init(null); static var y = init(1); } That case is valid but you can't really know if it is until you execute the code of the "init" method. It's also difficult to know from this definition which order should be done. Nicolas -- MTASC : no more coffee break while compiling -- MTASC : no more coffee break while compiling |
|
|
Re: mtasc and mx package with MM errorsIf you are short of time, you might want to include the error message in
your post just in case someone recognizes the source of the problem and can tell you right away how to fix it. "...several errors..." could be caused by a few things. Ron PiR Durand wrote: > Hi there! > > I use the webserviceconnector and have really no time to loose in my > project... > when I check my code, it's ok, but when I compile, mtasc doesn't "want to", > and tells me several errors in the MM code... > now it's in mx.data.binding.Binding... > where should I find a correct mx package, and is it a good solution to copy > it directly into the stp8 folder ? > thw > PiR > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de Nicolas Cannasse > Envoyé : mercredi 8 août 2007 12:29 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] Buggy class attributes > > Marc Reichelt a écrit : > >> Hi Nicolas, >> >> >>> There's always the following case that doesn't work : >>> >>> class A { >>> static var a = b; >>> static var b = a; >>> } >>> >>> Globals initialization order is still an open problem in programming >>> languages. There are tricks to sort the fields, but you can't guarantee >>> that everything will get initialized correctly, especialy if statics are >>> initialized with static function calls, it's impossible to track >>> dependencies. >>> >> The case you described is illegal, because there would be no traversal >> order (it would be infinite) - the Java compiler recognizes that. >> > > You can have more complex cases that uses static methods : > > class A { > static function init(flag) { > switch( flag ) { > case 1: return x; > case 2: return y; > default: return 0; > } > } > static var x = init(null); > static var y = init(1); > } > > That case is valid but you can't really know if it is until you execute > the code of the "init" method. It's also difficult to know from this > definition which order should be done. > > Nicolas > > -- MTASC : no more coffee break while compiling |
|
|
RE: mtasc and mx package with MM errorsHi Ron, thanks for answer
I can't tell all the errors, but they're in the mx package, and mtasc doesn't tell all the erros at one time, but one by one at each compile time... I've stopped to correct them after 8 or 9... as an exemple, in the WSDL.as, you can find var parseTime = Math.round((new Date()) - start); and the error is "parse error Date should be Number". It's many years since I've used the webservices, with flashdevelop too, but I use mtasc only for a year, and I can't compile my project because of the adobe/macromedi bad code... I have the -mx parameter but it doesn't do anything... :( + PiR -----Message d'origine----- De : mtasc-bounces@... [mailto:mtasc-bounces@...] De la part de Ron Wheeler Envoyé : mardi 14 août 2007 20:04 À : MotionTwin ActionScript2 Compiler List Objet : Re: [mtasc] mtasc and mx package with MM errors If you are short of time, you might want to include the error message in your post just in case someone recognizes the source of the problem and can tell you right away how to fix it. "...several errors..." could be caused by a few things. Ron PiR Durand wrote: > Hi there! > > I use the webserviceconnector and have really no time to loose in my > project... > when I check my code, it's ok, but when I compile, mtasc doesn't "want to", > and tells me several errors in the MM code... > now it's in mx.data.binding.Binding... > where should I find a correct mx package, and is it a good solution to copy > it directly into the stp8 folder ? > thw > PiR > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de Nicolas Cannasse > Envoyé : mercredi 8 août 2007 12:29 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] Buggy class attributes > > Marc Reichelt a écrit : > >> Hi Nicolas, >> >> >>> There's always the following case that doesn't work : >>> >>> class A { >>> static var a = b; >>> static var b = a; >>> } >>> >>> Globals initialization order is still an open problem in programming >>> languages. There are tricks to sort the fields, but you can't guarantee >>> that everything will get initialized correctly, especialy if statics are >>> initialized with static function calls, it's impossible to track >>> dependencies. >>> >> The case you described is illegal, because there would be no traversal >> order (it would be infinite) - the Java compiler recognizes that. >> > > You can have more complex cases that uses static methods : > > class A { > static function init(flag) { > switch( flag ) { > case 1: return x; > case 2: return y; > default: return 0; > } > } > static var x = init(null); > static var y = init(1); > } > > That case is valid but you can't really know if it is until you execute > the code of the "init" method. It's also difficult to know from this > definition which order should be done. > > Nicolas > > -- MTASC : no more coffee break while compiling -- MTASC : no more coffee break while compiling |
|
|
RE: mtasc and mx package with MM errorsI've installed the mx patch (1.1) and it doesn't seem to change anything in
the WSDL.as class or any service class... maybe I did it wrong... it's amazing that we have to patch the original SOLD classes by such a big company... I still can't generate my project because of adobe/macromedia coders... :( any help about this mx package in flash CS3 is welcome ! I think it changed from the flash8 one. + PiR -----Message d'origine----- De : mtasc-bounces@... [mailto:mtasc-bounces@...] De la part de Ron Wheeler Envoyé : mardi 14 août 2007 20:04 À : MotionTwin ActionScript2 Compiler List Objet : Re: [mtasc] mtasc and mx package with MM errors If you are short of time, you might want to include the error message in your post just in case someone recognizes the source of the problem and can tell you right away how to fix it. "...several errors..." could be caused by a few things. Ron PiR Durand wrote: > Hi there! > > I use the webserviceconnector and have really no time to loose in my > project... > when I check my code, it's ok, but when I compile, mtasc doesn't "want to", > and tells me several errors in the MM code... > now it's in mx.data.binding.Binding... > where should I find a correct mx package, and is it a good solution to copy > it directly into the stp8 folder ? > thw > PiR > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de Nicolas Cannasse > Envoyé : mercredi 8 août 2007 12:29 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] Buggy class attributes > > Marc Reichelt a écrit : > >> Hi Nicolas, >> >> >>> There's always the following case that doesn't work : >>> >>> class A { >>> static var a = b; >>> static var b = a; >>> } >>> >>> Globals initialization order is still an open problem in programming >>> languages. There are tricks to sort the fields, but you can't guarantee >>> that everything will get initialized correctly, especialy if statics are >>> initialized with static function calls, it's impossible to track >>> dependencies. >>> >> The case you described is illegal, because there would be no traversal >> order (it would be infinite) - the Java compiler recognizes that. >> > > You can have more complex cases that uses static methods : > > class A { > static function init(flag) { > switch( flag ) { > case 1: return x; > case 2: return y; > default: return 0; > } > } > static var x = init(null); > static var y = init(1); > } > > That case is valid but you can't really know if it is until you execute > the code of the "init" method. It's also difficult to know from this > definition which order should be done. > > Nicolas > > -- MTASC : no more coffee break while compiling -- MTASC : no more coffee break while compiling |
|
|
Re: mtasc and mx package with MM errorssorry for me being no real help. but try google there are several
modified mx packages online. i think there is even one on osflas.org. greets, jan PiR Durand schrieb: > I've installed the mx patch (1.1) and it doesn't seem to change anything in > the WSDL.as class or any service class... > maybe I did it wrong... > it's amazing that we have to patch the original SOLD classes by such a big > company... > I still can't generate my project because of adobe/macromedia coders... :( > > any help about this mx package in flash CS3 is welcome ! I think it changed >>from the flash8 one. > > + > PiR > > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de Ron Wheeler > Envoyé : mardi 14 août 2007 20:04 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] mtasc and mx package with MM errors > > If you are short of time, you might want to include the error message in > your post just in case someone recognizes the source of the problem and > can tell you right away how to fix it. > "...several errors..." could be caused by a few things. > > > Ron > > PiR Durand wrote: >> Hi there! >> >> I use the webserviceconnector and have really no time to loose in my >> project... >> when I check my code, it's ok, but when I compile, mtasc doesn't "want > to", >> and tells me several errors in the MM code... >> now it's in mx.data.binding.Binding... >> where should I find a correct mx package, and is it a good solution to > copy >> it directly into the stp8 folder ? >> thw >> PiR >> >> >> >> -----Message d'origine----- >> De : mtasc-bounces@... >> [mailto:mtasc-bounces@...] De la part de Nicolas > Cannasse >> Envoyé : mercredi 8 août 2007 12:29 >> À : MotionTwin ActionScript2 Compiler List >> Objet : Re: [mtasc] Buggy class attributes >> >> Marc Reichelt a écrit : >> >>> Hi Nicolas, >>> >>> >>>> There's always the following case that doesn't work : >>>> >>>> class A { >>>> static var a = b; >>>> static var b = a; >>>> } >>>> >>>> Globals initialization order is still an open problem in programming >>>> languages. There are tricks to sort the fields, but you can't guarantee >>>> that everything will get initialized correctly, especialy if statics are >>>> initialized with static function calls, it's impossible to track >>>> dependencies. >>>> >>> The case you described is illegal, because there would be no traversal >>> order (it would be infinite) - the Java compiler recognizes that. >>> >> You can have more complex cases that uses static methods : >> >> class A { >> static function init(flag) { >> switch( flag ) { >> case 1: return x; >> case 2: return y; >> default: return 0; >> } >> } >> static var x = init(null); >> static var y = init(1); >> } >> >> That case is valid but you can't really know if it is until you execute >> the code of the "init" method. It's also difficult to know from this >> definition which order should be done. >> >> Nicolas >> >> > -- MTASC : no more coffee break while compiling |
|
|
RE: mtasc and mx package with MM errorshi Jan, and thnaks for your answer, but the patch I applied comes from
osflash... but it seems to be several differences between the flash8 mx package et the one from flash CS3... I must make several tests to see how it's possible to use mtasc with webservices for player 9 :( any other idee welcome regards, PiR -----Message d'origine----- De : mtasc-bounces@... [mailto:mtasc-bounces@...] De la part de jannerick Envoyé : mardi 14 août 2007 23:57 À : MotionTwin ActionScript2 Compiler List Objet : Re: [mtasc] mtasc and mx package with MM errors sorry for me being no real help. but try google there are several modified mx packages online. i think there is even one on osflas.org. greets, jan PiR Durand schrieb: > I've installed the mx patch (1.1) and it doesn't seem to change anything in > the WSDL.as class or any service class... > maybe I did it wrong... > it's amazing that we have to patch the original SOLD classes by such a big > company... > I still can't generate my project because of adobe/macromedia coders... :( > > any help about this mx package in flash CS3 is welcome ! I think it changed >>from the flash8 one. > > + > PiR > > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de Ron Wheeler > Envoyé : mardi 14 août 2007 20:04 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] mtasc and mx package with MM errors > > If you are short of time, you might want to include the error message in > your post just in case someone recognizes the source of the problem and > can tell you right away how to fix it. > "...several errors..." could be caused by a few things. > > > Ron > > PiR Durand wrote: >> Hi there! >> >> I use the webserviceconnector and have really no time to loose in my >> project... >> when I check my code, it's ok, but when I compile, mtasc doesn't "want > to", >> and tells me several errors in the MM code... >> now it's in mx.data.binding.Binding... >> where should I find a correct mx package, and is it a good solution to > copy >> it directly into the stp8 folder ? >> thw >> PiR >> >> >> >> -----Message d'origine----- >> De : mtasc-bounces@... >> [mailto:mtasc-bounces@...] De la part de Nicolas > Cannasse >> Envoyé : mercredi 8 août 2007 12:29 >> À : MotionTwin ActionScript2 Compiler List >> Objet : Re: [mtasc] Buggy class attributes >> >> Marc Reichelt a écrit : >> >>> Hi Nicolas, >>> >>> >>>> There's always the following case that doesn't work : >>>> >>>> class A { >>>> static var a = b; >>>> static var b = a; >>>> } >>>> >>>> Globals initialization order is still an open problem in programming >>>> languages. There are tricks to sort the fields, but you can't guarantee >>>> that everything will get initialized correctly, especialy if statics >>>> initialized with static function calls, it's impossible to track >>>> dependencies. >>>> >>> The case you described is illegal, because there would be no traversal >>> order (it would be infinite) - the Java compiler recognizes that. >>> >> You can have more complex cases that uses static methods : >> >> class A { >> static function init(flag) { >> switch( flag ) { >> case 1: return x; >> case 2: return y; >> default: return 0; >> } >> } >> static var x = init(null); >> static var y = init(1); >> } >> >> That case is valid but you can't really know if it is until you execute >> the code of the "init" method. It's also difficult to know from this >> definition which order should be done. >> >> Nicolas >> >> > -- MTASC : no more coffee break while compiling -- MTASC : no more coffee break while compiling |
|
|
Re: mtasc and mx package with MM errorshi there,
you are producing for flash9? why not use the flex sdk? mtasc doesn't support AS3, if i am not wrong... greets, jan PiR Durand schrieb: > hi Jan, and thnaks for your answer, but the patch I applied comes from > osflash... but it seems to be several differences between the flash8 mx > package et the one from flash CS3... > I must make several tests to see how it's possible to use mtasc with > webservices for player 9 :( > > any other idee welcome > > regards, > PiR > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de jannerick > Envoyé : mardi 14 août 2007 23:57 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] mtasc and mx package with MM errors > > sorry for me being no real help. but try google there are several > modified mx packages online. i think there is even one on osflas.org. > > greets, jan > > PiR Durand schrieb: >> I've installed the mx patch (1.1) and it doesn't seem to change anything > in >> the WSDL.as class or any service class... >> maybe I did it wrong... >> it's amazing that we have to patch the original SOLD classes by such a big >> company... >> I still can't generate my project because of adobe/macromedia coders... :( >> >> any help about this mx package in flash CS3 is welcome ! I think it > changed >>> >from the flash8 one. >> + >> PiR >> >> >> >> >> -----Message d'origine----- >> De : mtasc-bounces@... >> [mailto:mtasc-bounces@...] De la part de Ron Wheeler >> Envoyé : mardi 14 août 2007 20:04 >> À : MotionTwin ActionScript2 Compiler List >> Objet : Re: [mtasc] mtasc and mx package with MM errors >> >> If you are short of time, you might want to include the error message in >> your post just in case someone recognizes the source of the problem and >> can tell you right away how to fix it. >> "...several errors..." could be caused by a few things. >> >> >> Ron >> >> PiR Durand wrote: >>> Hi there! >>> >>> I use the webserviceconnector and have really no time to loose in my >>> project... >>> when I check my code, it's ok, but when I compile, mtasc doesn't "want >> to", >>> and tells me several errors in the MM code... >>> now it's in mx.data.binding.Binding... >>> where should I find a correct mx package, and is it a good solution to >> copy >>> it directly into the stp8 folder ? >>> thw >>> PiR >>> >>> >>> >>> -----Message d'origine----- >>> De : mtasc-bounces@... >>> [mailto:mtasc-bounces@...] De la part de Nicolas >> Cannasse >>> Envoyé : mercredi 8 août 2007 12:29 >>> À : MotionTwin ActionScript2 Compiler List >>> Objet : Re: [mtasc] Buggy class attributes >>> >>> Marc Reichelt a écrit : >>> >>>> Hi Nicolas, >>>> >>>> >>>>> There's always the following case that doesn't work : >>>>> >>>>> class A { >>>>> static var a = b; >>>>> static var b = a; >>>>> } >>>>> >>>>> Globals initialization order is still an open problem in programming >>>>> languages. There are tricks to sort the fields, but you can't guarantee >>>>> that everything will get initialized correctly, especialy if statics > are >>>>> initialized with static function calls, it's impossible to track >>>>> dependencies. >>>>> >>>> The case you described is illegal, because there would be no traversal >>>> order (it would be infinite) - the Java compiler recognizes that. >>>> >>> You can have more complex cases that uses static methods : >>> >>> class A { >>> static function init(flag) { >>> switch( flag ) { >>> case 1: return x; >>> case 2: return y; >>> default: return 0; >>> } >>> } >>> static var x = init(null); >>> static var y = init(1); >>> } >>> >>> That case is valid but you can't really know if it is until you execute >>> the code of the "init" method. It's also difficult to know from this >>> definition which order should be done. >>> >>> Nicolas >>> >>> > -- MTASC : no more coffee break while compiling |
|
|
RE: mtasc and mx package with MM errorsNo, I'm making a flash player 8 based application, that's why I can use
mtasc :) But the designers use Flash CS3 pro to make the interface and I'm coding on flashdevelop and use mtac to inject code in their FP8 swf... the fact is that the mx package seems to have been coded while watching TV or I don't know, but there are more errors in the mx original package than in our trainees' beginner's code... I can't find the way to tell mtasc to be more compliant with that... when I generate my code within flash IDE using [mypackage].core.main(_level0), everthing's ok... but when I try to make it with mtasc, I become the mx errors list :( ++ PiR -----Message d'origine----- De : mtasc-bounces@... [mailto:mtasc-bounces@...] De la part de jannerick Envoyé : mercredi 15 août 2007 13:55 À : MotionTwin ActionScript2 Compiler List Objet : Re: [mtasc] mtasc and mx package with MM errors hi there, you are producing for flash9? why not use the flex sdk? mtasc doesn't support AS3, if i am not wrong... greets, jan PiR Durand schrieb: > hi Jan, and thnaks for your answer, but the patch I applied comes from > osflash... but it seems to be several differences between the flash8 mx > package et the one from flash CS3... > I must make several tests to see how it's possible to use mtasc with > webservices for player 9 :( > > any other idee welcome > > regards, > PiR > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de jannerick > Envoyé : mardi 14 août 2007 23:57 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] mtasc and mx package with MM errors > > sorry for me being no real help. but try google there are several > modified mx packages online. i think there is even one on osflas.org. > > greets, jan > > PiR Durand schrieb: >> I've installed the mx patch (1.1) and it doesn't seem to change anything > in >> the WSDL.as class or any service class... >> maybe I did it wrong... >> it's amazing that we have to patch the original SOLD classes by such a >> company... >> I still can't generate my project because of adobe/macromedia coders... :( >> >> any help about this mx package in flash CS3 is welcome ! I think it > changed >>> >from the flash8 one. >> + >> PiR >> >> >> >> >> -----Message d'origine----- >> De : mtasc-bounces@... >> [mailto:mtasc-bounces@...] De la part de Ron Wheeler >> Envoyé : mardi 14 août 2007 20:04 >> À : MotionTwin ActionScript2 Compiler List >> Objet : Re: [mtasc] mtasc and mx package with MM errors >> >> If you are short of time, you might want to include the error message in >> your post just in case someone recognizes the source of the problem and >> can tell you right away how to fix it. >> "...several errors..." could be caused by a few things. >> >> >> Ron >> >> PiR Durand wrote: >>> Hi there! >>> >>> I use the webserviceconnector and have really no time to loose in my >>> project... >>> when I check my code, it's ok, but when I compile, mtasc doesn't "want >> to", >>> and tells me several errors in the MM code... >>> now it's in mx.data.binding.Binding... >>> where should I find a correct mx package, and is it a good solution to >> copy >>> it directly into the stp8 folder ? >>> thw >>> PiR >>> >>> >>> >>> -----Message d'origine----- >>> De : mtasc-bounces@... >>> [mailto:mtasc-bounces@...] De la part de Nicolas >> Cannasse >>> Envoyé : mercredi 8 août 2007 12:29 >>> À : MotionTwin ActionScript2 Compiler List >>> Objet : Re: [mtasc] Buggy class attributes >>> >>> Marc Reichelt a écrit : >>> >>>> Hi Nicolas, >>>> >>>> >>>>> There's always the following case that doesn't work : >>>>> >>>>> class A { >>>>> static var a = b; >>>>> static var b = a; >>>>> } >>>>> >>>>> Globals initialization order is still an open problem in programming >>>>> languages. There are tricks to sort the fields, but you can't >>>>> that everything will get initialized correctly, especialy if statics > are >>>>> initialized with static function calls, it's impossible to track >>>>> dependencies. >>>>> >>>> The case you described is illegal, because there would be no traversal >>>> order (it would be infinite) - the Java compiler recognizes that. >>>> >>> You can have more complex cases that uses static methods : >>> >>> class A { >>> static function init(flag) { >>> switch( flag ) { >>> case 1: return x; >>> case 2: return y; >>> default: return 0; >>> } >>> } >>> static var x = init(null); >>> static var y = init(1); >>> } >>> >>> That case is valid but you can't really know if it is until you execute >>> the code of the "init" method. It's also difficult to know from this >>> definition which order should be done. >>> >>> Nicolas >>> >>> > -- MTASC : no more coffee break while compiling -- MTASC : no more coffee break while compiling |
|
|
RE: mtasc and mx package with MM errors : FOUND !!Ok!
the way was long, but finally ok... the patch works finally, the problem was that I didn't have the remoting pack installed, and while I couldn't find the Flash CS3 remoting installer (adobe hasn't yet released it), it didn't work. the solution was given by osamwal on http://flash.mediabox.fr/index.php?showtopic=70894 For english people, while his post is in french, he made a Vista compatible patch to install the remoting package. For the XP users, simply copy all directories in the flash CS 3 app dir (programfiles/etc...) and in the data dir (doc&settings/etc...) Then the patch worked and I can now compile my webservices manager class ! Hey Adobe !! You made me loose half a day ! Should I send you my bill at request@... ?? or will you give me the flash 10 and flex 3 licences for free ;) bye list and thanks Nicolas for your gift to the flash community "faut qu'ça boulègue!" + PiR -----Message d'origine----- De : mtasc-bounces@... [mailto:mtasc-bounces@...] De la part de PiR Durand Envoyé : mercredi 15 août 2007 14:57 À : 'MotionTwin ActionScript2 Compiler List' Objet : RE: [mtasc] mtasc and mx package with MM errors No, I'm making a flash player 8 based application, that's why I can use mtasc :) But the designers use Flash CS3 pro to make the interface and I'm coding on flashdevelop and use mtac to inject code in their FP8 swf... the fact is that the mx package seems to have been coded while watching TV or I don't know, but there are more errors in the mx original package than in our trainees' beginner's code... I can't find the way to tell mtasc to be more compliant with that... when I generate my code within flash IDE using [mypackage].core.main(_level0), everthing's ok... but when I try to make it with mtasc, I become the mx errors list :( ++ PiR -----Message d'origine----- De : mtasc-bounces@... [mailto:mtasc-bounces@...] De la part de jannerick Envoyé : mercredi 15 août 2007 13:55 À : MotionTwin ActionScript2 Compiler List Objet : Re: [mtasc] mtasc and mx package with MM errors hi there, you are producing for flash9? why not use the flex sdk? mtasc doesn't support AS3, if i am not wrong... greets, jan PiR Durand schrieb: > hi Jan, and thnaks for your answer, but the patch I applied comes from > osflash... but it seems to be several differences between the flash8 mx > package et the one from flash CS3... > I must make several tests to see how it's possible to use mtasc with > webservices for player 9 :( > > any other idee welcome > > regards, > PiR > > > > -----Message d'origine----- > De : mtasc-bounces@... > [mailto:mtasc-bounces@...] De la part de jannerick > Envoyé : mardi 14 août 2007 23:57 > À : MotionTwin ActionScript2 Compiler List > Objet : Re: [mtasc] mtasc and mx package with MM errors > > sorry for me being no real help. but try google there are several > modified mx packages online. i think there is even one on osflas.org. > > greets, jan > > PiR Durand schrieb: >> I've installed the mx patch (1.1) and it doesn't seem to change anything > in >> the WSDL.as class or any service class... >> maybe I did it wrong... >> it's amazing that we have to patch the original SOLD classes by such a >> company... >> I still can't generate my project because of adobe/macromedia coders... :( >> >> any help about this mx package in flash CS3 is welcome ! I think it > changed >>> >from the flash8 one. >> + >> PiR >> >> >> >> >> -----Message d'origine----- >> De : mtasc-bounces@... >> [mailto:mtasc-bounces@...] De la part de Ron Wheeler >> Envoyé : mardi 14 août 2007 20:04 >> À : MotionTwin ActionScript2 Compiler List >> Objet : Re: [mtasc] mtasc and mx package with MM errors >> >> If you are short of time, you might want to include the error message in >> your post just in case someone recognizes the source of the problem and >> can tell you right away how to fix it. >> "...several errors..." could be caused by a few things. >> >> >> Ron >> >> PiR Durand wrote: >>> Hi there! >>> >>> I use the webserviceconnector and have really no time to loose in my >>> project... >>> when I check my code, it's ok, but when I compile, mtasc doesn't "want >> to", >>> and tells me several errors in the MM code... >>> now it's in mx.data.binding.Binding... >>> where should I find a correct mx package, and is it a good solution to >> copy >>> it directly into the stp8 folder ? >>> thw >>> PiR >>> >>> >>> >>> -----Message d'origine----- >>> De : mtasc-bounces@... >>> [mailto:mtasc-bounces@...] De la part de Nicolas >> Cannasse >>> Envoyé : mercredi 8 août 2007 12:29 >>> À : MotionTwin ActionScript2 Compiler List >>> Objet : Re: [mtasc] Buggy class attributes >>> >>> Marc Reichelt a écrit : >>> >>>> Hi Nicolas, >>>> >>>> >>>>> There's always the following case that doesn't work : >>>>> >>>>> class A { >>>>> static var a = b; >>>>> static var b = a; >>>>> } >>>>> >>>>> Globals initialization order is still an open problem in programming >>>>> languages. There are tricks to sort the fields, but you can't >>>>> that everything will get initialized correctly, especialy if statics > are >>>>> initialized with static function calls, it's impossible to track >>>>> dependencies. >>>>> >>>> The case you described is illegal, because there would be no traversal >>>> order (it would be infinite) - the Java compiler recognizes that. >>>> >>> You can have more complex cases that uses static methods : >>> >>> class A { >>> static function init(flag) { >>> switch( flag ) { >>> case 1: return x; >>> case 2: return y; >>> default: return 0; >>> } >>> } >>> static var x = init(null); >>> static var y = init(1); >>> } >>> >>> That case is valid but you can't really know if it is until you execute >>> the code of the "init" method. It's also difficult to know from this >>> definition which order should be done. >>> >>> Nicolas >>> >>> > -- MTASC : no more coffee break while compiling -- MTASC : no more coffee break while compiling -- MTASC : no more coffee break while compiling |
| Free embeddable forum powered by Nabble | Forum Help |