Valentina for Xojo/REALbasic FAQ
Thank you for your interest in Valentina. Here you will find links to general topics related to all Valentina for V4RB products as well as specific frequently asked questions and answers about Xojo support.
Installation Questions
Error Handling Questions
Q: Is VException class related to Xojo' class Exception?
You can write the following code, which allows you to handle Valentina exceptions separately from any other exceptions:
SomeFunction()
...
Exception err as VException
MsgBox "Valentina throw exception: " + Str(err.ErrorNumber) + ":" + err.Message
Exception err
MsgBox "Error!"
end
Class VException is a child of Exception class of Xojo. This means that you can also write code as in the next example and still catch Valentina exceptions.
SomeFunction()
...
Exception err
MsgBox "Error!"
end
Q: Valentina Engine/Valentina Reports throws an exception with an error for the query which is 100% valid and can be successfully executed from the Valentina Studio?
Recently we discovered that the Xojo project may contain Byte Order Mark in the source code.
When BOM is inside the query text, database engines (SQLite, Valentina DB) are unable to execute this query, showing errors, not so easy to understand (BOM is invisible in error messages and logs, we can see it only in HEX form).
According to the user report, this problem appeared after the copy/paste operation.
Different APIs are affected - V4RB, REST.
Here's how a BOM can be found:
It is not easy to fix it on the database engine side, as it will require to search for BOMs in all strings, so it would be better if Xojo could erase them once after opening.
Currently, there are a few ways to fix this project:
1: Highlight the text (possibly the entire method)
2: Open the code editor context-menu (normally a right-click with the mouse)
3: Select "Clean invisible ascii characters"
That way, invisible characters are replaced with another character, by default it is '•' (not removed).
And then we have to use find/replace to remove them all.
inQuery.ReplaceAll( Text.FromUnicodeCodepoint(&hFEFF ), "" )
General Questions
Q: How to Hide Serial Numbers?
Ed Kleban suggests:
I'd like to recommend a great little tool I discovered
that you can use to easily hide your Valentina (or any other) serial number
so others can't easily obtain it by scanning your compiled source
code:
http://www.truenorthsoftware.com/Realbasic/Obfuscate.html
Obfuscate (version 1.1)
Obfuscate is a program to render obscure a string of text within Xojo
compiled code. Anyone scanning your code with a hex editor will not be able
to pick out what you are trying to hide in the code without a lot of work.
Use Obfuscate for serial numbers and other key information.
System Requirements:
Mac OS X 10.2 or later
Windows 2000/XP or later
Price: Obfuscate is free. Enjoy!
Q: Why do the two version with array of bound values, ''bind() as string'' and ''bind() as variant'', exist?
1) - It`s historically. There was a time when REALbasic did not have Variant. 2) When Variant was added, we have seen it is very slow. x100 times slower than working with strings. So we have left so far both versions.
Field Questions
RBDB API Questions
Deployment Questions