Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with multi-select popups
Message
De
07/05/1997 22:32:51
Charles Babb
Creative Fx Software & Grafx
Corrales, Nouveau Mexique, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Problems with multi-select popups
Divers
Thread ID:
00031268
Message ID:
00031268
Vues:
82
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?
Répondre
Fil
Voir

Click here to load this message in the networking platform