Here's a question:
LZX tries to be very forgiving, not burden the LZX programmer with access
control, etc., so we don't have a way to specify these modifiers in LZX.
Should we? Or should we just make everything public all the time, for
compatibility with our other runtimes? I lean toward the latter, unless it
will impact performance somehow, but I'm open to suggestions.
Another idea: to be able to say something like:
<class name="...">
<passthrough when="$as3" placement="class">
public
</passthrough>
?
On 2010-07-18, at 17:40, André Bargull wrote:
> 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
>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>>:
>> >/ 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.
>> Seehttp://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
>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>>:
>> />>>/ 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
>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>> 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
>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>>:
>> />>>>>/ swf10
>> />>>>>/
>> />>>>>/ 2010/7/18 Henry Minsky<henry.minsky at gmail.com
>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>>:
>> />>>>>>/ which runtime are you using (swf8 ,swf10, or dhtml?)
>> />>>>>>/
>> />>>>>>/ On Sun, Jul 18, 2010 at 10:04 AM, cem sonmez<cemosonmez at
>> gmail.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>>
>> />>>>>>/ 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
>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>
>> />>>>>>/
>> />>>>>>/
>> />>>>>>/
>> />>>>>/
>> />>>>>/
>> />>>>>/
>> />>>>>/ --
>> />>>>>/ Cem SONMEZ
>> />>>>>/
>> />>>>/
>> />>>>/
>> />>>>/
>> />>>>/ --
>> />>>>/ Cem SONMEZ
>> />>>/
>> />>>/
>> />>>/
>> />>>/ --
>> />>>/ Henry Minsky
>> />>>/ Software Architect
>> />>>/ hminsky at laszlosystems.com
>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>
>> />>>/
>> />>>/
>> />>>/
>> />>/
>> />>/
>> />>/
>> />>/ --
>> />>/ Cem SONMEZ
>> />>/
>> />/
>> />/
>> /
>>
>>
>> --
>> Cem SONMEZ
>>