× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



1.- You invoke "hairline", which will not work unless you also regisater this command (e.g., from the preference page).

I suggest you add this line:

import com.ibm.lpex.samples.CursorHairline;

and replace:

lpexView.doCommand("hairline cursor");

with the straight:

CursorHairline.install(lpexView, true /*trackCursor*/);

2.- Please note that calling:

lpexView.doDefaultCommand("updateProfile");

is without effect, as the user profile is actually called during the execution of this command (when a view is initialized).

Peter.Colpaert@xxxxxxxxx wrote:
I followed the instructions to the letter, but it doesn't seem to work for me.

Here's the source of my UserProfile1 class:

package com.mycompany.lpexExtensions;

import com.ibm.lpex.core.LpexAction;
import com.ibm.lpex.core.LpexView;

public class UserProfile1 {
public static void userProfile(LpexView lpexView) {
// define new action
lpexView.defineAction("insertSemicolon2Action", new LpexAction() {
public void doAction(LpexView view) {
// go to the end of the line
view.doAction(view.actionId("contextEnd"));
// insert a semicolon and comment string
view.doCommand("insertText ; /* */");
// position the cursor in the middle of the comment
view.doAction(view.actionId("left"));
view.doAction(view.actionId("left"));
view.doAction(view.actionId("left"));
}
public boolean available(LpexView view) {
// allow the actino to run for any visible text line in a writable document
return view.currentElement() != 0 && !view.queryOn("readonly");
}
});
// assign keys "Ctrl+5" to run insertSemicolon2Action
lpexView.doCommand("set keyAction.c-5 insertSemicolon2Action");
lpexView.doCommand("hairline cursor");
lpexView.doDefaultCommand("updateProfile");
}
}

Am I doing something wrong, because I don't see the hairline when I open an RPGLE member. I still need to type "hairline cursor" every time I open a source.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.