Quote:

The other day i decided to script for the first time in a while. I needed a custom identifier that could accept properties but didnt really need any arguments. The following may help show what i mean
var %Variable = $SomeIdent.SomeProp
Instead you have to call it using $SomeIdent(filler).SomeProp


Hi,

I'm curious why you don't just use the argument as property then. A good idea imo, would be simply to use the parameter $1 as you would use $prop

alias SomeIdent {
if $1 == prop1 { return SomeValue }
if $1 == prop2 { return SomeOtherValue }
...
return ValueThatCameWithoutProperty
}

The usage would be: var %Variable = $SomeIdent(Someprop) if you want to use a property.
And var %Variable = $SomeIdent if you have no need for a property.

Regarding your second suggestion: I would LOVE to see that, great suggestion.

Greetz

Edited post

Last edited by FiberOPtics; 25/05/04 04:21 PM.