UMC memory pointer system revisited

This is the place for queries that don't fit in any of the other categories.

Re: UMC memory pointer system revisited

Postby Tcll » Wed May 28, 2014 5:07 pm

micseydel wrote:or at least don't know how to express it.

that sounds about right...
(me being a disabled wreck and all)

again... this is all I want:
turn:
Code: Select all
x = struct( 12, 'a,b,c',
    a = bu32,
    b = bu32,
    c = bu32)


into:
Code: Select all
x = struct( 12,
    a = bu32,
    b = bu32,
    c = bu32)

I've already supplied the code for struct() below

what I expect:
print ref( x.a, x.b, x.c )
>>> [ 0, 4, 8 ]


sorry this is turning into such a frustrating matter :(
I guess the only solution after this (if you still want more) is for me to add you to my box so you can see my code...
(the whole system is rather large for me to explain, but not really necessary unless you want to understand what UMC does, not just struct())

so here's the invite link:
https://www.nitrous.io/join/2IPuUZfVRAA ... n=referral

if you already have a nitrous account, please tell me so I can add you to my box. :)
here's the box link:
https://www.nitrous.io/app#/boxes/100657/ide

if you want to see how useful this will be, take what you may about UMC_SIDE:
image: http://lh6.ggpht.com/-GU1_MOdEceE/U4YM9 ... ess_19.PNG
note: this image is used in reporting an error on another forum I'm getting help on...

OT stuff:
in the image, I'm trying to get the Go button to make the script read the current test file,
and update a tree with the functions as well as highlight the data in the hex viewer plus update the QGL viewer with the data passed into UMC.
when you click on a function in the tree, this will highlight the function in the code, as well as highlight the data in the hex or QGL previewers

UMC_SIDE is an IDE for building the scripts that pass the data from the file to UMC.
the previewers just show you what the functions in your script link to in both the file and UMC.
the tree of course shows you how your script reads the data.
User avatar
Tcll
 
Posts: 100
Joined: Wed Jan 01, 2014 6:36 pm

Re: UMC memory pointer system revisited

Postby Yoriz » Wed May 28, 2014 7:35 pm

I dont understand whats going on it this thread but focusing just on this bit.
Tcll wrote:again... this is all I want:
turn:
Code: Select all
x = struct( 12, 'a,b,c',
    a = bu32,
    b = bu32,
    c = bu32)


into:
Code: Select all
x = struct( 12,
    a = bu32,
    b = bu32,
    c = bu32)

I've already supplied the code for struct() below

what I expect:
print ref( x.a, x.b, x.c )
>>> [ 0, 4, 8 ]

I don't see the code for struct() below ?

Am i right in thinking you have some code that calls your struct function with 2 positional args and 3 keyword args, but your stuct function is only expecting to recive the first keyword arg and the 3 keyword args?

Can you not change the struct function to accept the 2nd positional arg and just do nothing with it
you could give the 2nd positional argument a default value of None if the 2nd positional arg is not always given.

Code: Select all
def struct(one, dont_want=None, **kwargs):
    print one, kwargs

struct(12, 'a,b,c', a=0, b=4, c=8)
struct(12, a=0, b=4, c=8)

outputs
Code: Select all
12 {'a': 0, 'c': 8, 'b': 4}
12 {'a': 0, 'c': 8, 'b': 4}


if for whatever reason you can't change the function struct and it recieves one positional arg and then keyword args you can use a decorator to remove the 2nd positional arg.
Code: Select all
import functools

def remove_2nd_arg(target):
    @functools.wraps(target)
    def wrapper(*args, **kwargs):
        return target(args[0], **kwargs)
    return wrapper

@remove_2nd_arg
def struct(one, **kwargs):
    print one, kwargs

struct(12, 'a,b,c', a=0, b=4, c=8)
struct(12, a=0, b=4, c=8)

outputs
Code: Select all
12 {'a': 0, 'c': 8, 'b': 4}
12 {'a': 0, 'c': 8, 'b': 4}


This is probably nothing like what you want as im not clever enough to understand or code it.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 781
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: UMC memory pointer system revisited

Postby Tcll » Wed May 28, 2014 8:46 pm

well at least you're making a start here, thanks. :)
all I really need is ideas as to how I could do that

when I said the code was "below", that could be above for you guys.
I like my post order as newest first so I don't have to scroll to the bottom of the page.

so yea, when I said that, I was talking about this post contining the code for struct()
(look at the very last code box)
Tcll wrote:yea, I know the thing about asking proper questions and what not...
I don't think properly, so the proper question I want to ask usually comes 2 days after my original post at least.
(sorry I'm a disabled wreck when it comes to socializing) heh

anyways, here's a script using the new system for the MDL0 file format:

Code: Select all
def ImportModel( FileType, Commands ):

    #global header:
    GHeader = struct( 16, # order not used here (this is what I'm going for, but right now would break the script)
        magic = string(4), # "MDL0"
        DataSize = bu32,
        version = bu32,
        BRRESPos = bs32 # this file's position in the outer archive
    )()

    sections = struct( -1, # struct size depends on used fields
        # order can still be used for this reason:
        '''
        Definitions,
        Bones,
        Vertices,
        Normals,
        Colors,
        UVs,'''+\
        ('''
        FurVectors,
        FurLayers,
        ''' if GHeader.version>9 else '')+'''
        Materials,
        TEVs,
        Objects,
        Textures,
        Pallets'''+\
        (''',
        Unk
        ''' if GHeader.version>10 else ''),

        Definitions = bu32,
        Bones = bu32,
        Vertices = bu32,
        Normals  = bu32,
        Colors   = bu32,
        UVs      = bu32,
        FurVectors = bu32,
        FurLayers  = bu32,
        Materials= bu32,
        TEVs = bu32,
        Objects  = bu32,
        Textures = bu32,
        Pallets  = bu32,
        Unk     = bu32,
    ) # note we're not calling a read here

    bounds3 = struct( 24,
        x = bf32, y = bf32, z = bf32,
        X = bf32, Y = bf32, Z = bf32
    )

    header = struct( -1,
        DataSections = sections
        MDL0Name = string( bu8, addr=bu32 )
        HeaderLength = bu32,
        MDL0Offset = bs32,
        unk1 = bu32,
        unk2 = bu32,
        vertCount = bu32,
        faceCount = bu32,
        unk3 = bu32,
        DefCount = bu32,
        unk_flags = bu32,
        unk5 = bu16,
        DataOffset = bu16,
        Bounds = bounds3
    )()

^ note how it looks grouped easier (same effect as using a class, but operates just like a UMC data type).

again, this is made simple for noob programmers.
you can still use whatever you think is best

here's an older code from my last build:
Code: Select all
def ImportModel(FT,Cmd):

    def Offset_Name(offset):
        p=jump(offset-1,label=' -- String_Data')
        Str=string(bu8( label=' -- String_Length'))
        jump(p); return Str

    def Bounds(Type): #MinX,Y(,Z),MaxX,Y(,Z)
        LABEL('\n -- Bounds:')
        return [bf32(),bf32(),bf32(),bf32()]+([bf32(),bf32()] if Type==3 else [])

    #global header:
    magic = string(4, label=' -- MDL0_Magic')
    DataLen = bu32(   label=' -- Data_Length')
    version = bu32(   label=' -- Version')
    brres_hdr = bs32( label=' -- Brres_Header')

    #data sections
    Definits = (bu32(label=' -- Definitions')if version>7 else 0)
    Bones    = (bu32(label=' -- Bones')      if version>7 else 0)
    Vertices = (bu32(label=' -- Vertices')   if version>7 else 0)
    Normals  = (bu32(label=' -- Normals')    if version>7 else 0)
    Colors   = (bu32(label=' -- Colors')     if version>7 else 0)
    UVs      = (bu32(label=' -- UVs')        if version>7 else 0)
    FVectors = (bu32(label=' -- Fur_Vectors')if version>9 else 0)
    FLayers  = (bu32(label=' -- Fur_Layers') if version>9 else 0)
    Materials= (bu32(label=' -- Materials')  if version>7 else 0)
    Nodes    = (bu32(label=' -- Nodes')      if version>7 else 0)
    Objects  = (bu32(label=' -- Objects')    if version>7 else 0)
    Textures = (bu32(label=' -- Textures')   if version>7 else 0)
    Pallets  = (bu32(label=' -- Pallets')    if version>7 else 0)
    Unk3     = (bu32(label=' -- Unknown3')   if version>10 else 0)

    #local header:
    MDL0_Name = Offset_Name(bu32(label=' -- String_Offset'))
    header_len = bu32(      label=' -- Header_Length')
    MDL0_offset = bs32(     label=' -- MDL0_Header_Offset')
    header_unk1 = bu32(     label=' -- Unknown')
    header_unk2 = bu32(     label=' -- Unknown')
    num_verticies = bu32(   label=' -- Vert_Count')
    num_faces = bu32(       label=' -- Face_Count')
    header_unk3 = bu32(     label=' -- Unknown')
    Def_Count = bu32(       label=' -- Def_Count')
    unk_flags = bu32(       label=' -- Unknown_Flags')
    header_unk5 = bu16(     label=' -- Unknown')
    Data_Offset = bu16(     label=' -- Data_Offset')
    boundbox = Bounds(3)
^ very sloppy

the only thing better about the old code is the data sections being vertically smaller.
and that the data is labeled customly for the debug log: (where struct() will label the var names in the log)
Code: Select all
-- importing FitPikachu00.mdl0 --

0x0000000000: read string 'MDL0' of length 4 -- MDL0_Magic
0x0000000004: read 0x0002A160 as 172384 -- Data_Length
0x0000000008: read 0x00000009 as 9 -- Version
0x000000000C: read 0xFFFFFF80 as -128 -- Brres_Header
0x0000000010: read 0x00000518 as 1304 -- Definitions
0x0000000014: read 0x00000560 as 1376 -- Bones
0x0000000018: read 0x00000878 as 2168 -- Vertices
0x000000001C: read 0x000008E0 as 2272 -- Normals
0x0000000020: read 0x00000948 as 2376 -- Colors
0x0000000024: read 0x00000970 as 2416 -- UVs
0x0000000028: read 0x000009D8 as 2520 -- Materials
0x000000002C: read 0x00000A90 as 2704 -- Nodes
0x0000000030: read 0x00000B48 as 2888 -- Objects
0x0000000034: read 0x00000BB0 as 2992 -- Textures
0x0000000038: read 0x00000000 as 0 -- Pallets
0x000000003C: read 0x0002A23C as 172604 -- String_Offset
0x0000000040: jumping to: 0x000002A23B from start of file -- String_Data
0x000002A23B: read 0x0C as 12 -- String_Length
0x000002A23C: read string 'FitPikachu00' of length 12
0x000002A248: jumping to: 0x0000000040 from start of file
0x0000000040: read 0x00000040 as 64 -- Header_Length
0x0000000044: read 0xFFFFFFC0 as -64 -- MDL0_Header_Offset
0x0000000048: read 0x00000000 as 0 -- Unknown
0x000000004C: read 0x00000000 as 0 -- Unknown
0x0000000050: read 0x00001A38 as 6712 -- Vert_Count
0x0000000054: read 0x00001178 as 4472 -- Face_Count
0x0000000058: read 0x00000000 as 0 -- Unknown
0x000000005C: read 0x00000125 as 293 -- Def_Count
0x0000000060: read 0x01010000 as 16842752 -- Unknown_Flags
0x0000000064: read 0x0000 as 0 -- Unknown
0x0000000066: read 0x0040 as 64 -- Data_Offset
 -- Bounds:
0x0000000068: read 0x00000000 as 0.0
0x000000006C: read 0x00000000 as 0.0
0x0000000070: read 0x00000000 as 0.0
0x0000000074: read 0x00000000 as 0.0
0x0000000078: read 0x00000000 as 0.0
0x000000007C: read 0x00000000 as 0.0


so yea, where I need the help on this exactly is getting rid of the order to make it optional instead of required...

here's the code for struct:
Code: Select all
class _STRUCT(object):
    import sys, API as _API
   
    def __init__(_this): pass
    def __call__(parent, size, order, **vars):
        order = order.replace('\n','').replace('\t','').replace(' ','').split(',')

        class _SUB_STRUCT(object):
            _names = vars

            # TODO: get rid of this (perhapse with a hack) (we need a dictionary with the raw order)
            _order = order
            _struct_def = [ vars[s]._struct_def for s in order ] # used for quick comparison in array value-testing

            _addr = None
            _size = size

            def _set_(this, values):
                #print values

                write = bool(len(values))
                skip = this._size
                size = 0

                for vi,name in enumerate(this._order):
                    this.__dict__[name] = this._names[name](values[vi] if write else '')
                    this.__dict__[name].set = this.__dict__[name]._deref_set_
                    if this._size == -1: size += this.__dict__[name]._size
                    else: skip -= this.__dict__[name]._size

                if this._size == -1: this._size=size
                else: parent._API.backend.FILE._current.offset+=skip

            set = None
            def _deref_set_(this, *values):
                '''sets this values pointed to in the file data'''
                this._set_(values)

            def __init__(this, *values):
                #print this._names

                this._addr = parent._API.backend.FILE._current.offset # set the address of this struct
                this._set_(values)
               

        parent.sys.modules['_TypesList'].append(_SUB_STRUCT)
        return _SUB_STRUCT

sys.modules['UGE_Type_Names']['struct'] = 'struct'
global struct; struct = _STRUCT()
sys.modules['UGE_Cons_Names']['structType'] = None
global structType; structType = type

^ if there's something in this code you'd like to know more about, please tell me. :)

sys.modules['UGE_Type_Names'] and sys.modules['UGE_Cons_Names'] is currently only for UMC_SIDE usage...
later on I intend to use these definitions for other things.

I'm sure there's probably a slightly better way than this,
but I'm not a python expert yet and only using what I know to work. :P

EDIT:
it is a long and complex thing, which is why I'm not asking for anything direct, so of course I'm not providing everything. :P


Truthfully, struct is a class instance, when you call it, it returns a class.

this is specifically for simulating
x = struct( ... )
data = x() # read from the file
if type(data) == x: # do something

Am i right in thinking you have some code that calls your struct function with 2 positional args and 3 keyword args, but your stuct function is only expecting to recive the first keyword arg and the 3 keyword args?

almost...

I want you to be able to call struct() w/o providing the var-order.
s = struct(12,
a = bu32,
b = bu32,
c = bu32)

but I also want it to read the file data in that order:
x = s()
print ref( x.a, x.b, x.c )
>>> [ 0, 4, 8 ]

also, I don't want to completely get rid of the order...
for example, you may need it for calling:

s = struct(12, 'a,b' + (',c' if V>1 else '')
a = bu32,
b = bu32,
c = bu32)

which s() should read data of:
0x######## ######## 00000000 (V = 1)
0x######## ######## ######## (V = 2)
User avatar
Tcll
 
Posts: 100
Joined: Wed Jan 01, 2014 6:36 pm

Re: UMC memory pointer system revisited

Postby micseydel » Wed May 28, 2014 10:44 pm

All of your posts are way, way too long. You need to simplify it. I'll start with a portion of your code, and we can work from there.

Tcll wrote:what I need is to turn:
Code: Select all
struct( 12, 'a,b,c',
a = bu32,
b = bu32,
c = bu32)


into:
Code: Select all
struct( 12,
a = bu32,
b = bu32,
c = bu32)


^the order man, the order, how do I build something to get rid of the order??
forget about what struct() does, I need to get rid of the order...

Imagine I have no idea what struct does. Tell me what your desired input and output actually is, and what you want it to be, along with your struct function. Just this code. Not a huge block of text with links and code tags with classes and mysterious imports that I have no idea about.

Show me in a Python shell session which is as utterly short as possible the first bit of code working, hard coding actual values that I can test against. Then tell me what exactly and concisely needs to be different. You say you want to "get rid of the order". Let's be more specific. Does that mean the order doesn't matter? Does it mean you want to randomize it? Does it mean you want to sort it in some way to remove the ordering implied by the function call?
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1223
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: UMC memory pointer system revisited

Postby Somelauw » Thu May 29, 2014 12:16 am

Because the question is poorly formulated, I will make exactly one shot at trying to understand it.
If this shot fails, I will simply give up.

You have code like this:
Code: Select all
def struct(**kwargs):
    for k in kwargs:
        print k


You call it like this:
Code: Select all
struct(a="bu32", b="bu32", c="bu32")


and it prints:
Code: Select all
a
c
b


instead of
Code: Select all
a
b
c


So what you want is to retrieve the parameters passed to a function in the order in which they were supplied?
Join the #python-forum IRC channel on irc.freenode.net!
Somelauw
 
Posts: 69
Joined: Tue Feb 12, 2013 8:30 pm

Re: UMC memory pointer system revisited

Postby Tcll » Thu May 29, 2014 2:22 am

micseydel wrote:Imagine I have no idea what struct does. Tell me what your desired input and output actually is, and what you want it to be, along with your struct function. Just this code. Not a huge block of text with links and code tags with classes and mysterious imports that I have no idea about.


oh I already have it working as I want in terms of storage and return... I thought I stated that much already...
the problem is the variable order is currently a requirement...
how can I make it optional??

micseydel wrote:Show me in a Python shell session which is as utterly short as possible the first bit of code working, hard coding actual values that I can test against. Then tell me what exactly and concisely needs to be different. You say you want to "get rid of the order". Let's be more specific. Does that mean the order doesn't matter? Does it mean you want to randomize it? Does it mean you want to sort it in some way to remove the ordering implied by the function call?


I had it working in an old test code back when I actually built them

x = struct( ... )
x is a dynamically created class (SUB_STRUCT) which is given the variables with the types you specify.

x() calls the __init__() method of this class, which calls __init__() from every class supplied with it's variables.
again though, this was a problem to implement w/o an order because dictionaries are stupid. :P
(the hash order causes the class variables to contain the wrong data address)

without the order:
vec = struct(12,
x = bf32, # this reads second (should read first)
y = bf32, # this reads first
z = bf32 )

vert = vec()
X = vert.y
Y = vert.x
Z = vert.z

^ already been tested, but I no longer have the examples

