Page 1 of 1

DCGET Tooltip

Posted: Wed Jan 12, 2022 11:00 pm
by Manfred
Hi
where is my mistake in reasoning?
this works fine

Code: Select all

@ oDialogZusatz:nOben,oDialogZusatz:nLinks DCSAY "Bemerkung          :";
                                                   OBJECT oDialogZusatz:oText;
                                                   PARENT oDialogZusatz:oRahmenKopf;
                                                    SAYID "bemerkung";
                                                     SIZE 0
         @ DCGUI_ROW,DCGUI_COL DCGET oDialogZusatz:oZuw:m_bem;
                         EDITPROTECT {|| .T.};
                                 EVAL {|o| o:usevisualstyle := oSysPara:doParaWs:VisualStyle,;
                                           oDialogZusatz:oZuw:addEditControl(o,,,.T.);
                                      };
                               OBJECT oDialogZusatz:oZuw:oM_bem;
                               PARENT oDialogZusatz:oRahmenKopf;
                              TOOLTIP {|| zeigetooltip("bemerkungget")}<-----
                              
but this not

Code: Select all

@ oDialogZusatz:nOben,oDialogZusatz:nLinks DCSAY "Bemerkung          :";
                                                   OBJECT oDialogZusatz:oText;
                                                   PARENT oDialogZusatz:oRahmenKopf;
                                                    SAYID "bemerkung";
                                                     SIZE 0
         @ DCGUI_ROW,DCGUI_COL DCGET oDialogZusatz:oZuw:m_bem;
                         EDITPROTECT {|| .T.};
                                 EVAL {|o| o:usevisualstyle := oSysPara:doParaWs:VisualStyle,;
                                           oDialogZusatz:oZuw:addEditControl(o,,,.T.);
                                      };
                               OBJECT oDialogZusatz:oZuw:oM_bem;
                               PARENT oDialogZusatz:oRahmenKopf;
                              TOOLTIP {|| zeigetooltip(oDialogZusatz:oZuw:m_bem)}<-----
                              
not that either

Code: Select all

@ oDialogZusatz:nOben,oDialogZusatz:nLinks DCSAY "Bemerkung          :";
                                                   OBJECT oDialogZusatz:oText;
                                                   PARENT oDialogZusatz:oRahmenKopf;
                                                    SAYID "bemerkung";
                                                     SIZE 0
         @ DCGUI_ROW,DCGUI_COL DCGET oDialogZusatz:oZuw:m_bem;
                         EDITPROTECT {|| .T.};
                                 EVAL {|o| o:usevisualstyle := oSysPara:doParaWs:VisualStyle,;
                                           oDialogZusatz:oZuw:addEditControl(o,,,.T.);
                                      };
                               OBJECT oDialogZusatz:oZuw:oM_bem;
                               PARENT oDialogZusatz:oRahmenKopf;
                              TOOLTIP oDialogZusatz:oZuw:m_bem <-----
                              

Code: Select all

FUNCTION zeigetooltip(cWert)
	     RETURN cWert

Re: DCGET Tooltip

Posted: Thu Jan 13, 2022 5:45 am
by rdonnay
There is something about your tooltip that is not thread safe.

Tooltips are run in another thread.
For some reason, your oDialogZusatz:oZuw:m_bem variable is not accessible from the Tooltip thread.

I have only seen this problem in the past if you are trying to access a database field.

Re: DCGET Tooltip

Posted: Thu Jan 13, 2022 6:12 am
by Manfred
is there any workaround, or is it absolut inpossible, to display?
The get field is a Memofield of an Databaserecord from dbf and it display a short string from this. The tooltip should display the complete string of the memofield.

Re: DCGET Tooltip

Posted: Thu Jan 13, 2022 6:30 am
by rdonnay
Send me a small sample program that I can compile and run.

I will see if I can figure this out for you.

Re: DCGET Tooltip

Posted: Thu Jan 13, 2022 6:47 am
by Manfred
oh, its not so important to make a lot of work. It was a little idea of myself. I have to go another way to resolve this problem. Many thanks.

Re: DCGET Tooltip

Posted: Thu Jan 13, 2022 8:16 am
by rdonnay
oh, its not so important to make a lot of work.


It won't be a lot of work for me.
I don't like to leave issues like this unanswered on the forum.
eXpress++ users should understand why this is a problem and how to solve it.

Re: DCGET Tooltip

Posted: Thu Jan 13, 2022 8:31 am
by Manfred
its ok. How do german people say:"es war eine Schnapsidee".
Thanks a lot and have a good time.