DeepLinkSerializer - _global :/

0 views
Skip to first unread message

peper

unread,
Oct 10, 2007, 3:56:57 AM10/10/07
to Gugga Flash Framework
Hi.
I couldn't make rowser history work. I was browsing gugga code to find
out what is necessary for BrowserHistoryManager. And in
DeepLinkSerializer I found someting like this.

var applicationController : ApplicationController =
ApplicationController(_global["ApplicationController"]);

I removed global variable, beacause I didn't need it. I had no idea it
could affect some functionality. I read the TODO note in
DeepLinkSerializer and I understand that it's temporary but I think
there should be note about it somewhere.

Branimir Angelov

unread,
Oct 10, 2007, 1:59:10 PM10/10/07
to gug...@googlegroups.com
For now the DeepLinksSerializer class is implemented as a static class
and it needs access to the ApplicationController instance in order to
determine the current section path. The 'Singleton' implementation (this
is not a classic and full realization of Singleton design pattern) of
the ApplicationController class is done by the following code in its
constructor:

function ApplicationController()
{
super();
_global.ApplicationController = this;
}

So the DeeplinksSerializer and NavigationCommand by default search for
this variable to access the ApplicationController. The reason for this
strange implementation is that in some very specific cases you need to
access the ApplicationController class in 'duck typing' manner in order
to avoid importing the concrete class or even ApplicationController
class. This approach will be changed in the next release, but for now
please keep this _global variable.

The current implementation of DeepLinksSerializer class is temporary,
and in the next release it will be reimplemented in the way as it is
specified in the TODO comment over the class.

We are sorry for this inconvenience and we will comment this issue on
the GuggaFF site (http://www.gugga.com/GuggaFlashFramework/).

Thanks,
Branimir, Gugga Team

Reply all
Reply to author
Forward
0 new messages