did I finally do it right?? XD
sincerely sorry I had such a problem explaining that. :(


ninja'd (not really, after taking 2 hrs to write this post)
Somelauw wrote:Because the question is poorly formulated, I will make exactly one shot at trying to understand it.
If this shot fails, I will simply give up.

You have code like this:
Code: Select all
def struct(**kwargs):
    for k in kwargs:
        print k


You call it like this:
Code: Select all
struct(a="bu32", b="bu32", c="bu32")


and it prints:
Code: Select all
a
c
b


instead of
Code: Select all
a
b
c


So what you want is to retrieve the parameters passed to a function in the order in which they were supplied?

exactly
User avatar
Tcll
 
Posts: 100
Joined: Wed Jan 01, 2014 6:36 pm

Re: UMC memory pointer system revisited

Postby Somelauw » Tue Jun 03, 2014 5:13 pm

Tcll wrote:exactly


I don't think that is possible.
As soon as the data is stored in a dictionary, the original order is completely lost.
Your best best is the inspect module. However, none of the methods there seem to be able to retrieve the order in which keyword arguments were passed.

You could change the api to this:
Code: Select all
struct(12, "x", bf32, "y", bf32, "z", bf32)

which is probably the shortest form that is possible.

A slightly longer form that is easier to manipulate from python is:
Code: Select all
struct(12, [("x", bf32), ("y", bf32), ("z", bf32)])


However, when I read your OP again, I very much doubt that this is actually answering your question.
Join the #python-forum IRC channel on irc.freenode.net!
Somelauw
 
Posts: 69
Joined: Tue Feb 12, 2013 8:30 pm

Re: UMC memory pointer system revisited

Postby Crimson King » Tue Jun 03, 2014 5:40 pm

Somelauw wrote:I don't think that is possible.
As soon as the data is stored in a dictionary, the original order is completely lost.
Your best best is the inspect module. However, none of the methods there seem to be able to retrieve the order in which keyword arguments were passed.


Wouldn't an OrderedDict serve that purpose? Maybe i'm missing something (the posts are far too long haha)
User avatar
Crimson King
 
Posts: 85
Joined: Fri Mar 08, 2013 2:42 pm
Location: Buenos Aires, Argentina

Re: UMC memory pointer system revisited

Postby micseydel » Tue Jun 03, 2014 6:16 pm

I wonder if this might help
Code: Select all
>>> def f(**kwargs):
   for key in kwargs:
      print key, kwargs[key]

      
>>> f(a=1, b=2, c=3)
a 1
c 3
b 2
>>>
>>> def g(**kwargs):
   for key in sorted(kwargs.keys()):
      print key, kwargs[key]

      
>>> g(a=1, b=2, c=3)
a 1
b 2
c 3

Although it doesn't preserve the order, if it's always going to follow ABC order, you can take advantage of that.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1223
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: UMC memory pointer system revisited

Postby Tcll » Wed Jun 04, 2014 5:49 pm

micseydel wrote:I wonder if this might help
Code: Select all
>>> def f(**kwargs):
   for key in kwargs:
      print key, kwargs[key]

      
>>> f(a=1, b=2, c=3)
a 1
c 3
b 2
>>>
>>> def g(**kwargs):
   for key in sorted(kwargs.keys()):
      print key, kwargs[key]

      
>>> g(a=1, b=2, c=3)
a 1
b 2
c 3

Although it doesn't preserve the order, if it's always going to follow ABC order, you can take advantage of that.

Tcll wrote:
Code: Select all
def ImportModel( FileType, Commands ):

    #global header:
    GHeader = struct( 16, # order not used here (this is what I'm going for, but right now would break the script)
        magic = string(4), # "MDL0"
        DataSize = bu32,
        version = bu32,
        BRRESPos = bs32 # this file's position in the outer archive
    )()

    sections = struct( -1, # struct size depends on used fields
        # order can still be used for this reason:
        '''
        Definitions,
        Bones,
        Vertices,
        Normals,
        Colors,
        UVs,'''+\
        ('''
        FurVectors,
        FurLayers,
        ''' if GHeader.version>9 else '')+'''
        Materials,
        TEVs,
        Objects,
        Textures,
        Pallets'''+\
        (''',
        Unk
        ''' if GHeader.version>10 else ''),

        Definitions = bu32,
        Bones = bu32,
        Vertices = bu32,
        Normals  = bu32,
        Colors   = bu32,
        UVs      = bu32,
        FurVectors = bu32,
        FurLayers  = bu32,
        Materials= bu32,
        TEVs = bu32,
        Objects  = bu32,
        Textures = bu32,
        Pallets  = bu32,
        Unk     = bu32,
    ) # note we're not calling a read here

    bounds3 = struct( 24,
        x = bf32, y = bf32, z = bf32,
        X = bf32, Y = bf32, Z = bf32
    )

    header = struct( -1,
        DataSections = sections
        MDL0Name = string( bu8, addr=bu32 )
        HeaderLength = bu32,
        MDL0Offset = bs32,
        unk1 = bu32,
        unk2 = bu32,
        vertCount = bu32,
        faceCount = bu32,
        unk3 = bu32,
        DefCount = bu32,
        unk_flags = bu32,
        unk5 = bu16,
        DataOffset = bu16,
        Bounds = bounds3
    )()



Somelauw wrote:
Tcll wrote:exactly


I don't think that is possible.
As soon as the data is stored in a dictionary, the original order is completely lost.
Your best best is the inspect module. However, none of the methods there seem to be able to retrieve the order in which keyword arguments were passed.

You could change the api to this:
Code: Select all
struct(12, "x", bf32, "y", bf32, "z", bf32)

which is probably the shortest form that is possible.

A slightly longer form that is easier to manipulate from python is:
Code: Select all
struct(12, [("x", bf32), ("y", bf32), ("z", bf32)])


However, when I read your OP again, I very much doubt that this is actually answering your question.


I made this thread with the idea of tackling multiple issues which revolve around the title.
the OP here tackles a different issue which has already been solved.
follow the last 10 to 15 posts before this post.

perhapse I could define a decorator that uses inspect and call tokenize upon script execution to get the order.
keep in mind the interface that provides these methods also executes these scripts. ;)

to give you a better idea of what I'm working with,
here's an IDE I've built (for building these scripts) that uses the interface:
Image(click for larger view)
^ it runs your scripts on files.

it doesn't work with struct() yet because I don't have recursive highlight testing supported.
but the tree stores the row and column with the text of the code to highlight.
I could pull the method from this for use with getting the order from the actual struct() call.
User avatar
Tcll
 
Posts: 100
Joined: Wed Jan 01, 2014 6:36 pm

Previous

Return to General Coding Help

Who is online

Users browsing this forum: Baidu [Spider], snippsat and 3 guests