xojo/Realbasic error

Hi, I tried following the guys on the site to integrate Activation into my xojo project. I even created a new project to see if this was related to my project and it is not. When trying to Debug/Build my project I get "There is more than one item with this name and its not clear to which this refers : gr=TurbActivate.IsGenuine(90,14, True)I have looked at all of the usual suspects and I cannot get it to work. Again I am using code that is copied and pasted from the online guide provided by WyDay.

Is there any fix?

The help documentation is a bit out of date (we're working on updating it). Look at the example app in the API\Xojo folder and you will see you need to create a TurboActivate instance and then call the method on that instance. Like so:

'TODO: goto the version page at LimeLM and paste this GUID here ta = new TurboActivate("18324776654b3946fc44a5f3.49025204") ' Check if we're activated, and every 90 days verify it with the activation servers ' In this example we won't show an error if the activation was done offline ' (see the 3rd parameter of the IsGenuine() function) ' https://wyday.com/limelm/help/offline-activation/ Dim gr As IsGenuineResult = ta.IsGenuine(DaysBetweenChecks, GracePeriodLength, True) isGenuine = (gr = IsGenuineResult.Genuine Or _ gr = IsGenuineResult.GenuineFeaturesChanged Or _ gr = IsGenuineResult.InternetError)

OK, so I'm not following. I cannot get the example to work, even with following the guide and pasting the GUID where needed (in both locations) and including the .dat and dll in the copy files, the more I try things, the more down the rabbit hole I get, the more errors I encounter. My assumption was that I could run the demo and see how it all works, then basically model that inside my application, but no go. I'm willing to throw more time at it to get it to work, but I've been at the trial and error stage for a few hours now. Let me know if there is a sure fire way to get the demo to work, or something I can follow to create my own quick Xojo file by importing the files needed. At that point I can figure out how to get it working in my app. At this point I cant even get it to build without errors.

OK, I got somewhere. I am able to Check for activation and Deactivate, but using your PKey Window in the Xojo Demo app, I cannot Activate. I get a TA_System nil object error on this sub:

If Not ta.CheckAndSavePKey(txtPKey.Text, TA_SYSTEM) Then Raise new TurboActivateException("The product key is not valid.") End If

I fell like I'm ALMOST there, let me know if you can help

If Xojo is telling you that TA_SYSTEM is not being recognized, then that means you've forgotten to add the "TurboActivateHelper" module ("TurboActivateHelper.xojo_binary_code") to your app. That contains public constants used by TurboActivate and your app.

Tell me if that helps.

I definitely have all of the modules are in there. I played around with it for a few more hours last night and no matter what I do I cannot get past the nilObjectException error on this line:

If Not ta.CheckAndSavePKey(txtPKey.Text, TA_SYSTEM) Then Raise new TurboActivateException("The product key is not valid.") End IfI of course have txtPKey.Text filled in so its not that.

Does TA_System have to be initialized somewhere? I am like 90% there, I just cant figure why I cannot insert the product key into ta.CheckAndSavePKey

Also keep in mind that you have code: trialFlags = TA_SYSTEM I am not using any trials, I am not sure what TA_SYSTEM is supposed to return if I am not using a trial

Got it figured out! I am looking forward to implementing this in my software.

OK, After much success on Windows I am trying to implement thison the mac version of my app and I am having trouble. I have read and followed the guide, but no luck. Also is the Turboactivate.dll for mac different? There is non in the turboactivate for mac download

I am getting an error on Raise new ProductDetailsException()Which seems to indicate that the .dat file is missing or corrupt. I am using the same version as windows and the windows version of this app works great. Please advise.

After further review it looks like the handle variable is 0

TurboActivate Constructor:

' Get the handlehandle = TA_GetHandle(versGUID)

' if the handle is still unset then immediately throw an exception' telling the user that they need to actually load the correct' TurboActivate.dat and/or use the correct GUID for the TurboActivate.datIf handle = 0 Then Raise New ProductDetailsException() End If

This is where i Get my error. Also, I am, loading the dylib and the .dat file in the same folder as debug. Which I WANT, I dont want them inside the Mac Package

OK, so still trying different things here on a mac.

THis does not work, it says "Does not Exist"

#If DebugBuild PDetsFromPath("/location/to/TurboActivate.dat")#Endif

Basically I think I need to know where/How to specify finding the TurboActivate.dat file from the same path as the application. Again I want to load it from the same folder as the application, not inside the bundle or inside the framework, just the local folder. The same folder as the Debug

Thanks

The example app shows how to handle this. Functionality has changed a bit since that article was written. Like I've said it something we plan on updating. But the code will show you how to do things:

#If DebugBuild ta = new TurboActivate("18324776654b3946fc44a5f3.49025204", "/location/to/TurboActivate.dat") #else ta = new TurboActivate("18324776654b3946fc44a5f3.49025204") #Endif

Thanks Wyatt, I think I got that figured out, but is there a clean way to reference the executable path's folder without using an absolute path for the turboactivate.dat file?