Using Plugins Within A Windows Service App

  1. 8 months ago

    Grant S

    26 Jan 2019 Pre-Release Testers, Xojo Pro Sydney, Australia

    Greetings all,

    I have a Windows 7 x86 desktop app which I now want to convert to a Windows Service App.

    The Windows desktop app uses my own custom plugin as well as Christian's MBS plugins.

    The desktop app works fine with no issues.

    When I try and compile the service app, the plugin classes are not being recognised, while the IDE recognises the plugins for autocomplete purposes.

    Am I missing something?

    Is there a restriction on using plugins in console/service apps?

    I've check that my classes have the 'REALconsoleSafe' flag set.

    Any ideas?

    Cheers
    Grant
    (Xojo 2018r4 x64 Win7 x64)
    Custom Plugin x86 & x64

  2. Christian S

    27 Jan 2019 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store Germany

    Make sure console flags are set for classes, modules, methods and properties.

  3. Grant S

    27 Jan 2019 Pre-Release Testers, Xojo Pro Sydney, Australia

    @ChristianSchmitz Make sure console flags are set for classes, modules, methods and properties.

    Checked and done. Still no joy.

    Christian even your plugins are having the same effect. I tried JSONMBS & MemoryBlockMBS which I would presume are both console safe also are unable to be compiled.

    Any further ideas?

    Cheers
    Grant

  4. Christian S

    27 Jan 2019 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store Germany

    Are you sure you have plugins loaded?

    I just created new project based on the Service template.
    I added a line "dim j as new JSONMBS" and build it. Works here and I get the app build with MBS plugin in libs folder.

  5. Grant S

    28 Jan 2019 Pre-Release Testers, Xojo Pro Sydney, Australia
    Edited 8 months ago

    Christian,

    Yes my plugin loads, and as before, there's no issue with my desktop app.

    I've also confirmed that there must be something wrong with my plugin connected with console/service apps because when I moved my plugin out of the plugins folder and launched Xojo again, and created a new service app, your MBS plugins worked again.

    I'm stumped. Why would my plugin work without issue in a desktop app but not a console/service app?

    I wonder if anyone from Xojo can shed some light on this?

    Cheers
    Grant

  6. Christian S

    28 Jan 2019 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store Germany

    the difference are the flags.

    You need to use REALconsoleSafe everywhere.

    I even defined REALconsoleUnsafe, so I can make sure it's either this or that.

  7. Grant S

    28 Jan 2019 Pre-Release Testers, Xojo Pro Sydney, Australia

    Found the problem.

    My custom plugin has a property which is a class from another plugin...Valentina. This particular class must be listed as not console safe because when I removed it from my module inside my plugin, no errors in my windows service app.

    What particular circumstances would a class be definitely NOT console safe? I presume it's anything to do with being GUI related.

    I wasn't using this property yet anyway so no workaround required.

    Thanks again Christian for you valuable input.

    Cheers
    Grant

or Sign Up to reply!