B4J Question #RaisesSynchronousEvents

stevel05

Expert
Licensed User
Longtime User
I am still having a problem implementing my CellFactory Helper library, the ones I've released work fine, but I have added drag and drop functionality, which makes the Cell a heavier object and consequently takes longer to build.

This all works fine in Release Mode. But in debug mode it is not generating some of the cells as it redraws the table. The cellFactory subs are not getting called for all of the cells that should be displayed.

I guess it's to do with the same issue (#RaisesSynchronousEvents) but as the sub is being called directly from java.util.Callback (the call sub) I don't know if it is possible to impose this restriction on it. (I did try adding the sub to the LibrariesExceptions.txt file, just in case, and put a new one in the B4j folder just out of hope).

Is this likely to be the issue and is there anything that can be done about it?

Thanks
 

stevel05

Expert
Licensed User
Longtime User
No there are no messages. Attached an example project, requires jCellFactoryHelper Lib included in the zip.
 

Attachments

  • CFErrorExample.zip
    12.2 KB · Views: 285
Last edited:
Upvote 0

stevel05

Expert
Licensed User
Longtime User
OK, Thanks Erel, I'll try it out.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It's marginally better, but not great. It still loses some updates in debug mode. A lighter example is attached if you have time to look at it. (with a new library)
 

Attachments

  • CFErrorExample2.zip
    18.7 KB · Views: 270
Upvote 0

stevel05

Expert
Licensed User
Longtime User
There must be something really heavy in the Drag and drop library, implementing Drag and Drop using JavaObject within the app seems to work fine.

I also included the required VirtualFlow library. Still the CellFactoryHelper process is now more efficient, thanks for the advice.

Now for some more B4i testing:)
 

Attachments

  • CFWorking.zip
    18.4 KB · Views: 261
Last edited:
Upvote 0

stevel05

Expert
Licensed User
Longtime User
And it works properly for the original app which has 24 columns and 256 cellfactory objects so your suggested change makes a difference:)
 

Attachments

  • BC.zip
    7.2 KB · Views: 263
Upvote 0

stevel05

Expert
Licensed User
Longtime User
There must be something really heavy in the Drag and drop library
Maybe not, even adding an empty class upsets the callback. But again, this is only in Debug mode so not an insurmountable problem. For the majority of uses it won't pose any issues.
 
Upvote 0
Top