Re: Programmatically change the background image in the Application Window

2017-12-18 Thread Eric Naujock via 4D_Tech
Thanks for that tip. I played a bit with that and I now have a basic form 
running in the Application window. Since I have started refactoring my code to 
start using CALL FORM and CALL WORKER. This gives a very interesting option. 

I will continue to play with this to see if I can get some more fun with this. 

I do have another question about Server to Client communication using the CALL 
WORKER and CALL FROM methods. Should I start another thread or are there more 
notes about this idea. I have a basic setup running client side and I have done 
a bit of looking at processes but have not pieced it together. If somebody has 
already done this then it would help clarify options.
---

MacCafe
7860 Central Ave.
Toledo, OH 43617
Eric Naujock  -  ACSA 10.2, 10.3, 10.4 Apple - ACTC 10.5, 10.6, 10.7, 10.8, 
10.9, 10.10 ACSP 10.11, 10.12
http://www.mac-cafe.com
email: e r...@mac-cafe.com 
AOL IM: erlic






> On Dec 18, 2017, at 9:55 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hello,
> 
> if you hide the application splash window then you should open a dialog 
> window by code.
> 
> if you don't open a dialog window by code, the user might get the impression 
> that the startup procedure is taking long, just as you describe.
> 
> the splash window is running in the application process, so you can simply 
> call DIALOG (without opening a new window) in your on startup code if you 
> want to display a different form.
> 
> after that, you can use CALL FORM or CALL WORKER to update it as a status 
> window.
> 
> see also:
> 
> http://kb.4d.com/assetid=75247
> 
> 2017/12/19 10:56、Eric Naujock > 
> のメール:
> Yes I read the page you mentioned before I posted, But that page assumes that 
> we are using the menu bars in the menu items. I am using the menu commands to 
> build and present my menu bars. There does not seem to be a command line 
> option to accomplish that. There is no mention of this in the manual. I also 
> read though the other page about hading the Application window. This is what 
> I had turned off before. Except that this sometimes confuses my users as they 
> start the program and wait for it to start since without the Application 
> window it runs and they get the menu bar.
> If I could assign a image to the Application menu that this could be a neat 
> way to create a status page by generating a SVG image and the pushing it to 
> the Application window.
> 
> 
> 
> **
> 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
> **

**
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: Programmatically change the background image in the Application Window

2017-12-18 Thread Eric Naujock via 4D_Tech
Good evening,
Yes I read the page you mentioned before I posted, But that page 
assumes that we are using the menu bars in the menu items. I am using the menu 
commands to build and present my menu bars. There does not seem to be a command 
line option to accomplish that. There is no mention of this in the manual. I 
also read though the other page about hading the Application window. This is 
what I had turned off before. Except that this sometimes confuses my users as 
they start the program and wait for it to start since without the Application 
window it runs and they get the menu bar. 

If I could assign a image to the Application menu that this could be a 
neat way to create a status page by generating a SVG image and the pushing it 
to the Application window. 
---

MacCafe
7860 Central Ave.
Toledo, OH 43617
Eric Naujock  -  ACSA 10.2, 10.3, 10.4 Apple - ACTC 10.5, 10.6, 10.7, 10.8, 
10.9, 10.10 ACSP 10.11, 10.12
http://www.mac-cafe.com
email: e r...@mac-cafe.com 
AOL IM: erlic






> On Dec 18, 2017, at 5:20 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
>> Is there a way to from within code of a database change the background 
>> graphic for the 4D application window?
>> Or is there something else that can be done with it other than show a static 
>> picture or the 4D logo?
> 
> take a look at the documentation:
> 
> http://doc.4d.com/4Dv16R4/4D/16-R4/Managing-menu-bars.300-3330257.en.html
> 
>> Right now it just seems like a big waste of pixels. It seems like it wants 
>> to have a background image that is stuck in the application.
> 
> the splash window give the application process a tangible UI.
> without it, the user can't won't be able activate that process.
> you could consider it a legacy from when 4D used to be a single process 
> application.
> 
> but you don't have to use it if you have code to manage your own UI.
> 
> http://doc.4d.com/4Dv16R4/4D/16-R4/Interface-page.300-3330209.en.html
> 
> 
> 
> **
> 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
> **

**
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: Programmatically change the background image in the Application Window

2017-12-18 Thread Keisuke Miyako via 4D_Tech
> Is there a way to from within code of a database change the background 
> graphic for the 4D application window?
> Or is there something else that can be done with it other than show a static 
> picture or the 4D logo?

take a look at the documentation:

http://doc.4d.com/4Dv16R4/4D/16-R4/Managing-menu-bars.300-3330257.en.html

> Right now it just seems like a big waste of pixels. It seems like it wants to 
> have a background image that is stuck in the application.

the splash window give the application process a tangible UI.
without it, the user can't won't be able activate that process.
you could consider it a legacy from when 4D used to be a single process 
application.

but you don't have to use it if you have code to manage your own UI.

http://doc.4d.com/4Dv16R4/4D/16-R4/Interface-page.300-3330209.en.html



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

Programmatically change the background image in the Application Window

2017-12-18 Thread Eric Naujock via 4D_Tech
Good afternoon,
Is there a way to from within code of a database change the background 
graphic for the 4D application window? Or is there something else that can be 
done with it other than show a static picture or the 4D logo?
If there was a way to change the image it would be useful to put status 
information into a png in the window and make some use of it. Right now it just 
seems like a big waste of pixels. It seems like it wants to have a background 
image that is stuck in the application.
I have seen how to turn it off but sometimes I know it just shows back 
up again. Rare but still close a dialog and up it pops.

---

MacCafe
7860 Central Ave.
Toledo, OH 43617
Eric Naujock  -  ACSA 10.2, 10.3, 10.4 Apple - ACTC 10.5, 10.6, 10.7, 10.8, 
10.9, 10.10 ACSP 10.11, 10.12
http://www.mac-cafe.com
email: e r...@mac-cafe.com 
AOL IM: erlic






**
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: Menus and components

2017-12-18 Thread Tim Nevels via 4D_Tech
On Dec 18, 2017, at 2:00 PM, Jeremy Roussak wrote:

> Your last line is the key: according to the documentation, nothing has 
> changed, but when I run the code, everything has changed.
> 
> So it seems that if I want to have component display a form while keeping the 
> host’s menus visible and working, I must create all the host’s menus using 
> code rather than using the toolbox Menu editor.
> 
> Can that really be right?

I’ve done some work with components that have forms and their own menu bar. It 
is a tricky area for sure. 

One problem I ran into was from the component I wanted to open a window, use 
DIALOG command and to have a custom menu bar for this new window. So from the 
host I would start a new process and then call a component method that would do 
this work. 

This is running in a new process, but the method “ShowEditor” is from the 
component and it is of course shared so it can be called fro the host. Here is 
sample code:

SET MENU BAR(“Editor Menu”)
OPEN WINDOW
DIALOG

This worked fine form some host database, but other it didn’t work. The menu 
bar was screwed up. I finally figured out what was going and how to fix it. 

The problem was SET MENU BAR command using a menu bar name for a menu created 
in Design in the Toolbox. Even though I was referencing it by name it was still 
internally somehow referencing the menu bar number. So if the host had a menu 
bar with the same number “Editor Menu” in the component database there were 
problems. 

One workaround was to create many many dummy menu bars in the component from 
the Toolbox. I needed to get the menu bar number high enough so it would not 
have a conflict with any menu bars in the host database. That worked, but was a 
big pain-in-the-ass because I use a lot of menu bars in my applications and all 
created with the Toolbox. So I had to create like 50 blank menu bars in the 
component to make this work. 

Then I got the idea to do this:

