Author Topic: Where to find Toolkit2.0 - SOM compiler .sc files....  (Read 4436 times)

Andi B.

  • Hero Member
  • *****
  • Posts: 821
  • Karma: +11/-2
    • View Profile
Where to find Toolkit2.0 - SOM compiler .sc files....
« on: December 23, 2023, 04:58:35 pm »
I've toolkit 2.1 and probably all newer ones. Even Watcom10.6 includes some .sc files. But the project I'm working on seems to need Toolkit v2.0.

I've no clue about SOM and classes and.... but there is one .csc file in my project which constantly bothers me. There should be a way to convert this .sc file to the newer .idl form. ctoi.cmd which is included in os2tk45. But it complains about a file in toolkit21
Code: [Select]
{0}[e:\_work\pmprintf\trunk] ctoi WPSTEST.CSC
WPSTEST.CSC:
"wpobject.sc", line 440: error: Override method "somInitClass" not in base class.
"wpobject.sc", line 444: error: Override method "somNew" not in base class.
"wpobject.sc", line 448: error: Override method "somRenew" not in base class.
Number of errors: 3
error in converting WPSTEST.CSC

So I think I need toolkit20. Where can I find it? Any other ideas? Maybe I try to disable all these SOM things in pmprintf cause I guess nobody will ever use pmprintf with som classes anymore anyhow.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4756
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Where to find Toolkit2.0 - SOM compiler .sc files....
« Reply #1 on: December 23, 2023, 10:59:07 pm »
Hello

I don't know much about it, but I found this: http://www.edm2.com/index.php/SOMClass
somInitClass, was deprecated. But somNew and somRenew are not.

For the little I know it seems that .CSC was replaced by .IDL on later releases for the SOM toolkit.

Now I need to remember where I got this samples:
- https://github.com/OS2World/DEV-SAMPLES-IBM_OS2_2-0_Toolkit

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1277
  • Karma: +65/-0
    • View Profile
Re: Where to find Toolkit2.0 - SOM compiler .sc files....
« Reply #2 on: December 24, 2023, 02:18:51 pm »
I've toolkit 2.1 and probably all newer ones. Even Watcom10.6 includes some .sc files. But the project I'm working on seems to need Toolkit v2.0.

I've no clue about SOM and classes and.... but there is one .csc file in my project which constantly bothers me. There should be a way to convert this .sc file to the newer .idl form. ctoi.cmd which is included in os2tk45. But it complains about a file in toolkit21
Code: [Select]
{0}[e:\_work\pmprintf\trunk] ctoi WPSTEST.CSC
WPSTEST.CSC:
"wpobject.sc", line 440: error: Override method "somInitClass" not in base class.
"wpobject.sc", line 444: error: Override method "somNew" not in base class.
"wpobject.sc", line 448: error: Override method "somRenew" not in base class.
Number of errors: 3
error in converting WPSTEST.CSC

So I think I need toolkit20. Where can I find it? Any other ideas? Maybe I try to disable all these SOM things in pmprintf cause I guess nobody will ever use pmprintf with som classes anymore anyhow.

Why would you bother? The SOM compiler of the os2tk45 is able to generate source/header files from the old style CSC files. There is a command line switch for it.

Lars

  • Hero Member
  • *****
  • Posts: 1277
  • Karma: +65/-0
    • View Profile
Re: Where to find Toolkit2.0 - SOM compiler .sc files....
« Reply #3 on: December 24, 2023, 02:32:28 pm »
If that does not work: tell me where I can find that CSC file and I convert it for you from yesteryear to present time.

Lars

  • Hero Member
  • *****
  • Posts: 1277
  • Karma: +65/-0
    • View Profile
Re: Where to find Toolkit2.0 - SOM compiler .sc files....
« Reply #4 on: December 27, 2023, 09:51:33 am »
Find attached an .IDL replacement file that should substitute the wptest.CSC file.

Andi B.

  • Hero Member
  • *****
  • Posts: 821
  • Karma: +11/-2
    • View Profile
Re: Where to find Toolkit2.0 - SOM compiler .sc files....
« Reply #5 on: December 27, 2023, 12:38:12 pm »
Thanks Lars. I'll try to integrate that into the build system of pmprintf (polymake and...). But maybe will take a while until I worked out some other problem.

Lars

  • Hero Member
  • *****
  • Posts: 1277
  • Karma: +65/-0
    • View Profile
Re: Where to find Toolkit2.0 - SOM compiler .sc files....
« Reply #6 on: December 28, 2023, 12:49:49 pm »
Oops, I declared the wrong metaclass for the class. Find the fixed wpstest.idl attached.