Tom, You can pass variables directly to component methods, and vice versa, just fine when you simply need to pass the value of the variable. You only need to pass pointers when you want to the component to change the value of the variable pointed to. The same is true if the component is using a method from the host db. Bear in mind the component can only access the code for the method - it won't know anything about the IP vars the database method might reference. So if the database method is something like:
// aMethod (a pointer) $1->:=<>someIPvar // defined in the host db when you call it from a component <>someIPvar won't have the value it does in the database. Unless you defined it in the component it will be an undefined variable which could throw the syntax error you mention. On Thu, Jan 5, 2017 at 9:15 PM, Benedict, Tom <[email protected]> wrote: > I have added a call to a 4D Component which calls a method in the host DB. > That host DB method has its "Shared by components and host database" > attribute checked. Both component and host db are uncompiled. Both are > syntax checked. The host method tests successfully when called by code in > the host. > > When the host DB method is called by an object method in the component, > the syntax errors "The command cannot be applied between two Alphanumeric > arguments." and "Argument types are incompatible." are generated. > > The language reference explains that parameters in methods shared by > components and host need to be pointers so I have made them pointers and > declared them as such. The pointers reference global variables. > > If, I step into the debugger via trace the arguments look good to me. They > dereference to the text values which I expect. I don't understand the > syntax errors. > > Any idea what I may be doing wrong? > > -- Kirk Brooks San Francisco, CA ======================= ********************************************************************** 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] **********************************************************************

