Announcement

Collapse
No announcement yet.

Show version in app

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

  • Show version in app

    Hi,

    I think it is not new, but I cannot find answer...

    Is it possible to show release version of application by default?

    I think this:
    SC allows to increment version (Project => Increment Version). Is it possible to show this Version number to end-user? Or I need to re-set version number by myself?

    Thanks!

  • #2
    Simple.

    In the onApplicationInit event of your login app, add the following line:

    [version] = $this->nm_app_version;

    Make sure that you set the Application->Global Variable entry for "version" to Session and Out.

    Now you can use [version] in any app's header, etc.

    Dave
    Dave Prue
    Code Whisperer
    Lahar International Corp
    www.lahar.net

    Comment


    • #3
      Dave

      If I try that I get a popup when the login app displays:

      ERROR
      Undefined property: sec_Login_apl::$nm_app_version

      Any ideas? Looked through generated code and it all looks good - and I confirmed the sc variable is correct in the session data....

      Comment


      • #4
        Is this helpful?

        http://scriptcase.aducom.com/cms/e10....php?0.cat.6.8
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Perfect, thanks Allbert.

          Didn't realise I would need to instantiate a new object of the login form

          :-)

          Comment


          • #6
            Originally posted by daveprue View Post
            Simple.

            In the onApplicationInit event of your login app, add the following line:

            [version] = $this->nm_app_version;

            Make sure that you set the Application->Global Variable entry for "version" to Session and Out.

            Now you can use [version] in any app's header, etc.

            Dave
            This is the issue that I have with ScriptCase - where is this officially documented ? It certainly is not documented in the help or any other document I have downloaded from NetMake.
            If there is another source of information save an except for going through the generated code, please tell us.

            ... and thanks for the information Dave. It is useful for me too.

            Comment


            • #7
              Originally posted by Sean H. View Post
              This is the issue that I have with ScriptCase - where is this officially documented ? It certainly is not documented in the help or any other document I have downloaded from NetMake.
              If there is another source of information save an except for going through the generated code, please tell us.

              ... and thanks for the information Dave. It is useful for me too.
              Is not officially documented because are community contributions AFAIK. You can learn a lot of tricks looking at generated code, and forums are full of priceless snippets.

              I wanted to create a little app to collect and query for them, but as always time is a problem. Maybe I will try to try to get some time and do it this weekend.
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment


              • #8
                Originally posted by adz1111 View Post
                Perfect, thanks Allbert.

                Didn't realise I would need to instantiate a new object of the login form

                :-)
                You do not need to do an instantiation. The object already exists.

                If the code that I gave you is generating an error, then try this:

                [version] = $this->Init->nm_app_version;

                It depends on your scriptcase version and which event you are running in as to what "$this" represents in a particular script.
                It is handy to do a "var_dump($this)" and then look through the generated source to find some of the interesting properties & methods for a particular class of object.

                Dave
                Dave Prue
                Code Whisperer
                Lahar International Corp
                www.lahar.net

                Comment


                • #9
                  Originally posted by daveprue View Post
                  You do not need to do an instantiation. The object already exists.

                  If the code that I gave you is generating an error, then try this:

                  [version] = $this->Init->nm_app_version;

                  It depends on your scriptcase version and which event you are running in as to what "$this" represents in a particular script.
                  It is handy to do a "var_dump($this)" and then look through the generated source to find some of the interesting properties & methods for a particular class of object.

                  Dave
                  Dave:
                  The above did not work BUT your advice to do the var_dump($this) was the platinum key.

                  [version] = $this->Ini->nm_app_version;

                  is what is needed. You typed an extra 't'. Thanks ever so much for the eye opener.

                  Regards,

                  Sean

                  Comment


                  • #10
                    Originally posted by Sean H. View Post
                    Dave:
                    The above did not work BUT your advice to do the var_dump($this) was the platinum key.

                    [version] = $this->Ini->nm_app_version;

                    is what is needed. You typed an extra 't'. Thanks ever so much for the eye opener.

                    Regards,

                    Sean
                    Thats what happens when you get old, your memory is the second thing to go. I can't remember the first thing that goes....

                    Dave
                    Last edited by daveprue; 03-16-2015, 04:08 AM.
                    Dave Prue
                    Code Whisperer
                    Lahar International Corp
                    www.lahar.net

                    Comment


                    • #11
                      Originally posted by daveprue View Post
                      Thats what happens when you get old, your memory is the second thing to go. I can't remember the first thing that goes....

                      Dave
                      Come on Dave, you still young, I saw your photo

                      Comment


                      • #12
                        Originally posted by aducom View Post
                        Hi Albert,

                        Is this a Scriptcase app? How did you get your menu looking and positioned like that? I'm very interested in a more modern look for SC menus (goodness, some remind me of the days of FoxPro.) Is it even possible to get those menus looking like Bootstrap menus?

                        Comment


                        • #13
                          Thanks Dave & Sean

                          :-)

                          Comment


                          • #14
                            Originally posted by scriptcaser View Post
                            Hi Albert,

                            Is this a Scriptcase app? How did you get your menu looking and positioned like that? I'm very interested in a more modern look for SC menus (goodness, some remind me of the days of FoxPro.) Is it even possible to get those menus looking like Bootstrap menus?
                            hi scriptcase, if you mean this link

                            http://scriptcase.aducom.com/cms/e10....php?0.cat.6.8

                            that is e107 cms

                            Albert -thankfully- explained the issue that is being discussed in this thread as "FAQ" library page in aducom site.

                            Comment


                            • #15
                              Yes, we use e107 cms to embed our scriptcase applications in.
                              Albert Drent
                              aducom software netherlands
                              scriptcase partner, reseller, support and (turn-key) development
                              www.scriptcase.eu / www.scriptcase.nl

                              Comment

                              Working...
                              X