IvankoB | 2 Jun 2008 09:59
Picon
Favicon

The debugger: internal funtiond don't hint values of same level vars

procedure trefviewfo.applyrecupdate1(const sender: tmsesqlquery;
                   const updatekind: TUpdateKind; var asql: AnsiString;
                   var done: Boolean);
var
 field_names, field_values,id_name,curr_id: msestring;
 ref_state: msestring;

  //-----------------
 procedure proc1(const next_code: boolean =  false);
 var
  i: integer;
  s1: msestring;
   sx: msestring;
 begin

  with sender do begin

   if next_code then begin << VISIBLE SINCE A CALL PARAMETER
    //................
   end;

   curr_id:= fieldtosql(fields[0]); << NOT VISIBLE !
   sx:= 'select nextval(' +  id_seq_name + ')'; << VISIBLE

( win32, MingW32's gdb )

IvankoB | 2 Jun 2008 10:02
Picon
Favicon

Re: How to insert and change subforms in code ?

> Do you want to become a msedocumenting developer?
>
>

In other words - a nameless hero :)

Martin Schreiber | 2 Jun 2008 11:42

Re: The debugger: internal funtiond don't hint values of same level vars

IvankoB wrote:

> procedure trefviewfo.applyrecupdate1(const sender: tmsesqlquery;
>                    const updatekind: TUpdateKind; var asql: AnsiString;
>                    var done: Boolean);
> var
>  field_names, field_values,id_name,curr_id: msestring;
>  ref_state: msestring;
> 
>   //-----------------
>  procedure proc1(const next_code: boolean =  false);
>  var
>   i: integer;
>   s1: msestring;
>    sx: msestring;
>  begin
> 
>   with sender do begin
> 
>    if next_code then begin << VISIBLE SINCE A CALL PARAMETER
>     //................
>    end;
> 
>    curr_id:= fieldtosql(fields[0]); << NOT VISIBLE !
>    sx:= 'select nextval(' +  id_seq_name + ')'; << VISIBLE
> 
> ( win32, MingW32's gdb )

Please test with standalone gdb, if it doesn't work submit a FPC bugreport,
if it works report to me. Which variable is not visible? curr_id or
(Continue reading)

IvankoB | 2 Jun 2008 11:48
Picon
Favicon

PODPISKA: propscrollbat & thumbtrack

these opts of refviewform.wgContents.datalink dont't work at me.

IvankoB | 2 Jun 2008 11:51
Picon
Favicon

Re: The debugger: internal funtiond don't hint values of same level vars


>Which variable is not visible? curr_id
>or  fields[0}?

Both.

Domingo Alvarez Duarte | 2 Jun 2008 11:55
Picon

Re: How to insert and change subforms in code ?

Ok !
I'm getting a lot here, it's fair to give back as well !

IvankoB | 2 Jun 2008 12:33
Picon
Favicon

Re: Different effect of "trans.commit & query.Active" VS "query.transaction.tao_refreshdatsets & commitretaining"

> function trefviewfo.showeditform: modalresultty;
> var
> editform: treceditfo;
> ds: tdatasetstate;
> begin
> result:= mr_cancel;
> if editformclass <> nil then begin
>  try
> ds:=  dsContents.dataset.state;
>   application.createform( editformclass,editform);
>   editform.viewform:= {irefviewfo}(self);
>   editform.caption:=  editformcaption;
>   result:= editform.show(true);
> ds:=  dsContents.dataset.state;
>   dsContents.dataset.recno:= prevrecno;  <<<<<----?????
>  finally
>>   freeandnil(editform);
>  end;
> end;
> end;
>

"dsContents.dataset.recno:= prevrecno" is the needed code. How else to 
arrange save/restore for the filtered dataset qryRefCompany after its 
refreshing ? Here, me even can't check if {filtered_count} isn't less than 
"prevrecno".
Any proposals ? To catch the DB exception ?

>Where are the values for "code_company" generated? Can't
> you use a sequence?
(Continue reading)

IvankoB | 2 Jun 2008 15:13
Picon
Favicon

Re: Different effect of "trans.commit & query.Active" VS "query.transaction.tao_refreshdatsets & commitretaining"

> "dsContents.dataset.recno:= prevrecno" is the needed code. How else to 
> arrange save/restore for the filtered dataset qryRefCompany after its 
> refreshing ? Here, me even can't check if {filtered_count} isn't less than 
> "prevrecno".
> Any proposals ? To catch the DB exception ?

It seems that me tried to feed non-initialized ( random)  "prevrecno"
:)

IvankoB | 2 Jun 2008 15:49
Picon
Favicon

Form inheritance : change of name of a group box on inherited form wipes out widgets added on the inheriting form

within that group box.

Martin Schreiber | 2 Jun 2008 16:20

Re: Form inheritance : change of name of a group box on inherited form wipes out widgets added on the inheriting form

IvankoB wrote:

> within that group box.

It is not possible to change the name of inherited components. To fix it
would be very hard and even impossible for currently not opened descendent
forms.


Gmane