Jump to content

Odd behavior of asset manager


Michal

Recommended Posts

Hi

I have a problem with asset manager and TfgButton. Application with one button generates an error 

'The assets manager is being destroyed. However, not all assets links have released. count=2'

I've spent 2 hours debugging . I thought it is something I'm doing wrong (I do some stuff with assets) but it happens with simple app with one button. I am attaching a sample. Some advice please ?

Regards

Michał

Project2.zip

Link to comment
Share on other sites

  • Administrators
1 минуту назад, Michal сказал:

I guess it produces error on terminating app which leads Android to "force stop"  my app

Yes, it's true. TfgButton doesn't clear all links in destructor. So TfgAssetsManager checks it on termination and tell about it.

1 минуту назад, Michal сказал:

Anyway - your framework is fantastic . I really admire your work

Thank you very much. Good to know, that you like our project. 

Link to comment
Share on other sites

  • Administrators

Cool. If you finish porting project on FGX Native, it will be cool to share your results with other by making short publication here : https://forum.fgx-native.com/forum/63-проекты-пользователей/
If it's not a private project of course . Just short description, what this project for and several screenshots are enough.

And good to know, that it helps to make your applications better!

Thank you

Link to comment
Share on other sites

I will definately do that. By the way . Have you ever considered to make assets and styles name no case sensitive? I know I should be accurate but with accidental mistypes it can lead to some painfull debuging. Especially with TfgCollectionView when incorrect style leads to series of AV. And two another question :

do you have any plans for animations?  I have some animations achieved by loading xml file 

  A:=TJAnimationUtils.loadAnimation(TfgAndroidHelper.Context,TfgAndroidHelper.GetResourceID('shake','anim'));

but I have no idea how could I create such a xml data in runtime. I don't want to deploy xml with app
 

do you plan to add text color property to pickers and calendar?

Edited by Michal
Link to comment
Share on other sites

  • Administrators

Hello Michal,

3 часа назад, Michal сказал:

Have you ever considered to make assets and styles name no case sensitive?

Yes. When I first started developing assets, I thought about this. However, removing case sensitive complicates index for quick searching assets in runtime. At this moment TfgAssetsManager provide searching any assets for O(1) time, because index is based on regular hash dictionary. Case sensitive requires a normalization asset name and as results it complicates storing this names in config. So from this point I decided to use case senstive names. Of course, I can make case-insensitive names in the future, but so far this was not necessary.

3 часа назад, Michal сказал:

I know I should be accurate but with accidental mistypes it can lead to some painfull debuging. Especially with TfgCollectionView when incorrect style leads to series of AV. And two another question :

For TfgCollectionView, I'm sure we should make style name case-insensitive. I will make it in the next release.

3 часа назад, Michal сказал:

do you have any plans for animations?

Yes, alot of plans in this area. I would like to provide several animation levels:

  1. Typical animator component, like FMX does.
  2. Helpers for quick predefined animation patterns like in a web.
  3. Usage complicated animation (Lottie). It's already done in my experiments and it works pretty cool. https://lottiefiles.com/ It's intermediate result:
     

However, this is scheduled for a time after iOS release.

3 часа назад, Michal сказал:

I have some animations achieved by loading xml file 

  A:=TJAnimationUtils.loadAnimation(TfgAndroidHelper.Context,TfgAndroidHelper.GetResourceID('shake','anim'));

but I have no idea how could I create such a xml data in runtime. I don't want to deploy xml with app. I tried to save local file and create new file asset but no luck

This AnimationUtils uses the same idead like a TfgAnimationHelper. Just a add-on over the standart Android Animation. So you should consider to use raw animation object instead of this class: JAnimation, JAnimator and etc.

3 часа назад, Michal сказал:

do you plan to add text color property to pickers and calendar?

What pickers do you mean? There are several entiriy: FGX.Pickers.* or FGX.DatePicker, FGX.TimePicker?

For TfgCalendar, yes and no. From one point of view, I would like to provide more settings for TfgCalendar. But from other side, there are a lot of elements and properties, which should be modifiable, because calendar includes a lot of different elements. So I want to do it via future style concept. At this moment, you can do it via style.xml file, just set required colors and settings for CalendarView Android theme.

Thank you

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...