Custom constants
Hello!
This is a great idea. I just want to add my two cents:
– I would add a column ‚type‘ (Number, Char, Date etc.) to the definition-list/json, so that the constant gets the right type. This to avoid some type-mismatches when using as a bind variable.
Freundliche Grüsse
Mirko
—————————————————————————————————
Mirko Pepa, dipl. Wirtschaftsinformatiker
Profile GmbH, Schaffhauserstr. 103, 8400 Winterthur
Tel. 052-213 63 33 | www.profile.ch | www.helper.ch
—————————————————————————————————
> Am 07.06.17 um 10:40 schrieb Michael Monschau <michael@brainydata.co.uk>:
>
> Hi EurOmnis Guys,
>
> Yes that sounds good. Let’s do it.
>
> Regards,
> Michael
>
> Michael Monschau (Director)
> Brainy Data Limited
>
> Reply To: michael@brainydata.co.uk
> Phone: +44 (0)870 474 0708
> Web: www.brainydata.co.uk the home of Omnis Components and Developer Services
>
>
>
>
>
>
>> On 7 Jun 2017, at 09:33, EurOmnis 2017 <info@omnisworld.org> wrote:
>>
>> Hello All,
>>
>> This is a great idea, so would you like a slot arranged to organise, and another at the end to show what was done? I think people would it very interesting to see what is needed.
>>
>> Thank you
>>
>> Mike, JM, Gav & Rob
>>
>> Organisers of EurOmnis Conferences
>> phone: +44(0)7973 306790 | web: omnisworld.org <www.omnisworld.org/> | email: mike@omnisworld.org <mailto:mike@omnisworld.org>
>>
>>
>>
>>> On 7 Jun 2017, at 09:24, Michael Monschau <michael@brainydata.co.uk> wrote:
>>>
>>> Hi Phil,
>>>
>>> It can but I was reluctant to go there without taking a look first as I could not remember of my head the real structure of the list of constants returned to Omnis.
>>>
>>> Using the standard way the external code prepares a c++ table which is passed to ECOreturnConstants, a function that is implemented in the object-library provided by the SDK which your component links with (so you cannot see that code). This function turns the c++ table into an Omnis list which is returned to the Omnis core.
>>>
>>> I just had a quick look (my PDFDevice and the HTML example manipulates the list of constants to add a custom runtime generated constant) and the Omnis list is a simple two column list with an ID and the constant text data which includes constant names, descriptions etc. This list structure is likely never to change.
>>>
>>> So YES we could do that as a mini-project at EurOmnis. The component can read a text file and build that list manually.
>>>
>>> Regards,
>>> Michael
>>>
>>> Michael Monschau (Director)
>>> Brainy Data Limited
>>>
>>> Reply To: michael@brainydata.co.uk
>>> Phone: +44 (0)870 474 0708
>>> Web: www.brainydata.co.uk the home of Omnis Components and Developer Services
>>>
>>>
>>>
>>>
>>>
>>>
>>>> On 7 Jun 2017, at 08:43, Phil (OmnisList) <phil@pgpotter.co.uk> wrote:
>>>>
>>>> Hi Michael,
>>>>
>>>> I was thinking that, but considered that maybe for some that is not so easy.
>>>>
>>>> Did make me wonder if the xcomp could use a text file directly, instead of resources, to return the constants list?
>>>>
>>>> regards
>>>> Phil Potter
>>>> Based in Chester in the UK.
>>>>
>>>> On 07/06/2017 08:08, Michael Monschau wrote:
>>>>> Oh, forgot to mention, when adding new constants the external component would require rebuilding. So Developers would have to have access to XCode or Visual Studio Express. But it is very easy once everything is in place
>>>>>
>>>>>
>>>>>> On 6 Jun 2017, at 20:54, Alex Clay <aclay@mac.com> wrote:
>>>>>>
>>>>>> Hi Henk,
>>>>>>
>>>>>> Much like you we use either class variables or task variables depending on scope. I’ve often wished for a common registry of these constants in the name of clean code, but so far this approach has worked.
>>>>>>
>>>>>> Alex
>>>>>>
>>>>>>> On Jun 6, 2017, at 05:08, H.P. Noppe <henk@omnihis.nl> wrote:
>>>>>>>
>>>>>>> Dear Omnis people,
>>>>>>>
>>>>>>> Like the subject states I would like to talk about custom constants. There are different ways to implement this in Omnis. The way I do it is actually in two ways.
>>>>>>> Use the combination of a file class for declaring the constant and a object class for initialising.
>>>>>>> Declare a constant as a class variable and set the init.value of the constant.
>>>>>>>
>>>>>>> Depending on how global a constant is needed I use either of the two.
>>>>>>>
>>>>>>> I am curious how you all lovely developers create constants in a way which keep them maintainable.
>>>>>>>
>>>>>>> Grtz Henk
>>>>>>> _____________________________________________________________
>>>>>>> Manage your list subscriptions at lists.omnis-dev.com
>>>>>>
>>>>>> _____________________________________________________________
>>>>>> Manage your list subscriptions at lists.omnis-dev.com
>>>>>
>>>>> _____________________________________________________________
>>>>> Manage your list subscriptions at lists.omnis-dev.com
>>>>>
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at lists.omnis-dev.com
>>>
>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com