PDA

View Full Version : ComboBox.InsertItem


David REMD
03-22-2008, 05:40 PM
I am using this action in the Page "On Show". I have 21 items populating a ComboBox. I have the ComboBox, under the "Settings" tab, set to display 6 lines in the dropdown list. However, all 21 items populate the list and run off the page. No scroll bar appears. Little help, please?

jassing
03-23-2008, 01:24 AM
I am using this action in the Page "On Show". I have 21 items populating a ComboBox. I have the ComboBox, under the "Settings" tab, set to display 6 lines in the dropdown list. However, all 21 items populate the list and run off the page. No scroll bar appears. Little help, please?

While no help; I can assure you that this problem is across all products that I've used/tested.

azmanar
03-23-2008, 02:55 AM
Hi,

You can always control the number of items to be displayed on the properties pane of ComboBox.

David REMD
03-23-2008, 08:33 AM
Do you have an example? It doesn't work for me...still runs off the page...no scroll bars.

Intrigued
03-23-2008, 09:21 AM
I don't see an issue, seems to as expected. I used this code for my test:

for n=1,21 do
ComboBox.InsertItem("ComboBox1", n, n, "")
end

I even moved the app.s window so that the ComboBox item would have to repaint "up" and it worked as it should.

I'd like to see your code that created this issue you saw.

David REMD
03-23-2008, 09:50 AM
Intrigued,

My issue is not in populating the ComboBox with my data, it is with the number of items that display in the dropdown list. I want to limit the number to 6.

