Jim, I must be missing something - where is $2 defined? On Fri, Dec 1, 2017 at 12:28 PM, Jim Dorrance via 4D_Tech < [email protected]> wrote:
> $tCallbackMethod gets called in the context of the host database and $1 is > correct. It is just that $2 contains ->$ > > On Fri, Dec 1, 2017 at 9:23 PM, Jim Dorrance <[email protected]> > wrote: > > > Thanks for your input. > > > > On a contextual click on a svg area in a subform: > > > > $nArraySize:=*Size of array*($atSelectedRecordKeys) > > > > *If *($nArraySize>0) > > > > *EXECUTE METHOD*($tCallbackMethod;*;$tSubformName;->$ > atSelectedRecordKeys) > > > > *End if * > > > > > > And I works when the component runs interpreted or compiled. If I build a > > component, I get ->$ in the $tCallbackMethod, not a valid pointer. > > > > > > How else could I pass an array of record keys to the host? > > > > > > Jim > > > > On Fri, Dec 1, 2017 at 7:08 PM, Kirk Brooks via 4D_Tech < > > [email protected]> wrote: > > > >> Jim, > >> > >> First, if $tCallbackMethod is a Host database method it must have the > >> Shared with host & component property set. > >> > >> As I understand it EXECUTE METHOD runs in the context of the method > >> called. > >> So if $tCallbackMethod is in the host it will run there. If it's in the > >> component it will run there. > >> > >> Since this is being called in the context of a component that means > >> $atSelectedRecordKeys > >> is in the component memory space and I don't think can be passed to a > host > >> method as a reference if $tCallBackMethod is a host method. This would > >> account for it working when you run the component code itself but > failing > >> when called as a component. > >> > >> Maybe put the array in a blob or c-obj and pass that? > >> > >> > >> On Fri, Dec 1, 2017 at 1:32 AM, Jim Dorrance via 4D_Tech < > >> [email protected]> wrote: > >> > >> > 4D v15.5 > >> > > >> > EXECUTE METHOD($tCallbackMethod;*;$tSubformName;->$atSelectedRecordK > >> eys) > >> > > >> > On a contextual click in a component subform displayed in the host > >> > database, the method $tCallbackMethod is to be executed in the context > >> of > >> > the host database. > >> > > >> > When the component source runs interpreted, or the component source is > >> run > >> > compiled, everything runs as expected. > >> > > >> > But after building a component using the Build Application menu, the > >> > callback method receives $1 correctly, but $2 contains ->$, a pointer > >> to $. > >> > > >> > Anybody have any idea what could be happening? > >> > > >> > -- > >> Kirk Brooks > >> San Francisco, CA > >> ======================= > >> > >> *The only thing necessary for the triumph of evil is for good men to do > >> nothing.* > >> > >> *- Edmund Burke* > >> ********************************************************************** > >> 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] > >> ********************************************************************** > > > > > > > > > > -- > > Jim Dorrance > > [email protected] > > [email protected] > > www.4d.dorrance.eu > > > > PS: If you know of anyone that needs an experienced 4D programmer to add > > energy and experience to their team, please let me know. I have > > experience in many areas. Reasonable rates. Remote or Paris only. > > > > > > -- > Jim Dorrance > [email protected] > [email protected] > www.4d.dorrance.eu > > PS: If you know of anyone that needs an experienced 4D programmer to add > energy and experience to their team, please let me know. I have > experience in many areas. Reasonable rates. Remote or Paris only. > ********************************************************************** > 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] > ********************************************************************** > -- Kirk Brooks San Francisco, CA ======================= *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ********************************************************************** 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] **********************************************************************

