|
From: | Rik |
Subject: | Re: option for enabling/disabling auto-suggest feature |
Date: | Wed, 20 Jun 2018 10:39:41 -0700 |
On 06/19/2018 02:21 PM, Sudeepam Pandey
wrote:
This was just a rough example of how to create the function. In your case, change the function prototype to accept the name of the calling function and the unknown property. For example, void err_unknown_property (const std::string& func, const std::string& prop) { maybe_missing_property_hook (prop); error_with_id ("Octave:unknown-graphics-property", "%s: unknown graphics property '%s'", func.c_str (), prop.c_str ())); }
Since your project is really about the suggestion engine, I say that it is okay in this instance not to fully understand this bit of C++ code and instead just use it.
Take the code snippets I extracted and do a search and replace "s/missing_function_hook/missing_property_hook/g". You may have to add a header file or two if graphics.cc does not compile, but that should be it. --Rik
|
[Prev in Thread] | Current Thread | [Next in Thread] |