Debuging

Everything related to the development of modules in jamovi
Post Reply
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Debuging

Post by mcfanda@gmail.com »

Hi, it's me again. Two questions for the brave :-)

1) Is there a way tp access the UI via web browser. I see the project works on electron on top of tornado. I'd like to get directly on tornado 127.0.0.0:port in order to debug and inspect javescript via firebugs and Co.. I've tried using the ports advertised in the console but no joy there. Of course, any other debug strategy will help as well.

2) Can somebody point me to the part of the project that process the yaml keys in .u.a.yaml into the web components showed in the UI. That will help to understand how to define .setValue() data when filling in the UI component via ::update

thanks alot
marcello
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Debuging

Post by jonathon »

hey marcello,

you can hit F10 in jamovi, and it will bring up the js debug tools (you might need to click the blue bar along the top, to ensure the top level window has focus. jamovi uses a couple of iframes).

i'll get damo to come and answer Q 2.

cheers
dropmann
Posts: 79
Joined: Thu Feb 02, 2017 10:26 am

Re: Debuging

Post by dropmann »

hey marcello,

It's encouraging to see someone enthusiastic about jamovi. In regards to the UI javascript, I will be releasing a comprehensive overhaul of the system in the coming days. The beginnings of documentation will follow soon there-after. In regards to the .setValue() function accessible in the events.js files, the data that is to be past into it is of the form of the associated option. So for example: a CheckBox with the name 'mean' is connected to an option in the a.yaml called 'mean'. Because a CheckBox displays boolean information it will be reading and writing a boolean type to the underlying option. So ui.mean.setValue(true) would be appropriate.

Different controls support different data types:

Label: string
TextBox: string, number
ComboBox: String Enumeration
CheckBox: Boolean
RadioButton: boolean (converted to String Enumeration)
ListBox: Array

So in short, .setValue takes a data type for which it has been setup. Because the u.yaml is currently auto generated, the data type can be determined from the option with which it is associated. I will be finalizing things in the coming days and helpful documentation will soon follow. I hope this answers your question at least a little.

Thanks
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Debuging

Post by mcfanda@gmail.com »

Great, thanks, this help alot. I'm enthusiastic because I believe that if people like me are whining all the time against SPSS and lack of R UI and do nothing, they deserve paying the annual fee to SPSS. I also think that your project can make a difference only if supported by an enthusiastic community.
dropmann
Posts: 79
Joined: Thu Feb 02, 2017 10:26 am

Re: Debuging

Post by dropmann »

I completely agree :)
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Debuging

Post by mcfanda@gmail.com »

Hi, I have a first vanilla pre-alpha version of the Mixed models module. It works but It does not do anything :-) I'm sharing it for future reference (for when I get in trouble and ask help)

https://github.com/mcfanda/jamovi_mixed.git
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Debuging

Post by jonathon »

awesome :)
Post Reply