Author Topic: Would Someone Please Explain...  (Read 10494 times)

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Would Someone Please Explain...
« on: December 04, 2007, 09:43:11 AM »
...why USER-FORMS INV.PRINT says this:

CALL SB.PROCESS('B:AUPDATE')

...instead of simply:

CALL AUPDATE

???

Why the indirection through SB.PROCESS?  I would normally think that this might provide process security through SB+'s group security mechanism, but the B: pretty well defeats that.  Besides, why would anyone ever want to defeat AUPDATE on a user-by-user basis?

Just trying to understand..
-Kevin
Accidents "happen"; success, however, is planned and executed.

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: Would Someone Please Explain...
« Reply #1 on: December 05, 2007, 06:43:42 AM »
The call in USER-FORMS CONT.INV.PRINT is

CALL SB.PROCESS('B:AUPDATE,C')

While I can see that this would permit a variable number of parameters, using PARAM = "C" before the call would have the same effect.

I'm guessing this is an early SB+ wrap issue.  There are similar calls in INV.PRINT to INV.MASK and CLEAR.LINES.

--Tom

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: Would Someone Please Explain...
« Reply #2 on: December 05, 2007, 08:16:15 AM »
I've also seen the reverse on slots with an inline paragraph, ala:

P:(CALL subroutine)

...When it could have been done more simply (well, in my interpretation of "simply") as:

B:subroutine

This kind of stuff just vexes me and I'd love to hear some rationale - ANY rationale - for why this is so.  Understand, I'm not necessarily saying it's wrong, but if it IS right, I'd love to know why.
-Kevin
Accidents "happen"; success, however, is planned and executed.

nmorgan

  • Professional
  • ***
  • Posts: 40
  • Norman Morgan
    • Brake Supply Co.
Re: Would Someone Please Explain...
« Reply #3 on: December 05, 2007, 10:04:29 AM »
That kind of thing, plus the jumbled mess of multi-statement lines and much more is the reason I have so many report programs that duplicate the function of existing Prelude code just to add a minor feature.  It is often easier to start from scratch to to figure out their tangled logic.  At least in USER-FORMS, the stuff is fair game and when something is impossibly annoying, I go ahead and straighten it out.
My wife says her life is like a fairy tale.
She married a prince and he turned into a toad.

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: Would Someone Please Explain...
« Reply #4 on: December 06, 2007, 06:45:16 AM »
As you know, many people who are new to a product will look at existing code to determine how to do something, especially if they need it quickly, rather than wading through manuals looking for the best way to do it.

Unfortunately, GIGO applies to this method of learning...

Most of Prelude's process slots are of the form:  P:(statements).  I suspect that this was the earliest "solution" to be implemented when the application was wrapped.

I believe that Prelude and their customers could benefit greatly if they were to overhaul the system to take full advantage of all the SB+ features, but I don't see that happening -- it just isn't a priority.

--Tom

PS - Norman, I miss your sig quotes when you post here!!! :D

nmorgan

  • Professional
  • ***
  • Posts: 40
  • Norman Morgan
    • Brake Supply Co.
Re: Would Someone Please Explain...
« Reply #5 on: February 08, 2008, 01:35:37 PM »
PS - Norman, I miss your sig quotes when you post here!!! :D

Like this one?
My wife says her life is like a fairy tale.
She married a prince and he turned into a toad.

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: Would Someone Please Explain...
« Reply #6 on: February 11, 2008, 02:54:48 PM »
Precisely!!  ;D