When creating a GOB! you can specify some values for it, or leave this empty and go for the default values like so:
>> gb: make gob! []
== make custom! [offset: 100.0x100.0 size: 0.0x0.0 alpha: 255]
And this results in
>> gb
== make custom! [offset: 100.0x100.0 size: 0.0x0.0 alpha: 255]
Where
>> gb/offset
== 100.0x100.0
>> gb/size
== 0.0x0.0
>> gb/alpha
== 255
Now when taking a closer look at the GOB! code in t-gob.c
you can remark that there should be more to this standard GOB! than meets the eye. There could be a pane
, content
, data
as well as a type
and an OLD-OFFSET
too.
Let us test this out:
>> gb: make gob! [data: [my data here]]
== make custom! [offset: 100.0x100.0 size: 0.0x0.0 alpha: 255]
Now remarkable enough gb on its own looks still the same
>> gb
== make custom! [offset: 100.0x100.0 size: 0.0x0.0 alpha: 255]
Yet, now this is the case:
>> gb/data
== [my data here]
So what about some of the other attributes?
>> gb/pane
== []
>> gb/flags
== []
But not
>> gb/content
** Script Error: cannot pick content in path
** Where: console
** Near: [gb/content **]
** Line: 1
>> gb/parent
(i) Info: use WHY for error information
** Script Error: cannot pick parent in path
** Where: console
** Near: [gb/parent **]
** Line: 1
>> gb/type
** Script Error: cannot pick type in path
** Where: console
** Near: [gb/type **]
** Line: 1
But on line 93 of t-gob.c
there is an initialization of TYPE going on:
GOB_TYPE(a) = GOBT_NONE;
Be it initialized as 0 (enum from reb-gob.h
line 125), imo that should mean it could have been picked up.
-
What is the difference between the init of TYPE here and the other more successful inits?
-
Why is the content of the extra
data
information not shown when the GOB! gb is queried? -
It would be very neat to have some kind of dictionary of functions and terminology that in the first place will point to the place where the function is defined. (This for many
MACRO
's, theREB***
structures, thereb********
functions).