SingleInstance Property on a Codeuniut

bhuberbhuber Member Posts: 78
edited 2002-06-06 in Navision Attain
Is there a way to set the value of the SingleINstance property at runtime?

Comments

  • goldeneyegoldeneye Member Posts: 14
    I don't think there is a way to do that. But you can emulate it like this:

    - Make a function that clears all the globals (including deleting automation and OCX objects) called 'ClearAllGlobals'.

    - Make a global text-variable called 'EnteredAt', length 30 (the max. length of a functionname)

    - Model every function according to this example:

    myfunction1
    BEGIN
    IF EnteredAt = '' THEN
    EnteredAt = 'myfunction1';

    ....

    IF EnteredAt = 'myfunction1' THEN
    ClearAllGlobals();
    END;

    Put the ending code before every EXIT() statement as well. And only return values of local variables!! Or you'll return a cleared global.
    aka Vincent Vancalbergh

    "I tried filtering life, but the universe returned an Internal Error"
Sign In or Register to comment.