Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with multi-select popups
Message
From
07/05/1997 22:32:51
Charles Babb
Creative Fx Software & Grafx
Corrales, New Mexico, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Problems with multi-select popups
Miscellaneous
Thread ID:
00031268
Message ID:
00031268
Views:
84
I'm using a multi-select popup to "tag" records in a table. I have a logical field in the table called "tagged", and I'm using the code straight out of the manual for determining which prompts are tagged. It goes something like this:

define popup manpop from 15,5 to 24,57;
multiselect margin;
scroll in window pagewind
on selection popup manpop do whatags
hide popup manpop

(Goes through various @, says and gets, until it reaches a checkbox control with a valid clause (below) that determines whether to "populate" the popup with values from the table:)

function chkit
parameters whatfld
if mmanual = 1 && the checkbox value
for i = 1 to reccount()
define bar i of manpop ;
prompt provider.skuid
if .not. eof()
skip
endif
if eof()
exit
endif
endfor
endif
return .t.

(After returning from the checkbox valid(), the popup is activated. The following is the "on selection popup" code:)

procedure whatags
sele provider
for i = 1 to cntbar('manpop')
if mrkbar("manpop",i)
m = prmbar('manpop',i)
seek m
if found()
replace tagged with .t.
endif
endif
endif
endfor

This works just fine if you select or "mark" individual prompts with the , the records get tagged. It works also if you mark a prompt, then mark another with Ctrl-.

The weird thing is, if you mark one prompt, then hold down Shift and mark say 10 of the prompts, when the procedure evaluates the "marked" prompts with mrkbar(), only the last prompt gets noticed as being "marked". I've even had a debug window open with
mrkbar("manpop" , ) 1 thru 10 hard coded in, and it will show the prompts as "marked", but the function doesn't recognize any but the last!

Any suggestions out there?
Reply
Map
View

Click here to load this message in the networking platform