Using a custom component - delphi

I'm making an application that has to do with World of Warcraft.
To keep it short; You can pick talents that give you certain skills, in my application I added a talent calculator. Here you can pick talents, each talent has a description.
This is shown, like all spells and items, in a tooltip. For an example check here and hover over one of the talents.
So I want to make these tooltips too.
To do this I created a custom component following 2 guides
Guide 1 here
Guide 2 here
Now I made my component based on a panel. Made a package and installed it which all works.
It also shows in the list of components at design time.
Then I drag it onto my form, it gets automaticly included in the uses however...
When I try to run/build/compile my application I get an error and it says:
Cannot resolve unit name 'Tooltip'
and I have no idea how to fix this.
There are plenty tutorials that show you how to make a custom component but none of them talks about this problem. Am I doing something wrong?
Any advice will be very welcome :)

You have to setup the common library path and search path.
Open from IDE-Menu Tools\Options
Walk to Environment Options\Delphi Options\Library
Edit Library Path and add the Path containing the component compiled libraries (.dcu files) or the path containing the component source files
Edit Search Path and add the Path containing the component source files (this is optional but helpful when debugging)
You have to repeat theses steps for all platforms your component will be used. But if you put the library path to compiled libraries, you have to ensure the right .dcu for the platforms.

Related

Debugging a System.IO.Package out that won't open in Excel, possibly content_type.xml issue?

I'm trying to create a 2007+ Excel document (.xlsx), using nothing but VB.net and .net4.0 built-in classes. So I can't use any third party libraries, including Open XML SDK. The code already works fine for basic workbooks, multiple sheets, styles, etc. The resulting files open fine in Excel and calc etc.
Now I am trying to add pivotTables. They are a bit weird, as they are spread out in multiple files. I have created the Cache and Table in their proper "folders", added the pointer from workbook to the cache and the various related _rels entries... everything seems OK but Excel always reports "... found unreadable content in..."
The only obvious issue I can see is that the content_types.xml file in the resulting Package does not have an Override for the pivotTable. It does have one for the Cache, which I do not do in code, so I'm assuming Packaging has noticed the Cache and added a line here. I'm not clear on why the pivotTable didn't show up.
So looking for experts in Packaging that might point me in the right direction: is a missing line in content_types fatal to opening the file, and if so, how can I force the pivotTable to appear?

using Stripes bank example UI in Swift project

I am trying to use stripes UI example in my person swift project. I have tried to drag and drop the desired files inside of my project and update my headers and compile sources but I am still getting hit with errors I will leave screenshots below,
and most importantly, I am getting
I was wondering if someone has previously used Stripes BECS example UI in their own personal project and had any idea on why these issues would be popping up.
You need to install Stripe per the documentation, you can't just drag and drop files in to your project: https://stripe.com/docs/mobile/ios/basic#client-side
I'd recommend you try doing a basic example integration in a new project to figure out how the bits work, and then make use of those learnings to integrate it into your application.

Template Dialogue Box not showing up when trying to create a new file in a Xcode Workspace

When I right click to add a new file (or do File -> New -> File), I don't get a dialogue box asking me which Template I want to use. It just creates a blank file like this:
I tried renaming it to a .swift file and adding in all the necessary code to start off, but two things happen:
First, the autocomplete function is one step behind. So when I've already typed import UIKit and moved on, it starts trying to autocomplete UIKit. And when I've already typed class className: UICollectionViewController {
} and moved on, it starts trying to autcomplete UICollectionViewController
After I manually type in the bare minimum needed to make a swift file into a UICollectionViewController with a colored background, I can't reference it in my other files.
I can only assume this is because of the lack of a template dialogue box, but maybe I'm wrong. Is there any way to toggle this template dialogue box on or off?
This problem is only happening with this particular project since I updated to Xcode 10.1
I can't seem to find anyone else online who's already had this issue. The only similar questions I found online were referring to creating reference folders rather than groups. I didn't find anything regarding the file template dialogue box not showing up.
I fixed this and I'll post the answer in case anyone else comes across this problem.
It was tedious, but I:
Created a new project
Initialized my podfile, added what was in the previous one, and installed it
Opened up the new workspace
Added each file one by one
Maybe there's an easier/quicker way to do it, but after looking through all the settings and not finding anything, I ended up doing this and it worked.
Check that in the left hand pane displaying your project structure you are adding the new file to a folder which comes under your application (identified by a blue Xcode application icon) instead of a general folder as your top level (identified by a blue folder icon). I can't add images yet so please see link.

How to make a dependent local package application folders visible

Using the information at https://www.dartlang.org/tools/pub/dependencies.html#path-packages
I have gotten one app epimss_design to depend on epimss_podo. However, I wanted to now edit a class in the dependent package epimss_podo, but now it is only represented by an empty folder in the editor. I was expecting the epimss_podo folder structure with its lib folder to be visible. According to the information 'Any changes you make to the dependent package are seen immediately'.
Question | How do I get the epimss_podo visible which will allow me to work with it?
I am using Polymer 0.12.0-dev and Dart Editor version 1.6.0.dev_03_00 (DEV) Dart SDK version 1.6.0-dev.3.0
You need to open both packages as folders separately in DartEditor.
When you change something in epimss_podo this change will take effect immediately when you reload for example epimss_design/web/index.html which uses some code from epimss_podo/lib/some_file.dart

Combining Log4Delphi and jcl debug

At the moment I'm testing various logging framework for use in Delphi XE 3. Since using Log4Delphi made least problems concerning implementation into existing programs, I'm currently trying to get additional Informations for my logmessages. Now what I want to have are additional informations like method name and the line of code. I've already found the Jedi Code Librarys' debug functions might provide such data. Sadly I wasn't able to figure out hot to get this to work the way I want it.
As it is I'm currently using this function:
function CurrentFunctionName: string;
begin
Result := jcldebug.getlocationInfoStr(Caller(1));
end;
But while the code examples I've found provide data like this:
[004223A7] jcldebugtest.SomeProcedure (Line 10, "jcldebugtest.dpr")
All data I get when I'm trying to use it in my programs looks like this:
(00E8EF63) [0128FF63]
I don't fully understand the reason for this behavior, so it would be very nice if someone could explain to me how to do this properly and where my mistake/misunderstanding is located.
You need to go into Project->Options->Linker, and turn on the Detailed map file, and then build (not compile!) your project. The map file information is necessary to convert from raw addresses to specific locations in the code.
You can test this using the example located in the JCL\Examples\Windows\Debug\SourceLoc folder. If you build and run the SourceLocExample.dpr, clicking the "Caller()", "Address lookup", or "Stack dump" buttons will return simply the memory addresses. Then follow the instructions above to enable the detailed map file, do a Project->Build from the IDE's menu, and run the example again, clicking the same buttons and comparing the output.
You can then (optionally) use the Project->JCL Debug expert to embed the debug info into your executable instead of providing it as a separate file that needs to be distributed.

Resources