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

Interactive Window seems to be having issues.

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

    Interactive Window seems to be having issues.

    Hey all,

    Is anyone else have issues with the interactive window?

    I'm testing some code (or trying to) and if I change a variable value and do a test EX: ?response it has been giving me the same value I had before I changed it. it is not changing to the new value.

    Secondly if I paste code into the window it won't run. For instance I am trying to write an http_get function and if I have req.host = "wsd.adminscreen.net" when it try ?req.host is gives me req.host = "" which obviously is not the case as I've asingned it a direct string value.

    I have written the exact same code in the window and only once have gotten it to give me a correct result the rest of the times it does not.

    Here is some of the code I'm trying and the response I'm getting

    HTML Code:
    dim request as p
    dim response as p
    request.host = "wsd.adminscreen.net"
    request.page = "/evolution.asmx/ViewCostPriceBySKU"
    request.ServerID = "?ServerID=1"
    request.TokenKey = "&TokenKey=42274449465b2c744c7461645649666c7c4865747a6b7a282f433d797d"
    request.Password = "&Password=test1"
    request.SkuID = "&SkuID=unv21200"
    request.method = "POST"
    
    
    response = http_fetch(request)
    ?request= body = ""
    cookie = ""
    header = ""
    host = ""
    method = ""
    page = ""
    Password = ""
    port = 0
    protocol = ""
    query_string = ""
    referer = ""
    ServerID = ""
    SkuID = ""
    ssl_on = .F.
    ssl_ValidateCert = .T.
    timeout = 0
    TokenKey = ""
    user_agent = ""
    Or this:

    HTML Code:
    dim request as p
    dim response as p
    request.host = "wsd.adminscreen.net"
    request.page = "/evolution.asmx/ViewCostPriceBySKU"
    request.ServerID = "?ServerID=1"
    request.TokenKey = "&TokenKey=42274449465b2c744c7461645649666c7c4865747a6b7a282f433d797d"
    request.Password = "&Password=test1"
    request.SkuID = "&SkuID=unv21200"
    request.method = "POST"
    
    response = http_fetch(request)
    
    ?response
    = body = 
    error_code = 1
    error_text = "Host must be specified."
    headers = ""
    +parsed_headers.
    Thanks,

    Marc McCall

    Version 12.3 2128 -4292
    MySQL backend

    If at first you don�t succeed, call it version 1.0

    #2
    Re: Interactive Window seems to be having issues.

    You cannot test http_* from Interactive Window (or Live Preview, etc) because the API cannot respond to your request. You have to test from a live browser. Most often you have to test from a remote server, unless your localhost can receive a response from the API server.
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: Interactive Window seems to be having issues.

      Steve, I actually got the code to give me this response (once)

      System.InvalidOperationException: Missing parameter: ServerID.
      at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection)
      at System.Web.Services.Protocols.UrlParameterReader.Read(HttpRequest request)
      at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
      at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

      This is straight from the server.

      This will be very disappointing if I can't get this to work from localhost.

      Can you explain further why this cant be done in the interactive window, how else are you supposed to test it. Build a little, compile and deploy.. That really doesn't make sense why you can't test from the interactive window.
      Thanks,

      Marc McCall

      Version 12.3 2128 -4292
      MySQL backend

      If at first you don�t succeed, call it version 1.0

      Comment


        #4
        Re: Interactive Window seems to be having issues.

        http_* will work just fine from the Interactive Window.

        Marc, the error you got is coming from the wsd.adminscreen.net server, so you would need to review their documentation. But it is saying that it expected you to send a ServerID with your request but it did not get one. This makes sense as you cannot make up arbitrary properties and pass them to http_fetch().

        Lenny Forziati
        Vice President, Internet Products and Technical Services
        Alpha Software Corporation

        Comment


          #5
          Re: Interactive Window seems to be having issues.

          I don't like posting incorrect advice! I pride myself on nearly always testing before I post something, even when I am pretty sure of my conclusions. But sometimes I am "so sure" and even though I think to myself I should test this, for some stupid reason I do not test -- and end up off base! I do not like when that happens so I will be sure I test my conclusions first.
          Steve Wood
          See my profile on IADN

          Comment


            #6
            Re: Interactive Window seems to be having issues.

            Thanks everyone for the input.

            Steve I know where you are coming from, I'm the same way when trying to help someone.

            I am going to stick with the http_get since I can get it to work.


            So back to the interactive window. Why can't I paste code into it and it work. I can't paste ANY code in my interactive window and get it to run?
            Thanks,

            Marc McCall

            Version 12.3 2128 -4292
            MySQL backend

            If at first you don�t succeed, call it version 1.0

            Comment


              #7
              Re: Interactive Window seems to be having issues.

              Originally posted by DDPMarc View Post
              So back to the interactive window. Why can't I paste code into it and it work. I can't paste ANY code in my interactive window and get it to run?
              The IW can run individual lines of code. But if you highlight a block of code and click execute, it will run that block. If you have complex code to test, it might be better to save it as a script and run debug(1). Personally, I use the IW all the time but I also test temp scripts (or functions) using debug(1) all the time, as well. It's just a matter of knowing which to use, when.
              Peter
              AlphaBase Solutions, LLC

              [email protected]
              https://www.alphabasesolutions.com


              Comment


                #8
                Re: Interactive Window seems to be having issues.

                And just to prove the point regarding changing variables, this is from the IW:

                Code:
                Dim x as A
                x = 123
                ? x
                = 123
                
                x = "abc"
                ? x
                = "abc"
                Peter
                AlphaBase Solutions, LLC

                [email protected]
                https://www.alphabasesolutions.com


                Comment


                  #9
                  Re: Interactive Window seems to be having issues.

                  Thanks Peter.

                  That takes care of my code running when pasting into the window. Highlighting all of it and "Run Selected Code" is getting rid of the errors .
                  Thanks,

                  Marc McCall

                  Version 12.3 2128 -4292
                  MySQL backend

                  If at first you don�t succeed, call it version 1.0

                  Comment

                  Working...
                  X