NetBeans Platform 6.1 Tutorial Woes

View: New views
3 Messages — Rating Filter:   Alert me  

Re: NetBeans Platform 6.1 Tutorial Woes

by Geertjan Wielenga :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hi,

Thanks a lot for the comments. I've fixed many of the inconsistencies
you've pointed out, here are responses to other items:
>
> 2) In step 2, I'd like to use Java 6's built in splash screen instead of the
> one NetBeans provides.  The NB splash screen is delayed when opening,
> appears white until painted, etc.  This does not seem possible in this
> dialog, but that's not a big deal.
>  
What do you mean? What is "Java 6's built in splash screen"? Please
explain the steps you took, your expected outcome, and what happened
instead.

>
> 2) In step 3, we're supposed to setup the libraries.  My first problem is
> that when I go into the libraries section, certain clusters have all the
> modules selected (and the module list is disabled) yet the checkbox next to
> them is unchecked.  In order to "uncheck" the modules, I have to first
> "check" the cluster to enable the modules list, then I have to uncheck them
> one by one.  I'm used to the parent checkbox (the cluster) acting as a check
> all/uncheck all.
>
>  
Yes, I would like that to be more intuitive as well. But, this is not
really a comment on the tutorial, so what you need to do is to create an
issue in Issuezilla:

> 3) The next issue is in step 3, I'm supposed to copy and paste a list of
> entries into the config file so that my libraries matches the tutorial
> exactly.  If I do this, and then open the project properties library
> section, I get a million red dependency errors.  
Really? If so, caqn you download the completed tutorial sample, linked
to the top of the tutorial, and compare the results?


> Finally, if I run the
> project I get a warning screen with dependency errors.
>
>
>  
Again, please compare to the download at the top of the tutorial.

I think most of your problems arise from having different dependencies
set, somehow, than required. I would recommend downloading the sample at
the top of the tutorial and comparing. I would be very interested to
hearing back from you so that the tutorial can be improved.

Thanks,

Geertjan

NetBeans Platform 6.1 Tutorial Woes

by jonaqua :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tonight I decided I was going to learn the NetBeans platform.  I had an issue or two with an older tutorial for 5.0 but for the most part I was able to get something up and running.

This tutorial has a shiny web 2.0 icon "REQUIRES NetBeans 6.1".  So I thought, great! The tutorial was written for NB 6.1!  I won't have any issues...!  I was wrong.


Generating the Skeleton Application
-----------------------------

1) The first step is a sign of things to come.

It says: "...the very first step is to create a module suite project."

Alright, that seems easy enough.  However, the screenshot shows "NetBeans Platform Application" is selected instead of "Module Suite" and a few sentences later it tells you to create a NetBeans Platform Application Project.  So I used my brain and chose "NetBeans Platform Application".


2) In step 2, I'd like to use Java 6's built in splash screen instead of the one NetBeans provides.  The NB splash screen is delayed when opening, appears white until painted, etc.  This does not seem possible in this dialog, but that's not a big deal.


2) In step 3, we're supposed to setup the libraries.  My first problem is that when I go into the libraries section, certain clusters have all the modules selected (and the module list is disabled) yet the checkbox next to them is unchecked.  In order to "uncheck" the modules, I have to first "check" the cluster to enable the modules list, then I have to uncheck them one by one.  I'm used to the parent checkbox (the cluster) acting as a check all/uncheck all.

3) The next issue is in step 3, I'm supposed to copy and paste a list of entries into the config file so that my libraries matches the tutorial exactly.  If I do this, and then open the project properties library section, I get a million red dependency errors.  Finally, if I run the project I get a warning screen with dependency errors.


Tweaking the User Interface
-----------------------------
4) In step 2, it tells you to enter the XML layer field but it makes no mention of the code base field.  What happens if the layer.xml is not in the same directory as the code base?  "org/company/mypkg/layer.xml" does not match the default code base name.  I looked at the screenshot for the next step, and just formatted them to be in the same package.

5) In step 4 of tweaking the user interface, it shows deleting New Project, New File.. but if I run the project these items do not exist so I was a bit confused what the purpose of deleting them was.

6) Since the image displayed deleting New Project and New File, that's what I did.  Apparently, I'm supposed to be able to view these items in layer.xml, but when I open layer.xml all I have is this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
<filesystem>
</filesystem>

At this point, I'm thinking: "Oh my god I just deleted the New Project menu item!  How do I get it back!"

7) layer.xml is misspelled as leyer.xml

8) I decided to copy and past the contents of step 5's layer.xml into my module's layer.xml to try and bring the new project items back.  Doing this made some of the items in the <this layer in context> tree bold.  Ok this is cool, but how the heck do I restore the New Project menu item!

9) Moving on, while tweaking the Window layout, I'm supposed to find some ComponentPaletteWstcref.xml file and change the open state to true.  Ok, right click the Windows2 node, choose Find, "ComponentPalette".  "No matching files were found".  Great!  I guess I don't need a component palette!

10) Another thing I noticed is that these files aren't even named the same.  The tutorial shows them as runtimeWstcref.xml while the tree in NB 6.1 shows them as runtime.wstcref.

11) While writing that last line, NetBeans 6.1 came up with an error 20 seconds after finishing disabling the open state of runtime.wstcref:

"Cannot get shared access to
D:\dev\NBPlatformTutorialHTMLEditor\BrandingModule\src\com\mycompany\brandingmodule\runtimeWstcref.xml (probably opened for writing).

Alright, that makes sense.... I guess.

Running the Application
-----------------------------
12) Clean and Build All... Run... oh my it looks nothing like the screen shot and I get a bunch of warnings...

WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.editor uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.options.editor uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.editor.macros uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.editor.codetemplates uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.gsf uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.gsf uses org.netbeans.modules.editor.highlights which is deprecated: Use org.netbeans.spi.highlighting (Editor Library 2) instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.html.editor uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.editor.plain uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.

I don't have an HTML Files tab even though I set favorites "state opened" to true.

I give up!  Why can't this tutorial be straightfoward!? argh...

Re: NetBeans Platform 6.1 Tutorial Woes

by jonaqua :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Geertjan,

Sorry if my message sounded harsh.  I was a bit grumpy :)  You can ignore the bit about the splash screen - it has nothing to do with the tutorial.

I believe the issue I had with the libraries is that I went through and modified them myself (leaving some with dependency errors).  Then, I opened up the platform config file and copied all those entries in.  I assumed the project was in a good state and clicked the green "Run Main Project" icon.  I think I needed to do a clean and build at that point.

However, I just did the tutorial again and even with valid libraries I could not complete the tutorial.

My main issue is that the layer.xml file is "not" being modified at all.

Here, you can see I deleted the macro recording items, then opened the layer.xml file and it is still empty:
http://i31.tinypic.com/wlyert.gif

I left that file alone and continued the tutorial (creating the Bundle.properties file for the Favorites item).

After doing a clean and build on both the module and project this is what I see:
http://i30.tinypic.com/24lptv5.gif

Here, you can see my project structure (I'm not making this up!):
http://i32.tinypic.com/16m2l8w.gif

The next step I took was to copy the layer.xml from the tutorial and put it into my layer.xml file (since mine was not being updated).

I then, did a clean and build on both the module and application project.  I once again saw the same result as I did before:
http://i30.tinypic.com/24lptv5.gif


I did download the sample and it ran fine.  When I get a chance during lunch I'll see if I can see what the differences are.  Thanks for your help!