Re: Set_Exists() function: Simple version

2017-07-17 Thread Chip Scheide via 4D_Tech
this is basically what I did, but used arrays rather then ab object. shameless plug : https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0 Distributed as shareware $15 ($35 for source & a suite testing routines), it is a compiled/built component created in v13. If you like it

Re: Set_Exists() function: Simple version

2017-07-17 Thread Chip Scheide via 4D_Tech
David, I wrote a complete collection of set operation routines here : https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0 Distributed as shareware $15 ($35 for source & a suite testing routines), it is a compiled/built component created in v13. If you like it you are free to

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
First I have to get some more logical errors out of my code. The below is cleaned up. C_BOOLEAN($0;$setDoesExist) C_TEXT($1;$setName) C_BOOLEAN($testInSet) C_LONGINT($numInSet) $setName:=$1 $numInSet:=Records in set($setName) If ($numInSet>0) $setDoesExist:=True Else

Re: Set_Exists() function: Simple version

2017-07-17 Thread Rob Laveaux via 4D_Tech
Maybe you should take a slightly different approach here. In the JavaScript framework that comes with NTK Plugin, 4D sets are implemented as follows (simplified version). function RecordSet( table ) { assert( table instanceof Table, 'Table object expected' ); this.id =

Re: Set_Exists() function: Simple version

2017-07-17 Thread Julio Carneiro via 4D_Tech
Robert, Just out of curiosity, what happens if there is no current record to add to the set? - do you get an error, which might only indicate no record exists to add to an existing set? - nothing happens, even if set does not exist? > On Jul 17, 2017, at 8:48 AM, Robert Livingston via 4D_Tech

Re: Set_Exists() function: Simple version

2017-07-17 Thread David Adams via 4D_Tech
Hey! Don't get me wrong about sets, they are GREAT. In my opinion, there one of 4D's great unsung features. SQL is always doing full set math, but that's *very* different to doing bit math on these big bit arrays (not exactly what a 4D set is, but for the sake of conversation...) 4D set operations

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
In the sample code: $testInSet:=ADD TO SET($setName) should just be ADD TO SET($setName) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options:

Re: Set_Exists() function: Simple version

2017-07-17 Thread David Adams via 4D_Tech
...or am I supposed to but Wayne to put in a tech support ticket? On Mon, Jul 17, 2017 at 5:44 PM, David Adams wrote: > Okay, on to my next remedial question: How do we find out if this is a > reliable behavior? > > I'm on the forums in France now a bit (where I've been

Re: Set_Exists() function: Simple version

2017-07-17 Thread David Adams via 4D_Tech
Okay, on to my next remedial question: How do we find out if this is a reliable behavior? I'm on the forums in France now a bit (where I've been making friends and helping everyone great each new day with optimism and good cheer), but I don't know where I meant to ask questions that will end up

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
> On Jul 16, 2017, at 9:18 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > So, I'd be grateful if anyone that is Really Into Sets (we all know you're > out there!) gave it some thought. If it's reliable, great! If not, I'll > kill it rather than rely on it. I really should shut

Re: Set_Exists() function: Simple version

2017-07-17 Thread Justin Carr via 4D_Tech
On 17 Jul 2017, at 5:03 pm, Robert Livingston wrote: > > >> On Jul 16, 2017, at 9:09 PM, Justin Carr via 4D_Tech <4d_tech@lists.4d.com >> > wrote: >> >> Are you able to provide a link to where the documentation states this? > > I really have

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
> On Jul 16, 2017, at 9:09 PM, Justin Carr via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Are you able to provide a link to where the documentation states this? I really have to totally retreat here. Talk about faulty memory| When I wrote that note, I was "convinced" that I had just read in

Re: Set_Exists() function: Simple version

2017-07-16 Thread David Adams via 4D_Tech
Justin's interpretations of my email are correct. For the record, here's the error handler: Error:=Error So, yeah, nothing exciting there. I posted my code because I'm not confidant in it. I don't remember when I wrote it and I haven't kept up with all of the various permutations on where sets

Re: Set_Exists() function: Simple version

2017-07-16 Thread Justin Carr via 4D_Tech
On 17 Jul 2017, at 5:07 am, Robert Livingston via 4D_Tech <4d_tech@lists.4d.com> wrote: > > On Jul 14, 2017, at 5:10 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> > wrote: >> >> I was just consolidating some old code and ran across something that I >> wrote some time back called

Re: Set_Exists() function: Simple version

2017-07-16 Thread Robert Livingston via 4D_Tech
When David writes I generally find it very clear if it is discussing something that is basic enough for me to have a chance to understand in the first place. But I found this message a little confusing and yet sets seem to be a fairly basic topic. > On Jul 14, 2017, at 5:10 PM, David Adams