13 refinements seems excessive to me, but anyway
I know this thorny problem. Which native are you
wrapping?
I suggest building a path to the native.

>From an old thread in June with subject: "Re: problems creating a path",
I grabbed the flag-val function:

flag-val: func [flag val][either flag [val][]]
to-path compose [hello (flag-val none 'there) (flag-val true 'someone)]
;== hello/someone

Let's wrap the layout function as an example:

my-layout: func [
        specs
        /size pane-size
        /offset where
][
        do probe compose [
                (to-path compose [
                        layout 
                        (flag-val size 'size)
                        (flag-val offset 'offset)
                ]) (reduce [specs])
                (flag-val size pane-size)
                (flag-val offset where)
        ]
]

; test
view my-layout [box green] ; no refinements
view my-layout/size [box green] 90x90 ; one refinement
view my-layout/offset [box green] 190x190 ; the other refinement
view my-layout/size/offset [box green] 90x90 190x190 ; both refinements
view my-layout/offset/size [box green] 190x190 90x90 ; order reversed

Anton.

> the subject might be misleading, I'm not sure how to formulate it.
> 
> I'm this must have been discussed before.
> 
> What I wish to do is propagate my arguments to another func with 
> the same arg template, including refinements.  example:
> 
> a: func [arg1 arg2 /option val][
>       print "yahoo"
> ]
> 
> b: func third :a [
>       ; insert code here
>       print "yes sir!"
> 
>       either option [
>               a arg1 arg2 /option val
>       ][
>               a arg1 arg2
>       ]
> ]
> 
> 
> now in b I don't want the 'EITHER, cause every other refinement 
> adds a binary amount of possible combination.  The function I 
> have has 13 refinements... 106496 different combinations.. 
> 
> the function I must "improve" is a native, so I can't just source 
> it and re-implement it.  I really need to add some stuff before 
> it, and then let it do its stuff with all the refinements as if 
> it had been called directly...
> 
> 
> what's the best/fastest course of action?
> 
> 
> THANKS IN ADVANCE!
> 
> 
> -MAx

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to