[flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Haykel BEN JEMIA
Hi, I have a Flex 4 application that loads modules dynamically. The modules load style files dynamically based on their configuration files, so that every module can load different style files. If multiple instances of a module are created (with multiple ModuleLoader instances having the same

Re: [flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Alex Harui
A module is a factory for multiple instances of a class(es). Type selectors map to a class. Per-instance styles are often done with class selectors via the styleName property On 7/1/10 9:37 AM, Haykel BEN JEMIA hayke...@gmail.com wrote: Hi, I have a Flex 4 application that loads

Re: [flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Haykel BEN JEMIA
Hi Alex, ok it's clear with the factory. But how can I handle the following scenario with class selectors : Module 'MyModule': * Module has a button with style name 'myButton' * Module gets a url for a style file from main application and loads it with styleManager.loadStyleDeclarations(mystyle)

Re: [flexcoders] Multiple instances of a module with different styles

2010-07-01 Thread Alex Harui
Basicallly, you can’t do exactly that because you are still trying to use type selectors (Button is a type selector). Also, I don’t think you can load two CSS style SWFs with the same selector name/path. One thing you can do is to define class selectors in each style module with a computable