D26196: Add multiple dataset in guessnumber activity

Johnny Jazeix noreply at phabricator.kde.org
Thu Dec 26 14:23:31 GMT 2019


jjazeix added inline comments.

INLINE COMMENTS

> sambhavkaul wrote in guessnumber.js:71
> Hi @jjazeix ,
> 
> By using the Qt function it by default shows '0' in user entry text box at the beginning and the '0' gets overwrites when we type. So, there is always a zero at beginning. And it gives output with commas instead of spaces after a group of 3 digits. So if you allow should I go with the Qt function or let it be with the js function ?
> 
> Thanks

It gives comma because you are using a locale that uses commas as separator. It should use the same locale as GCompris.
For the initial zero, can't you do a check on the string's emptiness?

> sambhavkaul wrote in Data.qml:32
> Hi,  @jjazeix
> 
> Should I use
> 
>   qsTr("Guess a number between %1 and %2").arg(minNumber).arg(maxNumber)
> 
> in js file as min and maxNumber can be accessed from there and also then there will be no use of objective and we can delete the objective attribute as well and instead of hard coding the values of max and min in data file it will be easier. Should I do this ?
> 
> Thanks

No, the aim is to have the objectives in the Data.qml files by dataset directly. The final goal of multiple dataset will be to be able to directly load new datasets dynamically without having to compile again the application so we don't want them in the js directly.
If it is not possible directly in the Data.qml, let's keep it this way.

REVISION DETAIL
  https://phabricator.kde.org/D26196

To: sambhavkaul, #gcompris_improvements
Cc: jjazeix, echarruau, kde-edu, sanjayshetty, parimalprasoon, harrymecwan, ganeshredcobra, asagtani, nityanandkumar, andreask, rahulyadav, narvaez, scagarwal, apol, timotheegiet, bcoudoin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20191226/baac057b/attachment-0001.html>


More information about the kde-edu mailing list