Jump to content

petermm

Members
  • Content Count

    53
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by petermm

  1. petermm

    FinalizeObject seems not to fire

    It seems that in my project FinalizeObject for my MainForm never fires. What can be the reason? Is there an another place to dispose central resources? In Delphi I would do that at FormClose, but SMS Forms didn’t have this event.
  2. petermm

    RTL Class Browser stays empty

    After updating an older version of SMS to build 3.0.2.20 the RTL Class Browser Tool pops up empty. What can I do to make it work?
  3. petermm

    RTL Class Browser stays empty

    Finally it works. Must have to do something with the ShortCut. Starting SmartUpdate via commandline is OK.
  4. petermm

    RTL Class Browser stays empty

    Works partly: First SmartUpdate.exe updates and restarts itself – without command line parameter I guess. At least there is no “development” channel option (only MASTER, ALPHA and BETA). After choosing MASTER the SMS install itself runs as expected. The RTL class browser works. Unfortunately a fresh start of SmartUpdate.exe /changechannel /showhidden fails It pops up in full screen mode showing an partly initialized main form. BTW: What is the C:\ProgramData\ path SMS will use? Is there a prove to ensure it contains the current RTL copy?
  5. petermm

    RTL Class Browser stays empty

    I've found the following: d:\Smart Mobile Studio\RTL\ C:\ProgramData\The Smart Company\Smart Mobile Studio\RTL\ C:\ProgramData\Optimale Systemer AS\Smart Mobile Studio\ -> NO RTL Folder I've tried to copy the RTL Folder to C:\ProgramData\Optimale Systemer AS\Smart Mobile Studio\ but no success (tried both)
  6. petermm

    RTL Class Browser stays empty

    Did not help Maybe it's due to the fact that my installation path is not c:\... but D:\ SMART MOBILE STUDIO ?
  7. petermm

    Shortcut already exists.

    Txs wareleyalex - seems to help
  8. petermm

    Shortcut already exists.

    Almost every time I change the IDE tab to work at a different unit I get an “Shortcut already exists” error. While it is possible to ignore this error, it inconvenient an nasty. I remember, that this was a problem with some older versions as well. Am I the only one having this problem? The call stack always looks like that: EurekaLog 6.1.04 Call Stack Information: -------------------------------------------------------------------------------------------------------------------------------------------------------------- |Address |Module |Unit |Class |Procedure/Method |Line | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |*Exception Thread: ID=11120; Priority=0; Class=; [Main] | |------------------------------------------------------------------------------------------------------------------------------------------------------------| |00B4E19E|SmartMS.exe |SynEditKeyCmds.pas |TSynEditKeyStroke |SetShortCut |560[8] | |00B4E138|SmartMS.exe |SynEditKeyCmds.pas |TSynEditKeyStroke |SetShortCut |552[0] | |00CB3224|SmartMS.exe |SynEditPlugins.pas |TAbstractSynHookerPlugin |HookEditor |328[27] | |00CB3134|SmartMS.exe |SynEditPlugins.pas |TAbstractSynHookerPlugin |HookEditor |301[0] | |00CB4EB5|SmartMS.exe |SynMacroRecorder.pas |TCustomSynMacroRecorder |DoAddEditor |412[1] | |00CB2F7C|SmartMS.exe |SynEditPlugins.pas |TAbstractSynPlugin |AddEditor |204[13] | |00CB2F30|SmartMS.exe |SynEditPlugins.pas |TAbstractSynPlugin |AddEditor |191[0] | |00CB30A1|SmartMS.exe |SynEditPlugins.pas |TAbstractSynPlugin |SetEditor |264[7] | |00CB3058|SmartMS.exe |SynEditPlugins.pas |TAbstractSynPlugin |SetEditor |257[0] | |01030769|SmartMS.exe |Smart.IDE.Main.pas |TFormMain |PagesChange |2100[34]| |734F366D|gdi32full.dll| | |SelectClipRgnImpl | |
  9. petermm

    RTL Class Browser stays empty

    No, no changes to the RTL so far. How can I ensure, that there are now "left overs" or other artefacts of older versions? Updating of SMs seems not to help.
  10. petermm

    CSS class name vs StyleClass property

    What I've found now is, that the <link rel="stylesheet" type="text/css" href="res/app.css"/> was missing in index.html. Maybe that was because the project includes a "Custom Template" that loads another CSS for some DHTMLX components used. I've added link rel="stylesheet" type="text/css" href="res/app.css" to the Custom Template now and the problem seems to be gone 😊
  11. petermm

    CSS class name vs StyleClass property

    From: https://jonlennartaasenden.wordpress.com/2017/10/09/smart-mobile-studio-and-css-part-1/ I've learned, that SMS uses the classname to find the matching CSS style. On the other hand the TW3xxx components do have a property named StyleClass. I'm confused: What is to use when?
  12. petermm

    CSS class name vs StyleClass property

    The problem is, that methode #1 (use custom theme and add css) does not work for me. As mentioned before, all changes to my Custom CSS are ignored at runtime. I guess it has to do with the project history (It is one that was build with SMS 2.x some years ago). Maybe the app.css file is located at a wrong place (...\www\res at the moment) or the initialization sequence is not correct for some reason... Don't know where to look next at the moment.
  13. petermm

    CSS class name vs StyleClass property

    Not sure about that. My changes to the Custom CSS are reflected to "...www\.res\app.css", but ignored at runtime.
  14. petermm

    CSS class name vs StyleClass property

    Finaly I've found the following: All exrension to my Custom CSS are ignored. I had to create my own TW3StyleSheet in FormCreate, following a suggestion in an other post in this forum, and add my extensions there. Still confused a little bit...
  15. petermm

    CSS class name vs StyleClass property

    OK, that makes sense. But I've TW3Panel set sets (at design time) StyleClass to a special style that seems to be ignored. The css style itself seems to be OK - at leats it worked with SMS 2.x
  16. petermm

    How to scroll a form by touch?

    My project works fine on the screen of a PC-Browser, but it needs some scrolling on mobile devices. Sliders are only supported by Opera mobile as far as I’ve seen, so I’ve tried to write a scroll-function following the “large map” example by manipulating the main forms left/top properties. While the approach itself seems to work, I run into the following problems: The screen parts that are scrolled into the screen are not refreshed (left black) and manual refreshing leads to a reset of left/top to zero (of course). The scroll handling overrides the edit-handling of the included components, so they are not useable anymore. So it seems that this is not good approach. So what is the best practice to scroll the viewport of form, that doesn’t fit to screen? Peter
  17. I was able to succesfully build an andoid APK from a simple SMS project, that doesn't use PhoneGap/Cordova plugins Now I have an application that is using file access (see http://forums.smartmobilestudio.com/index.php?/topic/4106-filewriter/) that I also want to deploy using phonegap/cordova. Cordova has an matching plugin called "cordova-plugin-file". My config.xml file is: <?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" xmlns:android = "http://schemas.android.com/apk/res/android" id = "de.sycon.MyPGTest" versionCode = "10" version = "0.0.1" > <!-- versionCode is optional and Android only --> <name>MyPGTest</name> <description> TEST PhoneGapAPI - File. </description> <author email="pmm@sycon.de"> Peter MM </author> <content src="index.html" /> <plugin name="cordova-plugin-file" /> <feature name="http://api.phonegap.com/1.0/device" /> </widget> I’ve include the line: {$R 'file:phonegap.js'} to my project. PhoneGap build service accepts my project and builds an android APK successfully. However, if I try to install/run the app on an android device, the app crashes without further notice Whats to do? Are there any example available showing how to use PhpneGap/Cordova PlugIn?
  18. petermm

    PhoneGap / Cordova: How to use PlugIns?

    > However, I can send you a file for Cordova though.. Very kind. You can reach my by: pmm (at) sycon dot de With asynchrounus load (as you suggested) the android version (created with PhongGap-Builder) no works fine. However I had to add: <plugin name="cordova-plugin-blob-constructor-polyfill" /> to my config.xml to make asm aBlob = new Blob(["some text"], {type: "text/plain"}); end; work.
  19. petermm

    PhoneGap / Cordova: How to use PlugIns?

    Txs for your suggestions and for your patients Christian. I hope someone else will benefit from that as well. I’ll look if my nodes/cordova is up to date later on, but since I’ve done a fresh install (following your suggestions) yesterday, I think it is. If removed cordova.js/phonegap.js from my project and the {$R cordova.js} line as well. (BTW: what do yo mean by “What needs to remain however is the link to the file…” Where should that link be?) I was able to run your code “load Cordova library asynchronous” in the SMS internal browser / chrome browser with activated developer tools. Result: Console output shows “Serving file [pathtofile\www\cordova.js] a pop up message window showing “gap_init:2” – click OK leads to: Serving file [….] messages for lots of cordova plugin files a pop up messages: gap:[null,"CoreAndroid","messageChannel","CoreAndroid1795065768"] gap:[null,"CoreAndroid","show","CoreAndroid1795065769"] gap:[null,"File","requestAllPaths","File1795065770"] and then a loop of: Error in line #1081 cordova.js that is: console.log("processMessage failed: invalid message: " + JSON.stringify(message)); with an empty message that crashes the browser.. Do you have minimalistic running example so I can compare what I’ve got to what it should look like? Edited: Finally found SO Thread: http://stackoverflow.com/questions/29678317/getting-gap-init-on-new-apache-cordova-install-when-viewing-android-app-in-brows What I did'nt know was, that the cordova.js is streamlined for the target platform and since mine was coming from the PhoneGapBuilder android APK was an android only one. Tried the one coming from the PGB windows XAP package and the strange messages mentioned above are gone
  20. petermm

    PhoneGap / Cordova: How to use PlugIns?

    OK, tried to do so: cordova platfrom add android gives the following error: Microsoft (R) Windows Script Host, Version 5.8 Copyright (C) Microsoft Corporation 1996-2001. Alle Rechte vorbehalten. E:\DLSExtensions\DBExtensions\3Tier\WEB\TEST_FilePlugIn\www\cordova.js(1974, 1) Laufzeitfehler in Microsoft JScript: 'window' ist undefiniert Questions: by " root directory of your project:" you mean the folder where the index.html is located or the .sproj one? Isn't what you descripe above that what the PhoneGap build service already has done? Inside my APK I can see the folder: ....\www\plugins\cordova-plugin-file\www\ with all the *.js files I would expect.
  21. petermm

    FileWriter

    Txs Christian. I wasn't aware of the difference between open and serve in this context. I'll try to follow your advice on how to link the cordova library and come back on this at the deployment topic.
  22. petermm

    FileWriter

    Has someone been able to successfully create / use a FileWriter in SMS? I'm trying to follow the example in: http://docs.phonegap.com/en/edge/cordova_file_file.md.html#FileWriter But all I've tried up to now doesn't work or is crashing my system
  23. petermm

    FileWriter

    Sorry but what do you mean by "...As opposed to this if you only open the html file in the browser directly (without serving the file) "? What ist the difference between "opening" and "serving" the file? But that is only out of curiosity for my goal is to run it using phonegap/cordova. Didn't expected that to be such a big issue... Isn't it possible tor run the result packed by PhoneGap inside my local browser for debugging? The resulting APK is a ZIP file and includes the "www" folder with all plugins needed. Isn't there any example available, that shows how to make a SMS project "phonegap/cordova aware"? Created a new task http://forums.smartmobilestudio.com/index.php?/topic/4107-phonegap-cordova-how-to-use-plugins/ under "deployment" for to discuss the PhoneGap/Cordova issue.
  24. petermm

    FileWriter

    Finally I found, that all the things above works without using phonegap/cordova. Still don’t know why it runs form inside SMS but not from the chrome browser (even when startet with “--allow-file-access-from-files”) but that seems to be the reasons while it doesn’t work with other browsers/android. Do make use of phonegap/cordova I guess I have to add something like: {$R 'file:cordova.js'} {$R 'file:cordova_plugins.js'} to my project, but doing so leads to crashes everywhere I’ve tried running it so far. L Because the FileWriter issue itself seems to be solved, I’ll start another thread under “deployment” to find a solution for the phonegap/cordova issue. Is that OK to do so?
  25. petermm

    FileWriter

    Txs Christian but I think we are drifting away to mutch from my original topic "PhoneGap / FileWriter". What I have so far is a working example using PG/filewriter (BTW: If you want, I can give that back to the community) By "working" I mean it is working from the internal SMS browser, as well as from the browser launched by SMS clicking "open in browser" (that is chrome 50.0.2661.102 here). Unfortunately it doesn’t work in the following situations : - Open the same index.html in Chrome started outside SMS - strange - Using IE or Safari browser - OK maybe not supported - Packed with PhoneGap to an APK and started on an android device (it seems to crash and disappears without a note) The later one is what is worse for me, because that is what I hopped for… Any suggestions? Link to the example projekt: https://www.dropbox.com/s/mk2orrajui4kvnx/TEST_FilePlugIn.zip?dl=0
×