How to edit /View mezzanine functions ?
[1/7] from: jasonic:panix at: 19-Nov-2001 0:00
Want to quickly change /View request-color widget.
>> source request-color
Tried some cutnpaste into a new file of my own... load, do, attached to
buttons => nothing doing :-(
What's the basic trick for doing this kind of learn/edit ?
thanks
./Jason
[2/7] from: arolls:idatam:au at: 19-Nov-2001 16:42
The problem is that request-color is
defined somewhere deep in vid context-land. :)
And this means that some words maybe not
accessible in the global context.
The first one I see is color-lay:
>> color-lay
** Script Error: color-lay has no value
** Near: color-lay
When we just redefine request-color,
its function body block has been defined
in the global context. This means it
can no longer color-lay (also defined
somewhere in vid land).
This could help you
insert second :request-color [print "hello"]
but if you try to use words like color-lay
that are not defined in the global context
(like color-lay) then you will run into trouble.
I think this could work if I knew in which
context request-color was defined:
insert second :request-color bind [
if none? :color-lay [print "hi"]
] 'where-the-heck?
I will need to look through the system object for
a while to find where the heck the context is.
I'd like to make a search tool for that sort
of thing.
Anton.
[3/7] from: lmecir:mbox:vol:cz at: 19-Nov-2001 9:21
Hi Jason,
Anton described the source of your trouble.
OTOH, the words "know" their context (As has been described in
http://www.sweb.cz/LMecir/contexts.html For Anton: see the IN-OBJECT?
function, which can be used for Words, although not for Set-words, etc.)
while they aren't converted to strings. That means, that you can use the
blocks:
spec: third :request-color
body: second :request-color
After editing the block using INSERT, CHANGE, PICK etc. you can create a new
version of request-color e.g. like:
new-request-color: func (load mold spec) body
Cheers
Ladislav
<<Anton>>
The problem is that request-color is
defined somewhere deep in vid context-land. :)
And this means that some words maybe not
accessible in the global context.
The first one I see is color-lay:
>> color-lay
** Script Error: color-lay has no value
** Near: color-lay
When we just redefine request-color,
its function body block has been defined
in the global context. This means it
can no longer color-lay (also defined
somewhere in vid land).
This could help you
insert second :request-color [print "hello"]
but if you try to use words like color-lay
that are not defined in the global context
(like color-lay) then you will run into trouble.
I think this could work if I knew in which
context request-color was defined:
insert second :request-color bind [
if none? :color-lay [print "hi"]
] 'where-the-heck?
I will need to look through the system object for
a while to find where the heck the context is.
I'd like to make a search tool for that sort
of thing.
Anton.
<</Anton>>
<<Jason>>
[4/7] from: media:quazart at: 19-Nov-2001 8:56
Hi Ladislav (and contributors),
I just ran through your document (essay?) on words, contexts and bindings...
And I am humbled...
I never considered myself a master regarding this aspect of rebol, but now I
realize many things I did not quite "picture"... Although I'll have to
reference this a few times again, in order to absorb half of it... I am now
able to thread some new aspects of reboling with a little bit more assurance
A great read....
thanks for researching and compiling this long list of intricaties.
I'm almost affraid of what I'll find next...
:-D
-MAx
[5/7] from: jasonic:panix at: 19-Nov-2001 9:47
Anton, Ladislav
aah. thanks for both answers. opened my eyes to another cool strange level
of REBOL. I don't understand it yet. But you've shown me the path..
Jason: [heading off for the interpreter after breakfast to experiment with
contexts]
[6/7] from: lmecir:mbox:vol:cz at: 19-Nov-2001 17:12
Hi Max,
<<Max>>
Hi Ladislav (and contributors),
I just ran through your document (essay?) on words, contexts and bindings...
And I am humbled...
I never considered myself a master regarding this aspect of rebol, but now I
realize many things I did not quite "picture"... Although I'll have to
reference this a few times again, in order to absorb half of it... I am now
able to thread some new aspects of reboling with a little bit more assurance
A great read....
thanks for researching and compiling this long list of intricaties.
I'm almost affraid of what I'll find next...
:-D
-MAx
<</Max>>
I am pleased you enjoyed reading it :-) and recommend you to browse through
my Rebsite (Sites/Ladislav), which refers to more materials, that might be
useful.
Cheers
Ladislav
[7/7] from: ammonjohnson:yah:oo at: 19-Nov-2001 16:33
Hi,
Such search function is being developed in RIDE, it helped me to find,
'req-funcs/req-color/color-lay'.
HTH
Ammon