Picture of Anders 4746
Registered 5 years 31 days
Anders 4746 Thursday, 24 October 2019, 12:19 PM
innovaphone.ui1.Switch
Hi,

We have a problem using:

innovaphone.ui1.Switch

When doing so, even using your example from: switch_demo.html,

new innovaphone.ui1.Div("background-color:#333333; height: auto; width: 95%; padding: 10px;margin: 10px; ");

We get the following out in the console:

###
Uncaught TypeError: innovaphone.ui1.Switch is not a constructor
###

We are running version: 13.0.2090.0.

Could you please advice on what to do about this?

Kind regards
TDH-Net
Picture of Daniel Deterding (innovaphone)
Moderator Registered 14 years 347 days
Daniel Deterding (innovaphone) Thursday, 24 October 2019, 12:33 PM
Re: innovaphone.ui1.Switch
Hello,

there are two possible issues:
1. Did you add the Switch javascript file to the makefile of your app?
You must add this line to the appname.mak in the root folder of your app:
include sdk/web1/ui1.switch/ui1.switch.mak

2. Did you add the javascript file to the htm file of your app? The htm file must contain this line:
<script src="web/ui1.switch/innovaphone.ui1.switch.js" type="text/javascript"></script>

Greetings,
Daniel
Picture of Anders 4746
Registered 5 years 31 days
Anders 4746 Thursday, 24 October 2019, 02:10 PM
Re: innovaphone.ui1.Switch
Hi again,

When adding the:
<script src="web/ui1.switch/innovaphone.ui1.switch.js" type="text/javascript"></script>

To our htm file i get:

Uncaught TypeError: innovaphone.ui1.Switch is not a constructor
at innovaphone.ui1.switch.js:5

I added:

include sdk/web1/ui1.switch/ui1.switch.mak

Is there anything else I can do to fix this?

Kind regards
Anders
Picture of Daniel Deterding (innovaphone)
Moderator Registered 14 years 347 days
Daniel Deterding (innovaphone) Thursday, 24 October 2019, 03:45 PM
Re: innovaphone.ui1.Switch
Can you verify the content of the file inside sdk/web1/ui1.switch/innovaphone.ui1.switch.js

Is the file complete on your disk or somehow truncated?

Greetings,
Daniel
Picture of Danilo
Registered 2 years 126 days
Danilo Thursday, 10 November 2022, 03:21 AM in response to Daniel Deterding (innovaphone)
Re: innovaphone.ui1.Switch
Daniel you need to do an adjust on the path of the script declaration, to work:
<script src="web1/ui1.switch/innovaphone.ui1.switch.js" type="text/javascript"></script>

BR.
Danilo
← You can define your color theme preference here