I'm writing a new class. When the calling function calls it, the parameters of the new class don't show up in the Formula pane.

Here's an outline of what it looks like:

class FEval(common.ulb:Generic) {
public:
  func FEval(Generic pparent)
    Generic.Generic(pparent)
  endfunc
 complex func iterate(complex pz)
   ;stuff here
 endfunc
protected:
  ;stuff
default:
  float param p
    caption = "power"
    default = 2
  endparam
  ; more params
}

The code compiles and runs, giving the proper result, assuming all the default parameters, but the parameters aren't shown and I can't change from the default values.

Something obvious?

I'm writing a new class. When the calling function calls it, the parameters of the new class don't show up in the Formula pane. Here's an outline of what it looks like: ```` class FEval(common.ulb:Generic) { public: func FEval(Generic pparent) Generic.Generic(pparent) endfunc complex func iterate(complex pz) ;stuff here endfunc protected: ;stuff default: float param p caption = "power" default = 2 endparam ; more params } ```` The code compiles and runs, giving the proper result, assuming all the default parameters, but the parameters aren't shown and I can't change from the default values. Something obvious?
 
0
reply

From what I see, if you instantiate a class directly,

Location location = new Location(0)

its parameters do not show up and are completely lost.

But if you instantiate it via your own parameter,

  Location location = new @test(0)
...
  Location param test
    default = Location
  endparam

then the class' parameters do show up.

I was just struggling with the exact same thing, and lamenting that almost none of the classes in common.ulb are actually useful as a standard library (my use case), but only useful for strategies (swapping out formulas at design time rather than in code)

From what I see, if you instantiate a class directly, `Location location = new Location(0)` its parameters do not show up and are completely lost. But if you instantiate it via your own parameter, ``` Location location = new @test(0) ... Location param test default = Location endparam ``` then the class' parameters _do_ show up. I was just struggling with the exact same thing, and lamenting that almost none of the classes in common.ulb are actually useful as a standard library (my use case), but only useful for strategies (swapping out formulas at design time rather than in code)
 
0
reply
48
views
2
replies
3
followers
live preview
Enter at least 10 characters.
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft