Custom Widget Names (Field Type) and ProfoundUI Visual Designer

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Mark Smart
Profound User
Posts: 22
Joined: Tue Apr 14, 2015 9:30 am
First Name: Mark
Last Name: Smart
Company Name: Anker International
Contact:

Custom Widget Names (Field Type) and ProfoundUI Visual Designer

Post by Mark Smart »

Hi All,

I have a custom widget with the name "info button", which works perfectly. I was having some problems creating a new widget, so I copied the working .js to anotherinfobutton.js and changed it's name property in pui.widgets.add to "another info button". This also works fine.

However, when I attempt to name a widget "todo list", I receive a "Widget name is invalid" alert when I try to put it on the design surface. I get the same message on another widget called "user messages". All I've done is change the name property from "another info button" to "todo list".

What's interesting is if I put a working "info button" on the design surface and look at the available field types, both "user messages" and "todo list" are listed. I just can't put them on the design surface without getting the "Widget name is invalid" alert.

Works:
// Define Base widget
pui.widgets.add({
name: "info button",
newId: "standardInfoButton",
menuName: "Information Button",

Doesn't work:
// Define Base widget
pui.widgets.add({
name: "todo button",
newId: "standardInfoButton",
menuName: "Information Button",

Has anybody else experienced this behaviour?

Many thanks,

Mark
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Custom Widget Names (Field Type) and ProfoundUI Visual Designer

Post by Scott Klement »

I'm at a conference right now, so this is off the top of my head, but...

There are two places where you have to specify the widget name, both the "pui.widgets.add" that you show, and "pui.toolbox.add" as well. Is it possible that one of them has 'todo list" and the other has something difference? If the two don't match, you can get an error like this.

Could that be it?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Custom Widget Names (Field Type) and ProfoundUI Visual Designer

Post by Scott Klement »

If it helps, you can find more info on custom widgets here:
http://www.profoundlogic.com/docs/displ ... om+scratch
Mark Smart
Profound User
Posts: 22
Joined: Tue Apr 14, 2015 9:30 am
First Name: Mark
Last Name: Smart
Company Name: Anker International
Contact:

Re: Custom Widget Names (Field Type) and ProfoundUI Visual Designer

Post by Mark Smart »

Thanks Scott,

You're spot on:

pui.widgets.add({
name: "todo list",
.
. //blah
.
pui.toolbox.add({
widget: "todo list",

Works a treat.

Cheers,

Mark
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest