Wine under Mac with FWH app

Post Reply
User avatar
reinaldocrespo
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Wine under Mac with FWH app

Post by reinaldocrespo »

Hello everyone;

Wine --https://www.winehq.org-- allows you to run windows applications on Unix like OS like Linux, BSD and Mac.

I'm testing Wine for Mac to run my Windows applications. I'm using a specific implementation called "CrossOver". My FWH application launches perfectly and dialogs and FastReports are shown as expected. However, when opening a window that contains a TExplorerBar I get a runtime error:

Structured Systems Corp Error Sys
-----------------------------------------
c:\PMSys\PMSys.exe
Version Info :Build #1562 Built on: 04.11.2022 @ 15:58:45
Size :5,871,616 bytes
Maximum files : 0
Time since start:0 hours 11 mins 44 secs
Date and Time :05/13/2022, 11:00:18
Network :IMAC
OS User : crossover
ADS DD User :rcb

Details
----------
Error BASE/1004 No exported method: NTOP
Parameter :
[ 1] = U

Stack List
----------
Called from:NTOP(0)
Called from:TEXPLORERBAR:CHECKSCROLL(153)
Called from:TEXPLORERBAR:RESIZE(250)
Called from:TWINDOW:HANDLEEVENT(0)
Called from:TEXPLORERBAR:HANDLEEVENT(1731)
Called from:_FWH(3325)
Called from:SETSCROLLRANGE(0)
Called from:(b)TSCROLLBAR(88)
Called from:TSCROLLBAR:SETRANGE(0)
Called from:TSCROLLBAR:WINNEW(198)
Called from:TEXPLORERBAR:NEW(97)
Called from:TCONTRACTORSTBLBRW:VTASKBARMENU(172)
Called from:(b)TTABLEBROWSER_DEFINEDLG(173)
Called from:TDIALOG:INITIATE(714)
Called from:TDIALOG:ACTIVATE(331)
Called from:TCONTRACTORSTBLBRW:DEFINEDLG(173)
Called from:(b)TTABLEBROWSER_SHOW(183)
Called from:TWINDOW:ACTIVATE(1022)
Called from:TMDICHILD:ACTIVATE(262)
Called from:TCONTRACTORSTBLBRW:SHOW(183)
Called from:PMSYS:CONTRACTORSMAINTENANCE(640)
Called from:(b)PMSYS_FRAMEBAR(759)
Called from:TBTNBMP:CLICK(683)
Called from:TBTNBMP:LBUTTONUP(919)
Called from:TCONTROL:HANDLEEVENT(1721)
Called from:TBTNBMP:HANDLEEVENT(1866)
Called from:_FWH(3325)
Called from:WINRUN(0)
Called from:TMDIFRAME:ACTIVATE(1036)
Called from:PMSYS:ACTIVATE(243)
Called from:MAIN(53)
CPU type: VirtualApple @ 2.50GHz 2400 Mhz


The error cannot be reproduced under Windows. it only happens under Wine. Any ideas?

Thank you.


Reinaldo.
User avatar
Antonio Linares
Site Admin
Posts: 42520
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Wine under Mac with FWH app

Post by Antonio Linares »

Dear Reinaldo,

Not sure what FWH version you are using, as current TExplorerBar has different lines than yours.

Anyhow, the error that you get comes from TEXPLORERBAR:CHECKSCROLL() and the only place where nTop is used is here:

oLastItem = ATail( ::aPanels )
... oLastItem:nTop

so it seems as oLastItem is nil. If you could post a screenshot of your explorerBar then it may be easier to spot why oLastItem is coming as nil.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Wine under Mac with FWH app

Post by James Bott »

Hmm, the error says:

Error BASE/1004 No exported method: NTOP

Apparently, it is trying to call the nTop method which doesn't exist--at least in my old version from 7/2018.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
reinaldocrespo
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Wine under Mac with FWH app

Post by reinaldocrespo »

Right, the error does come from Texplorerbar class and yes, the line being quoted on the error log is addressing the nTop property of an TPanel object. BUT, the code executes perfectly under windows and therefore I was hoping not having to touch method CheckScroll() on the TExplorerBar class. Being that the app executes just fine under windows, I was hoping someone here had seen this before and would recommend some special wine bottle configuration.

So, I went back and made some changes to TexplBar.prg and things are now working just fine.

BTW -- I'm impressed with how well this native windows app executes with wine on a Mac. It is using very many 3rd party APIS such as Zillow api, Advantage database API, Twain, SSL, Topaz, FastReports... and now i get to run it on my M1 Mac with MacOS Monterey version 12.2.1. I remind you that not even virtual box with any version of windows currently runs under the M1 chip. With Wine it works flawlessly (so far).

Thank you,

Reinaldo.
hmpaquito
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Wine under Mac with FWH app

Post by hmpaquito »

James Bott wrote:Hmm, the error says:

Error BASE/1004 No exported method: NTOP

Apparently, it is trying to call the nTop method which doesn't exist--at least in my old version from 7/2018.


That Is derived data from TControl class
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Wine under Mac with FWH app

Post by cnavarro »

Dear Reinaldo
If you use a Dialog as a container for the TExplorerBar and not a window, I advise you to create the controls, including the TExplorerBar, in a separate function that you will call from the bInit of the Dialog. You will tell me

Estimado Reinaldo
Si usas como contenedor del TExplorerBar un Dialog y no una ventana, te aconsejo que la creación de los controles, incluído el TExplorerBar lo hagas en una function aparte que llamarás desde el bInit del Dialog. Ya me contarás
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Antonio Linares
Site Admin
Posts: 42520
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Wine under Mac with FWH app

Post by Antonio Linares »

Dear Reinaldo,

Finally let me remind you that you can use FiveMac to build a true Apple app, without the need for wine, etc
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2955
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: Wine under Mac with FWH app

Post by TimStone »

Antonio,

Please remember that FiveMac does not support some essential Windows functions, because MacOS does not have them. It also does not support ADS.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Post Reply