Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox show Elements but not .F. when nothing to be sho
Message
From
04/06/2018 15:41:47
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/06/2018 14:59:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01660530
Message ID:
01660545
Views:
63
>>
>>I'd vote against that. It wil polute your datasessions with many cursors, one for each combobox. If by any chance you're repeating the alias you might end up with a situation that is difficult to debug
>>In our case our comoboxes have the aSource[1,2] property and we set the rowsourcetype to 5-array and the rowsource to THIS.aSource.
>>It also gives you and advangtage that you can fill the combobox from a datacache that is living in another datasession by passing the combobox to the caching manager.
>>The ID you need is simply in the contols' value property, so no need to refer to an alias.fieldname.
>>
>>Walter,
>
>You are voting against without thinking IMHO. It is not realistic to think you would be polluting with many cursors. FWIW one would use private datasessions. Not using private data sessions cause more trouble than using a cursor for each combo\listbox you use. Even with a single data session for an entire application you can use cursor. I don't believe you would have combo\listboxes more than cursors allowed in a datasession.
>You might overlook the advantages of using a cursor over an array for a combobox and do more work. It is your choice.

It is a choice, and it's still too many cursor, even with private datasessions. Even if you use sys(2015) to create aliases... after a while, when you find yourself in the debugger, you may find dozens of cursors with meaningless names... (and yes, I too had to do a form with a few dozen combos - there was no other way) and just trying to find the one cursor that's giving you trouble is risky for your hair.

Of all the rowsource types in a combo, the array is, IMO, the least problematic, right after the manual. The problem of populating the array vs populating the .list is a tie, both require some lines to be written.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform