B4J Tutorial [B4X] Resumable Subs - Sleep / Wait For - Erel    Feb 22, 2018   (49 reactions)   tags: Reference, Comm, download, Resumable Subs, Code, Wait For
b.Text = i
Sleep(100)
Next
b.Text = "Takeoff!"
End Sub
54879
Wait For...)
End Sub
The output is:
S1: A
S2: A
S1: B
S2: B
54883
Whenever Sleep or Wait For are called... B4A Tutorial [B4X] Resumable subs that return values (ResumableSub) - Erel    Aug 25, 2020   (40 reactions)   tags: wait, Comm, Code, B4X, Dialog ResumableSub, Wait For Remember that that a call to Sleep or Wait For in a resumable sub causes the code flow to return to...) End Sub Sub Sum(a As Int, b As Int) As ResumableSub Sleep(100) Log(a + b) Return a + b End... Button1_Click Dim rs As ResumableSub = Sum(1, 2) Wait For(rs) Complete (Result As Int) Log.... In the calling sub, call the resumable sub with Wait For (<sub here>) Complete (Result... wait for the resumable sub to complete then return Null from the resumable sub and set the type in... B4A Tutorial [B4X] OkHttpUtils2 with Wait For - Erel    Apr 11, 2021   (59 reactions)   tags: image, wait, Download, Http MySql, Wait For, ws 256583317 Downloading resources is simpler with the new Resumable Subs feature. Using Wait For we can wait for the JobDone event in the same sub that started the download. No longer is it needed to... will be downloaded concurrently. Tip about the code flow: Sleep and Wait For are equivalent to calling Return from....Initialize("", Me) j.Download("https://www.google.com") Wait For (j) JobDone(j...=rand") Wait For (j) JobDone(j As HttpJob) If j.Success Then 'The result... Share My Creation [B4X] B4X Pleroma - open source client for Mastodon / Pleroma social networks - Erel    Nov 4, 2020   (15 reactions) What is Mastodon? IPSbNdBmWKE Pleroma is a lightweight implementation that extends Mastodon. B4X Pleroma is a client for these social networks. More information here: https://www.b4x.com/android/forum/threads/119426/#content It is based on quite a few B4X components including: BCTextEngine, BitmapCreator, MiniHtmlParser, OkHttpUtils2, OAuth, KeyValueStore, XUI Views, B4XPages, B4XDrawer, B4XGifView, B4XPreferencesDialog, BCToast, xCustomListView, BitmapsAsync, RequestsManager and... B4A Tutorial [B4X] B4XPages - Cross platform and simple framework for managing multiple pages - Erel    Jul 12, 2023   (81 reactions) . The class template is very simple and looks like this: Sub Class_Globals Private Root As B4XView... event will be called once, before the page becomes visible. Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 'load the layout to Root End Sub 3. There must be one class named.... You can see the list of events by writing: Sub + space + tab and choosing B4XPageManager. The event...440642051 B4XPages is a library that serves two purposes: 1. Make it simple to develop B4A apps... B4A Library [B4X] SimpleMediaManager (SMM) - framework for images, videos and more - Erel    Jul 2, 2025   (47 reactions) in Panel1 MediaManager.SetMedia(Panel1, "https://...") It uses B4XImageView (or ZoomImageView) for images, B4XGifView for animated gifs, ExoPlayer / MediaView / VideoPlayer for videos and.... - v1.08 - Adds support for showing images with ZoomImageView instead of B4XImageView: https://www... B4J - MediaView B4i - iUI8 (internal library) video/* Animated Gifs SMM_GIF B4XGifView image/gif.... SMM was built to work with B4XPages. It wasn't tested and not all features will work in non... B4A Tutorial [B4X] Net library (FTP, SMTP, POP) with Wait For - Erel    Feb 14, 2021   (16 reactions)   tags: FTP, SMTP, POP.Net, B4X Net ftp smtp pop wait ("Error uploading file") End If Multiple subs can wait for the same event. Thanks to the sender filter parameter, each event will be intercepted in the correct wait for call. The same... filter' object. This object can be passed as the sender filter parameter in a Wait For call. This makes it simpler to manage multiple requests. For example: 'ftp was previously initialized..., "somefile", False, "/somefile") Wait For (sf) ftp_UploadCompleted (ServerPath As String... B4A Library [B4X] PreoptimizedCLV - Lazy loading extension for xCustomListView - Erel    Aug 28, 2025   (42 reactions) xui As XUI Private Label1 As B4XView End Sub Sub Activity_Create(FirstTime As Boolean... of the "Corona cases" cross platform example based on B4XTable + xChart. It depends... = CustomListView1.GetRawListItem(i) Dim pnl As B4XView = xui.CreatePanel(""....GetRawListItem(i) 'Create the layout for item i and add it to item.Panel. Next Step #4... library. Updates: PCLV_Example1 is based on B4XPages and is cross platform. v1.21 - Fixes an issue... B4A Code Snippet [B4X] Wait for multiple tasks to complete - Erel    Sep 6, 2023   (28 reactions) A pattern such as this one can be used when you want to run multiple resumable subs concurrently and wait for all of them to complete before continuing: Dim status(1) As Int Test1(status...) Sleep(Rnd(1, 1000)) Log("Test1 completed") Status(0) = Status(0) + 1 End Sub Private Sub Test2 (Status() As Int) Sleep(Rnd(1, 1000)) Log("Test2 completed") Status(0) = Status(0) + 1 End Sub Private Sub Test3 (Status() As Int) Sleep(Rnd(1, 1000... B4A Tutorial [B4X] SQL with Wait For - Erel    May 15, 2017   (22 reactions)   tags: wait, Wait For, Resumable Sub, SQL Wait For progress web, SQL The new resumable subs feature, introduced in B4J v5.50, B4i v4.00 and B4A v7.00 (to be soon....ExecNonQueryBatch("SQL") Wait For (SenderFilter) SQL_NonQueryComplete (Success As Boolean) Log... will be caught by the correct Wait For call in all cases. - Note that SQL.ExecNonQueryBatch begins..., "SELECT * FROM table1", Null) Wait For (SenderFilter) SQL_QueryComplete (Success As Boolean, rs... the project (Ctrl + P): Wait For (SenderFilter) SQL_QueryComplete (Success As Boolean, rs... Page: 1   2   3   4   5   6   7   |