IceDesign GUI designer

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
ShadowStorm
Enthusiast
Enthusiast
Posts: 303
Joined: Tue Feb 14, 2017 12:07 pm

Re: IceDesign (New) modern GUI designer

Post by ShadowStorm »

Hello

It's a very good work, nice update, I'm happy :)
The additions you made in the last update are very useful, thank you!

Good luck, you deserve it!

on the other hand sometimes the program crashes and closes for no reason, you should add a bug tracking system in your software because there we can't help you!

I think it's when I manipulate containers, like I want to add one and it crashes.
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

Hi and thank you for these kind words :)
ShadowStorm wrote: Fri Dec 10, 2021 2:29 am on the other hand sometimes the program crashes and closes for no reason, you should add a bug tracking system in your software because there we can't help you!
Damn, it's not good, I would have to manage to reproduce it to be able to fix it, has anyone else had crashes as well ?
it would be nice if you could remember the last manipulations done before it crashed.

I've never done a bug tracking system included in a program and no idea how it could be done.
Can someone give me an example, a link, as a starting point ?
Amitris_de
User
User
Posts: 31
Joined: Wed Jan 06, 2021 2:53 pm

Re: IceDesign (New) modern GUI designer

Post by Amitris_de »

Hi,
I created an example for the error handler . please enable the "Enable OnError lines support" option in the compiler settings. you can develop it using OnError library.

Code: Select all

  Enumeration ErrorHandler
    #ErrorHandler_Window
    #ErrorHandler_Text
    #ErrorHandler_String
    #ErrorHandler_ExitBtn
    #ErrorHandler_clipboardBtn
  EndEnumeration 
  
