25
Views
4
Comments
In learning OutSystem, I don't know what type of Object in OutSystem is, and what its
Question

I am a traditional developer. In Outsystem, it provides a type called Object. I don't understand what it does. Here is my understanding:

1. Similar to the Object of a strongly typed language, you can give it any object, but in my practice of Outsystem, variable a is Object type and variable b is List type, but you cannot assign b to a, there will be type errors

2. Does OutSystem have any type similar to any in TS


2016-04-22 00-29-45
Nuno Reis
 
MVP

Hello.

In a simple way, OutSystems doesn't like Object, but needs it.

With specific types, every assign is validated on the spot. Suggestions are given by name and type. Developers are productive and kept in check.

Object is a 'catch all' solution to handle with external libraries and that flexibility you mentioned. But ideally you rarely use it and will convert it to a specific type asap.

UserImage.jpg
test test

Thank you for your reply, But it is not that there is a value that can be assigned to a variable of type Object. For example, the type of variable A is Date Time, and the type of variable B is Object. When I assign variable A to B, an error will be reported.

2016-04-22 00-29-45
Nuno Reis
 
MVP

You can cast DateTime To Object:

Some automatic convertions are allowed (Number to Decimal, Date To Text...), but Object is kept on the sidelines.

https://success.outsystems.com/documentation/11/reference/outsystems_language/logic/built_in_functions/data_conversion/


2016-04-22 00-29-45
Nuno Reis
 
MVP

You should do the training to learn the basics. Many of those questions are answered there.

There is a course for people with traditional background:
https://learn.outsystems.com/training/journeys/outsystems-for-dotnet-developers-454


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.