PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: message in command window  (Read 1673 times)

raymw

  • Senior Member
  • ***
  • Posts: 363
message in command window
« on: August 07, 2019, 09:31:02 AM »

Hi, It's been a while since i was on here, and recently - today - I have started to write a simple program to interface to arduinos. It surprised, even me, how much I'd forgotten about fb. Anyway, I find that when the command window opens, I get a dozen or so lines showing 'dwExStyle: 512'. I can't remember that happening previously. I'm using winFBE 1.9.1 (32 bit). When I arranged the text boxes, etc. in the graphics designer, some of the boxes seemed to disappear off the edge of the window (jerky mouse movements) and I'm not sure if I've found them all.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8937
  • Windows 10
    • PlanetSquires Software
Re: message in command window
« Reply #1 on: August 07, 2019, 10:08:30 AM »

Hi Ray, turn off the "Snap lines" feature (found under the Designer menu). That will fix the jerky mouse movement thing. It is, let's say "a work in progress". :)

You can also try downloading the 1.9.2 beta that is on GitHub
https://github.com/PaulSquires/WinFBE/releases

That beta made a LOT of changes to the visual designer so you probably won't have as many issues. I strongly encourage you to try that version. Here is the direct link to the download: https://github.com/PaulSquires/WinFBE/releases/download/1.9.2-beta1/WinFBE_Suite.rar

That dwExStyle message may be a leftover debug output message that I was using for some code. I think that was removed.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #2 on: August 07, 2019, 05:13:33 PM »

Thanks Paul, seems to be OK now. Not sure if in your plans, but I think it would be useful if a text box and a label could be combined in the same object - it would allow quick form layout, and save on my coding.
Logged

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #3 on: August 08, 2019, 04:17:42 PM »

I seem to have no problem with gui, and your debug hangovers have gone, but still jerky movement unless as you mentioned I switch off the auto align. If the buttons/textboxes, whatever whiz off to the right or bottom of the form, then a resize of the form brings them back into view, and they can be deleted or moved. What happens when the go off the form to the top or left? I can't stretch the form edges in that direction, are they actually deleted, or still in the system with negative axes?

Anyway, I could do with some code snippets. I have a button to start the reading via serial port of the various sensors connected wirelessly to the master arduino. It is a function, started off by a button click when various settings have been configured consisting of the opening of the port, and then a 'loop' which reads the serial stream. I can't remember how to interrupt that loop by the press of another button on the gui. The only way I can stop the loop is by closing down the command window, (I have debug values printing to the command window) the form does not respond and greys out after two button presses.

Thanks, Best wishes,
Ray
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8937
  • Windows 10
    • PlanetSquires Software
Re: message in command window
« Reply #4 on: August 08, 2019, 05:28:50 PM »

Maybe have a "Stop" button and when clicked sets a global boolean gStopReading to True.

Add a call to AfxDoEvents within your loop and then check the value of the global gStopReading variable right after the AfxDoEvents. Exit the loop if True.

Maybe that works?
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #5 on: August 08, 2019, 06:32:07 PM »

Thanks Paul, seems to do the job.
Logged

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #6 on: August 09, 2019, 12:09:02 PM »

Hi Paul,
I'm printing my debug to console. If I compile program, I get no error messages or warnings, except if I compile win32 GUI (Release). I think it is caused by something not matching in the compile options on the edit screen and the build configurations under the Options tab. I thought they would be linked together. The error is in a function I have for handling strings, maybe the different compiles do not include 'string.bi' i.e the release ignores #include "string.bi"

Best wishes,

Ray
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8937
  • Windows 10
    • PlanetSquires Software
Re: message in command window
« Reply #7 on: August 09, 2019, 02:41:41 PM »

Hi Ray - I don`t understand your question.

You`re developing and writing output to the console (using PRINT statements I assume) using Win32 Console (Release)?

When you switch to Win32 GUI (Release) you are getting errors during the compile process?

WinFBE does not automatically add or remove the #include "string.bi" file. I assume you're including that file in order to have access to the FORMAT function.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #8 on: August 09, 2019, 03:44:31 PM »

ok, in editor on the 'line to the right of where you can hit the arrow keys for compile, etc'. there is a drop down list for compile options. Select any of that list - then open on the top line Options- build configuration and you see the same compile option is selected. but, if you change the compile option there,in the build configuration page  it does not show the change in the editor page - the box by the compile buttons.
I could not compile as gui, no console, but could with other compile options. Also, the program I'm writing does not close properly from the gui window 'X' . i. e. it disappears, but can't then recompile - says it is still running. I don't recollect having to do anything else to shut down my written programs.
Best wishes,
Ray
ps a few keywords are  not highlighted in winfbe, 'frac', for example, but 'fix' is.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8937
  • Windows 10
    • PlanetSquires Software
