Date   

Re: XPA - loading image button from client

Philip Lambrecht <philip@...>
 

Thanks so much for all this info ... I will try it out and let you know

Kind regards

Philip


Re: XPA - loading image button from client

Frederik Soete
 

Hi Filip,

The company where I am employed has created a few Android/IOS apps (rich client). We have image buttons that work in these apps. We too download them on app initialization.

Perhaps the following suggestions might work for your image buttons:

- Convention: when indicating folder names, we use a final backslash, e.g. 'c:\projectdir\images\'.

- Our project folder (e.g. 'c:\projectdir\', where the source would be located) contains a subfolder 'images\'.
- Suppose we have an image 'logo.jpg' inside this 'images\' subfolder. This could be a 4/6-state button image (depending on the INI settings).

- When starting the app (inside an offline start program) we try to download this image using ServerFileToClient('images\logo.jpg'). This works if the app is really online after all.
- Notice I have not added the 'c:\projectdir\' part. That is not necessary because our 'images\' directory is located directly inside the project directory.
- The backslash may be translated to some other character on the client (e.g. an underscore). This does not matter: in our buttons we still refer to the image with the backslash character.
- Notice we prefer lowercase letters to avoid uppercase/lowercase conversion issues. Windows / Android / IOS all have different rules regarding the case of letters. It is best not to complicate things by using mixed case.

- When we create an image button, we set the image list file name to that same relative path 'images\logo.jpg'.
- Attached to this same image button, we have a virtual, with an init expression equal to the same relative path 'images\logo.jpg'.

- If you do not see this image on the button in development, perhaps start the studio with an additional INI setting: /[MAGIC_LOGICAL_NAMES]WorkingDir = *c:\projectdir\
- This additional INI setting is not necessary when deploying in production, if the 'images\' subfolder is located in the deployed project directory (where we put our cabinet file).

Hope this helps to simplify the issue in some way...

Frederik Soete.


Re: XPA - loading image button from client

Tim Downie
 

Long ago we had image buttons with ria....from memory we had a url to the image  http://server/images/button.png
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Philip Lambrecht <philip@...>
Sent: Tuesday, 27 June 2017 7:03:30 AM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] XPA - loading image button from client
 

Thanks Govert,

 

Yes, I am using RIA.

 

I copy the image to the client using the serverfiletoclient function and return the result into the path for the image string.

 

When I use this string (have checked it is correct) for the image button, the image does not display.

 

Any thoughts …

 

Many thanks

 

Philip

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Govert Schipper
Sent: Tuesday, June 27, 2017 8:48 AM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] XPA - loading image button from client

 

Hi Philip,

 

Are you using RIA? In that case I don know, since I haven't used it (yet).

For in regular client/server runtime it shouldn't matter where the image is stored, as long as the path is valid and accessable to the client.

 

Govert

 


Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens Philip Lambrecht <philip@...>
Verzonden: maandag 26 juni 2017 16:17
Aan: main@magicu-l.groups.io
Onderwerp: [magicu-l] XPA - loading image button from client

 

Hi All,

 

Does anyone know if it is possible to load an image button from the client and not the server ? It works fine with normal images but I can’t see if it is possible with image buttons….

 

Many thanks

 

Philip

 

Philip Lambrecht

 

 


Re: XPA - loading image button from client

Philip Lambrecht <philip@...>
 

Thanks Govert,

 

Yes, I am using RIA.

 

I copy the image to the client using the serverfiletoclient function and return the result into the path for the image string.

 

When I use this string (have checked it is correct) for the image button, the image does not display.

 

Any thoughts …

 

Many thanks

 

Philip

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Govert Schipper
Sent: Tuesday, June 27, 2017 8:48 AM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] XPA - loading image button from client

 

Hi Philip,

 

Are you using RIA? In that case I don know, since I haven't used it (yet).

For in regular client/server runtime it shouldn't matter where the image is stored, as long as the path is valid and accessable to the client.

 

Govert

 


Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens Philip Lambrecht <philip@...>
Verzonden: maandag 26 juni 2017 16:17
Aan: main@magicu-l.groups.io
Onderwerp: [magicu-l] XPA - loading image button from client

 

Hi All,

 

Does anyone know if it is possible to load an image button from the client and not the server ? It works fine with normal images but I can’t see if it is possible with image buttons….

 

Many thanks

 

Philip

 

Philip Lambrecht

 

 


Re: XPA - loading image button from client

Govert Schipper
 

Hi Philip,


Are you using RIA? In that case I don know, since I haven't used it (yet).

For in regular client/server runtime it shouldn't matter where the image is stored, as long as the path is valid and accessable to the client.


Govert




Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens Philip Lambrecht <philip@...>
Verzonden: maandag 26 juni 2017 16:17
Aan: main@magicu-l.groups.io
Onderwerp: [magicu-l] XPA - loading image button from client
 

Hi All,

 

Does anyone know if it is possible to load an image button from the client and not the server ? It works fine with normal images but I can’t see if it is possible with image buttons….

 

Many thanks

 

Philip

 

Philip Lambrecht

 

 


Re: How to determine if a record has change?

Florian Groothuis
 

I wanna jump in on this one:

 

I never use DirDlg() or FileDlg directly on a variable but always an extra variable. If you do an update on a variable with DirDlg() and the user presses ‘Cancel’ the original value will be gone and the variable will be empty. I use an extra variable, update that one with the DirDlg() and if not empty than update the original variable with that value. And no, RS is not triggered.

 

Florian

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Wes Hein
Verzonden: dinsdag 27 juni 2017 0:06
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] How to determine if a record has change?

 

One thing to remember though is that Magic must sense that the user made a change for the viewmod() or record suffix to fire.  So lets say you use the DirDlg function to update a field and the user initiates no other input, the record suffix will not fire.  In those cases if the folder variable is 'DA' I add a DA<>VarPrev('DA'VAR) in the Force record suffix setting in the Task Properties.

Wes

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer



Re: How to determine if a record has change?

Wes Hein
 

One thing to remember though is that Magic must sense that the user made a change for the viewmod() or record suffix to fire.  So lets say you use the DirDlg function to update a field and the user initiates no other input, the record suffix will not fire.  In those cases if the folder variable is 'DA' I add a DA<>VarPrev('DA'VAR) in the Force record suffix setting in the Task Properties.

Wes


XPA - loading image button from client

philip@...
 

Hi All,

 

Does anyone know if it is possible to load an image button from the client and not the server ? It works fine with normal images but I can’t see if it is possible with image buttons….

 

Many thanks

 

Philip

 

Philip Lambrecht

 

 


Re: Get.DLL Get.Set_Enter

Frederik Soete
 

Hi Heidi,

I have passed along your message of gratitude to my employer.

If you do encounter some issues or shortcomings, or if you have suggestions or improvements, please let me know via the group. I too have still much to learn.

Bye,

Frederik Soete.


Re: Get.DLL Get.Set_Enter

Heidi Schuppenhauer
 

Thank you thank you thank you! Tell your employer I owe him one!  

Whether or not it works in production, I am very sure I'll learn extremely useful information about how all this works.Which is how they say, "priceless".

Heidi.Schuppenhauer


 

On Sun, Jun 25, 2017 at 11:34 PM, Frederik Soete <frederik.soete@...> wrote:

Hi, Heidi,

 

My employer has gratiously given his OK for sharing this snippet, which enables turning on and off a keyboard message filter that replaces keyboard ENTER by TAB. It is best to add this code to a program containing an inputparameter ‘PI_ACTIVE’ (logical), and to call the invoked .Net code using a function name ‘SetEnterTabActive’ (instead of the generic ‘func’), and to pass along the inputparameter ‘PI_ACTIVE’ as the DotNet argument ‘active’. When called with a true value, a keyboard message filter is applied to the whole Magic Runtime. When called with a false value, the keyboard message filter is removed again. However you have used it in runtime, I recommend you still disable the message filter in development when returning from runtime: i.e. you’d best call the code with a false value from the Task Suffix of the Main Program; if for any reason the filter is not deactivated when returning from runtime to development, it is possible that a subsequent run of the same project will still have the message filter active, without any way of disabling it during runtime.

 

