xsharp.eu • IDE PITA.
Page 1 of 1

IDE PITA.

Posted: Mon Jul 08, 2019 10:37 am
by Anonymous
HI. As I mentioned in my last thread (bBrowser colorcondition) I'm having continual regulary IDE crashes where on Compiling, VO says something like Method doesn't have a Return, or in this case, variables are declared but aren't used. I've got to the point now where I KNOW it's going to play up, so I copy the code to Word, and let it crash. I then copy the same code back, and away I go again.... Until next time. Attached are 3 screenshots in order of how it manifests itself Fail 1, 2 and 3

Any ideas would be GRATEFULLY received. This is basically a NEW installation (only about 4 weeks old)

Thanks again.

IDE PITA.

Posted: Mon Jul 08, 2019 12:28 pm
by ic2
Hello Jeff,

What I miss is the actual crash, do you see an error?
When I look at the code in picture 2/3 there are quite a few remarks I can make. But even then it should not lead to a crash unless it's something like an old repository which has never been rebuilt. I re-create the repo 2-3 x a year,
1 Export all AEF's
2 Rename repo dir
3 From VO create new project, same project name + path, creates empty repo.
4 Then I import all AEF's from 1) and use Paul Piko's VOPP (if you don't own it, buy it - it's a must) and use Tools/More/System Builder - note I do not use VOPP for importing as this is slower in the later VO versions than importing). That should really take care of any corruptions.

But now looking at your code:

1 Create your own subclass of Datawindow and never add methods to the default classes. More than
CLASS BiggyRatDataWindow INHERIT DataWindow and in the window editors entering inherit from - BiggyRatDataWindow is not necessary to start with. You can e.g. override an existing Datawindow method by writing it in BiggyRatDataWindow and calling super. E.g.
Method Skip class BiggyRatDataWindow
// do something special not done in the default method
super:Skip() // perform the default action
return


2 Make sure your variables are typed.
So not Local aRay
but
Local aRay as array

and of course add a Return statement. If you do not have anything specific to return you can use Return Nil or Return True

3 Strong type your methods. This does require your own classes. In your sample it is:
METHOD Ttos(sTime as string, oServer as ...) AS LOGIC PASCAL CLASS BiggyRatDataWindow

(oServer datatype could be your own dataserver subclass or object)
Then add, under your class statement:
Declare Method Ttos

Great thing now is that when you call Ttos and forget a parameter or supply a wrong datatype the compiler will complain instead of the error handler at your client's system!

Hopefully this helps a bit.

Dick

IDE PITA.

Posted: Mon Jul 08, 2019 2:09 pm
by BiggyRat
Hi Dick, thanks for all that advice, I'll do ALL of that in the morning.

No, there's no error ever EXCEPT that the compile fails with obvious false errors, like in shot 2. I can see the correct code on the screen, yet it says that code isn't there... That's when I know it's going to fail.
BTW, I DO use "Local aRay as Array" in my code, and that's missing too.... perhaps there's a clue for me there? I hadn't noticed that until you mentioned it.

IDE PITA.

Posted: Mon Jul 08, 2019 2:21 pm
by FFF
BiggyRat wrote:BTW, I DO use "Local aRay as Array" in my code, and that's missing too.... perhaps there's a clue for me there? I hadn't noticed that until you mentioned it.
I wonder this compiles at all. As VO is case-insensitive it will read "Local array as array".
Just tried in my 2838 and get a "bad statement syntax"
EDIT: Forget it, didn't see the missing "r" in the name, sorry. Maybe another name wouldn't hurt ;)

IDE PITA.

Posted: Mon Jul 08, 2019 2:24 pm
by ic2
Hello Jeff,

No, your variable has a singe 'r':

Local aray as array

That will work.

If you like you can mail me contact info (phone number + time) and I can have a look with Teamviewer to see what is actually happening. That may save you a lot of time.

Dick