[PLUGIN] ComboBox & ListBox

Post your completed addons to share with the community

Post » Sun Jan 08, 2012 2:03 pm

5. Check firebug it raises a "Index or size is negative or greater than the allowed amount" in l.246

exps.getValueSelected = function (ret)
{
var optionID = this.elem.options[this.elem.selectedIndex].id;
ret.set_any(optionID);
};

Depending on the context, it appears to be freezing the appli and preventing the passage to another layout.
I haven't been able to reproduce the freezing from a blank capx, but in soldjah's it clearly freezes and prevents to go to a second layout.


Example that raises the error, but still goes to layout1 (starting from layout2)
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Jan 08, 2012 3:51 pm

Changelog v1.14
[Fix] Expression getValueSelected occurs a bug when comparing.
Be aware that the first line's ID of a comboBox is 1, not 0.


@SoldjahBoy
OK, I looked your capx. I don't understand why you compare the getValueSelected without any options added in your comboBox... ? Maybe that's only for the example, but it's a part that occurs the issue.

Firstly, you have to add at least one line.
getValueSelected return the ID of the selected line, BUT, it starts from 1 (not from 0).
So you have to compare with '1' if you want to know if the first line is selected.
Let me know if it solved the bug.
Thankssepteven2012-01-08 15:51:18
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Sun Jan 08, 2012 8:12 pm

Will have to let you know tomorrow when I get up. Since you mention it I think I know what may be causing it. Might be easily fixed.

I'll let you know.

Thanks for the super fast updates :D

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Jan 10, 2012 9:39 am

@Septeven

That was Kyatric's example, not mine. I was aware that it was indexed from 1 not 0, but it didn't seem to make any difference to the error.

My error seemed to be existing since I was trying to retrieve the index selection from the object, whatever it was (I was using EVERY TICK -> SET TEXTBOX.TEXT to COMBOBOX VALUE SELECTED) at the time. The problem was that the box did not exist in the layout yet.

I can fix the problem by making a new condition "COMBOBOX.VISIBLE = VISIBLE" as part of the conditions for checking. This only returns the value when the object exists.

Hopefully that helps.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Jan 10, 2012 11:10 am

@SoldjahBoy
No it doesn't help, please send me YOUR capx.
I need it. Thx :)
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Tue Jan 10, 2012 8:09 pm

Great plugin septeven though I am having a bit of trouble. Take a look here:



I'm trying to get the textbox to say Ogre when selecting Ogre from the list but I can't seem to do it, I've tried both 1 and 0 for the selected line and ID. I can get the text box to say Ogre when selecting Dragon, the second line, but not the first.

What thing am I stupidly missing? Nickydude2012-01-10 20:11:21
B
72
S
25
G
9
Posts: 382
Reputation: 10,649

Post » Wed Jan 11, 2012 12:14 pm

[QUOTE=septeven] @SoldjahBoy
No it doesn't help, please send me YOUR capx.
I need it. Thx :)[/QUOTE]

I can't send you my capx, unfortunately. It belongs to a advertising company under intellectual rights property.

I will see if I can reproduce the bug in a new cpax file, once this project has been completed. Might be a few days.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Wed Jan 11, 2012 12:51 pm

@SoldjahBoy
You may take off all things in relation with your client.
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Wed Jan 11, 2012 12:54 pm

[QUOTE=septeven] @SoldjahBoy
You may take off all things in relation with your client.
[/QUOTE]

It would be easier to remake the error. There are over 300 events spread over 20+ groups.

It's a little bit... involved.

I'll get a new capx and see if I can reproduce.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Wed Jan 11, 2012 5:59 pm

@Nickydude
I fixed it. Can you wait still I fix the SoljahBoy's bug to release a corrected version ?
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests