- Simone Olianti
- PowerBuilder
- Tuesday, 26 January 2021 11:20 AM UTC
Hello, after migrating to pb2019 R3 i'm experiencing a strange behaviour enabling themes on my application.
i've created a main general theme.json where i coded how the "window" should look and several other .json where i coded single window object names that i want to get a different background color.
Everything working fine in PB 2019 R2, but i get a strange error everytime i use a window listed on the "other" .json
this is my main "theme.json":
{
"meta-info":
{
"version":"190"
},
"commandbutton":
{
"drawing":true,
"normal-state":
{
"border-color":"#B3D7F3",
"background-color":"#B3D7F3",
"text-font":{"color":"#000000"}
},
"hover-state":
{
"border-color":"#3393DF",
"background-color":"#3393DF",
"text-font":{"color":"#FFFFFF"}
},
"pressed-state":
{
"border-color":"#0060AC",
"background-color":"#0060AC",
"text-font":{"color":"#FFFFFF"}
},
"focused-state":
{
"border-color":"#0078D7",
"background-color":"#0078D7",
"text-font":{"color":"#FFFFFF"}
},
"default-state":
{
"border-color":"#0078D7",
"background-color":"#0078D7",
"text-font":{"color":"#FFFFFF"}
},
"disabled-state":
{
"border-color":"#CCCCCC",
"background-color":"#CCCCCC",
"text-font":{"color":"#999999"}
}
},
"window":
{
"drawing":true,
"background-color":"#F0F0F0",
"title":
{
"active-state":
{
"background-color":"#262626",
"text-font":{"color":"#CCCCCC"}
},
"inactive-state":
{
"background-color":"#FFFFFF",
"text-font":{"color":"#4D4D4D"}
}
},
"statusbar":
{
"background-color":"#262626",
"text-font":{"color":"#CCCCCC"}
},
"border":
{
"margin":[1,30,1,1],
"active-state":
{
"border-color":"#4D4D4D"
},
"inactive-state":
{
"border-color":"#333333"
}
},
"mdiclient":
{
"background-color":"#5D5D5D"
},
"min-button":
{
"normal-state":
{
"button-image":{"file":"window-min-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-min-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-min-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-min-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-min-button-inactive.bmp"}
}
},
"max-button":
{
"normal-state":
{
"button-image":{"file":"window-max-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-max-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-max-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-max-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-max-button-inactive.bmp"}
}
},
"restore-button":
{
"normal-state":
{
"button-image":{"file":"window-restore-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-restore-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-restore-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-restore-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-restore-button-inactive.bmp"}
}
},
"close-button":
{
"normal-state":
{
"button-image":{"file":"window-close-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-close-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-close-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-close-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-close-button-inactive.bmp"}
}
},
"help-button":
{
"normal-state":
{
"button-image":{"file":"window-help-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-help-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-help-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-help-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-help-button-inactive.bmp"}
}
}
}
this is the other "theme-tabbed.json":{ "meta-info": { "version":"190" },
"wns_docord_gen_x":
{
"drawing":true,
"background-color":"#B5C9D2",
"title":
{
"active-state":
{
"background-color":"#262626",
"text-font":{"color":"#CCCCCC"}
},
"inactive-state":
{
"background-color":"#FFFFFF",
"text-font":{"color":"#4D4D4D"}
}
},
"statusbar":
{
"background-color":"#262626",
"text-font":{"color":"#CCCCCC"}
},
"border":
{
"margin":[1,30,1,1],
"active-state":
{
"border-color":"#4D4D4D"
},
"inactive-state":
{
"border-color":"#333333"
}
},
"mdiclient":
{
"background-color":"#5D5D5D"
},
"min-button":
{
"normal-state":
{
"button-image":{"file":"window-min-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-min-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-min-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-min-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-min-button-inactive.bmp"}
}
},
"max-button":
{
"normal-state":
{
"button-image":{"file":"window-max-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-max-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-max-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-max-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-max-button-inactive.bmp"}
}
},
"restore-button":
{
"normal-state":
{
"button-image":{"file":"window-restore-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-restore-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-restore-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-restore-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-restore-button-inactive.bmp"}
}
},
"close-button":
{
"normal-state":
{
"button-image":{"file":"window-close-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-close-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-close-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-close-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-close-button-inactive.bmp"}
}
},
"help-button":
{
"normal-state":
{
"button-image":{"file":"window-help-button-normal.bmp"}
},
"hover-state":
{
"button-image":{"file":"window-help-button-hover.bmp"}
},
"pressed-state":
{
"button-image":{"file":"window-help-button-pressed.bmp"}
},
"disabled-state":
{
"button-image":{"file":"window-help-button-disabled.bmp"}
},
"inactive-state":
{
"button-image":{"file":"window-help-button-inactive.bmp"}
}
}
}
}
as you can see the 2 .json are similar except that the second one got a different background color.
The issue is that if i keep both enabled everytime i use the "WNS_DOCORD_GEN_X" specified on the theme-tabbed.json i got a strange error on an global object that should remain always valid but instead it is null (???).
If i disable the "window" tag on the main .json everything working good.
if i set true "window" tag on the main .json and set other objects to false on the other .json i got the error.
Looks like something wrong in the main "window" tag but i cannot understand why....
any ideas?
tia,
simone
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.