Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 22-02-2009
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
InnoSetup synedit

hola..

estoy haciendo unos cambios al Innosetup
especificamente al IDE compilador.
pasarlo de la version 1.1 de SynEdit por una de las mas actuales.
uso el synedit 201b

el problema esta en el uso de Tpoint y BufferCoord.

no entiendo como convertir el codigo.
el codigo original es el que dice Orginal y lo demas son los cambio que le he hecho.

es la unidad CompForm.pas del proyecto Compil32

Código Delphi [-]


procedure TCompileForm.MemoWndProc(var Message: TMessage);

  function GetCodeVariableDebugEntryFromLineCol(Line, Col: Integer):
    PVariableDebugEntry;
  var
    I: Integer;
  begin
    Result := nil;
    for I := 0 to FVariableDebugEntriesCount - 1 do
    begin
      if (FVariableDebugEntries[i].LineNumber = Line) and
        (FVariableDebugEntries[i].Col = Col)
      then

      begin
        Result := @FVariableDebugEntries[i];
        Break;
      end;
    end;
  end;

var
  Line, Col, I, J: Integer;
  P, P2: TPoint;{original}
//  P, P2: TDisplayCoord;//lo agrege yo para ver si aqui era el problema
//  P, P2:  TBufferCoord;//lo agrege yo para ver si aqui era el problema
  S, Output: string;
  DebugEntry: PVariableDebugEntry;
begin

  if (Message.Msg = CM_HINTSHOW) and (FDebugClientWnd <> 0) then
  begin
    with TCMHintShow(Message).HintInfo^ do
    begin
//este es el que no logro convertir. no compila.
//    P := Memo.PixelsToRowColumn(Point(CursorPos.X - Memo.CharWidth div 2, CursorPos.Y)); {Original}
//           pixeles a fila columna
//da error de 
//[Error] CompForm.pas(1863): Incompatible types: 'Integer' and 'TPoint'
    P := Memo.PixelsToRowColumn(Point(CursorPos.X - Memo.CharWidth div 2, CursorPos.Y));

      if P.Y <= Memo.Lines.Count then
      begin
        Line := P.Y;
        Col := P.X;
        S := Memo.Lines[Line - 1];

        if (Col >= 1) and (Col <= Length(S)) and (S[Col] in ['a'..'z', 'A'..'Z',
          '0'..'9', '_'])
        then
        begin
          while (Col > 1) and (S[Col - 1] in ['a'..'z', 'A'..'Z', '0'..'9', '_'])
          do
            Dec(Col);
          DebugEntry := GetCodeVariableDebugEntryFromLineCol(Line, Col);
          if DebugEntry <> nil then
          begin
            J := Col;
            while S[J] in ['a'..'z', 'A'..'Z', '0'..'9', '_'] do
              Inc(J);
            case EvaluateVariableEntry(DebugEntry, Output) of
              1: HintStr := Output;
              2: HintStr := Output;
            else
              HintStr := 'Unknown error';
            end;
//          revisa  
//         P2 := Memo.RowColumnToPixels(Point(Col, P.Y)); {Original}
            P2 :=  Memo.RowColumnToPixels(DisplayCoord(Col, P.Y));
            CursorRect := Bounds(P2.X, P2.Y, (J - Col) * Memo.CharWidth,
              Memo.LineHeight);
            HideTimeout := High(Integer); // infinite
            Exit;
          end;
        end;

        I := 1;
        while I <= Length(S) do
        begin
          if S[i] = '{' then
          begin
            if (I < Length(S)) and (S[I + 1] = '{') then
              { Skip '{{' }
              Inc(I, 2)
            else
            begin
              J := SkipPastConst(S, I);
              if J = 0 then // unclosed constant?
                Break;
              if (P.X >= I) and (P.X < J) then
              begin
                HintStr := Copy(S, I, J - I);
                case EvaluateConstant(HintStr, Output) of
                  1: HintStr := HintStr + ' = "' + Output + '"';
                  2: HintStr := HintStr + ' = ' + Output;
                else
                  HintStr := HintStr + ' = Unknown error';
                end;
//              revisa
//                P2 := Memo.RowColumnToPixels(Point(I, P.Y)); {Original}
                P2 := Memo.RowColumnToPixels(DisplayCoord(I, P.Y));
                CursorRect := Bounds(P2.X, P2.Y, (J - I) * Memo.CharWidth,
                  Memo.LineHeight);
                HideTimeout := High(Integer); // infinite
                Break;
              end;
              I := J;
            end;
          end
          else
          begin
            if S[i] in ConstLeadBytes^ then
              Inc(I);
            Inc(I);
          end;
        end;
      end;
    end;
  end
  else
    Memo.WndProc(Message);

end;

fgracias por su ayuda
[/delphi]
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
ayuda sobre SynEdit??? mapi966 OOP 5 17-06-2010 12:11:31
¿SynEdit LinesInWindow ? JXJ Varios 3 11-10-2007 14:43:57
Ayuda de SynEdit Delar Varios 4 01-11-2006 19:48:16
SynEdit en TurboDelphi D-MO Varios 10 27-09-2006 23:47:20
Instalar SynEdit en Delphi 7 Geta Varios 1 01-08-2004 19:59:45


La franja horaria es GMT +2. Ahora son las 07:08:05.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi