Soham_Shah
(Soham Shah )
September 29, 2020, 5:40am
#1
This is my code
Calendar instant = (Calendar) GetProperty(date,“Instant”);
String instants = String.valueOf(Dates.Year(instant));
SetProperty(title,“Text”,String.join(Dates.MonthName(instant) , " " , (instants)));
It gets compiled but it shows me error when i use the extension
This is what i want extension should set text to
AryanGupta
(Aryan Gupta)
September 29, 2020, 7:03am
#2
for quick response, please ask this question on app inventor.
There’s no problem asking here.
The error shows that appybuider editor wasn’t able to get the class.
Prefer not using appybuider.
3 Likes
Soham_Shah
(Soham Shah )
September 29, 2020, 8:04am
#4
i managed to clear the error and the extension gets compiled, but it shows error when i use the extension
I have updated the first post
This is a completely different error, next time please make a new topic.
The error shows that you have some error in data type. You are trying to convert String into java.util.calendar type.
1 Like
Soham_Shah
(Soham Shah )
September 29, 2020, 8:14am
#6
but this topic is about achieving the blocks i want in an extension and so errors will change if i face more
so what should i change… please guide me
What is GetProperty and SetProperty?
Soham_Shah
(Soham Shah )
September 29, 2020, 10:54am
#8
it is the same code for get property and set property from @yusufcihan extension
I don’t understand the purpose of this code. Why do you get and set property?
I am not able to help with such less information.
1 Like
yusufcihan
(Yusuf Cihan)
September 29, 2020, 2:44pm
#10
You don’t need my extension’s source code for setting a property. And Dynamic Components extension has built for using it in the App Inventor project, not in the Java code. You can already create dynamic components and set properties in the Java without needing external code.
And App Inventor classes already have methods for setting a property.
You can use it in your code like:
Component.Width(100);
4 Likes