Results 1 to 2 of 2

Thread: How to use Resed together with thinBasic and Freebasic-Compiler?

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    55
    Posts
    1,554
    Rep Power
    174

    How to use Resed together with thinBasic and Freebasic-Compiler?

    Hi Guys,
    I am a bit Stuck on this i try to find out what These Tools can do for me. I want to create a functional Type or Claas that will allocate some memory. I know how to create the Type in thinBasic but i never used any classes and i did Not find out how to make one in thinBasic. So i am with an Udt that has Functions, a few Statics and a bunch of Variables to it. Lets say thats my udt:
    Uses "UI", "Ini"
    
    Type tDatamgr
    Static pTypes As Dword
    Static pNames As Dword
      pRecentData(20) as Dword
      pCurrentData As Dword
       '....i omit a Lot now since Not required die the questions i have.but also have Not only 1 function
    Function allocateFor(byref pMem AS Dword, byval sType AS String) AS String
    '. . .
    End Type
    
    At First: can i Convert the udt to become a class that is accesible after i compiled the Project? Or can Types including Functions be in a compiled dll with Freebasic-Compiler?
    Also i use this ResEd to create some Dialog. No Problem to create any Windows or menus and IT can save IT in a way that i can Transfer the Data easily into my Scripts.
    I Hope this Link Works as expected, IT should lead to Ketil Olsens ResEd. A pretty good GUI-editor that produces Things that i can use in thinBasic.

    http://masm32.com/board/index.php?topic=239.0


    Now i want to add a Windows with some controls that Shows Up only while i am editing in thinair but Not If a Script was started by thinAir-code-editor. But IT IS ok to Show the Window when a Script as a Tool from thinair runs.is IT possible to detect If a Script rund that was started by Debugger/Editor (F5 or F8 ) so i can avoid my Tool to Show Up If the User Tests a Script?

    And can Freebasic-Compiler do anything for me with that ResEd (IT has settings in Options to enter command$ to compile ) but i never got IT to Work. All i make use of is the GUI-editor and i Transfer the saved Data into my Scripts - even i know it should Work to let thinBasic load this Ressource Files during Runtime.
    Can this resed + Freebasic-Compiler Go together and make my Script a dll? And how about my udt? If it we're still the udt with Functions, can IT be that a dll Provides a Type that can be extended in User-Scripts? Or am i Stuck with a class that is Not Able to get extended? The finished library shall be useable from thinBasic only,vso No need to think of using it from any other language . If Not possible to have an Udt with Functions compiled How would i write it using thinBasic only that my udt will get compiled to be a class

    I know thats a bunch of questions. But i am stuck currently because of the Problem that i don't know how
    Last edited by ReneMiner; 10-04-2020 at 09:54.
    I think there are missing some Forum-sections as beta-testing and support

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736
    Hi Rene,

    #1
    ThinBASIC TYPE with functions has memory representation identical to the TYPE without functions, just the data. The information about functions is stored elsewhere.

    The only cross-language compatible type of class I know is COM class. Otherwise, C++ has its own classes, Python has its own classes and so on.

    Unlike TYPE & structs, which are mostly transferable, classes are different beasts. Besides that, thinBASIC has no way to create classes from thinBASIC code.

    #2
    I think you can adjust the commandline of the tool launching in a way it sets environment variable.

    If environment variable is set, you can make the tool behave differently.

    You can read environment variables using OS_Environ.


    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

Similar Threads

  1. Replies: 4
    Last Post: 04-03-2014, 16:05
  2. ThinBasic extended numbers in FreeBASIC SDK.
    By D.J.Peters in forum thinBasic SDK
    Replies: 16
    Last Post: 15-05-2011, 00:27
  3. thinBasic Compiler
    By John Spikowski in forum General
    Replies: 0
    Last Post: 24-04-2011, 20:12
  4. Replies: 8
    Last Post: 05-08-2008, 19:12
  5. FantomGL = ThinBasic Compiler?
    By Michael Hartlef in forum Free Pascal
    Replies: 6
    Last Post: 12-09-2007, 01:08

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
  •