Trevor Whitney

Greenhorn
+ Follow
since Dec 23, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Trevor Whitney

Thanks Ernest! A little tweak to the offending source fixed that problem. Still getting some complaints about the SWT code in there, but I've found a few resources for that one, so we'll see how things go.
13 years ago
So, I'm trying to compile a JAR down to a native windows object file using GCJ. This is my first experience with AOT compilation, so when something went wrong, I was lost. Hopefully someone here can help. When attempting to compile, I get an error that GCJ "cannot find file for class sun.security.action.GetPropertyAction". This is called for in a library I'm using, "org.jauddiotagger.logging.LogFormatter", which is a part of the jAudioTagger library for reading audio file metadata. My understanding of why this doesn't work is that since GCJ uses an open source JVM, it doesn't include all the same libraries as Sun's JVM, and this security package is one of the things it must be missing. My questions are:

1. Do I understand the problem here correctly?

2. What are my options to work around this?


Thanks!
13 years ago
The reason I ask is because I would like to create a JFace action with ImageDescriptor, but I only want that image to appear on the button, not in the menu. Right now, I'm having to create 2 instances of my action, I pass one to the menu, and the other one gets the ImageDescriptor and gets passed to the button. It seems like I should be able to just tell the menu to hide all images, or suppress the image when I add it to the menu. Having to create 2 instances of the same action, because of different graphical representations seems counter-intuitive to the MVC architecture that JFace is trying to provide.

Thanks for any help!
13 years ago
If I use it creates an SWT button that runs my JFace action when clicked. Is there any way I can directly call methods on this button, so I can directly manipulate it (such as adding an image to it)?
13 years ago
Hello! Looking forward to the book
13 years ago
GWT
The above code is based on the example in this article.
13 years ago
So, I have two applications. One works with setting up Image descriptors, applying them to actions, and seeing them show up in my menus and toolbars. When the program can't find the image, I get a little red box. In another program, I've set up the descriptors in the exact same way, applied them to the actions in the same way, and added the actions to the menus in the exact same way. Problem is, in the second application, I'm not getting any images, not even red squares, just the tool tip text. I can't for the life of me figure out what is different between the two. Even if I drag the first class into the second project, it still works, but the second program doesn't! I have poured over this, so its time for a second set of eyes. Hope someone can help

Program 1 (working):


Program 2 (not working...main() is in another class, creating this class then other lines are same):


Hope someone can help. Thanks.
13 years ago
Thanks for the response Tim.

But blank makes more sense for this sort of thing anyway



How do you do this while simultaneously associating the value with an int property in my bean? Since the value of this is set to "#{NewUser.last4SSN}", and that is an integer variable, it defaults to 0, thus displaying a 0 in the input field instead of a blank. I think a blank might solve my problem, but I can't figure out how to do that. The validator does run when I don't touch the field and leave it at 0.
14 years ago
JSF
Hello All,

So here is the goal. I'm creating a form for our intranet at work. The form populates a staff directory, but can also be used to create a new email and domain account for new hires. If the latter is being done, the last 4 digits of the new employee's SSN need to be included. If only their contact information is being added, the SSN field can be left blank. So, a value is entered into the SSN field, I would like to validate it, but if it's left blank the value will be 0, and there is no need to run validation on it. So I tried this:



This, of course, didn't work. Since the form does not actually complete, due to a few required fields I left blank, the "last4SSN" property is not being set. Thus, when I try to test if it's greater than 0, well, I have no value to evaluate. That leads to my question: How can I get the value that is currently in the <h:inputText> box using JSP or JSF? I can think of a solution using JavaScript, but I would like to do this entirely with JSP and JSF tags.

So, anyone know how I can set up a conditional <f:validateLength> tag, that only executes if the current value of the <h:inputText> box is greater than 0?

Thanks for the help!

-Trevor
14 years ago
JSF
Hey everyone,

Thanks for all the responses. I guess the conclusion is that it's not really possible to have ONE installation shared across systems. What I'm doing now is having OS-specific installations installed on each of my machines, with a local workspace where the .metadata is kept. I periodically create archives that include my eclipse installation folder and local worksapce, one for each OS, and that makes installing on a new machine quick and easy. As for my projects, whenever I start a new one, I don't use the default workspace, but instead create a folder in my dropbox folder, which synchronizes my project files across my various computers. Then, all that's needed is to import the project on the other machines, and everything's always available and up to date, regardless of what machine I'm on. So far it's been working pretty well!

Thanks again for the help and warm welcome to the community!

-Trevor
I develop across a few different machines, most of which are windows, but one is linux. My goal is to have all installations point to a single workspace folder that I replicate on all machines using Dropbox. The problem is that the ".metadata" folder that is in the workspace has machine specific information in it, that would confuse my linux machine if it had windows paths. Thus, the goal, is to create two ".metadata" folders, one called ".metadata-windows" the other called ".metadata-linux". The next step would then be to change something in an eclipse file somewhere that tells it to load the correct metadata. So my windows installations would find the windows metadata, and linux installations would get the linux metadata. The question is, does anyone know if this is possible? And if so, where and what do I need to change?

There are ways around this I realize, like putting the project folders in dropbox and then just manually adding them to my various eclipse installations, each with their own workspace. But I though it would be cooler to just have the one workspace. Any ideas anyone has would be greatly appreciated.

Thanks,
Trevor