Re: Moving picture resources from one database to another

2018-11-03 Thread Robert ListMail via 4D_Tech
Tim, nice piece if code that I was hoping to use to convert my PICT library 
images to PNG….  This works perfectly but it must be done BEFORE you convert 
the structure to v17. I hope this helps someone.

Regards,

Robert

> On Feb 10, 2018, at 4:28 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> This method converts all pictures in the library to PNG format and then 
> writes them back to the library. It’s an example to see the logic that you 
> would use.
> 
> C_TEXT($pictureName_t)
> C_PICTURE($picture_c)
> C_LONGINT($i;$pictureID_l)
> ARRAY LONGINT($pictureID_al;0)
> ARRAY TEXT($pictureName_at;0)
> 
> PICTURE LIBRARY LIST($pictureID_al;$pictureName_at)
> 
> For ($i;1;Size of array($pictureID_al))
>   $pictureID_l:=$pictureID_al{$i}
>   $pictureName_t:=$pictureName_at{$i}
>   GET PICTURE FROM LIBRARY($pictureID_l;$picture_c)
> 
> // convert the picture
>   CONVERT PICTURE($picture_c;".png")
> 
> // make all white pixels transparent
>   TRANSFORM PICTURE($picture_c;Transparency;0x00FF)
> 
> // write back to library
>   SET PICTURE TO LIBRARY($picture_c;$pictureID_l;$pictureName_t)
> End for 

**
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: Intelligent Use of Entry/Display Filters...

2018-11-03 Thread Robert ListMail via 4D_Tech
At the moment, I’m thinking of rolling my own using the filters centrally 
defined as follows. The functionality

The method is easy to call via: Set_ZipCode_Display (Self)


//Method Set_ZipCode_Display
C_POINTER($1;$ZipCode)
$ZipCode:=$1

Case of 
: (Length($ZipCode->)=5)
OBJECT SET FORMAT($ZipCode->;"|Zip_Display_Standard")
: (Length($ZipCode->)=9)
OBJECT SET FORMAT($ZipCode->;"|Zip_Display_Extended")
Else 
OBJECT SET FORMAT($ZipCode->;"")
End case


> On Nov 3, 2018, at 5:54 PM, Robert ListMail via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> ...zip code data entry and display.

**
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
**

Intelligent Use of Entry/Display Filters...

2018-11-03 Thread Robert ListMail via 4D_Tech
I’m refactoring and old database in v17 and wanted to re-think how the entry 
and display filters are implemented. At the moment, I’m focused on zip code 
data entry and display. The current system is setup to handle extended zip 
codes but there is often an extra hyphen when 5 standard length codes are used. 
Do you allow for standard and extended length zip codes? How do you have your 
entry and display filters defined? The documentation talks about combining 
entry and splay into one but the property inspector has a place for both values 
separately. 

Thanks,

Robert
**
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: subtables issue

2018-11-03 Thread Robert ListMail via 4D_Tech
Keisuke, can you elaborate on the potential ORDA approach in this situation…? 
I’m dealing with subtables as well in v17 and was about to eliminate the 
obsolete subtable/subrecord commands when I noticed that you mentioned leaving 
it alone….  Are you suggesting that I leave the old “_o_” commands in place on 
a converted V17 database?  For those of us wrapping our heads around ORDA, tell 
(please) how we can use the new 4D technology to resolve legacy subtable issues.

Thanks,

Robert

> On Jul 15, 2018, at 11:57 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> you are already on v17,
> so the debate should be whether to stick with subtables or reengineer the 
> whole thing using ORDA.

**
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: Linefeed option not working for v16 emails

2018-11-03 Thread Janet Jonas via 4D_Tech
I went to the link Keisuke provided for the bug fix list for v16 since the 
v16.4 release, and I decided to be optimistic and select the last build 
mentioned: 228799.

I installed that and tested emails and it worked for both the Apple Mail and 
for Gmail. I did not want to add a linefeed character myself because I have it 
all over the place, and I sometimes put the same text into 4D text boxes and 
other places and I don't want to work a lot only to create more problems. I 
will be moving this build into our production system now, and I am very 
relieved it worked out.

JJ

> Date: Fri, 2 Nov 2018 11:59:42 -0500
> From: John DeSoi mailto:de...@pgedit.com>>
> To: 4D iNug Technical <4d_tech@lists.4d.com >
> Subject: Re: Linefeed option not working for v16 emails
> 
> I just ran some tests using a web mail program and confirm the issue you 
> reported. I have been using 4D 16 in production since late 2017 and no one 
> has complained, I suppose since most use Apple Mail where everything seems 
> OK. 
> 
> As a work-around, I turned off that default and ensured the body uses CRLF. 
> Seems to work, but not tested extensively.
> 
> 
> C_TEXT($0;$1)
> 
> C_LONGINT($err)
> 
> $err:=SMTP_SetPrefs (0;-1;-1)
> $0:=Replace string($1;CRLF;CR;*)
> $0:=Replace string($0;LF;CR;*)
> $0:=Replace string($0;CR;CRLF;*)
> 
> John DeSoi, Ph.D.
> 
> 
> 
>> On Nov 1, 2018, at 9:25 PM, Janet Jonas via 4D_Tech <4d_tech@lists.4d.com 
>> > wrote:
>> 
>> In any case, like you, I have never used the LF character. However, as soon 
>> as we implemented v16, we started having these issues. We are using a Gmail 
>> hosted mail server, and we do not have these issues when the recipient 
>> receives the email when it is first sent and they have an Apple Mail client, 
>> but it is wrong on our Gmail webmail client, and any users that are not 
>> using Apple Mail have the same problems now.
>> 
>> Quite a mystery. I'm wondering if we can still use the v15 plugin with v16.4 
>> of 4D, I think Keisuke Miyako mentioned this for someone else having issues 
>> with the Internet Commands plugin.
> 
> 

**
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: SET MENU BAR glitch

2018-11-03 Thread Chris Belanger via 4D_Tech
Thank you for your replies, John & Robert.

I created another menu bar that has just the File & Edit menus (which it 
defaults to). Then associated it to the form(s) and the menu system works. it 
is true that the ‘active menu bar’ property needs to be checked and can only be 
if there is an associated menu assigned to the form.

I like the idea of having a ‘menu definition’ subsystem like Robert described. 
I may look into implementing something like that in the future.
Thanks,

Chris

> On Nov 3, 2018, at 7:19 AM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Have you checked the "Active Menu Bar" property on the form? If you don't do 
> that, none of the main menu items will work. I don't think you can check this 
> option unless you specify an appended menu. I always use an empty appended 
> menu.
> 
> John DeSoi, Ph.D.
> 
> 
>> On Nov 3, 2018, at 3:06 AM, Chris Belanger via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> The correct menu bar is used, but not a single option on it works — UNTIL 
>> THE WINDOW IS CLOSED!
> 
> **
> 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 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: SET MENU BAR glitch

2018-11-03 Thread John DeSoi via 4D_Tech
Have you checked the "Active Menu Bar" property on the form? If you don't do 
that, none of the main menu items will work. I don't think you can check this 
option unless you specify an appended menu. I always use an empty appended menu.

John DeSoi, Ph.D.


> On Nov 3, 2018, at 3:06 AM, Chris Belanger via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> The correct menu bar is used, but not a single option on it works — UNTIL THE 
> WINDOW IS CLOSED!

**
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: SET MENU BAR glitch

2018-11-03 Thread Robert McKeever via 4D_Tech
Chris:

Starting in V11, based on the user, I load into the menu bar what is 
applicable. As I recall, I had to send my menu system to tech support, and they 
used it to ‘fix’ some of their menu commands.

I have two tables, one for Menus, and one for the menu items for a given menu. 
So, if the user does not have the security level, some menu items are simply 
not added to the menu bar.

Perhaps a similar approach would work for your forms.

> On Nov 3, 2018, at 1:06 AM, Chris Belanger via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I decided to control which menu bar is active in a process ‘programmatically’ 
> and it doesn’t work.
> 
> Each window is opened in its own process. I have done this for years. It 
> guaranteed a unique ‘variable space’ for each window.
> 
> I formerly had the habit of assigning an “Associated Menu Bar” to each form 
> because that seemed the only way to guarantee a menu bar would work.
> 
> Recently — now that I am using v17 — I decided to clear out the ‘Associated 
> Menu Bar’ value so I could control which menu bar is active programatically. 
> This is because I want the menu bar to depend upon the level of the user.
> 
> Currently, I have a ‘DesignerBar’ and a ‘DispatcherBar’. These both work 
> great if ‘Associated Menu Bar’ is used.
> 
> However, when it is not, 4D totally ignores any menu choice made until the 
> window [in its own process] is closed.
> 
> ——
> 
> in the Form’s ON LOAD event, I am callingSET MENU BAR(1) or (2). using 
> (1;*) or (2;*) does not help.
> 
> The correct menu bar is used, but not a single option on it works — UNTIL THE 
> WINDOW IS CLOSED!
> 
> Seems like an atrocious bug.
> 
> Any suggestions?
> 
> Should have been very simple, but...
> 
> Thanks for any help,
> 
> Chris
> 
> 
> **
> 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
> **

_
Bob McKeever  http://www.mswl.com 
McKeever's Software Wizardry
Port Coquitlam, B.C.
bobmckee...@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
**

SET MENU BAR glitch

2018-11-03 Thread Chris Belanger via 4D_Tech
I decided to control which menu bar is active in a process ‘programmatically’ 
and it doesn’t work.

Each window is opened in its own process. I have done this for years. It 
guaranteed a unique ‘variable space’ for each window.

I formerly had the habit of assigning an “Associated Menu Bar” to each form 
because that seemed the only way to guarantee a menu bar would work.

Recently — now that I am using v17 — I decided to clear out the ‘Associated 
Menu Bar’ value so I could control which menu bar is active programatically. 
This is because I want the menu bar to depend upon the level of the user.

Currently, I have a ‘DesignerBar’ and a ‘DispatcherBar’. These both work great 
if ‘Associated Menu Bar’ is used.

However, when it is not, 4D totally ignores any menu choice made until the 
window [in its own process] is closed.

——

in the Form’s ON LOAD event, I am callingSET MENU BAR(1) or (2). using 
(1;*) or (2;*) does not help.

The correct menu bar is used, but not a single option on it works — UNTIL THE 
WINDOW IS CLOSED!

Seems like an atrocious bug.

Any suggestions?

Should have been very simple, but...

Thanks for any help,

Chris


**
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
**