Results 1 to 10 of 24

Thread: Signs of life out there!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #21
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    55
    Posts
    1,554
    Rep Power
    174
    we had this already: variable_exists gives correct result only on first call. If Me was dimensioned once then Variable_Exists results true, no matter if defined in current call or in a call before. So this works as long as the function gets called the MeHack_CallFunction-way only.
    Also I can not see any parameters that could be passed to myType.func() in the example - so the approach I took here was more advanced already.

    It still requires to insert the same part of code (If something then Dim ..As ... At..) to each and every type-function while the type is "known" anyway to the function since it is its "parent" and also to find as String in the functions name before the dot.

    If the call is not made from a variable as usual, ME is not dimensioned inside the function anyway -

    There are two ways to call a type-function thinkeable:

    -one possibility is to call a special Delegate-Function that would create a local overlay at pData and then call the function on it the regular call-a-type-function through a variable-way, but the problems would be to compose the functions name for the final call from a local variables name and from a string that was passed to delegate. The other problem would be to hand-over the parameters from our actual call to "Delegate" to the finally called Type-function. Both can not be done from tB-scripts currently.

    -second possibility would be, to tell type-functions WHERE to find Me -which is probably already the case- and optional TypeOf(Me) if the variables pattern can not be copied from the calling variable. It could as well be taken from the functions name or from the internal stored type-definition where that
    Alias STATIC As "type.function Ptr"
    
    is a part of - means a function of a type is in reality just a static variable containing the functions pointer, common to all elements and/or variables of that type

    - but all that has to be done very deep inside core...
    Last edited by ReneMiner; 24-05-2014 at 11:56.
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. Life 3D alfa
    By RobbeK in forum TBGL General
    Replies: 10
    Last Post: 09-11-2013, 00:22
  2. Signs that you're a bad programmer
    By ErosOlmi in forum Development
    Replies: 5
    Last Post: 04-11-2011, 17:47
  3. Second Life
    By Charles Pegge in forum Shout Box Area
    Replies: 11
    Last Post: 15-02-2011, 00:31
  4. my life with c++
    By kryton9 in forum C / C++
    Replies: 4
    Last Post: 13-06-2010, 05:00
  5. Journey of Life
    By Charles Pegge in forum Shout Box Area
    Replies: 1
    Last Post: 27-03-2010, 00:56

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
  •