How to load different modules in moduleLoader - some with other without unload?

Ok so I've read a lot about modules and I decided to build a site where I have a button bar menu and a single moduleLoader, where all of my pages are separate modules. Some of the modules will be preloaded with moduleManager technique so they will be in memory and should pop up instantly and others should be unloaded since they will be used rarely. Imagine you have 50 pages, 45 of them use the same 3 modules and the rest 5 use 5 other modules.
So I need 2 things:
1) those 3 modules preloaded (loaded into memory) and then used - this is not a problem. In the change handler of the button bar I just set the url of the moduleLoader=""; and right after that line I put moduleLoader.url = "module1.swf" for example. This way the ready event fires everytime I change the selected button of the buttonBar and since the module is loaded into memory it changes immediately, which is great.
2) I need the rest 5 modules that are not preloaded, to be loaded by the moduleLoader and when the user clicks on another button, the module to be unloaded and the new module for the new selected button to be loaded on it's place. So here unloading of the old module and loading of the new one should happen with 1 user interaction - clicking a button. How do I do that?
I am asking this because I found out that there is some difference when the module has been preloaded or not which changes the way it unloads. Also in certain cases if a module has been unloaded once and loaded again it stops shooting the unload event by only changing the moduleLoader.url and then you have to specifically call moduleLoader.unloadModule() function to get it called.
And all of this brought me to the idea that maybe the only way to make this work for case 2 is having moduleLoader.unloadModule(); and on the next line after it moduleLoader.url = "newModuleUrlHere";
But then I bumped into a problem with flickering in my buttonBar selected button transition which I describe and give online example of here:
http://forums.adobe.com/thread/760347?tstart=0
So is there any technique of combining preloaded modules which should not be unloaded + the ones who need to be loaded and unloaded and all of this to be working with just one moduleLoader instance?
I really didn't expect to have so much trouble with modules... If no one can suggest me a working example I will post each case I described here to help me get resolution to this cause I can't get on with my project and it's very important.
Thanks in advance!

Hi thanks for the reply here too
I agree it totally makes sense if I do not unload modules to load them in the same application domain and not as a child. This way I wouldn't have to worry about the singletons I could have forgotten to initialize in the main application If my logic is correct. But still is it wrong to leave them in a child ApplicationDomain since I will still have modules I will need to unload and I would still have to be careful about the singleton managers?
Note: have in mind I am trying to separate the module's from the main application, so the application won't use any classes defined in the modules since it won't be aware of what's in what module.
Yes, I do have a buttonBar buttons which map to module urls.
Ok I will try to setup my questions in a few very simple example applications, it would be easier for you to understand what's confusing me.
http://filip.nedyalkov.net/moduleLoaderTesting2/ - view source enabled - look at testing3.mxml
In the button bar change handler I have:
moduleURL = buttonBar.
selectedItem.url;moduleLoader.url = moduleURL;
and I listen to the moduleLoader unload event.
On the Unload Current Module Button I have: moduleLoader.unloadModule();
Ok what is confusing me is this: When I start switching between module1 and module2 do they automatically get unloaded because I recall reading that changing the moduleLoader.url property doesn't unload the module just releases it? Also I'm getting the unload event shoot very strange because if I am on module1 and then click on module2 it doesn't shoot that module1 was unloaded, it doesn't do anything. As soon as I click back on module1 then it shoot unloaded (you can see that in my example in the text area).
Another strange thing is that while doing this, everytime you click on module1 or module2 they get transferred over the network I can see that in mozilla firebug. Now if I am on module1 and click the Unload Current Module button the module really gets unloaded and then the unload event is correct and shoot when it's supposed to shoot. Now if you click on module2 and then come back to module1 it will get loaded again, but now it will be put in memory, it won't shoot unload event any more and it won't get transferred over the network when I switch the modules? Why is that ? All I did was unloading the module once and it changes everything.
So I hope you undertstand this cause I have no idea is this supposed to work this way? Would you be so kind to explain me this behaviour ?
Thanks!

