{ "header": { "version": 1, "type": "record" }, "body": { "record1": { "<1>": "declare function fieldcount, msg\r\n$insert msg_equates\r\n$insert logical\r\nequate CrLf$ to char(13):char(10)\r\n\r\nEpiPromptCnt = get_property( @window, '@EpiPromptCnt' )\r\nEpiControls = get_property( @window, '@EpiControls' )\r\nCurSameLayerNo = get_property( @window, '@CurSameLayer' )\r\nAllSameLayers = get_property( @window, '@EpiInfo' )\r\nAllSameLayers = fieldstore( AllSameLayers, char(248), CurSameLayerNo, 1, char(243):'' )\r\nAcnt = fieldcount( AllSameLayers, char(248))\r\nif CurSameLayerNo = Acnt then\r\n swap char(248):char(243) with '' in AllSameLayers\r\nend else\r\n swap char(243):char(248) with '' in AllSameLayers\r\nend\r\nconvert char(243) to '' in AllSameLayers ;* if only one and they delete\r\n* the char 243 is left hanging\r\nVoid = set_property( @window, '@EpiInfo', AllSameLayers )\r\n* now display the next same reactor layer\r\nNextLayerData = field( AllSameLayers, char(248), CurSameLayerNo )\r\n*\r\nValueCnt = fieldcount( NextLayerData, @vm )\r\n* so set_property does not propagate\r\nif ValueCnt < EpiPromptCnt then\r\n NextLayerData := str( @vm, EpiPromptCnt-ValueCnt-1 )\r\nend\r\n* ok\r\nNewLayer = false$\r\nif NextLayerData = str( @vm, EpiPromptCnt-1 ) then\r\n * add the @fms for the conc\r\n NextLayerData<1,1> = @fm\r\n NextLayerData<2,2> = @fm\r\n NewLayer = true$\r\nend\r\nconvert @vm to @rm in NextLayerData\r\nVoid = set_property( EpiControls, 'LIST':@rm:'LIST':@rm:'INVALUE', NextLayerData )\r\n.epi_conc_min_thick->selpos = 1:@fm:1\r\n.epi_conc_max_thick->selpos = 1:@fm:1\t\r\nNumLayers = fieldcount( AllSameLayers, char(248) ) \r\nButText = .same_reactor_button->text\r\nconvert '123456789' to '' in ButText\r\nButText = trim( ButText )\r\nButText := ' ':CurSameLayerNo\r\n.same_reactor_button->text = ButText\r\n.same_reactor_layer_desc->text = CurSameLayerNo:' of ':NumLayers+NewLayer\r\n* void = post_event( @window:'.EPI_MIN_THICK', 'GOTFOCUS', '' )\r\n* would need the above line if epi_min_thick had gotfocus event\r\nvoid = set_property( @window:'.EPI_MIN_THICK', 'FOCUS', 1 ) \r\nreturn 0" } } }