Kirk Brooks wrote:
>That being said I think the best solution for me right now is the error 39
>trap Jeremy and David and some others have suggested.
Just FYI, the Save Set command saves the specified set to a document unless the
set does not exist, in which case no document is created, no error
David,
On Tue, Oct 18, 2016 at 5:12 PM, David Adams wrote:
> I thought that I already had a Set_Exists("Set_Name") : Boolean
> function...but I didn't. Thanks for the conversation,
Almost always ready to converse. And "yeah, I thought I had that too"
until I tried to find it.
Thanks for actual
Doug,
On Tue, Oct 18, 2016 at 12:13 PM, Douglas von Roeder
wrote:
> Use set throws error 39 if the referenced set does not exist. However,
> Records in set returns 0 *without* throwing an error. Hmm…
>
> Your point about recreating the set is valid but that also sidesteps the
> possibility that
I thought about this as a feature request, but I have not officially posted it
yet. It would be really useful if 4D could call a method of your choosing when
an object goes out of scope (no more references to it). Lots of other languages
have something like this which allows you to ensure that r
I thought that I already had a Set_Exists("Set_Name") : Boolean
function...but I didn't. Thanks for the conversation, this code works in
V13 (what I have open right now):
C_BOOLEAN($0;$exists)
C_TEXT($1;$set_name)
$set_name:=$1
Error:=0
ErrorHandler_Install ("ErrorHandler_SuppressError")
C_BOO
Depending on the scope of the set you can wrap the CREATE SET and CREATE
EMPTY SET so each time a set is created you add it to an Object or Array.
Then you simply test if that set name is in the array.
The same wrapper can be used when the set is Cleared so the arrays/ object
is in sync.
It is s
Hi Kirk,
Have you tried trapping for error code 39 ("The set does not exist") with the
command "Is in set"?
If the set is nonexistent, error 39 ("The set does not exist") occurs.
So you could have method that you pass the set name to, invoke ON ERR CALL,
call the “Is in set” command, and retur
On Tue, Oct 18, 2016 at 10:46 AM, Kirk Brooks wrote:
> Doug,
> I thought about that too. But then I'm fiddling around with the current
> selection.
>
> I guess there's no issue with simply re-creating a set if it has no records
> in it..
>
Kirk:
Agreed.
I just ran a bit of code (V12) to unders
Doug,
I thought about that too. But then I'm fiddling around with the current
selection.
I guess there's no issue with simply re-creating a set if it has no records
in it..
On Tue, Oct 18, 2016 at 8:28 AM, Douglas von Roeder
wrote:
> Kirk:
>
> IIRC, activate an error handler prior to calling th
Randy,
That was my first thought too. In this case I need to know if the set has
been attempted to be created.
But maybe not. Have to work with what I have I suppose.
On Tue, Oct 18, 2016 at 8:16 AM, Randy Engle <4d.l...@xc2.us> wrote:
> Kirk,
>
> It's not 100% what you are looking for, but I'm
Kirk:
IIRC, activate an error handler prior to calling the command that uses the
set.
--
Douglas von Roeder
949-336-2902
On Tue, Oct 18, 2016 at 8:16 AM, Randy Engle <4d.l...@xc2.us> wrote:
> Kirk,
>
> It's not 100% what you are looking for, but I'm pretty sure you can do a
> "Records in Set"
>
Kirk,
It's not 100% what you are looking for, but I'm pretty sure you can do a
"Records in Set"
$0:=Records in Set("MySet")
If the set does not exist, it will return 0.
Of course this is also true if the set exists with zero records in it. ;-)
Randy Engle
XC2 Software LLC
-Original Mes
12 matches
Mail list logo