Having recently migrated to V10 from V8 I have hit a few problems ,raised a few bug reports and Selwyn's blood pressure along the way. I am currently having trouble with the toppparent.refresh_layout() command. It works correctly when the topparent is a Form but not when the topparent is a browse (both worked fine in V8). I tried refreshing the resulting browse with {F5}key with no joy, it seems only the {PGUP} key will refresh the browse and bring up the correct query records. any suggestions as to how I get around this?
sample script:
selects a country and class and display results
I tried adding the sys_send_keys({PGUp}) to the end of the script, but no joy
sample script:
selects a country and class and display results
Code:
DIM SHARED varC_country as C DIM SHARED varC_result1 as C DIM varC_country_rl_def as C varC_country_rl_def = "k=prefix,{keylist_build(\"H=.05,1:25,2:9\",''+Name12,left(''+Country,25),left(''+Prefix,9))}{usage_c}" varC_result1 = ui_dlg_box("Listing By Country and Classification",<<%dlg% {region} Country:| [%@varC_country_rl_def%.40varC_country]; {endregion}; {line=1,0}; {region} <*15OK!OK> <15Cancel!CANCEL> {endregion}; %dlg%) IF varC_result1 = "ok" THEN DIM SHARED varC_Class as C DIM SHARED varC_result2 as C DELETE a_varC_Class DIM a_varC_Class[6] as c dim temp_list as c temp_list = <<%list% Civilian EMS Government Military Police Warbird %list% a_varC_Class.initialize(temp_list) varC_result2 = ui_dlg_box("Classification",<<%dlg% {region} Classification:| [%M%.40,5varC_Class^#a_varC_Class]; {endregion}; {line=1,0}; {region} <*15OK!OK> <15Cancel!CANCEL> {endregion}; %dlg%) IF varC_result2 = "ok" THEN templist = *for_each(tag,substr(tag,atc("}",tag,3)+1,1),varC_class) dim query_filter as c = "c1='" dim query_filler as c = "' .or. c1='" FOR each class in templist query_filter = query_filter-class-query_filler NEXT query_filter = left(query_filter,len(ut(query_filter))-10) query_country = "Country='"-varC_Country-"' .and. " query_filter = query_country+"("-query_filter-")" t = table.current() query.filter = query_filter query.order = "operator" qry = t.query_create() t.fetch_first() [COLOR="Blue"]Topparent.refresh_layout()[/COLOR] END IF END IF
Comment