Book a Demo

Author Topic: How to set the string datatype for VB.net?  (Read 6159 times)

Gabor

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
How to set the string datatype for VB.net?
« on: October 24, 2004, 01:35:08 pm »
Hí,

I set the Configuration/Language Datatypes to VBnet, and set it as default.
Despite this, I can't set the attribute datatype to string.

Where is my mistake?

dlundy

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #1 on: October 24, 2004, 02:38:07 pm »
The string type must be referenced as String (capital S) for it to be referenced in the language datatype profile.

C# profile lacks the string datatype definition completely and must be added through the Configuration|Language Datatypes dialog.

If this does not work, check that dialog to ensure that String is properly defined in the VBnet profile.
Dan Lundy

Gabor

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #2 on: October 24, 2004, 02:44:59 pm »
The problem is, that in the VB.net profile the string datatype is defined, but despite of setting it as default, when I want to set the class attribute datatype to string, the string datatype isn't in the list.  :-X

dlundy

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #3 on: October 24, 2004, 02:56:53 pm »
I checked that out and you are right, it doesn't show it.

One simple path is to type in the name: String and then save the Attribute. Not what you want, but it yields the same result.

Another bit of a hack: Create your own String class in a package. Then when you Select Attribute type, select the namespace that is the name of your package. The list will then display your newly defined String class as an attribute type.

I don't know why String in VBNet does not show up - I always considered a simple oversight in the C# profile - never checked VBNet.

Unless someone has an explanation of this behavior, I would report it as a bug to Sparx.
Dan Lundy

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #4 on: October 24, 2004, 07:47:40 pm »
Hi guys,

I just did a quick test myself (using build 739) and I can select String as a datatype (it's in the list last entry before the classes are listed)

I can also set it as the "Default Attribute Type" and it works properly.

Simon

Gabor

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #5 on: October 24, 2004, 10:03:41 pm »
I tried once again, and unfortunately didn't find the solution.

What I want:
-----------------
Adding an attribute wich has a string datatype.

What I do:
---------------

1. Choose the Configuration/Language Datatypes dialog option
2. Set the VB.net in the "Product Name" combobox
3. Check the "Set as default" check box
4. Choose a class
5. In the Details tab push the "Attributes..." button
6. Add a name
7. Want to choose a String datatype, but it isn't in the list. It doesn't show up neither before my classes names, nor after them.

What is my mistake?

I'm using the 739 build.

Thanx

Gabor

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #6 on: October 24, 2004, 11:30:14 pm »
Try following these steps, they work for me in 739.

1. Create a new project from the file EABase.eap that is in your install directory of EA.  (Alternatively load your model file.)
2. Open up the programming languages datatypes dialog. (Configuration | Language Datatypes ...)
3. Select VBNet from the list of languages.
(Ignore the set as default checkbox here.)
4. Verify that String appears in the list of datatypes.
(If it isn't then add it by typing "String" into both fields on the left and clicking save.)
5. Go to the VB.Net specifications page.  (Tools | Options | Generation | VB.Net Specifications)
6. Set the default attribute type to String.
7. Create a new class.
8. Set the language of the class to VBNet.
9. Open the attributes dialog.
10. The value in the type dropdown box should be String.
11. Click the down arrow for the box.  String should appear in the list.

Can you do this with a new model?
Can you do it with your existing model and classes?

Simon

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #7 on: October 24, 2004, 11:30:58 pm »
Hi Gabor,

just checking, is the language on your class set to VB.net? I know that you have set VN.net as your default language, but maybe you have created the class before that?

Bruno

Gabor

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: How to set the string datatype for VB.net?
« Reply #8 on: October 25, 2004, 12:19:03 am »
Thanks for all,

I forgot to set the class's language to VB.net

:)

Gabor