Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Function was not recognized

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

    Function was not recognized

    Can't seem to get past this one. I have a javascript function that includes this:

    Code:
    {grid.Object}.ajaxCallback('G','{Grid.RowNumber}:all','xbServerIsAvailable','',ele,{deviceOfflineFunction: function() {   }});
    and an Xbasic function:

    Code:
    function xbServerIsAvailable as c (e as p)
    . . .
    end function
    Yet when I call the javascript function, I get an error alert:

    Fatal error executing Ajax callback: Function:
    'xbServerIsAvailable' was not recognized
    I've re-named the function in several ways to make sure it's not anything reserved. I've simplified it to just three lines to return a simple alert in case there's something amiss with my Xbasic code. After about 2 hours I'm outta ideas.

    Any thoughts?

    Update 2.5 hrs later - this is really annoying. I'm making the callback directly from the button - skipping any intermediate javascript, and same problem. The button for my testing just does this (yes, I'm trying different names for the function)

    Code:
    {grid.Object}.ajaxCallback('G','{Grid.RowNumber}:all','xbServer_IsAvailable','','',{deviceOfflineFunction: function() {   }});
    I've re-started the A5 server as well. No joy.
    Last edited by Steve Workings; 03-29-2015, 09:25 PM.
    -Steve
    sigpic

    #2
    Re: Function was not recognized

    Originally posted by Steve Workings View Post
    Can't seem to get past this one. I have a javascript function that includes this:

    Code:
    {grid.Object}.ajaxCallback('G','{Grid.RowNumber}:all','xbServerIsAvailable','',ele,{deviceOfflineFunction: function() {   }});
    and an Xbasic function:

    Code:
    function xbServerIsAvailable as c (e as p)
    . . .
    end function
    Yet when I call the javascript function, I get an error alert:



    I've re-named the function in several ways to make sure it's not anything reserved. I've simplified it to just three lines to return a simple alert in case there's something amiss with my Xbasic code. After about 2 hours I'm outta ideas.

    Any thoughts?

    Update 2.5 hrs later - this is really annoying. I'm making the callback directly from the button - skipping any intermediate javascript, and same problem. The button for my testing just does this (yes, I'm trying different names for the function)

    Code:
    {grid.Object}.ajaxCallback('G','{Grid.RowNumber}:all','xbServer_IsAvailable','','',{deviceOfflineFunction: function() {   }});
    I've re-started the A5 server as well. No joy.
    Hi Steve,
    Luckily I have not seen that error recently.

    A couple of things to check
    Is the function defined in the UX/grid or in an AEX ? Can try move to alternative
    Does the xbasic function xbServerIsAvailable return a result?
    Does the component generate any javascript errors?
    create a temporary button and recreate the ajax callback to see if that works
    shorten the function name and check if encrypted
    https://appsbydesign.co.uk/

    Comment


      #3
      Re: Function was not recognized

      Is the function defined in the UX/grid or in an AEX ? Can try move to alternative
      This and all other functions are in the UX and work fine. Don't have an AEX so haven't tried that. I have a dozen Xbasic functions in this UX that all work just fine.

      Does the xbasic function xbServerIsAvailable return a result?
      I've simplified to just return "alert('callback');" and both Selwyn and I get that result in Working Preview

      Does the component generate any javascript errors?
      Nope.

      create a temporary button and recreate the ajax callback to see if that works
      Have tried that.

      shorten the function name and check if encrypted
      It's not encrypted, and have tried all kinds of different names but not focused. Just tried renaming and calling it "xb" and same error.
      -Steve
      sigpic

      Comment


        #4
        Re: Function was not recognized

        Originally posted by Steve Workings View Post
        Does the xbasic function xbServerIsAvailable return a result?
        I've simplified to just return "alert('callback');" and both Selwyn and I get that result in Working Preview
        So the simplified version works in Working preview but not Live preview/published. Not encountered that before ?
        Is the function the only function in XBasic declarations or does it contain multiple functions.
        If multiple you could try moving it to the top or temporarily remove other functions to see if that has any affect.
        https://appsbydesign.co.uk/

        Comment


          #5
          Re: Function was not recognized

          Correct. I've never seen this. I've now just tried this:

          I added a new function:

          Code:
          function xb as c (e as p)
              xb = "alert('callback');"
          end function
          It's the first function in the Xbasic functions. I've completely commented out the second function, which is the one I'm trying to add. There are another 5 or 6 after that that work well. When I try a callback to the new XB function, I get the same error.
          -Steve
          sigpic

          Comment


            #6
            Re: Function was not recognized

            I tried this myself and your examples all worked in both live preview and when published. Are you running a pre-release by chance? I'm on 2689-4440. If you create a new component with just the XB function do you have the same problem?

            My button calls this JS function:

            Code:
            function myFunction() {
            	alert('JS callback works');
            	//Call xbasic function now
            	{grid.Object}.ajaxCallback('G','{Grid.RowNumber}:all','xbServerIsAvailable','','',{deviceOfflineFunction: function() {   }});
            	return;
            }
            This is the Xb function:

            Code:
            function xbServerIsAvailable as c (e as p)
            
            xbServerIsAvailable = "alert('XB callback works');"
            
            end function
            Mike Brown - Contact Me
            Programmatic Technologies, LLC
            Programmatic-Technologies.com
            Independent Developer & Consultant​​

            Comment


              #7
              Re: Function was not recognized

              Yeah Mike I'm on pre-release 2716-4452 (and so is the server). But I've added other Xbasic and Javascript functions to this UX over the last few days. This is my very last addition, I was 15 minutes away from declaring this one done and being able to send a bill.
              -Steve
              sigpic

              Comment


                #8
                Re: Function was not recognized

                Pre-release 2752-4462 was just posted....maybe it'll be the cure for your problem.
                Mike Brown - Contact Me
                Programmatic Technologies, LLC
                Programmatic-Technologies.com
                Independent Developer & Consultant​​

                Comment


                  #9
                  Re: Function was not recognized

                  With my current build I just created a new UX with one callback, one button to make the callback, put it on a page and published it. It works fine.
                  -Steve
                  sigpic

                  Comment


                    #10
                    Re: Function was not recognized

                    Originally posted by Steve Workings View Post
                    With my current build I just created a new UX with one callback, one button to make the callback, put it on a page and published it. It works fine.
                    Maybe duplicate the problematic component and remove features a few at a time and retest. It might start working again at some point and identify the cause.
                    https://appsbydesign.co.uk/

                    Comment


                      #11
                      Re: Function was not recognized

                      I did try duplicating the component, that didn't do it.

                      I also tried putting the Xbasic function into a function library attached to the UX. Still no joy.

                      Edit: OK, I have now removed nearly everything. All that's left is the panelnavigator and cards - no content. All javascript, all other controls, all other Xbasic functions -- everything right down to this single button are gone. Still no success.

                      It seems I cannot add a callback to this component, but it's the parent UX for the application and all I need to do is add some functionality to it. Seems that I cannot, yet.
                      Last edited by Steve Workings; 03-30-2015, 11:40 AM.
                      -Steve
                      sigpic

                      Comment


                        #12
                        Re: Function was not recognized

                        This may be a shot in the dark but at this point what else is there?? ...maybe copy/paste a few controls at a time from the problem component into a brand new component.
                        Mike Brown - Contact Me
                        Programmatic Technologies, LLC
                        Programmatic-Technologies.com
                        Independent Developer & Consultant​​

                        Comment


                          #13
                          Re: Function was not recognized

                          Mike - I was avoiding this. It has Geolocation stuff, a complete set of custom offline management functions, on and on. I'm worried I'll miss something. But, I just went ahead and did it and that appears to have done the trick. Further testing pending - gotta get a few other billable hours under my belt for today before I come back to this.
                          -Steve
                          sigpic

                          Comment


                            #14
                            Re: Function was not recognized

                            Bump!

                            Interested on any progress with this topic. I have been working for 100+ hours on a UX which has been fine until last night, all with the candle burning .
                            My error occurs in PhoneGap only. Have commenced removing the new code I added to back track the problem. Will advise on / when I achieve success.

                            Question/Suspicion: Is there a limit on the actual size on Xbasic code you can add to a phonegap published app?

                            Comment


                              #15
                              Re: Function was not recognized

                              Update! I fixed it. Did 4 hours of code rebuild without restarting UX from scratch.
                              I actually suspect that the version I had published was older than the version I was using in PhoneGap.
                              Why do i think this? Because I realised that my PhoneGap build was pointing to a ZebraHost server and not my local server.
                              I had not published the UX to this server.
                              I worked it out during my code rebuild as I moved some DB logic to a stored procedure.

                              On with the show!

                              Comment

                              Working...
                              X