View Full Version : Bug: C Stack Overflow
Intrigued
02-07-2010, 03:07 PM
I am seeing an c stack overflow with the attached project, an example.
Seems if I pass "-1" to clear the comboboxes' 'On Select' events, no problem. But if I try to set "1" a c stack overflow error happens
Just click on each combobox and select the second item to see the error
RizlaUK
02-07-2010, 03:21 PM
Hey Intrigued, hows you ?
its not a bug, its a bug fix that caused that, the ComboBox.SetSelected function had a bug in which it was not fireing the combos on select event, IR fixed that a few versions back and P.i.s.s.e.d a lot of people off (Dermot made a big issue about this, and rightly so!)
your example is causing a endless loop, once selected the combos go mad selecting each other and cause the stack overflow ........
RizlaUK
02-07-2010, 04:05 PM
on a side note, the same thing happens with a listbox, iv run into this myself in the past, and low and behold, worm saves the day again
use his IsInRect function to detect the active object and only allow the SetSelected function if we are over the target object
see attached (on mouse move and combo onselect)
Intrigued
02-08-2010, 08:05 PM
Thanks for clearing that up RizlaUK. Thanks Worm for sharing that function, it works like a champ.
It seems that defect could be fixed without much hassle for the dev(s) with access to the source.
Intrigued
02-08-2010, 08:19 PM
By the way, I'm using this to accomplish the same thing, with no need for a custom function:
focusedObject = Page.GetFocus()
if focusedObject=="ComboBox2" then
Page.SetFocus(this)
ComboBox.SetSelected("ComboBox1", 1)
end
and...
focusedObject = Page.GetFocus()
if focusedObject=="ComboBox1" then
ComboBox.SetSelected("ComboBox2", 1)
end
RizlaUK
02-09-2010, 02:27 AM
lol, i dident think of that, but you know me, sledgehammer + walnut!
i think all the SetSelected actions should have a optional argument (bSendMessage) to disable the sending of the *_ITEMCHANGED event
im sure this was called for (also by Dermot) but things like that seem to fall upon deaf ears!
Intrigued
02-09-2010, 04:28 PM
Them folks get busy up there juggling all those development projects around. I now understand what it must feel like, thanks to my current 9-to-5.
Least we have these workarounds to get us down the road.
RizlaUK
02-09-2010, 04:54 PM
yes, yes and yes
i understand the devs cant provide for us all and maintaining as many mainstream programs as IR are doing is not a easy task, but its all about delegation, i am in the middle of several huge projects (huge for me anyway) and if i could raise some small finance for the projects (yes, im looking for a sponsor ;)) then i would bring in the help i need to get the job done
till that happens, guess i keep people waiting as well, lol
thing is, id love to do this full time, it just don't pay the rent and trying to catch a break in this field has proved impossible, to many time wasters!
Intrigued
02-10-2010, 06:43 PM
I understand and agree on the delegation. A well ran organization should be able to shuffle around the workload. That's unless an organization is lucky enough to have to much work. :-)
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.