Discussion: convention in printing to the console

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
ezzieyguywuf
Posts: 656
Joined: Tue May 19, 2015 1:11 am

Re: Discussion: convention in printing to the console

Post by ezzieyguywuf »

vocx wrote: Thu Sep 05, 2019 10:43 pm Except FreeCAD is not purely a GUI application. As it's been stated before, it can be used quite nicely from the command line, even as a library, imported into other programs.
Another good point.

In fact, I suppose the argument can be made that the appropriate logging should be created for any core functionality. i.e. if SomeClass::FuseObjects() must operate on two Part::TopoShape in which Part::TopoShape::shapeType == SOLID, then this should issue a WARNING using the logging facilities.

It would then be encumbant upon the Gui developer to notice when this error occurs, and provide an appropriate visual cue to the user that something wrong has happened.

I guess my point here is that in the Gui itself, we should not expect our users to rely on the text log for basic functionality. At least, that is my opinion.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Discussion: convention in printing to the console

Post by vocx »

ezzieyguywuf wrote: Thu Sep 05, 2019 11:12 pm ...
It would then be encumbant upon the Gui developer to notice when this error occurs, and provide an appropriate visual cue to the user that something wrong has happened.

I guess my point here is that in the Gui itself, we should not expect our users to rely on the text log for basic functionality. At least, that is my opinion.
Yes, agree. As it is now, many users are also developers, so we need to think how to handle when our tools don't exactly work as we expect them too. At which level must we report that something isn't working? Directly in the GUI implementation, or at lower level?
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Discussion: convention in printing to the console

Post by wmayer »

I guess my point here is that in the Gui itself, we should not expect our users to rely on the text log for basic functionality. At least, that is my opinion.
Sure, when something doesn't work as expected then it's best to throw an exception and handle this in the GUI by asking how to continue or show an error/warning/message dialog.

But nevertheless logging this kind of issues is still important because these messages can be written to a log file and uploaded to the forum when a user asks for help.
ezzieyguywuf
Posts: 656
Joined: Tue May 19, 2015 1:11 am

Re: Discussion: convention in printing to the console

Post by ezzieyguywuf »

wmayer wrote: Fri Sep 06, 2019 9:49 am
I guess my point here is that in the Gui itself, we should not expect our users to rely on the text log for basic functionality. At least, that is my opinion.
Sure, when something doesn't work as expected then it's best to throw an exception and handle this in the GUI by asking how to continue or show an error/warning/message dialog.

But nevertheless logging this kind of issues is still important because these messages can be written to a log file and uploaded to the forum when a user asks for help.
👍🏽👍🏽👍🏽
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Discussion: convention in printing to the console

Post by yorik »

Also FreeCAD is a very complex app with almost unlimited possibilities of extension (and wrongdoing :) ). Having a centralized way or screen area where all communication occurs is a good thing IMHO. Otherwise FreeCAD could quickly look like a big christmas tree full of popups, which would also slow your work down a lot...
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Discussion: convention in printing to the console

Post by triplus »

I read this thread more as "i am trying to improve the developer oriented documentation", what should the defaults say.

P.S. As for everything else, like introducing changes, that always takes much time and effort, and yes, it doesn't always get documented. ;)
ezzieyguywuf
Posts: 656
Joined: Tue May 19, 2015 1:11 am

Re: Discussion: convention in printing to the console

Post by ezzieyguywuf »

yorik wrote: Fri Sep 06, 2019 5:24 pm Otherwise FreeCAD could quickly look like a big christmas tree full of popups
I was definitely not advocating for this. I was simply trying to make a point that a GUI interface should provide appropriate (likely graphical) feedback to the user whenever they do something wrong or unexpected.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Discussion: convention in printing to the console

Post by triplus »

If there would be some sort of notification center, people facing, developers likely would use it to output some people facing information. People likely wouldn't complain all that much, if they would have fine tune control over it, therefore classic pop-up likely wouldn't do. But on the cons side, that currently doesn't exist. ;)
Post Reply