To use KDevelop Kate Plugin Templates:
-> Create a project using the respective Kate Plugin template as normal.
-> After the build, change line 6 in the created *.desktop file (in your "src" folder)
Old:
X-Kate-Version=2.2
New (working):
X-Kate-Version=2.5
I never knew the *.desktop file only installed the plugin for the target Kate version.
The story:
During my first attempt at creating a C++ Kate Plugin (used Python [Pate] prior), I noticed KDevelop had a project template for it! It was great all the way up until the 'make install'. Then I noticed my plugin was showing up. Well after about 20mins of following make install paths... I started comparing rc files, with those plugins that were working. Everything looked fine. Then I noticed the lonely *.desktop file, and wow it was the culprit. "Kate Version", must be set to 2.5 (or whatever version you are using).
Now on to creating some plugins for the Kate community!
Sunday, March 16, 2008
Saturday, March 15, 2008
KDE Mime Type Issue
KDE3 freaked out on me recently.
If KDE says: "could not find mime type" (application octet-stream)
You do:
-> Delete '~/.kde/share/mimelnk/application/octet-stream.desktop'
-> reboot
OR
sudo kcontrol
-> File associations
-> "Add"
-> group: application
-> type name: octet-stream
Now do: happy dance
If KDE says: "could not find mime type" (application octet-stream)
You do:
-> Delete '~/.kde/share/mimelnk/application/octet-stream.desktop'
-> reboot
OR
sudo kcontrol
-> File associations
-> "Add"
-> group: application
-> type name: octet-stream
Now do: happy dance
Sunday, March 9, 2008
NSView Screenshots Using Cocoa
While hacking away with the iPhone SDK & Cocoa, I discovered (from Ryan Britton) this code to capture a NSView as a NSImage.
ref: http://lists.apple.com/archives/cocoa-dev/2005/Oct/msg00771.html
Other references: http://www.cocoadev.com/index.pl?ScreenShotCode
[code]
NSView *view = self;
[view lockFocus];
NSBitmapImageRep *bitmap = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: [view bounds]] autorelease];
[view unlockFocus];
NSImage *image = [[[NSImage alloc] initWithSize: [view bounds].size] autorelease];
[image addRepresentation:bitmap];
[/code]
ref: http://lists.apple.com/archives/cocoa-dev/2005/Oct/msg00771.html
Other references: http://www.cocoadev.com/index.pl?ScreenShotCode
Subscribe to:
Posts (Atom)