Re: v13+ - component method parameters

2017-06-27 Thread Chip Scheide via 4D_Tech
Yes.
It is mine.

On Mon, 26 Jun 2017 17:24:55 -0400, Alan Tilson wrote:
> Chip,
> Thanks for the link. I'll try to check it out. Is it your component?
> Alan
> 
> On Mon, Jun 26, 2017 at 11:13 AM, Chip Scheide <4d_o...@pghrepository.org>
> wrote:
> 
>> Alan,
>> First the specific problem was/is trying to compile (testing database)
>> with interpreted component.
>> The error provided "Invalid parameter" is not really the correct error
>> to generate.
>> 
>> As to your question regarding sets.
>> download the (shareware) component.
>> https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0
>> 
>> Basically, you run all your set creation code through the component, it
>> tracks everything.
>> This makes it possible to ask (and answer!!) questions you could not do
>> so before.
>> Such as:
>> - To which table does a set belong?
>> - What set(s) exists for a specified table?
>> - Does a set exist?
>> 
>> Chip
>> 
>> 
>> On Mon, 26 Jun 2017 10:43:52 -0400, Alan Tilson wrote:
>>> Hello Chip,
>>> Sorry, I don't know the answer to your issues, but I am curious about how
>>> you determine what sets if any exist for a table? I thought the only test
>>> available was Records in Set()>0?
>>> Thanks,
>>> Alan
>>> 
>>> On Wed, Jun 21, 2017 at 12:30 PM, Chip Scheide via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
 Thanks.
 
 The code runs, interpretably just fine.
 I have to re-test, but I think the code runs fine when the component is
 compiled and built.
 
 The method (from original code I posted, and this code posted below) :
 utl_sets_whatsets_Validate
 does all of this validation and returns a boolean (true - everything is
 OK)
 
 I do not do a parameter count check, in that I believe that 4D is
 *supposed* to do that
 However, tracing this code, interpretedly it works correctly.
 
 The problem is when I try to compile the test database. It is when
 compiling the test database that I get the invalid parameter errors,
 when making calls to (for example, and as previously posted)
 utl_sets_What_Sets.
 
 
 code for utl_sets_whatsets_Validate
   //(m) utl_whatsets_Validate
   // $1 - pointer - to a table to determine what, if any sets exist
   // $2 - pointer - to text Array
   // $3 - pointer - to error text
 
   //RETURNS - boolean - are parameters valid
   // • Created 06-09-17 by Chip -
 C_POINTER($1;$2;$Table;$Array;$3;$Errors)
 C_TEXT($Sets;$msg)
 C_BOOLEAN($0)
 
 $Table:=$1
 $Array:=$2
 $Errors:=$3
 
 Case of
 : (Nil($Table))  //nil table pointer (nil passed, or nothing)
   $msg:="Table pointer is Nil."
 
 : (Not(utl_type_Is_Table ($Table)))  // pointer passed, but not to a
 table
   $msg:="Table pointer does not point to a table."
 
 : (Nil($Array))  //nil array pointer (nil passed, or nothing)
   $msg:="Array pointer is Nil."
 
 : (Not(utl_type_Is_An_Array ($Array;"Text")))  // array is not text
   $msg:="Array pointer does not point to an Array."
 Else   //everything is OK
   $0:=True
 End case
 
 If (Not(utl_Is_Empty (->$msg)))  // there was an error above
 utl_errtxt_Add ($msg)  //add it to the error handler
 End if
 utl_errtxt_End (Current method name;$Errors)  //report the error
   //End utl_whatsets_Validate
 
 
 On Wed, 21 Jun 2017 17:37:19 +0200, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> $Table:=$1
>> $Array:=$2
> 
> Hi Chip,
> If you trace in the component code, nothing helps?
> 
> Some times it helps to "look into the pointer", for example:
> 
> case of
>  :(count parameters < 2)
>   //err 1
>  :(not(Ptr_isTable($1)))
>   //err 2
>  :(not(Ptr_isArray($2;is text array)))
>   //err 3
>  else
>   //run method
> end case
> 
> --
> Arnaud
> 
> 
> 
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **
 ---
 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:4d_tech-unsubscr...@lists.4d.com
 **
 

Re: v13+ - component method parameters

2017-06-26 Thread Alan Tilson via 4D_Tech
Chip,
Thanks for the link. I'll try to check it out. Is it your component?
Alan

On Mon, Jun 26, 2017 at 11:13 AM, Chip Scheide <4d_o...@pghrepository.org>
wrote:

> Alan,
> First the specific problem was/is trying to compile (testing database)
> with interpreted component.
> The error provided "Invalid parameter" is not really the correct error
> to generate.
>
> As to your question regarding sets.
> download the (shareware) component.
> https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0
>
> Basically, you run all your set creation code through the component, it
> tracks everything.
> This makes it possible to ask (and answer!!) questions you could not do
> so before.
> Such as:
> - To which table does a set belong?
> - What set(s) exists for a specified table?
> - Does a set exist?
>
> Chip
>
>
> On Mon, 26 Jun 2017 10:43:52 -0400, Alan Tilson wrote:
> > Hello Chip,
> > Sorry, I don't know the answer to your issues, but I am curious about how
> > you determine what sets if any exist for a table? I thought the only test
> > available was Records in Set()>0?
> > Thanks,
> > Alan
> >
> > On Wed, Jun 21, 2017 at 12:30 PM, Chip Scheide via 4D_Tech <
> > 4d_tech@lists.4d.com> wrote:
> >
> >> Thanks.
> >>
> >> The code runs, interpretably just fine.
> >> I have to re-test, but I think the code runs fine when the component is
> >> compiled and built.
> >>
> >> The method (from original code I posted, and this code posted below) :
> >> utl_sets_whatsets_Validate
> >> does all of this validation and returns a boolean (true - everything is
> >> OK)
> >>
> >> I do not do a parameter count check, in that I believe that 4D is
> >> *supposed* to do that
> >> However, tracing this code, interpretedly it works correctly.
> >>
> >> The problem is when I try to compile the test database. It is when
> >> compiling the test database that I get the invalid parameter errors,
> >> when making calls to (for example, and as previously posted)
> >> utl_sets_What_Sets.
> >>
> >>
> >> code for utl_sets_whatsets_Validate
> >>   //(m) utl_whatsets_Validate
> >>   // $1 - pointer - to a table to determine what, if any sets exist
> >>   // $2 - pointer - to text Array
> >>   // $3 - pointer - to error text
> >>
> >>   //RETURNS - boolean - are parameters valid
> >>   // • Created 06-09-17 by Chip -
> >> C_POINTER($1;$2;$Table;$Array;$3;$Errors)
> >> C_TEXT($Sets;$msg)
> >> C_BOOLEAN($0)
> >>
> >> $Table:=$1
> >> $Array:=$2
> >> $Errors:=$3
> >>
> >> Case of
> >> : (Nil($Table))  //nil table pointer (nil passed, or nothing)
> >>   $msg:="Table pointer is Nil."
> >>
> >> : (Not(utl_type_Is_Table ($Table)))  // pointer passed, but not to a
> >> table
> >>   $msg:="Table pointer does not point to a table."
> >>
> >> : (Nil($Array))  //nil array pointer (nil passed, or nothing)
> >>   $msg:="Array pointer is Nil."
> >>
> >> : (Not(utl_type_Is_An_Array ($Array;"Text")))  // array is not text
> >>   $msg:="Array pointer does not point to an Array."
> >> Else   //everything is OK
> >>   $0:=True
> >> End case
> >>
> >> If (Not(utl_Is_Empty (->$msg)))  // there was an error above
> >> utl_errtxt_Add ($msg)  //add it to the error handler
> >> End if
> >> utl_errtxt_End (Current method name;$Errors)  //report the error
> >>   //End utl_whatsets_Validate
> >>
> >>
> >> On Wed, 21 Jun 2017 17:37:19 +0200, Arnaud de Montard via 4D_Tech wrote:
> >>>
>  Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech
>  <4d_tech@lists.4d.com> a écrit :
> 
>  $Table:=$1
>  $Array:=$2
> >>>
> >>> Hi Chip,
> >>> If you trace in the component code, nothing helps?
> >>>
> >>> Some times it helps to "look into the pointer", for example:
> >>>
> >>> case of
> >>>  :(count parameters < 2)
> >>>   //err 1
> >>>  :(not(Ptr_isTable($1)))
> >>>   //err 2
> >>>  :(not(Ptr_isArray($2;is text array)))
> >>>   //err 3
> >>>  else
> >>>   //run method
> >>> end case
> >>>
> >>> --
> >>> Arnaud
> >>>
> >>>
> >>>
> >>> **
> >>> 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:4d_tech-unsubscr...@lists.4d.com
> >>> **
> >> ---
> >> 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:4d_tech-unsubscr...@lists.4d.com
> >> **
> >>
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
>

Re: v13+ - component method parameters

2017-06-26 Thread Chip Scheide via 4D_Tech
Alan,
First the specific problem was/is trying to compile (testing database) 
with interpreted component. 
The error provided "Invalid parameter" is not really the correct error 
to generate.

As to your question regarding sets. 
download the (shareware) component.
https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0

Basically, you run all your set creation code through the component, it 
tracks everything.
This makes it possible to ask (and answer!!) questions you could not do 
so before.
Such as:
- To which table does a set belong?
- What set(s) exists for a specified table?
- Does a set exist?

Chip


On Mon, 26 Jun 2017 10:43:52 -0400, Alan Tilson wrote:
> Hello Chip,
> Sorry, I don't know the answer to your issues, but I am curious about how
> you determine what sets if any exist for a table? I thought the only test
> available was Records in Set()>0?
> Thanks,
> Alan
> 
> On Wed, Jun 21, 2017 at 12:30 PM, Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Thanks.
>> 
>> The code runs, interpretably just fine.
>> I have to re-test, but I think the code runs fine when the component is
>> compiled and built.
>> 
>> The method (from original code I posted, and this code posted below) :
>> utl_sets_whatsets_Validate
>> does all of this validation and returns a boolean (true - everything is
>> OK)
>> 
>> I do not do a parameter count check, in that I believe that 4D is
>> *supposed* to do that
>> However, tracing this code, interpretedly it works correctly.
>> 
>> The problem is when I try to compile the test database. It is when
>> compiling the test database that I get the invalid parameter errors,
>> when making calls to (for example, and as previously posted)
>> utl_sets_What_Sets.
>> 
>> 
>> code for utl_sets_whatsets_Validate
>>   //(m) utl_whatsets_Validate
>>   // $1 - pointer - to a table to determine what, if any sets exist
>>   // $2 - pointer - to text Array
>>   // $3 - pointer - to error text
>> 
>>   //RETURNS - boolean - are parameters valid
>>   // • Created 06-09-17 by Chip -
>> C_POINTER($1;$2;$Table;$Array;$3;$Errors)
>> C_TEXT($Sets;$msg)
>> C_BOOLEAN($0)
>> 
>> $Table:=$1
>> $Array:=$2
>> $Errors:=$3
>> 
>> Case of
>> : (Nil($Table))  //nil table pointer (nil passed, or nothing)
>>   $msg:="Table pointer is Nil."
>> 
>> : (Not(utl_type_Is_Table ($Table)))  // pointer passed, but not to a
>> table
>>   $msg:="Table pointer does not point to a table."
>> 
>> : (Nil($Array))  //nil array pointer (nil passed, or nothing)
>>   $msg:="Array pointer is Nil."
>> 
>> : (Not(utl_type_Is_An_Array ($Array;"Text")))  // array is not text
>>   $msg:="Array pointer does not point to an Array."
>> Else   //everything is OK
>>   $0:=True
>> End case
>> 
>> If (Not(utl_Is_Empty (->$msg)))  // there was an error above
>> utl_errtxt_Add ($msg)  //add it to the error handler
>> End if
>> utl_errtxt_End (Current method name;$Errors)  //report the error
>>   //End utl_whatsets_Validate
>> 
>> 
>> On Wed, 21 Jun 2017 17:37:19 +0200, Arnaud de Montard via 4D_Tech wrote:
>>> 
 Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech
 <4d_tech@lists.4d.com> a écrit :
 
 $Table:=$1
 $Array:=$2
>>> 
>>> Hi Chip,
>>> If you trace in the component code, nothing helps?
>>> 
>>> Some times it helps to "look into the pointer", for example:
>>> 
>>> case of
>>>  :(count parameters < 2)
>>>   //err 1
>>>  :(not(Ptr_isTable($1)))
>>>   //err 2
>>>  :(not(Ptr_isArray($2;is text array)))
>>>   //err 3
>>>  else
>>>   //run method
>>> end case
>>> 
>>> --
>>> Arnaud
>>> 
>>> 
>>> 
>>> **
>>> 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:4d_tech-unsubscr...@lists.4d.com
>>> **
>> ---
>> 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:4d_tech-unsubscr...@lists.4d.com
>> **
>> 
---
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:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ - component method parameters

2017-06-26 Thread Alan Tilson via 4D_Tech
Hello Chip,
Sorry, I don't know the answer to your issues, but I am curious about how
you determine what sets if any exist for a table? I thought the only test
available was Records in Set()>0?
Thanks,
Alan

On Wed, Jun 21, 2017 at 12:30 PM, Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Thanks.
>
> The code runs, interpretably just fine.
> I have to re-test, but I think the code runs fine when the component is
> compiled and built.
>
> The method (from original code I posted, and this code posted below) :
> utl_sets_whatsets_Validate
> does all of this validation and returns a boolean (true - everything is
> OK)
>
> I do not do a parameter count check, in that I believe that 4D is
> *supposed* to do that
> However, tracing this code, interpretedly it works correctly.
>
> The problem is when I try to compile the test database. It is when
> compiling the test database that I get the invalid parameter errors,
> when making calls to (for example, and as previously posted)
> utl_sets_What_Sets.
>
>
> code for utl_sets_whatsets_Validate
>   //(m) utl_whatsets_Validate
>   // $1 - pointer - to a table to determine what, if any sets exist
>   // $2 - pointer - to text Array
>   // $3 - pointer - to error text
>
>   //RETURNS - boolean - are parameters valid
>   // • Created 06-09-17 by Chip -
> C_POINTER($1;$2;$Table;$Array;$3;$Errors)
> C_TEXT($Sets;$msg)
> C_BOOLEAN($0)
>
> $Table:=$1
> $Array:=$2
> $Errors:=$3
>
> Case of
> : (Nil($Table))  //nil table pointer (nil passed, or nothing)
>   $msg:="Table pointer is Nil."
>
> : (Not(utl_type_Is_Table ($Table)))  // pointer passed, but not to a
> table
>   $msg:="Table pointer does not point to a table."
>
> : (Nil($Array))  //nil array pointer (nil passed, or nothing)
>   $msg:="Array pointer is Nil."
>
> : (Not(utl_type_Is_An_Array ($Array;"Text")))  // array is not text
>   $msg:="Array pointer does not point to an Array."
> Else   //everything is OK
>   $0:=True
> End case
>
> If (Not(utl_Is_Empty (->$msg)))  // there was an error above
> utl_errtxt_Add ($msg)  //add it to the error handler
> End if
> utl_errtxt_End (Current method name;$Errors)  //report the error
>   //End utl_whatsets_Validate
>
>
> On Wed, 21 Jun 2017 17:37:19 +0200, Arnaud de Montard via 4D_Tech wrote:
> >
> >> Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech
> >> <4d_tech@lists.4d.com> a écrit :
> >>
> >> $Table:=$1
> >> $Array:=$2
> >
> > Hi Chip,
> > If you trace in the component code, nothing helps?
> >
> > Some times it helps to "look into the pointer", for example:
> >
> > case of
> >  :(count parameters < 2)
> >   //err 1
> >  :(not(Ptr_isTable($1)))
> >   //err 2
> >  :(not(Ptr_isArray($2;is text array)))
> >   //err 3
> >  else
> >   //run method
> > end case
> >
> > --
> > Arnaud
> >
> >
> >
> > **
> > 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:4d_tech-unsubscr...@lists.4d.com
> > **
> ---
> 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:4d_tech-unsubscr...@lists.4d.com
> **
>
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: (resolved?) Re: v13+ - component method parameters

2017-06-22 Thread Chip Scheide via 4D_Tech
my issue would be the error message.

Error : Invalid Parameter : Pointer 
does not equal (at least to me)
Error : Interpreted Component  in compiled database

On Thu, 22 Jun 2017 09:49:51 +0200, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 21 juin 2017 à 18:44, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> [...]
>> 
>> Maybe the errors have to do with trying to compile a database with an 
>> interpreted component?!?!
> 
> Not maybe: sure  ;-)
> See here in the "Interpreted / Compiled / Unicode" §:
> 

> 
> -- 
> Arnaud de Montard 
> 
> 
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **
---
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:4d_tech-unsubscr...@lists.4d.com
**

Re: (resolved?) Re: v13+ - component method parameters

2017-06-22 Thread Arnaud de Montard via 4D_Tech

> Le 21 juin 2017 à 18:44, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> [...]
> 
> Maybe the errors have to do with trying to compile a database with an 
> interpreted component?!?!

Not maybe: sure  ;-)
See here in the "Interpreted / Compiled / Unicode" §:


-- 
Arnaud de Montard 


**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ - component method parameters

2017-06-21 Thread Chip Scheide via 4D_Tech
Thanks.

The code runs, interpretably just fine.
I have to re-test, but I think the code runs fine when the component is 
compiled and built.

The method (from original code I posted, and this code posted below) : 
utl_sets_whatsets_Validate
does all of this validation and returns a boolean (true - everything is 
OK)
 
I do not do a parameter count check, in that I believe that 4D is 
*supposed* to do that
However, tracing this code, interpretedly it works correctly.

The problem is when I try to compile the test database. It is when 
compiling the test database that I get the invalid parameter errors, 
when making calls to (for example, and as previously posted) 
utl_sets_What_Sets.
 

code for utl_sets_whatsets_Validate
  //(m) utl_whatsets_Validate
  // $1 - pointer - to a table to determine what, if any sets exist
  // $2 - pointer - to text Array
  // $3 - pointer - to error text

  //RETURNS - boolean - are parameters valid
  // • Created 06-09-17 by Chip - 
C_POINTER($1;$2;$Table;$Array;$3;$Errors)
C_TEXT($Sets;$msg)
C_BOOLEAN($0)

$Table:=$1
$Array:=$2
$Errors:=$3

Case of 
: (Nil($Table))  //nil table pointer (nil passed, or nothing)
  $msg:="Table pointer is Nil."

: (Not(utl_type_Is_Table ($Table)))  // pointer passed, but not to a 
table
  $msg:="Table pointer does not point to a table."

: (Nil($Array))  //nil array pointer (nil passed, or nothing)
  $msg:="Array pointer is Nil."

: (Not(utl_type_Is_An_Array ($Array;"Text")))  // array is not text
  $msg:="Array pointer does not point to an Array."
Else   //everything is OK
  $0:=True
End case 

If (Not(utl_Is_Empty (->$msg)))  // there was an error above
utl_errtxt_Add ($msg)  //add it to the error handler
End if 
utl_errtxt_End (Current method name;$Errors)  //report the error
  //End utl_whatsets_Validate


On Wed, 21 Jun 2017 17:37:19 +0200, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> $Table:=$1
>> $Array:=$2
> 
> Hi Chip, 
> If you trace in the component code, nothing helps?
> 
> Some times it helps to "look into the pointer", for example:
> 
> case of
>  :(count parameters < 2)
>   //err 1
>  :(not(Ptr_isTable($1)))
>   //err 2
>  :(not(Ptr_isArray($2;is text array)))
>   //err 3
>  else
>   //run method
> end case
> 
> -- 
> Arnaud 
> 
> 
> 
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **
---
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:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ - component method parameters

2017-06-21 Thread Arnaud de Montard via 4D_Tech

> Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> $Table:=$1
> $Array:=$2

Hi Chip, 
If you trace in the component code, nothing helps?

Some times it helps to "look into the pointer", for example:

case of
 :(count parameters < 2)
  //err 1
 :(not(Ptr_isTable($1)))
  //err 2
 :(not(Ptr_isArray($2;is text array)))
  //err 3
 else
  //run method
end case

-- 
Arnaud 



**
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:4d_tech-unsubscr...@lists.4d.com
**

v13+ - component method parameters

2017-06-21 Thread Chip Scheide via 4D_Tech
I have been working on a component.
I am in the final(?) stages of completing the component.
Many of the component methods require 1 or more pointers as parameters.

I am testing, and in my testing database, I try to compile.
During this testing, the component is NOT compiled, or built.
I am getting errors on in many places where a pointer is a parameter. 
The error all of these cases is:
Invalid constant type : Pointer

Any Ideas??
Thanks!
Chip


example:
(Testing database code)
ARRAY LONGINT($testing;0)
C_TEXT($errors)

// test passing pointer to wrong type of array
$Errors:=utl_sets_What_Sets (->[Table_2];->$testing)

(Component code)
  //(m) utl_sets_What_Sets
  // $1 - pointer - to a table to determine what, if any sets exist
  // $2 - pointer - to text array for setnames

  //Array will be cleared(sized to 0)
  //Setnames are added to Array ($2), a size zero array=no sets

  //RETURNS - text - errors if any
  // ∙ Created 06-06-17 by Chip - 
C_POINTER($1;$2;$Table;$Array)
C_TEXT($0;$Errors)
C_LONGINT($Loc)

$Table:=$1
$Array:=$2

utl_errtxt_Init  //error handler init

// validate incoming parameters - requires 3 pointers.
//  a table pointer, a Text Array pointer, and a error text pointer
If (utl_sets_whatsets_Validate ($Table;$Array;->$Errors))
 $Errors:=utl_array_Resize_Array (0;$Array)  // Clear incomming array

 If (utl_Is_Empty (->$Errors))  // If no errors
  $Start:=1

  Repeat 
   $Loc:=Find in array(<>aptr_Set_Tables;$Table;$Start)

   If ($Loc>0) & ($Loc<=Size of array(<>ax_Set_Setnames))
INSERT IN ARRAY($Array->;1;1)
$Array->{1}:=<>ax_Set_Setnames{$Loc}
$Start:=$Loc+1
   End if 
  // loop until not found, or processed entire array
  Until ($Loc<=0) | ($$Start>Size of array(<>ax_Set_Setnames))
 End if 
End if 
// report any errors encountered
utl_errtxt_End (Current method name;->$Errors)
$0:=$Errors
---
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:4d_tech-unsubscr...@lists.4d.com
**