This is the second time that you are saving my hours Andre, thanks a lot :) The first one was about the determine placement issue of the class object. I used the second approach and everything seems working fine now. And thanks all of you for these valuable informations. Best regards
2010/7/19 André Bargull <[email protected]>: > Tucker seems to be right about his idea that the public namespace modifier > added in debug builds is related to this issue. > > The callback object (SharedObject#client) is set to the <sharedObject> > instance in l. 74, so all callback methods are now invoked on that > <sharedObject> instance. That means whenever this.so.send("write", ...) > (l.31 ff.) is called, the "write" method on the <sharedObject> instance > should be called. And just as explained by Tucker, in non-debug builds the > ActionScript class and all its methods which are generated for the > <sharedObject> class are not in the public namespace. But apparently this > seems to be required for SharedObject callback objects. > > Most important question for you: How to workaround this issue? > > 1) Add an intermediate object: > var that = this; > this.so.client = { > write: function (msg) { > that.write(msg); > } > }; > > 2) Custom script class with explicit public namespace modifiers: > <script when="immediate"> > public class SharedObjectMediator { > var client; > public function SharedObjectMediator (client) { > this.client = client; > } > public function write (msg) { > this.client.write(msg); > } > } > </script> > > this.so.client = new SharedObjectMediator(this); > > > Disclaimer: Both approach are untested, but I think they should work. > > > - André > > > Forgive my inexperience but is your suggestion to make some classes as > public to work out this problem? If it is, how to do that in OL? > I checked out the report, but to be honest donT know how to do with it, > sorry? > Do you have any suggestion on the test case that I posted before? > Thanks in advance > Regards > > > 2010/7/18 P T Withington <ptw at pobox.com>: >> Here is one difference: >> >> In Debug mode, the compiler will prefix all class declarations with >> 'public' to make introspecting your program easier. In normal mode, this >> declaration will not be there. >> >> It seems possible that there is some class declaration where you need to >> add a 'public' modifier to make your program work without debug mode? >> >> [This is really a bug in the compiler, it should try not to perturb the >> user program in debug mode, but some changes are necessary to make debugging >> useful. It may be that we no longer need this addition of the public >> modifier, as André has fixed many of the places where the debugger depended >> on that by using a different Flash API to do the introspection. See >> http://jira.openlaszlo.org/jira/browse/LPP-7034] >> >> On 2010-07-18, at 12:43, cem sonmez wrote: >> >>> 2010/7/18 Henry Minsky <henry.minsky at gmail.com>: >>>> Are you running using the debug version of the Flash player installed >>>> ? >>>> When you run the app in non-debug mode, does >>>> it display an errors in a pop up dialog window? >>> >>> Yes I am using the flash debug player and there is not any pop up >>> during the runtime. >>> The problem is about the visibility of the shared object on debug or >>> non-debug mode. Opened two browser window and one application was >>> running in debug mode and another was running in non-debug mode. >>> Message that is being sent by the application in non-debug mode, is >>> being shown by the application in debug mode. >>> Did you have any time to try the code that I attached. Does it also >>> repeat on you? >>> Thanks >>> >>>> On Sun, Jul 18, 2010 at 10:46 AM, cem sonmez <cemosonmez at gmail.com> >>>> wrote: >>>>> >>>>> I wrote a test, please give a try with it and let me know how it goes. >>>>> Application attempts to connect a server application named "fi6en", >>>>> you can change it from the code. >>>>> Waiting for your replies. >>>>> Thanks. >>>>> Regards >>>>> >>>>> >>>>> 2010/7/18 cem sonmez <cemosonmez at gmail.com>: >>>>>> swf10 >>>>>> >>>>>> 2010/7/18 Henry Minsky <henry.minsky at gmail.com>: >>>>>>> which runtime are you using (swf8 ,swf10, or dhtml?) >>>>>>> >>>>>>> On Sun, Jul 18, 2010 at 10:04 AM, cem sonmez <cemosonmez at >>>>>>> gmail.com> >>>>>>> wrote: >>>>>>>> >>>>>>>> Hi all, >>>>>>>> I have a weird problem. >>>>>>>> If I run the lzx appliation like "Application.lzx?debug=true", >>>>>>>> shared >>>>>>>> object operations is being seen properly by all the clients that is >>>>>>>> connected to the shared object. >>>>>>>> But if I disable "debug", operations on the shared object is not >>>>>>>> being >>>>>>>> seen. >>>>>>>> At first I thought that this might be bec. of the lines without >>>>>>>> checking if debug is enabled, so I removed all the Debug lines. But >>>>>>>> no >>>>>>>> way, the same result. >>>>>>>> As I said before, if I enable debug, everthing seems fine >>>>>>>> If any of you have any idea about this issue, please let me know how >>>>>>>> you >>>>>>>> did it. >>>>>>>> Thanks in advance >>>>>>>> Best regards >>>>>>>> >>>>>>>> -- >>>>>>>> Cem SONMEZ >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Henry Minsky >>>>>>> Software Architect >>>>>>> hminsky at laszlosystems.com >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Cem SONMEZ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Cem SONMEZ >>>> >>>> >>>> >>>> -- >>>> Henry Minsky >>>> Software Architect >>>> hminsky at laszlosystems.com >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Cem SONMEZ >>> >> >> > > > > -- > Cem SONMEZ > > -- Cem SONMEZ
