1. Ferdinand Fischer
  2. PowerBuilder
  3. Friday, 19 June 2020 09:18 AM UTC

Hello,

today i found code where someone updates a Datastore with update(datastore).

I could not find any reference to this function.

Does anyone know anything about this function?

regards,

Ferdinand Fischer

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 June 2020 16:46 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Ferdinand ;

    Well that statement would be pre-PB v4.0. In the early years of PB 1.0, 2, 3 ... PowerScript was based more on the "Basic" language because most new PB developers were used to Basic and/or COBOL. So most commands were XXXXXX ( Object ) in syntax nature. For example:

SetActioncode (THIS, -1 )  // EditChanged Event in PB 1.x

     In PB 2.0, PowerSoft decided that they would move from "C" to C++ in the background for the IDE. That is because their goal now was to make PB more like "SmallTalk" (considered fully object oriented at that time). SmallTalk at that time (late 1980's) was THE OO tool to use. So with the OO model in mind, the SetActionCode() command became:

THIS.SetActioncode (-1 )  // EditChanged Event in PB 2/3.x

   In PB 4.0, PowerSoft changed their approach on the SetActionCode() command and replaced it with

RETURN  -1

   So if your App was built under a very old version of PB or your an old PB Developer (like me - LOL), you can still use the older versions of the PowerScript Syntax. The IDE compiler will accept the old syntax. It might give you a warning but, it should allow you to compile & save if you ignore it.

  So if your in a refactoring mode, just change the command to <DS>.Update() to be "hip".  ;-)

PS: Trivia ... The 1st OO language was Simlua and it was released in 1963.

      https://en.wikipedia.org/wiki/Simula

Regards ... Chris

Comment
  1. Ferdinand Fischer
  2. Monday, 22 June 2020 06:41 AM UTC
Hi Chris,

Thank you for the information.



Regards

Ferdinand
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 19 June 2020 10:44 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

Can it be a user function? You found that in a post?

Andreas.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.