The default bug view has changed. See this FAQ.

Can't insert first item to the bookmark folder

VERIFIED FIXED

Status

Core Graveyard
Java APIs to WebShell
P3
normal
VERIFIED FIXED
17 years ago
5 years ago

People

(Reporter: Alexei V. Mokeev, Assigned: edburns)

Tracking

Trunk
x86
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: suntrak-n6)

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
When we try to add new bookmark to the empty folder 
via method addBookmark(BookmarkEntry mayBeNullParent, BookmarkEntry bookmark) of
Bookmarks interface, then we just got "ASSERTION: illegal value 'aIndex>=1'" and 
nothing more. 
Supposed reason: RDF containers are one-indexed(elements numbered 1,2,3.. but
not a 0,1,2 ..). But in BookmarksImpl.java we are use childCount value as a
lastChildIndex and in case of empty folder this value is equals to 0, and then
try to insert new bookmark at this position.

This bug is reproduced on Mozilla M16 and webclient sources from July,07 2000
(Assignee)

Comment 1

17 years ago
a
Status: NEW → ASSIGNED

Comment 2

17 years ago
Adding Status white board keyword to track all existing Webclient bugs
Whiteboard: suntrak-n6
(Assignee)

Comment 3

17 years ago
Created attachment 20321 [details]
tar.gz Fix for this bug, first iteration
(Assignee)

Comment 4

17 years ago
This fix enables the adding of bookmarks and bookmark folders.

 * Due to the vagaries of the mozilla RDF implementation, folders and
 * bookmark entries are handled differently.  For Folders, we don't
 * create a nativeRDFNode at the outset.  Rather, we just create the
 * properties table and stock it with the known keys, then wait for the
 * nativeRDFNode to be created en addBookmark.

 * The adding of bookmark folders is done through the RDF DoCommand
 * interface.  The DoCommand interface creates the nsIRDFResource on
 * your behalf.  We use an nsIRDFObserver to obtain the created resource
 * as the DoCommand executes.


A src_moz/wsRDFObserver.cpp
A src_moz/wsRDFObserver.h
M classes_spec/org/mozilla/webclient/BookmarkEntry.java
M classes_spec/org/mozilla/webclient/test/EMWindow.java
M classes_spec/org/mozilla/webclient/wrapper_native/BookmarkEntryImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/BookmarksImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/RDFTreeNode.java
M src_moz/Makefile.win
M src_moz/Makefile.in
M src_moz/RDFActionEvents.cpp
M src_moz/RDFActionEvents.h
M src_moz/RDFTreeNode.cpp
M src_moz/rdf_util.cpp
M src_moz/rdf_util.h
M src_moz/motif/NativeLoaderStub.cpp
M src_share/jni_util.cpp
M src_share/jni_util.h
(Assignee)

Comment 5

17 years ago
Created attachment 20356 [details]
tar.gz fix for this bug, second iteration: works on solaris, has comments.
(Assignee)

Comment 6

17 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 7

16 years ago
Verified with : mozilla branch Netscape61_RELEASE and blackwood branch 
JAVADEV_6_1_20010831 under Win NT 4.0.
I can correctly insert first item to bookmark folder.
(Reporter)

Comment 8

16 years ago
VERIFIED
Status: RESOLVED → VERIFIED

Updated

16 years ago
QA Contact: geetha.vaidyanaathan → avm
Component: Java APIs to WebShell → Java APIs to WebShell
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.