[comp.sys.amiga.tech] Programming differences between 2.0 and 1.3

mks@cbmvax.commodore.com (Michael Sinz - CATS) (05/08/90)

In article <8aDCJNG00WB7Q_wUMI@andrew.cmu.edu> eb15+@andrew.cmu.edu (Edward D. Berger) writes:
>I just ordered Lattice C 5.0n, and am looking for suggestions for how to
>make my programs both 1.3 and 2.0 OS compatible.  Any hints or tips will be
>appreciated.  I'm kind of a beginner in programming the amiga, and in using
>C as the language.  I'd like to avoid some of the problems.

No problem...  Just follow the rules... ;-)

Ok, so not so much "NO PROBLEM"  Well, the real answer is that you should
program by the rules and not empirically.  That is, don't just try things
and if they work think that they are right.  Design things while looking at
the rules.  Many of the problems others have had was where they would write
something and try it and when it worked, it was "right."  This is not
the case as it may just work in your system...

>I'd also welcome any thoughts on other software that will help me avoid bugs.
>Is Gimpel Lint worth buying?

Well, the first thing should be using full ANSI C function prototyping and
and definition which will help find many of the silly argument type missmatches
that give many programs trouble.

>I'll be working on an A500/A590(2Mram) system, and the software I'm working
>on is for loudspeaker simulation and design.  (hopefully more interesting
>than the SpeakerSim Demo on The Fish disks)...
>Thanks in Advance.

Sounds like a nice project to get you started...  Good luck.

/----------------------------------------------------------------------\
|      /// Michael Sinz -- CATS/Amiga Software Engineer                |
|     ///  PHONE 215-431-9422  UUCP ( uunet | rutgers ) !cbmvax!mks    |
|    ///                                                               |
|\\\///          "I don't think so," said Ren'e Descartes.             |
| \XX/                    Just then, he vanished.                      |
\----------------------------------------------------------------------/

svarsha@ic.sunysb.edu (The MAD Programmer) (05/09/90)

In article <11417@cbmvax.commodore.com> mks@cbmvax (Michael Sinz - CATS) writes:
>Ok, so not so much "NO PROBLEM"  Well, the real answer is that you should
>program by the rules and not empirically.  That is, don't just try things
>and if they work think that they are right.  Design things while looking at

This brings to mind a question that I'm suprised that none of the hackers here
have asked already: Does 2.0 support a kosher way to start a CLI process by
an existing CLI application (or even WB) such that:

1) New process has a full CLI environment.
2) Parent can specify Input() and Output() of new process
3) When new process exits, its CLI quits too without reading from Input().
4) And the new process will receive CTRL-C/CTRL-D/... signals from the parent's
   console.

1.3's Execute() is a kludge - it does #1 real well but no matter what I do 2, 3,
or 4 gets screwed up. I can usually work around it by using hacks that I have no
prayer of working in 2.0, what a bummer. (Can you say 'mucking around with
struct FileHandle'?  ...I knew you could). Hey, like u said, my code works,
work well, but can't wait to see how miserably it fails in 2.0. I don't like
doing that, mind you, but if there's a kosher way of doing this in 1.3, I'd
like to know.

P.S. Great job on the 3000, dudes.
P.P.S. This is not a flame about 1.3 or anything.

--
Rock Lobster.
Honorary member of the Obfuscation Programmers' Society of America.
(Membership: 1).

peter@sugar.hackercorp.com (Peter da Silva) (05/09/90)

Well, Hackercorp finally has our beta release (yea, how's that for speed!), and
I'm seriously impressed. Great stuff, Commodore. Impressive software. Now I go
into waiting mode until the real thing comes out and I find out how much it's
going to be to upgrade. In the meantime, expect lots of questions...

There will not be any Browser 2.0. Workbench 2.0 seems to have everything I
could possibly want. There might, however, be a compatibility library to add
some of the 2.0 DOS calls to 1.3... you see, I had to implement quite a few
of them to get Browser working. Going over my source code and the Autodocs
together is sort of like deja-vu all over again (hey, Boo-Boo, where have I
heard THAT one before?).
-- 
 _--_|\  Peter da Silva <peter@sugar.hackercorp.com>.
/      \
\_.--._/ I haven't lost my mind, it's backed up on tape somewhere!
      v  "Have you hugged your wolf today?" `-_-'

jprad@faatcrl.UUCP (Jack Radigan) (05/09/90)

mks@cbmvax.commodore.com (Michael Sinz - CATS) writes:

>Ok, so not so much "NO PROBLEM"  Well, the real answer is that you should
>program by the rules and not empirically.  That is, don't just try things
>and if they work think that they are right.  Design things while looking at
>the rules.  Many of the problems others have had was where they would write
>something and try it and when it worked, it was "right."  This is not
>the case as it may just work in your system...

Ok, here's one for ya.  I've followed the rules with JR-Comm, but I've noticed
one thing with the local dealer's A3000 that I've been sneaking on to do some
testing with 2.0.

With 1.2 and 1.3, I can open a window on the Workbench screen and keep the
window title hidden, but on the A3000, whenever I'm using the Workbench and
toggle the menu button to look at the menus I have the blank title bar remain
until the screen either scrolls or I do a clear screen on it.

I'm hoping this is just a bug in the current 2.0, but just checking to make
sure....

  -jack-

utoddl@uncecs.edu (Todd M. Lewis) (05/31/90)

Well, here's one difference I've found on a developer-friend's
1.4beta: the ENDGADGET flag on a boolean REQGADGET is no
longer sufficient to get a requester to go away.  Adding
another flag (e.g., RELVERIFY) makes it work.  I don't know
if this has been fixed in the 2.0beta, but it worked fine
in 1.2 and 1.3.  Lots of programs that open requesters
will wait forever for a REQCLEAR message that will never
come if this isn't fixed.  I may get to try it on a
2.0beta later this week.

Another problem with the 1.4beta has to do with MENUVERIFY
and how the right button is handled.  One of my programs
does something, er, special, with the right button if the
pointer is over a certain part of the window.  It does this
special thing over and over until the button is released.
Under 1.4beta, it only does it once and then the menu
gets activated even though I sent back MENUCANCEL to the
MENUVERIFY message.  Again, I hope to test this with my
developer-friend's 2.0beta sometime this week.
_____        
  |      Todd M. Lewis            Disclaimer: If you want my employer's
  ||\/|  utoddl@ecsvax.uncecs.edu             ideas, you'll have to
  ||  || utoddl@ecsvax.bitnet, @unc.bitnet    _buy_ them. 
   |  || utoddl@next1.mscre.unc.edu 
       |___   ("Prgrms wtht cmmnts r lk sntncs wtht vwls." --TML)