Create Wisej.Extention Throwing an error - CounterUp.js control

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi,

I’m trying to create simple Wisej.Extention as explained in the Extension Guide and i don’t know what i’m missing.

Base on the JustGauge Extension , i have tried to create my own extension (Counter control based on the  countUp.js library [https://inorganik.github.io/countUp.js/]) without successful.

When i’m running the project i’m getting this error:

Wisej: onActionCreate Error creating:  { wisej.web.ext.CountUp….etc

just for mention , i put the scripts in the Platform folder and set the build action to Embedded Resource.

in the OnWebRender method  i called to the “wisej.web.ext.CountUp” as followed :


protected override void OnWebRender(dynamic config)
{
base.OnWebRender((object)config);

IWisejControl me = this;

config.className = “wisej.web.ext.CountUp”;
config.value = this.Value;
}

please see the project attached.
https://files.fm/u/pf7bjcny
Thanks!

Orel

  • You must to post comments
0
0

The CountUp extension is at /extensions. It includes all the options available to the widget.

  • You must to post comments
1
0

Hi Orel,

You are very close. It’s actually a lot simpler. I have attached the modified project. This one also fires an event on the server “CountTerminated” when it is finished counting and I added the Duration property. It works also at design time.

The main piece missing was the [assembly:WisejResource] property in AssemblyInfo.cs.

The event that I added uses a different syntax, instead of declaring the event as a field which takes memory even when not used, it uses the Events collection which adds the event handler only if the application subscribes to it.

If you look at the updated code I’m sure you’ll appreciate the simplicity and will be able to add the other properties that will let you configure the widget using the additional features..

HTH

Best,

Luca

 

  • Orel Gabay
    Thanks Luca!! i’m appreciating that you updated the project. i think that its is very important to add this main piece into the Extension Guide . Thanks Orel.
  • Frank (ITG)
    Hi Orel, I have added a note in the Extensions chapter in our documentation. Thanks for your hind. Best regards, Frank
  • You must to post comments
Showing 2 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json