Variable Interface

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Variable Interface

Post by chris »

I implemented drag & drop. Let's see how long until someone finds a bug :)

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Variable Interface

Post by Vadi »

Doesn't see to crash, though it's a bit confusing that not everything so far is listed/saved - ie making a new group and a new variable in it doesn't always store the variable in the group, but dragging a pre-existing one to it adds it. I think that's something that'll be more testable later on.

I'm not certain that the 'to delete the variable, set it to nil' tip is needed - I think it'll be more confusing to new users, who can just use the delete button. Experienced users will play around with it and will be happy to see that setting it to nil will delete it.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Variable Interface

Post by chris »

Try clicking the 'save' button, the issue with dragging without clicking save is that the call to save the variable is never completed because the item was never de-selected. Calling a save before the move might be the way to go about it.

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Variable Interface

Post by Rakon »

Just a suggestion, but would it be possible to group variables by namespace for the default? Say then, all the global variables would be in one group and easier to not screw around with to accidentally delete them.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Variable Interface

Post by Vadi »

Are they not already grouped?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Variable Interface

Post by Vadi »

If you make a new profile and connect, it crashes:


Program received signal SIGSEGV, Segmentation fault.
dlgTriggerEditor::repopulateVars (this=0x0) at dlgTriggerEditor.cpp:5094
5094 treeWidget_vars->setUpdatesEnabled(false);
(gdb) bt
#0 dlgTriggerEditor::repopulateVars (this=0x0) at dlgTriggerEditor.cpp:5094
#1 0x00000000005751c0 in XMLexport::writeHost (this=0x7fffffffa1d0, pT=0x1b721f0) at XMLexport.cpp:400
#2 0x0000000000577902 in XMLexport::exportHost (this=0x7fffffffa1d0, device=<optimized out>) at XMLexport.cpp:205
#3 0x00000000004613fe in Host::installPackage (this=0x1b721f0, fileName=..., module=0) at Host.cpp:990
#4 0x0000000000471ffc in dlgConnectionProfiles::slot_connectToServer (this=0x185ade0) at dlgConnectionProfiles.cpp:1184


It's fine to connect on that profile on the next launch though.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Variable Interface

Post by chris »

Fixed this problem. Good catch

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Variable Interface

Post by Vadi »

Could you give update on the status of this feature? ie what do you feel there's still work left to do on?

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Variable Interface

Post by chris »

I would say it's fairly complete, all thats missing is a hook into the search box. It really just needs to be tested thoroughly and have icons put in for the main menu bar. the only new feature would be to hide certain variables, which is already coded in but not enabled.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Variable Interface

Post by Vadi »

Okay, that's pretty great.

Some comments then, little things to improve on:
- could sorting be done irrespectable of capitals or not? So Z is not before a
- tables right now have their name as the value, which makes it impossible to tell an empty table from a variable that has the value of it's same name (you can only tell by this 'symptom'). I'd prefer it to say the tostring(table) version, ie table: 0x<memory address> bit, so you can tell. Perhaps make the variable value field uneditable as well then in that case (since we'll be taking the "avoid mistakes" way and adding 'hidden variables', we can use this form of 'protection' too)
- the interface for the right part could be improved, do you have any plans for this in mind or would you want me to make a design?
- clicking on Variables and then Add Group (to, as I see of it, make a new table value - if that differs from New Variable) crashes:

Program received signal SIGSEGV, Segmentation fault.
0x00000000004aeea1 in dlgTriggerEditor::addVar (this=0x21b06b0, isFolder=true) at dlgTriggerEditor.cpp:2433
2433 QStringList pData = pParent->data(0, Qt::UserRole).toStringList();//use lua types to set the first stringlist field to type
(gdb) bt
#0 0x00000000004aeea1 in dlgTriggerEditor::addVar (this=0x21b06b0, isFolder=true) at dlgTriggerEditor.cpp:2433
#1 0x00000000004ba54a in slot_addVarGroup (this=<optimized out>) at dlgTriggerEditor.cpp:1659
#2 dlgTriggerEditor::slot_add_new_folder (this=<optimized out>) at dlgTriggerEditor.cpp:5995

- it doesn't seem to be possible to add values to an indexed table (giving the key a value of a number and saving it reverts it to what it was before)
- similarly, it's not possible to tell which keys are indexed ones, because the type of key isn't shown. So having a keys at [1] and at ["1"], it's not possible to tell them apart.
- the tooltips for save checkboxes don't seem to be coming up?

It's looking very nice so far, serialization works well too!

Post Reply