using System;

using F = System.Windows.Forms;

 

public static class Snippet

{

      public static void SetEnterTabActive(System.Boolean active)

      {

            F.Application.RemoveMessageFilter(ETMF);

            if (active) {

                  F.Application.AddMessageFilter(ETMF);

            }

      }

      static EnterTabMessageFilter ETMF = new EnterTabMessageFilter();

      public class EnterTabMessageFilter : F.IMessageFilter {

            public bool PreFilterMessage(ref F.Message m) {

                  if (m.Msg == 0x0100) {

                        /* KEY DOWN */

                        if ((m.LParam.ToInt32() & 0x01000000) != 0) {

                             /* NUMERIC KEY PAD */

                             if (m.WParam.ToInt32() == (int)F.Keys.Enter) {

                                   /* ENTER KEY */

                                   F.SendKeys.Send("{TAB}");

                                   return true;

                             }

                        }            

                  }

                  return false;

            }

    }

}

 

This code does not come with a warranty. I do recommend testing the code for your use cases, and if necessary, change it to suit your needs. The code I supplied has not really been vetted by anyone else but me. But I do hope it works for you.

 

Bye,

 

Frederik Soete

 

 


Op 17 jun. 2017 20:08 schreef "Heidi Schuppenhauer" <heidis13@...>:
Thanks Frederik.

My research said about the same: it CAN be done in .Net but it's in fact rather hairy! And given that I couldn't even figure out the task bar I have a ways to go with .Net! If you do get permission to publish it, it will help a lot of people!

I'm kind of wondering though if it should be handled at the Magic level. There is already a keyboard translation table. The only issue with it is that it does not differentiate between the normal Enter key and the numeric Enter key. But they likely have two different codes when they are accepted by Magic?


Heidi.Schuppenhauer


 

On Sat, Jun 17, 2017 at 7:20 AM, Frederik Soete <frederik.soete@...> wrote:
Hi, Heidi,

In the place I am employed, we are currently looking into transferring from eDeveloper v.9 to XPA, and I have researched some alternatives to get.dll functionality. Some things, like colour buttons have a straightforward XPA translation: XPA supports colour buttons in itself, so it is a no-brainer. But this one function, changing the ENTER key to TAB, is possible, I have found, but only with some very *hairy* Dot Net code, which I cannot access at the present, for I am on holiday for a week. I would still have to ask my employer for permission to share the intricate snippet. I may perhaps deliver the code, but I am sorry I cannot make any promises. I can still refer my employer to the fact we frequently used get.dll which was also "donated to the Magic community". For now I can only state it definitely IS possible.

Now for the method I followed, and the few details I remember without access to the code and the correct terminology. As I recall, it is possible to intercept some keypresses via Dot Net and substitute another keycode for these. At the time of coding I found different sites via google, which when creatively combined led to the complete solution. The solution needed an on/off switch, to be toggled whenever during runtime, and to be turned off at logging off (needed for the development environment). The on/off switch was implemented as a 'static' variable. The 'keypress code' added some event listener (only on first execution) which intercepted the ENTER key, and turned ENTER into TAB but only when the switch was activated. The only drawback is in development you have to remember to switch it off in Main Program Task suffix so as not to let it interfere with the next execution of the runtime, when a new event listener is registered. (I did not figure out how to unregister such an event listener, so the on/off switch is a good substitute.)

Bye.

Frederik Soete




Re: How to determine if a record has change?

Florian Groothuis
 

If a virtual has changed which is part of the dataview the RS is also processed. Using VarMod let’s you determine whát has changed.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer


Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Govert Schipper
Verzonden: maandag 26 juni 2017 9:05
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] How to determine if a record has change?

 

Hi,

 

In Online Task the Record Suffix is only processed when something was changed in the dataview record.

