Recent

Author Topic: Type has no component named  (Read 617 times)

ronhud

  • New member
  • *
  • Posts: 49
Type has no component named
« on: October 03, 2018, 12:21:31 pm »
Am I missing something in tryint to use the debugger.  For example :-

I enter into the watchlist window

AQuery.FieldByName('sldate').AsFloat

then use the evaluate option and get the following

Type TSQLQUERY has no component named FIELDBYNAME('sldate').AsFloat.

Is the value really not seeable or is there some way that I have missed?

howardpc

  • Hero Member
  • *****
  • Posts: 2834
Re: Type has no component named
« Reply #1 on: October 03, 2018, 01:01:33 pm »
gdb, the third party debugger used by default in Lazarus, has no concept of Pascal functions.
To watch properties such as this you need to insert an extra debugging float variable in your code, and assign the value of AQuery.FieldByName('sldate').AsFloat to it in code.
When debugging you can then watch the value of this debugging variable. Once debugged, you remove the variable.

ronhud

  • New member
  • *
  • Posts: 49
Re: Type has no component named
« Reply #2 on: October 03, 2018, 01:11:42 pm »
That is what I have been doing but I hoped there was something quicker.   

ccrause

  • Full Member
  • ***
  • Posts: 130
Re: Type has no component named
« Reply #3 on: October 03, 2018, 01:37:57 pm »
gdb, the third party debugger used by default in Lazarus, has no concept of Pascal functions.
Also refer to this entry about property methods and gdb.