Similar Messages

  • How do I share photos in I photos with other users on the I mac

    How do I share photos in I photos with other users on the I mac

    iPhoto: Sharing libraries among multiple users

  • How to load different html files in one page in order to load them without leaving the main stage?

    Hello,
    I'm new with edge animate, but i fell in love with it.
    I'd like to know, is it possible to load different html pages dynamically in the main stage in order to avoid the preloader to be load?
    I can figure out how to save all the pages of the site, but i can't merge them in a continuous animated browsing experience.
    As sample.
    I've got a index.html and home.html, how to switch form index to home without having a clear division between the two pages?
    I can place all the animations within a file and this will allow me to have a continuous surfing experience but it won't generate specific and google indexable pages within the site.
    Example, index.html will generate www.mysite.com, home will generate www.mysite.com/home. How ho switch dinamically between them and integrate them in a unique fading experience?
    Thanks in advance for any help. I'm a newby, but i would like to learn.
    Fea.

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • How to load kernel module before another kernel module?

    I have an Iomega ZIP 100 parallel port drive and need module imm to be loaded before lp module. But I don't know how to do this. Simple adding these modules in rc.conf in MODULES section in the correct order doesn't work. I also realized that udev loads lp module, but I don't know how to make udev load this module before or after other modules.
    Last edited by kotyz (2007-06-24 13:58:15)

    or in /etc/mkinitcpio.conf :
    # MODULES
    # The following modules are loaded before any boot hooks are
    # run.  Advanced users may wish to specify all system modules
    # in this array.  For instance:
    #     MODULES="piix ide_disk reiserfs"
    MODULES=""
    and make a new initrd image with mkinitcpio -g /boot/newkernel26.img ,edit menu.lst and reboot

  • How to load data from file contains rows with different number of columns

    hi all,
    a data file contains assets data ordered like this(location_id
    serial_number , quantity
    serial_number , quantity
    single column rows represents location, and two columns rows represents asset details for that location
    123
    12345 ,1
    32145 ,1
    124
    12348 ,12
    41239 ,22
    54189 ,2
    254
    22419 ,1
    I want to use sql loader to load these data after merging locations with thieir assets,like this order(location_id,serial number,quantity)
    123 ,12345 ,1
    123 ,25413 ,1
    123 ,32145 ,1
    124 ,12348 ,12
    124 ,41239 ,22
    124 ,54189 ,2
    254 ,22419 ,1
    Can one help me in that?
    thank you,

    Create external table and code sql query to do it.
    :p

  • How to download a module pool program along with its screens ,includes etc

    Hello Experts,
    How can I  download a module pool program along with its screens ,includes etc to my presentatio0n server and then upload it back when needed.
    When  I searched , I got a program which is satisfying my partial requirement because it only downloads
    the module pool program first(ie.just the main program)  and then the include needs to be downloaded to the system separately.Screen and statuses wont be downloaded.
    Is there a way to download all the objects for the corresponding program store in some format and then upload it back when required.
    Please Help.

    Hello,
    Go to the layout of the modulepool to be uploaded or downloaded. choose the menu path utilities->upload/download.
    The same file which is downloaded can be used to upload
    1.the screen flow logic and
    2.layout
    Using this you can upload as well as download
    Cheers,
    Vasanth

  • How to load a image after getting it with a file chooser?

    I'm still starting with JavaFX, and I simply would like to know how to load the image (e.g. png or jpg) that I selected using a FileChooser in the user interface. I can access the file normally within the code, but I'm still lost about how to load it appropriately. Every time I select a new image using the FileChooser, I should discard the previous one and consider the new one. My code is shown below:
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.layout.HBox;
    import javafx.scene.control.Button;
    import javax.swing.JFileChooser;
    import javafx.scene.image.ImageView;
    import javafx.scene.image.Image;
    var chooser: JFileChooser = new JFileChooser();
    var image;
    Stage {
        title: "Image"
        scene: Scene {
            width: 950
            height: 500
            content: [
                HBox {
                    layoutX: 670
                    layoutY: 18
                    spacing: 10
                    content: [
                        Button {
                            text: "Open"
                            action: function() {
                                if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(null)) {
                                    var imageFile = chooser.getSelectedFile();
                                    println("{imageFile.getCanonicalFile()}");
                                    image = Image{
                                        width: 640
                                        url:imageFile.getAbsolutePath()
                // Image area
                Rectangle {
                    x: 10
                    y: 10
                    width: 640
                    height: 480
                    fill: Color.WHITE
                ImageView {
                    x: 10
                    y: 10
                    image: bind image
    }Thank you in advance for any suggestion to make it work. :)

    As its name implies, the url param expect... an URL, not a file path!
    So, use {color:#8000FF}url: imageFile.toURI().toURL(){color} instead.

  • How to save a Module in Visual Basic with Excel for Mac 2011

    On the MS support pages it shows how to create a module that will turn digits into written words:
    http://support.microsoft.com/kb/213360/en-us
    so if you enter $32.50 it will convert it to Thirty-Two Dollars and 50 cents. Perfect for batch payroll work!
    Using Excel for Mac I open the Visual Basic editor (which I clearly know nothing about!), paste in the text provided by Microsoft and it works perfectly.
    BUT... if I close that workbook that module is gone.  I can't use it again in the next workbook.  Surely there's a simple way to save the module so it is available in all future workbooks... yes?  This one has stumped several MS techs so far.

    Hi,
    I have no Excel for Mac, so I can't test this issue .
    Did you save the Excel workbook as Excel Macro-Enabled workbook(*.xlsm)?I guess Excel would prompt you if you want to save the VBA code when you close the workbook.
    Wind Zhang
    TechNet Community Support

  • How to use different wallpapers on multiple monitors with Linux

    Umm...ok. I use XFCE4 as my DM. It allows me to have a different wallpaper on each desktop.
    Though I'm not interested in other DMs, what DMs would require that I use this third party tool?

    If you have multiple monitors and run Linux, you may want to display different images as your wallpaper on each monitor. There's a utility for that – Nitrogen. The blackMORE Ops blog has a nice how-to on getting Nitrogen and configuring it, with step-by-step instructions and plenty of screenshots.
    This topic first appeared in the Spiceworks Community

  • How to synchronise IMAP address book in Thunderbird, with or without Kolab?

    I am setting up an IMAP account on my website's email, to use as webmail and on 2 laptops. As far as I can see, IMAP promises much but crucially fails to deliver. It does a great job syncing the emails in the three locations, but it is worse than useless having 3 separate address books all out of sync.
    The TB docs mention the SyncKolab add-on to sync the address books. But this is complex and frustrating. If it works at all, I can't puzzle out how.
    What syncKolab seems to do is to set up a new folder of the server called "contacts" and to place a message-form record in that folder for each address in the laptop address book. What good does that do me ...? Does this solve the problem in some way I'm not seeing? What I need is that the actual address book on the server contains the addresses on the laptops, and vice versa. I don't get it, how the server fold which Kolab creates, helps me. The server address book is not updated.
    I do not need calendar or task sync, just address book.
    With or without SyncKolab; indeed, with or without Thunderbird! how do I sync the address book on my IMAP server with my laptops?
    Many thanks
    Andy

    looking at the add-on, the idea is simple, use an imap folder for address book data, very similar to what Yahoo does with the Y!Messages folder to store their chat clients archived messages.
    install the add-on in two different Thunderbird installations and it uses that folder to synchronize the address book.
    These instructions look simple. http://www.gargan.org/en/Mozilla_Extensions/SyncKolab/Installation/
    All that would be left would be to modify the account in Thunderbird not to show that folder so it is not a distraction.

  • How do I share address book and calendars with other iCloud users?

    I guess the title of the discussion question says it all.
    My wife, and other family members want to SHARE Contacts, Calendars etc... with other iCloud users.
    Simple task... most people would want to do it...
    But... I can't find an easy answer... how do I do it?

    Roger, thanks... I had continued my search and found this information on the discussion.
    Now, my biggest concern is the ADDRESS BOOK... I'd like to publish, specific GROUPS within my master Address Book to other iCloud users... with either Read Only, or Read Write permisions.
    Do you have any knowledge or suggestion on how that can be accomplished in iCloud?
    It seems as though this would be FOUNDATIONAL in iCloud if APPLE expects it to be a USABLE SERVICE.
    Thanks for your help...

  • How can i share my admin user contacts with other users

    I have sat in front of my computer for 2 days now and still cant work our how to share my contact book with other users on the same macbook air, can anyone help?

    I have just found out for myself finally, I added my icloud account to his emails and just unticked the mail option and the contacts appeared as if by magic.
    Hopefully if anyone else has this problem they will see this answer

  • HT1199 How to make sure Mavericks will be compatible with other older software?

    What are the steps, prior to updating from Snow Leopard to Mavericks, to prevent conflicts with other, older software?

    This tells you how to find PPC programs, which wil not run on OS X 10.7 or greater: https://tidbits.com/article/12156

  • How to load VI module into UI

    Hello,
    On some test applications there is only 1 monitor for the user. As a result the UI and any steps that require a VI front panel to be shown must share the same monitor. If I don't want overlapping front panels (ie. UI and step VI front panels) then I must be careful with front panel positioning, sizing etc. Also there is the possibility of users moving front panels around thereby causing overlapping and/or hidden front panels. I know that I can remove basically everything from the front panel window (title bar, menu etc) of the VI module step to stop the user from creating an overlapping window situation.
    My question:
    With TestStand 4.0.1 and LabVIEW 8.5.1 is there a way for a VI module step to load the VI into the UI? Maybe the UI has a "designated subpanel" control that is used to show the front panel of the VI module step or something of this nature. By doing this there is only one window for the user to deal with and I only have to be concerned about the size of the loaded VI and the subpanel on the UI.
    Does this sound like a possibility?
    thanks,
    Glen

    Glen,
    TestStand or the default UIs do not supply your requested feature. And i am sure that your approach is not the best. Nevertheless, you CAN solve such approaches. But to have it to do yourself....
    The key for this is to understand the way how TestStand communicates with the UI. This is done by the UIMessages. You can use an UIMessage to load and include the VIs Frontpanel into your UI.
    The better solution would be to have all controls and indicators you have to use already within your UI. You can then easily update these by either using VI Server or using the UIMessages....
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to load different certificates in a keystore for mail sender adapter

    Hi,
    we are getting mails from different partners. Some have digital signatures others not.
    Now we wanna verify the mails with digital signatures.
    My problem is, that we have to enter the "keystore" and the "keystore entry" in the sender agreement - but the mail partners have different CAs (e.g. Verisign,....).
    Is it possible to collect all certificates of our partners in one keystore?
    How can we handle the problem?
    Thx a lot!
    regards
    Wolfgang

    Hi,
    we are getting mails from different partners. Some have digital signatures others not.
    Now we wanna verify the mails with digital signatures.
    My problem is, that we have to enter the "keystore" and the "keystore entry" in the sender agreement - but the mail partners have different CAs (e.g. Verisign,....).
    Is it possible to collect all certificates of our partners in one keystore?
    How can we handle the problem?
    Thx a lot!
    regards
    Wolfgang

Maybe you are looking for

  • Lost iTunes iPhone info (restore help please)

    hi all. i got a prompt when downloading a free pdf reader that i had a "new" or "altered" iPhone on my MacBookPro and i told the prompt to use the newer version and then it told me that it could not download (i think) because there was no iphone or s

  • Saving PDF forms in Adobe Reader 8 and below

    Hi everyone, I've created a PDF form for a survey using Acrobat XI Pro, and I've also Save As Other > Reader Extended PDF > Enable More Tools (includes form fill-in and save). I've tried it on Reader 9, X and XI, and I'm able to fill out the form, sa

  • Movies on networked server stuttering on playback

    I'm using Mac Mini with a Core Solo processor as a media center. I have all my movies stored on a PowerMac G4 in another location in the house. Both systems have Gigabit ethernet ports and are connected with Cat 5e cable using a Gigabit switch. I hav

  • FS10N drilldown difference

    Hello All, we have pervious postings in G\L account 10000000, priviously it is not "Line item Managed" and was now change to "Line item Managed". We already run program RFSEPA01 generate line item retoactively from the documents that were already pos

  • SRM - MDM Catalog: Price Variation by Plant

    Dear Experts, My client is seeking to implement SRM 5.0 with MDM-Catalog to interface with their existing R/3 4.7 backend. Due the nature of their business, the price paid for an item can vary according to plant (as can rebate entitlement, etc). Can