Re: message in command window
« Reply #9 on: August 10, 2019, 06:31:20 AM »

ok, in editor on the 'line to the right of where you can hit the arrow keys for compile, etc'. there is a drop down list for compile options. Select any of that list - then open on the top line Options- build configuration and you see the same compile option is selected. but, if you change the compile option there,in the build configuration page  it does not show the change in the editor page - the box by the compile buttons.
Thanks - I have fixed that. I made a silly error there.

Quote
Also, the program I'm writing does not close properly from the gui window 'X' . i. e. it disappears, but can't then recompile - says it is still running. I don't recollect having to do anything else to shut down my written programs.
Sounds like there is a running loop or thread within your program that hasn't terminated leaving the program in memory. If you still have the problem then I can take a look at your program for you if you wish.

Quote
ps a few keywords are  not highlighted in winfbe, 'frac', for example, but 'fix' is.
Thanks - I have added FRAC to the syntax highlighting.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8937
  • Windows 10
    • PlanetSquires Software
Re: message in command window
« Reply #10 on: August 12, 2019, 05:57:03 PM »

Hi Ray, turn off the "Snap lines" feature (found under the Designer menu). That will fix the jerky mouse movement thing. It is, let's say "a work in progress". :)

Looks like I found the source of that snap lines jerky mouse movement. I was not resetting the snap lines properties once the mouse button was released. This caused problems when subsequent moves of the control took place.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #11 on: August 14, 2019, 09:55:38 AM »

Great, I knew you would fix it, thanks.
Logged

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #12 on: August 15, 2019, 12:14:38 PM »

still problem with compile
Code: [Select]
target:       win32, 486, 32bit
compiling:    C:\Users\Ray\Desktop\rayprojects\ray_sensors\anilserr.bas -o C:\Users\Ray\Desktop\rayprojects\ray_sensors\anilserr.asm (main module)
C:\Users\Ray\Desktop\rayprojects\ray_sensors\anilserr.bas(269) error 99: No matching overloaded function, ACCEPTSRETURN()

error 99, (line -19) I had it compiling and running OK. I loaded in another previously running basic file, to remind me of some code I'd written in there. When I saw what I wanted to see, I deleted the added program, and then when I went to run the original, it gave the error message. Both programs have the gui forms. Not sure if you can replicate this.
Logged

raymw

  • Senior Member
  • ***
  • Posts: 363
Re: message in command window
« Reply #13 on: August 15, 2019, 12:43:53 PM »

There was not a very complicated form, so I copied the basic file and loaded into wfbe editor. All of your form design was commented out, as usual, but the error is here,
Code: [Select]

function readerType.FormInitializeComponent( byval pForm as readerType ptr ) as LRESULT
   dim as long nClientOffset

   pForm->Text = "Reader"
   pForm->SetBounds(10,10,500,300)
   pForm->Button1.Parent = pForm
   pForm->Button1.Text = "Read File"
   pForm->Button1.SetBounds(295,62-nClientOffset,114,32)
   pForm->Button1.OnClick = @reader_Button1_Click
   pForm->Text1.Parent = pForm
  ' pForm->Text1.AcceptsReturn =
   pForm->Text1.Text = "temperature1a.txt"
   pForm->Text1.SetBounds(60,62-nClientOffset,187,35)
   pForm->Label1.Parent = pForm
   pForm->Label1.Text = "File Name"
   pForm->Label1.SetBounds(61,26-nClientOffset,155,24)
   pForm->Controls.Add(ControlType.Button, @(pForm->Button1))
   pForm->Controls.Add(ControlType.TextBox, @(pForm->Text1))
   pForm->Controls.Add(ControlType.Label, @(pForm->Label1))
   Application.Forms.Add(ControlType.Form, pForm)
   function = 0
end function
I commented out the line in error, as you can see, and it is now back running. Maybe there is a clue in here somewhere, as to why is is so easy for me to break this.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8937
  • Windows 10
    • PlanetSquires Software
Re: message in command window
« Reply #14 on: August 15, 2019, 01:23:25 PM »

A few days ago I fixed a bug where Form files would not load correctly into an existing project via the "Add files to project" menu option. I expect that this may have something to do with it and why the value for the AcceptsReturn property got blanked.

I am close to having the code generation for the StatusBar and ToolBar finished. When that is complete then I will upload a new WinFBE package for everyone to test.

Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer
Pages: [1] 2 3