Re: Form Scaling & Optimal Fonts...

2018-12-07 Thread Robert ListMail via 4D_Tech
Tim, actually, I’ve nearly always used custom stylesheets…. I’ve never utilized 
the scale form feature until recently and only on one form as a test. Since 
I’ve never used this, I never knew the history or intent of the feature. I was 
just exploring how best to bring this legacy structure into v17 and wanted to 
verify best practices when it comes to stylesheet use… 

When Kiesuke says "Today it is better to use the same form for both platforms 
and use only automatic stylesheets.” I took this seriously and questioned my 
whole approach to custom stylesheets since I’ve never used or thought to use 
the automatic stylesheets. So, I’m not looking for a checkbox solution for 
design issues that deserve a custom approach. But I do want to occasionally 
re-consider my approach, at times, and to make efficient design decisions. As 
you know there is such a thing as to work within the natural flow of 4D and 
that’s the smart approach. Yes, I want to be that guy. :)

Again, thanks for your contribution. 

Robert

> On Dec 7, 2018, at 3:54 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Robert is just looking for a quick — check that checkbox — to solve his 
> problem. Form Scaling is really not that fix.

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

Re: Form Scaling & Optimal Fonts...

2018-12-07 Thread Robert ListMail via 4D_Tech
“Giving it the eye ball…” this cracked me up! :)

Thanks Tim for the detailed response. Using custom style sheets extensively was 
my most utilized approach. 

Robert

> On Dec 7, 2018, at 3:33 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> You determine what looks good by printing it out and giving it the eye ball

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

Re: 4D Structure Export...

2018-12-07 Thread Tom Benedict via 4D_Tech
Thanks for your comments Kirk.

> On Dec 7, 2018, at 11:07, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> I'm not familiar with VC_Framework but the big improvement in R3 is the
> addition of Form convert to dynamic. This allows you to export all the
> forms  - not just the object and form methods. The objects created are
> fully functional dynamic form objects. This is the last piece we needed to
> be able to fully build a database from exported files.
> 
Have you (or anyone) built a database from exported files? I’m thinking this 
would a great way to support branching and team development.

> If it doesn't natively it's not difficult to set the created/modified dates
> of the new files. I do this with method exports because the exported files
> are dated with the current date/time.
> 
I see how one would get the modified date for the method using METHOD GET 
MODIFICATION DATE, but I don’t see a METHOD GET MODIFIED BY. Running on server 
in a ‘batch’ export, which, if you are using 4D Team Developer, is the only way 
that Export structure file works, I don’t think there’s a way to know what user 
modified the method/form/etc. 

Maybe we need to consider moving team development from the centralized 4D Team 
Developer model to a distributed model  using individual copies of 4D. That 
would match the classic development model and practice which non-4D developers 
have enjoyed for decades. If 4D v17R3 can actually build a structure from text 
files generated by Export structure file, I’m thinking it would be possible. Is 
anyone doing this yet? I would try it myself, but I’m not a Partner at this 
time.

Tom Benedict



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

Re: Form Scaling & Optimal Fonts...

2018-12-07 Thread Tim Nevels via 4D_Tech
On Dec 7, 2018, at 3:43 PM, Chip Scheide <4d_o...@pghrepository.org> wrote:

> to me - form scaling means:
> I hit a key (press a button, whatever) and the form enlarges -
> think of Command/Control + on a web page.
> think of the designer form control 50% 100% 200% 400%
> 
> I have implemented this in v13 by using Object Set Font Size(+/-1) on 
> everything on the form (list forms only).
> 
> the form (and all the objects get bigger, and stay in place relative to 
> each other (maybe not so much for the web, but mostly).
> 
> I do not think of form scaling as changing the monitor resolution from 
> 1600 x 1200 to 800 x600

Absolutely correct, 4D Form Scaling does not change monitor resolution. My 
human clients do that so they don’t have to wear glasses. :)

Robert is just looking for a quick — check that checkbox — to solve his 
problem. Form Scaling is really not that fix. While it may work for him and fix 
his issue, he is being into using a legacy feature and using it in a way it was 
never intended to be used. 

They way you are doing scaling is a good way, may be the preferred way to do 
it. But you can only go up a point or 2 before object start colliding and 
overlapping each other. 

Web page form scaling on macOS with the command-+ and command- - keys works 
great in Safari. Same for Text Edit or Pages. They have programmed it to work 
correctly.

Maybe some day 4D will implement this type of scaling. That would be sweet!

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

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

Re: Form Scaling & Optimal Fonts...

2018-12-07 Thread Chip Scheide via 4D_Tech
to me - form scaling means:
I hit a key (press a button, whatever) and the form enlarges -
think of Command/Control + on a web page.
think of the designer form control 50% 100% 200% 400%

I have implemented this in v13 by using Object Set Font Size(+/-1) on 
everything on the form (list forms only).

the form (and all the objects get bigger, and stay in place relative to 
each other (maybe not so much for the web, but mostly).

I do not think of form scaling as changing the monitor resolution from 
1600 x 1200 to 800 x600

Chip

On Fri, 7 Dec 2018 15:33:41 -0600, Tim Nevels via 4D_Tech wrote:
> 
> Form scaling is really a legacy feature that is still hanging around 
> for those old database that used it back in the 90’s when 4D was 
> first ported to Windows. Style sheets are the way to go. 
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Form Scaling & Optimal Fonts...

2018-12-07 Thread Tim Nevels via 4D_Tech
On Dec 7, 2018, at 10:32 AM, Robert ListMail wrote:

> I showed a scaled up version of a few forms, during a migration to v17 and 
> later I decided to move everything to automatic stylesheets as recommended by 
> Keisuke that this is best practices now. So, Jefferey, are you using 
> automatic stylesheets?  
> 
> What determines the font size of automatic style sheets?  In Windows 10, what 
> should that size be…?
> 
> I have a client that kinda liked the scaled up larger forms…. I moved away 
> from that because of the “best practices” suggestions here and because the 
> button graphics were also scaled and did not look as sharp. 

If you use “automatic” style sheet then every few years when Apple — or 
Microsoft — decides to change the default system font you are covered. Remember 
on the Macintosh System 1.0 the font was Chicago, then later it was Charcoal, 
then Lucida Grande then Helvetica Neue and now its Apple's new San Francisco. 

So if 4D had style sheet support back in v2 days and you set it to “Automatic”, 
then as you upgraded your 4D database to new versions of 4D and you upgraded 
your Mac to each macOS version, the font would have automatically changed 
without you doing anything. That’s what Automatic is all about. It also changes 
the size too. If you you want that, or NEED that, then use it. 

I don’t want or need that. I want to choose what font and size I want to use on 
forms. I don’t want it chosen for me by the operating system. The new font 
usually has different metrics so you might see truncation at the right or 
bottom or other issues. I want to control when the font changes in my 4D 
applications.

So I have created a set of style sheets and I use them EVERYWHERE. Repeat… 
EVERYWHERE. NEVER do I choose a font or size from the Property list. Choose a 
style sheet. If I need something different from the style sheets I have 
defined, I create a new one. This also removes  cross platform font selection 
issues I’ve had in the past.

Note that it is OK to add a style like bold, or italic or underline to a form 
object that has a style sheet associated with it.  Same for colors. That helps 
when you want to occasionally add italic or an underline or red color to 
something. 

I use style sheets for printed forms too. No problem with having 50+ style 
sheets defined. 4D can handle it. I might have 8 style sheets for a single 
report to cover all the different elements on that report. Different sizes, 
bold, etc. And this also makes printing reports work well cross platform. You 
choose “Helvetica” on macOS and “Arial” on Windows or whatever you want that 
looks good. You determine what looks good by printing it out and giving it the 
eye ball and making that decision. After all you are the designer and software 
architect, so act like it and make these decisions. :)

Regarding the size of fonts used on forms, that’s a decision you and your 
client must make. Each client will have different needs. I’ll give you 2 
examples:

I have one client that has no “old people” and everyone is “young”. So they 
like everything 11 point. Why? Because they want to pack as much as they can on 
the screen and everyone has no problem reading that size. So that’s what they 
get. I set the style sheets and I’m done.

Another client has a mix of old and young people. Some of the “old” people 
don’t have as good eye sight as when they were young. (I’m in that situation 
myself.) So the “old” people crank down their monitor resolution. I’ve seen 
some that have it set at the maximum low value so that the screen renders at 
1024x768!  

That’s a problem because my default minimum window size today is 1000x660. And 
on Windows with the Taskbar at the bottom taking up pixels and the window title 
bar taking up more, and the Windows MDI window title bar even more, a 1000x660 
window can’t open full size. Scroll bars appear. The typical user with a 
typical monitor today using the default resolution of the monitor and 100% 
setting on Windows has no problem. But these “i can’t see because I’m old so I 
need to blow up the monitor size” people complain that they have to scroll all 
the time. 

So the fix for this customer had 2 parts. First, I increased font size on the 
style sheets by 1 point. From 11 point to 12 point. Amazing how much difference 
a single point makes with today’s systems. Young people didn’t notice or care. 
Second was I had all the “old” people with 1024/786 monitor resolution increase 
their resolution to 1280x720 or more. Some people still complained that it was 
“too small to read” and the only answer for that is “for you it is, but for 
everyone else it is fine. A pair of glasses would easily fix this”. They go 
quiet when you say that because that's the whole reason for the problem. 
Vanity. They’ve never worn glasses and they don’t want to start. 

So I’d talk with you client and tell them you can set the font size to 18 point 
if they want. But the consequence is less on each screen

Re: 4D Structure Export...

2018-12-07 Thread John DeSoi via 4D_Tech
> 
> On Dec 7, 2018, at 1:07 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I'm not familiar with VC_Framework but the big improvement in R3 is the
> addition of Form convert to dynamic. This allows you to export all the
> forms  - not just the object and form methods. The objects created are
> fully functional dynamic form objects. This is the last piece we needed to
> be able to fully build a database from exported files.


17 R3 is not quite there for exporting forms in a way that can easily be moved 
to another structure. Form convert to dynamic does not include the form or 
object method paths. I'm hoping that will change, see the recent discussion on 
the forum.

If you export the forms from the structure (not using Form convert to dynamic), 
the form/object method references are there. But I don't think you can use that 
to reload the form in another database because the method property can only be 
a project method. So to use the form in another database you would have to 
translate the form/object methods into a project methods somehow.


> It's easy to diff
> folders with methods or form definitions. I've done this with folders
> containing thousands of methods in a couple of minutes.

The other way to do it is to just export all the files to the same version 
controlled directory. The commit for each release. The version control tool 
will show exactly which files are changed since the last release and tracks all 
changes over time. For 4D, you'll just need to add something to remove methods 
that have been deleted or renamed. Git automatically figures out when a file 
has been renamed instead of deleted.


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

Re: 4D Structure Export...

2018-12-07 Thread Kirk Brooks via 4D_Tech
Tom,

On Fri, Dec 7, 2018 at 10:14 AM Tom Benedict via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>  if this feature does more than the export we’ve been able to do since
> v12/14 via various versions of VC_Framework. Is this simply a higher level
> of integration with the app or does it actually offer more functionality?
>
I'm not familiar with VC_Framework but the big improvement in R3 is the
addition of Form convert to dynamic. This allows you to export all the
forms  - not just the object and form methods. The objects created are
fully functional dynamic form objects. This is the last piece we needed to
be able to fully build a database from exported files.


> I’m trying to understand how it supports team development on 4D Server.
> Among other things, I want to track all changes to all objects so I know
> who changed what and when they made the change. Reviewing the Export
> structure file command documentation
> http://doc.4d.com/4Dv17R3/4D/17-R3/Export-structure-file.301-3965587.en.html
> <
> http://doc.4d.com/4Dv17R3/4D/17-R3/Export-structure-file.301-3965587.en.html>
> and the table which describes the exported files, it’s not clear whether
> the files are tagged with 'mod date' and 'mod by' values.
>
If it doesn't natively it's not difficult to set the created/modified dates
of the new files. I do this with method exports because the exported files
are dated with the current date/time.

For me the advantage here is being able to export all the database elements
into text files. Pretty much all the version control solutions around are
based on managing text files so this opens up a lot of options. when it
comes to identifying changes it's possible to use any number of diffing
tools. Like BBEdit or DeltaWalker, to name a couple. It's easy to diff
folders with methods or form definitions. I've done this with folders
containing thousands of methods in a couple of minutes.

I think dynamic forms are truly a game changer in the 4D world. Now that we
can export existing forms into the format required there's backward
compatibility.


-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

4D Structure Export...

2018-12-07 Thread Tom Benedict via 4D_Tech
There are a couple of recent posts on the 4D Blog related to exporting 4D 
methods and forms as text as a new feature in v17R3:

https://blog.4d.com/text-files-from-your-structure-file/ 
 and 
https://blog.4d.com/a-component-to-export-the-structure-file/ 


I don’t have access to R releases, so I’m wondering whether anyone knows if 
this feature does more than the export we’ve been able to do since v12/14 via 
various versions of VC_Framework. Is this simply a higher level of integration 
with the app or does it actually offer more functionality?

I’m trying to understand how it supports team development on 4D Server. Among 
other things, I want to track all changes to all objects so I know who changed 
what and when they made the change. Reviewing the Export structure file command 
documentation 
http://doc.4d.com/4Dv17R3/4D/17-R3/Export-structure-file.301-3965587.en.html 
 
and the table which describes the exported files, it’s not clear whether the 
files are tagged with 'mod date' and 'mod by' values. 

In the past I have used Method_History component which is triggered by macros 
whenever a method is modified and saves a copy of the method to a db table 
(internal or external). That data could then be used to view the edit history 
of any method by date/time and user and compare different versions using a diff 
tool. It was great for code reviews and troubleshooting. I was also a good 
starting point when writing Release Notes.

The documentation also states:

This command can be used in the following contexts only:
4D in local mode or 4D Server (an error is returned if it is called from 4D in 
remote mode)
So maybe I can’t do what I want on 4D Server? Maybe I need to have developers 
working with 4D in local mode?

Thanks for any comments on this or on the state in general of Version Control, 
Source Code Management and Release Management in 4D.

Tom Benedict


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

Re: Formula as Variable

2018-12-07 Thread Chip Scheide via 4D_Tech

vtFormula:="([ItemDiscounts]BasePrice*(1-([ItemDiscounts]PerCentDiscount*0.01)))"

my_sort(->[ItemDiscounts];vtFormula;">")

`My_sort
c_pointer($1;$Table)
c_text($2,$Formula;$Table_Name;$Direction;$3)

$Table:=$1
$Formula:=$2
$Direction:=$3

$Table_Name:=table name($Table)
$Formula:="Order by 
Formula(["+$table_Name+"];"+$Formula+";"+$Direction+")")
Execute Formula($Formula)


On Fri, 7 Dec 2018 16:32:16 +, Jim Medlen via 4D_Tech wrote:
> 
> Is there a way to pass a formula into a method as a variable ?
> 
> 
vtFormula:="([ItemDiscounts]BasePrice*(1-([ItemDiscounts]PerCentDiscount*0.01)))"
> vtSort:="<"
> ORDER BY FORMULA([ItemDiscounts];Execute text(vtFormula);vtSort)
> 
> Thanks,
> 
> Jim Medlen
> 
> This email was transmitted on 100 percent recycled electrons
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Formula as Variable

2018-12-07 Thread Jim Medlen via 4D_Tech

Is there a way to pass a formula into a method as a variable ?

vtFormula:="([ItemDiscounts]BasePrice*(1-([ItemDiscounts]PerCentDiscount*0.01)))"
vtSort:="<"
ORDER BY FORMULA([ItemDiscounts];Execute text(vtFormula);vtSort)

Thanks,

Jim Medlen

This email was transmitted on 100 percent recycled electrons

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

Re: CONVERT PICTURE not seeming to work for me...

2018-12-07 Thread Chip Scheide via 4D_Tech
Where do you find this font?  I can't seem to find it listed in my 
system fonts   :)

On Thu, 6 Dec 2018 20:26:06 -0500, Charles Miller via 4D_Tech wrote:
> font of great info
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Form Scaling & Optimal Fonts...

2018-12-07 Thread Chip Scheide via 4D_Tech
I have a followup question:
if you can not apply a color to the style sheet then that would mean 
manually (programmatically) applying a color to every object on a form 
every time the form is displayed. --  A PITA to be sure.
BUT..
once a color is applied via code (Object Set Color, or Object Set RGB 
Color) does THIS also break the automatic style sheet functionality?

Chip

On Thu, 6 Dec 2018 18:49:11 -0600, Robert ListMail via 4D_Tech wrote:
> 
> From the manual: "Automatic style sheets manage the font as well as 
> its size and color. If you modify one of the properties managed by an 
> automatic style sheet in the Form editor, this style sheet no longer 
> works dynamically. However, you can apply custom style properties 
> (Bold, Italic or Underline) without altering its functioning.”
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**