FoxInCloud
Gid not binding - cont'd
Gravatar is a globally recognized avatar based on your email address. Gid not binding - cont'd
  FoxInCloud Support - Thierry N.
  All
  Feb 25, 2017 @ 03:24am

(cont'd from this thread because Markdown Editor chokes on long posts, especially when a large amount of code has been posted earlier in the thread)

Hi Tuvia,

here is the first breakpoint you may want to try:

&& modify command awHTML > method getHTML_grd_AW_cScript_aHandlerObj

&& when generating form's HTML, your program should arrive here

assert !(m.toObj.BaseClass == 'Textbox' and m.lcEvent == 'valid') && add this line

llEvent = m.loSupport.lEvent(m.toObj.BaseClass,, m.lcEvent,, @m.llEvent) AND m.llEvent && {fr} awSupport travaille dans une autre session de données
if m.llEvent

	* {en} if m.toObj.BaseClass == 'Textbox' and m.lcEvent == 'valid', execution should come here
	* {en} for debug please be patient and step into each called method until you are sure that toObj.event() method gets executed and returns .T.
	* {en} depending on your version, it occurs on either of these lines:
	&&	luResult = Evaluate('m.toControl.' + m.tcEvent + '()')
	* {en} or
	&&	luResult = &luResult
	
	* ==================================================
	luEvent = this.uEvent(m.toObj, m.lcEvent) && {en} polls the object.event() method for implementation based on the RETURNed value
	* ==================================================

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Tuvia Vinitsky
  FoxInCloud Support - Thierry N.
  Feb 25, 2017 @ 05:32pm

I found that the grid when created is not substituting the FiC textbox class for the standard VFP base class. Since there is no .woHTMLgen property, it fails.

Adding a fic textbox cannot be done menually, VFP will not lwt you add it to a grid. I will try and see where the switch occurs.

Update: I did a workaround by specifying the number of columns in the grid, then doing a USE FORMNAME.SCX, then replacing each instance of the grd textbox with xxxtxt.

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Feb 26, 2017 @ 12:16am

OK got it, you need to remove/add textbox in gri.init()

see sample code in FoxInCloud live tutorial,data update

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Tuvia Vinitsky
  FoxInCloud Support - Thierry N.
  Feb 26, 2017 @ 12:43am

Is this a new thing? I never did that in the past.

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Feb 26, 2017 @ 01:25am

Required as long as you need cell-level events; always been so because even changing grid.ClassMember to a custom column class does not change .Text1.class

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Tuvia Vinitsky
  FoxInCloud Support - Thierry N.
  Feb 26, 2017 @ 10:56am

Hmmm. I never did it before and my grids worked fine. I never use cell level events, but still I wonder why it always worked.

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Feb 27, 2017 @ 07:55am

just double checked on another application: FAA changed Text1.class to xxxTxt

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Tuvia Vinitsky
  FoxInCloud Support - Thierry N.
  Feb 27, 2017 @ 11:15am

Usually my grids in the past did not come thru FAA. After FAA crated xxx.vcx, I use the xxxgrd from xxx.vcx. So not sure how I got into this problem.

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Tuvia Vinitsky
  FoxInCloud Support - Thierry N.
  Mar 21, 2017 @ 12:47pm

This is an issue I wonder if can be addressed. I always added grids from xxx.vcx. Previously I could add a grid, set a recordsource in .Load, update it in .Init, and not have to manually set each column's properties. 10 fields, the grid makes 10 columns, just like in VFP.

So now I have to either programmatically or at design time set a lot of column info I never had to do before. I now need names of each field/datasource, etc, in order to bind a table to the grid.

Update: this cannot be done at design time, xxxtxt cannot be added to a grid at design time.

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Gilles Lajot-Sarthou
  Tuvia Vinitsky
  Mar 21, 2017 @ 11:32pm

Hi Tuvia,

I assure you, I always added my text objects in a grid in "Design" mode You must select the xxx class library in the tools, delete the current text object from the grid column, and then drag and drop the xxxTxt object into the grid column.

Regards Gilles

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Tuvia Vinitsky
  Gilles Lajot-Sarthou
  Mar 22, 2017 @ 09:00am

Adding a xxtxt or xxxcbo at design time always gives me "cannot add this object to a grid." I select a column then try and drag the new control into it and get that error. Obviously I am doing something wrong.

I do not really want to add to the grid load time. Grids were an integral part of my VFP style, but they are a nightmare on the web. By nightmare I do not mean they do not work, but that there is no way to bind a grid to data and be able to enter a value and move row to row without a significsnt lag. I worked with Thierry, and we were able to get it down to 2 seconds for a row change, but that makes data entry impractical. I have tried everything and have not yet come up with an alternative.

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Mar 22, 2017 @ 10:25am

you can easily do it at runtime; see FoxInCloud Live Tutorial > Data Update

procedure grd.Init

FOR iGrc = 1 TO .ColumnCount
 with .Columns(m.iGrc) as Column

…

     .RemoveObject('Text1')
     .AddObject('ficTxt', ICase(;
      m.iGrc = column_region,;
       'ficCbo',; && of ficSample.vcx as Combobox
      m.iGrc = column_readOnly,;
       'ficTxtGrc',; && of ficSample.vcx as Textbox
      m.iGrc = column_active,;
       'ficChk',;
       'ficTxt'; && of ficSample.vcx as Textbox
      ))

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Tuvia Vinitsky
  FoxInCloud Support - Thierry N.
  Mar 22, 2017 @ 10:31am

Is there a significant performance hit adding them at runtime?

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Mar 22, 2017 @ 11:03am

done once per server instance -- negligible

Gravatar is a globally recognized avatar based on your email address. re: Gid not binding - cont'd
  Gilles Lajot-Sarthou
  Tuvia Vinitsky
  Mar 22, 2017 @ 11:58pm

Hi Tuvia

There is this way for adding, under the IDE of VFP, an object in a grid column:

Regards Gilles

© 1996-2017