Procedure ErrorHandler() 
  
  DisableDebugger
  Protected ErrorMessage$,Event_ID
  
  Select OSVersion()
    Case #PB_OS_Windows_8_1
      ErrorMessage$ + "Windows: 8.1" +#CRLF$
    Case #PB_OS_Windows_8
      ErrorMessage$ + "Windows: 8" +#CRLF$
    Case #PB_OS_Windows_XP
      ErrorMessage$ + "Windows: XP" +#CRLF$
    Case #PB_OS_Windows_Vista
      ErrorMessage$ + "Windows: Vista" +#CRLF$
    Case #PB_OS_Windows_7
      ErrorMessage$ + "Windows: 7" +#CRLF$
    Case #PB_OS_Windows_2000   
      ErrorMessage$ + "Windows: 2000" +#CRLF$
    Case #PB_OS_Windows_95
      ErrorMessage$ + "Windows: 95" +#CRLF$
    Case #PB_OS_Windows_98   
      ErrorMessage$ + "Windows: 98" +#CRLF$
    Case #PB_OS_Windows_Future   
      ErrorMessage$ + "Windows: Future" +#CRLF$
    Case #PB_OS_Windows_ME   
      ErrorMessage$ + "Windows: ME" +#CRLF$
    Case #PB_OS_Windows_NT3_51   
      ErrorMessage$ + "Windows: NT3_51" +#CRLF$
    Case #PB_OS_Windows_NT_4   
      ErrorMessage$ + "Windows: NT_4" +#CRLF$
    Case #PB_OS_Windows_Server_2003   
      ErrorMessage$ + "Windows: Server_2003" +#CRLF$
    Case #PB_OS_Windows_Server_2008   
      ErrorMessage$ + "Windows: Server_2008" +#CRLF$
    Case #PB_OS_Windows_10 
      ErrorMessage$ + "Windows: 10" +#CRLF$
  EndSelect    
  
  ErrorMessage$ + "Error Message:   " + ErrorMessage()  +#CRLF$
  If ErrorCode() = #PB_OnError_InvalidMemory   
    ErrorMessage$ + "Target Address:  " + Str(ErrorTargetAddress()) +#CRLF$
  EndIf
  
  ErrorMessage$ + "Sourcecode line: " + Str(ErrorLine()) +#CRLF$
  ErrorMessage$ + "Sourcecode file: " + GetFilePart(ErrorFile()) 
  
  If OpenWindow(#ErrorHandler_Window,0,0,500,220,"An Error Occured!",#PB_Window_ScreenCentered)
    
    TextGadget(#ErrorHandler_Text,10,10,400,30,"Please send this information to manufacturer.")
    StringGadget(#ErrorHandler_String,10,30,480,140,ErrorMessage$,#ES_MULTILINE|#WS_VSCROLL)
    ButtonGadget(#ErrorHandler_ExitBtn,390,180,100,30,"Exit")
    ButtonGadget(#ErrorHandler_clipboardBtn,10,180,100,30,"Copy to clipboard")
    
    Repeat 
      
      Event_ID = WaitWindowEvent()
      
      If Event_ID = #PB_Event_Gadget
        
        Select  EventGadget() 
            
          Case  #ErrorHandler_ExitBtn
            End
          Case  #ErrorHandler_clipboardBtn  
            
            SetClipboardText(ErrorMessage$)
            End
        EndSelect
        
      EndIf 
      
      
    Until  Event_ID = #PB_Event_CloseWindow
    
  EndIf  
  
  End
  
EndProcedure
OnErrorCall(@ErrorHandler()) 


Define m=2 : m/0

User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

Hi Amitris,
Thank you very much for this starting point, already quite complete.
In case of a bug, a crash, the best way is probably to remember the manipulations made to try to reproduce it.
But it should help, with the error message and where it happened. I will add it.
See you :)
Amitris_de
User
User
Posts: 31
Joined: Wed Jan 06, 2021 2:53 pm

Re: IceDesign (New) modern GUI designer

Post by Amitris_de »

you're welcome. :)
ChrisR wrote: Fri Dec 10, 2021 10:12 am In case of a bug, a crash, the best way is probably to remember the manipulations made to try to reproduce it.
yes, I agree.
Bitblazer
Enthusiast
Enthusiast
Posts: 761
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: IceDesign (New) modern GUI designer

Post by Bitblazer »

ChrisR wrote: Fri Dec 10, 2021 10:12 am In case of a bug, a crash, the best way is probably to remember the manipulations made to try to reproduce it.
There will be cases where this is not realistic. Your users wont be able to tell you that information sometimes.

What has helped me tracking those bugs down in the past, was to add a program flow tracking into my (commercial) software. Add a function like "AddTrackPoint(Procedure, Parameter1, Parameter2, .... Parameter8) and simply store a 16 bit number which indicates the procedure name plus the parameters into an array. Obviously you want that array to be as precise and up to date as possible when your software crashes. I implemented that as a seperate software that survived the main software crash and could spot the crash and save the recorded buffer. A simple software which decodes that buffer and creates a logfile from the entries, will help you a lot in finding bugs!

It does get slightly more complicated with highly threaded software but it does work just the same and is just a minor addition to the whole tool set.
Methods like that have allowed me to track down 99% of all bugs in my commercial stuff and has made a significant positive difference.

ps: The potential downside is that competitors basically get a blueprint of how your software works if they are able to find and use that tracking info.
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

It's very interesting and I don't have any thread, I'm interested if you have a small piece of code, even non-functional, to share with me.

In a first step, I will add OnErrorCall code example, from Amitris.
And then I will have to think about what data will be meaningful enough to try to reproduce.
In my case, here, I guess that in most cases, if there is a crash, it would be caused by a combination of manipulations.

In the future, an export of a list of actions, via an Undo/Redo list could be useful.
But it is not so easy, I have a lot of actions to manage: Open/Close Container, change/delete tab, create/delete Gadget, position and size, properties,...
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

IceDesign has been updated in version 1.5.3

Changes:
  • Keep the same Inner Window size, regardless of the constants used for the window.
  • Save the Window constants in IceDesign.ini on exit, to restore them for the next use.
  • Add OnError support. If needed, it will be completed later with other datas, to try to reproduce the error
    In the OnError procedure, the current form is saved in a file: "%Temp%\FormOnError.icef"
    Please send this file in case of an error with also the information written in the window below.
    The FormOnError.icef file can then be opened in IceDesign, to Restore the current design.
Image
Last edited by ChrisR on Sat Dec 11, 2021 12:59 am, edited 1 time in total.
ShadowStorm
Enthusiast
Enthusiast
Posts: 303
Joined: Tue Feb 14, 2017 12:07 pm

Re: IceDesign (New) modern GUI designer

Post by ShadowStorm »

I test the program by putting containers in containers, with a lot of levels, I notice that the program has trouble and is still struggling.
And I managed to remake the bug ^^

Code: Select all

Windows: 10 x64
IceDesign Version: 1.5.3
Source Code File: PBEdit.pbi
Source Code Line: 9640

Error Message: Invalid memory access
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

Hello Shadow, you were fast to report the 1st bug.
Without passing the ball, well, still a little :? maybe Mr.L can help to understand why.
In original PBEdit_1_0_10.pb, the error is on line 9613: ForEach *te\cursor() in Procedure Event_Timer()

Can you try again by moving the Splitter down to the Bottom of the Window.
In this case, with PBEdit height <= 1, the code is not regenerated at each change and PBEdit_SetGadgetText() is no longer processed.
ShadowStorm
Enthusiast
Enthusiast
Posts: 303
Joined: Tue Feb 14, 2017 12:07 pm

Re: IceDesign (New) modern GUI designer

Post by ShadowStorm »

Why do you use this gadget, except that it is pretty ^^
Think of putting a menu to copy the content of the code.
Think to put an option not to regenerate the code at each change but for example with why not a button "Refresh code".

Well after, do as you feel, I'll test again later.
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

Yes, it is very pretty and I use it only at 10% of its potential with the full read only mode.
It is an excellent Code Editor and it deserves to be in a futur IDE. Do all this in a canvas, Hats off 8)

If you don't want to use, just move the splitter down, it is easier than a checkbox in the settings.
And to view and refresh the code, move the Splitter up.
I think it is a real bonus, here in the designer and in particular to see in real time, the impact of the settings on the code...
ShadowStorm
Enthusiast
Enthusiast
Posts: 303
Joined: Tue Feb 14, 2017 12:07 pm

Re: IceDesign (New) modern GUI designer

Post by ShadowStorm »

Well, when you want to change tabs in a PanelGadget, it takes too much time, even empty, click successively on tab 1 and then 2 and so on, it's much too slow!

Take this example.
https://drive.google.com/file/d/1IFyK_w ... sp=sharing

To start click without stopping on tab 17 and just after 16, do it let's say 3, 4 times, and "Wait a long time ^^"
Besides, the greater the depth (Panel in Panel, etc.) the slower it is!

Then select all that is in TAB16 and copy it.
Paste it into TAB17 and "Wait a long time ^^"

Another note, with nothing, blank project, or not for that matter.
Why when you make a selection with the mouse (selection square), why is there a latency? > It's boring, not good ^^
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

No bugs this time! Good :)
I take a look at your advanced form: "test 1.icef"

I had to cheat to open it, there are more than 9 levels!
You probably used the copy and following my changes to copy the containers with all its child Gadgets, I forgot to add a control on the final level < 9. I will add it.

For the Tab change, there is a small delay indeed, to close the current tab, open the new tab and redraw it, but it remains very acceptable here, even when changing many times.
My PC is probably more powerful, faster to give Windows time to redraw all the levels with the included gadgets.

Then, to copy all gadgets and containers from tab16 to tab17, It is not surprising that it is a bit slow.
I am not in a flat model, with all drawn in a single canvas, where it would be much faster. but more complicated to select a container with the border only, use scrollareas and redraw only the visible part.
Here, in my design, the real containers are used and are active (not just drawn), so the scrollbars, and the tabs are fully operational, the good part.
But, each container, tab has its own drawing area, canvas with unfortunately some processing to switch from one level to another.

And here, in this extended copy, I have to open/close all the containers, open and change tabs to create all the gadgets and this on all levels.
So, I agree, it's a bit slow in this case a bit extreme with so much level.
However, I'll take another tour to see if I can optimize a bit.

What is reassuring, is that nobody will create such interfaces with so much level in real life otherwise the users would be completely lost to use it :wink:
ShadowStorm
Enthusiast
Enthusiast
Posts: 303
Joined: Tue Feb 14, 2017 12:07 pm

Re: IceDesign (New) modern GUI designer

Post by ShadowStorm »

Hi, actually what I made is "small", yes it is small!
I did not test it to the extreme, believe me!

With my code converter of Visual basic 2010 (To create windows), it is not 9 or 10 levels that I made, I cannot say!

But my converter manages all the levels whatever they are.

I send you a video to show you how slow it is, and my pc is powerful, 2.6 ghz in 6 core, but it's sure not 4 or 5 ghz lol.

I'm not sure it's right to limit the levels to 9, you shouldn't.
At worst put a warning message, but don't limit!

https://drive.google.com/file/d/1AdIEJL ... sp=sharing
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Post Reply