evertonlb Posted August 1, 2013 Report Share Posted August 1, 2013 Pessoal, to roendo unhas já faz tempo, já fiz testes, mudei refiz, alterei.. só não deletei tudo! rsrsrsrO que acontece é o seguinte:Tenho um cadastro de disciplinas, neste cadastro eu gravo até 5 descrições, que são as tópicos ensinados aos alunos.Então em cada turma aberta, eu linko as disciplinas e consequentemente os tópicos.Fiz uma opção de avaliação, para que o professor assinale se o aluno aprendeu o tópico ou não.Como são várias disciplinas, e cada disciplina pode ter 5 tópicos, eu fiz com que o operador escolha a turma, o aluno e depois disso eu monto o rFolder com as disciplinas daquela turma e em cada aba eu coloco os tópicos referentes a disciplina, e dou os get´s.. até aqui ta tudo certo..o que ta acontecendo é que minhas variáveis sempre são somente as ultimas.. tipo, fiz um for/next para inicializar as variáveis. for n_td := 1 to len( a_Disci) __c_ := strzero( n_td, 2, 0 ) if empty( qtde_abas ) qtde_abas := str(n_Td ) else qtde_abas := qtde_Abas + "," + alltrim( str(n_Td ) ) endif n_GetAval1_&__c_. := 0 n_GetAval2_&__c_. := 0 n_GetAval3_&__c_. := 0 n_GetAval4_&__c_. := 0 n_GetAval5_&__c_. := 0 * c_GetAval1_&__c_. := space(10) c_GetAval2_&__c_. := space(10) c_GetAval3_&__c_. := space(10) c_GetAval4_&__c_. := space(10) c_GetAval5_&__c_. := space(10) next e depois de inicializada as variáveis eu coloquei elas na Aba desta maneira.: if len( a_DCodi ) > 0 for n_Cd2 := 1 to len( a_DCodi) * c_nGet := strzero( n_Cd2, 2, 0 ) * select Topicos set order to 03 go top * if dbseek( alltrim( a_DCodi[n_Cd2] + TurmaEscolhida + strzero( nRad1, 2, 0 ) + strzero( val( nCbx2 ), 4, 0 ) ) ) * CodTurmaVet := a_DCodi[n_Cd2] aadd( a_AvlTp, { CodTurmaVet, ITEM_FORM } ) * * @ 40,20 Say ITEM_LN01 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 75,20 Say ITEM_LN02 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 110,20 Say ITEM_LN03 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 145,20 Say ITEM_LN04 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 180,20 Say ITEM_LN05 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 * * @ 40,610 get oGet1&c_nGet. VAR c_GetAval1_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 75,610 get oGet2&c_nGet. VAR c_GetAval2_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 110,610 get oGet3&c_nGet. VAR c_GetAval3_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 145,610 get oGet4&c_nGet. VAR c_GetAval4_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 180,610 get oGet5&c_nGet. VAR c_GetAval5_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" valid GrAvalFolder( a_AvlTp, a_DCodi, a_Disci, TurmaEscolhida, strzero( nRad1, 2, 0 ), strzero( val( nCbx2 ), 4, 0 ), c_GetAval1_&c_nGet., c_GetAval2_&c_nGet., c_GetAval3_&c_nGet., c_GetAval4_&c_nGet., c_GetAval5_&c_nGet., c_nGet ) * endif next endif Então não importa qtas abas eu tenha, as variáveis sempre serão da ultima.. No caso se tenho 4 abas eu teria que ter na Aba 01 a variável c_GetAval1_01, e na Aba 02 a variável c_GetAval1_02... mas sempre fico só com a ultima... a c_GetAval0_05. Como posso fazer para que cada aba tenha sua variável distinta? Ps.: Desculpem o post longo e por ter me enrolado muito... Att. Quote Link to comment Share on other sites More sharing options...
AnaCatacombs Posted August 1, 2013 Report Share Posted August 1, 2013 Tenta colocar esse código no INIT da dialog. Quote Link to comment Share on other sites More sharing options...
Arthur Silvestre Posted August 1, 2013 Report Share Posted August 1, 2013 ' if dbseek( alltrim( a_DCodi[n_Cd2] + TurmaEscolhida + strzero( nRad1, 2, 0 ) + strzero( val( nCbx2 ), 4, 0 ) ) ) ' retorna .T. em todos os casos ? Quote Link to comment Share on other sites More sharing options...
evertonlb Posted August 1, 2013 Author Report Share Posted August 1, 2013 Tenta colocar esse código no INIT da dialog. No INIT eu já chamo a função que cria as abas e inicializa as variáveis! Att. Quote Link to comment Share on other sites More sharing options...
evertonlb Posted August 1, 2013 Author Report Share Posted August 1, 2013 ' if dbseek( alltrim( a_DCodi[n_Cd2] + TurmaEscolhida + strzero( nRad1, 2, 0 ) + strzero( val( nCbx2 ), 4, 0 ) ) ) ' retorna .T. em todos os casos ? Não Arthur, somente quando acha a sentença, porque posso ter a disciplina linkada na turma, mas esta disciplina pode não ter tópicos para o bimestre, entende? A montagem das abas esta correta, até consigo gravar os dados e tals.. mas se eu fizer a avaliação em duas abas, os get´s da segunda da aba estão com os valores da primeira. Não posso deixar assim, vai que o operador decida alterar os dados da Aba 01 depois de já ter digitado da Aba 05!!! Att. Quote Link to comment Share on other sites More sharing options...
AnaCatacombs Posted August 1, 2013 Report Share Posted August 1, 2013 Eu tenho um código quase igual a esse, e lembro que tive um problema parecido. Coloquei no evento de inicia a dialog e funcionou corretamente.Tente inverter seu código: Declarar as variaveis antes, colocar a criação do folder fora do Init da dialog, e colocar no INIT da dialog esse código. É um teste que vale a pena tentar. Arthur, não acho que esse seja o problema. o oGet01, deve ficar na aba 1, o oGet02 na aba 2. Esse condicional, faria não colocar em nenhuma aba, e não colocar na aba errada. Quote Link to comment Share on other sites More sharing options...
evertonlb Posted August 1, 2013 Author Report Share Posted August 1, 2013 Fazend Eu tenho um código quase igual a esse, e lembro que tive um problema parecido. Coloquei no evento de inicia a dialog e funcionou corretamente.Tente inverter seu código: Declarar as variaveis antes, colocar a criação do folder fora do Init da dialog, e colocar no INIT da dialog esse código. É um teste que vale a pena tentar. Arthur, não acho que esse seja o problema. o oGet01, deve ficar na aba 1, o oGet02 na aba 2. Esse condicional, faria não colocar em nenhuma aba, e não colocar na aba errada. Fazendo como Ana? Assim? ACTIVATE DIALOG oForm_AvalDisci ON INIT ( Ini_oForm_AvalDIsci() ) // Função que cria folder e inicia variáveis! Att. Quote Link to comment Share on other sites More sharing options...
AnaCatacombs Posted August 1, 2013 Report Share Posted August 1, 2013 Posta sua função que eu vou fazer um exemplo e te mando. Quote Link to comment Share on other sites More sharing options...
evertonlb Posted August 1, 2013 Author Report Share Posted August 1, 2013 Posta sua função que eu vou fazer um exemplo e te mando. Static Function Ini_oForm_AvalDIsci() local qtde_abas := "" local oGet1, oGet2, oGet3, oGet4, oGet5, oMemo * public oGet101, oGet201, oGet301, oGet401, oGet501,; oGet102, oGet202, oGet302, oGet402, oGet502,; oGet103, oGet203, oGet303, oGet403, oGet503,; oGet104, oGet204, oGet304, oGet404, oGet504,; oGet105, oGet205, oGet305, oGet405, oGet505,; oGet106, oGet206, oGet306, oGet406, oGet506,; oGet107, oGet207, oGet307, oGet407, oGet507,; oGet108, oGet208, oGet308, oGet408, oGet508,; oGet109, oGet209, oGet309, oGet409, oGet509,; oGet1010, oGet2010, oGet3010, oGet4010, oGet5010,; oGet1011, oGet2011, oGet3011, oGet4011, oGet5011,; oGet1012, oGet2012, oGet3012, oGet4012, oGet5012,; oGet1013, oGet2013, oGet3013, oGet4013, oGet5013,; oGet1014, oGet2014, oGet3014, oGet4014, oGet5014,; oGet1015, oGet2015, oGet3015, oGet4015, oGet5015,; oGet1016, oGet2016, oGet3016, oGet4016, oGet5016,; oGet1017, oGet2017, oGet3017, oGet4017, oGet5017,; oGet1018, oGet2018, oGet3018, oGet4018, oGet5018,; oGet1019, oGet2019, oGet3019, oGet4019, oGet5019 * Public c_GetAval1_01 := space(10) public c_GetAval2_01 := space(10) public c_GetAval3_01 := space(10) public c_GetAval4_01 := space(10) public c_GetAval5_01 := space(10) * Public c_GetAval1_02 := space(10) Public c_GetAval2_02 := space(10) Public c_GetAval3_02 := space(10) Public c_GetAval4_02 := space(10) Public c_GetAval5_02 := space(10) * Public c_GetAval1_03 := space(10) Public c_GetAval2_03 := space(10) Public c_GetAval3_03 := space(10) Public c_GetAval4_03 := space(10) Public c_GetAval5_03 := space(10) * Public c_GetAval1_04 := space(10) Public c_GetAval2_04 := space(10) Public c_GetAval3_04 := space(10) Public c_GetAval4_04 := space(10) Public c_GetAval5_04 := space(10) * Public c_GetAval1_05 := space(10) Public c_GetAval2_05 := space(10) Public c_GetAval3_05 := space(10) Public c_GetAval4_05 := space(10) Public c_GetAval5_05 := space(10) * Public c_GetAval1_06 := space(10) Public c_GetAval2_06 := space(10) Public c_GetAval3_06 := space(10) Public c_GetAval4_06 := space(10) Public c_GetAval5_06 := space(10) * Public c_GetAval1_07 := space(10) Public c_GetAval2_07 := space(10) Public c_GetAval3_07 := space(10) Public c_GetAval4_07 := space(10) Public c_GetAval5_07 := space(10) * Public c_GetAval1_08 := space(10) Public c_GetAval2_08 := space(10) Public c_GetAval3_08 := space(10) Public c_GetAval4_08 := space(10) Public c_GetAval5_08 := space(10) * Public c_GetAval1_09 := space(10) Public c_GetAval2_09 := space(10) Public c_GetAval3_09 := space(10) Public c_GetAval4_09 := space(10) Public c_GetAval5_09 := space( 10 ) * Public c_GetAval1_10 := space(10) Public c_GetAval2_10 := space(10) Public c_GetAval3_10 := space(10) Public c_GetAval4_10 := space(10) Public c_GetAval5_10 := space( 10 ) * Public c_GetAval1_11 := space(10) Public c_GetAval2_11 := space(10) Public c_GetAval3_11 := space(10) Public c_GetAval4_11 := space(10) Public c_GetAval5_11 := space( 10 ) * Public c_GetAval1_12 := space(10) Public c_GetAval2_12 := space(10) Public c_GetAval3_12 := space(10) Public c_GetAval4_12 := space(10) Public c_GetAval5_12 := space( 10 ) * Public c_GetAval1_13 := space(10) Public c_GetAval2_13 := space(10) Public c_GetAval3_13 := space(10) Public c_GetAval4_13 := space(10) Public c_GetAval5_13 := space( 10 ) * Public c_GetAval1_14 := space(10) Public c_GetAval2_14 := space(10) Public c_GetAval3_14 := space(10) Public c_GetAval4_14 := space(10) Public c_GetAval5_14 := space( 10 ) * Public c_GetAval1_15 := space(10) Public c_GetAval2_15 := space(10) Public c_GetAval3_15 := space(10) Public c_GetAval4_15 := space(10) Public c_GetAval5_15 := space( 10 ) * Public c_GetAval1_16 := space(10) Public c_GetAval2_16 := space(10) Public c_GetAval3_16 := space(10) Public c_GetAval4_16 := space(10) Public c_GetAval5_16 := space( 10 ) * Public c_GetAval1_17 := space(10) Public c_GetAval2_17 := space(10) Public c_GetAval3_17 := space(10) Public c_GetAval4_17 := space(10) Public c_GetAval5_17 := space( 10 ) * Public c_GetAval1_18 := space(10) Public c_GetAval2_18 := space(10) Public c_GetAval3_18 := space(10) Public c_GetAval4_18 := space(10) Public c_GetAval5_18 := space( 10 ) * * * Public n_GetAval1_01 := 0 public n_GetAval2_01 := 0 public n_GetAval3_01 := 0 public n_GetAval4_01 := 0 public n_GetAval5_01 := 0 * Public n_GetAval1_02 := 0 Public n_GetAval2_02 := 0 Public n_GetAval3_02 := 0 Public n_GetAval4_02 := 0 Public n_GetAval5_02 := 0 * Public n_GetAval1_03 := 0 Public n_GetAval2_03 := 0 Public n_GetAval3_03 := 0 Public n_GetAval4_03 := 0 Public n_GetAval5_03 := 0 * Public n_GetAval1_04 := 0 Public n_GetAval2_04 := 0 Public n_GetAval3_04 := 0 Public n_GetAval4_04 := 0 Public n_GetAval5_04 := 0 * Public n_GetAval1_05 := 0 Public n_GetAval2_05 := 0 Public n_GetAval3_05 := 0 Public n_GetAval4_05 := 0 Public n_GetAval5_05 := 0 * Public n_GetAval1_06 := 0 Public n_GetAval2_06 := 0 Public n_GetAval3_06 := 0 Public n_GetAval4_06 := 0 Public n_GetAval5_06 := 0 * Public n_GetAval1_07 := 0 Public n_GetAval2_07 := 0 Public n_GetAval3_07 := 0 Public n_GetAval4_07 := 0 Public n_GetAval5_07 := 0 * Public n_GetAval1_08 := 0 Public n_GetAval2_08 := 0 Public n_GetAval3_08 := 0 Public n_GetAval4_08 := 0 Public n_GetAval5_08 := 0 * Public n_GetAval1_09 := 0 Public n_GetAval2_09 := 0 Public n_GetAval3_09 := 0 Public n_GetAval4_09 := 0 Public n_GetAval5_09 := 0 * Public n_GetAval1_10 := 0 Public n_GetAval2_10 := 0 Public n_GetAval3_10 := 0 Public n_GetAval4_10 := 0 Public n_GetAval5_10 := 0 * Public n_GetAval1_11 := 0 Public n_GetAval2_11 := 0 Public n_GetAval3_11 := 0 Public n_GetAval4_11 := 0 Public n_GetAval5_11 := 0 * Public n_GetAval1_12 := 0 Public n_GetAval2_12 := 0 Public n_GetAval3_12 := 0 Public n_GetAval4_12 := 0 Public n_GetAval5_12 := 0 * Public n_GetAval1_13 := 0 Public n_GetAval2_13 := 0 Public n_GetAval3_13 := 0 Public n_GetAval4_13 := 0 Public n_GetAval5_13 := 0 * Public n_GetAval1_14 := 0 Public n_GetAval2_14 := 0 Public n_GetAval3_14 := 0 Public n_GetAval4_14 := 0 Public n_GetAval5_14 := 0 * Public n_GetAval1_15 := 0 Public n_GetAval2_15 := 0 Public n_GetAval3_15 := 0 Public n_GetAval4_15 := 0 Public n_GetAval5_15 := 0 * Public n_GetAval1_16 := 0 Public n_GetAval2_16 := 0 Public n_GetAval3_16 := 0 Public n_GetAval4_16 := 0 Public n_GetAval5_16 := 0 * Public n_GetAval1_17 := 0 Public n_GetAval2_17 := 0 Public n_GetAval3_17 := 0 Public n_GetAval4_17 := 0 Public n_GetAval5_17 := 0 * Public n_GetAval1_18 := 0 Public n_GetAval2_18 := 0 Public n_GetAval3_18 := 0 Public n_GetAval4_18 := 0 Public n_GetAval5_18 := 0 * public oFld4, n_Cd2, QtdeDIsci, TPForm, c_nGet public _AbaAnt_4 := 01 public _AbaAnt_5 := "01" * public a_Disci := {} public a_Itens := {} // 770, 480 public a_DCodi := {} public a_AvlTp := {} * Select Disciplina set order to 03 go top * if dbseek( TurmaEscolhida ) do while DIS_TURM == TurmaEscolhida NomeDisci := DIS_DISC aadd( a_Disci, alltrim( DIS_DISC ) ) aadd( a_DCodi, DIS_CODI ) skip enddo else MsgAlert( "Não foi encontrada nenhuma DISCIPLINA vinculada a TURMA escolhida!", "Atenção" ) oForm_AvalDisci:end() return .t. endif for n_td := 1 to len( a_Disci) __c_ := strzero( n_td, 2, 0 ) if empty( qtde_abas ) qtde_abas := str(n_Td ) else qtde_abas := qtde_Abas + "," + alltrim( str(n_Td ) ) endif n_GetAval1_&__c_. := 0 n_GetAval2_&__c_. := 0 n_GetAval3_&__c_. := 0 n_GetAval4_&__c_. := 0 n_GetAval5_&__c_. := 0 * c_GetAval1_&__c_. := space(10) c_GetAval2_&__c_. := space(10) c_GetAval3_&__c_. := space(10) c_GetAval4_&__c_. := space(10) c_GetAval5_&__c_. := space(10) next * Num_Abas1 := len( a_Disci ) * if len( a_Disci ) <= 4 * @ 8,6 RFolder oFld4 of oForm_AvalDisci; Prompts &qtde_Abas.; Size 770, 480 Pixel POSICAO 1; EXACT ADJUST; Color CLR_BLACK, nRGB( 164, 190, 219 ) * elseif len( a_Disci ) > 4 .and. len( a_Disci ) <= 8 * Num_Abas2 := Num_Abas1 / 2 Num_Abas3 := Num_Abas1 / 2 * if Num_Abas2 - int( Num_Abas2 ) > 0 Num_Abas2 := Int( Num_Abas2 ) + 1 Num_Abas3 := Int( Num_Abas3 ) endif * @ 8,6 RFolder oFld4 of oForm_AvalDisci; Prompts &qtde_Abas.; Size 770, 480 Pixel POSICAO 1; ORGANIZE Num_Abas2, Num_Abas3; Color CLR_BLACK, nRGB( 164, 190, 219 ) * elseif len( a_Disci ) >= 9 .and. len( a_Disci ) <= 12 * Num_Abas2 := Num_Abas1 / 3 Num_Abas3 := Num_Abas1 / 3 Num_Abas4 := Num_Abas1 / 3 * if Num_Abas2 - int( Num_Abas2 ) > 0 Num_Abas2 := Int( Num_Abas2 ) + 1 * Num_Div2 := Num_Abas1 - Num_Abas2 Num_Div3 := Num_Div2 / 2 * if Num_Div3 - Int( Num_Div3 ) > 0 Num_Abas3 := Int( Num_Div3 ) + 1 endif * Num_Abas4 := Int( Num_Abas4 ) endif * @ 8,6 RFolder oFld4 of oForm_AvalDisci; Prompts &qtde_Abas.; Size 770, 480 Pixel POSICAO 1; ORGANIZE Num_Abas2, Num_Abas3, Num_Abas4; Color CLR_BLACK, nRGB( 164, 190, 219 ) * endif * oFld4:nClrMove := nRGB( 85, 200, 255 ) oFld4:lDegrade := .t. oFld4:SetPrompts( a_Disci ) oFld4:ColorSelected( CLR_WHITE ) *oFld4:bChange := {|| GrAvalFolder( a_AvlTp, a_DCodi, a_Disci, TurmaEscolhida, strzero( nRad1, 2, 0 ), strzero( val( nCbx2 ), 4, 0 ), c_GetAval1_&_AbaAnt_5., c_GetAval2_&_AbaAnt_5., c_GetAval3_&_AbaAnt_5., c_GetAval4_&_AbaAnt_5., c_GetAval5_&_AbaAnt_5. ) } // FuncGravaDisci( a_DCodi, a_Disci, TurmaEscolhida, strzero( nRad1, 2, 0 ), strzero( val( nCbx2 ), 4, 0 ) ) *_AbaAnt_4 := OFLd4:nOption * QtdeDIsci := len( a_DCodi ) * if len( a_DCodi ) > 0 for n_Cd2 := 1 to len( a_DCodi) * c_nGet := strzero( n_Cd2, 2, 0 ) * select Topicos set order to 03 go top * if dbseek( alltrim( a_DCodi[n_Cd2] + TurmaEscolhida + strzero( nRad1, 2, 0 ) + strzero( val( nCbx2 ), 4, 0 ) ) ) * CodTurmaVet := a_DCodi[n_Cd2] aadd( a_AvlTp, { CodTurmaVet, ITEM_FORM } ) * @ 40,20 Say ITEM_LN01 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 75,20 Say ITEM_LN02 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 110,20 Say ITEM_LN03 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 145,20 Say ITEM_LN04 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 180,20 Say ITEM_LN05 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 * @ 40,610 get oGet1&c_nGet. VAR c_GetAval1_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 75,610 get oGet2&c_nGet. VAR c_GetAval2_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 110,610 get oGet3&c_nGet. VAR c_GetAval3_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 145,610 get oGet4&c_nGet. VAR c_GetAval4_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 180,610 get oGet5&c_nGet. VAR c_GetAval5_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" valid GrAvalFolder( a_AvlTp, a_DCodi, a_Disci, TurmaEscolhida, strzero( nRad1, 2, 0 ), strzero( val( nCbx2 ), 4, 0 ), c_GetAval1_&c_nGet., c_GetAval2_&c_nGet., c_GetAval3_&c_nGet., c_GetAval4_&c_nGet., c_GetAval5_&c_nGet., c_nGet ) * endif next endif Ta ai... Obrigado antecipadamente! Att. Quote Link to comment Share on other sites More sharing options...
evertonlb Posted August 1, 2013 Author Report Share Posted August 1, 2013 Veja Ana, que cheguei a iniciar as variáveis uma em cada linha, pra ver se não era isso!!! rsrsrs Att. Quote Link to comment Share on other sites More sharing options...
AnaCatacombs Posted August 1, 2013 Report Share Posted August 1, 2013 kkkk o que o desespero não faz né? To mexendo no seu código aqui e já posto ele Quote Link to comment Share on other sites More sharing options...
AnaCatacombs Posted August 1, 2013 Report Share Posted August 1, 2013 *************************** function Cria_Abinhas() *************************** aJanelas := {2088,2089,2090} aTitulos := {"Janela 1","Janela 2", "Janela 3"} FOR tmp := 1 TO 3 FOR Tmp1 := 1 to 4 oObj_Var := "oSay"+STRZERO(tmp,2)+STRZERO(Tmp1,2) cVar := "cSay"+STRZERO(tmp,2)+STRZERO(Tmp1,2) PRIVATE &oObj_Var. PRIVATE &cVar. := "Say "+STRZERO(Tmp1,2)+" da dialog "+STRZERO(tmp,2) NEXT next oDlg_Abas := Create_Dialog(2087) oFolder := GFolder():ReDefine( 4001,aTitulos,aJanelas,oDlg_abas) FOR tmp2 := 1 TO 3 // for da quantidade de abas nCodiId := 4001 FOR tmp3 := 1 TO 4 // for da quantidade de gets oObj_Var := "oSay"+STRZERO(tmp2,2)+STRZERO(Tmp3,2) cVar := "cSay"+STRZERO(tmp2,2)+STRZERO(Tmp3,2) REDEFINE SAY &oobj_var. VAR &cVar. ID nCodiId OF oFolder:aDialogs[tmp2] nCodiId ++ NEXT NEXT activate_Dialog(Odlg_abas) Fiz um exemplo bem básico utilizando apenas SAY, com resource, funcionou certinho. Essa classe GFolder, é uma nova classe que criei herdando da tFolder, precisava adicionar a execução de um bloco de código antes de entrar no SetOption, e pra não ficar alterando as classes do fivewin resolvi criar essa outra que atende minha necessidade. Se alguém quiser, ou tiver curiosidade é só me pedir. Traduzindo o exemplo pra sua realidade, ficaria +- parecido com isso: Retirar o bloco da criação do folder do INIT da dialog, e colocar aonde vc cria a dialog mesmo Colocar aqui a declaração das variaveis if dbseek( TurmaEscolhida ) do while DIS_TURM == TurmaEscolhida NomeDisci := DIS_DISC aadd( a_Disci, alltrim( DIS_DISC ) ) aadd( a_DCodi, DIS_CODI ) skip enddo else MsgAlert( "Não foi encontrada nenhuma DISCIPLINA vinculada a TURMA escolhida!", "Atenção" ) oForm_AvalDisci:end() return .t. endif DEFINE DIALOG piriri pororo for n_td := 1 to len( a_Disci) __c_ := strzero( n_td, 2, 0 ) if empty( qtde_abas ) qtde_abas := str(n_Td ) else qtde_abas := qtde_Abas + "," + alltrim( str(n_Td ) ) endif n_GetAval1_&__c_. := 0 n_GetAval2_&__c_. := 0 n_GetAval3_&__c_. := 0 n_GetAval4_&__c_. := 0 n_GetAval5_&__c_. := 0 * c_GetAval1_&__c_. := space(10) c_GetAval2_&__c_. := space(10) c_GetAval3_&__c_. := space(10) c_GetAval4_&__c_. := space(10) c_GetAval5_&__c_. := space(10) next * Num_Abas1 := len( a_Disci ) * if len( a_Disci ) <= 4 * @ 8,6 RFolder oFld4 of oForm_AvalDisci; Prompts &qtde_Abas.; Size 770, 480 Pixel POSICAO 1; EXACT ADJUST; Color CLR_BLACK, nRGB( 164, 190, 219 ) * elseif len( a_Disci ) > 4 .and. len( a_Disci ) <= 8 * Num_Abas2 := Num_Abas1 / 2 Num_Abas3 := Num_Abas1 / 2 * if Num_Abas2 - int( Num_Abas2 ) > 0 Num_Abas2 := Int( Num_Abas2 ) + 1 Num_Abas3 := Int( Num_Abas3 ) endif * @ 8,6 RFolder oFld4 of oForm_AvalDisci; Prompts &qtde_Abas.; Size 770, 480 Pixel POSICAO 1; ORGANIZE Num_Abas2, Num_Abas3; Color CLR_BLACK, nRGB( 164, 190, 219 ) * elseif len( a_Disci ) >= 9 .and. len( a_Disci ) <= 12 * Num_Abas2 := Num_Abas1 / 3 Num_Abas3 := Num_Abas1 / 3 Num_Abas4 := Num_Abas1 / 3 * if Num_Abas2 - int( Num_Abas2 ) > 0 Num_Abas2 := Int( Num_Abas2 ) + 1 * Num_Div2 := Num_Abas1 - Num_Abas2 Num_Div3 := Num_Div2 / 2 * if Num_Div3 - Int( Num_Div3 ) > 0 Num_Abas3 := Int( Num_Div3 ) + 1 endif * Num_Abas4 := Int( Num_Abas4 ) endif * @ 8,6 RFolder oFld4 of oForm_AvalDisci; Prompts &qtde_Abas.; Size 770, 480 Pixel POSICAO 1; ORGANIZE Num_Abas2, Num_Abas3, Num_Abas4; Color CLR_BLACK, nRGB( 164, 190, 219 ) * endif * oFld4:nClrMove := nRGB( 85, 200, 255 ) oFld4:lDegrade := .t. oFld4:SetPrompts( a_Disci ) oFld4:ColorSelected( CLR_WHITE ) *oFld4:bChange := {|| GrAvalFolder( a_AvlTp, a_DCodi, a_Disci, TurmaEscolhida, strzero( nRad1, 2, 0 ), strzero( val( nCbx2 ), 4, 0 ), c_GetAval1_&_AbaAnt_5., c_GetAval2_&_AbaAnt_5., c_GetAval3_&_AbaAnt_5., c_GetAval4_&_AbaAnt_5., c_GetAval5_&_AbaAnt_5. ) } // FuncGravaDisci( a_DCodi, a_Disci, TurmaEscolhida, strzero( nRad1, 2, 0 ), strzero( val( nCbx2 ), 4, 0 ) ) *_AbaAnt_4 := OFLd4:nOption * QtdeDIsci := len( a_DCodi ) * if len( a_DCodi ) > 0 for n_Cd2 := 1 to len( a_DCodi) * c_nGet := strzero( n_Cd2, 2, 0 ) * select Topicos set order to 03 go top * if dbseek( alltrim( a_DCodi[n_Cd2] + TurmaEscolhida + strzero( nRad1, 2, 0 ) + strzero( val( nCbx2 ), 4, 0 ) ) ) * CodTurmaVet := a_DCodi[n_Cd2] aadd( a_AvlTp, { CodTurmaVet, ITEM_FORM } ) * @ 40,20 Say ITEM_LN01 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 75,20 Say ITEM_LN02 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 110,20 Say ITEM_LN03 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 145,20 Say ITEM_LN04 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 @ 180,20 Say ITEM_LN05 Size 480,20 of oFld4:aDialogs[n_Cd2] Pixel Color CLR_BLACK, nRGB( 164, 190, 219 ) Font oFont3 * @ 40,610 get oGet1&c_nGet. VAR c_GetAval1_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 75,610 get oGet2&c_nGet. VAR c_GetAval2_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 110,610 get oGet3&c_nGet. VAR c_GetAval3_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 145,610 get oGet4&c_nGet. VAR c_GetAval4_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" @ 180,610 get oGet5&c_nGet. VAR c_GetAval5_&c_nGet. SIZE 78, 20 COLOR 0, 16777215; PICTURE "@" PIXEL OF oFld4:aDialogs[n_Cd2] FONT oFont2 message "Lançamento de avaliações - Use conceitos de: [Não Atende/Parcialmente/Atende]" valid GrAvalFolder( a_AvlTp, a_DCodi, a_Disci, TurmaEscolhida, strzero( nRad1, 2, 0 ), strzero( val( nCbx2 ), 4, 0 ), c_GetAval1_&c_nGet., c_GetAval2_&c_nGet., c_GetAval3_&c_nGet., c_GetAval4_&c_nGet., c_GetAval5_&c_nGet., c_nGet ) * endif next endif activate dialog Piriri pororo No meu exemplo com SAY lá em cima funcionou, não fiz testes efetivo com seu código, mas imagino que deva funcionar. Quote Link to comment Share on other sites More sharing options...
evertonlb Posted August 2, 2013 Author Report Share Posted August 2, 2013 Valeu Ana.. Não pude entrar antes, mas vou testar agora mesmo!!! Obrigado! Att. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.