0 Replies Latest reply on Oct 12, 2012 10:45 AM by Gary Miller

    Native Controls in RhoStudio

      I just completed watching a video of a Webinar, conducted by Brian Moore, that described applying Native Controls in Rhodes to create a NavBar, TabBar and Date / Time. The webinar was using command line to generate the app and a text editor to change the files and and looked nothing like RhoStudio that I have been using.  On a test app that I created I just tried to apply the same coding to the same file that the webinar used to create a NavBar with no result (see below the application.rb file @default_menu).  The RhoSimulator looked the same before and after I added the @default_menu to the application.rb file.

       

      Are Native Controls available in RhoStudio? 

      Is there something else I need to do to activate them?

       

      require 'rho/rhoapplication'

       

      class AppApplication < Rho::RhoApplication

        def initialize

          # Tab items are loaded left->right, @tabs[0] is leftmost tab in the tab-bar

          # Super must be called *after* settings @tabs!

          @tabs = nil

          #To remove default toolbar uncomment next line:

          #@@toolbar = nil

          super

         

          @default_menu = {

                "Home"  => :home,

                "Book"  => "/app/BookInventory"

              }

       

          # Uncomment to set sync notification callback to /app/Settings/sync_notify.

          # SyncEngine::set_objectnotify_url("/app/Settings/sync_notify")

          SyncEngine.set_notification(-1, "/app/Settings/sync_notify", '')

        end

      end

       

      Thanks,

       

      Gary