MAC PC differences

From Vectorlab
Jump to: navigation, search
Underconstruction.png
This vcor page is currently under construction.

By: All of us!. Last edit: 2015.12.21 (YYYY.MM.DD)

In the category:Under construction you'll find a list of all pages currently marked as under construction.

There are some differences among VectorScript for Mac and PC. This page lists known issues to facilitate developing.

AddLBImage

Tested under VW:

12.5.1 A, 12.5 F

System:

Win XP pro, MacOs 10.4.8

Extra sys notes:

-

Mac
the routine AddLBImage will always return an index > -1, also if the resource under the given index is missing (always returns the passed index).
PC
the routine will return -1 if the resource is missing.
{ supposes these are the first images loaded in a LB (images loads starting index 0): }
checked := AddLBImage(Dlog, LBid, 1, 128); { --> returns 0 on Mac, returns 0 on PC }
unchecked := AddLBImage(Dlog, LBid, 1, 0); { --> returns 1 on Mac, returns -1 on PC (missing image) }
locked := AddLBImage(Dlog, LBid, 1, 459); { --> returns 2 on Mac, returns 1 on PC }
nothing1 := AddLBImage(Dlog, LBid, 1, 123); { --> returns 3 on Mac, returns -1 on PC (missing image) }
nothing2 := AddLBImage(Dlog, LBid, 1, 124); { --> returns 4 on Mac, returns -1 on PC (missing image) }
camera := AddLBImage(Dlog, LBid, 1, 480); { --> returns 5 on Mac, returns 2 on PC }

{ these need the IP resources to be loaded previously }
checked := AddLBImage(Dlog, LBid, 1, 11022);
unchecked := AddLBImage(Dlog, LBid, 1, 11023); 
{ otherwise, without loading the 'IP resources', use: 128, 129
 but 129 is a white square, while 11023 is transparent.
 White squares are ugly if a row is selected: they are visible }

CreateCheckBoxGroupBox

Tested under VW:

12.5.1 A, 12.5 F

System:

Win XP pro, MacOs 10.4.8

Extra sys notes:

-

PC
(VW 12.5.1) CreateCheckBoxGroupBox will crash the application if a border is not set.
Mac
no issue. Thus only on Mac can the border be set to invisible.
Solution
Use a platform check to determine if the platform is Mac or PC:
 gIsMac := Util_IsMac;

{....}
{ supposes you wish the border to be invisble, but you must have it visible on PC: }
CreateCheckBoxGroupBox(dialogID, cChGrBx_ID, 'Group box title', NOT gIsMac);

CreateLB

Tested under VW:

12.5.1 A, 12.5 F

System:

Win XP pro, MacOs 10.4.8

Extra sys notes:

-

PC
the width in characters, parameter of CreateLB, is applied to the whole width of the list browser, including the scroll bar on the right.
total width = width in chars
Mac
the width is applied only to the fields part of the list browser, excluding the scroll bar: thus the list browser will be wider than on the PC.
total width = width in chars + width of the scroll.
Solution
apply a coefficient to the width, using a platform check. A coefficient of 4 works fine for me, but it should be tested under different conditions.
 gIsMac := Util_IsMac;

{....}
gPCfix_LB := 0;
IF NOT gIsMac THEN
	gPCfix_LB := 4;

{....}
CreateLB(dialogID, cLB_ID, c_Width + gPCfix_LB, c_Height);

(Todo: add images! )

CreatePullDownMenu

Tested under VW:

12.5.1 A, 12.5 F

System:

Win XP pro, MacOs 10.4.8

Extra sys notes:

-

PC
the width in characters, parameter of CreatePullDownMenu, is applied to the whole width of the menu, including its arrow.
total width = width in chars
Mac
the width is applied only to the string part of the menu, excluding the arrow: thus the menu will result longer.
total width = width in chars + width of the arrow.
Solution
apply a coefficient to the width, using a platform check. A coefficient of 7 works fine for me, but it should be tested under different conditions.
 gIsMac := Util_IsMac;

{....}
gPCfix_Pull := 0;
IF NOT gIsMac THEN
	gPCfix_Pull := 7;

{....}
CreatePullDownMenu(dialogID, cPull_ID, c_Width + gPCfix_Pull);

(Todo: add images! )

ReadXMLFile

Tested under VW:

12.5.1 A, 12.5 F

System:

Win XP pro, MacOs 10.4.8

Extra sys notes:

-

PC
paths in the form "\\server\...." are not supported by ReadXMLFile and lead to error. The path must begin with a letter, for example: "C:..."
Solution
Unknown.

RefreshLB

Tested under VW:

12.5.1 A, 12.5 F

System:

Win XP pro, MacOs 10.4.8

Extra sys notes:

-

PC
a call to RefreshLB is not immediately effective on a selected list browser row. The user needs to release the selection for the refresh to take place.
Mac
behaves as expected. The refreshed list browser is immediately changed.
Solution
Unknown.