OSX upgrade and paths

2017-10-04 Thread Malcolm Stone via 4D_Tech
Recent behavior change:
- method calls EXPORT TEXT([table];$filename)
- filename is in the format "Macintosh HD:Users:user:Documents:folder:file.txt"
- export is successful but an additional (zero byte) file with a gibberish name 
is generated in the same folder.

extra file example: ADBD2E8CF8824E98ACF8AB77D8714F12.temp

This seems to coincide with having upgraded Mac to High Sierra (10.13)

test path name($filename) returns Is a document

Apple says that this OSX upgrade makes changes to the file system, is that a 
factor here?

Malcolm
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Listbox Spacing Between Columns

2017-09-26 Thread Malcolm Stone via 4D_Tech
Mon, 25 Sep 2017, Arnaud de Montard said:
> Use unbreakable space instead, it works (alt+space with keyboard, char code = 
> 0x00A0 / 160). 

I have tried and tried this without success. 
Forgetting about number format, even a text field (horizontal alignment = 
right) will not display trailing spaces.
-
Malcolm
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

unrendered spaces

2017-05-12 Thread Malcolm Stone via 4D_Tech
My numeric display format issue is not confined to numbers.
If I put “abc” and “abc “ into an array (or into a table) and display it on a 
form, I get
abc|
abc|
( | represents edge of object)
instead of
abc|
abc |

The space is in the array value (or table), 4D doesn’t display it. If you want 
to play along at home, try this:
Create a Project Form
Add a List Box (not Hierarchical, it should get the default name of "List Box”)
Paste the following into the form method, display the form. My first column 
aligns to the right with no spaces. Other columns are just for fun to show that 
the spaces are there.

The question is: why are trailing spaces not displayed?

Cheers,
Malcolm

//v15.4
Case of 
: (Form event=On Load)
ARRAY TEXT(a;0)
ARRAY LONGINT(wide;0)
ARRAY TEXT(star;0)
ARRAY TEXT(reverse;0)
C_TEXT($this;$temp)

C_LONGINT($i;$j)
C_POINTER($NilPtr)

OBJECT SET DATA SOURCE(*;"Column1";Get pointer("a"))
OBJECT SET TITLE(*;"Header1";"right")

LISTBOX INSERT COLUMN(*;"List Box";2;"second";wide;"length";$NilPtr)
OBJECT SET TITLE(*;"length";"length")

LISTBOX INSERT COLUMN(*;"List Box";3;"third";reverse;"reversed";$NilPtr)
OBJECT SET TITLE(*;"reversed";"reversed")

LISTBOX INSERT COLUMN(*;"List Box";4;"fourth";star;"star";$NilPtr)
OBJECT SET TITLE(*;"star";"replaced")

OBJECT SET HORIZONTAL ALIGNMENT(*;"Column1";Align right)
OBJECT SET HORIZONTAL ALIGNMENT(*;"second";Align center)
OBJECT SET HORIZONTAL ALIGNMENT(*;"fourth";Align right)
LISTBOX SET COLUMN WIDTH(*;"List Box";60)

For ($i;0;9)
$this:=Choose($i;"D";"D";"D";"G";"G";"A";"A";"D+";"B";"G")+(Char(32)*$i)
APPEND TO ARRAY(a;$this)
APPEND TO ARRAY(wide;Length($this))
$temp:=""
For ($j;Length($this);1;-1)  //reverse the string
$temp:=$temp+Substring($this;$j;1)
End for 
APPEND TO ARRAY(reverse;$temp)
APPEND TO ARRAY(star;Replace string($this;" ";"*"))
End for 
End case 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Number display format - trailing spaces

2017-05-11 Thread Malcolm Stone via 4D_Tech
>How about String(number;"|yourPreferredFormat") and set it right justified?

>Not sure, but try non breakable space instead of char32. 

Thanks for the suggestions. Alas, the problem remains. Interesting result in 
testing:
ARRAY REAL(aNum;0)
ARRAY TEXT(aText;0)
C_LONGINT($i)
//create two arrays for display in a list box
SELECTION TO ARRAY([Table_1]amount;aNum)
For ($i;1;Size of array(aNum))
APPEND TO ARRAY(aText;String(aNum{$i};"###,##0.00 ;(###,##0.00);0.00 "))
  //If (aNum{$i}>0)
  //aText{$i}:=aText{$i}+"."
  //end if
End for 

Looking at the aText column (horizontal alignment = right):
Without that commented section, it’s the same old problem - no space after 
positive numbers.
Uncomment, run again, the period is preceded by a space when displayed in a 
list box. A positive number is displayed “123.45 ."

Conclusion: the space is there but the listbox (or form, or QR) won’t render it!

I fear that even if the string conversion worked, footer (and other) 
calculation would be more complicated.


Malcolm
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Number display format - trailing spaces

2017-05-11 Thread Malcolm Stone via 4D_Tech
Resurrecting a question for which I haven't seen an answer:

If I choose the built-in format "###,##0.00  ;###,##0.00CR"
Forms, list boxes and quick reports look like:
123.45|
123.45CR|
(difficult to model with proportional font - trying to show positive and 
negative both all the way to the right)

I want:
123.45| << spaces after positive number
123.45CR|

That is, decimals aligned. Why is the blank space in the positive section of 
the format definition ignored?

I've gone way over the allowed (time spent tinkering) / (perceived benefit) 
ratio on this!
Have tried "#,##0.00"+Char(32)+Char(32)+";#,##0.00CR" with OBJECT SET FORMAT, 
also Char(202)

I verify that this worked correctly in a previous life (4D 6.7, Windows).
Currently 4D 15.4, Mac OS 10.12.4

Thanks,
Malcolm


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**