• Welcome to PlanetSquires Forums.
 

Update

Started by Paul Squires, March 21, 2018, 10:01:04 AM

Previous topic - Next topic

Paul Squires

Quote from: Paul Squires on July 08, 2018, 06:55:59 PM
My plan is to upload a test version of the editor package by Thursday, July 12 so you guys can see the direction that the visual designer is headed in and provide some feedback. I will include a small sample program showing the available buttons and some code that responds to events, etc. So far the controls available are Button, CheckBox, ListBox, Label and TextBox.


OMG, I hate writing documentation. :)
Won't have the docs finished tonight so upload will have to wait.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Johan Klassen

thanks for the update :)

Paul Squires

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Johan Klassen

thank you Paul :)
I gave it a test and found some issues
1. there's no apparent way to switch between the form view and code view
2. TextBox TextAlignment can't be changed from the default left to something else
3. if you try save a form-file with the same name as the project WinFBE closes without saving the file

but I managed without much effort to make a simple GUI app, thank you :)

Paul Squires

Hi Johan,

#1, there is two easy ways. (1) Double click the tab (the top top with the filename in it), or (2) At the bottom of the screen there is another tab control with two tabs "Design", "Code". This is only available for those files created via top menu "Designer", "New Form".

#2, yup broken. I must have not wired the code that loads the drop down combobox with the choices.

#3, I can't duplicate that. I assume you save the form as <projectname>.bas and not <projectname>.wfbe, because obviously if you save it as <projectname>.wfbe then you have overwritten the project file.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Johan Klassen

thank you Paul :)
I can't believe I missed the design/code tabs, guess I should have consulted the help file  :-[
regarding item 3, it's tricky to replicate.

Paul Squires

At times there will be a random GPF when the compiled application ends. I noticed it happen more on Windows 7 than on Windows 10. I'll track down the cause of that but it certainly looks like a reference to a null pointer.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Johan Klassen

#37
hello Paul
WinFBE exited again yesterday when trying to save a project, the project had already been saved before, I only wanted to save it again due to to changes.
today I tried to open the same project again, it took WinFBE about 5 minutes to open the project, I am not sure what the problem might be, is it Windows 10 hogging up the system or is WinFBE having a problem parsing the project files?
[edit]
after changing the names of the Buttons and saving the project and trying to compile, WinFBE exits, launch WinFBE again and try to load the project -- after four minutes of waiting WinFBE exits.
launch WinFBE again, load the project -- took five minutes -- all the button name changes are gone

Paul Squires

Thanks for the update and the file... I will work on it now to see if I have the same results as you have seen.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Hi Johan
Quote from: Johan Klassen on July 17, 2018, 10:53:41 AM
hello Paul
WinFBE exited again yesterday when trying to save a project, the project had already been saved before, I only wanted to save it again due to to changes.
today I tried to open the same project again, it took WinFBE about 5 minutes to open the project, I am not sure what the problem might be, is it Windows 10 hogging up the system or is WinFBE having a problem parsing the project files?
[edit]
after changing the names of the Buttons and saving the project and trying to compile, WinFBE exits, launch WinFBE again and try to load the project -- after four minutes of waiting WinFBE exits.
launch WinFBE again, load the project -- took five minutes -- all the button name changes are gone

Hi Johan,

The incredible slow loading was the result of me using AfxStrParse to retrieve each individual line in the full edit buffer. I should have known this would be a problem because in my old FireFly visual designer code I had experienced the same problem with I used PB's PARSE statement. I modified the code to progressively scan the edit buffer from each found CR/LF and extract the line using that method. This is incredibly fast - code shown below:


   ' Iterate all of the lines related to the visual designer
   dim as long iLineStart = 1
   dim as long iLineEnd

   do until iLineStart > len(sAllText)
     
      iLineEnd = instr(iLineStart, sAllText, vbcrlf)
      if iLineEnd = 0 then iLineEnd = len(sAllText)  ' cr/lf not found
      wst = mid(sAllText, iLineStart, iLineEnd - iLineStart)   
      iLineStart = iLineStart + len(wst) + len(vbcrlf)
...
...     


I have attached a new 32-bit compiled version of the WinFBE32.exe for you to try. It seems to load your project (pretty cool looking calculator by the way) :)

Please let me know if it works for you or continues to crash.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Johan Klassen

#40
Hi Paul
thank you for the new executable, it loads the project quickly but after making some changes to the project WinFBE exited for no apparent reason, but it worked a lot longer before crashing than the previous version.
a simple switch from form-view to code-view will trigger the crash
btw, save project does not seem to save but when compiling it saves the files.

Paul Squires

#41
Hi Johan,

Thanks for continuing to test the designer - greatly appreciated!

I think I have tracked down the source of the GPF. It appears to be when I used the CWSTR class method to convert the string to UTF. I changed it to a dedicated function call and it appears that the new approach worked. Here is the code that was changed.


'   sReplaceText = sStartTag & vbcrlf & _
'                  wszText.Utf8 & _  ' Convert the unicode CWSTR to UTF-8
'                  sEndTag & vbcrlf

   sReplaceText = sStartTag & vbcrlf & _
                  UnicodeToUtf8(wszText) & _  ' Convert the unicode CWSTR to UTF-8
                  sEndTag & vbcrlf


I also added code to the "Save Project" menu option to save all dirty code files. Previously, it simply saved the actual project file (*.wbfe) file itself.

Please let me know if the attached exe works for you.

Thanks,
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Johan Klassen

#42
thanks a million Paul :)
will let you know if there are any problems.

Johan Klassen

Paul, the new WinFBE32 won't generate code from the designer.
if you create a new project and a new designer file, place some controls on the form, there's no code generated.

Paul Squires

Lol, oh my, yeah it sure will be hard to test if no code is generated!  :D

I had commented out a couple of lines as I was testing for that GPF.

The attached 32-bit WinFBE should work. Sorry about that - sometimes I can be real dumb.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer