Management of Symbolic Code (recreated) (OpenInsight 64-bit)
At 10 OCT 2018 05:12:00PM Barry Stevens wrote:
OI10.0.3
After watching Martyn Phillip's video :
"Modernising the writing, debugging and management of Symbolic Code – Scheduled for OI 10.0.4."
Changed all my symbolics to the following (passing the SymbolicName and Table as parameters in the interim)[pre]@Ans=Function(evop_symbolics_controller('<passing fieldname>','<passing tablename>'))[/pre]
Having ALL the symbolics code in one place is a great idea for many reasons other than debug.
I was wondering if anyone can confirm or update me on the following observations:
One thing I did notice was that any symbolic dependencies were not being updated in an edit table.
I put this down to there being no {} field names in the symbolic code in the dict table, so it does not know any dependencies (I could be wrong and I have an error somewhere)
I have got around this by doing a recalc of all the columns in all the edittables on the form, triggered by the CELLCHANGED event.
Also, I found I also had to play around with @record and ATRECORD to get the updated record data at the start of the symbolic code routine. [I made the routine global (i.e. for all tables – use of the Table param)]
Barry Stevens
At 10 OCT 2018 05:19PM Barry Stevens wrote:
Here is the top of the code for the function evop_symbolics_controller[pre]Function evop_symbolics_controller(Method,p1,p2,p3,p4)
Declare Function rti_get_current_symbolic,Evop_symb_calc_functions,retstack,calc_perc,gst_incl_calc,Get_Property
declare function Get_Current_Event,SRP_Sort_Array$Insert equates$Insert Evop_symb_calc_functions_equates* Title……….: Controller for the symbolics in all the tables * Author…….: BARRY * Date……….: 17/09/2018 * Release…..: * Description.: * * use: 10.0.3 - @ans = Function(evop_symbolics_controller('NameOfSymbolic','TableName')) * 10.0.4+ - @ans = Function(evop_symbolics_controller()) * Update History * Who When What * —– ——– —————————————————— * * *when 10.0.4 is released use rti_get_current_symbolic(), therefore no need to passthe name of the symbolic in the method
Who=Retstack()<2>[2,"_"]TableName=null$Retval=null$If Assigned( method ) Else method=null$If method == null$ Thenwork=rti_get_current_symbolic()TableNameable = work<1,1>method = work<1,2>End ElseTableName = p1endAtrecord=Get_Property(@Window,"ATRECORD")
SaveAtRecord=@RecordthisEvent = Get_Current_Event()If thisEvent _eqc 'READ' ThenIf @record Else@record=AtRecordendEnd ElseIf AtRecord then@record=AtRecordEndEnd*which table is the symbolic in*
Begin CaseCase TableName _eqc 'properties'Gosub do_properties_symbsCase TableName _eqc 'sites'
Gosub do_sites_symbsCase TableName[1,10] _eqc 'sold_data_'
Gosub do_sold_data_symbsCase TableName _eqc 'contacts'
Gosub do_sites_symbsEnd Case
@Record = SaveAtRecord
Return Retval
[/pre]
Barry Stevens
At 10 OCT 2018 05:26PM Donald Bakke wrote:
I believe that is correct. We've been using our own method similar to Martyn's blog article for sometime via our service modules and we've experienced this issue. The dependency tree cannot be updated when you omit references to @RECORD<fieldPos> or {colName} items in the native symbolic code.
At 10 OCT 2018 05:27PM Barry Stevens wrote:
Thanks Don!
Barry Stevens