This topic is locked
[SOLVED]

 custom barcode plugin

7/27/2020 3:10:50 AM
PHPRunner General questions
G
Grdimitris author

Im trying to write a barcode plugin follow instructions from
https://xlinesoft.com/phprunner/docs/how_to_create_a_custom_edit_control.htm
But when i run application i receive the message
Fatal error: Call to undefined method ViewBarCode::addJSSetting() in E:\xampp\htdocs\barcodedemo\classes\controls\Viewbarcode.php on line 13
What i
m missing?

The Viewbarcode.php starts with

<?php

class ViewBarCode extends ViewUserControl

{

public function initUserControl()

{

//

$this->output="canvas";

$this->type="ean13";

//

if ($this->settings["output"]) $this->output=$this->settings["output"];

if ($this->settings["type"]) $this->type=$this->settings["type"];

//

$this->addJSSetting("output", $this->output);

$this->addJSSetting("type", $this->type);

fhumanes 7/27/2020

Hello:
To write Plugins I do it "copying" codes from others that already exist since the documentation that exists many times was confusing.
In blog I have an example with a QR code, surely you can learn a lot from it.
Greetings,

Fernando

G
Grdimitris author 7/27/2020



Hello:
To write Plugins I do it "copying" codes from others that already exist since the documentation that exists many times was confusing.
In blog I have an example with a QR code, surely you can learn a lot from it.
Greetings,

Fernando


Thank you for your advice. I manage to solve my problem reading QR code plugin and other i already have purchased.

the correct syntax is

$this->addJSControlSetting("output", $this->output);

and in javascript in constructor i use var output: this.output;

Perfect. Thank you again for your advice.