Hi Dennis

Apart from the settings for the toolbar item I also mentioned that in the
database modeller the field_label_long and field_default don't handle
literal string and non literal string values the same way, see main post.

Also your ftp is down at the moment.

Cheers
Tom


"Dennis Piccioni" <dennis@dataaccess.com> wrote in message
news:5tr1n45sccf33ti3c2f08vhucpp33kj4cr@4ax.com...
> Hi Tom,
>
> yes, this is by design. Here's the story:
>
> Prior to VDF12.1 (or whatever the version was that introduced command
> bars) the property panel always showed constants as their actual
> constant value. So if you had a constant C_$PROMPT it would appear in
> the panel as C_$PROMPT. In addition this constant would be read only.
> When we introduced the command bars, we also introduced a bunch on
> menu-item sub-classes and these sub-classes all contained captions
> that we defined via constants. We did this for multi-language support.
> This created problems when these classes were used in the Studio.
> First of all the modeler and the property panel did not show the real
> value of the menu item and that looked lousy. Secondly you could not
> change the value in the property panel or in the modeler because the
> constant was read-only. This was a really serious problem, because
> this was something people would do all the time.
>
> So we changed the rules a bit. First we made the Studio smart enough
> so that it could convert string constants to their real value. Next,
> we allowed these to be edited. Of course editing them meant that they
> got turned into a literal, which in most cases is exactly what
> developers wanted (notice we've had no complaints about this). So what
> Clive and Tom are seeing is this behavior.
>
> There are three ways for them to deal with this.
> 1. If you just don't change the value in the property panel, the
> constant remains in the code and all is well. It has the advantage
> that you can see the modeled value.
> 2. Define the property as an expression (e.g. Set sCaption to
> (C_$PROMPT) ). This now is treated as a read-only constant.
> 3. Define the constant as an expression (e.g.Define C_$PROMPT for
> ("Prompt") ). This now is treated as a read-only constant.
>
> Since 2 and 3 are treated as a read-only constant you also lose the
> modeling advantage.
>
> The current solution is not perfect, but once understood, it is very
> straight forward. When used with a modeled view such as the property
> panel it has no special commands, options or configurations. We are
> open to improve this.
>
>
>
> On Fri, 16 Jan 2009 21:17:32 +0900, "Thomas Murphy" <tom at triumph
> dot com dot au> wrote:
>
>>Hi DAW
>>
>>We have found a problem in the full 14.1 where string type properties are
>>not consistent in the property sheets when handling non literal strings,
>>i.e. constants, global variables, file.field references etc..
>>
>>At the end of the 14.1 test cycle Clive Richmond of Triumph reported a
>>problem where changing the Field_Mask, Field_Label_Long etc.. in the data
>>dictionary modeller which were constants were changed to literal strings.
>>
>>i.e.
>>
>>Set Field_Mask Field TABLE.Column To TA_MONEY_MASK
>>
>>became
>>
>>Set Field_Mask Field TABLE.Column To "TA_MONEY_MASK2"
>>
>>When changing the value in data dictionary modeller, it should have been
>>TA_MONEY_MASK2 without quotes.
>>
>>The fix in the full release of 14.1 was to disable entry to the option in
>>the data dictionary modeller when the value is not a literal string. This
>>is fine but the same rule has not been applied to the default value.
>>
>>i.e.
>>
>>Set Field_Changed_Value Field TABLE.Column To YES
>>
>>became
>>
>>Set Field_Changed_Value Field TABLE.Column To "NO"
>>
>>When changing the value in data dictionary modeller, it should have been
>>NO
>>without quotes. Entry to the field default should be disabled when not a
>>literal string.
>>
>>Please note we have the following constants setup ...
>>Define NO as "N"
>>Define YES as "Y"
>>
>>
>>I have also seen a similar problem with psCaption of a toolbar item. See
>>the
>>first reply for example workspace.
>>
>>Open the only project, main.src. There is only one toolbar item and it is
>>a
>>subclass. Look at the sublcass, cMyMenuItem (which is defined in the
>>source
>>file), you'll notice that I am setting the caption and description in the
>>class to two variables which are above. However when you look at the
>>properties of the toolbar item object in the property sheet the caption
>>and
>>description are set to the values of the constants and are enabled. I
>>think
>>they should show the actual constants, C_MY_MENU_ITEM, and be disabled as
>>they are not literal strings.
>>
>>Cheers
>>Tom
>>
>>
>>

>
> Regards,
> Dennis