Yep :)
I am not sure... Does this work in newer versions of 4D, or is this
something that should be entered as a bug?
Array text(My_2D-Array;5;10)
c_pointer($ptr;$ptr2)
$ptr:=->My_2D_Array
$ptr2:=->$ptr->{1} // <- this fails : Field variable or table expected
$ptr2:=->($ptr->{1}) // this fails : Field variable or table expected
$test:=$ptr->{1} // as expected this gets the value of the array at
$ptr->{1} element zero
I found a solution (workaround actually)
- As Keisuke suggested COPY ARRAY will resolve the specific
problem.(Implemented)
So:
// method to get table names etc
// For each table - get table info and if appropriate get field info
COPY ARRAY($Name_Array->{$i};$Temp_Names)
//$Name_Array is a pointer to a 2D Text array
//$Temp_Names is a 1D Text array
utl_struct_Field_Arrays ($i;->$Temp_Names) //populate Temp array with
field names for table $i
COPY ARRAY($Temp_Names;$Name_Array->{$i}) // copies the temp array to
the correct place in 2D array
The actual method allows the creation of upto 3 2D arrays, at the same
time, for table information
Table & Field names
Table and Field numbers
Table and Field pointers
THANKS Everyone for the help
On Fri, 2 Jun 2017 14:58:33 +0000, Keisuke Miyako via 4D_Tech wrote:
> sometimes its much easier to simply COPY ARRAY the whole array and back.
>
>> 2017/06/02 22:46、Chip Scheide via 4D_Tech <[email protected]> の
>> メール:
>>
>> And this is where the dereferencing a pointer to a 2D array, sub-array
>> access problem is occurring, inside the component method and it's
>> internal method calls for parameter validation (my post on Type issue),
>> and for resizing the sub-array(s) for field information (this post).
>
>
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ: http://lists.4d.com/faqnug.html
> Archive: http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************