Discussion:
[MSEide-MSEgui-talk] Hint on FreeBSD64 ?
Fred van Stappen
2017-07-12 19:20:17 UTC
Permalink
Hello Martin.

I have a strange problem with hints and FreeBSD64.

With one of my projects, with same code, the hints are ok for Linux32/64, Win32/64 but for FreeBSD64, the hints are not show anymore ;-(

After deep and heavy investigations, I found the guilty.

It appends if a thread was created.

thethread := TDummyThread.create(true); // ---> after this, no more hints....

In attachment, simple demo that shows the problem.


Thanks.


Fre;D
Martin Schreiber
2017-07-13 09:59:05 UTC
Permalink
On Wednesday 12 July 2017 21:20:17 Fred van Stappen wrote:
> Hello Martin.
>
> I have a strange problem with hints and FreeBSD64.
>
> With one of my projects, with same code, the hints are ok for Linux32/64,
> Win32/64 but for FreeBSD64, the hints are not show anymore ;-(
>
> After deep and heavy investigations, I found the guilty.
>
> It appends if a thread was created.
>
> thethread := TDummyThread.create(true); // ---> after this, no more
> hints....
>
Please try again with git master 7932ad6b03f248648d8ebc4d59e3f8cdfed6ee24.
FreeBSD seems not to report signals to main thread poll() if there is a
suspended thread.

Martin
Fred van Stappen
2017-07-13 14:11:26 UTC
Permalink
> Please try again with git master 7932ad6b03f248648d8ebc4d59e3f8cdfed6ee24.

Perfect, works like charms now, many thanks Martin.

The "drumspract" projet is renamed into "strumpract".
It is the Victorinox of the musicians: many easy tools to practice your instrument.

Here binaries for Linux32/64, Win32/64 and FreeBSD64:
https://github.com/fredvs/strumpract/releases/

And here the source:
https://github.com/fredvs/strumpract/

PS: I have problems with conversion of pchar from a library.

Doing this with a mse tlabel gives strange characters (same without AnsiToUtf8()):

infotitle.caption := 'Title: ' + AnsiToUtf8(uos_InputGetTagTitle(theplayer, 0));

Maybe you have a idea how to show the good characters.

Many thanks.

Fre;D






Fre;D
Martin Schreiber
2017-07-13 16:13:48 UTC
Permalink
On Thursday 13 July 2017 16:11:26 Fred van Stappen wrote:
>
> infotitle.caption := 'Title: ' + AnsiToUtf8(uos_InputGetTagTitle(theplayer,
> 0));
>
> Maybe you have a idea how to show the good characters.
>
If you know that the pchar is encoded in utf-8:
"
infotitle.caption:= 'Title: ' + utf8tostringansi(ansistring(thepchar));
"
utf8tostringansi() is in unit msestrings.

If it is in system encoding:
"
infotitle.caption:= 'Title: ' + msestring(ansistring(thepchar));
"

Martin
Fred van Stappen
2017-07-13 22:38:08 UTC
Permalink
Hello.


> infotitle.caption:= 'Title: ' + utf8tostringansi(ansistring(thepchar));
> infotitle.caption:= 'Title: ' + msestring(ansistring(thepchar));


Sadly both still give strange characters. ;-(


Fre;D
Martin Schreiber
2017-07-14 05:20:52 UTC
Permalink
On Friday 14 July 2017 00:38:08 Fred van Stappen wrote:
> Hello.
>
> > infotitle.caption:= 'Title: ' + utf8tostringansi(ansistring(thepchar));
> > infotitle.caption:= 'Title: ' + msestring(ansistring(thepchar));
>
> Sadly both still give strange characters. ;-(
>
What is the encoding of the pchar? What means "strange characters"? Can you
provide a simple complete example?

Martin
Fred van Stappen
2017-07-14 12:04:04 UTC
Permalink
> Maybe you have a idea how to show the good characters.

Hello Martin.

OK, I get it,, a dreferencing was missing for a PPobject. I did PPobject^.title and it must be PPobject^^.title (with 2 ^).

Sorry for the noise, all is perfect now, with good characters..

PS: Your Thistoryedit is magic.

Fre;D
Martin Schreiber
2017-07-14 12:55:27 UTC
Permalink
On Friday 14 July 2017 14:04:04 Fred van Stappen wrote:
>
> PS: Your Thistoryedit is magic.
>
Did you notice that it can automatically save its state in a "tstatfile"?

Martin
Fred van Stappen
2017-07-14 16:32:52 UTC
Permalink
> Did you notice that it can automatically save its state in a "tstatfile"?

Of course and even more...

After added a historyedit in main form : historyfn

I did a custom msefiledialog and on tfiledialogfo.okonexecute added this:

mainfo.historyfn.dropdown.valuelist.asarray:= filename.dropdown.valuelist.asarray;

(main was added in uses section).

Now in main form, after creation, historyfn has his dropdown list filed with the history of the filedialog.

Brillant.

Many thanks Martin.

Fre;D
Continue reading on narkive:
Loading...