Suppressing "search term not found" warning in search( ) ???

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Suppressing "search term not found" warning in search( ) ???

runsun
When using search( ), the console pops out a "Warning: search term not found: ..." when the searched term not found.

Is there any way to suppress this warning ?

Here is the story:

I wanna use search( ) to build up a hash( ) function for parameter settings. Users have the freedom to set some parameters, or not.

When a parameter is not set by users, the hash( ) function has a default mechanism to handle it. This is considered normal (so shouldn't be "warned").

With the warning, however, no matter whether the not-found is dealt with, it always pops up the warning. As a result, it could end up a long list of unnecessary warnings in the console. This is unacceptable in my case.

$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
Reply | Threaded
Open this post in threaded view
|

Re: Suppressing "search term not found" warning in search( ) ???

MichaelAtOz
Administrator
+1
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain;
to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.
Reply | Threaded
Open this post in threaded view
|

Re: Suppressing "search term not found" warning in search( ) ???

clothbot
In reply to this post by runsun
Sounds reasonable.

Simple fix+pull request created: https://github.com/openscad/openscad/pull/1312

Andrew.

On Apr 13, 2015, at 5:39 PM, runsun <[hidden email]> wrote:

When using search( ), the console pops out a "Warning: search term not found:
..." when the searched term not found.

Is there any way to suppress this warning ?

Here is the story:

I wanna use search( ) to build up a hash( ) function for parameter settings.
Users have the freedom to set some parameters, or not.

When a parameter is not set by users, the hash( ) function has a default
mechanism to handle it. This is considered normal (so shouldn't be
"warned").

With the warning, however, no matter whether the not-found is dealt with, it
always pops up the warning. As a result, it could end up a long list of
unnecessary warnings in the console. This is unacceptable in my case.





-----

$  Runsun Pan, PhD

$ -- OpenScad_DocTest: doc and unit test ( Github , Thingiverse  )

$ -- hash parameter model: here , here

$ -- Linux Mint 17.1 Rebecca x64  + OpenSCAD 2015.03.15/2015.04.01.nightly




--
View this message in context: http://forum.openscad.org/Suppressing-search-term-not-found-warning-in-search-tp12359.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Suppressing "search term not found" warning in search( ) ???

runsun
Thanks a million, Andrew. This would be a significant aid to my code. Am I right that it won't be available in the nightly-build until it's merged to the master ?
$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Suppressing "search term not found" warning in search( ) ???

tp3
On 04/14/2015 06:35 AM, runsun wrote:
> Thanks a million, Andrew. This would be a significant aid to my code. Am I
> right that it won't be available in the nightly-build until it's merged to
> the master ?
>
Yes, the nightly-builds are based on master.

But actually those are not really "nightly" builds, they are triggered after
commit / merge on github. So if you subscribe on the pull request, you'll
get a mail about 30 minutes before the builds are ready ;-).

ciao,
   Torsten.



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Suppressing "search term not found" warning in search( ) ???

lar3ry
In reply to this post by runsun
Strange. I get no warning. I am running version 2021.01


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]