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
toggle quoted messageShow quoted text
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@...>
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@...>
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?
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
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.
|
||||
|
||||
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".
On Sun, Jun 25, 2017 at 11:34 PM, Frederik Soete <frederik.soete@...> wrote:
|
||||
|
||||
Re: How to determine if a record has change?
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.
Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io]
Namens 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@...>
On Sat, Jun 24, 2017 at 06:32 pm, Steven Blank wrote:
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. 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:
ViewModThank 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@...>:
|
||||
|
||||
Re: How to determine if a record has change?
iluvmagic@...
On Sat, Jun 24, 2017 at 06:32 pm, Steven Blank wrote:
ViewModThank you. That's it.
|
||||
|
||||
Re: How to determine if a record has change?
I believe what you're looking for are the VarMod() and ViewMod()
functions.
toggle quoted messageShow quoted text
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,
|
||||
|
||||
Re: Instructor for Magic 3.2
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:
|
||||
|