C_TEXT($menuRef_t)
$menuRef_t:=Create menu(“Editor Menu")
SET MENU BAR($menuRef_t)

Problem solved. No need to create dummy menu bars in the component. 

So maybe you could use this technique for your application. Create the menu in 
the host and get a $menuRef_t. Then pass $menuRef_t to your component. From the 
component context you do SET MENU BAR($menuRef_t). I think $menuRef_t is sort 
of like a pointer or a memory location reference. So that would allow you to 
share a menubar from the host, created in the toolbox, with a component. 

Tim


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


**
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: Menus and components

2017-12-18 Thread Jeremy Roussak via 4D_Tech
Miyako,

You’re quite right: the documentation is clear. However, it was every bit as 
clear in v14, and what I am doing worked.

I’m not being quite as naughty as you might think. My main host database 
handles my practice (I’m a lawyer). It has a self-contained unit within it 
which displays a dialog and does various semi-complex calculations that people 
like me find useful. It doesn’t interact in any way with any other part of the 
database and doesn’t use any of its tables. 

Colleagues saw it and thought it would be useful for them, so I hived it off 
into a component. I can build that component into a very simple shell, which 
offers just the calculator, and give it to them; and I can continue to include 
it as a module in my main application. I can develop it in only one place, 
which is handy.

It doesn’t need any of the host menus to be available. It’s just desirable that 
all the host menus are in fact available.

As John DeSoi has pointed out, it is in fact still possible to do what I want 
to do in the way he suggests: get the host to install the menu bar via a 
callback and make sure that any method identified in the menu editor is flagged 
as shared. Thanks, John!

Jeremy


Jeremy Roussak
j...@mac.com



> On 18 Dec 2017, at 00:44, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> The form was set in v14 to have an active menu bar, called “Main”. The 
>> component doesn’t have a menu bar “Main” but each parent application does.
> 
> I am surprised that this even worked.
> 
> the documentation is quite clear that menu bars created vis the Tool Box Menu 
> Editor are not shared,
> so the activate menu bar of a component form can only be loaded from its own 
> stock of menu bars.
> 
> if I needed a generic component dialog that "inherits" the host's menu bar,
> I would call SET MENU BAR in the host context before calling the component's 
> dialog method,
> or else Get/SET the menu bar in the form's On Load event.
> 
> it simply feels wrong for a component to expect a specific menu bar name in 
> its property list.
> such implicit linkage, even if it worked, should be discouraged.
> the active menu bar of a component should be a menu available locally, or 
> else undefined.
> 
> if it "stopped working" then it sounds like a bug fix.

**
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: [off] File will not open in excel

2017-12-18 Thread Tim Nevels via 4D_Tech
On Dec 17, 2017, at 2:00 PM, Tom Dillon wrote:

> Tim Nevels via 4D_Tech wrote:
> 
>> I'm guessing this as a feature requested by the corporate IT types long
>> ago so they could dump out data from databases in text format and have
>> their users easily open them in Excel. 
>> 
>> It macOS version of Excel used to do this but it appears they have
>> removed that feature. 
> 
> It was removed from Mac Excel by request of Windows IT departments.

I always appreciate your humor. :)

You planning on coming to Washington DC for 4D Summit 2018? It would be great 
to see you again and enjoy your humor in person. 

Tim


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


**
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: Menus and components

2017-12-18 Thread John DeSoi via 4D_Tech
I just realized I left out a key detail. Whenever I was mixing host and 
component menus on the same menu bar, 4D would crash when I quit. I solved this 
by duplicating the host menu in code before appending the component menus. This 
is probably why all the host methods must be shared.

John DeSoi, Ph.D.


> On Dec 18, 2017, at 7:59 AM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> This is working for me in version 16 (16.3). I set the main menu bar with a 
> callback to the host. Then the component appends some additional menus 
> created in the component to the host main menu. The appended menus are 
> created with code. The component form has a completely empty menu associated 
> with it and "Active Menu Bar" checked.
> 
> I just noticed that even though the component called the host to set the main 
> menubar, all of the host menu methods must have the "Shared" property set for 
> the menu item to work. I get a error that the method is not found otherwise.

**
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: Menus and components

2017-12-18 Thread John DeSoi via 4D_Tech


> On Dec 17, 2017, at 1:01 PM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> In v16, things have changed. The parent menu bar doesn’t appear; and if I 
> make it appear, by supplying a callback routine in the parent which calls SET 
> MENU BAR(“Main”), while the menu bar and its associated menus do appear, 
> nothing happens when I select anything.

This is working for me in version 16 (16.3). I set the main menu bar with a 
callback to the host. Then the component appends some additional menus created 
in the component to the host main menu. The appended menus are created with 
code. The component form has a completely empty menu associated with it and 
"Active Menu Bar" checked.

I just noticed that even though the component called the host to set the main 
menubar, all of the host menu methods must have the "Shared" property set for 
the menu item to work. I get a error that the method is not found otherwise.

John DeSoi, Ph.D.


**
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: Microsoft Outlook Integration

2017-12-18 Thread Douglas Cryer via 4D_Tech
Tim,

I have some code that I think does what you are asking for.  Essentially I have 
written some methods that execute VBScript for Windows and Applescript for Ma.  
This supports calling Outlook on both platforms and Mail on Mac to send emails. 
 It also gets the list of email accounts from the users outlook/mail so you can 
do a popup in your interface.

I have not done this in a component or anything so it will take an hour or so 
to pull it out and give it to you in a form that will make sense.

Let me know if this is of interest.

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com   Web : 
http://www.telekinetix.com 


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