Author Topic: WinAGI keeps inserting uncompilable characters into logic files?  (Read 12584 times)

0 Members and 1 Guest are viewing this topic.

Offline Collector

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #15 on: March 14, 2017, 09:27:34 PM »
I had a look at WinAGI a while back and played around with porting it to dotNET. I have ported some VB stuff to dotNET to port to C# since it is not too hard going from VB.NET to C#. However, WinAGI  uses something like an old VB powerpack that would have required more work to remove that dependency than I was willing to mess with. I try to have little to no VB reliance in my C# code as possible.
KQII Remake Pic

Offline AGKorson

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #16 on: March 15, 2017, 02:36:21 PM »
It does use some of the common controls, which require a separate OCX. And the text editor is a custom control that I wrote, as VB doesn't have a built in rich text editor that could provide the functionality I needed.

But those aren't the real reasons this would be difficult to port to dotNET. The real problem is that there are so many changes from VB6 to dotNET, even simple things like how screens are updated, how toolbars work, how interactions with mouse and keyboard are processed. If I really wanted to port it, I'd probably be better off writing all the user interface parts from scratch using the original as a guide. Some of the routines behind the scene also would require significant work, as dealing with classes and objects changed drastically too.

On the plus side, there are a lot of things in dotNET (VB, C# or any of the languages) that are significant upgrades in capabilities that would eliminate a lot of the things I had to do by making API calls or other programming tricks to get VB to do some of the 'high performance' things. While I feel good that I was able to leverage VB6 to create a really good tool, it would be nice if I could do those things using built-in features.

Anyway, I'm always looking for a good challenge, and I think now is the time to dive into C# and finally learn it. So helping with Visual AGI is something I think I have interest in.

(As a side note, when I first began working on WinAGI, I originally had "VisualAGI" as the title. But then I found the other "Visual AGI" program that was in progress, so I decided to choose a different name. While I used AGI Studio as the starting point, my goal all along was to create an environment that 'felt' like any other Visual Studio developer tool. So the possibility of bringing some of WinAGI's features to the new Visual AGI feels like coming back full circle.)

Offline lance.ewing

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #17 on: March 15, 2017, 04:58:14 PM »
When WinAGI starts, it looks for settings (which should be in registry). If it can't find them, (such as first time it runs) it loads defaults. For font size, the default is 10pt. If it does find settings in registry (anytime after first run) all settings get a validation check (in case registry got corrupted or something else went wrong). For font size, if a setting found in registry is less than 4pt, WinAGI uses 4pt, and if greater than 72pt, it uses 72pt.

It turns out that there was more than just the font size that was configured strangely. I suspect that the settings in the registry must have been corrupted because there was quite a lot of settings that were different from the defaults and set to rather obscure values. I would not have changed much if anything from the defaults and yet the resource list was turned off, the tab size was set to 1, the max screen objects set to 1, all zoom levels set to one, almost all checkboxes turned off (although strangely one checkbox that was enabled was the Visual Basic syntax, which I wouldn't have turned on).

I was able to click the Defaults option though and that has restored everything to how it should be. I wonder if there is some way of detecting that something has corrupted the settings and to prompt the user if they want to restore the defaults instead.

Offline Collector

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #18 on: March 15, 2017, 04:59:54 PM »
For updating it I added it into an SCI0 IDE that Gumby and I were working on, but that has mostly stopped since Phil released the new version of SCI Companion and Gumby has not been around much for sometime. I was hoping that an infusion from new people like Lance would get it going again. Anyway, this is a peek at the IDE from when I had just started to add AGI to it. You can see earlier versions of the AGI Pic and View editors at the bottom.

I might split out the SCI from it and have just AGI unless Gumby take an interest in it again.

http://www.sierrahelp.com/Temp/SCIDev.html
KQII Remake Pic

Offline Collector

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #19 on: March 15, 2017, 05:08:39 PM »
When WinAGI starts, it looks for settings (which should be in registry). If it can't find them, (such as first time it runs) it loads defaults. For font size, the default is 10pt. If it does find settings in registry (anytime after first run) all settings get a validation check (in case registry got corrupted or something else went wrong). For font size, if a setting found in registry is less than 4pt, WinAGI uses 4pt, and if greater than 72pt, it uses 72pt.

It turns out that there was more than just the font size that was configured strangely. I suspect that the settings in the registry must have been corrupted because there was quite a lot of settings that were different from the defaults and set to rather obscure values. I would not have changed much if anything from the defaults and yet the resource list was turned off, the tab size was set to 1, the max screen objects set to 1, all zoom levels set to one, almost all checkboxes turned off (although strangely one checkbox that was enabled was the Visual Basic syntax, which I wouldn't have turned on).

I was able to click the Defaults option though and that has restored everything to how it should be. I wonder if there is some way of detecting that something has corrupted the settings and to prompt the user if they want to restore the defaults instead.

I had a similar problem with corrupted settings that prevented the WinAGI from starting properly. I had to track down where it was in the registry and delete the entries to fix it. The AGI-SCI Developer preferences file can be deleted from the options and then close close/reopen it. It will (re)create the file with defaults when starting if the file is not found.
KQII Remake Pic

Offline lance.ewing

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #20 on: March 15, 2017, 05:36:21 PM »
The Settings dialog window does have a Defaults button for setting everything back to the default state. When I pressed that, everything was resolved, so I didn't have to locate the registry entry.

Offline lance.ewing

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #21 on: March 15, 2017, 05:38:40 PM »
I might split out the SCI from it and have just AGI

That sounds like a good idea. Would you call the AGI-only project Visual AGI? Or AGI Developer?

Offline Collector

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #22 on: March 15, 2017, 06:03:17 PM »
I would have to think about it. There are several differences between the two, so they are not really the same outside of the library, which I have added to. Even the pic and view editors have significant differences. Certainly I would want to be sure that Joakim M?ller and Gustaf Wennerholm receive their due credit for what is borrowed from their old Visual AGI project.

However I am not going to finish separating the two until if and when people are ready to contribute. I might just disable the SCI part.
KQII Remake Pic

Offline Kawa

Re: WinAGI keeps inserting uncompilable characters into logic files?
« Reply #23 on: March 15, 2017, 07:10:30 PM »
AGI Companion :D


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.055 seconds with 23 queries.