Results 1 to 6 of 6

Thread: #Include ... evolution

  1. #1
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    #Include ... evolution

    Next thinBasic beta will have the possibility to #INCLUDE sources directly from the a web page using HTTP or HTTPS.
    It can be used to quickly test something published from others or to refer to library maintained in the web
    Example:
    '---Test include from Web
    #INCLUDE "https://raw.githubusercontent.com/petrSchreiber/SmartTexture/master/smartTexture.tbasicu"
    
    Dim t As SmartTexture
    t.FromFile("C:\myImage.png")
    t.Make(1, %TBGL_TEX_MIPMAP)
    
    I think it will be necessary to add new features like a web #INCLUDE defined inside a parent web #INCLUDE.
    Anyway let's start and we will see.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  2. #2
    Interesting. How would you handle a fallback, if the include is not available?

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Actually if problem is related to no internet connection, I can trap it easily.

    But if internet connection is OK and the problem is related to the file, it is more difficult to trap it.
    Usually web servers reply with some html code telling "file not found" but that page is a personalized page so every server can reply in different ways.

    I found some info about how to get it: http://stackoverflow.com/questions/1...-using-wininet
    using HttpQueryInfo. I will try to apply.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    OK, I think I've got the following situations:
    1. error connecting to internet
    2. file not found
    3. other errors are considered generic errors with a specific error code that maybe we will detect in details in future releases
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Eros...


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  6. #6
    Sounds like a good plan

Similar Threads

  1. include
    By peter in forum thinBasic General
    Replies: 2
    Last Post: 07-10-2012, 16:04
  2. It's evolution, baby!
    By danbaron in forum Shout Box Area
    Replies: 4
    Last Post: 03-12-2011, 21:19
  3. It's evolution, baby!
    By danbaron in forum Shout Box Area
    Replies: 21
    Last Post: 23-07-2010, 07:34
  4. c++ 0x evolution infos :)
    By Lionheart008 in forum Shout Box Area
    Replies: 1
    Last Post: 19-03-2010, 22:21
  5. Development evolution
    By ErosOlmi in forum Development
    Replies: 1
    Last Post: 05-12-2007, 19:49

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •