On Dec 10, 2003, at 10:00 AM, [EMAIL PROTECTED] wrote:
The "some_method" is actually code from the "WebDAV" example on the 4D site. The specific method is called WDAV_Directory List. To further test this I created a 4D method "aaaTest"
C_POINTER($1) C_TEXT($0)
C_STRING(80;$sName) C_LONGINT($iTable;$iField)
RESOLVE POINTER($1;$sName;$iTable;$iField)
$0:=$sName
from Active 4D I have the following code:
c_pointer($ptrArray) $ptrArray:=DSS_get_array_by_unary_type(2) write("this is the Array name...") write(aaatest($ptrArray)) dss_return_variable($ptrArray) exit
The result in interpreted mode is: this is the Array name...*axDSS_001
In compiled mode: this is the Array name...*
Looking hard at this one... Some things to try...
Can you remove the usage of $1 in the RESOLVE POINTER command in your test method? Instead, assign $1 to a local variable and then use that local variable when calling RESOLVE POINTER.
After the DSS_Get_Arroy_by_Unary, please place the followng line of code:
ALERT(STRING(NUM(VAR_qi_NULL_Pointer($ptrArray))))
You _should_ have an alert in all situations that is displaying "0", meaning the pointer returned is not NULL.
Try putting the RESOLVE POINTER line of code in the same method as your DSS calls. We are seeing with this test if it is the calling of the method that is having an affect on the variable type that is referenced for the DSS variable.
Let me know what these three different ideas/tests provide for us in terms of information.
Sorry for the delay in following up on this. Ok I went through your 3 ideas and here is what I came up with.
1. remove usage of $1 (no change)
uncompiled: --> this is the Array name...*axDSS_001
compiled: --> this is the Array name...*2. use ALERT(STRING(NUM(VAR_qi_NULL_Pointer($ptrArray))))
the Alert causes an Active4D error so I changed it to write(STRING(NUM(VAR_qi_NULL_Pointer($ptrArray))))
Nothing displays in the browser, but looking at the source (view source in browser) it has returned "0" (no quotes)
BUT
if I have
write(STRING(NUM(VAR_qi_NULL_Pointer($ptrArray)))) and immediately follow it with
write(aaatest($ptrArray))
I get "0*AXDSS_003"
3. RESOLVE POINTER line in Active4D code
c_pointer($ptrArray)
C_STRING(80;$sName)
C_LONGINT($iTable;$iField)
$ptrArray:=DSS_get_array_by_unary_type(2)
RESOLVE POINTER($ptrArray;$sName;$iTable;$iField)
write($sName) -> nothing in browser but view source has: <>¸H
Thanks Steve for looking at this. If you have any more thoughts I'd appreciate them.
Barclay Berry