(Or when Selection Table=Yes and the user pressed Enter/Select)

So maybe in your situation you don't have to use ViewMod.

 

Govert


Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens iluvmagic@... <iluvmagic@...>
Verzonden: zondag 25 juni 2017 04:49
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] How to determine if a record has change?

 

On Sat, Jun 24, 2017 at 06:32 pm, Steven Blank wrote:

ViewMod

Thank you. That's it.


Re: How to determine if a record has change?

Govert Schipper
 

Hi,


In Online Task the Record Suffix is only processed when something was changed in the dataview record.

(Or when Selection Table=Yes and the user pressed Enter/Select)

So maybe in your situation you don't have to use ViewMod.


Govert


Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens iluvmagic@... <iluvmagic@...>
Verzonden: zondag 25 juni 2017 04:49
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] How to determine if a record has change?
 
On Sat, Jun 24, 2017 at 06:32 pm, Steven Blank wrote:
ViewMod
Thank you. That's it.


Re: Get.DLL Get.Set_Enter

Frederik Soete
 

Hi, Heidi,

 

My employer has gratiously given his OK for sharing this snippet, which enables turning on and off a keyboard message filter that replaces keyboard ENTER by TAB. It is best to add this code to a program containing an inputparameter ‘PI_ACTIVE’ (logical), and to call the invoked .Net code using a function name ‘SetEnterTabActive’ (instead of the generic ‘func’), and to pass along the inputparameter ‘PI_ACTIVE’ as the DotNet argument ‘active’. When called with a true value, a keyboard message filter is applied to the whole Magic Runtime. When called with a false value, the keyboard message filter is removed again. However you have used it in runtime, I recommend you still disable the message filter in development when returning from runtime: i.e. you’d best call the code with a false value from the Task Suffix of the Main Program; if for any reason the filter is not deactivated when returning from runtime to development, it is possible that a subsequent run of the same project will still have the message filter active, without any way of disabling it during runtime.

 

using System;

using F = System.Windows.Forms;

 

public static class Snippet

{

      public static void SetEnterTabActive(System.Boolean active)

      {

            F.Application.RemoveMessageFilter(ETMF);

            if (active) {

                  F.Application.AddMessageFilter(ETMF);

            }

      }

      static EnterTabMessageFilter ETMF = new EnterTabMessageFilter();

      public class EnterTabMessageFilter : F.IMessageFilter {

            public bool PreFilterMessage(ref F.Message m) {

                  if (m.Msg == 0x0100) {

                        /* KEY DOWN */

                        if ((m.LParam.ToInt32() & 0x01000000) != 0) {

                             /* NUMERIC KEY PAD */

                             if (m.WParam.ToInt32() == (int)F.Keys.Enter) {

                                   /* ENTER KEY */

                                   F.SendKeys.Send("{TAB}");

                                   return true;

                             }

                        }            

                  }

                  return false;

            }

    }

}

 

This code does not come with a warranty. I do recommend testing the code for your use cases, and if necessary, change it to suit your needs. The code I supplied has not really been vetted by anyone else but me. But I do hope it works for you.

 

Bye,

 

Frederik Soete

 

 


Op 17 jun. 2017 20:08 schreef "Heidi Schuppenhauer" <heidis13@...>:

Thanks Frederik.

My research said about the same: it CAN be done in .Net but it's in fact rather hairy! And given that I couldn't even figure out the task bar I have a ways to go with .Net! If you do get permission to publish it, it will help a lot of people!

I'm kind of wondering though if it should be handled at the Magic level. There is already a keyboard translation table. The only issue with it is that it does not differentiate between the normal Enter key and the numeric Enter key. But they likely have two different codes when they are accepted by Magic?


Heidi.Schuppenhauer


 

On Sat, Jun 17, 2017 at 7:20 AM, Frederik Soete <frederik.soete@...> wrote:
Hi, Heidi,

