View Issue Details

IDProjectCategoryView StatusLast Update
0002129ScribusScripterpublic2005-06-28 13:03
Reportergf2e Assigned Toringerc 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMacintosh / AquaOSMacOS XOS Version10.4
Product Version1.3.0cvs 
Fixed in Version1.3.0cvs 
Summary0002129: groupObjects API function and documentation are inconsistent.
DescriptionThe groupObjects command is documented as either:
1. Grouping the objects in a list of strings you provide it,
_or_
2. If you give it no list, grouping the selected objects together.

In fact, it will _always_ include the selected objects in the group.
Steps To ReproduceSelect an object, say named "foo"
Run "groupObjects(["bar", "moof"])

You will find that foo, bar and moof are joined.

If you execute "deselectAll()" first, only bar and moof are joined.
Additional InformationI don't know whether the documented behaviour or the actual behaviour are more correct.

I would tend to suggest that the documented behaviour is more correct. It is possible that you do not want to group the selected object with the objects that you are grouping together. If that's the case, then you would need to de-select the current object first. This could irritate users - a script shouldn't just de-select everything for no reason. The script could of course de-select and re-select, but that seems like something that shouldn't be needed.

I do think that there should be a single command to get a list of all selected objects. getAllSelected, say. If this command were added, it would be easy for a script writer to execute:
groupObjects(getAllSelected()+['foo','bar'])

TagsNo tags attached.
Patch

Relationships

child of 0003812 acknowledged Metabug: Grouped objects 

Activities

ringerc

2005-06-26 11:14

reporter   ~0005150

Agreed that the documented behaviour is better. I could've sworn there was already something to return the full selection; this also needs fixing.

ringerc

2005-06-26 14:00

reporter   ~0005155

Done; behaviour now matches docs. Please report any similar issues. In future they'll be simpler to fix. Similarly, please report functions that nuke your selection, they shouldn't.

Issue History

Date Modified Username Field Change
2005-06-26 11:11 gf2e New Issue
2005-06-26 11:14 ringerc Note Added: 0005150
2005-06-26 11:15 ringerc Status new => assigned
2005-06-26 11:15 ringerc Assigned To => ringerc
2005-06-26 14:00 ringerc Status assigned => resolved
2005-06-26 14:00 ringerc Fixed in Version => 1.3.0cvs
2005-06-26 14:00 ringerc Resolution open => fixed
2005-06-26 14:00 ringerc Note Added: 0005155
2005-06-28 13:03 cbradney Status resolved => closed
2006-05-13 17:13 christoph_s Relationship added child of 0003812