Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Setting argument values in objects

From: rotenca:telvia:it at: 5-Nov-2001 18:19

> Hi list,
Hi
> i have the following problem with objects. > I have an object called "proctype-obj" having about ten arguments for > different processortypes. > I have variable ( word ) containing a string which is the path to the > objects argument like > proc: "proctype-obj/IntelPentium(R)processor" > I have another variable containig an integer value like > count: 2 > How can i set the argument in the object > (proctype-obj/IntelPentium(R)processor) to the value of the count
variable??? 1) Pay attention, you can't call a variable with this name: IntelPentium(R)processor because () is a paren! datatype 2) If proctype-obj is a global word, you can try: do reduce [to-set-path load proc 'count] 3) if both words are local to the word 'a for example, you must bind it before doing it: do bind reduce [to-set-path load proc 'count] 'a 4) if 'count it is not co-local to 'a, you must first bind the loaded proc and then append to the block to Do the word 'count --- Ciao Romano