Here is the code that populates the list:
myvalues = {Name1="$Name1"};
result = HTTP.Submit(http://www.MyDomain.com/mylist.php, myvalues, SUBMITWEB_GET, 20, 80, nil, nil);
myvalues = {Url1="$Url1"};
result1 = HTTP.Submit(http://www.MyDomain.com/mylist.php, myvalues, SUBMITWEB_GET, 20, 80, nil, nil);
-- Insert a new item into the combobox at index.
ComboBox.InsertItem("ComboBox9", 2, result, result1);

I have the ComboBox Properties Settings set to 6. It does not stop at 6. It populates all 21 items in the list and runs off the page.

jassing
03-23-2008, 11:35 AM
While no help; I can assure you that this problem is across all products that I've used/tested.

That should have read -- all IR products....

Intrigued
03-23-2008, 01:02 PM
Intrigued,

My issue is not in populating the ComboBox with my data, it is with the number of items that display in the dropdown list. I want to limit the number to 6.

Here is the code that populates the list:
myvalues = {Name1="$Name1"};
result = HTTP.Submit(http://www.MyDomain.com/mylist.php, myvalues, SUBMITWEB_GET, 20, 80, nil, nil);
myvalues = {Url1="$Url1"};
result1 = HTTP.Submit(http://www.MyDomain.com/mylist.php, myvalues, SUBMITWEB_GET, 20, 80, nil, nil);
-- Insert a new item into the combobox at index.
ComboBox.InsertItem("ComboBox9", 2, result, result1);

I have the ComboBox Properties Settings set to 6. It does not stop at 6. It populates all 21 items in the list and runs off the page.

I understand. I used that code to populate the ComboBox with random data for the test. I also set the Lines to display in the dropdown to six (6). I then Preview'ed (F5) the application and the ComboBox worked properly for me. I am unable to duplicate the bug you see based on that.

Utilizing PHP and HTTP Actions like you have... sounds like the area of issue.

jassing
03-23-2008, 03:39 PM
I am unable to duplicate the bug you see based on that.

I've had that issue on various OS's with SUF7 (just now on AMS) TrueUpdate & VisualPatch... So there is something "different" between installations (os; setups, etc) that make it not so easy to diagnose.

Maybe if IR could allow regular old ActiveX's to be used; we coulse objects of a different kind... but that would introduce a whole new problem for running on target systems...

azmanar
03-23-2008, 03:58 PM
Hi David and Jassing,

I have created an example that proves AMS ComboBox number of display lines can be set by default at design time. It can also be controlled by your app users using radioboxes or etc.

In this example, by default the ComboBox will display 3 Dropdown items. Then users can choose either 5 or 10 display option. The changes can be seen live at runtime by using ComboBox.SetProperties() function.

OnShow will populate the ComboBox with Live Search Engines from a hardcoded table. After selecting one item, OnClick button will open a default browser.

I have not been able to upload files to this forum. So the example is in my server : www.azman.info/ams/DropDownControl.apz (http://www.azman.info/ams/DropDownControl.apz)

jassing
03-23-2008, 04:06 PM
Hi David and Jassing,

I have created an example that proves AMS ComboBox number of display lines can be set by default at design time.

"proves" is hardly appropriate here. Both David & I have seen it where the setting has ignored. You can choose to hang out in the "it works for me so it's not broken" camp or you can open up a bit and think "Gosh if two people are experiencing the same behaviour; maybe ther is a problem....

I'm not about to provide you with a flash movie of it failing to work for me; as you would just accuss me of altering the code....

-j

azmanar
03-23-2008, 04:23 PM
Hi Jassing,

Have you tried the example? Theres not much coding in it. At my end, the ComboBox settings are functioning. Intrigue has no problem too.

I suggest you open a ticket with IR.

jassing
03-23-2008, 04:26 PM
I suggest you open a ticket with IR.

I did, last year -- I don't see a point in opening another for AMS -- it was confirmed at the time as well.

azmanar
03-23-2008, 04:41 PM
Hi Jassing,

I hope the issue you faced will be resolved soon.

jassing
03-23-2008, 04:47 PM
Hi Jassing,

I hope the issue you faced will be resolved soon.

Ditto; but since I do only suf7 coding for a living; I'm not holding my breath -- An update for that hasn't been out in a long time.. I only got on the AMS board becuase I saw an interesting question to fix -- I only have the eval; so once that's over; I won't be here...

Cheers
-josh

Intrigued
03-23-2008, 05:03 PM
Odd, previous applications that I have created that use this Object, never came up in a support call, e-mail for any one of my products. It must only happen then, for those that see it, on a very few machines and under specific conditions.

This may be why there has not been an update. Perhaps I.R. has not even been able to duplicate this as well.

jassing
03-23-2008, 05:22 PM
Odd, previous applications that I have created that use this Object, never came up in a support call, e-mail for any one of my products. It must only happen then, for those that see it, on a very few machines and under specific conditions.

This may be why there has not been an update. Perhaps I.R. has not even been able to duplicate this as well.

Very limited in my conditions; it's jsut happened here in my test lab and a few customers (one refused to pay becuase of it; which is what prompted me to file a support incident) -- I guess IR replicated; and logged it.

I agree it's a minor issue all in all; so it doesn't suprise me it hasn't been fixed - my comment was to just let all know it does happen across products; and he's not alone.

David REMD
03-23-2008, 06:29 PM
It's definately not machine specific. I tested on 3 other machines and got the same result. What good is the ComboBox.InsertItem action, when populating the list with external data, if one can not control the object properties? Either this is a bug or there are other actions needed to control the number of lines to display. Still in need of a solution...

Intrigued
03-23-2008, 08:47 PM
It's odd this has not come up before (or has it?) in all the years this action has been available to us developers. And times that by all the applications that have gone out to clients. That's got to be in the 10s of thousdands, or more, interactions with that action.

Wild stuff there... I wish you the best in tracking that bug down. Perhaps, trying out a basic example like I did and seeing if that works. If not, then that would really get me scratching my head, as it works, has been working, for me fine.

*scene where ghosts are seen moving across the forums*

holtgrewe
03-23-2008, 08:56 PM
Is it possible to create this problem on a small single page project and post it so several sets of eyes could analyse this problem...? As well as IR.

If your example fails on everyone's system, it will certainly be easy to diagnose and fix. Environmental problems are sometimes impossible to diagnose.

jassing
03-23-2008, 09:20 PM
Perhaps, trying out a basic example like I did and seeing if that works.

I've replicated it w/o code -- all in the gui -- add some items, set the display # to 4 -- and it displayed all the items....

David REMD
03-23-2008, 09:21 PM
Here it is. Please let me know.

rexzooly
03-23-2008, 09:37 PM
Here it is. Please let me know.

ok i have tested this on my localhost server and i just get on select error line 6

David REMD
03-23-2008, 09:43 PM
My apologies. I am using a username & password verification in the actual application. I have removed it. Here is the updated .apz

rexzooly
03-23-2008, 09:44 PM
My apologies. I am using a username & password verification in the actual application. I have removed it. Here is the updated .apz

ok i will give this one a tst give me 5 :)

rexzooly
03-23-2008, 09:47 PM
ok now get no errors but i get around 22 blank fields and then numbers after the blank fields starting with 2.

David REMD
03-23-2008, 09:51 PM
Yes. Now remove the following code from the Page "On Show" and you will get the original result that prompted the post.

for n=2,21 do
ComboBox.InsertItem("ComboBox9", n, n, "")
end

rexzooly
03-23-2008, 09:52 PM
Yes. Now remove the following code from the Page "On Show" and you will get the original result that prompted the post.

for n=2,21 do
ComboBox.InsertItem("ComboBox9", n, n, "")
end

ok will do give me a moment.

.....EDITED

Ok i now see just blank fields
can i ask why this is like this
gCommunitiesData.gCommunitiesData
and this is like this?
gCommunitiesData = {gCommunitiesData="http://localhost/test/communities.php"};
i just wonder why you are including gCommunitiesData in the gCommunitiesData = part then calling gCommunitiesData.gCommunitiesData

David REMD
03-23-2008, 09:58 PM
The Combo Box should now list all 21 entries and run off the page...even though the properties is set to 6 lines to display. Have you recreated the same issue?

rexzooly
03-23-2008, 10:01 PM
The Combo Box should now list all 21 entries and run off the page...even though the properties is set to 6 lines to display. Have you recreated the same issue?

erm ok i seem to unable to get this problem i got it when i opend the first one
with the error but now its not doing it anymore since you posted this one
it dose not give me that many it just gives me 6 i have tested it but the contect from the php file is not been show in the combo

David REMD
03-23-2008, 10:07 PM
OK. Here is the .apz that is calling up the data from my domain to populate the ComboBox. As you will see, the "Lines to display in dropdown" is set to 6. However, all 21 items populate the list. Only 6 should display and a scroll bar should be present.

rexzooly
03-23-2008, 10:16 PM
OK. Here is the .apz that is calling up the data from my domain to populate the ComboBox. As you will see, the "Lines to display in dropdown" is set to 6. However, all 21 items populate the list. Only 6 should display and a scroll bar should be present.

ok why don't you get the info first then get the combo to open it its becasue its loading in to the box as you open it i think thats whats making the problem.
matbe get the info download it to the load system in maybe a text formate and then added or set it in to a table frist then call it that way.

/////EDITE

Yes i let it load and now i just get 6 you need to download the contect before the user users the combo.

David REMD
03-23-2008, 10:23 PM
Do you have a simple .apz you can share? I am not a programmer, although I am learning, and would not know where to start.

rexzooly
03-23-2008, 10:25 PM
Do you have a simple .apz you can share? I am not a programmer, although I am learning, and would not know where to start.

you and me both don't know if you have ready my A.B.B.O post but spent
along time on that i am not shure how to go about it but i can look in to it when
i get up if no one as give you a reply to how it can be done.

but its 03:24 here so going to bed in a bit + i can't see well another to program as my partner is asleep lol.

holtgrewe
03-23-2008, 10:28 PM
I was able to duplicate your problem.
It appears that as the comboBox is being populated it ignores the LinesToDisplay. Testing was sporatic in that if I constantly pulled down the box as it was loading the lines would remain at 21. If I waited until it was totally populated it would display 6 lines (sometimes), or so it seemed.

A workaround would be to reset the Lines To Display - I've included in the attachment. Not the most desireable results, but it works. In the attachement I'm resetting after each insert, but just one reset at the end will work as well.

hth

Please email IR on the bug...Now that it appears to be isolated.

David REMD
03-23-2008, 10:29 PM
Thanks rexzooly. I will take a look at the post and check back in the morning.

rexzooly
03-23-2008, 10:30 PM
I was able to duplicate your problem.
It appears that as the comboBox is being populated it ignores the LinesToDisplay. Testing was sporatic in that if I constantly pulled down the box as it was loading the lines would remain at 21. If I waited until it was totally populated it would display 6 lines (sometimes), or so it seemed.

A workaround would be to reset the Lines To Display - I've included in the attachment. Not the most desireable results, but it works. In the attachement I'm resetting after each insert, but just one reset at the end will work as well.

hth

Please email IR on the bug...Now that it appears to be isolated.


i ever thought about that way aswell :yes

rexzooly
03-23-2008, 10:31 PM
Thanks rexzooly. I will take a look at the post and check back in the morning.

ok i will still look in later for you about another way around but seems holtgrewe might have the best fix for the time being

David REMD
03-23-2008, 10:52 PM
Thanks for the workaround holtgrewe. I will notify IR of this issue....Thanks to you as well rexzooly.

rexzooly
03-23-2008, 11:16 PM
Thanks for the workaround holtgrewe. I will notify IR of this issue....Thanks to you as well rexzooly.

anytime :yes

Intrigued
03-23-2008, 11:40 PM
Take a look at using:

ComboBox.SetUpdate()

rexzooly
03-23-2008, 11:51 PM
Take a look at using:

ComboBox.SetUpdate()

i am going to have to read up on this i am not sure how this one
works :) learing time again like ever 5 mins for me as i just forget lol


:yes

Adam
03-24-2008, 11:33 AM
I have confirmed this i the latest version REF: 17319

The issue seems to only arise when you have the combo displayed while values are added.

One workaround that I found was to put this at the end:
ComboBox.SetProperties("ComboBox1", {LinesToDisplay=6});

we will fix this for the next version.

Adam Kapilik

jassing
03-24-2008, 11:37 AM
I have confirmed this i the latest version REF: 17319


Adam:
Note that it's not AMS specific, but across products -- I filled a similar issue a year or two ago with SUF...


-j

rexzooly
03-24-2008, 01:41 PM
hey David REMD sorry i am not going to be do any work on AMS till at lest end of the week but these guys work around seems to be best for the time being.

i have had to reinstall my system now i have to sort all my files out so i don't get backed up with un needed files i have 600 gig to go thought so and i no longer have AMS installed as of yet looking to get the system sorted before i
reinstall as i had some programs fight with it like VS2008 crashing it.

jassing
03-27-2008, 08:48 PM
I have confirmed this i the latest version REF: 17319
One workaround that I found was to put this at the end:
ComboBox.SetProperties("ComboBox1", {LinesToDisplay=6});

we will fix this for the next version.

Adam -- will SUF get these added properties as well?

maker56
07-12-2008, 05:22 PM
Thanks for all on the value information.