In the place I am employed, we are currently looking into transferring from eDeveloper v.9 to XPA, and I have researched some alternatives to get.dll functionality. Some things, like colour buttons have a straightforward XPA translation: XPA supports colour buttons in itself, so it is a no-brainer. But this one function, changing the ENTER key to TAB, is possible, I have found, but only with some very *hairy* Dot Net code, which I cannot access at the present, for I am on holiday for a week. I would still have to ask my employer for permission to share the intricate snippet. I may perhaps deliver the code, but I am sorry I cannot make any promises. I can still refer my employer to the fact we frequently used get.dll which was also "donated to the Magic community". For now I can only state it definitely IS possible.

Now for the method I followed, and the few details I remember without access to the code and the correct terminology. As I recall, it is possible to intercept some keypresses via Dot Net and substitute another keycode for these. At the time of coding I found different sites via google, which when creatively combined led to the complete solution. The solution needed an on/off switch, to be toggled whenever during runtime, and to be turned off at logging off (needed for the development environment). The on/off switch was implemented as a 'static' variable. The 'keypress code' added some event listener (only on first execution) which intercepted the ENTER key, and turned ENTER into TAB but only when the switch was activated. The only drawback is in development you have to remember to switch it off in Main Program Task suffix so as not to let it interfere with the next execution of the runtime, when a new event listener is registered. (I did not figure out how to unregister such an event listener, so the on/off switch is a good substitute.)

Bye.

Frederik Soete



Re: How to determine if a record has change?

iluvmagic@...
 

On Sat, Jun 24, 2017 at 06:32 pm, Steven Blank wrote:
ViewMod
Thank you. That's it.


Re: How to determine if a record has change?

Steven Blank
 

I believe what you're looking for are the VarMod() and ViewMod() functions.

Steve Blank


At 04:17 PM 6/24/2017, iluvmagic@... wrote:
Hey guys. Just want to ask how can I determine if the record has change in an Online Task? I need it for an audit trail. I know I need to update my UpdateDate, UpdateTime and user in my record suffix but I just don't know how to get the condition forthe change. Hopefully you can help me out. TY


How to determine if a record has change?

iluvmagic@...
 

Hey guys. Just want to ask how can I determine if the record has change in an Online Task? I need it for an audit trail. I know I need to update my UpdateDate, UpdateTime and user in my record suffix but I just don't know how to get the condition forthe change. Hopefully you can help me out. TY



Re: Ria offline mobile problem

Todd Baremore
 

Brendan,

Glad to help.  Best of luck with your Android endeavors.

Todd


On 6/20/2017 12:32 PM, Bren607 wrote:
Hi Todd,
Many , many thanks for the notes on installing/configuring Java and the Android SDK. 
I think it would have taken me a month of Sundays to get the RIA Deploment builder to successfully create an APK without them. 

Hi Lawence,

Welcome to the party albeit a bit late. What does you cute offline application do, may I ask? 

BrendaN


Re: Instructor for Magic 3.2

goupte@...
 
Edited

You Can download toturial of Xpa in this link:

https://www.magicsoftware.com/download-self-paced-courses

David


Instructor for Magic 3.2

Dmichel@...
 

Hi I'm interested in finding a tutor for Magic. If you are an experienced developer and would like to make extra money,  I could use a patient teacher for myself. Please let me know if you are interested.  I can pay you via PayPal.com


Re: SQL Range with Inner Join - uniPaaS 1.9

Lado Wali
 

Ok yes I tried outer join and it works.

Thanks
Lado


On Jun 22, 2017 1:56 AM, "Florian Groothuis" <f.groothuis@...> wrote:

What are you trying to achieve? You can also use Outer Join instead of Inner Join.

 

Van: main@magicu-l.groups.io [mailto:main@....io] Namens Lado Wali
Verzonden: woensdag 21 juni 2017 22:56
Aan: main@magicu-l.groups.io
Onderwerp: [magicu-l] SQL Range with Inner Join - uniPaaS 1.9

 

Hi Group,

 

I want to do sql range on one of my online program with the help of Link Inner Join but with condition. Is there any way I can use Link Inner Join with condition?

 

Thanks

Lado

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer


10901 - 10920 of 196084