[Gambas-user] Can you esplain the order of message() in a webform

marco bra marcobra.ubuntu at ...626...
Wed Sep 20 08:09:23 CEST 2017


Thank Benoît
i still need info i'm not Gambas wizard :-(
in your sent code of the calling of wbcerca_Message, the "As Control" part
is not recognized as valid type from gambas and also wich action string i
need to pass?

Then i have to get access to a filtered recordset, i use that dialog
message dialog to have some kind of debug to the underlaying web layer
gambas logic and state.

Recordset recs count show me filtered total rows number but after in a
later access form a pushbutton details of refrehed tableview it reset the
value to the total initial recset so i cannot get detail access with
webtable to details of filtered result, i alway get access to original
recset row.

Is the some kind of sample or doc to get sample to browse filter and detail
of recordset result via web using gambas ?

Thank
Marco

2017-09-17 0:44 GMT+02:00 Benoît Minisini via Gambas-user <
gambas-user at lists.sourceforge.net>:

> Le 17/09/2017 à 00:05, marco bra a écrit :
>
>> Hi, playing with gb.web component using gambas 3.10.90 daily
>>
>> if i create a button to show two dialog message , i get wrong order (2
>> then
>> 1) of displayed message, why  ?
>>
>> Public Sub wbcerca_Click()
>>
>> Message("1 tot recordset number before selection " & Str(rs.Count))
>>
>> '  apriconn(webtextbox1.text)
>>
>> Message("2 tot recordset number after selection and redraw of webtablewiew
>> " & Str(rs.Count))
>>
>> End
>>
>> Thank
>> Marco
>>
>>
> You must understand that you must finish the request to allow interaction
> with the user on the browser.
>
> Your code stack a modal dialog (message #1), and then another modal dialog
> (message #2) on top, before ending the request.
>
> To chain two messages, you have to:
>
> - Display the first message
> - Finish the event.
> - Handle the Message event on the control that called Message().
> - In this handler, you can open the second message box.
> - Try to not raise the second message indefinitely.
>
> Public Sub wbcerca_Click()
>
>   Message("1 tot recordset number before selection " & Str(rs.Count))
>
> End
>
> Public Sub wbcerca_Message(Source As Control, Action As String)
>
>   Message.Name = "*" ' Fake name, that prevent the Message to raise again
>   Message("2 tot recordset number after selection and redraw of
> webtablewiew" & Str(rs.Count))
>
> End
>
> The Message() behaviour may change in an non-compatible way before
> releasing Gambas 3.11, because it does not work very well. Instead of
> receiving the Source control, we should better receive an arbitrary message
> name. That way you will know for sure which message is being displayed
> inside the Message event handler.
>
> Regards,
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Linux Infinite Freedom

I'm writing from this place:
http://www.openstreetmap.org/?lat=44.39945&lon=8.6798&zoom=15&layers=M



More information about the User mailing list