Oi Armin, saquei a função FileExist do if, e ocorreu outro erro, com a mensagem: function fileexist not exist. Então saquei a função do código, e funcionou.
&FileResult = FileExist(&IntegrationFilePath)
If &FileResult = true
&Result = DFROpen(&IntegrationFilePath, 2048, '', '', '')
&LineNumber = 0
&ResultNext = 0
Do While &ResultNext = 0
&ResultNext = DFRNext()
&Result = DFRGTxt(&DataLine)
&LineNumber += 1
If &LineNumber >= &SdtFIleIntegrationLayout.IntegrationLayoutLineDataStart
Do 'DataLineThreatment'
Else
Do 'HeaderLinesThreatment'
EndIf
EndDo
EndIf
Um abraço
Paulo, tenta sacar a função fileExist fora do If.Att, ArminOn Sat, Aug 27, 2011 at 6:07 PM, Paulo Renato Godinho Amaral <paulorg.amaral@gmail.com> wrote:
Hola,
Com NB 47285, Ruby e Android.
Tenho uma web panel que chama uma procedure.
Essa procedure tem funções para ler arquivo texto, com o seguinte código:
If FileExist(&IntegrationFilePath) = true
&Result = DFROpen(&IntegrationFilePath, 2048, '', '', '')
&LineNumber = 0
&ResultNext = 0
Do While &ResultNext = 0
&ResultNext = DFRNext()
&Result = DFRGTxt(&DataLine)
&LineNumber += 1
// If &LineNumber >= &SdtFIleIntegrationLayout.IntegrationLayoutLineDataStart
// Do 'DataLineThreatment'
// EndIf
EndDo
EndIf
Ao tentar executar a web panel, apresenta o seguinte erro:
C:/Models/SurforevisProject/RubyModel/web/fileintegrationread.rb:31: syntax error, unexpected keyword_end, expecting ')' C:/Models/SurforevisProject/RubyModel/web/fileintegrationread.rb:34: syntax error, unexpected keyword_end, expecting ')' C:/Models/SurforevisProject/RubyModel/web/fileintegrationread.rb:61: syntax error, unexpected keyword_end, expecting ')' C:/Models/SurforevisProject/RubyModel/web/fileintegrationread.rb:66: syntax error, unexpected keyword_end, expecting ')'
Em anexo o fonte rb.
Um abraço
Paulo
--
Has recibido este mensaje porque estás suscrito al grupo "GeneXus" de Grupos de Google.
Para publicar una entrada en este grupo, envía un correo electrónico a genexus@googlegroups.com.
Para anular tu suscripción a este grupo, envía un correo electrónico a genexus+unsubscribe@googlegroups.com
Para tener acceso a más opciones, visita el grupo en http://groups.google.com/group/genexus?hl=es.
0 Response to "Re: [xev2] Erro Ruby e Text Functions DFR"
Publicar un comentario