Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

Transfer Menu Bar?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transfer Menu Bar?

    Is there any way to move the menu bar data from project to project?

  • #2
    In what way?

    You could use Application.GetMenu and Application.SetMenu . . .

    Or do you mean from within the DE?

    Comment


    • #3
      In the design environment.... for example, if the same menu will be used across multiple projects. It would be nice to be able to apply the menu data from "project 1" to the menu bar in the existing "project 2"....

      Comment


      • #4
        Make the script an external text (lua) file and use Application.LoadScript....or am I misunderstanding you?
        Regards,

        -Ron

        Music | Video | Pictures

        Comment


        • #5
          You can copy and paste menu structures between projects. Right-click on a node and select Copy.

          Comment


          • #6
            This depends on how you create the menus. I was fixated at creating the menus at runtime, but, either way
            Regards,

            -Ron

            Music | Video | Pictures

            Comment


            • #7
              Ah. Nodes are fine... but no entire menu copy option at this time?

              Maybe one for the suggestion box...

              Comment


              • #8
                I created a Menu Bar template that set the bar up for using a minimize and exit menus on the far right. Then, when I know I am going to start a project with a menu bar, I open the bar template project, save as the NEW project name I want. Then just +/- menus as I need to keep the formating correct with the # of menus and size of window. You have to do a Preview to see the format correctly.
                If anyone wants it, here is the apz. it took about 30 minutes to set it up the first time.
                Attached Files
                Last edited by Roboblue; 09-30-2005, 02:02 PM.

                Comment


                • #9
                  Script?

                  rhosk
                  Could you give an example of the script for a menu bar for creating at runtime?
                  Is there a way to export just the menubar script once the project has been created?

                  Comment


                  • #10
                    I open the bar template project, save as the NEW project name I want
                    I would do that too, except I wanted to transfer a newly created menu to an existing project.

                    Comment


                    • #11
                      AXXESS,

                      Use an Application.GetMenu action (in your new project with the menu you want) to save your menu to a text file (Use a TextFile.WriteFromTable action).

                      Then, use an Application.SetMenu action (in your existing project you want to add the menu to) to set the menu to the structure you created in your new app (use a TextFile.ReadToTable action to get the data from the text file to a table).

                      Would that work for you?

                      Desmond.

                      Comment


                      • #12
                        That'll work...

                        I'm just coming from the ctrl-c and ctrl-v school....

                        Comment


                        • #13
                          Runtime Menu Example

                          Originally posted by Roboblue
                          rhosk
                          Could you give an example of the script for a menu bar for creating at runtime?
                          Is there a way to export just the menubar script once the project has been created?
                          This is just another way to do it. Thanks to "Dermot" for a technical issue I had There's an example in the Help Guide, but I expanded on it a bit. I just like the idea of editing one script (or use it across projects, as requested in the first post). Doesn't require that the "Menu Bar" be activated under settings. The code could probably be cleaned up, but it works
                          Attached Files
                          Regards,

                          -Ron

                          Music | Video | Pictures

                          Comment


                          • #14
                            Good deal Rhosk
                            Thanx

                            Comment


                            • #15
                              Since copying and pasting a node works, create a temporary root node, make everything in the menu subordinate to that, and then copy and paste the root node.

                              Tip: if you want to preserve the clipboard data for use in another project, paste it into a text file. Then you can just copy that text into the menu editor.

                              Once you've copied the menu, move the original menu items out of the root menu (back to their original positions) and then delete the root node.
                              Attached Files
                              --[[ Indigo Rose Software Developer ]]

                              Comment

                              Working...
                              X