Results 1 to 10 of 25

Thread: thinBASIC IUP

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    thinBASIC IUP

    *** deleted ***
    Last edited by John Spikowski; 18-09-2013 at 01:42.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  2. #2
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    Quote Originally Posted by John Spikowski View Post
    I'm trying to get callbacks working with thinBASIC. I'm not sure if this is even possible...

    sounds familiar...

    Just some nosy questions:

    What about that IUP? It's some .dll that I can find in your scriptbasic-examples-thread I guess?

    And- why are the statements as in IupSetAttributes(btn1, "TITLE=Button1, EXPAND=HORIZONTAL") in quotes as it were strings?
    I think that's not a good idea if you think about adding code-spell-correction one day.
    And - are those string-statements maybe case-sensitive?

    Edit-
    What makes me wonder too:
    Function_GetPtr
    help says: "Returns the internal pointer of a script function or sub"
    Returned pointer is thinBasic internal pointer. It has no meaning outside thinBasic.
    Do not confuse it with machine or code pointers.
    Last edited by ReneMiner; 01-03-2013 at 20:05.
    I think there are missing some Forum-sections as beta-testing and support

  3. #3
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    just edited my last post- so please have another look at it
    I think there are missing some Forum-sections as beta-testing and support

  4. #4
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    Just snooped around in the helpfile because I thought it might be that thinBasic is not able to pass pointers to external functions. This is what I found about
    "External function declarations"

    There are still some limitations regarding type of parameters thinBasic is able to pass to external functions.

    If you are in trouble, please visit thinBasic forum and leave a message regarding the problem you are facing and possibly specify an exact example. We will do our best to try to solve the problem as soon as possible.
    but it's just a guess since I have no idea about the internal stuff.
    Maybe you could store the result of Function_GetPtr in another variable and pass this?
    Last edited by ReneMiner; 01-03-2013 at 20:22.
    I think there are missing some Forum-sections as beta-testing and support

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

    as I said many times in this forum, unfortunately there is no way (at the moment) to pass thinBasic script function pointer simply because there is no function and there is no pointer.

    When an external function ask for a function pointer or a code pointer they are referring to pointers to machine code currently running in the current process.
    But thinbasic functions are not translated into machine code, they are just text (simple and damn text) parsed and interpreted on the fly by thinBasic engine.
    thinBasic source code is never translated/converted/compiled into machine code of pcode or intermediate code (or whatever you call it)
    thinBasic source code is just text during all the process of thinBasic source code execution.

    In any case, it is some time (some months) I'm thinking about this trying to find a solution.
    What I have in mind is to create a sort of "machine code alias" for each thinBasic source code function present into a script in such a way every source code function (or sub) has a machine code ghost function into thinBasic engine in such a way to pass pointer of the machine code ghost function to external libraries asking for a callback.

    Sooner or later ...
    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

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

    thanks to you too for spending your time in showing how to use IUP library in thinBasic.
    I really appreciate it

    Ciao
    Eros
    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

  7. #7
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    "Byval ih as Long" ??? Why?
    I think there are missing some Forum-sections as beta-testing and support

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
  •