Re: Can a component access Filters/Formats of the Host?
I want to be able to access host formats actually, for use in a listbox component > Chip, > > I’ve been using Pluggers API pack plugin and this method, which works > fine for formats. It may be that OBJECT Get filter and OBJECT Get > format would do what you want (from v15R5, according to the dox). > > Jeremy > > > > // resolve a format name into its string > > // $1: name > > C_TEXT($0;$1;$resolveName) > $resolveName:=$1 > If (Substring($resolveName;1;1)="|") > $resolveName:=Substring($resolveName;2) > End if > > C_LONGINT($i;$err) > C_TEXT($root;$filterRoot;$name;$value) > C_BLOB($res) > > //%w-533.4 no "missing parameter to plugin" message from next line > $err:=API Get Indexed Resource ("ST4D";1;$res) > > If ($err=0) > $res:=API Bag To XML ($res) > $root:=DOM Parse XML variable($res) > If (OK=1) > ARRAY TEXT($names;0) > $filterRoot:=DOM Find XML element($root;"bag/filters";$names) > > For ($i;1;Size of array($names)) > DOM GET XML ATTRIBUTE BY NAME($names{$i};"name";$name) > If ($name=$resolveName) > DOM GET XML ATTRIBUTE BY > NAME($names{$i};"value";$value) > $i:=MAXINT > End if > End for > > DOM CLOSE XML($root) > End if > > $0:=$value > End if > > >> On 16 Oct 2019, at 19:44, Chip Scheide via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> title says it all >> >> Thanks >> Chip > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** Hell is other people Jean-Paul Sartre ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Can a component access Filters/Formats of the Host?
Chip, I’ve been using Pluggers API pack plugin and this method, which works fine for formats. It may be that OBJECT Get filter and OBJECT Get format would do what you want (from v15R5, according to the dox). Jeremy // resolve a format name into its string // $1: name C_TEXT($0;$1;$resolveName) $resolveName:=$1 If (Substring($resolveName;1;1)="|") $resolveName:=Substring($resolveName;2) End if C_LONGINT($i;$err) C_TEXT($root;$filterRoot;$name;$value) C_BLOB($res) //%w-533.4 no "missing parameter to plugin" message from next line $err:=API Get Indexed Resource ("ST4D";1;$res) If ($err=0) $res:=API Bag To XML ($res) $root:=DOM Parse XML variable($res) If (OK=1) ARRAY TEXT($names;0) $filterRoot:=DOM Find XML element($root;"bag/filters";$names) For ($i;1;Size of array($names)) DOM GET XML ATTRIBUTE BY NAME($names{$i};"name";$name) If ($name=$resolveName) DOM GET XML ATTRIBUTE BY NAME($names{$i};"value";$value) $i:=MAXINT End if End for DOM CLOSE XML($root) End if $0:=$value End if > On 16 Oct 2019, at 19:44, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > title says it all > > Thanks > Chip ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Can a component access Filters/Formats of the Host?
On Oct 16, 2019, at 12:00 PM, 4d_tech-requ...@lists.4d.com wrote: > > Message: 8 > Date: Wed, 16 Oct 2019 14:44:34 -0400 > From: Chip Scheide <4d_o...@pghrepository.org > <mailto:4d_o...@pghrepository.org>> > To: 4D iNug Technical <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> > Subject: Can a component access Filters/Formats of the Host? > Message-ID: <20191016144434229706.b7c08...@pghrepository.org > <mailto:20191016144434229706.b7c08...@pghrepository.org>> > Content-Type: text/plain; charset=us-ascii > > title says it all > Chip… I don’t think directly… but, you can via a “Host” method that you call from the component and return the value from that method to the component. ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Can a component access Filters/Formats of the Host?
title says it all Thanks Chip We have done so much, with so little, for so long; We are now qualified to anything with nothing - unknown ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **