[softwarelist] Bookmark names - OPro RO

  • From: Gavin Crawford <gav@xxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Mon, 22 Aug 2011 12:50:44 +0100

Hi David,
Is there a maximum allowed length of a bookmark name when using 
bmcreate()?

I can safely create a bookmark with a name of up to 19 characters, but 
20 causes OPro to crash with a type 5 internal error.

I was hoping to find that it would allow longer names to be used, up 
to 40 characters would have been perfect, but even so, maybe a more 
graceful approach to dealing with lengths over 19 chars should be 
added, rather than causing a type 5

Not sure what though?
It could either just take the first 19 characters of the name and 
create the bookmark as per usual, the problem being if a number of 
bookmarks are being created with similar names longer than 19 chars, 
such as
'This_is_a_long_bookmark_name_1', 'This_is_a_long_bookmark_name_2'
would then end up with both creations using the name 
'This_is_a_long_book'.
I've not checked what happens when two bookmarks are created with the 
same name, whether it supplies different handles for each or the 
second overrides the first.

The other approach is not to create a bookmark at all and bmcreate() 
return 0/FALSE. Although this could potentially break existing applets 
as they wouldn't be checking for a handle returned as zero and could 
just expect the returned value to be valid. But then existing applets 
must already be using names less than 20 characters or they would be 
working, so maybe this doesn't matter too much?


Just though I'd open this up for discussion,
Gavin
To unsubscribe or subscribe goto: //www.freelists.org/list/davidpilling

Other related posts: