-
Notifications
You must be signed in to change notification settings - Fork 0
Porting Scripts to K‐Plus 4
This is a quick list of things you should take care of when porting KVS scripts from kvirc3 to K+ 4 We hope that you find this page helpful, but in the event that you have noticed an omission or error, please feel free to edit the page to correct it.
We are always looking for a way to improve our documentation.
Thank you and have fun ;)
The K+ Team
| Old Name | New Name | Applies to |
|---|---|---|
| $setCaption | $setWindowTitle | widget class |
| $setIcon | $setwindowIcon | widget class |
| $setColStretch | $setColumnStretch | layout class |
| $setDisplayStr | $displayStr | lcd class |
| $setDisplayInt | $displayInt | lcd class |
| $setDisplayDouble | $displayDouble | lcd class |
| $setLayoutOrientation | $setOrientation | groupbox class |
| $base64ToText | $base64ToAscii |
-
The widget class does not need anymore the "Customize" flag in
$setWFlags() -
The
$time()function has been removed in favour of$date:echo $date("F T",$unixtime) -
objects.bitBlthas been removed. If you want to paint on a widget, you must do it in its paintEvent using a painter. -
In
$str.replacethe order of the 2nd and 3rd parameter has been inverted: Old format:$str.replace(text, replace, search)New format:$str.replace(text, search, replace)This can create some bad problem with old scripts trying to trim a string using:
echo $str.replace(" the string ", "", " ");In the worst case, this will create an endless loop. -
Functions with
nocase()in the end have been removed. Check their counterpart removing nocase part. e.g.:$str.containsnocase("string","test")will be$str.contains("string","test",true)
K+ Wiki - 2017 - GNU-FDL v1.3
Contents of this page may need cleanup or updating.